[wip] change gui/widget api

This commit is contained in:
aanper
2020-10-15 11:32:48 +03:00
parent f2a38cf174
commit 19ef348c80
4 changed files with 55 additions and 56 deletions

View File

@@ -1,12 +1,18 @@
#pragma once
#include "widget.h"
typedef enum {
WidgetLayerStatusBar,
WidgetLayerMain,
WidgetLayerFullscreen,
WidgetLayerDialog
} WidgetLayer;
typedef struct Widget Widget;
typedef struct GUI GUI;
void gui_widget_status_bar_add(GUI* gui, Widget* widget);
void gui_widget_add(GUI* gui, Widget* widget);
void gui_widget_fs_add(GUI* gui, Widget* widget);
void gui_widget_dialog_add(GUI* gui, Widget* widget);
typedef struct {
void (*add_widget)(GUI* gui, Widget* widget, WidgetLayer layer);
GUI* gui;
} GuiApi;