e17/illume: started a more tablet compatbile policy

SVN revision: 62894
This commit is contained in:
Hannes Janetzek 2011-08-28 03:39:25 +00:00
parent d781ff368c
commit eda579a019
8 changed files with 1787 additions and 1 deletions

View File

@ -839,6 +839,7 @@ src/modules/illume2/module.desktop
src/modules/illume2/keyboards/Makefile
src/modules/illume2/policies/Makefile
src/modules/illume2/policies/illume/Makefile
src/modules/illume2/policies/tablet/Makefile
src/modules/illume-home/Makefile
src/modules/illume-home/module.desktop
src/modules/illume-home-toggle/Makefile

View File

@ -432,6 +432,35 @@ e_illume_border_is_quickpanel(E_Border *bd)
return bd->client.illume.quickpanel.quickpanel;
}
/**
* Determine if the border request a fixed size.
*
* @param bd The border to get the minium space for.
* @return EINA_TRUE if border requested fixed size, EINA_FALSE otherwise.
*
* @note If @p bd is NULL then this function will return EINA_FALSE.
*
* @ingroup E_Illume_Main_Group
*/
EAPI Eina_Bool e_illume_border_is_fixed_size(E_Border *bd)
{
/* make sure we have a border */
if (!bd) return EINA_FALSE;
if ((bd->client.icccm.min_w == bd->client.icccm.max_w) &&
(bd->client.icccm.min_h == bd->client.icccm.max_h))
return EINA_TRUE;
if ((bd->client.mwm.exists) &&
!((bd->client.mwm.func & ECORE_X_MWM_HINT_FUNC_ALL) ||
(bd->client.mwm.func & ECORE_X_MWM_HINT_FUNC_MAXIMIZE) ||
(bd->client.mwm.func & ECORE_X_MWM_HINT_FUNC_RESIZE)))
return EINA_TRUE;
return EINA_FALSE;
}
/**
* Retrieves the minimum space required to display this border.
*

View File

@ -1,2 +1,2 @@
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = illume
SUBDIRS = illume tablet

View File

@ -0,0 +1,27 @@
MAINTAINERCLEANFILES = Makefile.in
MODULE = illume2
POLICY = tablet
# the module .so file
INCLUDES = -I.. \
-I$(top_srcdir) \
-I$(top_srcdir)/src/modules/$(MODULE) \
-I$(top_srcdir)/src/modules/$(MODULE)/policies/$(POLICY) \
-I$(top_srcdir)/src/bin \
-I$(top_builddir)/src/bin \
-I$(top_srcdir)/src/modules \
@e_cflags@
plugindir = $(libdir)/enlightenment/modules/$(MODULE)/policies
tabletdir = $(plugindir)
tablet_LTLIBRARIES = tablet.la
tablet_la_SOURCES = \
policy.h \
policy.c \
tablet.h \
tablet.c
tablet_la_LIBADD = @e_libs@
tablet_la_LDFLAGS = -module -avoid-version
tablet_la_LIBTOOLFLAGS = --tag=disable-static

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,37 @@
#ifndef _POLICY_H
# define _POLICY_H
/* define layer values here so we don't have to grep through code to change */
# define POL_INDICATOR_LAYER 200
# define POL_QUICKPANEL_LAYER 160
# define POL_KEYBOARD_LAYER 150
# define POL_ACTIVATE_LAYER 145
# define POL_FULLSCREEN_LAYER 140
# define POL_DIALOG_LAYER 120
# define POL_SPLASH_LAYER 120
# define POL_SOFTKEY_LAYER 110
# define POL_CONFORMANT_LAYER 100
# define POL_APP_LAYER 100
# define POL_HOME_LAYER 90
void _policy_border_add(E_Border *bd);
void _policy_border_del(E_Border *bd);
void _policy_border_focus_in(E_Border *bd);
void _policy_border_focus_out(E_Border *bd);
void _policy_border_activate(E_Border *bd);
void _policy_border_post_fetch(E_Border *bd);
void _policy_border_post_assign(E_Border *bd);
void _policy_border_show(E_Border *bd);
void _policy_border_hide(E_Border *bd);
void _policy_zone_layout(E_Zone *zone);
void _policy_zone_move_resize(E_Zone *zone);
void _policy_zone_mode_change(E_Zone *zone, Ecore_X_Atom mode);
void _policy_zone_close(E_Zone *zone);
void _policy_drag_start(E_Border *bd);
void _policy_drag_end(E_Border *bd);
void _policy_focus_back(E_Zone *zone);
void _policy_focus_forward(E_Zone *zone);
void _policy_focus_home(E_Zone *zone);
void _policy_property_change(Ecore_X_Event_Window_Property *event);
#endif

View File

@ -0,0 +1,60 @@
#include "e_illume.h"
#include "tablet.h"
#include "policy.h"
EAPI E_Illume_Policy_Api e_illume_policy_api =
{
/* version, name, label */
E_ILLUME_POLICY_API_VERSION, "tablet", "Tablet"
};
EAPI int
e_illume_policy_init(E_Illume_Policy *p)
{
/* tell the policy what functions we support */
p->funcs.border_add = _policy_border_add;
p->funcs.border_del = _policy_border_del;
p->funcs.border_focus_in = _policy_border_focus_in;
p->funcs.border_focus_out = _policy_border_focus_out;
p->funcs.border_activate = _policy_border_activate;
p->funcs.border_post_fetch = _policy_border_post_fetch;
p->funcs.border_post_assign = _policy_border_post_assign;
p->funcs.border_show = _policy_border_show;
p->funcs.zone_layout = _policy_zone_layout;
p->funcs.zone_move_resize = _policy_zone_move_resize;
p->funcs.zone_mode_change = _policy_zone_mode_change;
p->funcs.zone_close = _policy_zone_close;
p->funcs.drag_start = _policy_drag_start;
p->funcs.drag_end = _policy_drag_end;
p->funcs.focus_back = _policy_focus_back;
p->funcs.focus_forward = _policy_focus_forward;
p->funcs.focus_home = _policy_focus_home;
p->funcs.property_change = _policy_property_change;
return 1;
}
EAPI int
e_illume_policy_shutdown(E_Illume_Policy *p)
{
p->funcs.border_add = NULL;
p->funcs.border_del = NULL;
p->funcs.border_focus_in = NULL;
p->funcs.border_focus_out = NULL;
p->funcs.border_activate = NULL;
p->funcs.border_post_fetch = NULL;
p->funcs.border_post_assign = NULL;
p->funcs.border_show = NULL;
p->funcs.zone_layout = NULL;
p->funcs.zone_move_resize = NULL;
p->funcs.zone_mode_change = NULL;
p->funcs.zone_close = NULL;
p->funcs.drag_start = NULL;
p->funcs.drag_end = NULL;
p->funcs.focus_back = NULL;
p->funcs.focus_forward = NULL;
p->funcs.focus_home = NULL;
p->funcs.property_change = NULL;
return 1;
}

View File

@ -0,0 +1,9 @@
#ifndef _ILLUME_H
# define _ILLUME_H
EAPI extern E_Illume_Policy_Api e_illume_policy_api;
EAPI int e_illume_policy_init(E_Illume_Policy *p);
EAPI int e_illume_policy_shutdown(E_Illume_Policy *p);
#endif