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_window.c ecore_x_window_prop.c 


Log Message:
Support for setting the basic window types. Default to normal type on toplevel
windows.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/Ecore_X.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- Ecore_X.h   14 Oct 2003 19:11:35 -0000      1.13
+++ Ecore_X.h   14 Oct 2003 21:42:28 -0000      1.14
@@ -565,6 +565,15 @@
 void             ecore_x_window_prop_desktop_request(Ecore_X_Window win, long 
desktop);
 void             ecore_x_window_prop_desktop_set(Ecore_X_Window win, long desktop);
 long             ecore_x_window_prop_desktop_get(Ecore_X_Window win);
+void             ecore_x_window_prop_window_type_set(Ecore_X_Window win, Ecore_X_Atom 
type);
+void             ecore_x_window_prop_window_type_desktop_set(Ecore_X_Window win);
+void             ecore_x_window_prop_window_type_dock_set(Ecore_X_Window win);
+void             ecore_x_window_prop_window_type_toolbar_set(Ecore_X_Window win);
+void             ecore_x_window_prop_window_type_menu_set(Ecore_X_Window win);
+void             ecore_x_window_prop_window_type_utility_set(Ecore_X_Window win);
+void             ecore_x_window_prop_window_type_splash_set(Ecore_X_Window win);
+void             ecore_x_window_prop_window_type_dialog_set(Ecore_X_Window win);
+void             ecore_x_window_prop_window_type_normal_set(Ecore_X_Window win);
 
 void             ecore_x_window_shape_mask_set(Ecore_X_Window win, Ecore_X_Pixmap 
mask);
        
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_window.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- ecore_x_window.c    13 Oct 2003 17:36:09 -0000      1.7
+++ ecore_x_window.c    14 Oct 2003 21:42:28 -0000      1.8
@@ -195,6 +195,8 @@
    pid = getpid();
    ecore_x_window_prop_property_set(win, _ecore_x_atom_net_wm_pid, XA_CARDINAL,
                                    32, &pid, 1);
+
+   ecore_x_window_prop_window_type_normal_set(win);
 }
 
 /**
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_window_prop.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- ecore_x_window_prop.c       14 Oct 2003 19:11:35 -0000      1.14
+++ ecore_x_window_prop.c       14 Oct 2003 21:42:28 -0000      1.15
@@ -799,3 +799,137 @@
 
    return desktop;
 }
+
+/**
+ * Change a windows type.
+ * @param win The Window
+ * @param type The Type
+ *
+ * Change a windows type.
+ * <hr><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+ */
+void
+ecore_x_window_prop_window_type_set(Ecore_X_Window win, Ecore_X_Atom type)
+{
+       int            num;
+       unsigned char *data = NULL;
+
+       if (ecore_x_window_prop_property_get(win,
+                                            _ecore_x_atom_net_wm_window_type,
+                                            XA_ATOM, 32, &data, &num))
+          XFree(data);
+
+       data = malloc(sizeof(Ecore_X_Atom));
+       if (data)
+         {
+            ((Atom *)data)[0] = type;
+            ecore_x_window_prop_property_set(win,
+                                             _ecore_x_atom_net_wm_window_type,
+                                             XA_ATOM, 32, data, 1);
+         }
+       free(data);
+}
+
+/**
+ * Set a window as a desktop type.
+ * @param win The Window
+ *
+ * Set a window as a desktop type.
+ * <hr><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+ */
+void
+ecore_x_window_prop_window_type_desktop_set(Ecore_X_Window win)
+{
+   ecore_x_window_prop_window_type_set(win, _ecore_x_atom_net_wm_window_type_desktop);
+}
+
+/**
+ * Set a window as a desktop type.
+ * @param win The Window
+ *
+ * Set a window as a desktop type.
+ * <hr><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+ */
+void
+ecore_x_window_prop_window_type_dock_set(Ecore_X_Window win)
+{
+   ecore_x_window_prop_window_type_set(win, _ecore_x_atom_net_wm_window_type_dock);
+}
+
+/**
+ * Set a window as a toolbar type.
+ * @param win The Window
+ *
+ * Set a window as a toolbar type.
+ * <hr><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+ */
+void
+ecore_x_window_prop_window_type_toolbar_set(Ecore_X_Window win)
+{
+   ecore_x_window_prop_window_type_set(win, _ecore_x_atom_net_wm_window_type_toolbar);
+}
+
+/**
+ * Set a window as a menu type.
+ * @param win The Window
+ *
+ * Set a window as a menu type.
+ * <hr><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+ */
+void
+ecore_x_window_prop_window_type_menu_set(Ecore_X_Window win)
+{
+   ecore_x_window_prop_window_type_set(win, _ecore_x_atom_net_wm_window_type_menu);
+}
+
+/**
+ * Set a window as a utility type.
+ * @param win The Window
+ *
+ * Set a window as a utility type.
+ * <hr><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+ */
+void
+ecore_x_window_prop_window_type_utility_set(Ecore_X_Window win)
+{
+   ecore_x_window_prop_window_type_set(win, _ecore_x_atom_net_wm_window_type_utility);
+}
+
+/**
+ * Set a window as a splash type.
+ * @param win The Window
+ *
+ * Set a window as a splash type.
+ * <hr><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+ */
+void
+ecore_x_window_prop_window_type_splash_set(Ecore_X_Window win)
+{
+   ecore_x_window_prop_window_type_set(win, _ecore_x_atom_net_wm_window_type_splash);
+}
+
+/**
+ * Set a window as a dialog type.
+ * @param win The Window
+ *
+ * Set a window as a dialog type.
+ * <hr><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+ */
+void
+ecore_x_window_prop_window_type_dialog_set(Ecore_X_Window win)
+{
+   ecore_x_window_prop_window_type_set(win, _ecore_x_atom_net_wm_window_type_dialog);
+}
+
+/**
+ * Set a window as a normal type.
+ * @param win The Window
+ *
+ * Set a window as a normal type.
+ * <hr><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+ */
+void
+ecore_x_window_prop_window_type_normal_set(Ecore_X_Window win)
+{
+   ecore_x_window_prop_window_type_set(win, _ecore_x_atom_net_wm_window_type_normal);
+}




-------------------------------------------------------
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

Reply via email to