summaryrefslogtreecommitdiff
path: root/src/lib/ecore_x
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-04-05 11:43:14 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-04-05 11:43:14 -0400
commitaba46af602c8b45815974ed25303874e9a368c86 (patch)
tree1b74ed6b3231994d58ae8a76ad1933a03524d745 /src/lib/ecore_x
parentca8e13712fdbe16c575558af86197a25249a19c1 (diff)
ecore-xcb: Add implementation for missing API function
This patch adds an xcb implementation for missing ecore_x_randr_crtc_panning_area_set function @fix Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Diffstat (limited to 'src/lib/ecore_x')
-rw-r--r--src/lib/ecore_x/xcb/ecore_xcb_randr.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/lib/ecore_x/xcb/ecore_xcb_randr.c b/src/lib/ecore_x/xcb/ecore_xcb_randr.c
index ce14933fd7..2b44fc3b31 100644
--- a/src/lib/ecore_x/xcb/ecore_xcb_randr.c
+++ b/src/lib/ecore_x/xcb/ecore_xcb_randr.c
@@ -32,10 +32,12 @@
32#define RANDR_1_1 ((1 << 16) | 1) 32#define RANDR_1_1 ((1 << 16) | 1)
33#define RANDR_1_2 ((1 << 16) | 2) 33#define RANDR_1_2 ((1 << 16) | 2)
34#define RANDR_1_3 ((1 << 16) | 3) 34#define RANDR_1_3 ((1 << 16) | 3)
35#define RANDR_1_4 ((1 << 16) | 4)
35 36
36#define RANDR_CHECK_1_1_RET(ret) if (_randr_version < RANDR_1_1) return ret 37#define RANDR_CHECK_1_1_RET(ret) if (_randr_version < RANDR_1_1) return ret
37#define RANDR_CHECK_1_2_RET(ret) if (_randr_version < RANDR_1_2) return ret 38#define RANDR_CHECK_1_2_RET(ret) if (_randr_version < RANDR_1_2) return ret
38#define RANDR_CHECK_1_3_RET(ret) if (_randr_version < RANDR_1_3) return ret 39#define RANDR_CHECK_1_3_RET(ret) if (_randr_version < RANDR_1_3) return ret
40#define RANDR_CHECK_1_4_RET(ret) if (_randr_version < RANDR_1_4) return ret
39 41
40#define ECORE_X_RANDR_EDID_VERSION_13 ((1 << 8) | 3) 42#define ECORE_X_RANDR_EDID_VERSION_13 ((1 << 8) | 3)
41#define _ECORE_X_RANDR_EDID_OFFSET_VERSION_MAJOR 0x12 43#define _ECORE_X_RANDR_EDID_OFFSET_VERSION_MAJOR 0x12
@@ -2005,6 +2007,58 @@ ecore_x_randr_crtc_pos_set(Ecore_X_Window root,
2005 return ret; 2007 return ret;
2006} 2008}
2007 2009
2010EAPI Eina_Bool
2011ecore_x_randr_crtc_panning_area_set(Ecore_X_Window root EINA_UNUSED, Ecore_X_Randr_Crtc crtc, const int x, const int y, const int w, const int h)
2012{
2013 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2014 CHECK_XCB_CONN;
2015
2016#ifdef ECORE_XCB_RANDR
2017 RANDR_CHECK_1_4_RET(EINA_FALSE);
2018
2019 Eina_Bool ret = EINA_FALSE;
2020 xcb_randr_get_panning_cookie_t get_cookie;
2021 xcb_randr_get_panning_reply_t *get_reply;
2022
2023 get_cookie = xcb_randr_get_panning_unchecked(_ecore_xcb_conn, crtc);
2024 get_reply = xcb_randr_get_panning_reply(_ecore_xcb_conn, get_cookie, NULL);
2025 if (get_reply)
2026 {
2027 xcb_randr_set_panning_cookie_t set_cookie;
2028 xcb_randr_set_panning_reply_t *set_reply;
2029
2030 set_cookie =
2031 xcb_randr_set_panning_unchecked(_ecore_xcb_conn, crtc,
2032 XCB_CURRENT_TIME,
2033 x, y, w, h,
2034 get_reply->track_left,
2035 get_reply->track_top,
2036 get_reply->track_width,
2037 get_reply->track_height,
2038 get_reply->border_left,
2039 get_reply->border_top,
2040 get_reply->border_right,
2041 get_reply->border_bottom);
2042 set_reply =
2043 xcb_randr_set_panning_reply(_ecore_xcb_conn, set_cookie, NULL);
2044 if (!set_reply)
2045 ret = EINA_FALSE;
2046 else
2047 {
2048 if (set_reply->status == XCB_RANDR_SET_CONFIG_SUCCESS)
2049 ret = EINA_TRUE;
2050
2051 free(set_reply);
2052 }
2053
2054 free(get_reply);
2055 }
2056
2057 return ret;
2058#endif
2059 return EINA_FALSE;
2060}
2061
2008EAPI void 2062EAPI void
2009ecore_x_randr_crtc_size_get(Ecore_X_Window root, 2063ecore_x_randr_crtc_size_get(Ecore_X_Window root,
2010 Ecore_X_Randr_Crtc crtc, 2064 Ecore_X_Randr_Crtc crtc,