aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/async_image.h6
-rw-r--r--include/mgui/mgui.h8
-rw-r--r--include/mgui/richtext.h3
-rw-r--r--include/mgui/scrollview.h6
4 files changed, 14 insertions, 9 deletions
diff --git a/include/async_image.h b/include/async_image.h
index a108d5e..39e0bc6 100644
--- a/include/async_image.h
+++ b/include/async_image.h
@@ -27,11 +27,11 @@ struct mgui_async_image {
};
/* Do not call this manually */
-void mgui_async_image_init();
+void mgui_async_image_init(void);
/* Do not call this manually */
-void mgui_async_image_deinit();
+void mgui_async_image_deinit(void);
/* Do not call this manually */
-void mgui_async_image_unload_unreferenced();
+void mgui_async_image_unload_unreferenced(void);
/*
Increases reference count by 1 every time this is called.
diff --git a/include/mgui/mgui.h b/include/mgui/mgui.h
index cb018d5..024a062 100644
--- a/include/mgui/mgui.h
+++ b/include/mgui/mgui.h
@@ -5,14 +5,14 @@ typedef struct mgui_widget mgui_widget;
typedef struct mgl_event mgl_event;
typedef struct mgl_window mgl_window;
-void mgui_init();
-void mgui_deinit();
+void mgui_init(void);
+void mgui_deinit(void);
void mgui_on_event(mgui_widget *root_widget, mgl_window *window, mgl_event *event);
/* This should only be called once every frame */
void mgui_draw(mgui_widget *root_widget, mgl_window *window);
/* Clamped to 1.0 second */
-double mgui_get_seconds_since_last_update();
+double mgui_get_seconds_since_last_update(void);
/* Clamped to 1.0 second */
-double mgui_get_frame_time_seconds();
+double mgui_get_frame_time_seconds(void);
#endif /* MGUI_H */
diff --git a/include/mgui/richtext.h b/include/mgui/richtext.h
index f3b07a5..98b46c6 100644
--- a/include/mgui/richtext.h
+++ b/include/mgui/richtext.h
@@ -21,7 +21,8 @@ typedef struct {
mgl_vec2i position;
mgl_vec2i render_size;
int width;
- mgui_richtext_vertex_data vertex_data[2];
+ mgui_richtext_vertex_data vertex_data[2]; /* size should match NUM_VERTEX_DATA */
+ /* TODO: Turn bools into flags */
bool dirty;
bool vertices_dirty;
} mgui_richtext;
diff --git a/include/mgui/scrollview.h b/include/mgui/scrollview.h
index dded990..76ae6d5 100644
--- a/include/mgui/scrollview.h
+++ b/include/mgui/scrollview.h
@@ -9,9 +9,13 @@ typedef struct {
mgl_vec2i position;
mgl_vec2i scroll;
mgl_vec2f mouse_scroll;
+ mgl_vec2f scrollbar_pos;
+ mgl_vec2f scrollbar_size;
+ mgl_vec2f scrollbar_move_prev_pos;
+ bool moving_scrollbar;
} mgui_scrollview;
-mgui_scrollview* mgui_scrollview_create();
+mgui_scrollview* mgui_scrollview_create(void);
void mgui_scrollview_destroy(mgui_scrollview *scrollview);
mgui_widget* mgui_scrollview_to_widget(mgui_scrollview *list);
mgui_scrollview* mgui_widget_to_scrollview(mgui_widget *widget);