Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_x
Modified Files:
Ecore_X.h ecore_x.c ecore_x_events.c ecore_x_private.h
ecore_x_window_prop.c
Log Message:
More NetWM support, this time added _NET_WM_VISIBLE_ICON_NAME.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/Ecore_X.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- Ecore_X.h 12 Oct 2003 06:25:25 -0000 1.7
+++ Ecore_X.h 12 Oct 2003 06:55:40 -0000 1.8
@@ -99,11 +99,12 @@
typedef struct _Ecore_X_Event_Client_Message Ecore_X_Event_Client_Message;
typedef struct _Ecore_X_Event_Window_Shape Ecore_X_Event_Window_Shape;
-typedef struct _Ecore_X_Event_Window_Delete_Request
Ecore_X_Event_Window_Delete_Request;
-typedef struct _Ecore_X_Event_Window_Prop_Title_Change
Ecore_X_Event_Window_Prop_Title_Change;
-typedef struct _Ecore_X_Event_Window_Prop_Visible_Title_Change
Ecore_X_Event_Window_Prop_Visible_Title_Change;
-typedef struct _Ecore_X_Event_Window_Prop_Icon_Name_Change
Ecore_X_Event_Window_Prop_Icon_Name_Change;
-typedef struct _Ecore_X_Event_Window_Prop_Name_Class_Change
Ecore_X_Event_Window_Prop_Name_Class_Change;
+typedef struct _Ecore_X_Event_Window_Delete_Request
Ecore_X_Event_Window_Delete_Request;
+typedef struct _Ecore_X_Event_Window_Prop_Title_Change
Ecore_X_Event_Window_Prop_Title_Change;
+typedef struct _Ecore_X_Event_Window_Prop_Visible_Title_Change
Ecore_X_Event_Window_Prop_Visible_Title_Change;
+typedef struct _Ecore_X_Event_Window_Prop_Icon_Name_Change
Ecore_X_Event_Window_Prop_Icon_Name_Change;
+typedef struct _Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change
Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change;
+typedef struct _Ecore_X_Event_Window_Prop_Name_Class_Change
Ecore_X_Event_Window_Prop_Name_Class_Change;
struct _Ecore_X_Event_Key_Down
{
@@ -385,6 +386,13 @@
Ecore_X_Time time;
};
+struct _Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change
+{
+ Ecore_X_Window win;
+ char *name;
+ Ecore_X_Time time;
+};
+
struct _Ecore_X_Event_Window_Prop_Name_Class_Change
{
Ecore_X_Window win;
@@ -431,6 +439,7 @@
extern int ECORE_X_EVENT_WINDOW_PROP_TITLE_CHANGE;
extern int ECORE_X_EVENT_WINDOW_PROP_VISIBLE_TITLE_CHANGE;
extern int ECORE_X_EVENT_WINDOW_PROP_ICON_NAME_CHANGE;
+extern int ECORE_X_EVENT_WINDOW_PROP_VISIBLE_ICON_NAME_CHANGE;
extern int ECORE_X_EVENT_WINDOW_PROP_NAME_CLASS_CHANGE;
extern int ECORE_X_MODIFIER_SHIFT;
@@ -515,6 +524,8 @@
char *ecore_x_window_prop_visible_title_get(Ecore_X_Window win);
void ecore_x_window_prop_icon_name_set(Ecore_X_Window win, const char *t);
char *ecore_x_window_prop_icon_name_get(Ecore_X_Window win);
+void ecore_x_window_prop_visible_icon_name_set(Ecore_X_Window win, const
char *t);
+char *ecore_x_window_prop_visible_icon_name_get(Ecore_X_Window win);
void ecore_x_window_prop_name_class_set(Ecore_X_Window win, const char
*n, const char *c);
void ecore_x_window_prop_name_class_get(Ecore_X_Window win, char **n,
char **c);
void ecore_x_window_prop_protocol_set(Ecore_X_Window win,
Ecore_X_WM_Protocol protocol, int on);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- ecore_x.c 12 Oct 2003 06:25:25 -0000 1.8
+++ ecore_x.c 12 Oct 2003 06:55:40 -0000 1.9
@@ -38,6 +38,7 @@
Atom _ecore_x_atom_net_wm_name = 0;
Atom _ecore_x_atom_net_wm_visible_name = 0;
Atom _ecore_x_atom_net_wm_icon_name = 0;
+Atom _ecore_x_atom_net_wm_visible_icon_name = 0;
Atom _ecore_x_atom_net_wm_window_type = 0;
Atom _ecore_x_atom_net_wm_state = 0;
Atom _ecore_x_atom_net_wm_state_above = 0;
@@ -94,6 +95,7 @@
int ECORE_X_EVENT_WINDOW_PROP_VISIBLE_TITLE_CHANGE = 0;
int ECORE_X_EVENT_WINDOW_PROP_NAME_CLASS_CHANGE = 0;
int ECORE_X_EVENT_WINDOW_PROP_ICON_NAME_CHANGE = 0;
+int ECORE_X_EVENT_WINDOW_PROP_VISIBLE_ICON_NAME_CHANGE = 0;
int ECORE_X_MODIFIER_SHIFT = 0;
int ECORE_X_MODIFIER_CTRL = 0;
@@ -209,11 +211,12 @@
ECORE_X_EVENT_CLIENT_MESSAGE = ecore_event_type_new();
ECORE_X_EVENT_WINDOW_SHAPE = ecore_event_type_new();
- ECORE_X_EVENT_WINDOW_DELETE_REQUEST = ecore_event_type_new();
- ECORE_X_EVENT_WINDOW_PROP_TITLE_CHANGE = ecore_event_type_new();
- ECORE_X_EVENT_WINDOW_PROP_VISIBLE_TITLE_CHANGE = ecore_event_type_new();
- ECORE_X_EVENT_WINDOW_PROP_NAME_CLASS_CHANGE = ecore_event_type_new();
- ECORE_X_EVENT_WINDOW_PROP_ICON_NAME_CHANGE = ecore_event_type_new();
+ ECORE_X_EVENT_WINDOW_DELETE_REQUEST = ecore_event_type_new();
+ ECORE_X_EVENT_WINDOW_PROP_TITLE_CHANGE = ecore_event_type_new();
+ ECORE_X_EVENT_WINDOW_PROP_VISIBLE_TITLE_CHANGE = ecore_event_type_new();
+ ECORE_X_EVENT_WINDOW_PROP_NAME_CLASS_CHANGE = ecore_event_type_new();
+ ECORE_X_EVENT_WINDOW_PROP_ICON_NAME_CHANGE = ecore_event_type_new();
+ ECORE_X_EVENT_WINDOW_PROP_VISIBLE_ICON_NAME_CHANGE = ecore_event_type_new();
}
ECORE_X_MODIFIER_SHIFT = _ecore_x_key_mask_get(XK_Shift_L);
@@ -242,30 +245,31 @@
return 0;
}
_ecore_x_filter_handler = ecore_event_filter_add(_ecore_x_event_filter_start,
_ecore_x_event_filter_filter, _ecore_x_event_filter_end, NULL);
- _ecore_x_atom_wm_delete_window = XInternAtom(_ecore_x_disp,
"WM_DELETE_WINDOW", False);
- _ecore_x_atom_wm_take_focus = XInternAtom(_ecore_x_disp,
"WM_TAKE_FOCUS", False);
- _ecore_x_atom_wm_protocols = XInternAtom(_ecore_x_disp, "WM_PROTOCOLS",
False);
- _ecore_x_atom_wm_class = XInternAtom(_ecore_x_disp, "WM_CLASS",
False);
- _ecore_x_atom_wm_name = XInternAtom(_ecore_x_disp, "WM_NAME",
False);
- _ecore_x_atom_wm_icon_name = XInternAtom(_ecore_x_disp, "WM_ICON_NAME",
False);
- _ecore_x_atom_motif_wm_hints = XInternAtom(_ecore_x_disp,
"_MOTIF_WM_HINTS", False);
- _ecore_x_atom_win_layer = XInternAtom(_ecore_x_disp, "_WIN_LAYER",
False);
- _ecore_x_atom_net_current_desktop = XInternAtom(_ecore_x_disp,
"_NET_CURRENT_DESKTOP", False);
- _ecore_x_atom_net_wm_name = XInternAtom(_ecore_x_disp, "_NET_WM_NAME",
False);
- _ecore_x_atom_net_wm_visible_name = XInternAtom(_ecore_x_disp,
"_NET_WM_VISIBLE_NAME", False);
- _ecore_x_atom_net_wm_icon_name = XInternAtom(_ecore_x_disp,
"_NET_WM_ICON_NAME", False);
- _ecore_x_atom_net_wm_desktop = XInternAtom(_ecore_x_disp,
"_NET_WM_DESKTOP", False);
- _ecore_x_atom_net_wm_window_type = XInternAtom(_ecore_x_disp,
"_NET_WM_WINDOW_TYPE", False);
- _ecore_x_atom_net_wm_state = XInternAtom(_ecore_x_disp,
"_NET_WM_STATE", False);
- _ecore_x_atom_net_wm_state_above = XInternAtom(_ecore_x_disp,
"_NET_WM_STATE_ABOVE", False);
- _ecore_x_atom_net_wm_state_below = XInternAtom(_ecore_x_disp,
"_NET_WM_STATE_BELOW", False);
- _ecore_x_atom_net_wm_allowed_actions = XInternAtom(_ecore_x_disp,
"_NET_WM_ALLOWED_ACTIONS", False);
- _ecore_x_atom_net_wm_strut = XInternAtom(_ecore_x_disp,
"_NET_WM_STRUT", False);
- _ecore_x_atom_net_wm_strut_partial = XInternAtom(_ecore_x_disp,
"_NET_WM_STRUT_PARTIAL", False);
- _ecore_x_atom_net_wm_icon_geometry = XInternAtom(_ecore_x_disp,
"_NET_WM_ICON_GEOMETRY", False);
- _ecore_x_atom_net_wm_icon = XInternAtom(_ecore_x_disp, "_NET_WM_ICON",
False);
- _ecore_x_atom_net_wm_pid = XInternAtom(_ecore_x_disp, "_NET_WM_PID",
False);
- _ecore_x_atom_net_wm_user_time = XInternAtom(_ecore_x_disp,
"_NET_WM_USER_TIME", False);
+ _ecore_x_atom_wm_delete_window = XInternAtom(_ecore_x_disp,
"WM_DELETE_WINDOW", False);
+ _ecore_x_atom_wm_take_focus = XInternAtom(_ecore_x_disp,
"WM_TAKE_FOCUS", False);
+ _ecore_x_atom_wm_protocols = XInternAtom(_ecore_x_disp,
"WM_PROTOCOLS", False);
+ _ecore_x_atom_wm_class = XInternAtom(_ecore_x_disp, "WM_CLASS",
False);
+ _ecore_x_atom_wm_name = XInternAtom(_ecore_x_disp, "WM_NAME",
False);
+ _ecore_x_atom_wm_icon_name = XInternAtom(_ecore_x_disp,
"WM_ICON_NAME", False);
+ _ecore_x_atom_motif_wm_hints = XInternAtom(_ecore_x_disp,
"_MOTIF_WM_HINTS", False);
+ _ecore_x_atom_win_layer = XInternAtom(_ecore_x_disp, "_WIN_LAYER",
False);
+ _ecore_x_atom_net_current_desktop = XInternAtom(_ecore_x_disp,
"_NET_CURRENT_DESKTOP", False);
+ _ecore_x_atom_net_wm_name = XInternAtom(_ecore_x_disp,
"_NET_WM_NAME", False);
+ _ecore_x_atom_net_wm_visible_name = XInternAtom(_ecore_x_disp,
"_NET_WM_VISIBLE_NAME", False);
+ _ecore_x_atom_net_wm_icon_name = XInternAtom(_ecore_x_disp,
"_NET_WM_ICON_NAME", False);
+ _ecore_x_atom_net_wm_visible_icon_name = XInternAtom(_ecore_x_disp,
"_NET_WM_VISIBLE_ICON_NAME", False);
+ _ecore_x_atom_net_wm_desktop = XInternAtom(_ecore_x_disp,
"_NET_WM_DESKTOP", False);
+ _ecore_x_atom_net_wm_window_type = XInternAtom(_ecore_x_disp,
"_NET_WM_WINDOW_TYPE", False);
+ _ecore_x_atom_net_wm_state = XInternAtom(_ecore_x_disp,
"_NET_WM_STATE", False);
+ _ecore_x_atom_net_wm_state_above = XInternAtom(_ecore_x_disp,
"_NET_WM_STATE_ABOVE", False);
+ _ecore_x_atom_net_wm_state_below = XInternAtom(_ecore_x_disp,
"_NET_WM_STATE_BELOW", False);
+ _ecore_x_atom_net_wm_allowed_actions = XInternAtom(_ecore_x_disp,
"_NET_WM_ALLOWED_ACTIONS", False);
+ _ecore_x_atom_net_wm_strut = XInternAtom(_ecore_x_disp,
"_NET_WM_STRUT", False);
+ _ecore_x_atom_net_wm_strut_partial = XInternAtom(_ecore_x_disp,
"_NET_WM_STRUT_PARTIAL", False);
+ _ecore_x_atom_net_wm_icon_geometry = XInternAtom(_ecore_x_disp,
"_NET_WM_ICON_GEOMETRY", False);
+ _ecore_x_atom_net_wm_icon = XInternAtom(_ecore_x_disp,
"_NET_WM_ICON", False);
+ _ecore_x_atom_net_wm_pid = XInternAtom(_ecore_x_disp, "_NET_WM_PID",
False);
+ _ecore_x_atom_net_wm_user_time = XInternAtom(_ecore_x_disp,
"_NET_WM_USER_TIME", False);
_ecore_x_atom_utf8_string = XInternAtom(_ecore_x_disp, "UTF8_STRING",
False);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_events.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- ecore_x_events.c 12 Oct 2003 06:25:25 -0000 1.6
+++ ecore_x_events.c 12 Oct 2003 06:55:40 -0000 1.7
@@ -6,6 +6,7 @@
static void _ecore_x_event_free_window_prop_title_change(void *data, void *ev);
static void _ecore_x_event_free_window_prop_visible_title_change(void *data, void
*ev);
static void _ecore_x_event_free_window_prop_icon_name_change(void *data, void *ev);
+static void _ecore_x_event_free_window_prop_visible_icon_name_change(void *data, void
*ev);
static void _ecore_x_event_free_key_down(void *data, void *ev);
static void _ecore_x_event_free_key_up(void *data, void *ev);
static void _ecore_x_event_free_generic(void *data, void *ev);
@@ -66,6 +67,16 @@
}
static void
+_ecore_x_event_free_window_prop_visible_icon_name_change(void *data, void *ev)
+{
+ Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change *e;
+
+ e = ev;
+ if (e->name) free(e->name);
+ free(e);
+}
+
+static void
_ecore_x_event_free_window_prop_visible_title_change(void *data, void *ev)
{
Ecore_X_Event_Window_Prop_Visible_Title_Change *e;
@@ -751,6 +762,15 @@
if (!e) return;
e->name = ecore_x_window_prop_icon_name_get(xevent->xproperty.window);
ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_ICON_NAME_CHANGE, e,
_ecore_x_event_free_window_prop_icon_name_change, NULL);
+ }
+ else if (xevent->xproperty.atom == _ecore_x_atom_net_wm_visible_icon_name)
+ {
+ Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change *e;
+
+ e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change));
+ if (!e) return;
+ e->name = ecore_x_window_prop_visible_icon_name_get(xevent->xproperty.window);
+ ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_VISIBLE_ICON_NAME_CHANGE, e,
_ecore_x_event_free_window_prop_visible_icon_name_change, NULL);
}
else
{
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_private.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- ecore_x_private.h 12 Oct 2003 06:25:25 -0000 1.6
+++ ecore_x_private.h 12 Oct 2003 06:55:40 -0000 1.7
@@ -68,6 +68,7 @@
extern Atom _ecore_x_atom_net_wm_name;
extern Atom _ecore_x_atom_net_wm_visible_name;
extern Atom _ecore_x_atom_net_wm_icon_name;
+extern Atom _ecore_x_atom_net_wm_visible_icon_name;
extern Atom _ecore_x_atom_net_wm_desktop;
extern Atom _ecore_x_atom_net_wm_window_type;
extern Atom _ecore_x_atom_net_wm_state;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_window_prop.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- ecore_x_window_prop.c 12 Oct 2003 06:25:25 -0000 1.9
+++ ecore_x_window_prop.c 12 Oct 2003 06:55:40 -0000 1.10
@@ -245,6 +245,38 @@
}
/**
+ * Set a window visible icon name.
+ * @param win The window
+ * @param t The visible icon name string
+ *
+ * Set a window visible icon name
+ * <hr><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+ */
+void
+ecore_x_window_prop_visible_icon_name_set(Ecore_X_Window win, const char *t)
+{
+ ecore_x_window_prop_string_set(win, _ecore_x_atom_net_wm_visible_icon_name,
+ (char *)t);
+}
+
+/**
+ * Get a window visible icon name.
+ * @param win The window
+ * @return The windows visible icon name string
+ *
+ * Return the visible icon name of a window. String must be free'd when done with.
+ * <hr><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+ */
+char *
+ecore_x_window_prop_visible_icon_name_get(Ecore_X_Window win)
+{
+ char *name;
+
+ name = ecore_x_window_prop_string_get(win, _ecore_x_atom_net_wm_visible_icon_name);
+ return name;
+}
+
+/**
* Set a window name & class.
* @param win The window
* @param n The name string
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs