BSB Developer Docs
Loading...
Searching...
No Matches
busy_theme.h
1#pragma once
2
3#include <m-core.h>
4
5#include "storage_macros.h"
6
7#define BUSY_THEMES_DIR BUSY_ASSETS_PATH("themes")
8
9#define BUSY_THEME_INIT(a) ((a) = busy_theme_alloc())
10#define BUSY_THEME_INIT_SET(a, b) ((a) = busy_theme_alloc_set(b))
11#define BUSY_THEME_OPLIST \
12 (INIT(BUSY_THEME_INIT), \
13 INIT_SET(BUSY_THEME_INIT_SET), \
14 SET(busy_theme_set), \
15 CLEAR(busy_theme_free), \
16 EQUAL(busy_theme_is_equal), \
17 CMP(busy_theme_cmp), \
18 SWAP(busy_theme_swap), \
19 TYPE(BusyTheme*))
20
21typedef struct BusyTheme BusyTheme;
22
23typedef enum {
24 BusyThemeFileTypeImage,
25 BusyThemeFileTypeAnim,
26 BusyThemeFileTypeMax,
27} BusyThemeFileType;
28
29typedef struct {
30 const char* name;
31 const char* bg_path;
32 BusyThemeFileType bg_type;
33 uint32_t order;
35
36BusyTheme* busy_theme_alloc(void);
37
38BusyTheme* busy_theme_alloc_default(void);
39
40BusyTheme* busy_theme_alloc_set(const BusyTheme* other);
41
42void busy_theme_free(BusyTheme* instance);
43
44void busy_theme_set(BusyTheme* instance, const BusyTheme* other);
45
46bool busy_theme_read(BusyTheme* instance, const char* name);
47
48const char* busy_theme_get_name(const BusyTheme* instance);
49
50uint32_t busy_theme_get_order(const BusyTheme* instance);
51
52void busy_theme_get_info(const BusyTheme* instance, BusyThemeInfo* info);
53
54void busy_theme_set_default(BusyTheme* instance);
55
56bool busy_theme_is_default(const BusyTheme* instance);
57
58bool busy_theme_is_equal(const BusyTheme* instance, const BusyTheme* other);
59
60int busy_theme_cmp(const BusyTheme* a, const BusyTheme* b);
61
62void busy_theme_swap(BusyTheme* a, BusyTheme* b);
Definition busy_theme.c:14
Definition busy_theme.h:29