to normal and the other way around.
for the themers: the iconbox icon, the pager window and the pager desk, receive
the signals e,state,urgent and e,state,not_urgent, so you can do something nice
with those.
SVN revision: 26772
static void _e_border_event_border_desk_set_free(void *data, void *ev);
static void _e_border_event_border_stack_free(void *data, void *ev);
static void _e_border_event_border_icon_change_free(void *data, void *ev);
+static void _e_border_event_border_urgent_change_free(void *data, void *ev);
static void _e_border_event_border_focus_in_free(void *data, void *ev);
static void _e_border_event_border_focus_out_free(void *data, void *ev);
static void _e_border_event_border_resize_free(void *data, void *ev);
EAPI int E_EVENT_BORDER_UNSTICK = 0;
EAPI int E_EVENT_BORDER_STACK = 0;
EAPI int E_EVENT_BORDER_ICON_CHANGE = 0;
+EAPI int E_EVENT_BORDER_URGENT_CHANGE = 0;
EAPI int E_EVENT_BORDER_FOCUS_IN = 0;
EAPI int E_EVENT_BORDER_FOCUS_OUT = 0;
EAPI int E_EVENT_BORDER_PROPERTY = 0;
E_EVENT_BORDER_UNSTICK = ecore_event_type_new();
E_EVENT_BORDER_STACK = ecore_event_type_new();
E_EVENT_BORDER_ICON_CHANGE = ecore_event_type_new();
+ E_EVENT_BORDER_URGENT_CHANGE = ecore_event_type_new();
E_EVENT_BORDER_FOCUS_IN = ecore_event_type_new();
E_EVENT_BORDER_FOCUS_OUT = ecore_event_type_new();
E_EVENT_BORDER_PROPERTY = ecore_event_type_new();
edje_object_signal_emit(bd->bg_object, "e,state,urgent", "e");
else
edje_object_signal_emit(bd->bg_object, "e,state,not_urgent", "e");
- /* FIXME: we should probably do something with the pager or
- * maybe raising the window if it becomes urgent
- */
+ E_Event_Border_Urgent_Change *ev;
+
+ ev = calloc(1, sizeof(E_Event_Border_Urgent_Change));
+ ev->border = bd;
+ e_object_ref(E_OBJECT(bd));
+ ecore_event_add(E_EVENT_BORDER_URGENT_CHANGE, ev,
+ _e_border_event_border_urgent_change_free, NULL);
}
bd->new_client = 0;
}
static void
+_e_border_event_border_urgent_change_free(void *data, void *ev)
+{
+ E_Event_Border_Urgent_Change *e;
+
+ e = ev;
+ e_object_unref(E_OBJECT(e->border));
+ free(e);
+}
+
+static void
_e_border_event_border_focus_in_free(void *data, void *ev)
{
E_Event_Border_Focus_In *e;
typedef struct _E_Event_Border_Desk_Set E_Event_Border_Desk_Set;
typedef struct _E_Event_Border_Stack E_Event_Border_Stack;
typedef struct _E_Event_Border_Icon_Change E_Event_Border_Icon_Change;
+typedef struct _E_Event_Border_Urgent_Change E_Event_Border_Urgent_Change;
typedef struct _E_Event_Border_Focus_In E_Event_Border_Focus_In;
typedef struct _E_Event_Border_Focus_Out E_Event_Border_Focus_Out;
typedef struct _E_Event_Border_Property E_Event_Border_Property;
E_Border *border;
};
+struct _E_Event_Border_Urgent_Change
+{
+ E_Border *border;
+};
+
struct _E_Event_Border_Property
{
E_Border *border;
extern EAPI int E_EVENT_BORDER_DESK_SET;
extern EAPI int E_EVENT_BORDER_STACK;
extern EAPI int E_EVENT_BORDER_ICON_CHANGE;
+extern EAPI int E_EVENT_BORDER_URGENT_CHANGE;
extern EAPI int E_EVENT_BORDER_FOCUS_IN;
extern EAPI int E_EVENT_BORDER_FOCUS_OUT;
extern EAPI int E_EVENT_BORDER_PROPERTY;
static int _ibox_cb_event_border_iconify(void *data, int type, void *event);
static int _ibox_cb_event_border_uniconify(void *data, int type, void *event);
static int _ibox_cb_event_border_icon_change(void *data, int type, void *event);
+static int _ibox_cb_event_border_urgent_change(void *data, int type, void *event);
static int _ibox_cb_event_border_zone_set(void *data, int type, void *event);
static int _ibox_cb_event_desk_show(void *data, int type, void *event);
static Config_Item *_ibox_config_item_get(const char *id);
}
static int
+_ibox_cb_event_border_urgent_change(void *data, int type, void *event)
+{
+ E_Event_Border_Urgent_Change *ev;
+ IBox *b;
+ IBox_Icon *ic;
+ Evas_List *l, *ibox;
+
+ ev = event;
+ /* update icon */
+ ibox = _ibox_zone_find(ev->border->zone);
+ for (l = ibox; l; l = l->next)
+ {
+ b = l->data;
+ ic = _ibox_icon_find(b, ev->border);
+ if (!ic) continue;
+ if (ev->border->client.icccm.urgent)
+ edje_object_signal_emit(ic->o_holder2, "e,state,urgent", "e");
+ else
+ edje_object_signal_emit(ic->o_holder2, "e,state,not_urgent", "e");
+ }
+
+ return 1;
+}
+
+static int
_ibox_cb_event_border_zone_set(void *data, int type, void *event)
{
E_Event_Border_Zone_Set *ev;
(E_EVENT_BORDER_ICON_CHANGE, _ibox_cb_event_border_icon_change, NULL));
ibox_config->handlers = evas_list_append
(ibox_config->handlers, ecore_event_handler_add
+ (E_EVENT_BORDER_URGENT_CHANGE,
+ _ibox_cb_event_border_urgent_change, NULL));
+ ibox_config->handlers = evas_list_append
+ (ibox_config->handlers, ecore_event_handler_add
(E_EVENT_BORDER_ZONE_SET, _ibox_cb_event_border_zone_set, NULL));
ibox_config->handlers = evas_list_append
(ibox_config->handlers, ecore_event_handler_add
static int _pager_cb_event_border_desk_set(void *data, int type, void *event);
static int _pager_cb_event_border_stack(void *data, int type, void *event);
static int _pager_cb_event_border_icon_change(void *data, int type, void *event);
+static int _pager_cb_event_border_urgent_change(void *data, int type, void *event);
static int _pager_cb_event_zone_desk_count_set(void *data, int type, void *event);
static int _pager_cb_event_desk_show(void *data, int type, void *event);
static int _pager_cb_event_desk_name_change(void *data, int type, void *event);
}
static int
+_pager_cb_event_border_urgent_change(void *data, int type, void *event)
+{
+ E_Event_Border_Urgent_Change *ev;
+ Evas_List *l, *l2;
+
+ ev = event;
+ for (l = pager_config->instances; l; l = l->next)
+ {
+ Instance *inst;
+
+ inst = l->data;
+ if (inst->pager->zone != ev->border->zone) continue;
+ for (l2 = inst->pager->desks; l2; l2 = l2->next)
+ {
+ Pager_Desk *pd;
+ Pager_Win *pw;
+
+ pd = l2->data;
+ pw = _pager_desk_window_find(pd, ev->border);
+ if (pw)
+ {
+ if (ev->border->client.icccm.urgent)
+ {
+ edje_object_signal_emit(pd->o_desk,
+ "e,state,urgent", "e");
+ edje_object_signal_emit(pw->o_window,
+ "e,state,urgent", "e");
+ }
+ else
+ {
+ edje_object_signal_emit(pd->o_desk,
+ "e,state,not_urgent", "e");
+ edje_object_signal_emit(pw->o_window,
+ "e,state,not_urgent", "e");
+ }
+ }
+ }
+ }
+ return 1;
+}
+
+static int
_pager_cb_event_zone_desk_count_set(void *data, int type, void *event)
{
Evas_List *l;
(E_EVENT_BORDER_ICON_CHANGE, _pager_cb_event_border_icon_change, NULL));
pager_config->handlers = evas_list_append
(pager_config->handlers, ecore_event_handler_add
+ (E_EVENT_BORDER_URGENT_CHANGE,
+ _pager_cb_event_border_urgent_change, NULL));
+ pager_config->handlers = evas_list_append
+ (pager_config->handlers, ecore_event_handler_add
(E_EVENT_ZONE_DESK_COUNT_SET, _pager_cb_event_zone_desk_count_set, NULL));
pager_config->handlers = evas_list_append
(pager_config->handlers, ecore_event_handler_add