summaryrefslogtreecommitdiffstats
path: root/src/blueshift_vidmode.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_vidmode.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 '')
-rw-r--r--src/blueshift_vidmode.pyx14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/blueshift_vidmode.pyx b/src/blueshift_vidmode.pyx
index 7f1810d..e4262d7 100644
--- a/src/blueshift_vidmode.pyx
+++ b/src/blueshift_vidmode.pyx
@@ -19,7 +19,7 @@ cimport cython
from libc.stdlib cimport malloc, free
-cdef extern int blueshift_vidmode_open(int use_screen)
+cdef extern int blueshift_vidmode_open(int use_screen, char* display)
cdef extern int blueshift_vidmode_read(int use_crtc,
unsigned short int* r_curve,
unsigned short int* g_curve,
@@ -46,15 +46,19 @@ if (r_c is NULL) or (g_c is NULL) or (b_c is NULL):
-def vidmode_open(int use_screen):
+def vidmode_open(int use_screen, display):
'''
Start stage of colour curve control
- @param use_screen The screen to use
- @return :bool Whether call was successful
+ @param use_screen The screen to use
+ @param display:str? The display to use, `None` for the current
+ @return :bool Whether call was successful
'''
global vidmode_gamma_size
- vidmode_gamma_size = blueshift_vidmode_open(use_screen)
+ cdef char* display_ = NULL
+ if display is not None:
+ display_ = display
+ vidmode_gamma_size = blueshift_vidmode_open(use_screen, display_)
return vidmode_gamma_size > 1