Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore_x


Modified Files:
        Ecore_X.h ecore_x.c ecore_x_window_prop.c 


Log Message:


ecore_config uses eet for storage now... check the disk space savings:

-rw-r--r--  1 raster raster 12288 Oct 19 15:29 config.db
-rw-r--r--  1 raster raster   687 Oct 19 15:29 config.eet

also.. edb goes back to obscurity as a little/non use lib again :)

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/Ecore_X.h,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -3 -r1.63 -r1.64
--- Ecore_X.h   17 Oct 2004 15:29:43 -0000      1.63
+++ Ecore_X.h   19 Oct 2004 06:34:20 -0000      1.64
@@ -819,6 +819,7 @@
 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);
 int              ecore_x_window_prop_protocol_isset(Ecore_X_Window win, 
Ecore_X_WM_Protocol protocol);
+Ecore_X_WM_Protocol *ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, int 
*num_ret);
 void             ecore_x_window_prop_sticky_set(Ecore_X_Window win, int on);
 int              ecore_x_window_prop_input_mode_set(Ecore_X_Window win, 
Ecore_X_Window_Input_Mode mode);
 void             ecore_x_window_prop_min_size_set(Ecore_X_Window win, int w, int h);
@@ -921,8 +922,16 @@
      ecore_x_window_save_set_del(Ecore_X_Window win);
    Ecore_X_Window *
      ecore_x_window_children_get(Ecore_X_Window win, int *num);
-   
-   
+   void
+     ecore_x_window_synthetic_move_resize_send(Ecore_X_Window win, int x, int y, int 
w, int h);
+   void
+     ecore_x_window_basic_hints_get(Ecore_X_Window win,
+                                   int *accepts_focus,
+                                   Ecore_X_Window_State_Hint *initial_state,
+                                   Ecore_X_Pixmap *icon_pixmap,
+                                   Ecore_X_Pixmap *icon_mask,
+                                   Ecore_X_Window *icon_window,
+                                   Ecore_X_Window *window_group);
    
    Ecore_X_Cursor
      ecore_x_cursor_new(Ecore_X_Window win, int *pixels, int w, int h, int hot_x, int 
hot_y);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -3 -r1.43 -r1.44
--- ecore_x.c   17 Oct 2004 15:29:43 -0000      1.43
+++ ecore_x.c   19 Oct 2004 06:34:21 -0000      1.44
@@ -1060,6 +1060,78 @@
    return windows;
 }
 
+void
+ecore_x_window_synthetic_move_resize_send(Ecore_X_Window win, int x, int y, int w, 
int h)
+{
+   XEvent              ev;
+   
+   ev.type = ConfigureNotify;
+   ev.xconfigure.display = _ecore_x_disp;
+   ev.xconfigure.event = win;
+   ev.xconfigure.window = win;
+   ev.xconfigure.x = x;
+   ev.xconfigure.y = y;
+   ev.xconfigure.width = w;
+   ev.xconfigure.height = h;
+   ev.xconfigure.border_width = 0;
+   ev.xconfigure.above = win;
+   ev.xconfigure.override_redirect = False;
+   XSendEvent(_ecore_x_disp, win, False, StructureNotifyMask, &ev);
+}
+
+void
+ecore_x_window_basic_hints_get(Ecore_X_Window win,
+                              int *accepts_focus,
+                              Ecore_X_Window_State_Hint *initial_state,
+                              Ecore_X_Pixmap *icon_pixmap,
+                              Ecore_X_Pixmap *icon_mask,
+                              Ecore_X_Window *icon_window,
+                              Ecore_X_Window *window_group)
+{
+   XWMHints           *hints;
+   
+   hints = XGetWMHints(_ecore_x_disp, win);
+   if (hints)
+     {
+       if ((hints->flags & InputHint) && (accepts_focus))
+         {
+            if (hints->input)
+              *accepts_focus = 1;
+            else
+              *accepts_focus = 0;
+         }
+       if ((hints->flags & StateHint) && (initial_state))
+         {
+            if (hints->initial_state == WithdrawnState)
+              *initial_state = ECORE_X_WINDOW_STATE_HINT_WITHDRAWN;
+            else if (hints->initial_state == NormalState)
+              *initial_state = ECORE_X_WINDOW_STATE_HINT_NORMAL;
+            else if (hints->initial_state == IconicState)
+              *initial_state = ECORE_X_WINDOW_STATE_HINT_ICONIC;
+         }
+       if ((hints->flags & IconPixmapHint) && (icon_pixmap))
+         {
+            *icon_pixmap = hints->icon_pixmap;
+         }
+       if ((hints->flags & IconMaskHint) && (icon_mask))
+         {
+            *icon_mask = hints->icon_pixmap;
+         }
+       if ((hints->flags & IconWindowHint) && (icon_window))
+         {
+            *icon_window = hints->icon_window;
+         }
+       if ((hints->flags & WindowGroupHint) && (window_group))
+         {
+            *window_group = hints->window_group;
+         }
+       XFree(hints);
+     }
+}
+
+
+
+
 
 
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_window_prop.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -3 -r1.48 -r1.49
--- ecore_x_window_prop.c       2 Sep 2004 18:45:31 -0000       1.48
+++ ecore_x_window_prop.c       19 Oct 2004 06:34:21 -0000      1.49
@@ -194,13 +194,16 @@
             s = XmbTextPropertyToTextList(_ecore_x_disp, &xtp, &list, &items);
             if ((s == Success) && (items > 0))
               {
+                 /* FIXME convert from xlib encoding to utf8  */
                  str = strdup(*list);
                  XFreeStringList(list);
               }
             else
+              /* FIXME convert from xlib encoding to utf8  */
               str = strdup((char *)xtp.value);
          }
        else
+         /* FIXME convert from xlib encoding to utf8  */
          str = strdup((char *)xtp.value);
        XFree(xtp.value);
      }
@@ -223,6 +226,7 @@
    list[0] = (char *) t;
    
    /* Xlib may not like the UTF8 String */
+   /* FIXME convert utf8 to whatever encoding xlib prefers */
    /* ecore_x_window_prop_string_set(win, _ecore_x_atom_wm_name, (char *)t); */
    if (XStringListToTextProperty(list, 1, &xprop))
      {
@@ -577,6 +581,43 @@
  *
  * FIXME: To be fixed.
  */
+Ecore_X_WM_Protocol *
+ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, int *num_ret)
+{
+   Atom *protos = NULL;
+   int i, protos_count = 0;
+   Ecore_X_WM_Protocol *prot_ret = NULL;
+   
+   if (!XGetWMProtocols(_ecore_x_disp, win, &protos, &protos_count))
+     return NULL;
+
+   if ((!protos) || (protos_count <= 0)) return NULL;
+   prot_ret = malloc(protos_count * sizeof(Ecore_X_WM_Protocol));
+   if (!prot_ret)
+     {
+       XFree(protos);
+       return NULL;
+     }
+   for (i = 0; i < protos_count; i++)
+     {
+       Ecore_X_WM_Protocol j;
+       
+       for (j = 0; j < ECORE_X_WM_PROTOCOL_NUM; j++)
+         {
+            if (_ecore_x_atoms_wm_protocols[i] == protos[j])
+              prot_ret[i] = j;
+         }
+     }
+   XFree(protos);
+   *num_ret = protos_count;
+   return prot_ret;
+}
+
+/**
+ * To be documented.
+ *
+ * FIXME: To be fixed.
+ */
 void
 ecore_x_window_prop_min_size_set(Ecore_X_Window win, int w, int h)
 {




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to