widget disabling and autosize with minimum
[instimg] / src / widgets.h
index a81da8f..33cd490 100644 (file)
@@ -3,7 +3,8 @@
 
 #include <windows.h>
 
-#define WGT_AUTO       (-0x4242)
+#define WGT_AUTO               (-0x4242)
+#define WGT_AUTOMIN(x) (-x)
 
 struct wgt_window;
 struct wgt_widget;
@@ -19,6 +20,9 @@ struct wgt_window *wgt_window(const char *title, int width, int height);
 void wgt_destroy_window(struct wgt_window *win);
 void wgt_destroy_widget(struct wgt_widget *w);
 
+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);
 int wgt_xpos_after(struct wgt_widget *w, int pad);
@@ -36,4 +40,4 @@ struct wgt_widget *wgt_combo(struct wgt_window *win, const char **items, int num
 int wgt_combo_selected(struct wgt_widget *w);
 const char *wgt_get_combo_item(struct wgt_widget *w, int idx);
 
-#endif /* WIDGETS_H_ */
\ No newline at end of file
+#endif /* WIDGETS_H_ */