6 #define WGT_AUTO (-0x4242)
16 typedef void (*wgt_callback)(struct wgt_widget*);
18 struct wgt_window *wgt_window(const char *title, int width, int height);
19 void wgt_destroy_window(struct wgt_window *win);
20 void wgt_destroy_widget(struct wgt_widget *w);
22 struct wgt_window *wgt_widget_window(struct wgt_widget *w);
23 struct wgt_rect *wgt_widget_rect(struct wgt_widget *w, struct wgt_rect *rect);
24 int wgt_xpos_after(struct wgt_widget *w, int pad);
25 int wgt_ypos_after(struct wgt_widget *w, int pad);
26 int wgt_string_size(struct wgt_window *win, const char *s, struct wgt_rect *rect);
28 struct wgt_widget *wgt_label(struct wgt_window *win, const char *text, int x, int y);
29 struct wgt_widget *wgt_button(struct wgt_window *win, const char *text, int x, int y,
30 int width, int height, wgt_callback clickfunc);
31 struct wgt_widget *wgt_checkbox(struct wgt_window *win, const char *text, int on,
32 int x, int y, int width, int height, wgt_callback modfunc);
33 struct wgt_widget *wgt_combo(struct wgt_window *win, const char **items, int num_items,
34 int sel, int x, int y, int width, int height, wgt_callback modfunc);
36 int wgt_combo_selected(struct wgt_widget *w);
37 const char *wgt_get_combo_item(struct wgt_widget *w, int idx);
39 #endif /* WIDGETS_H_ */