Graphic-Window impl

Implements Graphic-Window.

Summary
Graphic-Window implImplements Graphic-Window.
CopyrightThis program is free software.
Files
C-kern/api/graphic/window.hHeader file Graphic-Window.
C-kern/graphic/window.cImplementation file Graphic-Window impl.
window_t
static variables
s_window_errtimerAllows to introduce artificial errors during test.
helper-macros
INIT_OSWINDOWInitializes the native window oswindow in an OS specific way.
FREE_OSWINDOWFrees oswindow in an OS specific way.
INIT_GLWINDOWInitializes the OpenGL part of win in an OS specific way.
FREE_GLWINDOWFrees the OpenGL part of the graphic display in an OS specific way.
ISFREE_OSWINDOWReturns true in case the OS specific window is already freed.
lifetime
Functions
test
WAITFORReads and handles window events until CONDITION is met.

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

© 2014 Jörg Seebohn

Files

C-kern/api/graphic/window.h

Header file Graphic-Window.

C-kern/graphic/window.c

Implementation file Graphic-Window impl.

window_t

Summary
static variables
s_window_errtimerAllows to introduce artificial errors during test.
helper-macros
INIT_OSWINDOWInitializes the native window oswindow in an OS specific way.
FREE_OSWINDOWFrees oswindow in an OS specific way.
INIT_GLWINDOWInitializes the OpenGL part of win in an OS specific way.
FREE_GLWINDOWFrees the OpenGL part of the graphic display in an OS specific way.
ISFREE_OSWINDOWReturns true in case the OS specific window is already freed.
lifetime

static variables

s_window_errtimer

static test_errortimer_t s_window_errtimer

Allows to introduce artificial errors during test.

helper-macros

INIT_OSWINDOW

#define INIT_OSWINDOW(
   oswindow,
   disp,
   screennr,
   eventhandler,
   visualid,
   winattr
) initvid_x11window(oswindow, os_display(disp), screennr, genericcast_x11windowevh(eventhandler, window_t), (uint32_t)visualid, winattr)

Initializes the native window oswindow in an OS specific way.

FREE_OSWINDOW

#define FREE_OSWINDOW(oswindow) free_x11window(oswindow)

Frees oswindow in an OS specific way.

INIT_GLWINDOW

#define INIT_GLWINDOW(
   win,
   disp,
   gconf
) initx11_eglwindow(&gl_window(win), gl_display(disp), gl_gconfig(gconf), &win->oswindow)

Initializes the OpenGL part of win in an OS specific way.

FREE_GLWINDOW

#define FREE_GLWINDOW(win,
disp) free_eglwindow(&gl_window(win), gl_display(disp))

Frees the OpenGL part of the graphic display in an OS specific way.

ISFREE_OSWINDOW

#define ISFREE_OSWINDOW(oswindow) isfree_x11window(oswindow)

Returns true in case the OS specific window is already freed.

lifetime

Functions

Summary
test
WAITFORReads and handles window events until CONDITION is met.

test

WAITFOR

Reads and handles window events until CONDITION is met.  Parameter disp must be of type display_t.

Wraps the OS specific window and its OpenGL specific extension into a thin layer to make other modules OS independent.
Implements Graphic-Window.
static test_errortimer_t s_window_errtimer
Allows to introduce artificial errors during test.
#define INIT_OSWINDOW(
   oswindow,
   disp,
   screennr,
   eventhandler,
   visualid,
   winattr
) initvid_x11window(oswindow, os_display(disp), screennr, genericcast_x11windowevh(eventhandler, window_t), (uint32_t)visualid, winattr)
Initializes the native window oswindow in an OS specific way.
#define FREE_OSWINDOW(oswindow) free_x11window(oswindow)
Frees oswindow in an OS specific way.
#define INIT_GLWINDOW(
   win,
   disp,
   gconf
) initx11_eglwindow(&gl_window(win), gl_display(disp), gl_gconfig(gconf), &win->oswindow)
Initializes the OpenGL part of win in an OS specific way.
#define FREE_GLWINDOW(win,
disp) free_eglwindow(&gl_window(win), gl_display(disp))
Frees the OpenGL part of the graphic display in an OS specific way.
#define ISFREE_OSWINDOW(oswindow) isfree_x11window(oswindow)
Returns true in case the OS specific window is already freed.
struct display_t
Wraps the OS specific graphics display.
Close