diff options
author | Olliver Schinagl <o.schinagl@ultimaker.com> | 2015-06-25 05:20:54 (GMT) |
---|---|---|
committer | Olliver Schinagl <o.schinagl@ultimaker.com> | 2015-06-25 05:20:54 (GMT) |
commit | 8777c17ad4278f4e24c7210f827f10408731a55f (patch) | |
tree | da457742e83d15d685491d572abd0200298c2284 /src/ui_widgets.h | |
parent | 1cdb21dfc1e577fb60b6a427aaf04c9b408b5d9d (diff) | |
download | eulogium-8777c17ad4278f4e24c7210f827f10408731a55f.zip eulogium-8777c17ad4278f4e24c7210f827f10408731a55f.tar.gz eulogium-8777c17ad4278f4e24c7210f827f10408731a55f.tar.bz2 |
rename generic widget_data to ui_widgets
Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>
Diffstat (limited to 'src/ui_widgets.h')
-rw-r--r-- | src/ui_widgets.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/src/ui_widgets.h b/src/ui_widgets.h new file mode 100644 index 0000000..2cab4bc --- /dev/null +++ b/src/ui_widgets.h @@ -0,0 +1,75 @@ +/* + * function and data types for widgets + * + * Copyright (c) 2015 Ultimaker B.V. + * Author: Olliver Schinagl <o.schinagl@ultimaker.com> + * + * SPDX-License-Identifier: AGPL-3.0+ + */ + +#ifndef _WIDGET_DATA_H +#define _WIDGET_DATA_H + +#include <Ecore.h> +#include <Eina.h> +#include <Evas.h> +#include <stdint.h> + +#include "dbus_common.h" +#include "eulogium_item_list.h" + +struct button_cb { + void (*func)(void *data, Evas_Object *object, void *event_info); + void *data; + const char *info; +}; + +struct button_def { + const char *text; + struct button_cb cb; + void *data; +}; + +struct dir_entry_def { + void *data; + char *path; +}; + +struct wifi_entry_def { + void *data; + char *ssid; +}; + +struct menu_entry_def { + const char *icon; + const char *label; + struct list_item item; + struct dbus_handle dbus; + Eina_Bool *end; /* remove me */ + const char *footer; /* Primary footer */ + const char *footer_alt; /* Alternating footer */ + Ecore_Timer *toggle_timer; + void (*func)(void *data, Evas_Object *object, void *event_info); + void *data; +}; + +enum list_type { + LIST_MENU, + LIST_FILE, + LIST_WIFI, +}; + +struct menu_def { + const char *title; + enum list_type type; + void *data; + struct dir_entry_def dir; + struct wifi_entry_def wifi; /* TODO see if we can put this into a union somehow */ + struct menu_entry_def entry[]; +}; + +void eulogium_button_cb_set(struct button_def *button, struct button_cb *cb); +void eulogium_button_cb_data_set(struct button_def *button, void *data); +void eulogium_button_data_set(struct button_def *button, void *data); + +#endif /* _WIDGET_DATA_H */ |