1# ---------------------------------------------------------------------------- 2# pyglet 3# Copyright (c) 2006-2008 Alex Holkner 4# Copyright (c) 2008-2021 pyglet contributors 5# All rights reserved. 6# 7# Redistribution and use in source and binary forms, with or without 8# modification, are permitted provided that the following conditions 9# are met: 10# 11# * Redistributions of source code must retain the above copyright 12# notice, this list of conditions and the following disclaimer. 13# * Redistributions in binary form must reproduce the above copyright 14# notice, this list of conditions and the following disclaimer in 15# the documentation and/or other materials provided with the 16# distribution. 17# * Neither the name of pyglet nor the names of its 18# contributors may be used to endorse or promote products 19# derived from this software without specific prior written 20# permission. 21# 22# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 25# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 26# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 27# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 28# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 32# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 33# POSSIBILITY OF SUCH DAMAGE. 34# ---------------------------------------------------------------------------- 35"""Wrapper for Xinerama 36 37Generated with: 38tools/genwrappers.py xinerama 39 40Do not modify this file. 41""" 42 43import ctypes 44from ctypes import * 45 46import pyglet.lib 47 48_lib = pyglet.lib.load_library('Xinerama') 49 50_int_types = (c_int16, c_int32) 51if hasattr(ctypes, 'c_int64'): 52 # Some builds of ctypes apparently do not have c_int64 53 # defined; it's a pretty good bet that these builds do not 54 # have 64-bit pointers. 55 _int_types += (ctypes.c_int64,) 56for t in _int_types: 57 if sizeof(t) == sizeof(c_size_t): 58 c_ptrdiff_t = t 59 60class c_void(Structure): 61 # c_void_p is a buggy return type, converting to int, so 62 # POINTER(None) == c_void_p is actually written as 63 # POINTER(c_void), so it can be treated as a real pointer. 64 _fields_ = [('dummy', c_int)] 65 66 67import pyglet.libs.x11.xlib 68 69class struct_anon_93(Structure): 70 __slots__ = [ 71 'screen_number', 72 'x_org', 73 'y_org', 74 'width', 75 'height', 76 ] 77struct_anon_93._fields_ = [ 78 ('screen_number', c_int), 79 ('x_org', c_short), 80 ('y_org', c_short), 81 ('width', c_short), 82 ('height', c_short), 83] 84 85XineramaScreenInfo = struct_anon_93 # /usr/include/X11/extensions/Xinerama.h:40 86Display = pyglet.libs.x11.xlib.Display 87# /usr/include/X11/extensions/Xinerama.h:44 88XineramaQueryExtension = _lib.XineramaQueryExtension 89XineramaQueryExtension.restype = c_int 90XineramaQueryExtension.argtypes = [POINTER(Display), POINTER(c_int), POINTER(c_int)] 91 92# /usr/include/X11/extensions/Xinerama.h:50 93XineramaQueryVersion = _lib.XineramaQueryVersion 94XineramaQueryVersion.restype = c_int 95XineramaQueryVersion.argtypes = [POINTER(Display), POINTER(c_int), POINTER(c_int)] 96 97# /usr/include/X11/extensions/Xinerama.h:56 98XineramaIsActive = _lib.XineramaIsActive 99XineramaIsActive.restype = c_int 100XineramaIsActive.argtypes = [POINTER(Display)] 101 102# /usr/include/X11/extensions/Xinerama.h:67 103XineramaQueryScreens = _lib.XineramaQueryScreens 104XineramaQueryScreens.restype = POINTER(XineramaScreenInfo) 105XineramaQueryScreens.argtypes = [POINTER(Display), POINTER(c_int)] 106 107 108__all__ = ['XineramaScreenInfo', 'XineramaQueryExtension', 109'XineramaQueryVersion', 'XineramaIsActive', 'XineramaQueryScreens'] 110