Enlightenment CVS committal
Author : sebastid
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_x
Modified Files:
Ecore_X.h ecore_x_netwm.c
Log Message:
Set complete state at once.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/Ecore_X.h,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -3 -r1.124 -r1.125
--- Ecore_X.h 29 May 2005 09:52:56 -0000 1.124
+++ Ecore_X.h 31 May 2005 06:51:50 -0000 1.125
@@ -1219,7 +1219,8 @@
EAPI void ecore_x_netwm_user_time_set(Ecore_X_Window win, int
time);
EAPI int ecore_x_netwm_user_time_get(Ecore_X_Window win, int
*time);
-EAPI Ecore_X_Window_State *ecore_x_netwm_window_state_get(Ecore_X_Window win,
int *num);
+EAPI Ecore_X_Window_State *ecore_x_netwm_window_state_list_get(Ecore_X_Window
win, int *num);
+EAPI int ecore_x_netwm_window_state_list_set(Ecore_X_Window
win, Ecore_X_Window_State *state, int num);
EAPI void ecore_x_netwm_window_state_set(Ecore_X_Window win,
Ecore_X_Window_State state, int on);
EAPI int ecore_x_netwm_window_state_isset(Ecore_X_Window win,
Ecore_X_Window_State state);
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_netwm.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- ecore_x_netwm.c 29 May 2005 09:52:56 -0000 1.17
+++ ecore_x_netwm.c 31 May 2005 06:51:50 -0000 1.18
@@ -911,7 +911,7 @@
}
Ecore_X_Window_State *
-ecore_x_netwm_window_state_get(Ecore_X_Window win, int *num)
+ecore_x_netwm_window_state_list_get(Ecore_X_Window win, int *num)
{
int num_ret, i;
unsigned char *data;
@@ -941,6 +941,32 @@
}
int
+ecore_x_netwm_window_state_list_set(Ecore_X_Window win, Ecore_X_Window_State
*state, int num)
+{
+ unsigned char *data;
+ Ecore_X_Atom *set;
+ int i;
+
+ if (num == 0)
+ {
+ XDeleteProperty(_ecore_x_disp, win, ECORE_X_ATOM_NET_WM_STATE);
+ return 1;
+ }
+
+ data = malloc(num * sizeof(Ecore_X_Atom));
+ if (!data) return 1;
+
+ set = (Ecore_X_Window_State *) data;
+ for (i = 0; i < num; i++)
+ set[i] = _ecore_x_netwm_state_atom_get(state[i]);
+
+ ecore_x_window_prop_property_set(win, ECORE_X_ATOM_NET_WM_STATE,
+ XA_ATOM, 32, data, num);
+ free(data);
+ return 1;
+}
+
+int
ecore_x_netwm_window_state_isset(Ecore_X_Window win, Ecore_X_Window_State s)
{
int num, i, ret = 0;
-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs