From f24b1e38904f1baf351502bfa630b3b9d7d2e2f1 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 3 Apr 2014 00:10:43 +0200 Subject: add multi-display support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/blueshift_randr.pyx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/blueshift_randr.pyx') 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): -- cgit v1.2.3-70-g09d2