X11-Subsystem

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.

Summary
X11-SubsystemImplements initialization of X11 graphics environment (makes it thread safe) and allows to dispatch events with <dispatchevent_X11>.
CopyrightThis program is free software.
Files
C-kern/api/platform/X11/x11.hHeader file of X11-Subsystem.
C-kern/platform/X11/x11.cImplementation file X11-Subsystem impl.
Functions
test
unittest_platform_X11Test initialization process succeeds.
X11_t
init
initonce_X11Init Xlib such that calling into it is thread safe.
freeonce_X11Does nothing at the moment.
query
update
dispatchevent_X11Checks event queue and dispatches 1 event if avialable.
nextevent_X11Waits until there is one event in the queue and calls dispatchevent_X11.
inline implementation
X11_t
initonce_X11Implement init as a no op if defined KONFIG_USERINTERFACE_X11.
freeonce_X11Implement free as a no op if defined KONFIG_USERINTERFACE_X11.

Copyright

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.

Author

© 2011 Jörg Seebohn

Files

C-kern/api/platform/X11/x11.h

Header file of X11-Subsystem.

C-kern/platform/X11/x11.c

Implementation file X11-Subsystem impl.

Functions

Summary
test
unittest_platform_X11Test initialization process succeeds.

test

unittest_platform_X11

int unittest_platform_X11(void)

Test initialization process succeeds.

X11_t

Summary
init
initonce_X11Init Xlib such that calling into it is thread safe.
freeonce_X11Does nothing at the moment.
query
update
dispatchevent_X11Checks event queue and dispatches 1 event if avialable.
nextevent_X11Waits until there is one event in the queue and calls dispatchevent_X11.

init

initonce_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.

freeonce_X11

int freeonce_X11(void)

Does nothing at the moment.

query

update

dispatchevent_X11

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.

nextevent_X11

int nextevent_X11(struct x11display_t *x11disp)

Waits until there is one event in the queue and calls dispatchevent_X11.

inline implementation

Summary
X11_t
initonce_X11Implement init as a no op if defined KONFIG_USERINTERFACE_X11.
freeonce_X11Implement free as a no op if defined KONFIG_USERINTERFACE_X11.

X11_t

initonce_X11

#define initonce_X11() (0)

Implement init as a no op if defined KONFIG_USERINTERFACE_X11.

freeonce_X11

#define freeonce_X11() (0)

Implement free as a no op if defined KONFIG_USERINTERFACE_X11.

Implements initialization of X11 graphics environment (makes it thread safe) and allows to dispatch events with dispatchevent_X11.
Implements window management for X11 graphics environment.
int unittest_platform_X11(void)
Test initialization process succeeds.
int initonce_X11(void)
Init Xlib such that calling into it is thread safe.
int freeonce_X11(void)
Does nothing at the moment.
int dispatchevent_X11(struct x11display_t *x11disp)
Checks event queue and dispatches 1 event if avialable.
int nextevent_X11(struct x11display_t *x11disp)
Waits until there is one event in the queue and calls dispatchevent_X11.
#define initonce_X11() (0)
Implement init as a no op if defined KONFIG_USERINTERFACE_X11.
#define freeonce_X11() (0)
Implement free as a no op if defined KONFIG_USERINTERFACE_X11.
Close