示例#1
0
 def _get_buffers(self):
     bufs = (c_void_p * self._buffer_count)()
     rc = s.screen_get_window_property_pv(self.handle,
         s.SCREEN_PROPERTY_RENDER_BUFFERS, cast(bufs, POINTER(c_void_p)))
     if rc < 0:
         raise WindowError('get buffers failed')
     return bufs
示例#2
0
 def _get_buffers(self):
     bufs = (c_void_p * self._buffer_count)()
     rc = s.screen_get_window_property_pv(self.handle,
                                          s.SCREEN_PROPERTY_RENDER_BUFFERS,
                                          cast(bufs, POINTER(c_void_p)))
     if rc < 0:
         raise WindowError('get buffers failed')
     return bufs
示例#3
0
    def display(self):
        '''Retrieve this window's display, caching the result.'''
        try:
            return self._display
        except AttributeError:
            disp = s.screen_display_t()
            rc = s.screen_get_window_property_pv(self.handle, s.SCREEN_PROPERTY_DISPLAY,
                cast(byref(disp), POINTER(c_void_p)))
            if rc < 0:
                raise WindowError('get property failed')
            # print('display', disp)

            from .display import Display
            self._display = Display(disp)
            return self._display
示例#4
0
    def display(self):
        '''Retrieve this window's display, caching the result.'''
        try:
            return self._display
        except AttributeError:
            disp = s.screen_display_t()
            rc = s.screen_get_window_property_pv(
                self.handle, s.SCREEN_PROPERTY_DISPLAY,
                cast(byref(disp), POINTER(c_void_p)))
            if rc < 0:
                raise WindowError('get property failed')
            # print('display', disp)

            from .display import Display
            self._display = Display(disp)
            return self._display