bx-lib : the Basic X11 Library tuned for C beginners
1.0
|
Functions | |
bx_window | bx_create_window (char const name[], int x, int y, unsigned w, unsigned h) |
void | bx_destroy_window (bx_window window) |
char * | bx_window_name (bx_window window) |
void | bx_rename_window (bx_window window, char const name[]) |
unsigned | bx_window_width (bx_window window) |
unsigned | bx_window_height (bx_window window) |
void | bx_resize_window (bx_window window, unsigned w, unsigned h) |
int | bx_window_x (bx_window window) |
int | bx_window_y (bx_window window) |
void | bx_move_window (bx_window window, int x, int y) |
bx_window bx_create_window | ( | char const | name[], |
int | x, | ||
int | y, | ||
unsigned | w, | ||
unsigned | h | ||
) |
creates and displays a top-level window with a specified location on the screen, a specified name in the title bar, and a specified canvas size.
name | the name in the title bar. |
x,y | the location of the top left corner of the title bar. |
w,h | the size (width and height) of the canvas of the window. |
void bx_destroy_window | ( | bx_window | window | ) |
destroys a window.
window | the window to be destroyed. |
char* bx_window_name | ( | bx_window | window | ) |
gets the name displayed in the title bar of window
@ param window the window whose title is queried.
void bx_rename_window | ( | bx_window | window, |
char const | name[] | ||
) |
changes the title of the window displayed in its title bar.
window | the window to be renamed |
name | the new name for the window |
unsigned bx_window_width | ( | bx_window | window | ) |
gets the width of the window.
window | the window whose size is queried |
unsigned bx_window_height | ( | bx_window | window | ) |
gets the height of the window.
window | the window whose size is queried |
void bx_resize_window | ( | bx_window | window, |
unsigned | w, | ||
unsigned | h | ||
) |
changes the width and height of the window.
window | the window to be resized |
w | the new width in pixels for the window |
h | the new height in pixels for the window |
int bx_window_x | ( | bx_window | window | ) |
gets the x-coordinate of the top-left corner of the window in the screen.
window | the window whose location is queried |
int bx_window_y | ( | bx_window | window | ) |
gets the y-coordinate of the top-left corner of the window in the screen.
window | the window whose location is queried |
void bx_move_window | ( | bx_window | window, |
int | x, | ||
int | y | ||
) |
changes the location of the window in the screen. Recall that pixel (0,0) is in top-left cormer, and that y-coordinates increase downwards.
window | the window to be moved |
x | the new x-coordinate for the window |
y | the new y-coordinate for the window |