# HG changeset patch # User ib # Date 1315303733 0 # Node ID 1c4a2554d46b79211d9afeb23b642fac04f295e1 # Parent 81aaa14203373686e913d8418c51bc3c93db5df9 Add doxygen comments to app.c. diff -r 81aaa1420337 -r 1c4a2554d46b gui/app.c --- a/gui/app.c Tue Sep 06 09:29:04 2011 +0000 +++ b/gui/app.c Tue Sep 06 10:08:53 2011 +0000 @@ -21,12 +21,18 @@ #include "libavutil/common.h" +/** + * @brief Initialize item counters. + */ guiItems guiApp = { .IndexOfMainItems = -1, .IndexOfPlaybarItems = -1, .IndexOfMenuItems = -1 }; +/** + * @brief Events belonging to event names. + */ static const evName evNames[] = { { evNone, "evNone" }, { evPlay, "evPlay" }, @@ -77,6 +83,11 @@ { evSetAspect, "evSetAspect" } }; +/** + * @brief Free all memory allocated to an item and set all its pointers to NULL. + * + * @param item item to be freed + */ static void appClearItem(wItem *item) { bpFree(&item->Bitmap); @@ -86,6 +97,9 @@ memset(item, 0, sizeof(*item)); } +/** + * @brief Free all memory allocated to all GUI items and reset all item counters. + */ void appFreeStruct(void) { int i; @@ -116,6 +130,13 @@ fntFreeFont(); } +/** + * @brief Find the event belonging to an event name. + * + * @param str event name + * + * @return event >= 0 (ok) or -1 (not found) + */ int appFindMessage(unsigned char *str) { unsigned int i; @@ -127,6 +148,12 @@ return -1; } +/** + * @brief Modify the state (i.e. set a new value) to the item belonging to an event. + * + * @param event event + * @param state new value + */ void btnModify(int event, float state) { int i; @@ -172,6 +199,12 @@ } } +/** + * @brief Set the @a pressed state (i.e. a new value) to the item belonging to an event. + * + * @param event event + * @param set new value + */ void btnSet(int event, int set) { int i;