BSB Developer Docs
Loading...
Searching...
No Matches
theme_picker.h
Go to the documentation of this file.
1
5#pragma once
6
7#include <gui/widget.h>
8
9#include "../helpers/theme_picker_model.h"
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
16typedef struct ThemePicker ThemePicker;
17
24typedef void (*ThemePickerCallback)(uint32_t index, void* context);
25
34
40void theme_picker_free(ThemePicker* instance);
41
51
59void theme_picker_set_callback(ThemePicker* instance, ThemePickerCallback callback, void* context);
60
67void theme_picker_set_model(ThemePicker* instance, const ThemePickerModel* model);
68
77void theme_picker_set_current_item(ThemePicker* instance, uint32_t index);
78
79#ifdef __cplusplus
80}
81#endif
Definition theme_picker.c:14
Definition theme_picker_model.c:7
Definition widget_i.h:35
void theme_picker_free(ThemePicker *instance)
Delete a ThemePicker instance.
Definition theme_picker.c:153
void theme_picker_set_model(ThemePicker *instance, const ThemePickerModel *model)
Set the model to show in this ThemePicker instance.
Definition theme_picker.c:163
ThemePicker * theme_picker_alloc(Widget *parent)
Create a new ThemePicker instance.
Definition theme_picker.c:143
void theme_picker_set_callback(ThemePicker *instance, ThemePickerCallback callback, void *context)
Set the function to be called upon theme selection.
Definition theme_picker.c:171
void(* ThemePickerCallback)(uint32_t index, void *context)
ThemePickerCallback function type.
Definition theme_picker.h:24
void theme_picker_set_current_item(ThemePicker *instance, uint32_t index)
Set the currently selected item index.
Definition theme_picker.c:178
Widget * theme_picker_get_base(ThemePicker *instance)
Get a pointer to the base class instance.
Definition theme_picker.c:158
Base widget class.