remove old document

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@499 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
Nishi 2025-10-28 20:40:26 +00:00
commit 603997c082
43 changed files with 499 additions and 4580 deletions

View file

@ -19,7 +19,6 @@ FULL_PATH_NAMES = YES
STRIP_FROM_PATH = include/ STRIP_FROM_PATH = include/
ENABLED_SECTIONS = YES ENABLED_SECTIONS = YES
OUTPUT_LANGUAGE = English OUTPUT_LANGUAGE = English
FILTER_PATTERNS = *.h=tools/doxyfilter.pl
GENERATE_LATEX = NO GENERATE_LATEX = NO
EXTRACT_ALL = YES EXTRACT_ALL = YES

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

View file

@ -1,13 +1,13 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Constants.h * @file Mw/Constants.h
* %brief Constants * @brief Constants
*/ */
#ifndef __MW_CONSTANTS_H__ #ifndef __MW_CONSTANTS_H__
#define __MW_CONSTANTS_H__ #define __MW_CONSTANTS_H__
/*! /*!
* %brief Direction enumeration * @brief Direction enumeration
*/ */
enum MwDIRECTION { enum MwDIRECTION {
MwNORTH = 0, MwNORTH = 0,
@ -17,7 +17,7 @@ enum MwDIRECTION {
}; };
/*! /*!
* %brief Orientation * @brief Orientation
*/ */
enum MwORIENTATION { enum MwORIENTATION {
MwVERTICAL = 0, MwVERTICAL = 0,
@ -25,7 +25,7 @@ enum MwORIENTATION {
}; };
/*! /*!
* %brief Alignment * @brief Alignment
*/ */
enum MwALIGNMENT { enum MwALIGNMENT {
MwALIGNMENT_CENTER = 0, MwALIGNMENT_CENTER = 0,
@ -34,12 +34,12 @@ enum MwALIGNMENT {
}; };
/*! /*!
* %brief Default * @brief Default
*/ */
#define MwDEFAULT 0x0fffffff #define MwDEFAULT 0x0fffffff
/*! /*!
* %brief Directory entry type * @brief Directory entry type
*/ */
enum MwDIRECTORY_TYPE { enum MwDIRECTORY_TYPE {
MwDIRECTORY_FILE = 0, MwDIRECTORY_FILE = 0,
@ -47,7 +47,7 @@ enum MwDIRECTORY_TYPE {
}; };
/*! /*!
* %brief Icon mask * @brief Icon mask
*/ */
#define MwMB_ICONMASK 0xf #define MwMB_ICONMASK 0xf
@ -60,42 +60,42 @@ enum MwMB_ICON {
}; };
/*! /*!
* %brief Button mask * @brief Button mask
*/ */
#define MwMB_BUTTONMASK 0xf0 #define MwMB_BUTTONMASK 0xf0
/*! /*!
* %brief OK button * @brief OK button
*/ */
#define MwMB_BUTTONOK 0x10 #define MwMB_BUTTONOK 0x10
/*! /*!
* %brief Cancel button * @brief Cancel button
*/ */
#define MwMB_BUTTONCANCEL 0x20 #define MwMB_BUTTONCANCEL 0x20
/*! /*!
* %brief Yes button * @brief Yes button
*/ */
#define MwMB_BUTTONYES 0x40 #define MwMB_BUTTONYES 0x40
/*! /*!
* %brief No button * @brief No button
*/ */
#define MwMB_BUTTONNO 0x80 #define MwMB_BUTTONNO 0x80
/*! /*!
* %brief Ok and Cancel button * @brief Ok and Cancel button
*/ */
#define MwMB_BUTTONOKCANCEL (MwMB_BUTTONCANCEL | MwMB_BUTTONOK) #define MwMB_BUTTONOKCANCEL (MwMB_BUTTONCANCEL | MwMB_BUTTONOK)
/*! /*!
* %brief Yes and No button * @brief Yes and No button
*/ */
#define MwMB_BUTTONYESNO (MwMB_BUTTONYES | MwMB_BUTTONNO) #define MwMB_BUTTONYESNO (MwMB_BUTTONYES | MwMB_BUTTONNO)
/*! /*!
* %brief Yes, No and Cancel button * @brief Yes, No and Cancel button
*/ */
#define MwMB_BUTTONYESNOCANCEL (MwMB_BUTTONYES | MwMB_BUTTONNO | MwMB_BUTTONCANCEL) #define MwMB_BUTTONYESNOCANCEL (MwMB_BUTTONYES | MwMB_BUTTONNO | MwMB_BUTTONCANCEL)

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Core.h * @file Mw/Core.h
* %brief Core * @brief Core
*/ */
#ifndef __MW_CORE_H__ #ifndef __MW_CORE_H__
#define __MW_CORE_H__ #define __MW_CORE_H__
@ -10,30 +10,30 @@
#include <Mw/TypeDefs.h> #include <Mw/TypeDefs.h>
/*! /*!
* %warning Used internally * @warning Used internally
* %brief Dispatches the handler of widget class * @brief Dispatches the handler of widget class
* %param x Widget * @param x Widget
* %param y Handler name * @param y Handler name
*/ */
#define MwDispatch(x, y) \ #define MwDispatch(x, y) \
if(!x->destroyed && x->widget_class != NULL && x->widget_class->y != NULL) x->widget_class->y(x) if(!x->destroyed && x->widget_class != NULL && x->widget_class->y != NULL) x->widget_class->y(x)
/*! /*!
* %warning Used internally * @warning Used internally
* %brief Dispatches the handler of widget class * @brief Dispatches the handler of widget class
* %param x Widget * @param x Widget
* %param y Handler name * @param y Handler name
* %return `0` for success, otherwise failed * @return `0` for success, otherwise failed
*/ */
#define MwDispatch2(x, y) \ #define MwDispatch2(x, y) \
((!x->destroyed && x->widget_class != NULL && x->widget_class->y != NULL) ? x->widget_class->y(x) : 0) ((!x->destroyed && x->widget_class != NULL && x->widget_class->y != NULL) ? x->widget_class->y(x) : 0)
/*! /*!
* %warning Used internally * @warning Used internally
* %brief Dispatches the handler of widget class * @brief Dispatches the handler of widget class
* %param x Widget * @param x Widget
* %param y Handler name * @param y Handler name
* %param z Argument * @param z Argument
*/ */
#define MwDispatch3(x, y, z) \ #define MwDispatch3(x, y, z) \
if(!x->destroyed && x->widget_class != NULL && x->widget_class->y != NULL) x->widget_class->y(x, z) if(!x->destroyed && x->widget_class != NULL && x->widget_class->y != NULL) x->widget_class->y(x, z)
@ -45,237 +45,237 @@ extern "C" {
#endif #endif
/*! /*!
* %brief Creates a widget * @brief Creates a widget
* %param widget_class Widget class * @param widget_class Widget class
* %param name Widget name * @param name Widget name
* %param parent Parent widget or `NULL` * @param parent Parent widget or `NULL`
* %param x X * @param x X
* %param y Y * @param y Y
* %param width Width * @param width Width
* %param height Height * @param height Height
* %return Widget * @return Widget
*/ */
MWDECL MwWidget MwCreateWidget(MwClass widget_class, const char* name, MwWidget parent, int x, int y, unsigned int width, unsigned int height); MWDECL MwWidget MwCreateWidget(MwClass widget_class, const char* name, MwWidget parent, int x, int y, unsigned int width, unsigned int height);
/*! /*!
* %brief Creates a widget * @brief Creates a widget
* %param widget_class Widget class * @param widget_class Widget class
* %param name Widget name * @param name Widget name
* %param parent Parent widget or `NULL` * @param parent Parent widget or `NULL`
* %param x X * @param x X
* %param y Y * @param y Y
* %param width Width * @param width Width
* %param height Height * @param height Height
* %param ... Same with MwVaApply * @param ... Same with MwVaApply
* %return Widget * @return Widget
*/ */
MWDECL MwWidget MwVaCreateWidget(MwClass widget_class, const char* name, MwWidget parent, int x, int y, unsigned int width, unsigned int height, ...); MWDECL MwWidget MwVaCreateWidget(MwClass widget_class, const char* name, MwWidget parent, int x, int y, unsigned int width, unsigned int height, ...);
/*! /*!
* %brief Creates a widget * @brief Creates a widget
* %param widget_class Widget class * @param widget_class Widget class
* %param name Widget name * @param name Widget name
* %param parent Parent widget or `NULL` * @param parent Parent widget or `NULL`
* %param x X * @param x X
* %param y Y * @param y Y
* %param width Width * @param width Width
* %param height Height * @param height Height
* %param va Same with MwVaListApply * @param va Same with MwVaListApply
* %return Widget * @return Widget
*/ */
MWDECL MwWidget MwVaListCreateWidget(MwClass widget_class, const char* name, MwWidget parent, int x, int y, unsigned int width, unsigned int height, va_list va); MWDECL MwWidget MwVaListCreateWidget(MwClass widget_class, const char* name, MwWidget parent, int x, int y, unsigned int width, unsigned int height, va_list va);
/*! /*!
* %brief Destroys the widget and its child widgets * @brief Destroys the widget and its child widgets
* %param handle Widget * @param handle Widget
*/ */
MWDECL void MwDestroyWidget(MwWidget handle); MWDECL void MwDestroyWidget(MwWidget handle);
/*! /*!
* %brief Executes a method specific to the widget (varadic version). * @brief Executes a method specific to the widget (varadic version).
* %warning Prefer using corresponding functions for better code clarity and type safety. * @warning Prefer using corresponding functions for better code clarity and type safety.
* %param handle Widget * @param handle Widget
* %param ... Widget function arguments. * @param ... Widget function arguments.
*/ */
MWDECL void MwVaWidgetExecute(MwWidget handle, const char* func_name, void* out, ...); MWDECL void MwVaWidgetExecute(MwWidget handle, const char* func_name, void* out, ...);
/*! /*!
* %brief Executes a method specific to the widget (va_list version). * @brief Executes a method specific to the widget (va_list version).
* %warning Prefer using corresponding functions for better code clarity and type safety. * @warning Prefer using corresponding functions for better code clarity and type safety.
* %param handle Widget * @param handle Widget
* %param va Widget function arguments. * @param va Widget function arguments.
*/ */
MWDECL void MwVaListWidgetExecute(MwWidget handle, const char* func_name, void* out, va_list va); MWDECL void MwVaListWidgetExecute(MwWidget handle, const char* func_name, void* out, va_list va);
/*! /*!
* %brief Runs the main loop * @brief Runs the main loop
* %param handle Widget * @param handle Widget
*/ */
MWDECL void MwLoop(MwWidget handle); MWDECL void MwLoop(MwWidget handle);
/*! /*!
* %brief Runs the single step * @brief Runs the single step
* %param handle Widget * @param handle Widget
*/ */
MWDECL void MwStep(MwWidget handle); MWDECL void MwStep(MwWidget handle);
/*! /*!
* %brief Check if any event is pending * @brief Check if any event is pending
* %param handle Widget * @param handle Widget
* %return `1` if any event is pending * @return `1` if any event is pending
*/ */
MWDECL int MwPending(MwWidget handle); MWDECL int MwPending(MwWidget handle);
/*! /*!
* %brief Sets an integer property * @brief Sets an integer property
* %param handle Widget * @param handle Widget
* %param key Key * @param key Key
* %param n Value * @param n Value
*/ */
MWDECL void MwSetInteger(MwWidget handle, const char* key, int n); MWDECL void MwSetInteger(MwWidget handle, const char* key, int n);
/*! /*!
* %brief Sets a text property * @brief Sets a text property
* %param handle Widget * @param handle Widget
* %param key Key * @param key Key
* %param value Value * @param value Value
*/ */
MWDECL void MwSetText(MwWidget handle, const char* key, const char* value); MWDECL void MwSetText(MwWidget handle, const char* key, const char* value);
/*! /*!
* %brief Sets a void pointer property * @brief Sets a void pointer property
* %param handle Widget * @param handle Widget
* %param key Key * @param key Key
* %param value Value * @param value Value
*/ */
MWDECL void MwSetVoid(MwWidget handle, const char* key, void* value); MWDECL void MwSetVoid(MwWidget handle, const char* key, void* value);
/*! /*!
* %brief Gets the integer property * @brief Gets the integer property
* %param handle Widget * @param handle Widget
* %param key Key * @param key Key
* %return Value * @return Value
*/ */
MWDECL int MwGetInteger(MwWidget handle, const char* key); MWDECL int MwGetInteger(MwWidget handle, const char* key);
/*! /*!
* %brief Gets the text property * @brief Gets the text property
* %param handle Widget * @param handle Widget
* %param key Key * @param key Key
* %return Value * @return Value
*/ */
MWDECL const char* MwGetText(MwWidget handle, const char* key); MWDECL const char* MwGetText(MwWidget handle, const char* key);
/*! /*!
* %brief Gets the void pointer property * @brief Gets the void pointer property
* %param handle Widget * @param handle Widget
* %param key Key * @param key Key
* %return Value * @return Value
*/ */
MWDECL void* MwGetVoid(MwWidget handle, const char* key); MWDECL void* MwGetVoid(MwWidget handle, const char* key);
/*! /*!
* %brief Sets the default property * @brief Sets the default property
* %param handle Widget * @param handle Widget
* %warning This is called when widget is created * @warning This is called when widget is created
*/ */
MWDECL void MwSetDefault(MwWidget handle); MWDECL void MwSetDefault(MwWidget handle);
/*! /*!
* %brief Sets the properties * @brief Sets the properties
* %param handle Widget * @param handle Widget
* %param ... Properties * @param ... Properties
*/ */
MWDECL void MwVaApply(MwWidget handle, ...); MWDECL void MwVaApply(MwWidget handle, ...);
/*! /*!
* %brief Sets properties * @brief Sets properties
* %param handle Widget * @param handle Widget
* %param va Properties * @param va Properties
*/ */
MWDECL void MwVaListApply(MwWidget handle, va_list va); MWDECL void MwVaListApply(MwWidget handle, va_list va);
/*! /*!
* %brief Sets a user handler * @brief Sets a user handler
* %param handle Widget * @param handle Widget
* %param key Key * @param key Key
* %param handler Handler * @param handler Handler
* %param user_data User data passed to handler * @param user_data User data passed to handler
*/ */
MWDECL void MwAddUserHandler(MwWidget handle, const char* key, MwUserHandler handler, void* user_data); MWDECL void MwAddUserHandler(MwWidget handle, const char* key, MwUserHandler handler, void* user_data);
/*! /*!
* %brief Dispatches the user handler * @brief Dispatches the user handler
* %param handle Widget * @param handle Widget
* %param key Key * @param key Key
* %param handler_data Handler data passed to handler * @param handler_data Handler data passed to handler
*/ */
MWDECL void MwDispatchUserHandler(MwWidget handle, const char* key, void* handler_data); MWDECL void MwDispatchUserHandler(MwWidget handle, const char* key, void* handler_data);
/*! /*!
* %brief Sets an error handler * @brief Sets an error handler
* %param handle Widget * @param handle Widget
* %param handler Handler * @param handler Handler
* %param user_data User data passed to handler * @param user_data User data passed to handler
*/ */
MWDECL void MwSetErrorHandler(MwErrorHandler handler, void* user_data); MWDECL void MwSetErrorHandler(MwErrorHandler handler, void* user_data);
/*! /*!
* %brief Dispatches the error handler * @brief Dispatches the error handler
* %param code Error code * @param code Error code
* %param message Error message * @param message Error message
*/ */
MWDECL void MwDispatchError(int code, const char* message); MWDECL void MwDispatchError(int code, const char* message);
/*! /*!
* %brief Gets the before_step of widget * @brief Gets the before_step of widget
* %param handle Widget * @param handle Widget
* %param jmpbuf jmp_buf * @param jmpbuf jmp_buf
*/ */
MWDECL void MwGetBeforeStep(MwWidget handle, jmp_buf* jmpbuf); MWDECL void MwGetBeforeStep(MwWidget handle, jmp_buf* jmpbuf);
/*! /*!
* %brief Forcefully makes widget render * @brief Forcefully makes widget render
* %param handle Widget * @param handle Widget
*/ */
MWDECL void MwForceRender(MwWidget handle); MWDECL void MwForceRender(MwWidget handle);
/*! /*!
* %brief Forcefully makes widget render * @brief Forcefully makes widget render
* %param handle Widget * @param handle Widget
* %param ptr Ignored * @param ptr Ignored
*/ */
MWDECL void MwForceRender2(MwWidget handle, void* ptr); MWDECL void MwForceRender2(MwWidget handle, void* ptr);
/*! /*!
* %brief Adds an widget to tick handler list * @brief Adds an widget to tick handler list
* %param handle Widget * @param handle Widget
*/ */
MWDECL void MwAddTickList(MwWidget handle); MWDECL void MwAddTickList(MwWidget handle);
/*! /*!
* %brief Focus the widget * @brief Focus the widget
* %param handle Widget * @param handle Widget
*/ */
MWDECL void MwFocus(MwWidget handle); MWDECL void MwFocus(MwWidget handle);
/*! /*!
* %brief Grabs the pointer * @brief Grabs the pointer
* %param handle Widget * @param handle Widget
* %param toggle Toggle * @param toggle Toggle
*/ */
MWDECL void MwGrabPointer(MwWidget handle, int toggle); MWDECL void MwGrabPointer(MwWidget handle, int toggle);
/*! /*!
* %brief Hides the cursor * @brief Hides the cursor
* %param handle Widget * @param handle Widget
*/ */
MWDECL void MwHideCursor(MwWidget handle); MWDECL void MwHideCursor(MwWidget handle);
/*! /*!
* %param Toggles the dark theme * @param Toggles the dark theme
* %param handle Widget * @param handle Widget
* %param toggle Toggle * @param toggle Toggle
*/ */
MWDECL void MwToggleDarkTheme(MwWidget handle, int toggle); MWDECL void MwToggleDarkTheme(MwWidget handle, int toggle);

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Cursor.h * @file Mw/Cursor.h
* %brief Cursor externs * @brief Cursor externs
*/ */
#ifndef __MW_CURSOR_H__ #ifndef __MW_CURSOR_H__
@ -15,42 +15,42 @@ extern "C" {
#endif #endif
/*! /*!
* %brief Default cursor * @brief Default cursor
*/ */
MWDECL MwCursor MwCursorDefault; MWDECL MwCursor MwCursorDefault;
/*! /*!
* %brief Default cursor mask * @brief Default cursor mask
*/ */
MWDECL MwCursor MwCursorDefaultMask; MWDECL MwCursor MwCursorDefaultMask;
/*! /*!
* %brief Cross cursor * @brief Cross cursor
*/ */
MWDECL MwCursor MwCursorCross; MWDECL MwCursor MwCursorCross;
/*! /*!
* %brief Cross cursor mask * @brief Cross cursor mask
*/ */
MWDECL MwCursor MwCursorCrossMask; MWDECL MwCursor MwCursorCrossMask;
/*! /*!
* %brief Text cursor * @brief Text cursor
*/ */
MWDECL MwCursor MwCursorText; MWDECL MwCursor MwCursorText;
/*! /*!
* %brief Text cursor mask * @brief Text cursor mask
*/ */
MWDECL MwCursor MwCursorTextMask; MWDECL MwCursor MwCursorTextMask;
/*! /*!
* %brief Hidden cursor * @brief Hidden cursor
*/ */
MWDECL MwCursor MwCursorHidden; MWDECL MwCursor MwCursorHidden;
/*! /*!
* %brief Hidden cursor mask * @brief Hidden cursor mask
*/ */
MWDECL MwCursor MwCursorHiddenMask; MWDECL MwCursor MwCursorHiddenMask;

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Default.h * @file Mw/Default.h
* %brief Default properties * @brief Default properties
*/ */
#ifndef __MW_DEFAULT_H__ #ifndef __MW_DEFAULT_H__
#define __MW_DEFAULT_H__ #define __MW_DEFAULT_H__
@ -14,28 +14,28 @@ extern "C" {
#endif #endif
/*! /*!
* %brief Default background color * @brief Default background color
*/ */
MWDECL const char* MwDefaultBackground; MWDECL const char* MwDefaultBackground;
/*! /*!
* %brief Default foreground color * @brief Default foreground color
*/ */
MWDECL const char* MwDefaultForeground; MWDECL const char* MwDefaultForeground;
/*! /*!
* %brief Default dark theme background color * @brief Default dark theme background color
*/ */
MWDECL const char* MwDefaultDarkBackground; MWDECL const char* MwDefaultDarkBackground;
/*! /*!
* %brief Default dark theme foreground color * @brief Default dark theme foreground color
*/ */
MWDECL const char* MwDefaultDarkForeground; MWDECL const char* MwDefaultDarkForeground;
/*! /*!
* %brief Gets default border width * @brief Gets default border width
* %param handle Widget * @param handle Widget
*/ */
MWDECL int MwGetDefaultBorderWidth(MwWidget handle); MWDECL int MwGetDefaultBorderWidth(MwWidget handle);

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Directory.h * @file Mw/Directory.h
* %brief Directory functions * @brief Directory functions
*/ */
#ifndef __MW_DIRECTORY_H__ #ifndef __MW_DIRECTORY_H__
#define __MW_DIRECTORY_H__ #define __MW_DIRECTORY_H__
@ -14,42 +14,42 @@ extern "C" {
#endif #endif
/*! /*!
* %brief Opens a directory * @brief Opens a directory
* %param path Path * @param path Path
* %return Handle * @return Handle
*/ */
MWDECL void* MwDirectoryOpen(const char* path); MWDECL void* MwDirectoryOpen(const char* path);
/*! /*!
* %brief Closes a directory * @brief Closes a directory
* %param handle Handle * @param handle Handle
*/ */
MWDECL void MwDirectoryClose(void* handle); MWDECL void MwDirectoryClose(void* handle);
/*! /*!
* %brief Reads a directory * @brief Reads a directory
* %param handle Handle * @param handle Handle
* %return Directory entry * @return Directory entry
*/ */
MWDECL MwDirectoryEntry* MwDirectoryRead(void* handle); MWDECL MwDirectoryEntry* MwDirectoryRead(void* handle);
/*! /*!
* %brief Frees a directory entry * @brief Frees a directory entry
* %param entry Entry * @param entry Entry
*/ */
MWDECL void MwDirectoryFreeEntry(MwDirectoryEntry* entry); MWDECL void MwDirectoryFreeEntry(MwDirectoryEntry* entry);
/*! /*!
* %brief Gets a current directory * @brief Gets a current directory
* %param Directory * @param Directory
*/ */
MWDECL char* MwDirectoryCurrent(void); MWDECL char* MwDirectoryCurrent(void);
/*! /*!
* %brief Joins 2 paths * @brief Joins 2 paths
* %param a Path * @param a Path
* %param b Path * @param b Path
* %return Path * @return Path
*/ */
MWDECL char* MwDirectoryJoin(char* a, char* b); MWDECL char* MwDirectoryJoin(char* a, char* b);

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Draw.h * @file Mw/Draw.h
* %brief Common drawing API * @brief Common drawing API
*/ */
#ifndef __MW_DRAW_H__ #ifndef __MW_DRAW_H__
#define __MW_DRAW_H__ #define __MW_DRAW_H__
@ -15,157 +15,157 @@ extern "C" {
#endif #endif
/*! /*!
* %brief Parses a color text * @brief Parses a color text
* %param handle Widget * @param handle Widget
* %param text Color text * @param text Color text
* %return Color * @return Color
*/ */
MWDECL MwLLColor MwParseColor(MwWidget handle, const char* text); MWDECL MwLLColor MwParseColor(MwWidget handle, const char* text);
/*! /*!
* %brief Lighten a color * @brief Lighten a color
* %param handle Widget * @param handle Widget
* %param color Color * @param color Color
* %param r Red * @param r Red
* %param g Green * @param g Green
* %param b Blue * @param b Blue
* %return Color * @return Color
*/ */
MWDECL MwLLColor MwLightenColor(MwWidget handle, MwLLColor color, int r, int g, int b); MWDECL MwLLColor MwLightenColor(MwWidget handle, MwLLColor color, int r, int g, int b);
/*! /*!
* %brief Draws a filled rectangle * @brief Draws a filled rectangle
* %param handle Widget * @param handle Widget
* %param rect Rectangle area * @param rect Rectangle area
* %param color Color * @param color Color
*/ */
MWDECL void MwDrawRect(MwWidget handle, MwRect* rect, MwLLColor color); MWDECL void MwDrawRect(MwWidget handle, MwRect* rect, MwLLColor color);
/*! /*!
* %brief Draws a filled rectangle that fades to a darker color * @brief Draws a filled rectangle that fades to a darker color
* %param handle Widget * @param handle Widget
* %param rect Rectangle area * @param rect Rectangle area
* %param color Color * @param color Color
*/ */
MWDECL void MwDrawRectFading(MwWidget handle, MwRect* rect, MwLLColor color); MWDECL void MwDrawRectFading(MwWidget handle, MwRect* rect, MwLLColor color);
/*! /*!
* %brief Draws a frame * @brief Draws a frame
* %param handle Widget * @param handle Widget
* %param rect Rectangle area * @param rect Rectangle area
* %param color Color * @param color Color
* %param invert Invert the 3D border color or not * @param invert Invert the 3D border color or not
* %warning `rect` gets changed to the area of rectangle inside * @warning `rect` gets changed to the area of rectangle inside
*/ */
MWDECL void MwDrawFrame(MwWidget handle, MwRect* rect, MwLLColor color, int invert); MWDECL void MwDrawFrame(MwWidget handle, MwRect* rect, MwLLColor color, int invert);
/*! /*!
* %brief Does the DrawFrame/DrawRect combo used for drawing widget. * @brief Does the DrawFrame/DrawRect combo used for drawing widget.
* %param handle Widget * @param handle Widget
* %param rect Rectangle area * @param rect Rectangle area
* %param color Color * @param color Color
* %param invert Invert the 3D border color or not * @param invert Invert the 3D border color or not
* %warning `rect` gets changed to the area of rectangle inside * @warning `rect` gets changed to the area of rectangle inside
*/ */
MWDECL void MwDrawWidgetBack(MwWidget handle, MwRect* rect, MwLLColor color, int invert, int border); MWDECL void MwDrawWidgetBack(MwWidget handle, MwRect* rect, MwLLColor color, int invert, int border);
/*! /*!
* %brief Draws a triangle * @brief Draws a triangle
* %param handle Widget * @param handle Widget
* %param rect Rectangle area * @param rect Rectangle area
* %param color Color * @param color Color
* %param invert Invert the 3D border color or not * @param invert Invert the 3D border color or not
*/ */
MWDECL void MwDrawTriangle(MwWidget handle, MwRect* rect, MwLLColor color, int invert, int direction); MWDECL void MwDrawTriangle(MwWidget handle, MwRect* rect, MwLLColor color, int invert, int direction);
/*! /*!
* %brief Draws a frame with specified border width * @brief Draws a frame with specified border width
* %param handle Widget * @param handle Widget
* %param rect Rectangle area * @param rect Rectangle area
* %param color Color * @param color Color
* %param invert Invert the 3D border color or not * @param invert Invert the 3D border color or not
* %param border Border width * @param border Border width
* %warning `rect` gets changed to the area of rectangle inside * @warning `rect` gets changed to the area of rectangle inside
*/ */
MWDECL void MwDrawFrameEx(MwWidget handle, MwRect* rect, MwLLColor color, int invert, int border); MWDECL void MwDrawFrameEx(MwWidget handle, MwRect* rect, MwLLColor color, int invert, int border);
/*! /*!
* %brief Draws a text * @brief Draws a text
* %param handle Widget * @param handle Widget
* %param point Center point of the text * @param point Center point of the text
* %param text Text * @param text Text
* %param bold Bold * @param bold Bold
* %param align Align * @param align Align
* %param color Color * @param color Color
*/ */
MWDECL void MwDrawText(MwWidget handle, MwPoint* point, const char* text, int bold, int align, MwLLColor color); MWDECL void MwDrawText(MwWidget handle, MwPoint* point, const char* text, int bold, int align, MwLLColor color);
/*! /*!
* %brief Creates a pixmap from image * @brief Creates a pixmap from image
* %param handle Widget * @param handle Widget
* %param path Path * @param path Path
* %return Pixmap * @return Pixmap
*/ */
MWDECL MwLLPixmap MwLoadImage(MwWidget handle, const char* path); MWDECL MwLLPixmap MwLoadImage(MwWidget handle, const char* path);
/*! /*!
* %brief Calculates a text width * @brief Calculates a text width
* %param handle Widget * @param handle Widget
* %param text Text * @param text Text
* %return Text width * @return Text width
*/ */
MWDECL int MwTextWidth(MwWidget handle, const char* text); MWDECL int MwTextWidth(MwWidget handle, const char* text);
/*! /*!
* %brief Calculates a text height * @brief Calculates a text height
* %param handle Widget * @param handle Widget
* %param text Text * @param text Text
* %return Text height * @return Text height
*/ */
MWDECL int MwTextHeight(MwWidget handle, const char* text); MWDECL int MwTextHeight(MwWidget handle, const char* text);
/*! /*!
* %brief Get color components * @brief Get color components
* %param color Color * @param color Color
* %param red Pointer to red color * @param red Pointer to red color
* %param green Pointer to green color * @param green Pointer to green color
* %param blue Pointer to blue color * @param blue Pointer to blue color
*/ */
MWDECL void MwGetColor(MwLLColor color, int* red, int* green, int* blue); MWDECL void MwGetColor(MwLLColor color, int* red, int* green, int* blue);
/*! /*!
* %brief Creates a pixmap from raw data * @brief Creates a pixmap from raw data
* %param handle Widget * @param handle Widget
* %param rgb RGBA data * @param rgb RGBA data
* %param width Width * @param width Width
* %param height Height * @param height Height
* %return Pixmap * @return Pixmap
*/ */
MWDECL MwLLPixmap MwLoadRaw(MwWidget handle, unsigned char* rgb, int width, int height); MWDECL MwLLPixmap MwLoadRaw(MwWidget handle, unsigned char* rgb, int width, int height);
/*! /*!
* %brief Creates a pixmap from XPM data * @brief Creates a pixmap from XPM data
* %param handle Widget * @param handle Widget
* %param data Data * @param data Data
* %return Pixmap * @return Pixmap
*/ */
MWDECL MwLLPixmap MwLoadXPM(MwWidget handle, char** data); MWDECL MwLLPixmap MwLoadXPM(MwWidget handle, char** data);
/*! /*!
* %brief Creates a pixmap from icon data * @brief Creates a pixmap from icon data
* %param handle Widget * @param handle Widget
* %param data Data * @param data Data
* %return Pixmap * @return Pixmap
*/ */
MWDECL MwLLPixmap MwLoadIcon(MwWidget handle, unsigned int* data); MWDECL MwLLPixmap MwLoadIcon(MwWidget handle, unsigned int* data);
/* color.c */ /* color.c */
/*! /*!
* %brief Parses a color name * @brief Parses a color name
* %param handle Widget * @param handle Widget
* %param color Color name * @param color Color name
* %return Color * @return Color
*/ */
MWDECL MwLLColor MwParseColorName(MwWidget handle, const char* color); MWDECL MwLLColor MwParseColorName(MwWidget handle, const char* color);

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Error.h * @file Mw/Error.h
* %brief Error codes * @brief Error codes
*/ */
#ifndef __MW_ERROR_H__ #ifndef __MW_ERROR_H__
#define __MW_ERROR_H__ #define __MW_ERROR_H__
@ -9,21 +9,21 @@
#include <Mw/MachDep.h> #include <Mw/MachDep.h>
/*! /*!
* %brief Error code enumeration * @brief Error code enumeration
*/ */
typedef enum MwErrorEnum_T { typedef enum MwErrorEnum_T {
/*! /*!
* %brief No error * @brief No error
*/ */
MwEsuccess = 0, MwEsuccess = 0,
/*! /*!
* %brief There was an error * @brief There was an error
*/ */
MwEerror, MwEerror,
} MwErrorEnum; } MwErrorEnum;
/*! /*!
* %brief Get the last error * @brief Get the last error
*/ */
MWDECL const char* MwGetLastError(void); MWDECL const char* MwGetLastError(void);

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/FileChooser.h * @file Mw/FileChooser.h
* %brief File chooser * @brief File chooser
*/ */
#ifndef __MW_FILECHOOSER_H__ #ifndef __MW_FILECHOOSER_H__
#define __MW_FILECHOOSER_H__ #define __MW_FILECHOOSER_H__

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Font.h * @file Mw/Font.h
* %brief Default font * @brief Default font
*/ */
#ifndef __MW_FONT_H__ #ifndef __MW_FONT_H__
#define __MW_FONT_H__ #define __MW_FONT_H__
@ -14,46 +14,46 @@ extern "C" {
#endif #endif
/*! /*!
* %brief Default font data * @brief Default font data
*/ */
MWDECL MwFont MwFontData[]; MWDECL MwFont MwFontData[];
/*! /*!
* %brief Default bold font data * @brief Default bold font data
*/ */
MWDECL MwFont MwBoldFontData[]; MWDECL MwFont MwBoldFontData[];
/*! /*!
* %brief Default TTF font data * @brief Default TTF font data
*/ */
MWDECL unsigned char MwTTFData[]; MWDECL unsigned char MwTTFData[];
/*! /*!
* %brief Default TTF font size * @brief Default TTF font size
*/ */
MWDECL unsigned int MwTTFDataSize; MWDECL unsigned int MwTTFDataSize;
/*! /*!
* %brief Default bold TTF font data * @brief Default bold TTF font data
*/ */
MWDECL unsigned char MwBoldTTFData[]; MWDECL unsigned char MwBoldTTFData[];
/*! /*!
* %brief Default bold TTF font size * @brief Default bold TTF font size
*/ */
MWDECL unsigned int MwBoldTTFDataSize; MWDECL unsigned int MwBoldTTFDataSize;
/*! /*!
* %brief Loads a TTF Font * @brief Loads a TTF Font
* %param data Data * @param data Data
* %param size Data size * @param size Data size
* %return Font handle * @return Font handle
*/ */
MWDECL void* MwFontLoad(unsigned char* data, unsigned int size); MWDECL void* MwFontLoad(unsigned char* data, unsigned int size);
/*! /*!
* %brief Frees a font handle * @brief Frees a font handle
* %param handle Handle * @param handle Handle
*/ */
MWDECL void MwFontFree(void* handle); MWDECL void MwFontFree(void* handle);

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Icon.h * @file Mw/Icon.h
* %brief Icon * @brief Icon
*/ */
#ifndef __MW_ICON_H__ #ifndef __MW_ICON_H__
#define __MW_ICON_H__ #define __MW_ICON_H__
@ -13,62 +13,62 @@ extern "C" {
#endif #endif
/*! /*!
* %brief Back icon * @brief Back icon
*/ */
MWDECL unsigned int MwIconBack[]; MWDECL unsigned int MwIconBack[];
/*! /*!
* %brief Computer icon * @brief Computer icon
*/ */
MWDECL unsigned int MwIconComputer[]; MWDECL unsigned int MwIconComputer[];
/*! /*!
* %brief Directory icon * @brief Directory icon
*/ */
MWDECL unsigned int MwIconDirectory[]; MWDECL unsigned int MwIconDirectory[];
/*! /*!
* %brief Error icon * @brief Error icon
*/ */
MWDECL unsigned int MwIconError[]; MWDECL unsigned int MwIconError[];
/*! /*!
* %brief File icon * @brief File icon
*/ */
MWDECL unsigned int MwIconFile[]; MWDECL unsigned int MwIconFile[];
/*! /*!
* %brief Forward icon * @brief Forward icon
*/ */
MWDECL unsigned int MwIconForward[]; MWDECL unsigned int MwIconForward[];
/*! /*!
* %brief Info icon * @brief Info icon
*/ */
MWDECL unsigned int MwIconInfo[]; MWDECL unsigned int MwIconInfo[];
/*! /*!
* %brief News icon * @brief News icon
*/ */
MWDECL unsigned int MwIconNews[]; MWDECL unsigned int MwIconNews[];
/*! /*!
* %brief Note icon * @brief Note icon
*/ */
MWDECL unsigned int MwIconNote[]; MWDECL unsigned int MwIconNote[];
/*! /*!
* %brief Search icon * @brief Search icon
*/ */
MWDECL unsigned int MwIconSearch[]; MWDECL unsigned int MwIconSearch[];
/*! /*!
* %brief Up icon * @brief Up icon
*/ */
MWDECL unsigned int MwIconUp[]; MWDECL unsigned int MwIconUp[];
/*! /*!
* %brief Warning icon * @brief Warning icon
*/ */
MWDECL unsigned int MwIconWarning[]; MWDECL unsigned int MwIconWarning[];

View file

@ -1,8 +1,8 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/LowLevel.h * @file Mw/LowLevel.h
* %brief Low-level drawing API * @brief Low-level drawing API
* %warning This is used internally * @warning This is used internally
*/ */
#ifndef __MW_LOWLEVEL_H__ #ifndef __MW_LOWLEVEL_H__
#define __MW_LOWLEVEL_H__ #define __MW_LOWLEVEL_H__

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/MachDep.h * @file Mw/MachDep.h
* %brief Machine dependent headers and macros * @brief Machine dependent headers and macros
*/ */
#ifndef __MW_MACHDEP_H__ #ifndef __MW_MACHDEP_H__
#define __MW_MACHDEP_H__ #define __MW_MACHDEP_H__

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/MessageBox.h * @file Mw/MessageBox.h
* %brief Message box * @brief Message box
*/ */
#ifndef __MW_MESSAGEBOX_H__ #ifndef __MW_MESSAGEBOX_H__
#define __MW_MESSAGEBOX_H__ #define __MW_MESSAGEBOX_H__
@ -14,25 +14,25 @@ extern "C" {
#endif #endif
/*! /*!
* %brief Creates a message box * @brief Creates a message box
* %param handle Widget * @param handle Widget
* %param text Text * @param text Text
* %param title Title text * @param title Title text
* %param flag Flag * @param flag Flag
* %return Widget * @return Widget
*/ */
MWDECL MwWidget MwMessageBox(MwWidget handle, const char* text, const char* title, unsigned int flag); MWDECL MwWidget MwMessageBox(MwWidget handle, const char* text, const char* title, unsigned int flag);
/*! /*!
* %brief Gets a child of the message box * @brief Gets a child of the message box
* %param handle Widget * @param handle Widget
* %param child Child * @param child Child
*/ */
MWDECL MwWidget MwMessageBoxGetChild(MwWidget handle, int child); MWDECL MwWidget MwMessageBoxGetChild(MwWidget handle, int child);
/*! /*!
* %brief Destroys the message box * @brief Destroys the message box
* %param handle Widget * @param handle Widget
*/ */
MWDECL void MwMessageBoxDestroy(MwWidget handle); MWDECL void MwMessageBoxDestroy(MwWidget handle);

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Milsko.h * @file Mw/Milsko.h
* %brief Includes all headers * @brief Includes all headers
*/ */
#ifndef __MW_MILSKO_H__ #ifndef __MW_MILSKO_H__
#define __MW_MILSKO_H__ #define __MW_MILSKO_H__

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/String.h * @file Mw/String.h
* %brief String utilities * @brief String utilities
*/ */
#ifndef __MW_STRING_H__ #ifndef __MW_STRING_H__
#define __MW_STRING_H__ #define __MW_STRING_H__
@ -14,31 +14,31 @@ extern "C" {
#endif #endif
/*! /*!
* %brief Duplicates a string * @brief Duplicates a string
* %param str String * @param str String
* %return String * @return String
*/ */
MWDECL char* MwStringDupliacte(const char* str); MWDECL char* MwStringDupliacte(const char* str);
/*! /*!
* %brief Concatenates 2 strings * @brief Concatenates 2 strings
* %param str1 String * @param str1 String
* %param str2 String * @param str2 String
* %return String * @return String
*/ */
MWDECL char* MwStringConcat(const char* str1, const char* str2); MWDECL char* MwStringConcat(const char* str1, const char* str2);
/*! /*!
* %brief Converts size to string * @brief Converts size to string
* %param out Output * @param out Output
* %param size Size * @param size Size
*/ */
MWDECL void MwStringSize(char* out, MwOffset size); MWDECL void MwStringSize(char* out, MwOffset size);
/*! /*!
* %brief Converts time to string * @brief Converts time to string
* %param out Output * @param out Output
* %param t Time * @param t Time
*/ */
MWDECL void MwStringTime(char* out, time_t t); MWDECL void MwStringTime(char* out, time_t t);

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/StringDefs.h * @file Mw/StringDefs.h
* %brief String definitions for property * @brief String definitions for property
*/ */
#ifndef __MW_STRINGDEFS_H__ #ifndef __MW_STRINGDEFS_H__
#define __MW_STRINGDEFS_H__ #define __MW_STRINGDEFS_H__

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/TypeDefs.h * @file Mw/TypeDefs.h
* %brief Type definitions * @brief Type definitions
*/ */
#ifndef __MW_TYPEDEFS_H__ #ifndef __MW_TYPEDEFS_H__
#define __MW_TYPEDEFS_H__ #define __MW_TYPEDEFS_H__

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Unicode.h * @file Mw/Unicode.h
* %brief Handles UTF8 stuff * @brief Handles UTF8 stuff
*/ */
#ifndef __MW_UNICODE_H__ #ifndef __MW_UNICODE_H__
#define __MW_UNICODE_H__ #define __MW_UNICODE_H__
@ -14,36 +14,36 @@ extern "C" {
#endif #endif
/*! /*!
* %brief Converts UTF-8 to UTF-32 * @brief Converts UTF-8 to UTF-32
* %brief input Input * @brief input Input
* %brief output Output * @brief output Output
* %return Bytes this multibyte takes * @return Bytes this multibyte takes
*/ */
MWDECL int MwUTF8ToUTF32(const char* input, int* output); MWDECL int MwUTF8ToUTF32(const char* input, int* output);
/*! /*!
* %brief Calculates UTF-8 string length * @brief Calculates UTF-8 string length
* %brief input Input * @brief input Input
* %return Length * @return Length
*/ */
MWDECL int MwUTF8Length(const char* input); MWDECL int MwUTF8Length(const char* input);
/*! /*!
* %brief Copies UTF-8 string to other string * @brief Copies UTF-8 string to other string
* %brief src Source * @brief src Source
* %brief srcskip Length to be skipped * @brief srcskip Length to be skipped
* %brief dst Destination * @brief dst Destination
* %brief dstskip Length to be skipped * @brief dstskip Length to be skipped
* %brief len Length * @brief len Length
* %return Copied length in bytes * @return Copied length in bytes
*/ */
MWDECL int MwUTF8Copy(const char* src, int srcskip, char* dst, int dstskip, int len); MWDECL int MwUTF8Copy(const char* src, int srcskip, char* dst, int dstskip, int len);
/*! /*!
* %brief Converts UTF-32 to UTF-8 * @brief Converts UTF-32 to UTF-8
* %brief input Input * @brief input Input
* %brief output Output * @brief output Output
* %return Bytes this wide byte takes * @return Bytes this wide byte takes
*/ */
MWDECL int MwUTF32ToUTF8(int input, char* output); MWDECL int MwUTF32ToUTF8(int input, char* output);

View file

@ -1,23 +1,23 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Version.h * @file Mw/Version.h
* %brief Version informations * @brief Version informations
*/ */
#ifndef __MW_VERSION_H__ #ifndef __MW_VERSION_H__
#define __MW_VERSION_H__ #define __MW_VERSION_H__
/*! /*!
* %brief Major version * @brief Major version
*/ */
#define MwMAJOR 0 #define MwMAJOR 0
/*! /*!
* %brief Minor version * @brief Minor version
*/ */
#define MwMINOR 0 #define MwMINOR 0
/*! /*!
* %brief Version in string * @brief Version in string
*/ */
#define MwVERSION "pre-1.0" #define MwVERSION "pre-1.0"

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Widget/Button.h * @file Mw/Widget/Button.h
* %brief Button widget * @brief Button widget
*/ */
#ifndef __MW_WIDGET_BUTTON_H__ #ifndef __MW_WIDGET_BUTTON_H__
#define __MW_WIDGET_BUTTON_H__ #define __MW_WIDGET_BUTTON_H__
@ -14,7 +14,7 @@ extern "C" {
#endif #endif
/*! /*!
* %brief Button widget class * @brief Button widget class
*/ */
MWDECL MwClass MwButtonClass; MWDECL MwClass MwButtonClass;

View file

@ -1,7 +1,7 @@
/* $Id: CheckBox.h 206 2025-10-07 15:10:46Z nishi $ */ /* $Id: CheckBox.h 206 2025-10-07 15:10:46Z nishi $ */
/*! /*!
* %file Mw/Widget/CheckBox.h * @file Mw/Widget/CheckBox.h
* %brief CheckBox widget * @brief CheckBox widget
*/ */
#ifndef __MW_WIDGET_CHECKBOX_H__ #ifndef __MW_WIDGET_CHECKBOX_H__
#define __MW_WIDGET_CHECKBOX_H__ #define __MW_WIDGET_CHECKBOX_H__
@ -14,7 +14,7 @@ extern "C" {
#endif #endif
/*! /*!
* %brief CheckBox widget class * @brief CheckBox widget class
*/ */
MWDECL MwClass MwCheckBoxClass; MWDECL MwClass MwCheckBoxClass;

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Widget/Entry.h * @file Mw/Widget/Entry.h
* %brief Entry widget * @brief Entry widget
*/ */
#ifndef __MW_WIDGET_ENTRY_H__ #ifndef __MW_WIDGET_ENTRY_H__
#define __MW_WIDGET_ENTRY_H__ #define __MW_WIDGET_ENTRY_H__
@ -14,7 +14,7 @@ extern "C" {
#endif #endif
/*! /*!
* %brief Entry widget class * @brief Entry widget class
*/ */
MWDECL MwClass MwEntryClass; MWDECL MwClass MwEntryClass;

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Widget/Frame.h * @file Mw/Widget/Frame.h
* %brief Frame widget * @brief Frame widget
*/ */
#ifndef __MW_WIDGET_FRAME_H__ #ifndef __MW_WIDGET_FRAME_H__
#define __MW_WIDGET_FRAME_H__ #define __MW_WIDGET_FRAME_H__
@ -14,7 +14,7 @@ extern "C" {
#endif #endif
/*! /*!
* %brief Frame widget class * @brief Frame widget class
*/ */
MWDECL MwClass MwFrameClass; MWDECL MwClass MwFrameClass;

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Widget/Image.h * @file Mw/Widget/Image.h
* %brief Image widget * @brief Image widget
*/ */
#ifndef __MW_WIDGET_IMAGE_H__ #ifndef __MW_WIDGET_IMAGE_H__
#define __MW_WIDGET_IMAGE_H__ #define __MW_WIDGET_IMAGE_H__
@ -14,7 +14,7 @@ extern "C" {
#endif #endif
/*! /*!
* %brief Image widget class * @brief Image widget class
*/ */
MWDECL MwClass MwImageClass; MWDECL MwClass MwImageClass;

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Widget/Label.h * @file Mw/Widget/Label.h
* %brief Label widget * @brief Label widget
*/ */
#ifndef __MW_WIDGET_LABEL_H__ #ifndef __MW_WIDGET_LABEL_H__
#define __MW_WIDGET_LABEL_H__ #define __MW_WIDGET_LABEL_H__
@ -14,7 +14,7 @@ extern "C" {
#endif #endif
/*! /*!
* %brief Label widget class * @brief Label widget class
*/ */
MWDECL MwClass MwLabelClass; MWDECL MwClass MwLabelClass;

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Widget/ListBox.h * @file Mw/Widget/ListBox.h
* %brief ListBox widget * @brief ListBox widget
*/ */
#ifndef __MW_WIDGET_LISTBOX_H__ #ifndef __MW_WIDGET_LISTBOX_H__
#define __MW_WIDGET_LISTBOX_H__ #define __MW_WIDGET_LISTBOX_H__
@ -15,71 +15,71 @@ extern "C" {
#endif #endif
/*! /*!
* %brief ListBox widget class * @brief ListBox widget class
*/ */
MWDECL MwClass MwListBoxClass; MWDECL MwClass MwListBoxClass;
/*! /*!
* %brief Creates a listbox packet * @brief Creates a listbox packet
* %return Packet * @return Packet
*/ */
MWDECL MwListBoxPacket* MwListBoxCreatePacket(void); MWDECL MwListBoxPacket* MwListBoxCreatePacket(void);
/*! /*!
* %brief Destroys a listbox packet * @brief Destroys a listbox packet
* %param packet Packet * @param packet Packet
*/ */
MWDECL void MwListBoxDestroyPacket(MwListBoxPacket* packet); MWDECL void MwListBoxDestroyPacket(MwListBoxPacket* packet);
/*! /*!
* %brief Inserts a new item to a packet * @brief Inserts a new item to a packet
* %param packet Packet * @param packet Packet
* %param index Index * @param index Index
* %return Index * @return Index
*/ */
MWDECL int MwListBoxPacketInsert(MwListBoxPacket* packet, int index); MWDECL int MwListBoxPacketInsert(MwListBoxPacket* packet, int index);
/*! /*!
* %brief Sets a column of item in a packet * @brief Sets a column of item in a packet
* %param packet Packet * @param packet Packet
* %param index Index * @param index Index
* %param col Column * @param col Column
* %param text Text * @param text Text
*/ */
MWDECL void MwListBoxPacketSet(MwListBoxPacket* packet, int index, int col, const char* text); MWDECL void MwListBoxPacketSet(MwListBoxPacket* packet, int index, int col, const char* text);
/*! /*!
* %brief Sets an icon of item in a packet * @brief Sets an icon of item in a packet
* %param packet Packet * @param packet Packet
* %param index Index * @param index Index
* %param icon Icon * @param icon Icon
*/ */
MWDECL void MwListBoxPacketSetIcon(MwListBoxPacket* packet, int index, MwLLPixmap icon); MWDECL void MwListBoxPacketSetIcon(MwListBoxPacket* packet, int index, MwLLPixmap icon);
/*! /*!
* %brief Inserts item on the listbox * @brief Inserts item on the listbox
* %param handle Widget * @param handle Widget
* %param index Index * @param index Index
* %param packet Packet * @param packet Packet
*/ */
MwInline void MwListBoxInsert(MwWidget handle, int index, void* packet) { MwInline void MwListBoxInsert(MwWidget handle, int index, void* packet) {
MwVaWidgetExecute(handle, "mwListBoxInsert", NULL, index, packet); MwVaWidgetExecute(handle, "mwListBoxInsert", NULL, index, packet);
} }
/*! /*!
* %brief Deletes item from the listbox * @brief Deletes item from the listbox
* %param handle Widget * @param handle Widget
* %param index Index * @param index Index
*/ */
MwInline void MwListBoxDelete(MwWidget handle, int index) { MwInline void MwListBoxDelete(MwWidget handle, int index) {
MwVaWidgetExecute(handle, "mwListboxDelete", NULL, index); MwVaWidgetExecute(handle, "mwListboxDelete", NULL, index);
}; };
/*! /*!
* %brief Gets item from the listbox * @brief Gets item from the listbox
* %param handle Widget * @param handle Widget
* %param index Index * @param index Index
* %return Item * @return Item
*/ */
MwInline const char* MwListBoxGet(MwWidget handle, int index) { MwInline const char* MwListBoxGet(MwWidget handle, int index) {
const char* out; const char* out;
@ -88,18 +88,18 @@ MwInline const char* MwListBoxGet(MwWidget handle, int index) {
}; };
/*! /*!
* %brief Sets an item width of the listbox * @brief Sets an item width of the listbox
* %param handle Widget * @param handle Widget
* %param index Column index * @param index Column index
* %param width Width * @param width Width
*/ */
MwInline void MwListBoxSetWidth(MwWidget handle, int index, int width) { MwInline void MwListBoxSetWidth(MwWidget handle, int index, int width) {
MwVaWidgetExecute(handle, "mwListBoxSetWidth", NULL, index, width); MwVaWidgetExecute(handle, "mwListBoxSetWidth", NULL, index, width);
}; };
/*! /*!
* %brief Resets the listbox * @brief Resets the listbox
* %param handle Widget * @param handle Widget
*/ */
MwInline void MwListBoxReset(MwWidget handle) { MwInline void MwListBoxReset(MwWidget handle) {
MwVaWidgetExecute(handle, "mwListBoxReset", NULL); MwVaWidgetExecute(handle, "mwListBoxReset", NULL);

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Widget/Menu.h * @file Mw/Widget/Menu.h
* %brief Menu widget * @brief Menu widget
*/ */
#ifndef __MW_WIDGET_MENU_H__ #ifndef __MW_WIDGET_MENU_H__
#define __MW_WIDGET_MENU_H__ #define __MW_WIDGET_MENU_H__
@ -15,16 +15,16 @@ extern "C" {
#endif #endif
/*! /*!
* %brief Menu widget class * @brief Menu widget class
*/ */
MWDECL MwClass MwMenuClass; MWDECL MwClass MwMenuClass;
/*! /*!
* %brief Adds a menu * @brief Adds a menu
* %param handle Widget * @param handle Widget
* %param menu Menu * @param menu Menu
* %param name Menu name * @param name Menu name
* %return Menu * @return Menu
*/ */
MwInline MwMenu MwMenuAdd(MwWidget handle, MwMenu menu, const char* name) { MwInline MwMenu MwMenuAdd(MwWidget handle, MwMenu menu, const char* name) {
MwMenu out; MwMenu out;

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Widget/NumberEntry.h * @file Mw/Widget/NumberEntry.h
* %brief NumberEntry widget * @brief NumberEntry widget
*/ */
#ifndef __MW_WIDGET_NUMBERENTRY_H__ #ifndef __MW_WIDGET_NUMBERENTRY_H__
#define __MW_WIDGET_NUMBERENTRY_H__ #define __MW_WIDGET_NUMBERENTRY_H__
@ -14,7 +14,7 @@ extern "C" {
#endif #endif
/*! /*!
* %brief NumberEntry widget class * @brief NumberEntry widget class
*/ */
MWDECL MwClass MwNumberEntryClass; MWDECL MwClass MwNumberEntryClass;

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Widget/OpenGL.h * @file Mw/Widget/OpenGL.h
* %brief OpenGL widget * @brief OpenGL widget
*/ */
#ifndef __MW_WIDGET_OPENGL_H__ #ifndef __MW_WIDGET_OPENGL_H__
#define __MW_WIDGET_OPENGL_H__ #define __MW_WIDGET_OPENGL_H__
@ -26,23 +26,23 @@ extern "C" {
#endif #endif
/*! /*!
* %brief OpenGL widget class * @brief OpenGL widget class
*/ */
MWDECL MwClass MwOpenGLClass; MWDECL MwClass MwOpenGLClass;
/*! /*!
* %brief Make a widget current OpenGL context * @brief Make a widget current OpenGL context
* %param handle Widget * @param handle Widget
*/ */
MwInline void MwOpenGLMakeCurrent(MwWidget handle) { MwInline void MwOpenGLMakeCurrent(MwWidget handle) {
MwVaWidgetExecute(handle, "mwOpenGLMakeCurrent", NULL); MwVaWidgetExecute(handle, "mwOpenGLMakeCurrent", NULL);
}; };
/*! /*!
* %brief Get a procedure from OpenGL * @brief Get a procedure from OpenGL
* %param handle Widget * @param handle Widget
* %param name Name * @param name Name
* %return Procedure * @return Procedure
*/ */
MwInline void* MwOpenGLGetProcAddress(MwWidget handle, const char* name) { MwInline void* MwOpenGLGetProcAddress(MwWidget handle, const char* name) {
void* out; void* out;
@ -51,8 +51,8 @@ MwInline void* MwOpenGLGetProcAddress(MwWidget handle, const char* name) {
}; };
/*! /*!
* %brief Swaps the buffer of OpenGL context * @brief Swaps the buffer of OpenGL context
* %param handle Widget * @param handle Widget
*/ */
MwInline void MwOpenGLSwapBuffer(MwWidget handle) { MwInline void MwOpenGLSwapBuffer(MwWidget handle) {
MwVaWidgetExecute(handle, "mwOpenGLSwapBuffer", NULL); MwVaWidgetExecute(handle, "mwOpenGLSwapBuffer", NULL);

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Widget/ScrollBar.h * @file Mw/Widget/ScrollBar.h
* %brief ScrollBar widget * @brief ScrollBar widget
*/ */
#ifndef __MW_WIDGET_SCROLLBAR_H__ #ifndef __MW_WIDGET_SCROLLBAR_H__
#define __MW_WIDGET_SCROLLBAR_H__ #define __MW_WIDGET_SCROLLBAR_H__
@ -15,14 +15,14 @@ extern "C" {
#endif #endif
/*! /*!
* %brief ScrollBar widget class * @brief ScrollBar widget class
*/ */
MWDECL MwClass MwScrollBarClass; MWDECL MwClass MwScrollBarClass;
/*! /*!
* %brief Calculates a visible length of scrollbar * @brief Calculates a visible length of scrollbar
* %param handle Widget * @param handle Widget
* %return Visible length * @return Visible length
*/ */
MwInline int MwScrollBarGetVisibleLength(MwWidget handle) { MwInline int MwScrollBarGetVisibleLength(MwWidget handle) {
int out; int out;

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Widget/SubMenu.h * @file Mw/Widget/SubMenu.h
* %brief SubMenu widget * @brief SubMenu widget
*/ */
#ifndef __MW_WIDGET_SUBMENU_H__ #ifndef __MW_WIDGET_SUBMENU_H__
#define __MW_WIDGET_SUBMENU_H__ #define __MW_WIDGET_SUBMENU_H__
@ -15,7 +15,7 @@ extern "C" {
#endif #endif
/*! /*!
* %brief SubMenu widget class * @brief SubMenu widget class
*/ */
MWDECL MwClass MwSubMenuClass; MWDECL MwClass MwSubMenuClass;

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Widget/Viewport.h * @file Mw/Widget/Viewport.h
* %brief Viewport widget * @brief Viewport widget
*/ */
#ifndef __MW_WIDGET_VIEWPORT_H__ #ifndef __MW_WIDGET_VIEWPORT_H__
#define __MW_WIDGET_VIEWPORT_H__ #define __MW_WIDGET_VIEWPORT_H__
@ -15,14 +15,14 @@ extern "C" {
#endif #endif
/*! /*!
* %brief Viewport widget class * @brief Viewport widget class
*/ */
MWDECL MwClass MwViewportClass; MWDECL MwClass MwViewportClass;
/*! /*!
* %brief Get parent widget where widgets should be placed * @brief Get parent widget where widgets should be placed
* %param handle Widget * @param handle Widget
* %return Widget * @return Widget
*/ */
MwInline MwWidget MwViewportGetViewport(MwWidget handle) { MwInline MwWidget MwViewportGetViewport(MwWidget handle) {
MwWidget out; MwWidget out;
@ -31,10 +31,10 @@ MwInline MwWidget MwViewportGetViewport(MwWidget handle) {
}; };
/*! /*!
* %brief Set viewport size * @brief Set viewport size
* %param handle Widget * @param handle Widget
* %param w Width * @param w Width
* %param h Height * @param h Height
*/ */
MwInline void MwViewportSetSize(MwWidget handle, int w, int h) { MwInline void MwViewportSetSize(MwWidget handle, int w, int h) {
MwVaWidgetExecute(handle, "mwViewportSetSize", NULL, w, h); MwVaWidgetExecute(handle, "mwViewportSetSize", NULL, w, h);

View file

@ -1,8 +1,8 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Widget/Vulkan.h * @file Mw/Widget/Vulkan.h
* %brief Vulkan widget * @brief Vulkan widget
* %warning This header is not documented yet * @warning This header is not documented yet
*/ */
/** /**
@ -29,89 +29,89 @@ extern "C" {
#endif #endif
/*! /*!
* %brief Vulkan widget class * @brief Vulkan widget class
*/ */
MWDECL MwClass MwVulkanClass; MWDECL MwClass MwVulkanClass;
/*! /*!
* %brief Add an extension to the list of extensions to enable prior to initialization. * @brief Add an extension to the list of extensions to enable prior to initialization.
* %warning This must be called before MwCreateWidget. * @warning This must be called before MwCreateWidget.
*/ */
MWDECL void MwVulkanEnableExtension(const char* ext_name); MWDECL void MwVulkanEnableExtension(const char* ext_name);
/*! /*!
* %brief Add an layer to the list of layers to enable prior to initialization. * @brief Add an layer to the list of layers to enable prior to initialization.
* %warning This must be called before MwCreateWidget. * @warning This must be called before MwCreateWidget.
*/ */
MWDECL void MwVulkanEnableLayer(const char* ext_name); MWDECL void MwVulkanEnableLayer(const char* ext_name);
/*! /*!
* %brief Configuration options that can be passed to setup Vulkan before a widget is created. * @brief Configuration options that can be passed to setup Vulkan before a widget is created.
*/ */
typedef struct MwVulkanConfig_T { typedef struct MwVulkanConfig_T {
/*! /*!
* %brief Vulkan API version (default: VK_API_VERSION_1_0) * @brief Vulkan API version (default: VK_API_VERSION_1_0)
*/ */
uint32_t api_version; uint32_t api_version;
/*! /*!
* %brief Vulkan version (default: VK_VERSION_1_0) * @brief Vulkan version (default: VK_VERSION_1_0)
*/ */
uint32_t vk_version; uint32_t vk_version;
/*! /*!
* %brief Whether or not to enable validation layers (default: false) * @brief Whether or not to enable validation layers (default: false)
*/ */
VkBool32 validation_layers; VkBool32 validation_layers;
} MwVulkanConfig; } MwVulkanConfig;
/*! /*!
* %brief Configure Vulkan prior to initializing the widget. * @brief Configure Vulkan prior to initializing the widget.
* %warning This must be called before MwCreateWidget. * @warning This must be called before MwCreateWidget.
* %warning The configuration provided will be used for future initializations of the Vulkan widget (unless it's changed) * @warning The configuration provided will be used for future initializations of the Vulkan widget (unless it's changed)
*/ */
MWDECL void MwVulkanConfigure(MwVulkanConfig cfg); MWDECL void MwVulkanConfigure(MwVulkanConfig cfg);
/*! /*!
* %brief Field that can be gotten from Vulkan. * @brief Field that can be gotten from Vulkan.
*/ */
typedef enum MwVulkanField_T { typedef enum MwVulkanField_T {
/*! /*!
* %brief The address of the vulkan widget's vkGetInstanceProcAddr function (PFN_vkGetInstanceProcAddr) * @brief The address of the vulkan widget's vkGetInstanceProcAddr function (PFN_vkGetInstanceProcAddr)
*/ */
MwVulkanField_GetInstanceProcAddr = 0, MwVulkanField_GetInstanceProcAddr = 0,
/*! /*!
* %brief The address of the vulkan widget's instance (VkInstance) * @brief The address of the vulkan widget's instance (VkInstance)
*/ */
MwVulkanField_Instance, MwVulkanField_Instance,
/*! /*!
* %brief The address of the vulkan widget's surface (VkSurfaceKHR) * @brief The address of the vulkan widget's surface (VkSurfaceKHR)
*/ */
MwVulkanField_Surface, MwVulkanField_Surface,
/*! /*!
* %brief The address of the vulkan widget's physical device (VkPhysicalDevice) * @brief The address of the vulkan widget's physical device (VkPhysicalDevice)
*/ */
MwVulkanField_PhysicalDevice, MwVulkanField_PhysicalDevice,
/*! /*!
* %brief The address of the vulkan widget's logical device (VkDevice) * @brief The address of the vulkan widget's logical device (VkDevice)
*/ */
MwVulkanField_LogicalDevice, MwVulkanField_LogicalDevice,
/*! /*!
* %brief The address of the index that the vulkan widget uses for the graphics queue (uint32_t *) * @brief The address of the index that the vulkan widget uses for the graphics queue (uint32_t *)
*/ */
MwVulkanField_GraphicsQueueIndex, MwVulkanField_GraphicsQueueIndex,
/*! /*!
* %brief The address of the index that the vulkan widget uses for the present queue (uint32_t *) * @brief The address of the index that the vulkan widget uses for the present queue (uint32_t *)
*/ */
MwVulkanField_PresentQueueIndex, MwVulkanField_PresentQueueIndex,
MwVulkanField_GraphicsQueue, MwVulkanField_GraphicsQueue,
/*! /*!
* %brief The address of the vulkan widget's graphics queue (VkQueue) * @brief The address of the vulkan widget's graphics queue (VkQueue)
*/ */
MwVulkanField_PresentQueue, MwVulkanField_PresentQueue,
} MwVulkanField; } MwVulkanField;
/*! /*!
* %brief Function for getting a field from within Vulkan. * @brief Function for getting a field from within Vulkan.
* %warning Consult the documentation for MwVulkanField to know what type is expected for out. * @warning Consult the documentation for MwVulkanField to know what type is expected for out.
*/ */
MwInline void* MwVulkanGetField(MwWidget handle, MwVulkanField field, MwErrorEnum* out) { MwInline void* MwVulkanGetField(MwWidget handle, MwVulkanField field, MwErrorEnum* out) {
void* field_out; void* field_out;
@ -120,7 +120,7 @@ MwInline void* MwVulkanGetField(MwWidget handle, MwVulkanField field, MwErrorEnu
}; };
/*! /*!
* %brief Return whether Vulkan is installed on the target platform. * @brief Return whether Vulkan is installed on the target platform.
*/ */
MWDECL VkBool32 MwVulkanSupported(void); MWDECL VkBool32 MwVulkanSupported(void);

View file

@ -1,7 +1,7 @@
/* $Id$ */ /* $Id$ */
/*! /*!
* %file Mw/Widget/Window.h * @file Mw/Widget/Window.h
* %brief Window widget * @brief Window widget
*/ */
#ifndef __MW_WIDGET_WINDOW_H__ #ifndef __MW_WIDGET_WINDOW_H__
#define __MW_WIDGET_WINDOW_H__ #define __MW_WIDGET_WINDOW_H__
@ -15,14 +15,14 @@ extern "C" {
#endif #endif
/*! /*!
* %brief Window widget class * @brief Window widget class
*/ */
MWDECL MwClass MwWindowClass; MWDECL MwClass MwWindowClass;
/*! /*!
* %brief Makes window borderless * @brief Makes window borderless
* %param handle Widget * @param handle Widget
* %param toggle Toggle * @param toggle Toggle
*/ */
MwInline void MwWindowMakeBorderless(MwWidget handle, int toggle) { MwInline void MwWindowMakeBorderless(MwWidget handle, int toggle) {
MwVaWidgetExecute(handle, "mwWindowMakeBorderless", NULL, toggle); MwVaWidgetExecute(handle, "mwWindowMakeBorderless", NULL, toggle);

View file

@ -1,289 +0,0 @@
#!/usr/bin/env perl
# $Id$
our $html = "";
our $title = "Milsko GUI Toolkit Documentation";
our @pathlist = ("include");
our @notes = ("warning", "unsure", "note", "info");
our @files = ();
our %files_sections = ();
sub sentence {
my $str = $_[0];
$str =~ s/([^\.])$/\1./g;
$str =~ s/`(.+?)`/<code>\1<\/code>/g;
$str =~ s/\*{3}(.+?)\*{3}/<b><i>\1<\/i><\/b>/g;
$str =~ s/\*{2}(.+?)\*{2}/<b>\1<\/b>/g;
$str =~ s/\*(.+?)\*/<i>\1<\/i>/g;
return $str;
}
sub out {
$html = $html . "$_[0]\n";
}
sub arguments {
my ($args) = @_;
my $out = "";
my @arglist = split(/[ \t]*,[ \t]*/, $args);
$out = $out . " (\n";
foreach my $str (@arglist) {
$out = $out . "\t$str";
if ($str eq $arglist[ 0 + @arglist - 1 ]) {
$out = $out . "\n";
}
else {
$out = $out . ",\n";
}
}
$out = $out . ")";
return $out;
}
sub replace_special {
my $ret = $_[0];
$ret =~ s/[\r\n]+//g;
$ret =~ s/[^A-Za-z0-9_]/_/g;
return $ret;
}
sub highlight {
my $txt = "";
my $app = 0;
open(DOCPL, ">", "/tmp/docpl");
print(DOCPL $_[0] . "\n");
close(DOCPL);
open(DOCIN, "cat /tmp/docpl | enscript -q -whtml --color -Ec -o - |");
while (my $l = <DOCIN>) {
$l =~ s/\r?\n$//g;
if ($l =~ /\<pre\>/i) {
$app = 1;
}
elsif ($l =~ /\<\/pre\>/i) {
$app = 0;
}
elsif ($app) {
$txt = $txt . "\n" . $l;
}
}
close(DOCIN);
$txt =~ s/[\r\n]+$//g;
$txt =~ s/^[\r\n]+//g;
return $txt;
}
sub scan_dir {
my ($first, $path) = @_;
$path =~ s/\/+$//g;
if (opendir(my $dh, $path)) {
print(STDERR "Scanning $path\n");
my @paths = sort(readdir($dh));
foreach my $p (@paths) {
if ($p eq '.' || $p eq '..' || $p eq 'MwOO') {
next;
}
scan_dir($first, $path . "/" . $p);
}
closedir($dh);
}
else {
my $spaces = "";
my $in = 0;
my $out = 0;
my $file = 0;
my $has_file = 0;
my %kv = ();
my %param = ();
my @paramlist = ();
my $current = "";
print(STDERR "$path is a file\n");
open(IN, "<", "$path");
while (my $l = <IN>) {
my $l2 = $l;
$l =~ s/[\r\n]+$//g;
$l2 =~ s/[\r\n \t]+//g;
if (length($l2) == 0) {
next;
}
if ($out) {
my $para = "dt";
my $brief = $kv{brief} or "";
$brief = sentence($brief);
$out = 0;
if (!$has_file) {
print(STDERR
"Warning: missing comment with %file, ignoring\n");
next;
}
if (!defined($kv{brief})) {
print(STDERR "Warning: comment missing %brief, ignoring\n");
next;
}
if (!$file && defined($kv{brief})) {
my $id = "";
my $sl = "";
my $attr = "";
$para = "dd";
$l =~ s/[ \t]+/ /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]+([^ \(]+)(?:.+$))?/\1/;
$sl =~ s/^.+[ \t]+([^ ]+)[ \t]*\(.+\);?$/\1/g;
$sl =~ s/^.+[ \t]+([^ ]+);( \/\*.+)?$/\1/g;
$id = replace_special($current . "__" . $sl);
$attr = " id=\"$id\"";
if (!defined($files_sections{ replace_special($current) }))
{
@{ $files_sections{ replace_special($current) } } = ();
}
push(@{ $files_sections{ replace_special($current) } },
$sl);
out("<pre$attr>" . highlight($l) . "</pre>");
}
out("<dl>");
out("<$para>");
out(" $brief");
out("</$para>");
foreach my $note (@notes) {
if (defined($kv{$note})) {
out("<dt>");
out(
" <table border=\"0\"><tr><td><img src=\"$note.gif\" alt=\"$note\"></td><td>"
. sentence($kv{$note})
. "</td></table>");
out("</dt>");
}
}
foreach my $p (@paramlist) {
out("<dt>");
out(" Parameter <code>$p</code>");
out("</dt>");
out("<dd>");
out(" " . sentence($param{$p}));
out("</dd>");
}
if (defined($kv{return})) {
out("<dt>");
out(" Returns");
out("</dt>");
out("<dd>");
out(" " . sentence($kv{return}));
out("</dd>");
}
out("</dl>");
out("<hr>");
}
elsif ($l =~ /^([ \t]*)\/\*\!/) {
$spaces = $1;
$in = 1;
$file = 0;
%kv = ();
%param = ();
@paramlist = ();
}
elsif ($in && ($l =~ /^$spaces \*\//)) {
$in = 0;
$out = 1;
}
elsif ($in
&& ($l =~ /^$spaces \*[ \t]+%([^ ]+)(?:[ \t]+(.+))?$/))
{
$kv{$1} = $2;
if ($1 eq "file") {
if (!$has_file) {
out( "<h2 align=\"center\" id=\""
. replace_special($2)
. "\">$2</h2>");
push(@files, $2);
}
$file = 1;
$has_file = 1;
$current = $2;
}
elsif ($1 eq "param") {
my $p = $2;
$p =~ /^([^ ]+)(?:[ \t]+(.+))?$/;
$param{$1} = $2;
push(@paramlist, $1);
}
}
}
close(IN);
}
}
out("<html>");
out(" <head>");
out(" <meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">");
out(" <title>$title</title>");
out(" </head>");
out(" <body>");
out(" <h1 align=\"center\">$title</h1>");
out(" <hr>");
out(" <h2 align=\"center\">Table of Contents</h2>");
my $old = $html;
$html = "";
foreach my $f (@pathlist) {
scan_dir($f, $f);
}
my $stuff = $html;
$html = $old;
out("<dl>");
foreach my $f (@files) {
out("<dt>");
out(" <a href=\"#" . replace_special($f) . "\">$f</a>");
out("</dt>");
foreach my $sect (@{ $files_sections{ replace_special($f) } }) {
out("<dd>");
out( " <a href=\"#"
. replace_special($f . "__" . $sect)
. "\">$sect</a>");
out("</dd>");
}
}
out("</dl>");
out("<hr>");
$html = $html . $stuff;
out(" </body>");
out("</html>");
open(OUT, ">", "doc/index.html");
print(OUT $html);
close(OUT);

View file

@ -1,12 +0,0 @@
#!/usr/bin/env perl
# $Id$
open(IN, "<", $ARGV[0]);
while (my $l = <IN>) {
$l =~ s/\r?\n$//g;
$l =~ s/%([^ ]+)/@\1/g;
if (!($l =~ /\@prop /)) {
print("$l\n");
}
}
close(IN);

View file

@ -4,7 +4,6 @@ MAKE=make
if which gmake >/dev/null 2>&1; then if which gmake >/dev/null 2>&1; then
MAKE=gmake MAKE=gmake
fi fi
./tools/doc.pl
./tools/icon.sh ./tools/icon.sh
./tools/genmk.pl ./tools/genmk.pl
$MAKE format $MAKE format