Author: ArcRiley
Date: 2008-02-11 06:24:05 -0500 (Mon, 11 Feb 2008)
New Revision: 861
Modified:
trunk/pysoy/include/glx.pxd
trunk/pysoy/src/_core/Screen-w32.pxi
trunk/pysoy/src/_core/Screen-x11.pxi
trunk/pysoy/src/_core/Window-w32.pxi
trunk/pysoy/src/_core/Window-x11.pxi
trunk/pysoy/src/_core/soy._core.pxd
trunk/pysoy/src/controllers/Controller.pxi
trunk/pysoy/src/controllers/Keyboard.pxi
trunk/pysoy/src/controllers/Keyboard2.pxi
trunk/pysoy/src/controllers/Window.pxi
trunk/pysoy/src/controllers/soy.controllers.pxd
Log:
Further work on #902 and cleaning up window opening/closing on X11
Modified: trunk/pysoy/include/glx.pxd
===================================================================
--- trunk/pysoy/include/glx.pxd 2008-02-11 07:16:30 UTC (rev 860)
+++ trunk/pysoy/include/glx.pxd 2008-02-11 11:24:05 UTC (rev 861)
@@ -462,6 +462,20 @@
int count
+ ctypedef struct XCreateWindowEvent :
+ int type
+ unsigned long serial
+ Bool send_event
+ Display *display
+ Window parent
+ Window window
+ int x
+ int y
+ int width
+ int height
+ Bool override_redirect
+
+
ctypedef struct XConfigureEvent :
int type
unsigned long serial
@@ -501,6 +515,7 @@
XButtonEvent xbutton
XMotionEvent xmotion
XExposeEvent xexpose
+ XCreateWindowEvent xcreatewindow
XConfigureEvent xconfigure
XClientMessageEvent xclient
@@ -566,6 +581,11 @@
cdef int XUnmapWindow ( Display*, Window )
+ cdef Window XChangeWindowAttributes( Display*, Window,
+ unsigned long,
+ XSetWindowAttributes* )
+
+
cdef extern from "X11/extensions/xf86vmode.h" :
ctypedef int INT32
Modified: trunk/pysoy/src/_core/Screen-w32.pxi
===================================================================
--- trunk/pysoy/src/_core/Screen-w32.pxi 2008-02-11 07:16:30 UTC (rev
860)
+++ trunk/pysoy/src/_core/Screen-w32.pxi 2008-02-11 11:24:05 UTC (rev
861)
@@ -116,7 +116,7 @@
else :
return 'Unknown - open a Window first'
- cdef void _glewInit(self) :
+ cdef void _coreGlewInit(self) :
gl.glewInit()
if gl.glewIsSupported("GL_VERSION_1_4") :
self._glVersion = 4
Modified: trunk/pysoy/src/_core/Screen-x11.pxi
===================================================================
--- trunk/pysoy/src/_core/Screen-x11.pxi 2008-02-11 07:16:30 UTC (rev
860)
+++ trunk/pysoy/src/_core/Screen-x11.pxi 2008-02-11 11:24:05 UTC (rev
861)
@@ -37,6 +37,7 @@
cdef int i, _modeNum
cdef int _glxAttrs[16]
cdef glx.XF86VidModeModeInfo **_modes
+ cdef glx.XSetWindowAttributes _winAttr
global _display
global _glxContext
#
@@ -83,11 +84,16 @@
self._fullScreen = None
glx.XF86VidModeGetAllModeLines(_display, self._screenID, &_modeNum,&_modes)
self._deskMode = _modes[0][0]
+ _winAttr.event_mask = glx.SubstructureNotifyMask
+ glx.XChangeWindowAttributes(_display,
+ glx.RootWindowOfScreen(self._screen),
+ glx.CWEventMask, &_winAttr)
glx.XFlush(_display)
_screens.append(<void *>self)
_screens.unlock()
def __dealloc__(self) :
+ global _display
if self._screen == NULL :
if _screens.current == 0 :
# When the first attempted screen open failed
@@ -99,6 +105,7 @@
# When the last screen is closed..
glx.glXDestroyContext(_display, _glxContext)
glx.XCloseDisplay(_display)
+ _display = NULL
_screens.unlock()
def __repr__(self) :
@@ -150,7 +157,7 @@
else :
return 'Unknown - open a Window first'
- cdef void _glewInit(self) :
+ cdef void _coreGlewInit(self) :
gl.glewInit()
if gl.glewIsSupported("GL_VERSION_1_4") :
self._glVersion = 4
@@ -165,45 +172,63 @@
cdef int i
cdef glx.XEvent _event
cdef glx.KeySym _keysym
+ cdef glx.Window _target
+ if _display == NULL :
+ return
while glx.XPending(_display) > 0 :
glx.XNextEvent(_display, &_event)
+ if _event.type == glx.CreateNotify :
+ _target = _event.xcreatewindow.window
+ else :
+ _target = _event.xany.window
_windows.lock()
for i from 0 <= i < _windows.current :
- if (<Window> _windows.list[i])._windowID == _event.xany.window :
+ if (<Window> _windows.list[i])._windowID == _target :
if _event.type == glx.KeyPress :
_keysym = glx.XLookupKeysym(&_event.xkey,0)
- (<Window> _windows.list[i])._eventKeyDown (_event.xkey.time,
- _event.xkey.keycode-8,
- _keysym)
+ (<Window> _windows.list[i])._coreEventKeyDown(_event.xkey.time,
+
_event.xkey.keycode-8,
+ _keysym)
elif _event.type == glx.KeyRelease :
_keysym = glx.XLookupKeysym(&_event.xkey,0)
- (<Window> _windows.list[i])._eventKeyUp (_event.xkey.time,
- _event.xkey.keycode-8,
- _keysym)
+ (<Window> _windows.list[i])._coreEventKeyUp (_event.xkey.time,
+
_event.xkey.keycode-8,
+ _keysym)
elif _event.type == glx.ButtonPress :
- (<Window> _windows.list[i])._eventButtonDown(_event.xbutton.time,
- _event.xbutton.button,
- _event.xbutton.x,
- _event.xbutton.y)
+ (<Window> _windows.list[i])._coreEventButtonDown(
+ _event.xbutton.time,
+
_event.xbutton.button,
+ _event.xbutton.x,
+ _event.xbutton.y)
elif _event.type == glx.ButtonRelease :
- (<Window> _windows.list[i])._eventButtonUp (_event.xbutton.time,
+ (<Window> _windows.list[i])._coreEventButtonUp(
+ _event.xbutton.time,
_event.xbutton.button,
_event.xbutton.x,
_event.xbutton.y)
elif _event.type == glx.MotionNotify :
- (<Window> _windows.list[i])._eventMotion (_event.xmotion.time,
- _event.xmotion.x,
- _event.xmotion.y)
+ (<Window> _windows.list[i])._coreEventMotion (_event.xmotion.time,
+ _event.xmotion.x,
+ _event.xmotion.y)
elif _event.type == glx.Expose :
if (<Window> _windows.list[i])._opened == -1 :
(<Window> _windows.list[i])._opened = 0
elif _event.type == glx.ConfigureNotify :
- (<Window> _windows.list[i])._resize(_event.xconfigure.width,
- _event.xconfigure.height)
+ (<Window> _windows.list[i])._coreEventConfigure(
+ _event.xconfigure.x, _event.xconfigure.y,
+ _event.xconfigure.width, _event.xconfigure.height)
+ elif _event.type == glx.CreateNotify :
+ (<Window> _windows.list[i])._coreEventCreate()
+ elif _event.type == glx.DestroyNotify :
+ (<Window> _windows.list[i])._coreEventDestroy()
+ elif _event.type == glx.MapNotify :
+ (<Window> _windows.list[i])._coreEventMap()
+ elif _event.type == glx.UnmapNotify :
+ (<Window> _windows.list[i])._coreEventUnmap()
elif _event.type == glx.ClientMessage :
if _event.xclient.format == 32 and \
_event.xclient.data.l[0] == self._wmDelWin :
- (<Window> _windows.list[i])._eventWinClose()
+ (<Window> _windows.list[i])._coreEventWinClose()
break
_windows.unlock()
Modified: trunk/pysoy/src/_core/Window-w32.pxi
===================================================================
--- trunk/pysoy/src/_core/Window-w32.pxi 2008-02-11 07:16:30 UTC (rev
860)
+++ trunk/pysoy/src/_core/Window-w32.pxi 2008-02-11 11:24:05 UTC (rev
861)
@@ -186,7 +186,7 @@
windows.wglMakeCurrent(self._deviceContext, self._glRenderContext)
if self._screen._glVersion == 0 :
- self._screen._glewInit()
+ self._screen._coreGlewInit()
gl.glViewport(0, 0, self._width, self._height)
gl.glClearColor(self._background._r, self._background._g,
self._background._b, 0.0)
Modified: trunk/pysoy/src/_core/Window-x11.pxi
===================================================================
--- trunk/pysoy/src/_core/Window-x11.pxi 2008-02-11 07:16:30 UTC (rev
860)
+++ trunk/pysoy/src/_core/Window-x11.pxi 2008-02-11 11:24:05 UTC (rev
861)
@@ -20,6 +20,17 @@
cdef soy._internals.Children _windows
_windows = soy._internals.Children()
+# Window._opened states:
+DEF OpReadyCreate = 0
+DEF OpReadyMap = 1
+DEF OpWaitMap = 2
+DEF OpReadyRender = 3
+DEF OpReadyUnmap = 4
+DEF OpWaitUnmap = 5
+DEF OpWaitDestroy = 6
+DEF OpClosed = 7
+
+
cdef class Window :
'''Window Class
@@ -42,7 +53,13 @@
self._background = soy.colors.Black()
if splash :
self._splash = 1
- self._create(position[0], position[1], size[0], size[1])
+ self._x = position[0]
+ self._y = position[1]
+ self._width = size[0]
+ self._height = size[1]
+ _windows.lock()
+ _windows.append(<void *>self)
+ _windows.unlock()
def __dealloc__(self) :
@@ -52,16 +69,24 @@
_windows.remove(<void *>self)
_windows.unlock()
+ cdef void _openedWait(self, int _op) :
+ # Use with care
+ while self._opened < _op :
+ soy._internals._sleep(100)
- cdef void _create(self, int _xpos, int _ypos, int _width, int _height) :
- cdef int i
+
+ cdef void _coreCreate(self) :
+ cdef int _fullScreen
+ cdef glx.Display *_display
cdef glx.Colormap _colormap
cdef glx.Atom _atom
cdef unsigned long _override
cdef glx.XSetWindowAttributes _winAttr
- cdef int xpos, ypos, width, height
- _screens.lock()
- _windows.lock()
+ _display = glx.DisplayOfScreen(self._screen._screen)
+ if <void*> self == <void*> self._screen._fullScreen :
+ _fullScreen = 1
+ else :
+ _fullScreen = 0
_winAttr.colormap = glx.XCreateColormap(_display,
glx.RootWindowOfScreen(self._screen._screen),
self._screen._xVisualInfo.visual, glx.AllocNone)
@@ -71,63 +96,59 @@
glx.EnterWindowMask | glx.LeaveWindowMask | \
glx.PointerMotionMask | glx.ExposureMask | \
glx.StructureNotifyMask
- if self == self._screen._fullScreen or self._splash :
+ if _fullScreen or self._splash :
_winAttr.override_redirect = 1
_override = glx.CWOverrideRedirect
else :
_override = 0
- self._opened = -1
self._windowID = glx.XCreateWindow(
_display, glx.RootWindowOfScreen(self._screen._screen),
- _xpos, _ypos, _width, _height, 0, self._screen._xVisualInfo.depth,
+ self._x, self._y, self._width, self._height, 0,
+ self._screen._xVisualInfo.depth,
glx.InputOutput, self._screen._xVisualInfo.visual,
glx.CWBorderPixel | glx.CWColormap | glx.CWEventMask | _override,
&_winAttr)
glx.XSetWMProtocols(_display, self._windowID, &self._screen._wmDelWin, 1)
- if self._screen._fullScreen != self and self._splash == 0 :
- _atom = glx.XInternAtom(_display, "WM_DELETE_WINDOW", True)
+ if not (_fullScreen or self._splash) :
+ _atom = glx.XInternAtom(_display, "WM_DELETE_WINDOW", 1)
glx.XSetWMProtocols(_display, self._windowID, &_atom, 1)
self._setProperties()
- glx.XMapWindow(_display, self._windowID)
+ self._opened = OpReadyMap
glx.XFlush(_display)
- # Need to check if we're already in _windows
- if _windows.index(<void *>self) == -1 :
- _windows.append(<void *>self)
- _windows.unlock()
- _screens.unlock()
- for i from 0 <= i < 10000 :
- if self._opened == 0 :
- break
- soy._internals._sleep(100)
- if self._opened == 0 :
- self._resize(_width, _height)
- self._opened = 1
- else :
- self._opened = -1
- raise SystemError('timed out while opening window')
cdef void _destroy(self) :
- self._opened = 3
- while self._opened == 3 :
- soy._internals._sleep(100)
+ #
+ # Since the CoreLoop thread must handle X traffic, we set self._opened
+ # flag to OpReadyUnmap which instructs _coreRender to XUnmapWindow.
+ # That should, in turn, generate an UnmapNotify event upon success which
+ # then issues the XDestroyWindow command and deletes the window.
+ #
+ # This command will wait patiently for the CoreLoop thread to set the
+ # self._opened parameter to OpClosed.
+ #
+ self._opened = OpReadyUnmap
+ self._openedWait(OpClosed)
cdef void _coreRender(self) :
cdef int i
- if self._opened == 3 :
- glx.XUnmapWindow(_display, self._windowID)
- glx.XDestroyWindow(_display, self._windowID)
- glx.XFlush(_display)
- self._opened = -1
- if self._opened < 1 :
+ cdef glx.Display *_display
+ _display = glx.DisplayOfScreen(self._screen._screen)
+
+ if self._opened != OpReadyRender :
+ #
+ # Not ready to render, handle window opening/closing stuff instead
+ if self._opened == OpReadyCreate :
+ self._coreCreate()
+ elif self._opened == OpReadyUnmap :
+ glx.XUnmapWindow(_display, self._windowID)
+ self._opened = OpWaitUnmap
+ glx.XFlush(_display)
return
+ #
glx.glXMakeCurrent(_display, self._windowID, _glxContext)
#
- # This doesn't belong in _coreRender
- if self._screen._glVersion == 0 :
- self._screen._glewInit()
- #
gl.glViewport(0, 0, self._width, self._height)
gl.glClearColor(self._background._r, self._background._g,
self._background._b, 1.0)
@@ -154,72 +175,109 @@
gl.glDisableClientState(gl.GL_TEXTURE_COORD_ARRAY)
gl.glDisable(gl.GL_CULL_FACE)
gl.glFlush()
- glx.glXSwapBuffers(glx.DisplayOfScreen(self._screen._screen),
- self._windowID)
+ glx.glXSwapBuffers(_display, self._windowID)
- cdef void _resize(self, int _width, int _height) :
- cdef int i
- if self._width == _width and self._height == _height :
- # Ignore redundant resize events
- return
- self._width = _width
- self._height = _height
- # Resize top-level widgets
- self._widgets.lock()
- for i from 0 <= i < self._widgets.current :
- if (<soy.widgets.Widget> self._widgets.list[i])._topLevel :
- (<soy.widgets.Widget> self._widgets.list[i])._resize(0, 0,
- _width, _height)
- self._widgets.unlock()
-
-
cdef void _setProperties(self) :
+ cdef glx.Display *_display
+ _display = glx.DisplayOfScreen(self._screen._screen)
glx.XSetStandardProperties(_display, self._windowID,
self._title, self._title, 0, # self._icon
NULL, 0, NULL)
glx.XFlush(_display)
- cdef void _eventKeyDown(self, glx.Time _time,
+ cdef void _coreEventKeyDown(self, glx.Time _time,
glx.KeyCode _code, glx.KeySym _key) :
cdef int i
self._controllers.lock()
for i from 0 <= i < self._controllers.current :
- (<soy.controllers.Controller> self._controllers.list[i])._eventKeyDown(
+ (<soy.controllers.Controller>
self._controllers.list[i])._coreEventKeyDown(
_code, _key)
self._controllers.unlock()
- cdef void _eventKeyUp(self, glx.Time _time,
+ cdef void _coreEventKeyUp(self, glx.Time _time,
glx.KeyCode _code, glx.KeySym _key) :
cdef int i
self._controllers.lock()
for i from 0 <= i < self._controllers.current :
- (<soy.controllers.Controller> self._controllers.list[i])._eventKeyUp(
+ (<soy.controllers.Controller> self._controllers.list[i])._coreEventKeyUp(
_code, _key)
self._controllers.unlock()
- cdef void _eventButtonDown(self, glx.Time _time, unsigned int _button,
+ cdef void _coreEventButtonDown(self, glx.Time _time, unsigned int _button,
int _xpos, int _ypos) :
# Nothing (yet)
# 0=any, 1 2 3, 4=up, 5=down
return
- cdef void _eventButtonUp(self, glx.Time _time, unsigned int _button,
+ cdef void _coreEventButtonUp(self, glx.Time _time, unsigned int _button,
int _xpos, int _ypos) :
return
- cdef void _eventMotion(self, glx.Time _time, int _xpos, int _ypos) :
+ cdef void _coreEventMotion(self, glx.Time _time, int _xpos, int _ypos) :
# Nothing (yet)
return
- cdef void _eventWinClose(self) :
- cdef int i
+
+ cdef void _coreEventConfigure(self, int _x, int _y, int _width,int _height) :
+ cdef int _i
+ if self._width != _width or self._height != _height :
+ self._width = _width
+ self._height = _height
+ #
+ # Resize top-level widgets
+ self._widgets.lock()
+ for _i from 0 <= _i < self._widgets.current :
+ if (<soy.widgets.Widget> self._widgets.list[_i])._topLevel :
+ (<soy.widgets.Widget> self._widgets.list[_i])._resize(0, 0,
+ _width, _height)
+ self._widgets.unlock()
+
+
+
+ cdef void _coreEventCreate(self) :
+ cdef glx.Display *_display
+ _display = glx.DisplayOfScreen(self._screen._screen)
+ if self._opened != OpReadyMap :
+ return
+ glx.XMapWindow(_display, self._windowID)
+ self._opened = OpWaitMap
+ glx.XFlush(_display)
+
+ cdef void _coreEventDestroy(self) :
+ if self._opened != OpWaitDestroy :
+ stdio.printf('Unexpected DestroyNotify Event received\n')
+ return
+ self._opened = OpClosed
+
+ cdef void _coreEventMap(self) :
+ if self._opened != OpWaitMap :
+ stdio.printf('Unexpected MapNotify Event received\n')
+ return
+ # _screen._coreGlewInit won't work until the first window is opened
+ glx.glXMakeCurrent(_display, self._windowID, _glxContext)
+ if self._screen._glVersion == 0 :
+ self._screen._coreGlewInit()
+ self._opened = OpReadyRender
+
+ cdef void _coreEventUnmap(self) :
+ cdef glx.Display *_display
+ _display = glx.DisplayOfScreen(self._screen._screen)
+ if self._opened != OpWaitUnmap :
+ stdio.printf('Unexpected UnmapNotify Event received\n')
+ return
+ glx.XDestroyWindow(_display, self._windowID)
+ self._opened = OpWaitDestroy
+ glx.XFlush(_display)
+
+ cdef void _coreEventWinClose(self) :
+ cdef int _i
self._controllers.lock()
- for i from 0 <= i < self._controllers.current :
- (<soy.controllers.Controller> self._controllers.list[i])._eventWinClose()
+ for _i from 0 <= _i < self._controllers.current :
+ (<soy.controllers.Controller>
self._controllers.list[_i])._coreEventWinClose()
self._controllers.unlock()
-
+
property title:
'''Window's title string
Modified: trunk/pysoy/src/_core/soy._core.pxd
===================================================================
--- trunk/pysoy/src/_core/soy._core.pxd 2008-02-11 07:16:30 UTC (rev 860)
+++ trunk/pysoy/src/_core/soy._core.pxd 2008-02-11 11:24:05 UTC (rev 861)
@@ -39,7 +39,7 @@
cdef void _events(self)
# OpenGL Support
cdef int _glVersion
- cdef void _glewInit(self)
+ cdef void _coreGlewInit(self)
IF UNAME_SYSNAME != "Windows" :
# X11 Support
cdef glx.Screen *_screen
@@ -75,22 +75,35 @@
cdef void _request_destroy(self)
cdef void _registerClass(self)
cdef void _unregisterClass(self)
+ cdef void _create(self, int, int, int, int)
+ cdef void _resize(self, int _width, int _height)
ELSE :
# X11/GLX platform
cdef glx.Window _windowID
cdef glx.Pixmap _iconID
- cdef void _setProperties( self )
- cdef void _eventKeyDown ( self, glx.Time,
- glx.KeyCode, glx.KeySym )
- cdef void _eventKeyUp ( self, glx.Time,
- glx.KeyCode, glx.KeySym )
- cdef void _eventButtonDown( self, glx.Time,
- unsigned int, int, int )
- cdef void _eventButtonUp ( self, glx.Time,
- unsigned int, int, int )
- cdef void _eventMotion ( self, glx.Time, int, int )
- cdef void _eventWinClose ( self )
- cdef void _create(self, int, int, int, int)
+ 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 _destroy(self)
cdef void _coreRender(self)
- cdef void _resize(self, int _width, int _height)
Modified: trunk/pysoy/src/controllers/Controller.pxi
===================================================================
--- trunk/pysoy/src/controllers/Controller.pxi 2008-02-11 07:16:30 UTC (rev
860)
+++ trunk/pysoy/src/controllers/Controller.pxi 2008-02-11 11:24:05 UTC (rev
861)
@@ -25,11 +25,11 @@
def __repr__(self) :
return '<Controller>'
- cdef void _eventKeyDown(self, unsigned char _cde, unsigned char _sym) :
+ cdef void _coreEventKeyDown(self, unsigned char _cde, unsigned char _sym) :
return
- cdef void _eventKeyUp(self, unsigned char _cde, unsigned char _sym) :
+ cdef void _coreEventKeyUp(self, unsigned char _cde, unsigned char _sym) :
return
- cdef void _eventWinClose(self) :
+ cdef void _coreEventWinClose(self) :
return
Modified: trunk/pysoy/src/controllers/Keyboard.pxi
===================================================================
--- trunk/pysoy/src/controllers/Keyboard.pxi 2008-02-11 07:16:30 UTC (rev
860)
+++ trunk/pysoy/src/controllers/Keyboard.pxi 2008-02-11 11:24:05 UTC (rev
861)
@@ -99,12 +99,12 @@
py.Py_INCREF(<soy.actions.Action> self._acts_keycde[key])
- cdef void _eventKeyDown(self, unsigned char _cde, unsigned char _sym) :
+ cdef void _coreEventKeyDown(self, unsigned char _cde, unsigned char _sym) :
if self._acts_keycde[_cde] :
(<soy.actions.Action> self._acts_keycde[_cde])._perform(1)
if self._acts_keysym[_sym] :
(<soy.actions.Action> self._acts_keysym[_sym])._perform(1)
- cdef void _eventKeyUp(self, unsigned char _cde, unsigned char _sym) :
+ cdef void _coreEventKeyUp(self, unsigned char _cde, unsigned char _sym) :
return
Modified: trunk/pysoy/src/controllers/Keyboard2.pxi
===================================================================
--- trunk/pysoy/src/controllers/Keyboard2.pxi 2008-02-11 07:16:30 UTC (rev
860)
+++ trunk/pysoy/src/controllers/Keyboard2.pxi 2008-02-11 11:24:05 UTC (rev
861)
@@ -108,14 +108,14 @@
py.Py_INCREF(<soy.actions.Action> self._acts_keycde_up[key])
- cdef void _eventKeyDown(self, unsigned char _cde, unsigned char _sym) :
+ cdef void _coreEventKeyDown(self, unsigned char _cde, unsigned char _sym) :
if self._acts_keycde_down[_cde] :
(<soy.actions.Action> self._acts_keycde_down[_cde])._perform(1)
if self._acts_keysym_down[_sym] :
(<soy.actions.Action> self._acts_keysym_down[_sym])._perform(1)
- cdef void _eventKeyUp(self, unsigned char _cde, unsigned char _sym) :
+ cdef void _coreEventKeyUp(self, unsigned char _cde, unsigned char _sym) :
if self._acts_keycde_up[_cde] :
(<soy.actions.Action> self._acts_keycde_up[_cde])._perform(1)
if self._acts_keysym_up[_sym] :
Modified: trunk/pysoy/src/controllers/Window.pxi
===================================================================
--- trunk/pysoy/src/controllers/Window.pxi 2008-02-11 07:16:30 UTC (rev
860)
+++ trunk/pysoy/src/controllers/Window.pxi 2008-02-11 11:24:05 UTC (rev
861)
@@ -75,6 +75,6 @@
raise KeyError('%s unsupported, see help(soy.controllers.Window)' % key)
- cdef void _eventWinClose(self) :
+ cdef void _coreEventWinClose(self) :
if self._acts_close :
(<soy.actions.Action> self._acts_close)._perform(0)
Modified: trunk/pysoy/src/controllers/soy.controllers.pxd
===================================================================
--- trunk/pysoy/src/controllers/soy.controllers.pxd 2008-02-11 07:16:30 UTC
(rev 860)
+++ trunk/pysoy/src/controllers/soy.controllers.pxd 2008-02-11 11:24:05 UTC
(rev 861)
@@ -22,9 +22,9 @@
cimport soy.actions
cdef class Controller :
- cdef void _eventKeyDown ( self, unsigned char, unsigned char )
- cdef void _eventKeyUp ( self, unsigned char, unsigned char )
- cdef void _eventWinClose ( self )
+ cdef void _coreEventKeyDown ( self, unsigned char, unsigned char )
+ cdef void _coreEventKeyUp ( self, unsigned char, unsigned char )
+ cdef void _coreEventWinClose ( self )
cdef class Keyboard (Controller) :
cdef soy._core.Window _window
_______________________________________________
PySoy-SVN mailing list
[email protected]
http://www.pysoy.org/mailman/listinfo/pysoy-svn