aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_13.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-04 18:41:13 +1000
committerDavid Walter Seikel2012-01-04 18:41:13 +1000
commitdd7595a3475407a7fa96a97393bae8c5220e8762 (patch)
treee341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_13.c
parentAdd the skeleton. (diff)
downloadSledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz
Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje.
Note that embryo wont be used, but I'm not sure yet if you can build edje without it.
Diffstat (limited to 'libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_13.c')
-rw-r--r--libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_13.c63
1 files changed, 63 insertions, 0 deletions
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_13.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_13.c
new file mode 100644
index 0000000..ab242f7
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_13.c
@@ -0,0 +1,63 @@
1/*
2 * vim:ts=8:sw=3:sts=8:expandtab:cino=>5n-3f0^-2{2
3 */
4
5#ifdef HAVE_CONFIG_H
6# include <config.h>
7#endif
8
9#include "ecore_x_private.h"
10#include "ecore_x_randr.h"
11
12#define Ecore_X_Randr_None 0
13#define Ecore_X_Randr_Unset -1
14
15#ifdef ECORE_XRANDR
16
17#define RANDR_1_3 ((1 << 16) | 3)
18#define RANDR_CHECK_1_3_RET(ret) if(_randr_version < RANDR_1_3) return ret
19
20extern XRRScreenResources *(*_ecore_x_randr_get_screen_resources)(Display *
21 dpy,
22 Window
23 window);
24extern int _randr_version;
25#endif
26
27/*
28 * @param root window which's screen should be queried
29 * @return Ecore_X_Randr_Ouptut_Id or - if query failed or none is set - Ecore_X_Randr_None
30 */
31EAPI Ecore_X_Randr_Output
32ecore_x_randr_primary_output_get(Ecore_X_Window root)
33{
34#ifdef ECORE_XRANDR
35 RANDR_CHECK_1_3_RET(Ecore_X_Randr_None);
36 if (!_ecore_x_randr_root_validate(root))
37 return Ecore_X_Randr_None;
38
39 return XRRGetOutputPrimary(_ecore_x_disp, root);
40#else
41 return Ecore_X_Randr_None;
42#endif
43}
44
45/*
46 * @param root window which's screen should be queried
47 * @param output that should be set as given root window's screen primary output
48 */
49EAPI void
50ecore_x_randr_primary_output_set(Ecore_X_Window root,
51 Ecore_X_Randr_Output output)
52{
53#ifdef ECORE_XRANDR
54 RANDR_CHECK_1_3_RET();
55
56 if (_ecore_x_randr_output_validate(root, output))
57 {
58 XRRSetOutputPrimary(_ecore_x_disp, root, output);
59 }
60
61#endif
62}
63