Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/ecore

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


Modified Files:
        Ecore_X.h Makefile.am ecore_x_icccm.c 


Log Message:


some iccm
LDFLAGS.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/Ecore_X.h,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -3 -r1.69 -r1.70
--- Ecore_X.h   27 Oct 2004 21:50:57 -0000      1.69
+++ Ecore_X.h   2 Nov 2004 04:03:27 -0000       1.70
@@ -869,6 +869,47 @@
 int              ecore_x_client_message32_send(Ecore_X_Window win, Ecore_X_Atom type, 
long d0, long d1, long d2, long d3, long d4);
 int              ecore_x_client_message8_send(Ecore_X_Window win, Ecore_X_Atom type, 
const void *data, int len);
 
+#if 0 /* ??? */
+   void                ecore_x_netwm_init(void);
+#endif
+   void                ecore_x_netwm_desk_count_set(Ecore_X_Window root, int n_desks);
+   void                ecore_x_netwm_desk_roots_set(Ecore_X_Window root, int n_desks, 
Ecore_X_Window * vroots);
+   void                ecore_x_netwm_desk_names_set(Ecore_X_Window root, int n_desks, 
const char **names);
+   void                ecore_x_netwm_desk_size_set(Ecore_X_Window root, int width, 
int height);
+   void                ecore_x_netwm_desk_workareas_set(Ecore_X_Window root, int 
n_desks, int *areas);
+   void                ecore_x_netwm_desk_current_set(Ecore_X_Window root, int desk);
+   void                ecore_x_netwm_desk_viewports_set(Ecore_X_Window root, int 
n_desks, int *origins);
+   void                ecore_x_netwm_showing_desktop_set(Ecore_X_Window root, int on);
+   void                ecore_x_netwm_client_list_set(Ecore_X_Window root, int 
n_clients, Ecore_X_Window * p_clients);
+   void                ecore_x_netwm_client_list_stacking_set(Ecore_X_Window root, 
int n_clients, Ecore_X_Window * p_clients);
+   void                ecore_x_netwm_client_active_set(Ecore_X_Window root, 
Ecore_X_Window win);
+   
+   /* FIXME: these funcs need categorising */
+   void            ecore_x_drawable_geometry_get(Ecore_X_Drawable d, int *x, int *y, 
int *w, int *h);
+   int             ecore_x_drawable_border_width_get(Ecore_X_Drawable d);
+   int             ecore_x_drawable_depth_get(Ecore_X_Drawable d);
+   Ecore_X_Window *ecore_x_window_root_list(int *num_ret);
+   int             ecore_x_window_manage(Ecore_X_Window win);
+   void            ecore_x_window_container_manage(Ecore_X_Window win);
+   void            ecore_x_window_client_manage(Ecore_X_Window win);
+   void            ecore_x_window_sniff(Ecore_X_Window win);
+   void            ecore_x_window_client_sniff(Ecore_X_Window win);
+   Ecore_X_Atom    ecore_x_atom_get(char *name);
+
+   typedef enum _Ecore_X_Gravity {
+      ECORE_X_GRAVITY_FORGET = 0,
+       ECORE_X_GRAVITY_UNMAP = 0,
+       ECORE_X_GRAVITY_NW = 1,
+       ECORE_X_GRAVITY_N = 2,
+       ECORE_X_GRAVITY_NE = 3,
+       ECORE_X_GRAVITY_W = 4,
+       ECORE_X_GRAVITY_CENTER = 5,
+       ECORE_X_GRAVITY_E = 6,
+       ECORE_X_GRAVITY_SW = 7,
+       ECORE_X_GRAVITY_S = 8,
+       ECORE_X_GRAVITY_SE = 9,
+       ECORE_X_GRAVITY_STATIC = 10
+   } Ecore_X_Gravity;
    void
      ecore_x_icccm_state_set(Ecore_X_Window win, Ecore_X_Window_State_Hint state);
    void
@@ -898,7 +939,28 @@
                             Ecore_X_Window *icon_window,
                             Ecore_X_Window *window_group,
                             int *is_urgent);
-
+   void
+     ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win,
+                                     int request_pos,
+                                     Ecore_X_Gravity gravity,
+                                     int min_w, int min_h,
+                                     int max_w, int max_h,
+                                     int base_w, int base_h,
+                                     int step_x, int step_y,
+                                     double min_aspect,
+                                     double max_aspect);
+       
+   int
+     ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win,
+                                     int *request_pos,
+                                     Ecore_X_Gravity *gravity,
+                                     int *min_w, int *min_h,
+                                     int *max_w, int *max_h,
+                                     int *base_w, int *base_h,
+                                     int *step_x, int *step_y,
+                                     double *min_aspect,
+                                     double *max_aspect);
+       
    void                ecore_x_netwm_init(void);
    void                ecore_x_netwm_wm_identify(Ecore_X_Window root, Ecore_X_Window 
check, const char *wm_name);
    void                ecore_x_netwm_desk_count_set(Ecore_X_Window root, int n_desks);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/Makefile.am,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- Makefile.am 23 Oct 2004 14:26:25 -0000      1.13
+++ Makefile.am 2 Nov 2004 04:03:27 -0000       1.14
@@ -9,7 +9,7 @@
 -I$(top_builddir)/src/lib/ecore_job \
 @x_cflags@
 
-libecore_x_la_LDFLAGS = $(LDFLAGS) -version-info 1:0:0 \
+libecore_x_la_LDFLAGS = -version-info 1:0:0 \
 -L$(top_builddir)/src/lib/ecore/.libs \
 -L$(top_builddir)/src/lib/ecore_txt/.libs \
 -L$(top_builddir)/src/lib/ecore_job/.libs
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_icccm.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ecore_x_icccm.c     23 Oct 2004 02:19:19 -0000      1.3
+++ ecore_x_icccm.c     2 Nov 2004 04:03:27 -0000       1.4
@@ -182,79 +182,145 @@
    return 0;
 }
 
-/* FIXME: working here */
+void
+ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win,
+                                 int request_pos,
+                                Ecore_X_Gravity gravity,
+                                int min_w, int min_h,
+                                int max_w, int max_h,
+                                int base_w, int base_h,
+                                int step_x, int step_y,
+                                double min_aspect,
+                                double max_aspect)
+{
+   /* FIXME: working here */
+   XSizeHints hint;
+   
+   hint.flags = 0;
+   if (request_pos)
+     {
+       hint.flags |= USPosition;
+     }
+   if (gravity != ECORE_X_GRAVITY_NW)
+     {
+       hint.flags |= PWinGravity;
+       hint.win_gravity = gravity;
+     }
+   if ((min_w > 0) || (min_h > 0))
+     {
+       hint.flags |= PMinSize;
+       hint.min_width = min_w;
+       hint.min_height = min_h;
+     }
+   if ((max_w > 0) || (max_h > 0))
+     {
+       hint.flags |= PMaxSize;
+       hint.max_width = max_w;
+       hint.max_height = max_h;
+     }
+   if ((base_w > 0) || (base_h > 0))
+     {
+       hint.flags |= PBaseSize;
+       hint.base_width = base_w;
+       hint.base_height = base_h;
+     }
+   if ((step_x > 1) || (step_y > 1))
+     {
+       hint.flags |= PResizeInc;
+       hint.width_inc = step_x;
+       hint.height_inc = step_y;
+     }
+   if ((min_aspect > 0.0) || (max_aspect > 0.0))
+     {
+       hint.flags |= PAspect;
+       hint.min_aspect.x = min_aspect * 10000;
+       hint.min_aspect.x = 10000;
+       hint.max_aspect.x = max_aspect * 10000;
+       hint.max_aspect.x = 10000;
+     }
+   XSetWMNormalHints(_ecore_x_disp, win, &hint);
+}
+
 int
-ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win)
+ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win,
+                                int *request_pos,
+                                Ecore_X_Gravity *gravity,
+                                int *min_w, int *min_h,
+                                int *max_w, int *max_h,
+                                int *base_w, int *base_h,
+                                int *step_x, int *step_y,
+                                double *min_aspect,
+                                double *max_aspect)
 {
    XSizeHints          hint;
    long                mask;
    
+   int minw = 0, minh = 0;
+   int maxw = 32767, maxh = 32767;
+   int basew = 0, baseh = 0;
+   int stepx = 1, stepy = 1;
+   double mina = 0.0, maxa = 0.0;
+   
    if (!XGetWMNormalHints(_ecore_x_disp, win, &hint, &mask)) return 0;
    if ((hint.flags & USPosition) || ((hint.flags & PPosition)))
      {
-       int                 x, y, w, h;
-       
-//     D("%li %li\n", hint.flags & USPosition, hint.flags & PPosition);
-//     b->client.pos.requested = 1;
-//     b->client.pos.gravity = NorthWestGravity;
-//     if (hint.flags & PWinGravity)
-//       b->client.pos.gravity = hint.win_gravity;
-//     x = y = w = h = 0;
-//     ecore_window_get_geometry(win, &x, &y, &w, &h);
-//     b->client.pos.x = x;
-//     b->client.pos.y = y;
+       if (*request_pos) *request_pos = 1;
      }
    else
      {
-//     b->client.pos.requested = 0;
+       if (*request_pos) *request_pos = 0;
      }
-   if (hint.flags & PMinSize)
+   if (hint.flags & PWinGravity)
      {
-//     min_w = hint.min_width;
-//     min_h = hint.min_height;
+       if (*gravity) *gravity = hint.win_gravity;
      }
-   if (hint.flags & PMaxSize)
+   else
      {
-//     max_w = hint.max_width;
-//     max_h = hint.max_height;
-//     if (max_w < min_w)
-//       max_w = min_w;
-//     if (max_h < min_h)
-//       max_h = min_h;
+       if (*gravity) *gravity = ECORE_X_GRAVITY_NW;
      }
-   if (hint.flags & PResizeInc)
+   if (hint.flags & PMinSize)
      {
-//     step_w = hint.width_inc;
-//     step_h = hint.height_inc;
-//     if (step_w < 1)
-//       step_w = 1;
-//     if (step_h < 1)
-//       step_h = 1;
+       minw = hint.min_width;
+       minh = hint.min_height;
+     }
+   if (hint.flags & PMaxSize)
+     {
+       maxw = hint.max_width;
+       maxh = hint.max_height;
+       if (maxw < minw) maxw = minw;
+       if (maxh < minh) maxh = minh;
      }
    if (hint.flags & PBaseSize)
      {
-//     base_w = hint.base_width;
-//     base_h = hint.base_height;
-//     if (base_w > max_w)
-//       max_w = base_w;
-//     if (base_h > max_h)
-//       max_h = base_h;
+       basew = hint.base_width;
+       baseh = hint.base_height;
+       if (basew > minw) minw = basew;
+       if (baseh > minh) minh = baseh;
      }
-   else
+   if (hint.flags & PResizeInc)
      {
-//     base_w = min_w;
-//     base_h = min_h;
+       stepx = hint.width_inc;
+       stepy = hint.height_inc;
+       if (stepx < 1) stepx = 1;
+       if (stepy < 1) stepy = 1;
      }
    if (hint.flags & PAspect)
      {
-//     if (hint.min_aspect.y > 0)
-//       aspect_min =
-//       ((double)hint.min_aspect.x) / ((double)hint.min_aspect.y);
-//     if (hint.max_aspect.y > 0)
-//       aspect_max =
-//       ((double)hint.max_aspect.x) / ((double)hint.max_aspect.y);
-     }
-   
+       if (hint.min_aspect.y > 0)
+         mina = ((double)hint.min_aspect.x) / ((double)hint.min_aspect.y);
+       if (hint.max_aspect.y > 0)
+         maxa = ((double)hint.max_aspect.x) / ((double)hint.max_aspect.y);
+     }
+   if (min_w) *min_w = minw;
+   if (min_h) *min_h = minh;
+   if (max_w) *max_w = maxw;
+   if (max_h) *max_h = maxh;
+   if (base_w) *base_w = basew;
+   if (base_h) *base_h = baseh;
+   if (step_x) *step_x = stepx;
+   if (step_y) *step_y = stepy;
+   if (min_aspect) *min_aspect = mina;
+   if (max_aspect) *max_aspect = maxa;
    return 1;
 }
 
@@ -272,7 +338,7 @@
 /* get/set transient for */
 /* send iconify request */
 
-/* FIXME: there are older E hints, gnome hitns and mwm hints and new netwm */
+/* FIXME: there are older E hints, gnome hints and mwm hints and new netwm */
 /*        hints. each should go in their own file/section so we know which */
-/*        is which. also older kde hints too. we shoudl try support as much */
+/*        is which. also older kde hints too. we should try support as much */
 /*        as makese sense to support */




-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to