* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
+#include <string.h>
+
#include <X11/keysym.h>
-#include "Ecore.h"
+#include <Ecore.h>
+
#include "ecore_xcb_private.h"
#include "Ecore_X_Atoms.h"
/*********************/
/* We ask for the QueryVersion request of the extensions */
+#ifdef ECORE_XCB_DAMAGE
_ecore_x_damage_init(reply_damage);
+#endif /* ECORE_XCB_DAMAGE */
+#ifdef ECORE_XCB_COMPOSITE
_ecore_x_composite_init(reply_composite);
+#endif /* ECORE_XCB_COMPOSITE */
+#ifdef ECORE_XCB_DPMS
_ecore_x_dpms_init(reply_dpms);
+#endif /* ECORE_XCB_DPMS */
+#ifdef ECORE_XCB_RANDR
_ecore_x_randr_init(reply_randr);
+#endif /* ECORE_XCB_RANDR */
+#ifdef ECORE_XCB_SCREENSAVER
+ _ecore_x_screensaver_init(reply_screensaver);
+#endif /* ECORE_XCB_SCREENSAVER */
+#ifdef ECORE_XCB_SHAPE
_ecore_x_shape_init(reply_shape);
+#endif /* ECORE_XCB_SHAPE */
+#ifdef ECORE_XCB_SYNC
_ecore_x_sync_init(reply_sync);
+#endif /* ECORE_XCB_SYNC */
+#ifdef ECORE_XCB_FIXES
_ecore_x_xfixes_init(reply_xfixes);
+#endif /* ECORE_XCB_FIXES */
+#ifdef ECORE_XCB_XINERAMA
_ecore_x_xinerama_init(reply_xinerama);
+#endif /* ECORE_XCB_XINERAMA */
/* we enable the Big Request extension if present */
max_request_length = xcb_get_maximum_request_length(_ecore_xcb_conn);
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
+#include <string.h>
+
#include "ecore_xcb_private.h"
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
+#include <string.h>
+
#include "Ecore.h"
#include "ecore_xcb_private.h"
#include "Ecore_X_Atoms.h"
* client.
*/
-#include "ecore_xcb_private.h"
-#include "Ecore_X_Atoms.h"
+#include <string.h>
#include <xcb/xcb_icccm.h>
+#include "ecore_xcb_private.h"
+#include "Ecore_X_Atoms.h"
+
/**
* @defgroup Ecore_X_ICCCM_Group ICCCM related functions.
* _NET_WM... aka Extended Window Manager Hint (EWMH) functions.
*/
-#include "Ecore_Data.h"
+#include <stdio.h>
+#include <string.h>
+
+#include <Ecore_Data.h>
+
#include "ecore_xcb_private.h"
#include "Ecore_X_Atoms.h"
EAPI void
ecore_x_randr_get_screen_info_prefetch(Ecore_X_Window window)
{
+#ifdef ECORE_XCB_RANDR
xcb_randr_get_screen_info_cookie_t cookie;
cookie = xcb_randr_get_screen_info_unchecked(_ecore_xcb_conn,
_xcb_randr_root_to_screen(window));
_ecore_xcb_cookie_cache(cookie.sequence);
+#endif /* ECORE_XCB_RANDR */
}
EAPI void
ecore_x_randr_get_screen_info_fetch(void)
{
+#ifdef ECORE_XCB_RANDR
xcb_randr_get_screen_info_cookie_t cookie;
xcb_randr_get_screen_info_reply_t *reply;
cookie.sequence = _ecore_xcb_cookie_get();
reply =xcb_randr_get_screen_info_reply(_ecore_xcb_conn, cookie, NULL);
_ecore_xcb_reply_cache(reply);
+#endif /* ECORE_XCB_RANDR */
}
/**
*/
+#ifdef ECORE_XCB_SCREENSAVER
+static int _screensaver_available = 0;
+static xcb_screensaver_query_version_cookie_t _ecore_xcb_screensaver_init_cookie;
+#endif /* ECORE_XCB_SCREENSAVER */
+
+
+/* To avoid round trips, the initialization is separated in 2
+ functions: _ecore_xcb_screensaver_init and
+ _ecore_xcb_screensaver_init_finalize. The first one gets the cookies and
+ the second one gets the replies and set the atoms. */
+
+void
+_ecore_x_screensaver_init(const xcb_query_extension_reply_t *reply)
+{
+#ifdef ECORE_XCB_SCREENSAVER
+ if (reply && (reply->present))
+ _ecore_xcb_screensaver_init_cookie = xcb_screensaver_query_version_unchecked(_ecore_xcb_conn, 1, 1);
+#endif /* ECORE_XCB_SCREENSAVER */
+}
+
+void
+_ecore_x_screensaver_init_finalize(void)
+{
+#ifdef ECORE_XCB_SCREENSAVER
+ xcb_screensaver_query_version_reply_t *reply;
+
+ reply = xcb_screensaver_query_version_reply(_ecore_xcb_conn,
+ _ecore_xcb_screensaver_init_cookie, NULL);
+
+ if (reply)
+ {
+ if ((reply->server_major_version >= 1) &&
+ (reply->server_minor_version >= 1))
+ _screensaver_available = 1;
+ free(reply);
+ }
+#endif /* ECORE_XCB_SCREENSAVER */
+}
+
+
/**
* Return whether the X server supports the ScreenSaver Extension.
* @return 1 if the X ScreenSaver Extension is available, 0 otherwise.
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
+#include <string.h>
+
#include "ecore_xcb_private.h"
#include "Ecore_X_Atoms.h"
int width,
int height)
{
+#ifdef ECORE_XCB_SHAPE
xcb_rectangle_t rect;
rect.x = x;
xcb_shape_rectangles(_ecore_xcb_conn,
XCB_SHAPE_SO_INTERSECT, XCB_SHAPE_SK_BOUNDING,
0, dest_win, 0, 0, 1, &rect);
+#endif /* ECORE_XCB_SHAPE */
}
EAPI void
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
-#include "Ecore.h"
+#include <string.h>
+
+#include <Ecore.h>
+
#include "ecore_xcb_private.h"
#include "Ecore_X_Atoms.h"
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
+#include <string.h>
+
#include "ecore_xcb_private.h"
#include "Ecore_X_Atoms.h"