Implements initialization of X11 graphics environment (makes it thread safe) and allows to dispatch events with <dispatchevent_X11>.
The event handler logic is also contained <dispatchevent_X11> which allows to read and understand the event handler state machine.
X11-Subsystem | Implements initialization of X11 graphics environment (makes it thread safe) and allows to dispatch events with <dispatchevent_X11>. |
Copyright | This program is free software. |
Files | |
C-kern/ | Header file of X11-Subsystem. |
C-kern/ | Implementation file X11-Subsystem impl. |
Functions | |
test | |
unittest_platform_X11 | Test initialization process succeeds. |
X11_t | |
init | |
initonce_X11 | Init Xlib such that calling into it is thread safe. |
freeonce_X11 | Does nothing at the moment. |
query | |
update | |
dispatchevent_X11 | Checks event queue and dispatches 1 event if avialable. |
nextevent_X11 | Waits until there is one event in the queue and calls dispatchevent_X11. |
inline implementation | |
X11_t | |
initonce_X11 | Implement init as a no op if defined KONFIG_USERINTERFACE_X11. |
freeonce_X11 | Implement free as a no op if defined KONFIG_USERINTERFACE_X11. |
This program is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 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 General Public License for more details.
© 2011 Jörg Seebohn
Header file of X11-Subsystem.
Implementation file X11-Subsystem impl.
test | |
unittest_platform_X11 | Test initialization process succeeds. |
init | |
initonce_X11 | Init Xlib such that calling into it is thread safe. |
freeonce_X11 | Does nothing at the moment. |
query | |
update | |
dispatchevent_X11 | Checks event queue and dispatches 1 event if avialable. |
nextevent_X11 | Waits until there is one event in the queue and calls dispatchevent_X11. |
int initonce_X11( void )
Init Xlib such that calling into it is thread safe.
This may be removed if every thread has its own x11display_t connection and draws into its own window.
int dispatchevent_X11( struct x11display_t * x11disp )
Checks event queue and dispatches 1 event if avialable. If there are no waiting events this function returns immediately. If no event handler is registered for the dispatched event nothing else is done except for consuming one event.
int nextevent_X11( struct x11display_t * x11disp )
Waits until there is one event in the queue and calls dispatchevent_X11.
X11_t | |
initonce_X11 | Implement init as a no op if defined KONFIG_USERINTERFACE_X11. |
freeonce_X11 | Implement free as a no op if defined KONFIG_USERINTERFACE_X11. |
Test initialization process succeeds.
int unittest_platform_X11( void )
Init Xlib such that calling into it is thread safe.
int initonce_X11( void )
Does nothing at the moment.
int freeonce_X11( void )
Checks event queue and dispatches 1 event if avialable.
int dispatchevent_X11( struct x11display_t * x11disp )
Waits until there is one event in the queue and calls dispatchevent_X11.
int nextevent_X11( struct x11display_t * x11disp )
Implement init as a no op if defined KONFIG_USERINTERFACE_X11.
#define initonce_X11( ) (0)
Implement free as a no op if defined KONFIG_USERINTERFACE_X11.
#define freeonce_X11( ) (0)