+e_client_layout_cb_set()

let's keep client hooks for clients.
This commit is contained in:
Mike Blumenkrantz 2014-07-07 13:42:47 -04:00
parent db49d8cc75
commit 3c7fab995c
2 changed files with 17 additions and 0 deletions

View File

@ -51,6 +51,8 @@ static Ecore_Event_Handler *action_handler_mouse = NULL;
static Ecore_Timer *action_timer = NULL;
static Eina_Rectangle action_orig = {0};
static E_Client_Layout_Cb _e_client_layout_cb = NULL;
EINTERN void e_client_focused_set(E_Client *ec);
static Eina_Inlist *_e_client_hooks[] =
@ -2227,6 +2229,8 @@ e_client_idler_before(void)
}
}
if (_e_client_layout_cb)
_e_client_layout_cb(c);
// pass 3 - hide windows needing hide and eval (main eval)
E_CLIENT_FOREACH(c, ec)
@ -4695,3 +4699,13 @@ e_client_is_stacking(const E_Client *ec)
{
return ec->comp->layers[e_comp_canvas_layer_map(ec->layer)].obj == ec->frame;
}
////////////////////////////////////////////
EAPI void
e_client_layout_cb_set(E_Client_Layout_Cb cb)
{
if (_e_client_layout_cb && cb)
CRI("ATTEMPTING TO OVERWRITE EXISTING CLIENT LAYOUT HOOK!!!");
_e_client_layout_cb = cb;
}

View File

@ -169,6 +169,7 @@ typedef enum _E_Client_Hook_Point
typedef void (*E_Client_Move_Intercept_Cb)(E_Client *, int x, int y);
typedef void (*E_Client_Hook_Cb)(void *data, E_Client *ec);
typedef void (*E_Client_Layout_Cb)(void * /* E_Comp */); //< can't use real type because of include order
#else
#define E_CLIENT_TYPE (int)0xE0b01002
@ -812,5 +813,7 @@ EAPI void e_client_redirected_set(E_Client *ec, Eina_Bool set);
EAPI Eina_Bool e_client_is_stacking(const E_Client *ec);
EAPI Eina_Bool e_client_desk_window_profile_available_check(E_Client *ec, const char *profile);
EAPI void e_client_desk_window_profile_wait_desk_set(E_Client *ec, E_Desk *desk);
EAPI void e_client_layout_cb_set(E_Client_Layout_Cb cb);
#include "e_client.x"
#endif