コード例 #1
0
ファイル: xf86dri.py プロジェクト: samurai-x/samurai-x
                                 GetDeviceInfoReply)

    def GetDeviceInfoUnchecked(self, screen):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2xI', screen))
        return self.send_request(xcb.Request(buf.getvalue(), 10, False, False),
                                 GetDeviceInfoCookie(),
                                 GetDeviceInfoReply)

    def AuthConnection(self, screen, magic):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2xII', screen, magic))
        return self.send_request(xcb.Request(buf.getvalue(), 11, False, True),
                                 AuthConnectionCookie(),
                                 AuthConnectionReply)

    def AuthConnectionUnchecked(self, screen, magic):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2xII', screen, magic))
        return self.send_request(xcb.Request(buf.getvalue(), 11, False, False),
                                 AuthConnectionCookie(),
                                 AuthConnectionReply)

_events = {
}

_errors = {
}

xcb._add_ext(key, xf86driExtension, _events, _errors)
コード例 #2
0
ファイル: xselinux.py プロジェクト: aosm/X11libs
                                 ListSelectionsReply)

    def ListSelectionsUnchecked(self, ):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2x', ))
        return self.send_request(xcb.Request(buf.getvalue(), 21, False, False),
                                 ListSelectionsCookie(),
                                 ListSelectionsReply)

    def GetClientContext(self, resource):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2xI', resource))
        return self.send_request(xcb.Request(buf.getvalue(), 22, False, True),
                                 GetClientContextCookie(),
                                 GetClientContextReply)

    def GetClientContextUnchecked(self, resource):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2xI', resource))
        return self.send_request(xcb.Request(buf.getvalue(), 22, False, False),
                                 GetClientContextCookie(),
                                 GetClientContextReply)

_events = {
}

_errors = {
}

xcb._add_ext(key, xselinuxExtension, _events, _errors)
コード例 #3
0
ファイル: sync.py プロジェクト: hhismans/fdf
        buf.write(pack('=xx2xI', fence))
        return self.send_request(xcb.Request(buf.getvalue(), 18, False, False),
                                 QueryFenceCookie(),
                                 QueryFenceReply)

    def AwaitFenceChecked(self, fence_list_len, fence_list):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2x', ))
        buf.write(str(buffer(array('I', fence_list))))
        return self.send_request(xcb.Request(buf.getvalue(), 19, True, True),
                                 xcb.VoidCookie())

    def AwaitFence(self, fence_list_len, fence_list):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2x', ))
        buf.write(str(buffer(array('I', fence_list))))
        return self.send_request(xcb.Request(buf.getvalue(), 19, True, False),
                                 xcb.VoidCookie())

_events = {
    0 : CounterNotifyEvent,
    1 : AlarmNotifyEvent,
}

_errors = {
    0 : (CounterError, BadCounter),
    1 : (AlarmError, BadAlarm),
}

xcb._add_ext(key, syncExtension, _events, _errors)
コード例 #4
0
ファイル: record.py プロジェクト: aosm/X11libs
        buf.write(pack('xx2xI', context))
        return self.send_request(xcb.Request(buf.getvalue(), 6, True, True),
                                 xcb.VoidCookie())

    def DisableContext(self, context):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2xI', context))
        return self.send_request(xcb.Request(buf.getvalue(), 6, True, False),
                                 xcb.VoidCookie())

    def FreeContextChecked(self, context):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2xI', context))
        return self.send_request(xcb.Request(buf.getvalue(), 7, True, True),
                                 xcb.VoidCookie())

    def FreeContext(self, context):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2xI', context))
        return self.send_request(xcb.Request(buf.getvalue(), 7, True, False),
                                 xcb.VoidCookie())

_events = {
}

_errors = {
    0 : (ContextError, BadContext),
}

xcb._add_ext(key, recordExtension, _events, _errors)
コード例 #5
0
ファイル: screensaver.py プロジェクト: samurai-x/samurai-x
        buf.write(pack('xx2xI', drawable))
        return self.send_request(xcb.Request(buf.getvalue(), 4, True, True),
                                 xcb.VoidCookie())

    def UnsetAttributes(self, drawable):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2xI', drawable))
        return self.send_request(xcb.Request(buf.getvalue(), 4, True, False),
                                 xcb.VoidCookie())

    def SuspendChecked(self, suspend):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2xB3x', suspend))
        return self.send_request(xcb.Request(buf.getvalue(), 5, True, True),
                                 xcb.VoidCookie())

    def Suspend(self, suspend):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2xB3x', suspend))
        return self.send_request(xcb.Request(buf.getvalue(), 5, True, False),
                                 xcb.VoidCookie())

_events = {
    0 : NotifyEvent,
}

_errors = {
}

xcb._add_ext(key, screensaverExtension, _events, _errors)
コード例 #6
0
ファイル: dpms.py プロジェクト: aosm/X11libs
        return self.send_request(xcb.Request(buf.getvalue(), 6, True, True),
                                 xcb.VoidCookie())

    def ForceLevel(self, power_level):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2xH', power_level))
        return self.send_request(xcb.Request(buf.getvalue(), 6, True, False),
                                 xcb.VoidCookie())

    def Info(self, ):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2x', ))
        return self.send_request(xcb.Request(buf.getvalue(), 7, False, True),
                                 InfoCookie(),
                                 InfoReply)

    def InfoUnchecked(self, ):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2x', ))
        return self.send_request(xcb.Request(buf.getvalue(), 7, False, False),
                                 InfoCookie(),
                                 InfoReply)

_events = {
}

_errors = {
}

xcb._add_ext(key, dpmsExtension, _events, _errors)
コード例 #7
0
class EnableCookie(xcb.Cookie):
    pass


class EnableReply(xcb.Reply):
    def __init__(self, parent, offset=0):
        xcb.Reply.__init__(self, parent, offset)
        (self.maximum_request_length, ) = unpack_from('xx2x4xI', parent,
                                                      offset)


class bigreqExtension(xcb.Extension):
    def Enable(self, ):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2x', ))
        return self.send_request(xcb.Request(buf.getvalue(), 0, False, True),
                                 EnableCookie(), EnableReply)

    def EnableUnchecked(self, ):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2x', ))
        return self.send_request(xcb.Request(buf.getvalue(), 0, False, False),
                                 EnableCookie(), EnableReply)


_events = {}

_errors = {}

xcb._add_ext(key, bigreqExtension, _events, _errors)
コード例 #8
0
    def ForceLevelChecked(self, power_level):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xH', power_level))
        return self.send_request(xcb.Request(buf.getvalue(), 6, True, True),
                                 xcb.VoidCookie())

    def ForceLevel(self, power_level):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xH', power_level))
        return self.send_request(xcb.Request(buf.getvalue(), 6, True, False),
                                 xcb.VoidCookie())

    def Info(self, ):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2x', ))
        return self.send_request(xcb.Request(buf.getvalue(), 7, False, True),
                                 InfoCookie(), InfoReply)

    def InfoUnchecked(self, ):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2x', ))
        return self.send_request(xcb.Request(buf.getvalue(), 7, False, False),
                                 InfoCookie(), InfoReply)


_events = {}

_errors = {}

xcb._add_ext(key, dpmsExtension, _events, _errors)
コード例 #9
0
ファイル: composite.py プロジェクト: JacksonKearl/Graphical
        return self.send_request(xcb.Request(buf.getvalue(), 7, False, True),
                                 GetOverlayWindowCookie(),
                                 GetOverlayWindowReply)

    def GetOverlayWindowUnchecked(self, window):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xI', window))
        return self.send_request(xcb.Request(buf.getvalue(), 7, False, False),
                                 GetOverlayWindowCookie(),
                                 GetOverlayWindowReply)

    def ReleaseOverlayWindowChecked(self, window):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xI', window))
        return self.send_request(xcb.Request(buf.getvalue(), 8, True, True),
                                 xcb.VoidCookie())

    def ReleaseOverlayWindow(self, window):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xI', window))
        return self.send_request(xcb.Request(buf.getvalue(), 8, True, False),
                                 xcb.VoidCookie())

_events = {
}

_errors = {
}

xcb._add_ext(key, compositeExtension, _events, _errors)
コード例 #10
0
                                 GetXIDRangeReply)

    def GetXIDRangeUnchecked(self, ):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2x', ))
        return self.send_request(xcb.Request(buf.getvalue(), 1, False, False),
                                 GetXIDRangeCookie(),
                                 GetXIDRangeReply)

    def GetXIDList(self, count):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xI', count))
        return self.send_request(xcb.Request(buf.getvalue(), 2, False, True),
                                 GetXIDListCookie(),
                                 GetXIDListReply)

    def GetXIDListUnchecked(self, count):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xI', count))
        return self.send_request(xcb.Request(buf.getvalue(), 2, False, False),
                                 GetXIDListCookie(),
                                 GetXIDListReply)

_events = {
}

_errors = {
}

xcb._add_ext(key, xc_miscExtension, _events, _errors)
コード例 #11
0
ファイル: xf86dri.py プロジェクト: RockyLiys/app_tools
                                 GetDeviceInfoReply)

    def GetDeviceInfoUnchecked(self, screen):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xI', screen))
        return self.send_request(xcb.Request(buf.getvalue(), 10, False, False),
                                 GetDeviceInfoCookie(),
                                 GetDeviceInfoReply)

    def AuthConnection(self, screen, magic):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xII', screen, magic))
        return self.send_request(xcb.Request(buf.getvalue(), 11, False, True),
                                 AuthConnectionCookie(),
                                 AuthConnectionReply)

    def AuthConnectionUnchecked(self, screen, magic):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xII', screen, magic))
        return self.send_request(xcb.Request(buf.getvalue(), 11, False, False),
                                 AuthConnectionCookie(),
                                 AuthConnectionReply)

_events = {
}

_errors = {
}

xcb._add_ext(key, xf86driExtension, _events, _errors)
コード例 #12
0
        buf.write(pack('=xx2xI', context))
        return self.send_request(xcb.Request(buf.getvalue(), 6, True, True),
                                 xcb.VoidCookie())

    def DisableContext(self, context):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xI', context))
        return self.send_request(xcb.Request(buf.getvalue(), 6, True, False),
                                 xcb.VoidCookie())

    def FreeContextChecked(self, context):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xI', context))
        return self.send_request(xcb.Request(buf.getvalue(), 7, True, True),
                                 xcb.VoidCookie())

    def FreeContext(self, context):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xI', context))
        return self.send_request(xcb.Request(buf.getvalue(), 7, True, False),
                                 xcb.VoidCookie())

_events = {
}

_errors = {
    0 : (ContextError, BadContext),
}

xcb._add_ext(key, recordExtension, _events, _errors)
コード例 #13
0
ファイル: screensaver.py プロジェクト: RockyLiys/app_tools
        buf.write(pack('=xx2xI', drawable))
        return self.send_request(xcb.Request(buf.getvalue(), 4, True, True),
                                 xcb.VoidCookie())

    def UnsetAttributes(self, drawable):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xI', drawable))
        return self.send_request(xcb.Request(buf.getvalue(), 4, True, False),
                                 xcb.VoidCookie())

    def SuspendChecked(self, suspend):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xB3x', suspend))
        return self.send_request(xcb.Request(buf.getvalue(), 5, True, True),
                                 xcb.VoidCookie())

    def Suspend(self, suspend):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xB3x', suspend))
        return self.send_request(xcb.Request(buf.getvalue(), 5, True, False),
                                 xcb.VoidCookie())

_events = {
    0 : NotifyEvent,
}

_errors = {
}

xcb._add_ext(key, screensaverExtension, _events, _errors)
コード例 #14
0
ファイル: randr.py プロジェクト: samurai-x/samurai-x
    def SetCrtcGammaChecked(self, crtc, size, red, green, blue):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2xIH2x', crtc, size))
        buf.write(str(buffer(array('H', red))))
        buf.write(str(buffer(array('H', green))))
        buf.write(str(buffer(array('H', blue))))
        return self.send_request(xcb.Request(buf.getvalue(), 24, True, True),
                                 xcb.VoidCookie())

    def SetCrtcGamma(self, crtc, size, red, green, blue):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2xIH2x', crtc, size))
        buf.write(str(buffer(array('H', red))))
        buf.write(str(buffer(array('H', green))))
        buf.write(str(buffer(array('H', blue))))
        return self.send_request(xcb.Request(buf.getvalue(), 24, True, False),
                                 xcb.VoidCookie())

_events = {
    0 : ScreenChangeNotifyEvent,
    1 : NotifyEvent,
}

_errors = {
    0 : (OutputError, BadOutput),
    1 : (CrtcError, BadCrtc),
    2 : (ModeError, BadMode),
}

xcb._add_ext(key, randrExtension, _events, _errors)
コード例 #15
0
ファイル: render.py プロジェクト: aosm/X11libs
        buf.write(str(buffer(array('i', stops))))
        for elt in xcb.Iterator(colors, 4, 'colors', True):
            buf.write(pack('HHHH', *elt))
        return self.send_request(xcb.Request(buf.getvalue(), 36, True, True),
                                 xcb.VoidCookie())

    def CreateConicalGradient(self, picture, center, angle, num_stops, stops, colors):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2xI', picture))
        for elt in xcb.Iterator(center, 2, 'center', False):
            buf.write(pack('ii', *elt))
        buf.write(pack('iI', angle, num_stops))
        buf.write(str(buffer(array('i', stops))))
        for elt in xcb.Iterator(colors, 4, 'colors', True):
            buf.write(pack('HHHH', *elt))
        return self.send_request(xcb.Request(buf.getvalue(), 36, True, False),
                                 xcb.VoidCookie())

_events = {
}

_errors = {
    0 : (PictFormatError, BadPictFormat),
    1 : (PictureError, BadPicture),
    2 : (PictOpError, BadPictOp),
    3 : (GlyphSetError, BadGlyphSet),
    4 : (GlyphError, BadGlyph),
}

xcb._add_ext(key, renderExtension, _events, _errors)
コード例 #16
0
ファイル: xc_misc.py プロジェクト: samurai-x/samurai-x
                                 GetXIDRangeReply)

    def GetXIDRangeUnchecked(self, ):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2x', ))
        return self.send_request(xcb.Request(buf.getvalue(), 1, False, False),
                                 GetXIDRangeCookie(),
                                 GetXIDRangeReply)

    def GetXIDList(self, count):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2xI', count))
        return self.send_request(xcb.Request(buf.getvalue(), 2, False, True),
                                 GetXIDListCookie(),
                                 GetXIDListReply)

    def GetXIDListUnchecked(self, count):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2xI', count))
        return self.send_request(xcb.Request(buf.getvalue(), 2, False, False),
                                 GetXIDListCookie(),
                                 GetXIDListReply)

_events = {
}

_errors = {
}

xcb._add_ext(key, xc_miscExtension, _events, _errors)
コード例 #17
0
                                 xcb.VoidCookie())

    def Subtract(self, damage, repair, parts):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xIII', damage, repair, parts))
        return self.send_request(xcb.Request(buf.getvalue(), 3, True, False),
                                 xcb.VoidCookie())

    def AddChecked(self, drawable, region):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xII', drawable, region))
        return self.send_request(xcb.Request(buf.getvalue(), 4, True, True),
                                 xcb.VoidCookie())

    def Add(self, drawable, region):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xII', drawable, region))
        return self.send_request(xcb.Request(buf.getvalue(), 4, True, False),
                                 xcb.VoidCookie())


_events = {
    0: NotifyEvent,
}

_errors = {
    0: (DamageError, BadDamage),
}

xcb._add_ext(key, damageExtension, _events, _errors)
コード例 #18
0
ファイル: bigreq.py プロジェクト: aosm/X11libs
class EnableReply(xcb.Reply):
    def __init__(self, parent):
        xcb.Reply.__init__(self, parent)
        count = 0
        (self.maximum_request_length,) = unpack_from('xx2x4xI', self, count)

class bigreqExtension(xcb.Extension):

    def Enable(self, ):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2x', ))
        return self.send_request(xcb.Request(buf.getvalue(), 0, False, True),
                                 EnableCookie(),
                                 EnableReply)

    def EnableUnchecked(self, ):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2x', ))
        return self.send_request(xcb.Request(buf.getvalue(), 0, False, False),
                                 EnableCookie(),
                                 EnableReply)

_events = {
}

_errors = {
}

xcb._add_ext(key, bigreqExtension, _events, _errors)
コード例 #19
0
ファイル: xevie.py プロジェクト: RockyLiys/app_tools
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2x', ))
        for elt in xcb.Iterator(event, 0, 'event', False):
            buf.write(pack('=32x', *elt))
        buf.write(pack('=I64x', data_type))
        return self.send_request(xcb.Request(buf.getvalue(), 3, False, False),
                                 SendCookie(),
                                 SendReply)

    def SelectInput(self, event_mask):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xI', event_mask))
        return self.send_request(xcb.Request(buf.getvalue(), 4, False, True),
                                 SelectInputCookie(),
                                 SelectInputReply)

    def SelectInputUnchecked(self, event_mask):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xI', event_mask))
        return self.send_request(xcb.Request(buf.getvalue(), 4, False, False),
                                 SelectInputCookie(),
                                 SelectInputReply)

_events = {
}

_errors = {
}

xcb._add_ext(key, xevieExtension, _events, _errors)
コード例 #20
0
ファイル: xfixes.py プロジェクト: RockyLiys/app_tools
    def CreatePointerBarrier(self, barrier, window, x1, y1, x2, y2, directions, num_devices, devices):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xIIHHHHI2xH', barrier, window, x1, y1, x2, y2, directions, num_devices))
        buf.write(str(buffer(array('H', devices))))
        return self.send_request(xcb.Request(buf.getvalue(), 31, True, False),
                                 xcb.VoidCookie())

    def DeletePointerBarrierChecked(self, barrier):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xI', barrier))
        return self.send_request(xcb.Request(buf.getvalue(), 32, True, True),
                                 xcb.VoidCookie())

    def DeletePointerBarrier(self, barrier):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xI', barrier))
        return self.send_request(xcb.Request(buf.getvalue(), 32, True, False),
                                 xcb.VoidCookie())

_events = {
    0 : SelectionNotifyEvent,
    1 : CursorNotifyEvent,
}

_errors = {
    0 : (RegionError, BadRegion),
}

xcb._add_ext(key, xfixesExtension, _events, _errors)
コード例 #21
0
        buf.write(pack('=xx2xI', window))
        return self.send_request(xcb.Request(buf.getvalue(), 7, False, True),
                                 GetOverlayWindowCookie(),
                                 GetOverlayWindowReply)

    def GetOverlayWindowUnchecked(self, window):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xI', window))
        return self.send_request(xcb.Request(buf.getvalue(), 7, False, False),
                                 GetOverlayWindowCookie(),
                                 GetOverlayWindowReply)

    def ReleaseOverlayWindowChecked(self, window):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xI', window))
        return self.send_request(xcb.Request(buf.getvalue(), 8, True, True),
                                 xcb.VoidCookie())

    def ReleaseOverlayWindow(self, window):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xI', window))
        return self.send_request(xcb.Request(buf.getvalue(), 8, True, False),
                                 xcb.VoidCookie())


_events = {}

_errors = {}

xcb._add_ext(key, compositeExtension, _events, _errors)
コード例 #22
0
                 deviceid))
        return self.send_request(xcb.Request(buf.getvalue(), 2, True, True),
                                 xcb.VoidCookie())

    def FakeInput(self, type, detail, time, root, rootX, rootY, deviceid):
        buf = cStringIO.StringIO()
        buf.write(
            pack('=xx2xBB2xII8xhh7xB', type, detail, time, root, rootX, rootY,
                 deviceid))
        return self.send_request(xcb.Request(buf.getvalue(), 2, True, False),
                                 xcb.VoidCookie())

    def GrabControlChecked(self, impervious):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xB3x', impervious))
        return self.send_request(xcb.Request(buf.getvalue(), 3, True, True),
                                 xcb.VoidCookie())

    def GrabControl(self, impervious):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xB3x', impervious))
        return self.send_request(xcb.Request(buf.getvalue(), 3, True, False),
                                 xcb.VoidCookie())


_events = {}

_errors = {}

xcb._add_ext(key, xtestExtension, _events, _errors)
コード例 #23
0
ファイル: xinerama.py プロジェクト: aosm/X11libs
                                 IsActiveReply)

    def IsActiveUnchecked(self, ):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2x', ))
        return self.send_request(xcb.Request(buf.getvalue(), 4, False, False),
                                 IsActiveCookie(),
                                 IsActiveReply)

    def QueryScreens(self, ):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2x', ))
        return self.send_request(xcb.Request(buf.getvalue(), 5, False, True),
                                 QueryScreensCookie(),
                                 QueryScreensReply)

    def QueryScreensUnchecked(self, ):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2x', ))
        return self.send_request(xcb.Request(buf.getvalue(), 5, False, False),
                                 QueryScreensCookie(),
                                 QueryScreensReply)

_events = {
}

_errors = {
}

xcb._add_ext(key, xineramaExtension, _events, _errors)
コード例 #24
0
ファイル: xtest.py プロジェクト: hhismans/fdf
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xBB2xII8xhh7xB', type, detail, time, root, rootX, rootY, deviceid))
        return self.send_request(xcb.Request(buf.getvalue(), 2, True, True),
                                 xcb.VoidCookie())

    def FakeInput(self, type, detail, time, root, rootX, rootY, deviceid):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xBB2xII8xhh7xB', type, detail, time, root, rootX, rootY, deviceid))
        return self.send_request(xcb.Request(buf.getvalue(), 2, True, False),
                                 xcb.VoidCookie())

    def GrabControlChecked(self, impervious):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xB3x', impervious))
        return self.send_request(xcb.Request(buf.getvalue(), 3, True, True),
                                 xcb.VoidCookie())

    def GrabControl(self, impervious):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xB3x', impervious))
        return self.send_request(xcb.Request(buf.getvalue(), 3, True, False),
                                 xcb.VoidCookie())

_events = {
}

_errors = {
}

xcb._add_ext(key, xtestExtension, _events, _errors)
コード例 #25
0
ファイル: shm.py プロジェクト: RockyLiys/app_tools
    def AttachFd(self, shmseg, shm_fd, read_only):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xIB3x', shmseg, read_only))
        return self.send_request(xcb.Request(buf.getvalue(), 6, True, False),
                                 xcb.VoidCookie())

    def CreateSegment(self, shmseg, size, read_only):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xIIB3x', shmseg, size, read_only))
        return self.send_request(xcb.Request(buf.getvalue(), 7, False, True),
                                 CreateSegmentCookie(),
                                 CreateSegmentReply)

    def CreateSegmentUnchecked(self, shmseg, size, read_only):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xIIB3x', shmseg, size, read_only))
        return self.send_request(xcb.Request(buf.getvalue(), 7, False, False),
                                 CreateSegmentCookie(),
                                 CreateSegmentReply)

_events = {
    0 : CompletionEvent,
}

_errors = {
    0 : (SegError, BadSeg),
}

xcb._add_ext(key, shmExtension, _events, _errors)
コード例 #26
0
ファイル: damage.py プロジェクト: aosm/X11libs
        return self.send_request(xcb.Request(buf.getvalue(), 3, True, True),
                                 xcb.VoidCookie())

    def Subtract(self, damage, repair, parts):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2xIII', damage, repair, parts))
        return self.send_request(xcb.Request(buf.getvalue(), 3, True, False),
                                 xcb.VoidCookie())

    def AddChecked(self, drawable, region):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2xII', drawable, region))
        return self.send_request(xcb.Request(buf.getvalue(), 4, True, True),
                                 xcb.VoidCookie())

    def Add(self, drawable, region):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2xII', drawable, region))
        return self.send_request(xcb.Request(buf.getvalue(), 4, True, False),
                                 xcb.VoidCookie())

_events = {
    0 : NotifyEvent,
}

_errors = {
    0 : (DamageError, BadDamage),
}

xcb._add_ext(key, damageExtension, _events, _errors)
コード例 #27
0
ファイル: render.py プロジェクト: RockyLiys/app_tools
        for elt in xcb.Iterator(colors, 4, 'colors', True):
            buf.write(pack('=HHHH', *elt))
        return self.send_request(xcb.Request(buf.getvalue(), 36, True, True),
                                 xcb.VoidCookie())

    def CreateConicalGradient(self, picture, center, angle, num_stops, stops,
                              colors):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2xI', picture))
        for elt in xcb.Iterator(center, 2, 'center', False):
            buf.write(pack('=ii', *elt))
        buf.write(pack('=iI', angle, num_stops))
        buf.write(str(buffer(array('i', stops))))
        for elt in xcb.Iterator(colors, 4, 'colors', True):
            buf.write(pack('=HHHH', *elt))
        return self.send_request(xcb.Request(buf.getvalue(), 36, True, False),
                                 xcb.VoidCookie())


_events = {}

_errors = {
    0: (PictFormatError, BadPictFormat),
    1: (PictureError, BadPicture),
    2: (PictOpError, BadPictOp),
    3: (GlyphSetError, BadGlyphSet),
    4: (GlyphError, BadGlyph),
}

xcb._add_ext(key, renderExtension, _events, _errors)
コード例 #28
0
ファイル: shape.py プロジェクト: aosm/X11libs
    def InputSelectedUnchecked(self, destination_window):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2xI', destination_window))
        return self.send_request(xcb.Request(buf.getvalue(), 7, False, False),
                                 InputSelectedCookie(),
                                 InputSelectedReply)

    def GetRectangles(self, window, source_kind):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2xIB3x', window, source_kind))
        return self.send_request(xcb.Request(buf.getvalue(), 8, False, True),
                                 GetRectanglesCookie(),
                                 GetRectanglesReply)

    def GetRectanglesUnchecked(self, window, source_kind):
        buf = cStringIO.StringIO()
        buf.write(pack('xx2xIB3x', window, source_kind))
        return self.send_request(xcb.Request(buf.getvalue(), 8, False, False),
                                 GetRectanglesCookie(),
                                 GetRectanglesReply)

_events = {
    0 : NotifyEvent,
}

_errors = {
}

xcb._add_ext(key, shapeExtension, _events, _errors)
コード例 #29
0
ファイル: xinerama.py プロジェクト: RockyLiys/app_tools
    def IsActive(self, ):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2x', ))
        return self.send_request(xcb.Request(buf.getvalue(), 4, False, True),
                                 IsActiveCookie(), IsActiveReply)

    def IsActiveUnchecked(self, ):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2x', ))
        return self.send_request(xcb.Request(buf.getvalue(), 4, False, False),
                                 IsActiveCookie(), IsActiveReply)

    def QueryScreens(self, ):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2x', ))
        return self.send_request(xcb.Request(buf.getvalue(), 5, False, True),
                                 QueryScreensCookie(), QueryScreensReply)

    def QueryScreensUnchecked(self, ):
        buf = cStringIO.StringIO()
        buf.write(pack('=xx2x', ))
        return self.send_request(xcb.Request(buf.getvalue(), 5, False, False),
                                 QueryScreensCookie(), QueryScreensReply)


_events = {}

_errors = {}

xcb._add_ext(key, xineramaExtension, _events, _errors)