-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathappletmenuconfig.h
More file actions
80 lines (64 loc) · 2.31 KB
/
appletmenuconfig.h
File metadata and controls
80 lines (64 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
* File: appletmenuconfig.h
* Author: Sir Gee of Five
*
* Created on May 21, 2011, 11:03 AM
*/
#ifndef APPLETMENUCONFIG_H
#define APPLETMENUCONFIG_H
#include "colorconfig.h"
#include "dimension.h"
#include "cursorpos.h"
/** Indicates success. */
#define APPLETMENUCONFIG_SUCCESS (0)
/** Indicates failure. */
#define APPLETMENUCONFIG_FAILURE (-1)
/** Indicates a NULL pointer. */
#define APPLETMENUCONFIG_NULLPTR (-2)
/** Indicates a memory error. */
#define APPLETMENUCONFIG_MEMORY (-3)
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _AppletMenuConfig {
/** ColorConfig struct representing the base color. */
ColorConfig color;
/** ColorConfig struct representing the cursor color. */
ColorConfig cursor;
/** Dimension struct representing the size of the menu. */
Dimension size;
/** CursorPos struct representing the top left corner of the menu. */
CursorPos top;
}
/** The AppletMenuConfig struct is used to represent the Applet Menu
* Configuration.
*/
AppletMenuConfig;
ColorConfig* appletmenuconfig_get_cursorcolor(AppletMenuConfig* prConfig);
ColorConfig* appletmenuconfig_get_panelcolor(AppletMenuConfig* prConfig);
/** Return a pointer to a CursorPos struct representing the position of
* an Applet Menu on the Debug screen.
*
* @param prConfig Pointer to an AppletMenuConfig struct representing the
* Applet Menu Configuration.
* @return A pointer to a CursorPos struct or NULL is returned.
*/
CursorPos* appletmenuconfig_get_position(AppletMenuConfig* prConfig);
/** Return a pointer to a Dimension struct representing the size of an
* Applet Menu on the Debug screen.
*
* @param prConfig Pointer to an AppletMenuConfig struct representing the
* Applet Menu Configuration.
* @return A pointer to a Dimension struct or NULL is returned.
*/
Dimension* appletmenuconfig_get_size(AppletMenuConfig* prConfig);
/** Initialize an Applet Menu Configuration.
*
* @param prConfig Pointer to the AppletMenuConfig struct to initialize.
* @return 0 indicates success, <0 indicates failure.
*/
int appletmenuconfig_init(AppletMenuConfig* prConfig);
#ifdef __cplusplus
}
#endif
#endif /* APPLETMENUCONFIG_H */