X11-DoubleBuffer

Add double buffer (back buffer) support to x11window_t.

Summary
X11-DoubleBufferAdd double buffer (back buffer) support to x11window_t.
CopyrightThis program is free software.
Files
C-kern/api/platform/X11/x11dblbuffer.hHeader file X11-DoubleBuffer.
C-kern/platform/X11/x11dblbuffer.cImplementation file X11-DoubleBuffer impl.
Types
struct x11dblbuffer_tExport x11dblbuffer_t into global namespace.
Functions
test
unittest_platform_X11_x11dblbufferTest x11dblbuffer_t functionality.
x11dblbuffer_tA drawable which describes the double buffer (back buffer) of a x11window_t.
displayReference to x11display_t.
sys_drawableX window ID.
sys_colormapX window ID.
lifetime
x11dblbuffer_FREEStatic initializer.
init_x11dblbufferTries to allocate a double buffer associated with window.
free_x11dblbufferFrees and deallocates the double buffer associated with a window.

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

© 2013 Jörg Seebohn

Files

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

Header file X11-DoubleBuffer.

C-kern/platform/X11/x11dblbuffer.c

Implementation file X11-DoubleBuffer impl.

Types

struct x11dblbuffer_t

typedef struct x11dblbuffer_t x11dblbuffer_t

Export x11dblbuffer_t into global namespace.

Functions

test

unittest_platform_X11_x11dblbuffer

int unittest_platform_X11_x11dblbuffer(void)

Test x11dblbuffer_t functionality.

x11dblbuffer_t

struct x11dblbuffer_t

A drawable which describes the double buffer (back buffer) of a x11window_t.

Summary
displayReference to x11display_t.
sys_drawableX window ID.
sys_colormapX window ID.
lifetime
x11dblbuffer_FREEStatic initializer.
init_x11dblbufferTries to allocate a double buffer associated with window.
free_x11dblbufferFrees and deallocates the double buffer associated with a window.

display

struct x11display_t* display

Reference to x11display_t.  Every call to X library needs this parameter.

sys_drawable

uint32_t sys_drawable

X window ID.  The ID describes a drawable either of type window, backbuffer or pixmap.

sys_colormap

uint32_t sys_colormap

X window ID.  The ID describes a colormap which is associated with the drawable.  A colormap is used to map the pixel depth of drawable to screen’s pixel depth.

lifetime

x11dblbuffer_FREE

#define x11dblbuffer_FREE { 0, 0, 0 }

Static initializer.

init_x11dblbuffer

int init_x11dblbuffer(/*out*/x11dblbuffer_t *dblbuf,
struct x11window_t *x11win)

Tries to allocate a double buffer associated with window.

free_x11dblbuffer

int free_x11dblbuffer(x11dblbuffer_t *dblbuf)

Frees and deallocates the double buffer associated with a window.  You need to call this function before you free the associated window.

Add double buffer (back buffer) support to x11window_t.
Implements X11-DoubleBuffer.
typedef struct x11dblbuffer_t x11dblbuffer_t
Export x11dblbuffer_t into global namespace.
struct x11dblbuffer_t
A drawable which describes the double buffer (back buffer) of a x11window_t.
int unittest_platform_X11_x11dblbuffer(void)
Test x11dblbuffer_t functionality.
struct x11display_t* display
Reference to x11display_t.
uint32_t sys_drawable
X window ID.
uint32_t sys_colormap
X window ID.
#define x11dblbuffer_FREE { 0, 0, 0 }
Static initializer.
int init_x11dblbuffer(/*out*/x11dblbuffer_t *dblbuf,
struct x11window_t *x11win)
Tries to allocate a double buffer associated with window.
int free_x11dblbuffer(x11dblbuffer_t *dblbuf)
Frees and deallocates the double buffer associated with a window.
Close