bx-lib : the Basic X11 Library tuned for C beginners  1.0
Functions
Canvas (the area of a window where you can draw)

Functions

int bx_canvas_x (bx_window win)
int bx_canvas_y (bx_window win)
unsigned bx_canvas_width (bx_window win)
unsigned bx_canvas_height (bx_window win)
void bx_clear_canvas (bx_window win, bx_color color)
void bx_update_canvas (bx_window win)
void bx_swap_canvas (bx_window win, unsigned long millisecs)
void bx_show_canvas (bx_window win, unsigned long millisecs)

Detailed Description

Function Documentation

int bx_canvas_x ( bx_window  win)

gets the x-coordinate of the location of the top-left corner of the canvas inside its window.

Parameters
winthe window whose canvas location is queried
Returns
x the x-coordinate of the canvas
int bx_canvas_y ( bx_window  win)

gets the y-coordinate of the location of the top-left corner of the canvas inside its window.

Parameters
winthe window whose canvas location is queried
Returns
the y-coordinate of the canvas
unsigned bx_canvas_width ( bx_window  win)

gets the width of the canvas of a window.

Parameters
winthe window whose canvas size is queried
Returns
the width of the canvas
unsigned bx_canvas_height ( bx_window  win)

gets the height of the canvas of a window.

Parameters
winthe window whose canvas size is queried
Returns
the height of the canvas
void bx_clear_canvas ( bx_window  win,
bx_color  color 
)

erases the canvas of a window and fills it with a background color.

Parameters
winthe window whose canvas should be erased
colorthe background color used to fill the canvas
Returns
nothing.
void bx_update_canvas ( bx_window  win)

redraw the front buffer of the canvas of a window.

Parameters
winthe window whose canvas should be redrawn.
Returns
nothing.
void bx_swap_canvas ( bx_window  win,
unsigned long  millisecs 
)

swaps the back buffer and front buffers of the canvas of a window, therefore showing all previous drawing operations.

Parameters
winthe window whose canvas buffers should be swapped.
Returns
nothing.
void bx_show_canvas ( bx_window  win,
unsigned long  millisecs 
)

copy the back buffer of a canvas to its front buffer, therefore showing all previous drawing operations.

Parameters
winthe window whose back canvas buffer should be shown.
Returns
nothing.