Improving doxygen

ugfx_release_2.6
Joel Bodenmann 2015-08-16 00:42:22 +02:00
parent 668b161f0e
commit ef813f44d3
4 changed files with 100 additions and 95 deletions

View File

@ -53,7 +53,7 @@ typedef struct point {
} point, point_t;
/**
* @enum justify_t
* @enum justify
* @brief Type for the text justification.
*/
typedef enum justify {
@ -63,7 +63,7 @@ typedef enum justify {
} justify_t;
/**
* @enum fontmetric_t
* @enum fontmetric
* @brief Type for the font metric.
*/
typedef enum fontmetric {
@ -111,7 +111,7 @@ typedef enum powermode {
/*
* Our black box display structure.
*/
typedef struct GDisplay GDisplay;
typedef struct GDisplay GDisplay;
/**
* @brief The default screen to use for the gdispXXXX calls.

View File

@ -38,19 +38,22 @@ typedef struct GWindowObject *GHandle;
typedef struct GWindowObject {
#if GWIN_NEED_WINDOWMANAGER
// This MUST be the first member of the structure
gfxQueueASyncItem wmq; // @< The next window (for the window manager)
gfxQueueASyncItem wmq; /**< The next window (for the window manager) */
#endif
const struct gwinVMT *vmt; // @< The VMT for this GWIN
GDisplay * display; // @< The display this window is on.
coord_t x, y; // @< Screen relative position
coord_t width, height; // @< Dimensions of this window
color_t color, bgcolor; // @< The current drawing colors
uint32_t flags; // @< Window flags (the meaning is private to the GWIN class)
const struct gwinVMT* vmt; /**< The VMT for this GWIN */
GDisplay * display; /**< The display this window is on */
coord_t x; /**< The position relative to the screen */
coord_t y; /**< The position relative to the screen */
coord_t width; /**< The width of this window */
coord_t height; /**< The height of this window */
color_t color; /**< The current foreground drawing color */
color_t bgcolor; /**< The current background drawing color */
uint32_t flags; /**< Window flags (the meaning is private to the GWIN class) */
#if GDISP_NEED_TEXT
font_t font; // @< The current font
font_t font; /**< The current font */
#endif
#if GWIN_NEED_CONTAINERS
GHandle parent; // @< The parent window
GHandle parent; /**< The parent window */
#endif
} GWindowObject, * GHandle;
/** @} */
@ -68,11 +71,13 @@ typedef struct GWindowObject {
* @{
*/
typedef struct GWindowInit {
coord_t x, y; // @< The initial position relative to its parent
coord_t width, height; // @< The initial dimension
bool_t show; // @< Should the window be visible initially
coord_t x; /**< The initial position relative to its parent */
coord_t y; /**< The initial position relative to its parent */
coord_t width; /**< The width */
coord_t height; /**< The height */
bool_t show; /**< Should the window be visible initially */
#if GWIN_NEED_CONTAINERS
GHandle parent; // @< The parent - must be a container or NULL
GHandle parent; /**< The parent - must be a container or NULL */
#endif
} GWindowInit;
/** @} */

View File

@ -31,25 +31,25 @@
* @brief The predefined flags for a Window
* @{
*/
#define GWIN_FIRST_CONTROL_FLAG 0x00000001 // @< 8 bits free for the control to use
#define GWIN_LAST_CONTROL_FLAG 0x00000080 // @< 8 bits free for the control to use
#define GWIN_FLG_VISIBLE 0x00000100 // @< The window is "visible"
#define GWIN_FLG_SYSVISIBLE 0x00000200 // @< The window is visible after parents are tested
#define GWIN_FLG_ENABLED 0x00000400 // @< The window is "enabled"
#define GWIN_FLG_SYSENABLED 0x00000800 // @< The window is enabled after parents are tested
#define GWIN_FLG_DYNAMIC 0x00001000 // @< The GWIN structure is allocated
#define GWIN_FLG_ALLOCTXT 0x00002000 // @< The text/label is allocated
#define GWIN_FLG_NEEDREDRAW 0x00004000 // @< Redraw is needed but has been delayed
#define GWIN_FLG_BGREDRAW 0x00008000 // @< On redraw, if not visible redraw the revealed under-side
#define GWIN_FLG_SUPERMASK 0x000F0000 // @< The bit mask to leave just the window superclass type
#define GWIN_FLG_WIDGET 0x00010000 // @< This is a widget
#define GWIN_FLG_CONTAINER 0x00020000 // @< This is a container
#define GWIN_FLG_MINIMIZED 0x00100000 // @< The window is minimized
#define GWIN_FLG_MAXIMIZED 0x00200000 // @< The window is maximized
#define GWIN_FLG_MOUSECAPTURE 0x00400000 // @< The window has captured the mouse
#define GWIN_FLG_FLASHING 0x00800000 // @< The window is flashing - see the _gwinFlashState boolean
#define GWIN_FIRST_WM_FLAG 0x01000000 // @< 8 bits free for the window manager to use
#define GWIN_LAST_WM_FLAG 0x80000000 // @< 8 bits free for the window manager to use
#define GWIN_FIRST_CONTROL_FLAG 0x00000001 /**< 8 bits free for the control to use */
#define GWIN_LAST_CONTROL_FLAG 0x00000080 /**< 8 bits free for the control to use */
#define GWIN_FLG_VISIBLE 0x00000100 /**< The window is "visible" */
#define GWIN_FLG_SYSVISIBLE 0x00000200 /**< The window is visible after parents are tested */
#define GWIN_FLG_ENABLED 0x00000400 /**< The window is "enabled" */
#define GWIN_FLG_SYSENABLED 0x00000800 /**< The window is enabled after parents are tested */
#define GWIN_FLG_DYNAMIC 0x00001000 /**< The GWIN structure is allocated */
#define GWIN_FLG_ALLOCTXT 0x00002000 /**< The text/label is allocated */
#define GWIN_FLG_NEEDREDRAW 0x00004000 /**< Redraw is needed but has been delayed */
#define GWIN_FLG_BGREDRAW 0x00008000 /**< On redraw, if not visible redraw the revealed under-side */
#define GWIN_FLG_SUPERMASK 0x000F0000 /**< The bit mask to leave just the window superclass type */
#define GWIN_FLG_WIDGET 0x00010000 /**< This is a widget */
#define GWIN_FLG_CONTAINER 0x00020000 /**< This is a container */
#define GWIN_FLG_MINIMIZED 0x00100000 /**< The window is minimized */
#define GWIN_FLG_MAXIMIZED 0x00200000 /**< The window is maximized */
#define GWIN_FLG_MOUSECAPTURE 0x00400000 /**< The window has captured the mouse */
#define GWIN_FLG_FLASHING 0x00800000 /**< The window is flashing - see the _gwinFlashState boolean */
#define GWIN_FIRST_WM_FLAG 0x01000000 /**< 8 bits free for the window manager to use */
#define GWIN_LAST_WM_FLAG 0x80000000 /**< 8 bits free for the window manager to use */
/** @} */
/**
@ -57,11 +57,11 @@
* @{
*/
typedef struct gwinVMT {
const char * classname; // @< The GWIN classname (mandatory)
size_t size; // @< The size of the class object
void (*Destroy) (GWindowObject *gh); // @< The GWIN destroy function (optional)
void (*Redraw) (GWindowObject *gh); // @< The GWIN redraw routine (optional)
void (*AfterClear) (GWindowObject *gh); // @< The GWIN after-clear function (optional)
const char * classname; /**< The GWIN classname (mandatory) */
size_t size; /**< The size of the class object */
void (*Destroy) (GWindowObject *gh); /**< The GWIN destroy function (optional) */
void (*Redraw) (GWindowObject *gh); /**< The GWIN redraw routine (optional) */
void (*AfterClear) (GWindowObject *gh); /**< The GWIN after-clear function (optional) */
} gwinVMT;
/** @} */
@ -87,35 +87,35 @@ typedef struct gwinVMT {
* @{
*/
typedef struct gwidgetVMT {
struct gwinVMT g; // @< This is still a GWIN
void (*DefaultDraw) (GWidgetObject *gw, void *param); // @< The default drawing routine (mandatory)
struct gwinVMT g; /**< This is still a GWIN */
void (*DefaultDraw) (GWidgetObject *gw, void *param); /**< The default drawing routine (mandatory) */
#if GINPUT_NEED_MOUSE
struct {
void (*MouseDown) (GWidgetObject *gw, coord_t x, coord_t y); // @< Process mouse down events (optional)
void (*MouseUp) (GWidgetObject *gw, coord_t x, coord_t y); // @< Process mouse up events (optional)
void (*MouseMove) (GWidgetObject *gw, coord_t x, coord_t y); // @< Process mouse move events (optional)
void (*MouseDown) (GWidgetObject *gw, coord_t x, coord_t y); /**< Process mouse down events (optional) */
void (*MouseUp) (GWidgetObject *gw, coord_t x, coord_t y); /**< Process mouse up events (optional) */
void (*MouseMove) (GWidgetObject *gw, coord_t x, coord_t y); /**< Process mouse move events (optional) */
};
#endif
#if GINPUT_NEED_KEYBOARD
struct {
void (*KeyboardEvent) (GWidgetObject *gw, GEventKeyboard *pke); // @< Process keyboard events (optional)
void (*KeyboardEvent) (GWidgetObject *gw, GEventKeyboard *pke); /**< Process keyboard events (optional) */
};
#endif
#if GINPUT_NEED_TOGGLE
struct {
uint16_t toggleroles; // @< The roles supported for toggles (0->toggleroles-1)
void (*ToggleAssign) (GWidgetObject *gw, uint16_t role, uint16_t instance); // @< Assign a toggle to a role (optional)
uint16_t (*ToggleGet) (GWidgetObject *gw, uint16_t role); // @< Return the instance for a particular role (optional)
void (*ToggleOff) (GWidgetObject *gw, uint16_t role); // @< Process toggle off events (optional)
void (*ToggleOn) (GWidgetObject *gw, uint16_t role); // @< Process toggle on events (optional)
uint16_t toggleroles; /**< The roles supported for toggles (0->toggleroles-1) */
void (*ToggleAssign) (GWidgetObject *gw, uint16_t role, uint16_t instance); /**< Assign a toggle to a role (optional) */
uint16_t (*ToggleGet) (GWidgetObject *gw, uint16_t role); /**< Return the instance for a particular role (optional) */
void (*ToggleOff) (GWidgetObject *gw, uint16_t role); /**< Process toggle off events (optional) */
void (*ToggleOn) (GWidgetObject *gw, uint16_t role); /**< Process toggle on events (optional) */
};
#endif
#if GINPUT_NEED_DIAL
struct {
uint16_t dialroles; // @< The roles supported for dials (0->dialroles-1)
void (*DialAssign) (GWidgetObject *gw, uint16_t role, uint16_t instance); // @< Test the role and save the dial instance handle (optional)
uint16_t (*DialGet) (GWidgetObject *gw, uint16_t role); // @< Return the instance for a particular role (optional)
void (*DialMove) (GWidgetObject *gw, uint16_t role, uint16_t value, uint16_t max); // @< Process dial move events (optional)
uint16_t dialroles; /**< The roles supported for dials (0->dialroles-1) */
void (*DialAssign) (GWidgetObject *gw, uint16_t role, uint16_t instance); /**< Test the role and save the dial instance handle (optional) */
uint16_t (*DialGet) (GWidgetObject *gw, uint16_t role); /**< Return the instance for a particular role (optional) */
void (*DialMove) (GWidgetObject *gw, uint16_t role, uint16_t value, uint16_t max); /**< Process dial move events (optional) */
};
#endif
} gwidgetVMT;
@ -135,12 +135,12 @@ typedef struct gwinVMT {
*/
typedef struct gcontainerVMT {
gwidgetVMT gw;
coord_t (*LeftBorder) (GHandle gh); // @< The size of the left border (mandatory)
coord_t (*TopBorder) (GHandle gh); // @< The size of the top border (mandatory)
coord_t (*RightBorder) (GHandle gh); // @< The size of the right border (mandatory)
coord_t (*BottomBorder) (GHandle gh); // @< The size of the bottom border (mandatory)
void (*NotifyAdd) (GHandle gh, GHandle ghChild); // @< Notification that a child has been added (optional)
void (*NotifyDelete) (GHandle gh, GHandle ghChild); // @< Notification that a child has been deleted (optional)
coord_t (*LeftBorder) (GHandle gh); /**< The size of the left border (mandatory) */
coord_t (*TopBorder) (GHandle gh); /**< The size of the top border (mandatory) */
coord_t (*RightBorder) (GHandle gh); /**< The size of the right border (mandatory) */
coord_t (*BottomBorder) (GHandle gh); /**< The size of the bottom border (mandatory) */
void (*NotifyAdd) (GHandle gh, GHandle ghChild); /**< Notification that a child has been added (optional) */
void (*NotifyDelete) (GHandle gh, GHandle ghChild); /**< Notification that a child has been deleted (optional) */
} gcontainerVMT;
/** @} */
#endif
@ -156,22 +156,22 @@ typedef struct gwinVMT {
* @{
*/
typedef struct gwmVMT {
void (*Init) (void); // @< The window manager has just been set as the current window manager
void (*DeInit) (void); // @< The window manager has just been removed as the current window manager
bool_t (*Add) (GHandle gh, const GWindowInit *pInit); // @< A window has been added
void (*Delete) (GHandle gh); // @< A window has been deleted
void (*Redraw) (GHandle gh); // @< A window needs to be redraw (or undrawn)
void (*Size) (GHandle gh, coord_t w, coord_t h); // @< A window wants to be resized
void (*Move) (GHandle gh, coord_t x, coord_t y); // @< A window wants to be moved
void (*Raise) (GHandle gh); // @< A window wants to be on top
void (*MinMax) (GHandle gh, GWindowMinMax minmax); // @< A window wants to be minimized/maximised
void (*Init) (void); /**< The window manager has just been set as the current window manager */
void (*DeInit) (void); /**< The window manager has just been removed as the current window manager */
bool_t (*Add) (GHandle gh, const GWindowInit *pInit); /**< A window has been added */
void (*Delete) (GHandle gh); /**< A window has been deleted */
void (*Redraw) (GHandle gh); /**< A window needs to be redraw (or undrawn) */
void (*Size) (GHandle gh, coord_t w, coord_t h); /**< A window wants to be resized */
void (*Move) (GHandle gh, coord_t x, coord_t y); /**< A window wants to be moved */
void (*Raise) (GHandle gh); /**< A window wants to be on top */
void (*MinMax) (GHandle gh, GWindowMinMax minmax); /**< A window wants to be minimized/maximised */
} gwmVMT;
/** @} */
/**
* @brief The current window manager
*/
extern GWindowManager * _GWINwm;
extern GWindowManager* _GWINwm;
extern bool_t _gwinFlashState;
#endif

View File

@ -33,10 +33,10 @@ struct GWidgetObject;
* @{
*/
typedef struct GColorSet {
color_t text; // @< The text color
color_t edge; // @< The edge color
color_t fill; // @< The fill color
color_t progress; // @< The color of progress bars
color_t text; /**< The text color */
color_t edge; /**< The edge color */
color_t fill; /**< The fill color */
color_t progress; /**< The color of progress bars */
} GColorSet;
/** @} */
@ -48,11 +48,11 @@ typedef struct GColorSet {
* @{
*/
typedef struct GWidgetStyle {
color_t background; // @< The window background color
color_t focus; // @< The color when a widget is focused
GColorSet enabled; // @< The colors when enabled
GColorSet disabled; // @< The colors when disabled
GColorSet pressed; // @< The colors when pressed
color_t background; /**< The window background color */
color_t focus; /**< The color when a widget is focused */
GColorSet enabled; /**< The colors when enabled */
GColorSet disabled; /**< The colors when disabled */
GColorSet pressed; /**< The colors when pressed */
} GWidgetStyle;
/** @} */
@ -93,13 +93,13 @@ typedef uint16_t WidgetTag;
* @{
*/
typedef struct GWidgetInit {
GWindowInit g; // @< The GWIN initializer
const char * text; // @< The initial text
CustomWidgetDrawFunction customDraw; // @< A custom draw function - use NULL for the standard
void * customParam; // @< A parameter for the custom draw function (default = NULL)
const GWidgetStyle * customStyle; // @< A custom style to use - use NULL for the default style
GWindowInit g; /**< The GWIN initializer */
const char * text; /**< The initial text */
CustomWidgetDrawFunction customDraw; /**< A custom draw function - use NULL for the standard */
void * customParam; /**< A parameter for the custom draw function (default = NULL) */
const GWidgetStyle * customStyle; /**< A custom style to use - use NULL for the default style */
#if GWIN_WIDGET_TAGS || defined(__DOXYGEN__)
WidgetTag tag; // @< The tag to associate with the widget
WidgetTag tag; /**< The tag to associate with the widget */
#endif
} GWidgetInit;
/** @} */
@ -114,13 +114,13 @@ typedef struct GWidgetInit {
* @{
*/
typedef struct GWidgetObject {
GWindowObject g; // @< This is still a GWIN
const char * text; // @< The widget text
CustomWidgetDrawFunction fnDraw; // @< The current draw function
void * fnParam; // @< A parameter for the current draw function
const GWidgetStyle * pstyle; // @< The current widget style colors
GWindowObject g; /**< This is still a GWIN */
const char * text; /**< The widget text */
CustomWidgetDrawFunction fnDraw; /**< The current draw function */
void * fnParam; /**< A parameter for the current draw function */
const GWidgetStyle * pstyle; /**< The current widget style colors */
#if GWIN_WIDGET_TAGS || defined(__DOXYGEN__)
WidgetTag tag; // @< The widget tag
WidgetTag tag; /**< The widget tag */
#endif
} GWidgetObject;
/** @} */
@ -145,10 +145,10 @@ typedef struct GWidgetObject {
* @{
*/
typedef struct GEventGWin {
GEventType type; // The type of this event
GHandle gwin; // The gwin window handle
GEventType type; /**< The type of this event */
GHandle gwin; /**< The gwin window handle */
#if GWIN_NEED_WIDGET && GWIN_WIDGET_TAGS
WidgetTag tag; // The tag (if applicable)
WidgetTag tag; /**< The tag (if applicable) */
#endif
} GEventGWin;
/** @} */