X11-Drawable

Describes an object which supports writing text and drawing lines and shapes.

Summary
X11-DrawableDescribes an object which supports writing text and drawing lines and shapes.
CopyrightThis program is free software.
Files
C-kern/api/platform/X11/x11drawable.hHeader file X11-Drawable.
C-kern/platform/X11/x11drawable.cImplementation file X11-Drawable impl.
Types
struct x11drawable_tExport x11drawable_t into global namespace.
Functions
test
unittest_platform_X11_x11drawableTest x11drawable_t functionality.
x11drawable_tBase class of x11window_t or <glxwindow_t> (or Pixmap).
displayReference to x11display_t.
sys_drawableX window ID.
sys_colormapX window ID.
lifetime
x11drawable_FREEStatic initializer.
x11drawable_INITStatic initializer.
query
genericcast_x11drawableCasts drawable into pointer to x11drawable_t if that is possible.
draw-lines
draw-shapes
draw-text
inline implementation
x11drawable_t
genericcast_x11drawableImplements x11drawable_t.genericcast_x11drawable.

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

Header file X11-Drawable.

C-kern/platform/X11/x11drawable.c

Implementation file X11-Drawable impl.

Types

struct x11drawable_t

typedef struct x11drawable_t x11drawable_t

Export x11drawable_t into global namespace.

Functions

test

unittest_platform_X11_x11drawable

int unittest_platform_X11_x11drawable(void)

Test x11drawable_t functionality.

x11drawable_t

struct x11drawable_t

Base class of x11window_t or <glxwindow_t> (or Pixmap).  You can use text and drawing functions to draw into a drawable.

Summary
displayReference to x11display_t.
sys_drawableX window ID.
sys_colormapX window ID.
lifetime
x11drawable_FREEStatic initializer.
x11drawable_INITStatic initializer.
query
genericcast_x11drawableCasts drawable into pointer to x11drawable_t if that is possible.
draw-lines
draw-shapes
draw-text

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 drawable pixel depth to the screen pixel depth.

lifetime

x11drawable_FREE

#define x11drawable_FREE { 0, 0, 0 }

Static initializer.

x11drawable_INIT

#define x11drawable_INIT(display,
sys_drawable,
sys_colormap) { display, sys_drawable, sys_colormap }

Static initializer.  See x11drawable_t for the description of the parameter.

query

genericcast_x11drawable

x11drawable_t* genericcast_x11drawable(void *drawable)

Casts drawable into pointer to x11drawable_t if that is possible.  The first fields of drawable must match the data fields in x11drawable_t.

draw-lines

draw-shapes

draw-text

x11drawable_t

genericcast_x11drawable

Describes an object which supports writing text and drawing lines and shapes.
Implements X11-Drawable.
typedef struct x11drawable_t x11drawable_t
Export x11drawable_t into global namespace.
struct x11drawable_t
Base class of x11window_t or glxwindow_t (or Pixmap).
int unittest_platform_X11_x11drawable(void)
Test x11drawable_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 x11drawable_FREE { 0, 0, 0 }
Static initializer.
#define x11drawable_INIT(display,
sys_drawable,
sys_colormap) { display, sys_drawable, sys_colormap }
Static initializer.
x11drawable_t* genericcast_x11drawable(void *drawable)
Casts drawable into pointer to x11drawable_t if that is possible.
Close