# PySoy Core Declarations (for X11-based systems) # # Copyright (C) 2006,2007,2008 PySoy Group # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program; if not, see http://www.gnu.org/licenses # # $Id$ cimport gl cimport glib cimport ode cimport ogg cimport py cimport stdio cimport soy._internals cimport soy.colors IF UNAME_SYSNAME == "Windows" : cimport windows ELIF UNAME_SYSNAME == "Darwin" : cimport carbon ELSE: cimport glx cdef class Screen : cdef int _screenID cdef object _fullScreen cdef void _events(self) # OpenGL Support cdef int _glVersion cdef void _coreGlewInit(self) IF UNAME_SYSNAME != "Windows" : # X11 Support cdef glx.Screen *_screen cdef glx.Atom _wmDelWin cdef glx.XF86VidModeModeInfo _deskMode cdef glx.XVisualInfo *_xVisualInfo cdef class Window : cdef soy._internals.Children _controllers cdef soy._internals.Children _widgets cdef Screen _screen cdef object _title cdef soy.colors.Color _background cdef int _x cdef int _y cdef int _width cdef int _height cdef int _savedWidth cdef int _savedHeight cdef int _opened cdef int _splash IF UNAME_SYSNAME == "Windows" : cdef int _windowID cdef object _icon cdef int _request cdef windows.HGLRC _glRenderContext cdef windows.HDC _deviceContext cdef windows.HWND _window cdef windows.HINSTANCE _hInst cdef void _set_title(self) cdef void _request_create(self, int, int, int, int) cdef void _request_destroy(self) cdef void _registerClass(self) cdef void _unregisterClass(self) cdef int _minimized ELSE : # X11/GLX platform cdef glx.Window _windowID cdef glx.Pixmap _iconPixmap cdef object _iconCanvas cdef void _openedWait ( self, int ) cdef void _setProperties ( self ) cdef void _coreEventKeyDown ( self, glx.Time, glx.KeyCode, glx.KeySym ) cdef void _coreEventKeyUp ( self, glx.Time, glx.KeyCode, glx.KeySym ) cdef void _coreEventButtonDown ( self, glx.Time, unsigned int, int, int ) cdef void _coreEventButtonUp ( self, glx.Time, unsigned int, int, int ) cdef void _coreEventMotion ( self, glx.Time, int, int ) cdef void _coreEventWinClose ( self ) cdef void _coreEventConfigure ( self, int, int, int, int ) cdef void _coreEventCreate ( self ) cdef void _coreEventDestroy ( self ) cdef void _coreEventMap ( self ) cdef void _coreEventUnmap ( self ) cdef void _coreCreate ( self ) cdef void _create(self, int, int, int, int) cdef void _destroy(self) cdef void _resize(self, int _width, int _height) cdef void _render(self)