40 #include <cx/array_list.h> |
40 #include <cx/array_list.h> |
41 |
41 |
42 #ifdef __cplusplus |
42 #ifdef __cplusplus |
43 extern "C" { |
43 extern "C" { |
44 #endif |
44 #endif |
45 |
45 |
46 #define ui_reset_layout(layout) memset(&(layout), 0, sizeof(UiLayout)) |
46 #define ui_reset_layout(layout) memset(&(layout), 0, sizeof(UiLayout)) |
47 #define ui_lb2bool(b) ((b) == UI_LAYOUT_TRUE ? TRUE : FALSE) |
47 #define ui_lb2bool(b) ((b) == UI_LAYOUT_TRUE ? TRUE : FALSE) |
48 #define ui_bool2lb(b) ((b) ? UI_LAYOUT_TRUE : UI_LAYOUT_FALSE) |
48 #define ui_bool2lb(b) ((b) ? UI_LAYOUT_TRUE : UI_LAYOUT_FALSE) |
49 |
49 |
50 typedef void (*ui_container_add_f)(UiContainer*, GtkWidget*, UiBool); |
50 typedef void (*ui_container_add_f)(UiContainer*, GtkWidget*, UiBool); |
51 |
51 |
52 typedef struct UiDocumentView UiDocumentView; |
52 typedef struct UiDocumentView UiDocumentView; |
53 |
53 |
54 typedef struct UiLayout UiLayout; |
54 |
55 typedef enum UiLayoutBool UiLayoutBool; |
55 typedef enum UiLayoutBool { |
56 |
|
57 enum UiLayoutBool { |
|
58 UI_LAYOUT_UNDEFINED = 0, |
56 UI_LAYOUT_UNDEFINED = 0, |
59 UI_LAYOUT_TRUE, |
57 UI_LAYOUT_TRUE, |
60 UI_LAYOUT_FALSE, |
58 UI_LAYOUT_FALSE, |
61 }; |
59 } UiLayoutBool; |
62 |
60 |
|
61 typedef struct UiLayout UiLayout; |
63 struct UiLayout { |
62 struct UiLayout { |
64 UiLayoutBool fill; |
63 UiLayoutBool fill; |
65 UiBool newline; |
64 UiBool newline; |
66 char *label; |
65 char *label; |
67 UiBool hexpand; |
66 UiBool hexpand; |