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_window.c
Log Message:
another handy routine...
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/Ecore_X.h,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -3 -r1.161 -r1.162
--- Ecore_X.h 8 Mar 2006 08:02:55 -0000 1.161
+++ Ecore_X.h 8 Mar 2006 10:01:42 -0000 1.162
@@ -1013,6 +1013,8 @@
EAPI Ecore_X_Window ecore_x_window_new(Ecore_X_Window parent, int x, int y,
int w, int h);
EAPI Ecore_X_Window ecore_x_window_override_new(Ecore_X_Window parent, int
x, int y, int w, int h);
+EAPI int ecore_x_window_argb_get(Ecore_X_Window win);
+EAPI Ecore_X_Window ecore_x_window_manager_argb_new(Ecore_X_Window parent,
int x, int y, int w, int h);
EAPI Ecore_X_Window ecore_x_window_argb_new(Ecore_X_Window parent, int x,
int y, int w, int h);
EAPI Ecore_X_Window ecore_x_window_override_argb_new(Ecore_X_Window parent,
int x, int y, int w, int h);
EAPI Ecore_X_Window ecore_x_window_input_new(Ecore_X_Window parent, int x,
int y, int w, int h);
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_window.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -3 -r1.49 -r1.50
--- ecore_x_window.c 8 Mar 2006 08:54:36 -0000 1.49
+++ ecore_x_window.c 8 Mar 2006 10:01:42 -0000 1.50
@@ -888,7 +888,7 @@
#ifdef ECORE_XRENDER
static Ecore_X_Window
-_ecore_x_window_argb_internal_new(Ecore_X_Window parent, int x, int y, int w,
int h, int override)
+_ecore_x_window_argb_internal_new(Ecore_X_Window parent, int x, int y, int w,
int h, int override, int saveunder)
{
Window win;
XSetWindowAttributes attr;
@@ -947,7 +947,7 @@
attr.background_pixmap = None;
attr.bit_gravity = NorthWestGravity;
attr.win_gravity = NorthWestGravity;
- attr.save_under = False;
+ attr.save_under = saveunder;
attr.do_not_propagate_mask = NoEventMask;
attr.event_mask = KeyPressMask |
KeyReleaseMask |
@@ -985,6 +985,44 @@
}
#endif
+EAPI int
+ecore_x_window_argb_get(Ecore_X_Window win)
+{
+#ifdef ECORE_XRENDER
+ XWindowAttributes att;
+ XRenderPictFormat *fmt;
+
+ XGetWindowAttributes(_ecore_x_disp, win, &att);
+ fmt = XRenderFindVisualFormat(_ecore_x_disp, att.visual);
+ if (!fmt) return 0;
+ if ((fmt->type == PictTypeDirect) && (fmt->direct.alphaMask)) return 1;
+ return 0;
+#else
+ return 0;
+#endif
+}
+
+/**
+ * Creates a new window.
+ * @param parent The parent window to use. If @p parent is @c 0, the root
+ * window of the default display is used.
+ * @param x X position.
+ * @param y Y position.
+ * @param w Width.
+ * @param h Height.
+ * @return The new window handle.
+ * @ingroup Ecore_X_Window_Create_Group
+ */
+EAPI Ecore_X_Window
+ecore_x_window_manager_argb_new(Ecore_X_Window parent, int x, int y, int w,
int h)
+{
+#ifdef ECORE_XRENDER
+ return _ecore_x_window_argb_internal_new(parent, x, y, w, h, 1, 0);
+#else
+ return 0;
+#endif
+}
+
/**
* Creates a new window.
* @param parent The parent window to use. If @p parent is @c 0, the root
@@ -1000,7 +1038,7 @@
ecore_x_window_argb_new(Ecore_X_Window parent, int x, int y, int w, int h)
{
#ifdef ECORE_XRENDER
- return _ecore_x_window_argb_internal_new(parent, x, y, w, h, 0);
+ return _ecore_x_window_argb_internal_new(parent, x, y, w, h, 0, 0);
#else
return 0;
#endif
@@ -1021,7 +1059,7 @@
ecore_x_window_override_argb_new(Ecore_X_Window parent, int x, int y, int w,
int h)
{
#ifdef ECORE_XRENDER
- return _ecore_x_window_argb_internal_new(parent, x, y, w, h, 1);
+ return _ecore_x_window_argb_internal_new(parent, x, y, w, h, 1, 0);
#else
return 0;
#endif
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs