Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_x
Modified Files:
ecore_x_netwm.c
Log Message:
vincent's netwm get allowed actions ecore patch
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_x/ecore_x_netwm.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -3 -r1.50 -r1.51
--- ecore_x_netwm.c 6 Jan 2006 21:56:05 -0000 1.50
+++ ecore_x_netwm.c 17 May 2006 02:26:52 -0000 1.51
@@ -580,8 +580,8 @@
EAPI void
ecore_x_netwm_strut_partial_set(Ecore_X_Window win, int left, int right,
int top, int bottom, int left_start_y, int
left_end_y,
- int right_start_y, int right_end_y, int
top_start_x,
- int top_end_x, int bottom_start_x, int
bottom_end_x)
+ int right_start_y, int right_end_y, int
top_start_x,
+ int top_end_x, int bottom_start_x, int
bottom_end_x)
{
unsigned int strut[12];
@@ -603,8 +603,8 @@
EAPI int
ecore_x_netwm_strut_partial_get(Ecore_X_Window win, int *left, int *right,
int *top, int *bottom, int *left_start_y, int
*left_end_y,
- int *right_start_y, int *right_end_y, int
*top_start_x,
- int *top_end_x, int *bottom_start_x, int
*bottom_end_x)
+ int *right_start_y, int *right_end_y, int
*top_start_x,
+ int *top_end_x, int *bottom_start_x, int
*bottom_end_x)
{
int ret = 0;
unsigned int strut[12];
@@ -937,7 +937,7 @@
return ECORE_X_WINDOW_TYPE_UNKNOWN;
}
-static Ecore_X_Atom
+static Ecore_X_Atom
_ecore_x_netwm_window_type_atom_get(Ecore_X_Window_Type type)
{
switch (type)
@@ -1079,6 +1079,34 @@
ecore_x_window_prop_atom_list_change(win,
ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS,
atom, on);
+}
+
+EAPI int
+ecore_x_netwm_allowed_action_get(Ecore_X_Window win, Ecore_X_Action **action,
unsigned int *num)
+{
+ int num_ret, i;
+ Ecore_X_Atom *atoms;
+
+ if (num) *num = 0;
+ if (action) *action = NULL;
+
+ num_ret = ecore_x_window_prop_atom_list_get(win,
ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS,
+ &atoms);
+ if (num_ret <= 0)
+ return 0;
+
+ if (action)
+ {
+ *action = malloc(num_ret * sizeof(Ecore_X_Action));
+ if (*action)
+ for (i = 0; i < num_ret; ++i)
+ (*action)[i] = _ecore_x_netwm_action_atom_get(atoms[i]);
+
+ if (num) *num = num_ret;
+ }
+
+ free(atoms);
+ return 1;
}
EAPI void
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs