/*
* ion/ioncore/activity.c
*
- * Copyright (c) Tuomo Valkonen 1999-2006.
+ * Copyright (c) Tuomo Valkonen 1999-2007.
*
* Ion is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by
mgr->mgd_activity++;
if(!mgr_marked){
- region_notify_change(mgr, "sub-activity");
+ region_notify_change(mgr, ioncore_g.notifies.sub_activity);
region_mark_mgd_activity(REGION_MANAGER(mgr));
}
}
mgr->mgd_activity=maxof(0, mgr->mgd_activity-1);
if(!region_is_activity_r(mgr)){
- region_notify_change(mgr, "sub-activity");
+ region_notify_change(mgr, ioncore_g.notifies.sub_activity);
region_clear_mgd_activity(REGION_MANAGER(mgr));
}
}
propagate_clear(reg);
}
- region_notify_change(reg, "activity");
+ region_notify_change(reg, ioncore_g.notifies.activity);
return nset;
}
/*EXTL_DOC
- * Return list of regions with activity/urgency bit set.
+ * Iterate over activity list until \var{iterfn} returns \code{false}.
+ * The function itself returns \code{true} if it reaches the end of list
+ * without this happening.
*/
EXTL_SAFE
EXTL_EXPORT
-ExtlTab ioncore_activity_list()
+bool ioncore_activity_i(ExtlFn iterfn)
{
- ExtlTab t=extl_create_table();
- ObjListIterTmp tmp;
- Obj *obj;
- int i=1;
-
- FOR_ALL_ON_OBJLIST(Obj*, obj, actlist, tmp){
- extl_table_seti_o(t, i, obj);
- }
-
- return t;
+ return extl_iter_objlist(iterfn, actlist);
}