|
| static int | toolkit_mouseEvent (Window *w, SDL_Event *event) |
| | Handles the mouse events. More...
|
| |
| static int | toolkit_mouseEventWidget (Window *w, Widget *wgt, SDL_Event *event, int x, int y, int rx, int ry) |
| | Handle widget mouse input. More...
|
| |
| static int | toolkit_keyEvent (Window *wdw, SDL_Event *event) |
| | Handles keyboard events. More...
|
| |
| static int | toolkit_textEvent (Window *wdw, SDL_Event *event) |
| |
| static int | toolkit_isFocusable (Widget *wgt) |
| | Checks to see if a widget is focusable. More...
|
| |
| static Widget * | toolkit_getFocus (Window *wdw) |
| | Gets the focused widget in a window. More...
|
| |
| static void | toolkit_expose (Window *wdw, int expose) |
| | Exposes or hides a window and notifies its widgets. More...
|
| |
| static void | window_renderBorder (Window *w) |
| | Renders a window border. More...
|
| |
| static void | widget_kill (Widget *wgt) |
| | Destroy a widget really. More...
|
| |
| static void | window_remove (Window *wdw) |
| | Frees up a window. More...
|
| |
| static void | toolkit_purgeDead (void) |
| | Purges the dead windows. More...
|
| |
| int | toolkit_isOpen (void) |
| | Checks to see if the toolkit is open. More...
|
| |
| void | toolkit_delay (void) |
| | Delays the toolkit purge by an iteration, useful for dialogues. More...
|
| |
| void | toolkit_setPos (Window *wdw, Widget *wgt, int x, int y) |
| | Sets the internal widget position. More...
|
| |
| void | toolkit_setWindowPos (Window *wdw, int x, int y) |
| | Moves a window to the specified coordinates. More...
|
| |
| void | window_move (unsigned int wid, int x, int y) |
| | Moves a window to the specified coordinates. More...
|
| |
| void | window_resize (unsigned int wid, int w, int h) |
| | Resizes the window. More...
|
| |
| Widget * | window_newWidget (Window *w, const char *name) |
| | Allocates room for a new widget. More...
|
| |
| Window * | window_wget (unsigned int wid) |
| | Gets a Window by ID. More...
|
| |
| Window * | window_wgetW (unsigned int wid) |
| | Gets a Window by ID, without warning. More...
|
| |
| Window * | window_wgetNameW (const char *name) |
| | Gets a Window by name, without warning. More...
|
| |
| Widget * | window_getwgt (unsigned int wid, const char *name) |
| | Gets a widget from window id and widgetname. More...
|
| |
| void | window_dimWindow (unsigned int wid, int *w, int *h) |
| | Gets the dimensions of a window. More...
|
| |
| void | window_posWindow (unsigned int wid, int *x, int *y) |
| | Gets the dimensions of a window. More...
|
| |
| void | window_dimWidget (unsigned int wid, const char *name, int *w, int *h) |
| | Gets the dimensions of a widget. More...
|
| |
| void | window_posWidget (unsigned int wid, const char *name, int *x, int *y) |
| | Gets a widget's position. More...
|
| |
| void | window_moveWidget (unsigned int wid, const char *name, int x, int y) |
| | Moves a widget. More...
|
| |
| void | window_resizeWidget (unsigned int wid, const char *name, int w, int h) |
| | Resizes a widget. More...
|
| |
| void | window_canFocusWidget (unsigned int wid, const char *name, int canfocus) |
| | Allows or disallows focusing a widget. More...
|
| |
| int | window_isTop (unsigned int wid) |
| | Checks to see if a window is at the top. More...
|
| |
| int | widget_isCovered (unsigned int wid, const char *name, int x, int y) |
| | Checks to see if a widget is covered or not. More...
|
| |
| int | window_exists (const char *wdwname) |
| | Checks to see if a window exists. More...
|
| |
| int | window_existsID (unsigned int wid) |
| | Checks to see if a window with a certain ID exists. More...
|
| |
| int | window_setDisplayname (unsigned int wid, const char *displayname) |
| | Sets the displayname of a window. More...
|
| |
| void | window_setFade (unsigned int wid, const SimpleShader *shd, double length) |
| | Sets the fade-in behaviour of a window. More...
|
| |
| unsigned int | window_get (const char *wdwname) |
| | Gets the ID of a window. More...
|
| |
| unsigned int | window_create (const char *name, const char *displayname, const int x, const int y, const int w, const int h) |
| | Creates a window. More...
|
| |
| unsigned int | window_createFlags (const char *name, const char *displayname, const int x, const int y, const int w, const int h, unsigned int flags) |
| | Creates a window. More...
|
| |
| void | window_setParent (unsigned int wid, unsigned int parent) |
| | Sets a window as a window's parent. More...
|
| |
| unsigned int | window_getParent (unsigned int wid) |
| | Gets the window's parent. More...
|
| |
| void | window_onClose (unsigned int wid, void(*fptr)(unsigned int, const char *)) |
| | Sets the default close function of the window. More...
|
| |
| void | window_onCleanup (unsigned int wid, void(*fptr)(unsigned int, const char *)) |
| | Sets the cleanup function of the window. More...
|
| |
| void | window_setAccept (unsigned int wid, void(*accept)(unsigned int, const char *)) |
| | Sets the default accept function of the window. More...
|
| |
| void | window_setCancel (unsigned int wid, void(*cancel)(unsigned int, const char *)) |
| | Sets the default cancel function of the window. More...
|
| |
| void | window_setData (unsigned int wid, void *data) |
| | Sets custom data for a window. More...
|
| |
| void * | window_getData (unsigned int wid) |
| | Gets the custom data of a window. More...
|
| |
| void | window_setBorder (unsigned int wid, int enable) |
| | Sets or removes the border of a window. More...
|
| |
| void | window_handleKeys (unsigned int wid, int(*keyhandler)(unsigned int, SDL_Keycode, SDL_Keymod)) |
| | Sets the key handler for the window. More...
|
| |
| void | window_handleEvents (unsigned int wid, int(*eventhandler)(unsigned int, SDL_Event *)) |
| | Sets the event handler for the window. More...
|
| |
| void | widget_cleanup (Widget *widget) |
| | Destroys a widget. More...
|
| |
| void | toolkit_closeAll (void) |
| | Closes all open toolkit windows. More...
|
| |
| void | window_close (unsigned int wid, const char *str) |
| | Helper function to automatically close the window calling it. More...
|
| |
| void | window_destroy (unsigned int wid) |
| | Kills the window. More...
|
| |
| void | window_kill (Window *wdw) |
| | Kills the window (and children). More...
|
| |
| int | widget_exists (unsigned int wid, const char *wgtname) |
| | Checks to see if a widget exists. More...
|
| |
| void | window_destroyWidget (unsigned int wid, const char *wgtname) |
| | Destroys a widget in a window. More...
|
| |
| void | toolkit_drawOutlineThick (int x, int y, int w, int h, int b, int thick, const glColour *c, const glColour *lc) |
| | Draws an outline. More...
|
| |
| void | toolkit_drawOutline (int x, int y, int w, int h, int b, const glColour *c, const glColour *lc) |
| | Draws an outline. More...
|
| |
| void | toolkit_drawRect (int x, int y, int w, int h, const glColour *c, const glColour *lc) |
| | Draws a rectangle. More...
|
| |
| void | toolkit_drawTriangle (int x1, int y1, int x2, int y2, int x3, int y3, const glColour *c) |
| | Draws a rectangle. More...
|
| |
| void | toolkit_drawAltText (int bx, int by, const char *alt) |
| | Draws an alt text. More...
|
| |
| void | window_render (Window *w) |
| | Renders a window. More...
|
| |
| void | window_renderOverlay (Window *w) |
| | Renders the window overlays. More...
|
| |
| void | toolkit_drawScrollbar (int x, int y, int w, int h, double pos) |
| | Draws a scrollbar. More...
|
| |
| void | toolkit_render (double dt) |
| | Renders the windows. More...
|
| |
| int | toolkit_input (SDL_Event *event) |
| | Toolkit input handled here. More...
|
| |
| int | toolkit_inputWindow (Window *wdw, SDL_Event *event, int purge) |
| | Toolkit window input is handled here. More...
|
| |
| Uint32 | toolkit_inputTranslateCoords (Window *w, SDL_Event *event, int *x, int *y, int *rx, int *ry) |
| | Translates the mouse coordinates. More...
|
| |
| static int | toolkit_mouseEventSingle (Window *w, SDL_Event *event, Widget *wgt, int x, int y, int rx, int ry) |
| |
| static int | toolkit_mouseEventReverse (Window *w, SDL_Event *event, Widget *wgt, int x, int y, int rx, int ry) |
| |
| static SDL_Keymod | toolkit_mapMod (SDL_Keycode key) |
| | Maps modifier keysyms (ctrl, alt, shift) to SDL_Keymods. More...
|
| |
| static void | toolkit_regKey (SDL_Keycode key) |
| | Registers a key as down (for key repetition). More...
|
| |
| static void | toolkit_unregKey (SDL_Keycode key) |
| | Unregisters a key. More...
|
| |
| void | toolkit_clearKey (void) |
| | Clears the registered keys. More...
|
| |
| void | toolkit_update (void) |
| | Updates the toolkit input for repeating keys. More...
|
| |
| void | toolkit_focusClear (Window *wdw) |
| | Clears the window focus. More...
|
| |
| void | toolkit_focusSanitize (Window *wdw) |
| | Sanitizes the focus of a window. More...
|
| |
| void | toolkit_nextFocus (Window *wdw) |
| | Focus next widget. More...
|
| |
| void | toolkit_prevFocus (Window *wdw) |
| | Focus previous widget. More...
|
| |
| void | toolkit_focusWidget (Window *wdw, Widget *wgt) |
| | Focuses a widget in a window. No-op if it's not focusable or already focused. More...
|
| |
| void | toolkit_defocusWidget (Window *wdw, Widget *wgt) |
| | Defocuses the focused widget in a window. No-op if it's not (de)focusable or already defocused, else voids the window's focus. More...
|
| |
| Window * | toolkit_getActiveWindow (void) |
| | Gets the active window in the toolkit. More...
|
| |
| void | window_setFocus (unsigned int wid, const char *wgtname) |
| | Sets the focused widget in a window. More...
|
| |
| char * | window_getFocus (unsigned int wid) |
| | Gets the focused widget in a window (does strdup!!). More...
|
| |
| void | window_raise (unsigned int wid) |
| | Raises a window (causes all other windows to appear below it). More...
|
| |
| void | window_lower (unsigned int wid) |
| | Lowers a window (causes all other windows to appear above it). More...
|
| |
| void | toolkit_reposition (void) |
| | Repositions windows and their children if resolution changes. More...
|
| |
| int | toolkit_init (void) |
| | Initializes the toolkit. More...
|
| |
| void | toolkit_exit (void) |
| | Exits the toolkit. More...
|
| |