typedef void (*wgt_callback)(struct wgt_widget*);
+/* returns {win32: HWND, !win32: 0} */
+void *wgt_window_handle(struct wgt_window *win);
+void *wgt_widget_handle(struct wgt_widget *w);
+/* returns {UNIX: Window, !UNIX: 0} */
+unsigned int wgt_window_xid(struct wgt_window *win);
+unsigned int wgt_widget_xid(struct wgt_widget *w);
+
+
struct wgt_window *wgt_window(const char *title, int width, int height);
void wgt_destroy_window(struct wgt_window *win);
+void wgt_free_window(struct wgt_window *win); /* destroy and then free(win) */
void wgt_destroy_widget(struct wgt_widget *w);
+void wgt_resize_window(struct wgt_window *win, int width, int height);
+
+void wgt_quit_on_close(struct wgt_window *win, int quit);
+void wgt_close_action(struct wgt_window *win, int (*func)(struct wgt_window*));
+
void wgt_enable_widget(struct wgt_widget *w);
void wgt_disable_widget(struct wgt_widget *w);
int wgt_widget_enabled(struct wgt_widget *w);
struct wgt_window *wgt_widget_window(struct wgt_widget *w);
struct wgt_rect *wgt_widget_rect(struct wgt_widget *w, struct wgt_rect *rect);
+void wgt_move_widget(struct wgt_widget *w, int x, int y);
+void wgt_resize_widget(struct wgt_widget *w, int width, int height);
int wgt_xpos_after(struct wgt_widget *w, int pad);
int wgt_ypos_after(struct wgt_widget *w, int pad);
int wgt_string_size(struct wgt_window *win, const char *s, struct wgt_rect *rect);
int x, int y, int width, int height, wgt_callback modfunc);
struct wgt_widget *wgt_combo(struct wgt_window *win, const char **items, int num_items,
int sel, int x, int y, int width, int height, wgt_callback modfunc);
+struct wgt_widget *wgt_progbar(struct wgt_window *win, int x, int y, int width, int height, int p);
+
+void wgt_set_text(struct wgt_widget *w, const char *text);
void wgt_checkbox_check(struct wgt_widget *w);
void wgt_checkbox_uncheck(struct wgt_widget *w);
int wgt_combo_selected(struct wgt_widget *w);
const char *wgt_get_combo_item(struct wgt_widget *w, int idx);
+void wgt_set_progress(struct wgt_widget *w, int p);
+
#endif /* WIDGETS_H_ */