Graphic-Display impl

Implements Graphic-Display.

Summary
Graphic-Display implImplements Graphic-Display.
CopyrightThis program is free software.
Files
C-kern/api/graphic/display.hHeader file Graphic-Display.
C-kern/graphic/display.cImplementation file Graphic-Display impl.
display_t
static variables
s_display_errtimerAllows to introduce artificial errors.
s_display_noextAllows to initialize an X11 display without extensions.
helper-macros
OSDISPLAY_DEFAULTNAMEDefines default display name to connect with the default screen.
INIT_OSDISPLAYInitializes the graphic display in an OS specific way.
FREE_OSDISPLAYFrees the graphic display in an OS specific way.
INIT_OPENGLInitializes the OpenGL part of the graphic display in an OS specific way.
FREE_OPENGLFrees the OpenGL part of the graphic display in an OS specific way.
ISFREE_OSDISPLAYReturns true in case the OS specific display is already freed.
lifetime
Functions
test

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/display.h

Header file Graphic-Display.

C-kern/graphic/display.c

Implementation file Graphic-Display impl.

display_t

Summary
static variables
s_display_errtimerAllows to introduce artificial errors.
s_display_noextAllows to initialize an X11 display without extensions.
helper-macros
OSDISPLAY_DEFAULTNAMEDefines default display name to connect with the default screen.
INIT_OSDISPLAYInitializes the graphic display in an OS specific way.
FREE_OSDISPLAYFrees the graphic display in an OS specific way.
INIT_OPENGLInitializes the OpenGL part of the graphic display in an OS specific way.
FREE_OPENGLFrees the OpenGL part of the graphic display in an OS specific way.
ISFREE_OSDISPLAYReturns true in case the OS specific display is already freed.
lifetime

static variables

s_display_errtimer

static test_errortimer_t s_display_errtimer

Allows to introduce artificial errors.

s_display_noext

static bool s_display_noext

Allows to initialize an X11 display without extensions.

helper-macros

OSDISPLAY_DEFAULTNAME

#define OSDISPLAY_DEFAULTNAME 0

Defines default display name to connect with the default screen.

INIT_OSDISPLAY

#define INIT_OSDISPLAY(
   disp,
   display_selector
) (s_display_noext ? init2_x11display(&(disp)->osdisplay, display_selector, false) : init_x11display(&(disp)->osdisplay, display_selector))

Initializes the graphic display in an OS specific way.

FREE_OSDISPLAY

#define FREE_OSDISPLAY(disp) free_x11display(&(disp)->osdisplay)

Frees the graphic display in an OS specific way.

INIT_OPENGL

#define INIT_OPENGL(
   disp
) initx11_egldisplay(&(disp)->gldisplay, &(disp)->osdisplay)

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

FREE_OPENGL

#define FREE_OPENGL(disp) free_egldisplay(&(disp)->gldisplay)

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

ISFREE_OSDISPLAY

#define ISFREE_OSDISPLAY(disp) isfree_x11display(disp)

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

lifetime

Functions

test

Wraps the OS specific display initialization for the graphics display into a thin layer to make other modules OS independent.
Implements Graphic-Display.
static test_errortimer_t s_display_errtimer
Allows to introduce artificial errors.
static bool s_display_noext
Allows to initialize an X11 display without extensions.
#define OSDISPLAY_DEFAULTNAME 0
Defines default display name to connect with the default screen.
#define INIT_OSDISPLAY(
   disp,
   display_selector
) (s_display_noext ? init2_x11display(&(disp)->osdisplay, display_selector, false) : init_x11display(&(disp)->osdisplay, display_selector))
Initializes the graphic display in an OS specific way.
#define FREE_OSDISPLAY(disp) free_x11display(&(disp)->osdisplay)
Frees the graphic display in an OS specific way.
#define INIT_OPENGL(
   disp
) initx11_egldisplay(&(disp)->gldisplay, &(disp)->osdisplay)
Initializes the OpenGL part of the graphic display in an OS specific way.
#define FREE_OPENGL(disp) free_egldisplay(&(disp)->gldisplay)
Frees the OpenGL part of the graphic display in an OS specific way.
#define ISFREE_OSDISPLAY(disp) isfree_x11display(disp)
Returns true in case the OS specific display is already freed.
Close