summaryrefslogtreecommitdiff
path: root/src/ui/widget.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/widget.h')
-rw-r--r--src/ui/widget.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ui/widget.h b/src/ui/widget.h
index ab08a9b2..f126d40d 100644
--- a/src/ui/widget.h
+++ b/src/ui/widget.h
@@ -34,6 +34,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
34#include <the_Foundation/string.h> 34#include <the_Foundation/string.h>
35#include <SDL_events.h> 35#include <SDL_events.h>
36 36
37iDeclareType(Root) /* each widget is associated with a Root */
38
37#define iDeclareWidgetClass(className) \ 39#define iDeclareWidgetClass(className) \
38 iDeclareType(className); \ 40 iDeclareType(className); \
39 typedef iWidgetClass i##className##Class; \ 41 typedef iWidgetClass i##className##Class; \
@@ -138,6 +140,7 @@ struct Impl_Widget {
138 iObjectList *children; 140 iObjectList *children;
139 iWidget * parent; 141 iWidget * parent;
140 iBool (*commandHandler)(iWidget *, const char *); 142 iBool (*commandHandler)(iWidget *, const char *);
143 iRoot * root;
141}; 144};
142 145
143iDeclareObjectConstruction(Widget) 146iDeclareObjectConstruction(Widget)
@@ -166,7 +169,8 @@ void destroy_Widget (iWidget *); /* widget removed and deleted later
166void destroyPending_Widget (void); 169void destroyPending_Widget (void);
167void releaseChildren_Widget (iWidget *); 170void releaseChildren_Widget (iWidget *);
168 171
169const iString *id_Widget (const iWidget *); 172iWidget * root_Widget (const iWidget *);
173const iString * id_Widget (const iWidget *);
170int64_t flags_Widget (const iWidget *); 174int64_t flags_Widget (const iWidget *);
171iRect bounds_Widget (const iWidget *); /* outer bounds */ 175iRect bounds_Widget (const iWidget *); /* outer bounds */
172iRect innerBounds_Widget (const iWidget *); 176iRect innerBounds_Widget (const iWidget *);