diff options
author | StapleButter <thetotalworm@gmail.com> | 2017-10-03 00:28:41 +0200 |
---|---|---|
committer | StapleButter <thetotalworm@gmail.com> | 2017-10-03 00:28:41 +0200 |
commit | 7f05bf24ada9442bfcd4c9b10e44790d2319d629 (patch) | |
tree | aed1095b2ce6ca2065af790177caf421706b7baf /src/libui_sdl/libui/ui_unix.h | |
parent | 04e8bbaca3113c6975e371b81da5f389066ec8b3 (diff) |
libui/GTK: start catching up. atleast now it runs without exploding (mostly).
Diffstat (limited to 'src/libui_sdl/libui/ui_unix.h')
-rw-r--r-- | src/libui_sdl/libui/ui_unix.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libui_sdl/libui/ui_unix.h b/src/libui_sdl/libui/ui_unix.h index 5a91257..23bd538 100644 --- a/src/libui_sdl/libui/ui_unix.h +++ b/src/libui_sdl/libui/ui_unix.h @@ -80,6 +80,11 @@ _UI_EXTERN void uiUnixControlSetContainer(uiUnixControl *, GtkContainer *, gbool { \ gtk_widget_set_sensitive(type(c)->widget, FALSE); \ } +#define uiUnixControlDefaultSetFocus(type) \ + static void type ## SetFocus(uiControl *c) \ + { \ + gtk_widget_grab_focus(type(c)->widget); \ + } // TODO this whole addedBefore stuff is a MASSIVE HACK. #define uiUnixControlDefaultSetContainer(type) \ static void type ## SetContainer(uiUnixControl *c, GtkContainer *container, gboolean remove) \ @@ -106,6 +111,7 @@ _UI_EXTERN void uiUnixControlSetContainer(uiUnixControl *, GtkContainer *, gbool uiUnixControlDefaultEnabled(type) \ uiUnixControlDefaultEnable(type) \ uiUnixControlDefaultDisable(type) \ + uiUnixControlDefaultSetFocus(type) \ uiUnixControlDefaultSetContainer(type) #define uiUnixControlAllDefaults(type) \ @@ -126,6 +132,7 @@ _UI_EXTERN void uiUnixControlSetContainer(uiUnixControl *, GtkContainer *, gbool uiControl(var)->Enabled = type ## Enabled; \ uiControl(var)->Enable = type ## Enable; \ uiControl(var)->Disable = type ## Disable; \ + uiControl(var)->SetFocus = type ## SetFocus; \ uiUnixControl(var)->SetContainer = type ## SetContainer; // TODO document _UI_EXTERN uiUnixControl *uiUnixAllocControl(size_t n, uint32_t typesig, const char *typenamestr); |