summaryrefslogtreecommitdiffstats
path: root/src/blueshift_randr.pyx
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-04-03 00:10:43 +0200
committerMattias Andrée <maandree@operamail.com>2014-04-03 00:10:43 +0200
commitf24b1e38904f1baf351502bfa630b3b9d7d2e2f1 (patch)
tree7347eec3bbfc9da872d160ca77c378f96f783841 /src/blueshift_randr.pyx
parentupdate deps (diff)
downloadblueshift-f24b1e38904f1baf351502bfa630b3b9d7d2e2f1.tar.gz
blueshift-f24b1e38904f1baf351502bfa630b3b9d7d2e2f1.tar.bz2
blueshift-f24b1e38904f1baf351502bfa630b3b9d7d2e2f1.tar.xz
add multi-display support
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/blueshift_randr.pyx')
-rw-r--r--src/blueshift_randr.pyx14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/blueshift_randr.pyx b/src/blueshift_randr.pyx
index f54a5c9..756ea73 100644
--- a/src/blueshift_randr.pyx
+++ b/src/blueshift_randr.pyx
@@ -19,7 +19,7 @@ cimport cython
from libc.stdlib cimport malloc, free
-cdef extern int blueshift_randr_open(int use_screen)
+cdef extern int blueshift_randr_open(int use_screen, char* display)
cdef extern unsigned short int* blueshift_randr_read(int use_crtc)
cdef extern int blueshift_randr_apply(unsigned long long int use_crtcs,
unsigned short int* r_curve,
@@ -40,14 +40,18 @@ if (r_c is NULL) or (g_c is NULL) or (b_c is NULL):
-def randr_open(int use_screen):
+def randr_open(int use_screen, display):
'''
Start stage of colour curve control
- @param use_screen The screen to use
- @return Zero on success
+ @param use_screen The screen to use
+ @param display:str? The display to use, `None` for the current
+ @return :int Zero on success
'''
- return blueshift_randr_open(use_screen)
+ cdef char* display_ = NULL
+ if display is not None:
+ display_ = display
+ return blueshift_randr_open(use_screen, display_)
def randr_read(int use_crtc):