diff --git a/doc/index.html b/doc/index.html index 70b7b27..5196869 100644 --- a/doc/index.html +++ b/doc/index.html @@ -41,6 +41,129 @@
MwPending
+
+ MwSetInteger +
+
+ MwSetText +
+
+ MwGetInteger +
+
+ MwGetText +
+
+ MwSetDefault +
+
+ MwVaApply +
+
+ MwVaListApply +
+
+ MwAddUserHandler +
+
+ MwDispatchUserHandler +
+
+ MwSetErrorHandler +
+
+ MwDispatchError +
+
+ MwGetBeforeStep +
+
+ Mw/Default.h +
+
+ MwDefaultBackground +
+
+ MwDefaultForeground +
+
+ Mw/Draw.h +
+
+ MwParseColor +
+
+ MwDrawRect +
+
+ MwDrawFrame +
+
+ MwDrawFrameEx +
+
+ MwDrawText +
+
+ Mw/Error.h +
+
+ MwErrorEnum +
+
+ MwEsuccess +
+
+ Mw/Font.h +
+
+ MwFontData[] +
+
+ Mw/Frame.h +
+
+ MwFrameClass +
+
+ Mw/GDI.h +
+
+ Mw/LowLevel.h +
+
+ Mw/MachDep.h +
+
+ Mw/Milsko.h +
+
+ Mw/OpenGL.h +
+
+ MwOpenGLClass +
+
+ MwOpenGLMakeCurrent +
+
+ MwOpenGLSwapBuffer +
+
+ Mw/StringDefs.h +
+
+ Mw/TypeDefs.h +
+
+ Mw/Window.h +
+
+ MwWindowClass +
+
+ Mw/X11.h +

Mw/Button.h

@@ -53,7 +176,7 @@
MWDECL MwClass MwButtonClass;
- Button class. + Button widget class.

@@ -67,7 +190,7 @@
#define MwDispatch(x, y)
- Dispatches a handler of widget class. + Dispatches the handler of widget class.
warning @@ -357,6 +480,701 @@ 1 if any event is pending.
+
+
MWDECL void MwSetInteger (
+	MwWidget handle,
+	const char* key,
+	int n
+);
+
+
+ Sets an integer property. +
+
+ Parameter handle +
+
+ Widget. +
+
+ Parameter key +
+
+ Key. +
+
+ Parameter n +
+
+ Value. +
+
+
+
MWDECL void MwSetText (
+	MwWidget handle,
+	const char* key,
+	const char* value
+);
+
+
+ Sets a text property. +
+
+ Parameter handle +
+
+ Widget. +
+
+ Parameter key +
+
+ Key. +
+
+ Parameter value +
+
+ Value. +
+
+
+
MWDECL int MwGetInteger (
+	MwWidget handle,
+	const char* key
+);
+
+
+ Gets the integer property. +
+
+ Parameter handle +
+
+ Widget. +
+
+ Parameter key +
+
+ Key. +
+
+ Returns +
+
+ Value. +
+
+
+
MWDECL const char* MwGetText (
+	MwWidget handle,
+	const char* key
+);
+
+
+ Gets the text property. +
+
+ Parameter handle +
+
+ Widget. +
+
+ Parameter key +
+
+ Key. +
+
+ Returns +
+
+ Value. +
+
+
+
MWDECL void MwSetDefault (
+	MwWidget handle
+);
+
+
+ Sets the default property. +
+
+ warning +
+
+ This is called when widget is created. +
+
+ Parameter handle +
+
+ Widget. +
+
+
+
MWDECL void MwVaApply (
+	MwWidget handle,
+	...
+);
+
+
+ Sets the properties. +
+
+ Parameter handle +
+
+ Widget. +
+
+ Parameter ... +
+
+ Properties. +
+
+
+
MWDECL void MwVaListApply (
+	MwWidget handle,
+	va_list va
+);
+
+
+ Sets properties. +
+
+ Parameter handle +
+
+ Widget. +
+
+ Parameter va +
+
+ Properties. +
+
+
+
MWDECL void MwAddUserHandler (
+	MwWidget handle,
+	const char* key,
+	MwUserHandler handler,
+	void* user_data
+);
+
+
+ Sets a user handler. +
+
+ Parameter handle +
+
+ Widget. +
+
+ Parameter key +
+
+ Key. +
+
+ Parameter handler +
+
+ Handler. +
+
+ Parameter user_data +
+
+ User data passed to handler. +
+
+
+
MWDECL void MwDispatchUserHandler (
+	MwWidget handle,
+	const char* key,
+	void* handler_data
+);
+
+
+ Dispatches the user handler. +
+
+ Parameter handle +
+
+ Widget. +
+
+ Parameter key +
+
+ Key. +
+
+ Parameter handler_data +
+
+ Handler data passed to handler. +
+
+
+
MWDECL void MwSetErrorHandler (
+	MwErrorHandler handler,
+	void* user_data
+);
+
+
+ Sets an error handler. +
+
+ Parameter handle +
+
+ Widget. +
+
+ Parameter handler +
+
+ Handler. +
+
+ Parameter user_data +
+
+ User data passed to handler. +
+
+
+
MWDECL void MwDispatchError (
+	int code,
+	const char* message
+);
+
+
+ Dispatches the error handler. +
+
+ Parameter code +
+
+ Error code. +
+
+ Parameter message +
+
+ Error message. +
+
+
+
MWDECL jmp_buf MwGetBeforeStep (
+	MwWidget handle
+);
+
+
+ Gets the before_step of widget. +
+
+ Parameter handle +
+
+ Widget. +
+
+ Returns +
+
+ jmp_buf. +
+
+
+

Mw/Default.h

+
+
+ Default properties. +
+
+
+
MWDECL const char* MwDefaultBackground;
+
+
+ Default background color. +
+
+
+
MWDECL const char* MwDefaultForeground;
+
+
+ Default foreground color. +
+
+
+

Mw/Draw.h

+
+
+ Common drawing API. +
+
+
+
MWDECL MwLLColor MwParseColor (
+	MwWidget handle,
+	const char* text
+);
+
+
+ Parses a color text. +
+
+ Parameter handle +
+
+ Widget. +
+
+ Parameter text +
+
+ Color text. +
+
+ Returns +
+
+ Color. +
+
+
+
MWDECL void MwDrawRect (
+	MwWidget handle,
+	MwRect* rect,
+	MwLLColor color
+);
+
+
+ Draws a filled rectangle. +
+
+ Parameter handle +
+
+ Widget. +
+
+ Parameter rect +
+
+ Rectangle area. +
+
+ Parameter color +
+
+ Color. +
+
+
+
MWDECL void MwDrawFrame (
+	MwWidget handle,
+	MwRect* rect,
+	MwLLColor color,
+	int invert
+);
+
+
+ Draws a frame. +
+
+ warning +
+
+ rect gets changed to the area of rectangle inside. +
+
+ Parameter handle +
+
+ Widget. +
+
+ Parameter rect +
+
+ Rectangle area. +
+
+ Parameter color +
+
+ Color. +
+
+ Parameter invert +
+
+ Invert the 3D border color or not. +
+
+
+
MWDECL void MwDrawFrameEx (
+	MwWidget handle,
+	MwRect* rect,
+	MwLLColor color,
+	int invert,
+	int border
+);
+
+
+ Draws a frame with specified border width. +
+
+ warning +
+
+ rect gets changed to the area of rectangle inside. +
+
+ Parameter handle +
+
+ Widget. +
+
+ Parameter rect +
+
+ Rectangle area. +
+
+ Parameter color +
+
+ Color. +
+
+ Parameter invert +
+
+ Invert the 3D border color or not. +
+
+ Parameter border +
+
+ Border width. +
+
+
+
MWDECL void MwDrawText (
+	MwWidget handle,
+	MwPoint* point,
+	const char* text,
+	MwLLColor color
+);
+
+
+ Draws a text. +
+
+ Parameter handle +
+
+ Widget. +
+
+ Parameter point +
+
+ Center point of the text. +
+
+ Parameter text +
+
+ Text. +
+
+ Parameter color +
+
+ Color. +
+
+
+

Mw/Error.h

+
+
+ Error codes. +
+
+
+
enum MwErrorEnum;
+
+
+ Error code enumeration. +
+
+
+
 MwEsuccess = 0
+
+
+ No error. +
+
+
+

Mw/Font.h

+
+
+ Default font. +
+
+
+
MWDECL MwFont MwFontData[];
+
+
+ Default font data. +
+
+
+

Mw/Frame.h

+
+
+ Frame widget. +
+
+
+
MWDECL MwClass MwFrameClass;
+
+
+ Frame widget class. +
+
+
+

Mw/GDI.h

+
+
+ GDI backend. +
+
+ warning +
+
+ This is used internally. +
+
+
+

Mw/LowLevel.h

+
+
+ Low-level drawing API. +
+
+ warning +
+
+ This is used internally. +
+
+
+

Mw/MachDep.h

+

Mw/Milsko.h

+
+
+ Includes all headers. +
+
+
+

Mw/OpenGL.h

+
+
+ OpenGL widget. +
+
+
+
MWDECL MwClass MwOpenGLClass;
+
+
+ OpenGL widget class. +
+
+
+
MWDECL void MwOpenGLMakeCurrent (
+	MwWidget handle
+);
+
+
+ Make a widget current OpenGL context. +
+
+ Parameter handle +
+
+ Widget. +
+
+
+
MWDECL void MwOpenGLSwapBuffer (
+	MwWidget handle
+);
+
+
+ Swaps the buffer of OpenGL context. +
+
+ Parameter handle +
+
+ Widget. +
+
+
+

Mw/StringDefs.h

+
+
+ String definitions for property. +
+
+
+

Mw/TypeDefs.h

+
+
+ Type definitions. +
+
+
+

Mw/Window.h

+
+
+ Window widget. +
+
+
+
MWDECL MwClass MwWindowClass;
+
+
+ Window widget class. +
+
+
+

Mw/X11.h

+
+
+ X11 backend. +
+
+ warning +
+
+ This is used internally. +
+

diff --git a/include/Mw/Button.h b/include/Mw/Button.h index 53a48f1..c57519e 100644 --- a/include/Mw/Button.h +++ b/include/Mw/Button.h @@ -14,7 +14,7 @@ extern "C" { #endif /*! - * %brief Button class + * %brief Button widget class */ MWDECL MwClass MwButtonClass; diff --git a/include/Mw/Core.h b/include/Mw/Core.h index 7343c39..4b733fc 100644 --- a/include/Mw/Core.h +++ b/include/Mw/Core.h @@ -11,7 +11,7 @@ /*! * %warning Used internally - * %brief Dispatches a handler of widget class + * %brief Dispatches the handler of widget class * %param x Widget * %param y Handler name */ @@ -90,20 +90,96 @@ MWDECL void MwStep(MwWidget handle); */ MWDECL int MwPending(MwWidget handle); -MWDECL void MwSetInteger(MwWidget handle, const char* key, int n); -MWDECL void MwSetText(MwWidget handle, const char* key, const char* value); -MWDECL int MwGetInteger(MwWidget handle, const char* key); -MWDECL const char* MwGetText(MwWidget handle, const char* key); -MWDECL void MwSetDefault(MwWidget handle); -MWDECL void MwVaApply(MwWidget handle, ...); -MWDECL void MwVaListApply(MwWidget handle, va_list va); +/*! + * %brief Sets an integer property + * %param handle Widget + * %param key Key + * %param n Value + */ +MWDECL void MwSetInteger(MwWidget handle, const char* key, int n); +/*! + * %brief Sets a text property + * %param handle Widget + * %param key Key + * %param value Value + */ +MWDECL void MwSetText(MwWidget handle, const char* key, const char* value); + +/*! + * %brief Gets the integer property + * %param handle Widget + * %param key Key + * %return Value + */ +MWDECL int MwGetInteger(MwWidget handle, const char* key); + +/*! + * %brief Gets the text property + * %param handle Widget + * %param key Key + * %return Value + */ +MWDECL const char* MwGetText(MwWidget handle, const char* key); + +/*! + * %brief Sets the default property + * %param handle Widget + * %warning This is called when widget is created + */ +MWDECL void MwSetDefault(MwWidget handle); + +/*! + * %brief Sets the properties + * %param handle Widget + * %param ... Properties + */ +MWDECL void MwVaApply(MwWidget handle, ...); + +/*! + * %brief Sets properties + * %param handle Widget + * %param va Properties + */ +MWDECL void MwVaListApply(MwWidget handle, va_list va); + +/*! + * %brief Sets a user handler + * %param handle Widget + * %param key Key + * %param handler Handler + * %param user_data User data passed to handler + */ MWDECL void MwAddUserHandler(MwWidget handle, const char* key, MwUserHandler handler, void* user_data); + +/*! + * %brief Dispatches the user handler + * %param handle Widget + * %param key Key + * %param handler_data Handler data passed to handler + */ MWDECL void MwDispatchUserHandler(MwWidget handle, const char* key, void* handler_data); +/*! + * %brief Sets an error handler + * %param handle Widget + * %param handler Handler + * %param user_data User data passed to handler + */ MWDECL void MwSetErrorHandler(MwErrorHandler handler, void* user_data); + +/*! + * %brief Dispatches the error handler + * %param code Error code + * %param message Error message + */ MWDECL void MwDispatchError(int code, const char* message); +/*! + * %brief Gets the before_step of widget + * %param handle Widget + * %return jmp_buf + */ MWDECL jmp_buf MwGetBeforeStep(MwWidget handle); #ifdef __cplusplus diff --git a/include/Mw/Default.h b/include/Mw/Default.h index 6edae32..f090b7c 100644 --- a/include/Mw/Default.h +++ b/include/Mw/Default.h @@ -1,4 +1,8 @@ /* $Id$ */ +/*! + * %file Mw/Default.h + * %brief Default properties + */ #ifndef __MW_DEFAULT_H__ #define __MW_DEFAULT_H__ @@ -9,7 +13,14 @@ extern "C" { #endif +/*! + * %brief Default background color + */ MWDECL const char* MwDefaultBackground; + +/*! + * %brief Default foreground color + */ MWDECL const char* MwDefaultForeground; #ifdef __cplusplus diff --git a/include/Mw/Draw.h b/include/Mw/Draw.h index ff018b2..bd707ac 100644 --- a/include/Mw/Draw.h +++ b/include/Mw/Draw.h @@ -1,4 +1,8 @@ /* $Id$ */ +/*! + * %file Mw/Draw.h + * %brief Common drawing API + */ #ifndef __MW_DRAW_H__ #define __MW_DRAW_H__ @@ -10,11 +14,50 @@ extern "C" { #endif +/*! + * %brief Parses a color text + * %param handle Widget + * %param text Color text + * %return Color + */ MWDECL MwLLColor MwParseColor(MwWidget handle, const char* text); +/*! + * %brief Draws a filled rectangle + * %param handle Widget + * %param rect Rectangle area + * %param color Color + */ MWDECL void MwDrawRect(MwWidget handle, MwRect* rect, MwLLColor color); + +/*! + * %brief Draws a frame + * %param handle Widget + * %param rect Rectangle area + * %param color Color + * %param invert Invert the 3D border color or not + * %warning `rect` gets changed to the area of rectangle inside + */ MWDECL void MwDrawFrame(MwWidget handle, MwRect* rect, MwLLColor color, int invert); + +/*! + * %brief Draws a frame with specified border width + * %param handle Widget + * %param rect Rectangle area + * %param color Color + * %param invert Invert the 3D border color or not + * %param border Border width + * %warning `rect` gets changed to the area of rectangle inside + */ MWDECL void MwDrawFrameEx(MwWidget handle, MwRect* rect, MwLLColor color, int invert, int border); + +/*! + * %brief Draws a text + * %param handle Widget + * %param point Center point of the text + * %param text Text + * %param color Color + */ MWDECL void MwDrawText(MwWidget handle, MwPoint* point, const char* text, MwLLColor color); #ifdef __cplusplus diff --git a/include/Mw/Error.h b/include/Mw/Error.h index ccf0d5c..92ae949 100644 --- a/include/Mw/Error.h +++ b/include/Mw/Error.h @@ -1,10 +1,20 @@ /* $Id$ */ +/*! + * %file Mw/Error.h + * %brief Error codes + */ #ifndef __MW_ERROR_H__ #define __MW_ERROR_H__ #include +/*! + * %brief Error code enumeration + */ enum MwErrorEnum { + /*! + * %brief No error + */ MwEsuccess = 0 }; diff --git a/include/Mw/Font.h b/include/Mw/Font.h index 65664d5..5b9c24d 100644 --- a/include/Mw/Font.h +++ b/include/Mw/Font.h @@ -1,4 +1,8 @@ /* $Id$ */ +/*! + * %file Mw/Font.h + * %brief Default font + */ #ifndef __MW_FONT_H__ #define __MW_FONT_H__ @@ -9,6 +13,9 @@ extern "C" { #endif +/*! + * %brief Default font data + */ MWDECL MwFont MwFontData[]; #ifdef __cplusplus diff --git a/include/Mw/Frame.h b/include/Mw/Frame.h index 3e635b2..faefe71 100644 --- a/include/Mw/Frame.h +++ b/include/Mw/Frame.h @@ -1,4 +1,8 @@ /* $Id$ */ +/*! + * %file Mw/Frame.h + * %brief Frame widget + */ #ifndef __MW_FRAME_H__ #define __MW_FRAME_H__ @@ -9,6 +13,9 @@ extern "C" { #endif +/*! + * %brief Frame widget class + */ MWDECL MwClass MwFrameClass; #ifdef __cplusplus diff --git a/include/Mw/GDI.h b/include/Mw/GDI.h index b8f134c..0bf97a1 100644 --- a/include/Mw/GDI.h +++ b/include/Mw/GDI.h @@ -1,4 +1,9 @@ /* $Id$ */ +/*! + * %file Mw/GDI.h + * %brief GDI backend + * %warning This is used internally + */ #ifndef __MW_GDI_H__ #define __MW_GDI_H__ diff --git a/include/Mw/LowLevel.h b/include/Mw/LowLevel.h index 26dc8d2..dcd3c8f 100644 --- a/include/Mw/LowLevel.h +++ b/include/Mw/LowLevel.h @@ -1,4 +1,9 @@ /* $Id$ */ +/*! + * %file Mw/LowLevel.h + * %brief Low-level drawing API + * %warning This is used internally + */ #ifndef __MW_LOWLEVEL_H__ #define __MW_LOWLEVEL_H__ diff --git a/include/Mw/MachDep.h b/include/Mw/MachDep.h index d9004a2..894bd63 100644 --- a/include/Mw/MachDep.h +++ b/include/Mw/MachDep.h @@ -1,4 +1,8 @@ /* $Id$ */ +/*! + * %file Mw/MachDep.h + * %param Machine dependent headers and macros + */ #ifndef __MW_MACHDEP_H__ #define __MW_MACHDEP_H__ diff --git a/include/Mw/Milsko.h b/include/Mw/Milsko.h index 62d527e..21cd3b4 100644 --- a/include/Mw/Milsko.h +++ b/include/Mw/Milsko.h @@ -1,4 +1,8 @@ /* $Id$ */ +/*! + * %file Mw/Milsko.h + * %brief Includes all headers + */ #ifndef __MW_MILSKO_H__ #define __MW_MILSKO_H__ diff --git a/include/Mw/OpenGL.h b/include/Mw/OpenGL.h index 49a448a..64270f1 100644 --- a/include/Mw/OpenGL.h +++ b/include/Mw/OpenGL.h @@ -1,4 +1,8 @@ /* $Id$ */ +/*! + * %file Mw/OpenGL.h + * %brief OpenGL widget + */ #ifndef __MW_OPENGL_H__ #define __MW_OPENGL_H__ @@ -9,9 +13,21 @@ extern "C" { #endif +/*! + * %brief OpenGL widget class + */ MWDECL MwClass MwOpenGLClass; +/*! + * %brief Make a widget current OpenGL context + * %param handle Widget + */ MWDECL void MwOpenGLMakeCurrent(MwWidget handle); + +/*! + * %brief Swaps the buffer of OpenGL context + * %param handle Widget + */ MWDECL void MwOpenGLSwapBuffer(MwWidget handle); #ifdef __cplusplus diff --git a/include/Mw/StringDefs.h b/include/Mw/StringDefs.h index 6cfd4dc..6f19437 100644 --- a/include/Mw/StringDefs.h +++ b/include/Mw/StringDefs.h @@ -1,4 +1,8 @@ /* $Id$ */ +/*! + * %file Mw/StringDefs.h + * %brief String definitions for property + */ #ifndef __MW_STRINGDEFS_H__ #define __MW_STRINGDEFS_H__ diff --git a/include/Mw/TypeDefs.h b/include/Mw/TypeDefs.h index 9d231a1..f60fe94 100644 --- a/include/Mw/TypeDefs.h +++ b/include/Mw/TypeDefs.h @@ -1,4 +1,8 @@ /* $Id$ */ +/*! + * %file Mw/TypeDefs.h + * %brief Type definitions + */ #ifndef __MW_TYPEDEFS_H__ #define __MW_TYPEDEFS_H__ diff --git a/include/Mw/Window.h b/include/Mw/Window.h index d0cccd1..6e11144 100644 --- a/include/Mw/Window.h +++ b/include/Mw/Window.h @@ -1,4 +1,8 @@ /* $Id$ */ +/*! + * %file Mw/Window.h + * %brief Window widget + */ #ifndef __MW_WINDOW_H__ #define __MW_WINDOW_H__ @@ -9,6 +13,9 @@ extern "C" { #endif +/*! + * %brief Window widget class + */ MWDECL MwClass MwWindowClass; #ifdef __cplusplus diff --git a/include/Mw/X11.h b/include/Mw/X11.h index 1f0439f..91ce5bc 100644 --- a/include/Mw/X11.h +++ b/include/Mw/X11.h @@ -1,4 +1,9 @@ /* $Id$ */ +/*! + * %file Mw/X11.h + * %brief X11 backend + * %warning This is used internally + */ #ifndef __MW_X11_H__ #define __MW_X11_H__ diff --git a/tools/doc.pl b/tools/doc.pl index 0b00776..cf8ac7a 100755 --- a/tools/doc.pl +++ b/tools/doc.pl @@ -114,13 +114,14 @@ sub scan_dir { $l =~ s/[ \t]+/ /g; $l =~ s/[ ]*\\$//g; - $l =~ s/[ ]*(?:;|\{.+)[ ]*$/;/g; + $l =~ s/[ ]*(?:;|\{.*)[ ]*$/;/g; if (!($l =~ /^#/)) { $l =~ s/\(([^\)]+)\)/arguments($1)/ge; } $sl = $l; $sl =~ s/\n//g; + $sl =~ s/=.+$//g; $sl =~ s/^.+[ \t]+([^ ]+)[ \t]*\(.+\);?$/\1/g; $sl =~ s/^.+[ \t]+([^ ]+);$/\1/g;