Enlightenment CVS committal

Author  : xcomputerman
Project : e17
Module  : libs/ecore

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


Modified Files:
        Ecore_X.h Ecore_X_Atoms.h Makefile.am ecore_x.c 
        ecore_x_events.c ecore_x_netwm.c ecore_x_private.h 


Log Message:
Add support for XFixes and XDamage to Ecore_X.
Add atoms for translucency/composite support.

===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_x/Ecore_X.h,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -3 -r1.165 -r1.166
--- Ecore_X.h   17 May 2006 05:35:56 -0000      1.165
+++ Ecore_X.h   19 May 2006 06:05:35 -0000      1.166
@@ -404,6 +404,7 @@
 {
    Ecore_X_Window  win;
    int             x, y, w, h;
+   int             count;
    Ecore_X_Time    time;
 };
 
@@ -806,6 +807,7 @@
 EAPI extern int ECORE_X_EVENT_SYNC_COUNTER;
 EAPI extern int ECORE_X_EVENT_SYNC_ALARM;
 EAPI extern int ECORE_X_EVENT_SCREEN_CHANGE;
+EAPI extern int ECORE_X_EVENT_DAMAGE_NOTIFY;
 
 EAPI extern int ECORE_X_EVENT_WINDOW_DELETE_REQUEST;
 /*
@@ -951,7 +953,6 @@
 #define ECORE_X_PROP_LIST_ADD       1
 #define ECORE_X_PROP_LIST_TOGGLE    2
 
-
 EAPI int              ecore_x_init(const char *name);
 EAPI int              ecore_x_shutdown(void);
 EAPI int              ecore_x_disconnect(void);
@@ -1450,6 +1451,61 @@
 EAPI Ecore_X_Screen_Refresh_Rate  
ecore_x_randr_current_screen_refresh_rate_get(Ecore_X_Window root);
 
 EAPI int ecore_x_randr_screen_refresh_rate_set(Ecore_X_Window root, 
Ecore_X_Screen_Size size, Ecore_X_Screen_Refresh_Rate rate);
+
+/* XRender Support (horrendously incomplete) */
+typedef Ecore_X_ID  Ecore_X_Picture;
+
+/* XFixes Extension Support */
+typedef Ecore_X_ID  Ecore_X_Region;
+
+typedef enum _Ecore_X_Region_Type {
+     ECORE_X_REGION_BOUNDING,
+     ECORE_X_REGION_CLIP
+} Ecore_X_Region_Type;
+
+EAPI Ecore_X_Region ecore_x_region_new(Ecore_X_Rectangle *rects, int num);
+EAPI Ecore_X_Region ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap);
+EAPI Ecore_X_Region ecore_x_region_new_from_window(Ecore_X_Window win, 
Ecore_X_Region_Type type);
+EAPI Ecore_X_Region ecore_x_region_new_from_gc(Ecore_X_GC gc);
+EAPI Ecore_X_Region ecore_x_region_new_from_picture(Ecore_X_Picture picture);
+EAPI void           ecore_x_region_del(Ecore_X_Region region);
+EAPI void           ecore_x_region_set(Ecore_X_Region region, 
Ecore_X_Rectangle *rects, int num);
+EAPI void           ecore_x_region_copy(Ecore_X_Region dest, Ecore_X_Region 
source);
+EAPI void           ecore_x_region_combine(Ecore_X_Region dest, Ecore_X_Region 
source1, Ecore_X_Region source2);
+EAPI void           ecore_x_region_intersect(Ecore_X_Region dest, 
Ecore_X_Region source1, Ecore_X_Region source2);
+EAPI void           ecore_x_region_subtract(Ecore_X_Region dest, 
Ecore_X_Region source1, Ecore_X_Region source2);
+EAPI void           ecore_x_region_invert(Ecore_X_Region dest, 
Ecore_X_Rectangle *bounds, Ecore_X_Region source);
+EAPI void           ecore_x_region_translate(Ecore_X_Region region, int dx, 
int dy);
+EAPI void           ecore_x_region_extents(Ecore_X_Region dest, Ecore_X_Region 
source);
+EAPI Ecore_X_Rectangle * ecore_x_region_fetch(Ecore_X_Region region, int *num, 
Ecore_X_Rectangle *bounds);
+EAPI void           ecore_x_region_expand(Ecore_X_Region dest, Ecore_X_Region 
source, unsigned int left, unsigned int right, unsigned int top, unsigned int 
bottom);
+
+/* XDamage Extension Support */
+typedef Ecore_X_ID  Ecore_X_Damage;
+
+typedef enum _Ecore_X_Damage_Report_Level {
+     ECORE_X_DAMAGE_REPORT_RAW_RECTANGLES,
+     ECORE_X_DAMAGE_REPORT_DELTA_RECTANGLES,
+     ECORE_X_DAMAGE_REPORT_BOUNDING_BOX,
+     ECORE_X_DAMAGE_REPORT_NON_EMPTY
+} Ecore_X_Damage_Report_Level;
+
+struct _Ecore_X_Event_Damage {
+     Ecore_X_Damage_Report_Level level;
+     Ecore_X_Drawable drawable;
+     Ecore_X_Damage   damage;
+     int              more;
+     Ecore_X_Time     time;
+     Ecore_X_Rectangle area;
+     Ecore_X_Rectangle  geometry;
+};
+
+typedef struct _Ecore_X_Event_Damage  Ecore_X_Event_Damage;
+
+EAPI int               ecore_x_damage_query(void);
+EAPI Ecore_X_Damage    ecore_x_damage_new(Ecore_X_Drawable d, 
Ecore_X_Damage_Report_Level level);
+EAPI void              ecore_x_damage_del(Ecore_X_Damage damage);
+EAPI void              ecore_x_damage_subtract(Ecore_X_Damage damage, 
Ecore_X_Region repair, Ecore_X_Region parts);
 
 #ifdef __cplusplus
 }
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_x/Ecore_X_Atoms.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- Ecore_X_Atoms.h     7 Jan 2006 08:32:26 -0000       1.14
+++ Ecore_X_Atoms.h     19 May 2006 06:05:35 -0000      1.15
@@ -115,8 +115,6 @@
 EAPI extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_BELOW;
 EAPI extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION;
 
-EAPI extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_OPACITY;
-
 EAPI extern Ecore_X_Atom ECORE_X_ATOM_NET_FRAME_EXTENTS;
 EAPI extern Ecore_X_Atom ECORE_X_ATOM_NET_REQUEST_FRAME_EXTENTS;
 
@@ -127,6 +125,11 @@
 EAPI extern Ecore_X_Atom ECORE_X_ATOM_NET_STARTUP_INFO_BEGIN;
 EAPI extern Ecore_X_Atom ECORE_X_ATOM_NET_STARTUP_INFO;
 
+/* NetWM Opacity Atoms */
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_OPACITY;
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_SHADOW;
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_SHADE;
+
 /* Selections */
 EAPI extern Ecore_X_Atom ECORE_X_ATOM_SELECTION_TARGETS;
 EAPI extern Ecore_X_Atom ECORE_X_ATOM_SELECTION_PRIMARY;
@@ -152,5 +155,6 @@
 EAPI extern Ecore_X_Atom ECORE_X_ATOM_XDND_POSITION;
 EAPI extern Ecore_X_Atom ECORE_X_ATOM_XDND_DROP;
 EAPI extern Ecore_X_Atom ECORE_X_ATOM_XDND_FINISHED;
+
 
 #endif /* _ECORE_X_ATOMS_H */
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_x/Makefile.am,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- Makefile.am 13 Mar 2006 22:38:53 -0000      1.26
+++ Makefile.am 19 May 2006 06:05:35 -0000      1.27
@@ -6,6 +6,8 @@
 @Xprint_cflags@ \
 @Xinerama_cflags@ \
 @Xrandr_cflags@ \
[EMAIL PROTECTED]@ \
[EMAIL PROTECTED]@ \
 @Xss_cflags@ \
 @x_cflags@ \
 -I$(top_srcdir)/src/lib/ecore \
@@ -33,6 +35,8 @@
 ecore_x_dnd.c \
 ecore_x_sync.c \
 ecore_x_randr.c \
+ecore_x_fixes.c \
+ecore_x_damage.c \
 ecore_x_error.c \
 ecore_x_events.c \
 ecore_x_icccm.c \
@@ -55,6 +59,8 @@
 @Xprint_libs@ \
 @Xinerama_libs@ \
 @Xrandr_libs@ \
[EMAIL PROTECTED]@ \
[EMAIL PROTECTED]@ \
 @Xss_libs@ \
 @x_ldflags@ \
 @x_libs@ \
@@ -76,6 +82,8 @@
 ecore_x.c \
 ecore_x_dnd.c \
 ecore_x_sync.c \
+ecore_x_fixes.c \
+ecore_x_damage.c \
 ecore_x_randr.c \
 ecore_x_error.c \
 ecore_x_events.c \
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_x/ecore_x.c,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -3 -r1.109 -r1.110
--- ecore_x.c   8 Mar 2006 15:07:37 -0000       1.109
+++ ecore_x.c   19 May 2006 06:05:35 -0000      1.110
@@ -22,6 +22,12 @@
 #ifdef ECORE_XRANDR
 static int _ecore_x_event_randr_id = 0;
 #endif
+#ifdef ECORE_XFIXES
+static int _ecore_x_event_fixes_selection_id = 0;
+#endif
+#ifdef ECORE_XDAMAGE
+static int _ecore_x_event_damage_id = 0;
+#endif
 static int _ecore_x_event_handlers_num = 0;
 static void (**_ecore_x_event_handlers) (XEvent * event) = NULL;
 
@@ -100,6 +106,7 @@
 EAPI int ECORE_X_EVENT_SYNC_COUNTER = 0;
 EAPI int ECORE_X_EVENT_SYNC_ALARM = 0;
 EAPI int ECORE_X_EVENT_SCREEN_CHANGE = 0;
+EAPI int ECORE_X_EVENT_DAMAGE_NOTIFY = 0;
 
 EAPI int ECORE_X_EVENT_WINDOW_DELETE_REQUEST = 0;
 /*
@@ -160,6 +167,10 @@
    int randr_base = 0;
    int randr_err_base = 0;
 #endif
+   int fixes_base = 0;
+   int fixes_err_base = 0;
+   int damage_base = 0;
+   int damage_err_base = 0;
    
    if (_ecore_x_init_count > 0) 
      {
@@ -201,6 +212,20 @@
      _ecore_x_event_handlers_num = _ecore_x_event_randr_id + 1;
 #endif
 
+#ifdef ECORE_XFIXES
+   if (XFixesQueryExtension(_ecore_x_disp, &fixes_base, &fixes_err_base))
+     _ecore_x_event_fixes_selection_id = fixes_base + XFixesSelectionNotify;
+   if (_ecore_x_event_fixes_selection_id >= _ecore_x_event_handlers_num)
+     _ecore_x_event_handlers_num = _ecore_x_event_fixes_selection_id + 1;
+#endif
+
+#ifdef ECORE_XDAMAGE
+   if (XDamageQueryExtension(_ecore_x_disp, &damage_base, &damage_err_base))
+     _ecore_x_event_damage_id = damage_base + XDamageNotify;
+   if (_ecore_x_event_damage_id >= _ecore_x_event_handlers_num)
+     _ecore_x_event_handlers_num = _ecore_x_event_damage_id + 1;
+#endif
+
    _ecore_x_event_handlers = calloc(_ecore_x_event_handlers_num, sizeof(void 
*));
    if (!_ecore_x_event_handlers)
      {
@@ -259,6 +284,15 @@
    if (_ecore_x_event_randr_id)
      _ecore_x_event_handlers[_ecore_x_event_randr_id] = 
_ecore_x_event_handle_randr_change;
 #endif
+#ifdef ECORE_XFIXES
+   if (_ecore_x_event_fixes_selection_id)
+     _ecore_x_event_handlers[_ecore_x_event_fixes_selection_id] = 
_ecore_x_event_handle_fixes_selection_notify;
+#endif
+#ifdef ECORE_XDAMAGE
+   if (_ecore_x_event_damage_id)
+     _ecore_x_event_handlers[_ecore_x_event_damage_id] = 
_ecore_x_event_handle_damage_notify;
+#endif
+
    if (!ECORE_X_EVENT_KEY_DOWN)
      {
        ECORE_X_EVENT_KEY_DOWN                 = ecore_event_type_new();
@@ -298,6 +332,7 @@
        ECORE_X_EVENT_SYNC_COUNTER             = ecore_event_type_new();
        ECORE_X_EVENT_SYNC_ALARM               = ecore_event_type_new();
        ECORE_X_EVENT_SCREEN_CHANGE            = ecore_event_type_new();
+       ECORE_X_EVENT_DAMAGE_NOTIFY            = ecore_event_type_new();
        
        ECORE_X_EVENT_WINDOW_DELETE_REQUEST                = 
ecore_event_type_new();
        /*
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_x/ecore_x_events.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -3 -r1.81 -r1.82
--- ecore_x_events.c    3 Mar 2006 04:01:15 -0000       1.81
+++ ecore_x_events.c    19 May 2006 06:05:35 -0000      1.82
@@ -716,6 +716,7 @@
    e->y = xevent->xexpose.y;
    e->w = xevent->xexpose.width;
    e->h = xevent->xexpose.height;
+   e->count = xevent->xexpose.count;
    ecore_event_add(ECORE_X_EVENT_WINDOW_DAMAGE, e, NULL, NULL);   
 }
 
@@ -732,6 +733,7 @@
    e->y = xevent->xgraphicsexpose.y;
    e->w = xevent->xgraphicsexpose.width;
    e->h = xevent->xgraphicsexpose.height;
+   e->count = xevent->xgraphicsexpose.count;
    ecore_event_add(ECORE_X_EVENT_WINDOW_DAMAGE, e, NULL, NULL);   
 }
 
@@ -1670,6 +1672,42 @@
    e->width = randr_event->width;
    e->height = randr_event->height;
    ecore_event_add(ECORE_X_EVENT_SCREEN_CHANGE, e, NULL, NULL);
+}
+#endif
+
+#ifdef ECORE_XFIXES
+void
+_ecore_x_event_handle_fixes_selection_notify(XEvent *event)
+{
+   /* Nothing here yet */
+}
+#endif
+
+#ifdef ECORE_XDAMAGE
+void
+_ecore_x_event_handle_damage_notify(XEvent *event)
+{
+   XDamageNotifyEvent *damage_event;
+   Ecore_X_Event_Damage *e;
+
+   e = calloc(1, sizeof(Ecore_X_Event_Damage));
+   if (!e) return;
+
+   e->level = damage_event->level;
+   e->drawable = damage_event->drawable;
+   e->damage = damage_event->damage;
+   e->more = damage_event->more;
+   e->time = damage_event->timestamp;
+   e->area.x = damage_event->area.x;
+   e->area.y = damage_event->area.y;
+   e->area.width = damage_event->area.width;
+   e->area.height = damage_event->area.height;
+   e->geometry.x = damage_event->geometry.x;
+   e->geometry.y = damage_event->geometry.y;
+   e->geometry.width = damage_event->geometry.width;
+   e->geometry.height = damage_event->geometry.height;
+
+   ecore_event_add(ECORE_X_EVENT_DAMAGE_NOTIFY, e, NULL, NULL);
 }
 #endif
 
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_x/ecore_x_netwm.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -3 -r1.51 -r1.52
--- ecore_x_netwm.c     17 May 2006 02:26:52 -0000      1.51
+++ ecore_x_netwm.c     19 May 2006 06:05:35 -0000      1.52
@@ -148,6 +148,8 @@
 EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION = 0;
 
 EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_WINDOW_OPACITY = 0;
+EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_WINDOW_SHADOW = 0;
+EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_WM_WINDOW_SHADE = 0;
 
 EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_FRAME_EXTENTS = 0;
 EAPI Ecore_X_Atom  ECORE_X_ATOM_NET_REQUEST_FRAME_EXTENTS = 0;
@@ -238,6 +240,8 @@
    ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION = 
_ATOM_GET("_NET_WM_STATE_DEMANDS_ATTENTION");
 
    ECORE_X_ATOM_NET_WM_WINDOW_OPACITY = _ATOM_GET("_NET_WM_WINDOW_OPACITY");
+   ECORE_X_ATOM_NET_WM_WINDOW_SHADOW = _ATOM_GET("_NET_WM_WINDOW_SHADOW");
+   ECORE_X_ATOM_NET_WM_WINDOW_SHADE = _ATOM_GET("_NET_WM_WINDOW_SHADE");
 
    ECORE_X_ATOM_NET_FRAME_EXTENTS = _ATOM_GET("_NET_FRAME_EXTENTS");
    ECORE_X_ATOM_NET_REQUEST_FRAME_EXTENTS = 
_ATOM_GET("_NET_REQUEST_FRAME_EXTENTS");
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_x/ecore_x_private.h,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -3 -r1.53 -r1.54
--- ecore_x_private.h   8 Mar 2006 08:02:55 -0000       1.53
+++ ecore_x_private.h   19 May 2006 06:05:35 -0000      1.54
@@ -36,6 +36,12 @@
 #ifdef ECORE_XRENDER
 #include <X11/extensions/Xrender.h>
 #endif
+#ifdef ECORE_XFIXES
+#include <X11/extensions/Xfixes.h>
+#endif
+#ifdef ECORE_XDAMAGE
+#include <X11/extensions/Xdamage.h>
+#endif
 
 #include "ecore_private.h"
 #include "Ecore_X.h"
@@ -193,6 +199,12 @@
 #ifdef ECORE_XRANDR
 void _ecore_x_event_handle_randr_change(XEvent *xevent);
 #endif
+#ifdef ECORE_XFIXES
+void _ecore_x_event_handle_fixes_selection_notify(XEvent *xevent);
+#endif
+#ifdef ECORE_XDAMAGE
+void _ecore_x_event_handle_damage_notify(XEvent *xevent);
+#endif
 
 void  _ecore_x_selection_data_init(void);
 void  _ecore_x_selection_shutdown(void);
@@ -220,6 +232,10 @@
 Ecore_X_Window_State _ecore_x_netwm_state_get(Ecore_X_Atom a);
 int                  _ecore_x_netwm_startup_info_begin(Ecore_X_Window win, 
char *data);
 int                  _ecore_x_netwm_startup_info(Ecore_X_Window win, char 
*data);
+
+/* Fixes * Damage */
+void _ecore_x_fixes_init(void);
+void _ecore_x_damage_init(void);
 
 /* from sync */
 




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to