forked from enlightenment/enlightenment
Add functions to allow quickpanel show/hide to be handled on a per-policy
basis. SVN revision: 44740
This commit is contained in:
parent
0576446c11
commit
4a4d04fa81
|
@ -4,7 +4,7 @@
|
|||
#include "e_mod_layout_illume.h"
|
||||
#include "e_mod_border.h"
|
||||
|
||||
// internal calls
|
||||
/* local function prototypes */
|
||||
static void _e_mod_layout_cb_hook_container_layout(void *data, void *data2);
|
||||
static void _e_mod_layout_cb_hook_post_fetch(void *data, void *data2);
|
||||
static void _e_mod_layout_cb_hook_post_border_assign(void *data, void *data2);
|
||||
|
@ -18,12 +18,13 @@ static int _cb_event_border_hide(void *data, int type, void *event);
|
|||
static int _cb_event_zone_move_resize(void *data, int type, void *event);
|
||||
static int _cb_event_client_message(void *data, int type, void *event);
|
||||
|
||||
// state
|
||||
/* local variables */
|
||||
static E_Border_Hook *hook1 = NULL;
|
||||
static E_Border_Hook *hook2 = NULL;
|
||||
static E_Border_Hook *hook3 = NULL;
|
||||
static Eina_List *handlers = NULL;
|
||||
|
||||
/* public functions */
|
||||
void
|
||||
e_mod_layout_init(E_Module *m)
|
||||
{
|
||||
|
@ -106,6 +107,7 @@ illume_layout_modes_get(void)
|
|||
return modes;
|
||||
}
|
||||
|
||||
/* local functions */
|
||||
static void
|
||||
_e_mod_layout_cb_hook_container_layout(void *data, void *data2)
|
||||
{
|
||||
|
@ -401,13 +403,18 @@ _cb_event_client_message(void *data, int type, void *event)
|
|||
}
|
||||
else if (ev->message_type == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE)
|
||||
{
|
||||
E_Zone *zone;
|
||||
|
||||
zone = e_zone_current_get(e_container_current_get(e_manager_current_get()));
|
||||
if (ev->data.l[0] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF)
|
||||
{
|
||||
printf("Quickpanel Off\n");
|
||||
if ((mode) && (mode->funcs.quickpanel_off))
|
||||
mode->funcs.quickpanel_off(zone);
|
||||
}
|
||||
else if (ev->data.l[0] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON)
|
||||
{
|
||||
printf("Quickpanel On\n");
|
||||
if ((mode) && (mode->funcs.quickpanel_on))
|
||||
mode->funcs.quickpanel_on(zone);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
|
|
|
@ -20,6 +20,8 @@ struct _Illume_Layout_Mode
|
|||
void (*border_activate) (E_Border *bd);
|
||||
void (*drag_start) (E_Border *bd);
|
||||
void (*drag_end) (E_Border *bd);
|
||||
void (*quickpanel_on) (E_Zone *zone);
|
||||
void (*quickpanel_off) (E_Zone *zone);
|
||||
} funcs;
|
||||
};
|
||||
|
||||
|
|
|
@ -26,6 +26,8 @@ static void _border_focus_out(E_Border *bd);
|
|||
static void _border_activate(E_Border *bd);
|
||||
static void _drag_start(E_Border *bd);
|
||||
static void _drag_end(E_Border *bd);
|
||||
static void _quickpanel_on(E_Zone *zone);
|
||||
static void _quickpanel_off(E_Zone *zone);
|
||||
static void _zone_layout(E_Zone *z);
|
||||
static void _zone_layout_single(E_Border *bd);
|
||||
static void _zone_layout_dual(E_Border *bd);
|
||||
|
@ -48,7 +50,8 @@ const Illume_Layout_Mode laymode =
|
|||
_border_focus_in, _border_focus_out,
|
||||
_zone_layout, _zone_move_resize,
|
||||
_border_activate,
|
||||
_drag_start, _drag_end
|
||||
_drag_start, _drag_end,
|
||||
_quickpanel_on, _quickpanel_off
|
||||
};
|
||||
|
||||
/* public functions */
|
||||
|
@ -230,6 +233,18 @@ _drag_end(E_Border *bd)
|
|||
ecore_x_e_illume_drag_set(bd->client.win, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
_quickpanel_on(E_Zone *zone)
|
||||
{
|
||||
printf("Illume quickpanel on\n");
|
||||
}
|
||||
|
||||
static void
|
||||
_quickpanel_off(E_Zone *zone)
|
||||
{
|
||||
printf("Illume quickpanel off\n");
|
||||
}
|
||||
|
||||
static void
|
||||
_zone_layout(E_Zone *z)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue