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