aboutsummaryrefslogtreecommitdiffstats
path: root/include/gwin
diff options
context:
space:
mode:
authorAndrew Hannam <andrewh@inmarket.com.au>2013-05-06 14:44:47 +1000
committerAndrew Hannam <andrewh@inmarket.com.au>2013-05-06 14:44:47 +1000
commit3374aa25c6e4e118df670c18eaeefa0f6f29377f (patch)
tree99bdea0be61386bd3ae70c8516198dd857e4db13 /include/gwin
parentbbfeec2dd7b312745856236214c91fce6b9ec22c (diff)
downloaduGFX-3374aa25c6e4e118df670c18eaeefa0f6f29377f.tar.gz
uGFX-3374aa25c6e4e118df670c18eaeefa0f6f29377f.tar.bz2
uGFX-3374aa25c6e4e118df670c18eaeefa0f6f29377f.zip
Reinsertion of doxygen headers
Reinsertion of doxygen headers that got lost in license change
Diffstat (limited to 'include/gwin')
-rw-r--r--include/gwin/button.h16
-rw-r--r--include/gwin/console.h236
-rw-r--r--include/gwin/gwin.h18
-rw-r--r--include/gwin/internal.h62
-rw-r--r--include/gwin/slider.h14
5 files changed, 209 insertions, 137 deletions
diff --git a/include/gwin/button.h b/include/gwin/button.h
index e56215fa..b96cb83e 100644
--- a/include/gwin/button.h
+++ b/include/gwin/button.h
@@ -5,6 +5,22 @@
* http://chibios-gfx.com/license.html
*/
+/**
+ * @file include/gwin/button.h
+ * @brief GWIN Graphic window subsystem header file.
+ *
+ * @defgroup Button Button
+ * @ingroup GWIN
+ *
+ * @details GWIN allows it to easily create buttons with different styles
+ * and check for different meta states such as: PRESSED, CLICKED,
+ * RELEASED etc.
+ *
+ * @pre GFX_USE_GWIN must be set to TRUE in your gfxconf.h
+ * @pre GWIN_NEED_BUTTON must be set to TRUE in your gfxconf.h
+ * @{
+ */
+
#ifndef _GWIN_BUTTON_H
#define _GWIN_BUTTON_H
diff --git a/include/gwin/console.h b/include/gwin/console.h
index e1f0260f..55bad841 100644
--- a/include/gwin/console.h
+++ b/include/gwin/console.h
@@ -4,113 +4,129 @@
*
* http://chibios-gfx.com/license.html
*/
-
-#ifndef _GWIN_CONSOLE_H
-#define _GWIN_CONSOLE_H
-
-#if GWIN_NEED_CONSOLE || defined(__DOXYGEN__)
-
-/*===========================================================================*/
-/* Driver constants. */
-/*===========================================================================*/
-
-#define GW_CONSOLE 0x0001
-
-/*===========================================================================*/
-/* Type definitions */
-/*===========================================================================*/
-
-// A console window. Supports wrapped text writing and a cursor.
-typedef struct GConsoleObject_t {
- GWindowObject gwin;
-
- struct GConsoleWindowStream_t {
- const struct GConsoleWindowVMT_t *vmt;
- _base_asynchronous_channel_data
- } stream;
-
- coord_t cx,cy; // Cursor position
- uint8_t fy; // Current font height
- uint8_t fp; // Current font inter-character spacing
- } GConsoleObject;
-
-/*===========================================================================*/
-/* External declarations. */
-/*===========================================================================*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @brief Create a console window.
- * @details A console window allows text to be written using chprintf() (and the console functions defined here).
- * @brief Text in a console window supports newlines and will wrap text as required.
- * @return NULL if there is no resultant drawing area, otherwise a window handle.
- *
- * @param[in] gc The GConsoleObject structure to initialise. If this is NULL the structure is dynamically allocated.
- * @param[in] x,y The screen co-ordinates for the bottom left corner of the window
- * @param[in] width The width of the window
- * @param[in] height The height of the window
- * @param[in] font The font to use
- * @note The console is not automatically cleared on creation. You must do that by calling gwinClear() (possibly after changing your background color)
- * @note If the dispay does not support scrolling, the window will be cleared when the bottom line is reached.
- * @note The default drawing color gets set to White and the background drawing color to Black.
- * @note The dimensions and position may be changed to fit on the real screen.
- *
- * @api
- */
-GHandle gwinCreateConsole(GConsoleObject *gc, coord_t x, coord_t y, coord_t width, coord_t height, font_t font);
-
-/**
- * @brief Get a stream from a console window suitable for use with chprintf().
- * @return The stream handle or NULL if this is not a console window.
- *
- * @param[in] gh The window handle (must be a console window)
- *
- * @api
- */
-BaseSequentialStream *gwinGetConsoleStream(GHandle gh);
-
-/**
- * @brief Put a character at the cursor position in the window.
- * @note Uses the current foreground color to draw the character and fills the background using the background drawing color
- *
- * @param[in] gh The window handle (must be a console window)
- * @param[in] c The character to draw
- *
- * @api
- */
-void gwinPutChar(GHandle gh, char c);
-
-/**
- * @brief Put a string at the cursor position in the window. It will wrap lines as required.
- * @note Uses the current foreground color to draw the string and fills the background using the background drawing color
- *
- * @param[in] gh The window handle (must be a console window)
- * @param[in] str The string to draw
- *
- * @api
- */
-void gwinPutString(GHandle gh, const char *str);
-
-/**
- * @brief Put the character array at the cursor position in the window. It will wrap lines as required.
- * @note Uses the current foreground color to draw the string and fills the background using the background drawing color
- *
- * @param[in] gh The window handle (must be a console window)
- * @param[in] str The string to draw
- * @param[in] n The number of characters to draw
- *
- * @api
- */
-void gwinPutCharArray(GHandle gh, const char *str, size_t n);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* GWIN_NEED_CONSOLE */
-
-#endif /* _GWIN_CONSOLE_H */
-/** @} */
+
+/**
+ * @file include/gwin/console.h
+ * @brief GWIN Graphic window subsystem header file.
+ *
+ * @defgroup Console Console
+ * @ingroup GWIN
+ *
+ * @details GWIN allows it to create a console/terminal like window.
+ * You can simply use chprintf() to print to the terminal.
+ *
+ * @pre GFX_USE_GWIN must be set to TRUE in your gfxconf.h
+ * @pre GWIN_NEED_CONSOLE must be set to TRUE in your gfxconf.h
+ *
+ * @{
+ */
+
+#ifndef _GWIN_CONSOLE_H
+#define _GWIN_CONSOLE_H
+
+#if GWIN_NEED_CONSOLE || defined(__DOXYGEN__)
+
+/*===========================================================================*/
+/* Driver constants. */
+/*===========================================================================*/
+
+#define GW_CONSOLE 0x0001
+
+/*===========================================================================*/
+/* Type definitions */
+/*===========================================================================*/
+
+// A console window. Supports wrapped text writing and a cursor.
+typedef struct GConsoleObject_t {
+ GWindowObject gwin;
+
+ struct GConsoleWindowStream_t {
+ const struct GConsoleWindowVMT_t *vmt;
+ _base_asynchronous_channel_data
+ } stream;
+
+ coord_t cx,cy; // Cursor position
+ uint8_t fy; // Current font height
+ uint8_t fp; // Current font inter-character spacing
+ } GConsoleObject;
+
+/*===========================================================================*/
+/* External declarations. */
+/*===========================================================================*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Create a console window.
+ * @details A console window allows text to be written using chprintf() (and the console functions defined here).
+ * @brief Text in a console window supports newlines and will wrap text as required.
+ * @return NULL if there is no resultant drawing area, otherwise a window handle.
+ *
+ * @param[in] gc The GConsoleObject structure to initialise. If this is NULL the structure is dynamically allocated.
+ * @param[in] x,y The screen co-ordinates for the bottom left corner of the window
+ * @param[in] width The width of the window
+ * @param[in] height The height of the window
+ * @param[in] font The font to use
+ * @note The console is not automatically cleared on creation. You must do that by calling gwinClear() (possibly after changing your background color)
+ * @note If the dispay does not support scrolling, the window will be cleared when the bottom line is reached.
+ * @note The default drawing color gets set to White and the background drawing color to Black.
+ * @note The dimensions and position may be changed to fit on the real screen.
+ *
+ * @api
+ */
+GHandle gwinCreateConsole(GConsoleObject *gc, coord_t x, coord_t y, coord_t width, coord_t height, font_t font);
+
+/**
+ * @brief Get a stream from a console window suitable for use with chprintf().
+ * @return The stream handle or NULL if this is not a console window.
+ *
+ * @param[in] gh The window handle (must be a console window)
+ *
+ * @api
+ */
+BaseSequentialStream *gwinGetConsoleStream(GHandle gh);
+
+/**
+ * @brief Put a character at the cursor position in the window.
+ * @note Uses the current foreground color to draw the character and fills the background using the background drawing color
+ *
+ * @param[in] gh The window handle (must be a console window)
+ * @param[in] c The character to draw
+ *
+ * @api
+ */
+void gwinPutChar(GHandle gh, char c);
+
+/**
+ * @brief Put a string at the cursor position in the window. It will wrap lines as required.
+ * @note Uses the current foreground color to draw the string and fills the background using the background drawing color
+ *
+ * @param[in] gh The window handle (must be a console window)
+ * @param[in] str The string to draw
+ *
+ * @api
+ */
+void gwinPutString(GHandle gh, const char *str);
+
+/**
+ * @brief Put the character array at the cursor position in the window. It will wrap lines as required.
+ * @note Uses the current foreground color to draw the string and fills the background using the background drawing color
+ *
+ * @param[in] gh The window handle (must be a console window)
+ * @param[in] str The string to draw
+ * @param[in] n The number of characters to draw
+ *
+ * @api
+ */
+void gwinPutCharArray(GHandle gh, const char *str, size_t n);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GWIN_NEED_CONSOLE */
+
+#endif /* _GWIN_CONSOLE_H */
+/** @} */
diff --git a/include/gwin/gwin.h b/include/gwin/gwin.h
index 1c8672de..43095643 100644
--- a/include/gwin/gwin.h
+++ b/include/gwin/gwin.h
@@ -5,6 +5,24 @@
* http://chibios-gfx.com/license.html
*/
+/**
+ * @file include/gwin/gwin.h
+ * @brief GWIN Graphic window subsystem header file.
+ *
+ * @defgroup Window Window
+ * @ingroup GWIN
+ *
+ * @details GWIN provides a basic window manager which allows it to easily
+ * create and destroy different windows on runtime. Each window
+ * will have it's own properties such as colors, brushes as well as
+ * it's own drawing origin.
+ * Moving the windows around is not supported yet.
+ *
+ * @pre GFX_USE_GWIN must be set to TRUE in your gfxconf.h
+ *
+ * @{
+ */
+
#ifndef _GWIN_H
#define _GWIN_H
diff --git a/include/gwin/internal.h b/include/gwin/internal.h
index fbd0d1c1..53392410 100644
--- a/include/gwin/internal.h
+++ b/include/gwin/internal.h
@@ -4,30 +4,38 @@
*
* http://chibios-gfx.com/license.html
*/
-#ifndef _GWIN_INTERNAL_H
-#define _GWIN_INTERNAL_H
-
-#if GFX_USE_GWIN || defined(__DOXYGEN__)
-
-/*===========================================================================*/
-/* Sub-system constants. */
-/*===========================================================================*/
-
-#define GWIN_FLG_DYNAMIC 0x0001
-#define GBTN_FLG_ALLOCTXT 0x0002
-#define GWIN_FIRST_CONTROL_FLAG 0x0004
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-GHandle _gwinInit(GWindowObject *gw, coord_t x, coord_t y, coord_t width, coord_t height, size_t size);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* GFX_USE_GWIN */
-
-#endif /* _GWIN_INTERNAL_H */
-/** @} */
+
+/**
+ * @file include/gwin/internal.h
+ * @brief GWIN Graphic window subsystem header file.
+ *
+ * @addtogroup GWIN
+ * @{
+ */
+#ifndef _GWIN_INTERNAL_H
+#define _GWIN_INTERNAL_H
+
+#if GFX_USE_GWIN || defined(__DOXYGEN__)
+
+/*===========================================================================*/
+/* Sub-system constants. */
+/*===========================================================================*/
+
+#define GWIN_FLG_DYNAMIC 0x0001
+#define GBTN_FLG_ALLOCTXT 0x0002
+#define GWIN_FIRST_CONTROL_FLAG 0x0004
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+GHandle _gwinInit(GWindowObject *gw, coord_t x, coord_t y, coord_t width, coord_t height, size_t size);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GFX_USE_GWIN */
+
+#endif /* _GWIN_INTERNAL_H */
+/** @} */
diff --git a/include/gwin/slider.h b/include/gwin/slider.h
index 8f38b504..c22dc5f4 100644
--- a/include/gwin/slider.h
+++ b/include/gwin/slider.h
@@ -5,6 +5,20 @@
* http://chibios-gfx.com/license.html
*/
+/**
+ * @file include/gwin/slider.h
+ * @brief GWIN Graphic window subsystem header file.
+ *
+ * @defgroup Slider Slider
+ * @ingroup GWIN
+ *
+ * @details Create sliders with different styles
+ *
+ * @pre GFX_USE_GWIN must be set to TRUE in your gfxconf.h
+ * @pre GWIN_NEED_SLIDER must be set to TRUE in your gfxconf.h
+ * @{
+ */
+
#ifndef _GWIN_SLIDER_H
#define _GWIN_SLIDER_H