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_randr.c
Log Message:
add xrandr rotation wrappers.
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_x/Ecore_X.h,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -3 -r1.163 -r1.164
--- Ecore_X.h 9 Mar 2006 03:51:43 -0000 1.163
+++ Ecore_X.h 12 May 2006 07:24:34 -0000 1.164
@@ -72,47 +72,34 @@
typedef enum _Ecore_X_Window_State {
/** The window is iconified. */
ECORE_X_WINDOW_STATE_ICONIFIED,
-
/** The window is a modal dialog box. */
ECORE_X_WINDOW_STATE_MODAL,
-
/** The window manager should keep the window's position fixed
* even if the virtual desktop scrolls. */
ECORE_X_WINDOW_STATE_STICKY,
-
/** The window has the maximum vertical size. */
ECORE_X_WINDOW_STATE_MAXIMIZED_VERT,
-
/** The window has the maximum horizontal size. */
ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ,
-
/** The window is shaded. */
ECORE_X_WINDOW_STATE_SHADED,
-
/** The window should not be included in the taskbar. */
ECORE_X_WINDOW_STATE_SKIP_TASKBAR,
-
/** The window should not be included in the pager. */
ECORE_X_WINDOW_STATE_SKIP_PAGER,
-
/** The window is invisible (i.e. minimized/iconified) */
ECORE_X_WINDOW_STATE_HIDDEN,
-
/** The window should fill the entire screen and have no
* window border/decorations */
ECORE_X_WINDOW_STATE_FULLSCREEN,
-
/* The following are not documented because they are not
* intended for use in applications. */
ECORE_X_WINDOW_STATE_ABOVE,
ECORE_X_WINDOW_STATE_BELOW,
-
/* FIXME: Documentation */
ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION,
-
/* Unknown state */
ECORE_X_WINDOW_STATE_UNKNOWN
-
} Ecore_X_Window_State;
typedef enum _Ecore_X_Window_State_Action {
@@ -129,6 +116,15 @@
ECORE_X_WINDOW_STACK_OPPOSITE = 4
} Ecore_X_Window_Stack_Mode;
+typedef enum _Ecore_X_Randr_Rotation {
+ ECORE_X_RANDR_ROT_0 = (1 << 0),
+ ECORE_X_RANDR_ROT_90 = (1 << 1),
+ ECORE_X_RANDR_ROT_180 = (1 << 2),
+ ECORE_X_RANDR_ROT_270 = (1 << 3),
+ ECORE_X_RANDR_FLIP_X = (1 << 4),
+ ECORE_X_RANDR_FLIP_Y = (1 << 5)
+} Ecore_X_Randr_Rotation;
+
#define ECORE_X_SELECTION_TARGET_TARGETS "TARGETS"
#define ECORE_X_SELECTION_TARGET_TEXT "TEXT"
#define ECORE_X_SELECTION_TARGET_COMPOUND_TEXT "COMPOUND_TEXT"
@@ -1441,14 +1437,16 @@
int rate;
};
-EAPI int ecore_x_randr_events_select(Ecore_X_Window win, int
on);
-EAPI Ecore_X_Screen_Size *ecore_x_randr_screen_sizes_get(Ecore_X_Window root,
int *num);
-EAPI Ecore_X_Screen_Size ecore_x_randr_current_screen_size_get(Ecore_X_Window
root);
-EAPI int ecore_x_randr_screen_size_set(Ecore_X_Window root,
- Ecore_X_Screen_Size
size);
-
+EAPI int ecore_x_randr_events_select(Ecore_X_Window win,
int on);
+EAPI Ecore_X_Randr_Rotation ecore_x_randr_screen_rotations_get(Ecore_X_Window
root);
+EAPI Ecore_X_Randr_Rotation ecore_x_randr_screen_rotation_get(Ecore_X_Window
root);
+EAPI void ecore_x_randr_screen_rotation_set(Ecore_X_Window
root, Ecore_X_Randr_Rotation rot);
+EAPI Ecore_X_Screen_Size *ecore_x_randr_screen_sizes_get(Ecore_X_Window
root, int *num);
+EAPI Ecore_X_Screen_Size
ecore_x_randr_current_screen_size_get(Ecore_X_Window root);
+EAPI int ecore_x_randr_screen_size_set(Ecore_X_Window
root, Ecore_X_Screen_Size size);
+
EAPI Ecore_X_Screen_Refresh_Rate
*ecore_x_randr_screen_refresh_rates_get(Ecore_X_Window root, int size_id, int
*num);
-EAPI Ecore_X_Screen_Refresh_Rate
ecore_x_randr_current_screen_refresh_rate_get(Ecore_X_Window root);
+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);
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_x/ecore_x_randr.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- ecore_x_randr.c 28 Mar 2006 18:36:19 -0000 1.9
+++ ecore_x_randr.c 12 May 2006 07:24:34 -0000 1.10
@@ -18,6 +18,38 @@
#endif
}
+EAPI Ecore_X_Randr_Rotation
+ecore_x_randr_screen_rotations_get(Ecore_X_Window root)
+{
+ Rotation rot, crot;
+
+ rot = XRRRotations(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root),
&crot);
+ return rot;
+}
+
+EAPI Ecore_X_Randr_Rotation
+ecore_x_randr_screen_rotation_get(Ecore_X_Window root)
+{
+ Rotation rot, crot = 0;
+
+ rot = XRRRotations(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root),
&crot);
+ return crot;
+}
+
+EAPI void
+ecore_x_randr_screen_rotation_set(Ecore_X_Window root, Ecore_X_Randr_Rotation
rot)
+{
+ XRRScreenConfiguration *xrrcfg;
+ SizeID sizeid;
+ Rotation crot;
+
+ xrrcfg = XRRGetScreenInfo(_ecore_x_disp, root);
+ if (!xrrcfg) return;
+ sizeid = XRRConfigCurrentConfiguration(xrrcfg, &crot);
+ XRRSetScreenConfig(_ecore_x_disp, xrrcfg, root, sizeid, rot, CurrentTime);
+ XRRFreeScreenConfigInfo(xrrcfg);
+}
+
EAPI Ecore_X_Screen_Size *
ecore_x_randr_screen_sizes_get(Ecore_X_Window root, int *num)
{
-------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs