documentation

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@80 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-09-30 13:04:40 +00:00
parent aa4ba428ec
commit 2997a8c017
18 changed files with 1039 additions and 12 deletions

View File

@@ -41,6 +41,129 @@
<dd> <dd>
<a href="#Mw_Core_h__MwPending">MwPending</a> <a href="#Mw_Core_h__MwPending">MwPending</a>
</dd> </dd>
<dd>
<a href="#Mw_Core_h__MwSetInteger">MwSetInteger</a>
</dd>
<dd>
<a href="#Mw_Core_h__MwSetText">MwSetText</a>
</dd>
<dd>
<a href="#Mw_Core_h__MwGetInteger">MwGetInteger</a>
</dd>
<dd>
<a href="#Mw_Core_h__MwGetText">MwGetText</a>
</dd>
<dd>
<a href="#Mw_Core_h__MwSetDefault">MwSetDefault</a>
</dd>
<dd>
<a href="#Mw_Core_h__MwVaApply">MwVaApply</a>
</dd>
<dd>
<a href="#Mw_Core_h__MwVaListApply">MwVaListApply</a>
</dd>
<dd>
<a href="#Mw_Core_h__MwAddUserHandler">MwAddUserHandler</a>
</dd>
<dd>
<a href="#Mw_Core_h__MwDispatchUserHandler">MwDispatchUserHandler</a>
</dd>
<dd>
<a href="#Mw_Core_h__MwSetErrorHandler">MwSetErrorHandler</a>
</dd>
<dd>
<a href="#Mw_Core_h__MwDispatchError">MwDispatchError</a>
</dd>
<dd>
<a href="#Mw_Core_h__MwGetBeforeStep">MwGetBeforeStep</a>
</dd>
<dt>
<a href="#Mw_Default_h">Mw/Default.h</a>
</dt>
<dd>
<a href="#Mw_Default_h__MwDefaultBackground">MwDefaultBackground</a>
</dd>
<dd>
<a href="#Mw_Default_h__MwDefaultForeground">MwDefaultForeground</a>
</dd>
<dt>
<a href="#Mw_Draw_h">Mw/Draw.h</a>
</dt>
<dd>
<a href="#Mw_Draw_h__MwParseColor">MwParseColor</a>
</dd>
<dd>
<a href="#Mw_Draw_h__MwDrawRect">MwDrawRect</a>
</dd>
<dd>
<a href="#Mw_Draw_h__MwDrawFrame">MwDrawFrame</a>
</dd>
<dd>
<a href="#Mw_Draw_h__MwDrawFrameEx">MwDrawFrameEx</a>
</dd>
<dd>
<a href="#Mw_Draw_h__MwDrawText">MwDrawText</a>
</dd>
<dt>
<a href="#Mw_Error_h">Mw/Error.h</a>
</dt>
<dd>
<a href="#Mw_Error_h__MwErrorEnum">MwErrorEnum</a>
</dd>
<dd>
<a href="#Mw_Error_h___MwEsuccess_"> MwEsuccess </a>
</dd>
<dt>
<a href="#Mw_Font_h">Mw/Font.h</a>
</dt>
<dd>
<a href="#Mw_Font_h__MwFontData__">MwFontData[]</a>
</dd>
<dt>
<a href="#Mw_Frame_h">Mw/Frame.h</a>
</dt>
<dd>
<a href="#Mw_Frame_h__MwFrameClass">MwFrameClass</a>
</dd>
<dt>
<a href="#Mw_GDI_h">Mw/GDI.h</a>
</dt>
<dt>
<a href="#Mw_LowLevel_h">Mw/LowLevel.h</a>
</dt>
<dt>
<a href="#Mw_MachDep_h">Mw/MachDep.h</a>
</dt>
<dt>
<a href="#Mw_Milsko_h">Mw/Milsko.h</a>
</dt>
<dt>
<a href="#Mw_OpenGL_h">Mw/OpenGL.h</a>
</dt>
<dd>
<a href="#Mw_OpenGL_h__MwOpenGLClass">MwOpenGLClass</a>
</dd>
<dd>
<a href="#Mw_OpenGL_h__MwOpenGLMakeCurrent">MwOpenGLMakeCurrent</a>
</dd>
<dd>
<a href="#Mw_OpenGL_h__MwOpenGLSwapBuffer">MwOpenGLSwapBuffer</a>
</dd>
<dt>
<a href="#Mw_StringDefs_h">Mw/StringDefs.h</a>
</dt>
<dt>
<a href="#Mw_TypeDefs_h">Mw/TypeDefs.h</a>
</dt>
<dt>
<a href="#Mw_Window_h">Mw/Window.h</a>
</dt>
<dd>
<a href="#Mw_Window_h__MwWindowClass">MwWindowClass</a>
</dd>
<dt>
<a href="#Mw_X11_h">Mw/X11.h</a>
</dt>
</dl> </dl>
<hr> <hr>
<h2 align="center" id="Mw_Button_h">Mw/Button.h</h2> <h2 align="center" id="Mw_Button_h">Mw/Button.h</h2>
@@ -53,7 +176,7 @@
<pre id="Mw_Button_h__MwButtonClass"><code>MWDECL MwClass MwButtonClass;</code></pre> <pre id="Mw_Button_h__MwButtonClass"><code>MWDECL MwClass MwButtonClass;</code></pre>
<dl> <dl>
<dd> <dd>
Button class. Button widget class.
</dd> </dd>
</dl> </dl>
<hr> <hr>
@@ -67,7 +190,7 @@
<pre id="Mw_Core_h__MwDispatch"><code>#define MwDispatch(x, y)</code></pre> <pre id="Mw_Core_h__MwDispatch"><code>#define MwDispatch(x, y)</code></pre>
<dl> <dl>
<dd> <dd>
Dispatches a handler of widget class. Dispatches the handler of widget class.
</dd> </dd>
<dt> <dt>
<img src="warning.gif" alt="warning"> <img src="warning.gif" alt="warning">
@@ -357,6 +480,701 @@
<code>1</code> if any event is pending. <code>1</code> if any event is pending.
</dd> </dd>
</dl> </dl>
<hr>
<pre id="Mw_Core_h__MwSetInteger"><code>MWDECL void MwSetInteger (
MwWidget handle,
const char* key,
int n
);</code></pre>
<dl>
<dd>
Sets an integer property.
</dd>
<dt>
Parameter <code>handle</code>
</dt>
<dd>
Widget.
</dd>
<dt>
Parameter <code>key</code>
</dt>
<dd>
Key.
</dd>
<dt>
Parameter <code>n</code>
</dt>
<dd>
Value.
</dd>
</dl>
<hr>
<pre id="Mw_Core_h__MwSetText"><code>MWDECL void MwSetText (
MwWidget handle,
const char* key,
const char* value
);</code></pre>
<dl>
<dd>
Sets a text property.
</dd>
<dt>
Parameter <code>handle</code>
</dt>
<dd>
Widget.
</dd>
<dt>
Parameter <code>key</code>
</dt>
<dd>
Key.
</dd>
<dt>
Parameter <code>value</code>
</dt>
<dd>
Value.
</dd>
</dl>
<hr>
<pre id="Mw_Core_h__MwGetInteger"><code>MWDECL int MwGetInteger (
MwWidget handle,
const char* key
);</code></pre>
<dl>
<dd>
Gets the integer property.
</dd>
<dt>
Parameter <code>handle</code>
</dt>
<dd>
Widget.
</dd>
<dt>
Parameter <code>key</code>
</dt>
<dd>
Key.
</dd>
<dt>
Returns
</dt>
<dd>
Value.
</dd>
</dl>
<hr>
<pre id="Mw_Core_h__MwGetText"><code>MWDECL const char* MwGetText (
MwWidget handle,
const char* key
);</code></pre>
<dl>
<dd>
Gets the text property.
</dd>
<dt>
Parameter <code>handle</code>
</dt>
<dd>
Widget.
</dd>
<dt>
Parameter <code>key</code>
</dt>
<dd>
Key.
</dd>
<dt>
Returns
</dt>
<dd>
Value.
</dd>
</dl>
<hr>
<pre id="Mw_Core_h__MwSetDefault"><code>MWDECL void MwSetDefault (
MwWidget handle
);</code></pre>
<dl>
<dd>
Sets the default property.
</dd>
<dt>
<img src="warning.gif" alt="warning">
</dt>
<dd>
This is called when widget is created.
</dd>
<dt>
Parameter <code>handle</code>
</dt>
<dd>
Widget.
</dd>
</dl>
<hr>
<pre id="Mw_Core_h__MwVaApply"><code>MWDECL void MwVaApply (
MwWidget handle,
...
);</code></pre>
<dl>
<dd>
Sets the properties.
</dd>
<dt>
Parameter <code>handle</code>
</dt>
<dd>
Widget.
</dd>
<dt>
Parameter <code>...</code>
</dt>
<dd>
Properties.
</dd>
</dl>
<hr>
<pre id="Mw_Core_h__MwVaListApply"><code>MWDECL void MwVaListApply (
MwWidget handle,
va_list va
);</code></pre>
<dl>
<dd>
Sets properties.
</dd>
<dt>
Parameter <code>handle</code>
</dt>
<dd>
Widget.
</dd>
<dt>
Parameter <code>va</code>
</dt>
<dd>
Properties.
</dd>
</dl>
<hr>
<pre id="Mw_Core_h__MwAddUserHandler"><code>MWDECL void MwAddUserHandler (
MwWidget handle,
const char* key,
MwUserHandler handler,
void* user_data
);</code></pre>
<dl>
<dd>
Sets a user handler.
</dd>
<dt>
Parameter <code>handle</code>
</dt>
<dd>
Widget.
</dd>
<dt>
Parameter <code>key</code>
</dt>
<dd>
Key.
</dd>
<dt>
Parameter <code>handler</code>
</dt>
<dd>
Handler.
</dd>
<dt>
Parameter <code>user_data</code>
</dt>
<dd>
User data passed to handler.
</dd>
</dl>
<hr>
<pre id="Mw_Core_h__MwDispatchUserHandler"><code>MWDECL void MwDispatchUserHandler (
MwWidget handle,
const char* key,
void* handler_data
);</code></pre>
<dl>
<dd>
Dispatches the user handler.
</dd>
<dt>
Parameter <code>handle</code>
</dt>
<dd>
Widget.
</dd>
<dt>
Parameter <code>key</code>
</dt>
<dd>
Key.
</dd>
<dt>
Parameter <code>handler_data</code>
</dt>
<dd>
Handler data passed to handler.
</dd>
</dl>
<hr>
<pre id="Mw_Core_h__MwSetErrorHandler"><code>MWDECL void MwSetErrorHandler (
MwErrorHandler handler,
void* user_data
);</code></pre>
<dl>
<dd>
Sets an error handler.
</dd>
<dt>
Parameter <code>handle</code>
</dt>
<dd>
Widget.
</dd>
<dt>
Parameter <code>handler</code>
</dt>
<dd>
Handler.
</dd>
<dt>
Parameter <code>user_data</code>
</dt>
<dd>
User data passed to handler.
</dd>
</dl>
<hr>
<pre id="Mw_Core_h__MwDispatchError"><code>MWDECL void MwDispatchError (
int code,
const char* message
);</code></pre>
<dl>
<dd>
Dispatches the error handler.
</dd>
<dt>
Parameter <code>code</code>
</dt>
<dd>
Error code.
</dd>
<dt>
Parameter <code>message</code>
</dt>
<dd>
Error message.
</dd>
</dl>
<hr>
<pre id="Mw_Core_h__MwGetBeforeStep"><code>MWDECL jmp_buf MwGetBeforeStep (
MwWidget handle
);</code></pre>
<dl>
<dd>
Gets the before_step of widget.
</dd>
<dt>
Parameter <code>handle</code>
</dt>
<dd>
Widget.
</dd>
<dt>
Returns
</dt>
<dd>
jmp_buf.
</dd>
</dl>
<hr>
<h2 align="center" id="Mw_Default_h">Mw/Default.h</h2>
<dl>
<dt>
Default properties.
</dt>
</dl>
<hr>
<pre id="Mw_Default_h__MwDefaultBackground"><code>MWDECL const char* MwDefaultBackground;</code></pre>
<dl>
<dd>
Default background color.
</dd>
</dl>
<hr>
<pre id="Mw_Default_h__MwDefaultForeground"><code>MWDECL const char* MwDefaultForeground;</code></pre>
<dl>
<dd>
Default foreground color.
</dd>
</dl>
<hr>
<h2 align="center" id="Mw_Draw_h">Mw/Draw.h</h2>
<dl>
<dt>
Common drawing API.
</dt>
</dl>
<hr>
<pre id="Mw_Draw_h__MwParseColor"><code>MWDECL MwLLColor MwParseColor (
MwWidget handle,
const char* text
);</code></pre>
<dl>
<dd>
Parses a color text.
</dd>
<dt>
Parameter <code>handle</code>
</dt>
<dd>
Widget.
</dd>
<dt>
Parameter <code>text</code>
</dt>
<dd>
Color text.
</dd>
<dt>
Returns
</dt>
<dd>
Color.
</dd>
</dl>
<hr>
<pre id="Mw_Draw_h__MwDrawRect"><code>MWDECL void MwDrawRect (
MwWidget handle,
MwRect* rect,
MwLLColor color
);</code></pre>
<dl>
<dd>
Draws a filled rectangle.
</dd>
<dt>
Parameter <code>handle</code>
</dt>
<dd>
Widget.
</dd>
<dt>
Parameter <code>rect</code>
</dt>
<dd>
Rectangle area.
</dd>
<dt>
Parameter <code>color</code>
</dt>
<dd>
Color.
</dd>
</dl>
<hr>
<pre id="Mw_Draw_h__MwDrawFrame"><code>MWDECL void MwDrawFrame (
MwWidget handle,
MwRect* rect,
MwLLColor color,
int invert
);</code></pre>
<dl>
<dd>
Draws a frame.
</dd>
<dt>
<img src="warning.gif" alt="warning">
</dt>
<dd>
<code>rect</code> gets changed to the area of rectangle inside.
</dd>
<dt>
Parameter <code>handle</code>
</dt>
<dd>
Widget.
</dd>
<dt>
Parameter <code>rect</code>
</dt>
<dd>
Rectangle area.
</dd>
<dt>
Parameter <code>color</code>
</dt>
<dd>
Color.
</dd>
<dt>
Parameter <code>invert</code>
</dt>
<dd>
Invert the 3D border color or not.
</dd>
</dl>
<hr>
<pre id="Mw_Draw_h__MwDrawFrameEx"><code>MWDECL void MwDrawFrameEx (
MwWidget handle,
MwRect* rect,
MwLLColor color,
int invert,
int border
);</code></pre>
<dl>
<dd>
Draws a frame with specified border width.
</dd>
<dt>
<img src="warning.gif" alt="warning">
</dt>
<dd>
<code>rect</code> gets changed to the area of rectangle inside.
</dd>
<dt>
Parameter <code>handle</code>
</dt>
<dd>
Widget.
</dd>
<dt>
Parameter <code>rect</code>
</dt>
<dd>
Rectangle area.
</dd>
<dt>
Parameter <code>color</code>
</dt>
<dd>
Color.
</dd>
<dt>
Parameter <code>invert</code>
</dt>
<dd>
Invert the 3D border color or not.
</dd>
<dt>
Parameter <code>border</code>
</dt>
<dd>
Border width.
</dd>
</dl>
<hr>
<pre id="Mw_Draw_h__MwDrawText"><code>MWDECL void MwDrawText (
MwWidget handle,
MwPoint* point,
const char* text,
MwLLColor color
);</code></pre>
<dl>
<dd>
Draws a text.
</dd>
<dt>
Parameter <code>handle</code>
</dt>
<dd>
Widget.
</dd>
<dt>
Parameter <code>point</code>
</dt>
<dd>
Center point of the text.
</dd>
<dt>
Parameter <code>text</code>
</dt>
<dd>
Text.
</dd>
<dt>
Parameter <code>color</code>
</dt>
<dd>
Color.
</dd>
</dl>
<hr>
<h2 align="center" id="Mw_Error_h">Mw/Error.h</h2>
<dl>
<dt>
Error codes.
</dt>
</dl>
<hr>
<pre id="Mw_Error_h__MwErrorEnum"><code>enum MwErrorEnum;</code></pre>
<dl>
<dd>
Error code enumeration.
</dd>
</dl>
<hr>
<pre id="Mw_Error_h___MwEsuccess_"><code> MwEsuccess = 0</code></pre>
<dl>
<dd>
No error.
</dd>
</dl>
<hr>
<h2 align="center" id="Mw_Font_h">Mw/Font.h</h2>
<dl>
<dt>
Default font.
</dt>
</dl>
<hr>
<pre id="Mw_Font_h__MwFontData__"><code>MWDECL MwFont MwFontData[];</code></pre>
<dl>
<dd>
Default font data.
</dd>
</dl>
<hr>
<h2 align="center" id="Mw_Frame_h">Mw/Frame.h</h2>
<dl>
<dt>
Frame widget.
</dt>
</dl>
<hr>
<pre id="Mw_Frame_h__MwFrameClass"><code>MWDECL MwClass MwFrameClass;</code></pre>
<dl>
<dd>
Frame widget class.
</dd>
</dl>
<hr>
<h2 align="center" id="Mw_GDI_h">Mw/GDI.h</h2>
<dl>
<dt>
GDI backend.
</dt>
<dt>
<img src="warning.gif" alt="warning">
</dt>
<dd>
This is used internally.
</dd>
</dl>
<hr>
<h2 align="center" id="Mw_LowLevel_h">Mw/LowLevel.h</h2>
<dl>
<dt>
Low-level drawing API.
</dt>
<dt>
<img src="warning.gif" alt="warning">
</dt>
<dd>
This is used internally.
</dd>
</dl>
<hr>
<h2 align="center" id="Mw_MachDep_h">Mw/MachDep.h</h2>
<h2 align="center" id="Mw_Milsko_h">Mw/Milsko.h</h2>
<dl>
<dt>
Includes all headers.
</dt>
</dl>
<hr>
<h2 align="center" id="Mw_OpenGL_h">Mw/OpenGL.h</h2>
<dl>
<dt>
OpenGL widget.
</dt>
</dl>
<hr>
<pre id="Mw_OpenGL_h__MwOpenGLClass"><code>MWDECL MwClass MwOpenGLClass;</code></pre>
<dl>
<dd>
OpenGL widget class.
</dd>
</dl>
<hr>
<pre id="Mw_OpenGL_h__MwOpenGLMakeCurrent"><code>MWDECL void MwOpenGLMakeCurrent (
MwWidget handle
);</code></pre>
<dl>
<dd>
Make a widget current OpenGL context.
</dd>
<dt>
Parameter <code>handle</code>
</dt>
<dd>
Widget.
</dd>
</dl>
<hr>
<pre id="Mw_OpenGL_h__MwOpenGLSwapBuffer"><code>MWDECL void MwOpenGLSwapBuffer (
MwWidget handle
);</code></pre>
<dl>
<dd>
Swaps the buffer of OpenGL context.
</dd>
<dt>
Parameter <code>handle</code>
</dt>
<dd>
Widget.
</dd>
</dl>
<hr>
<h2 align="center" id="Mw_StringDefs_h">Mw/StringDefs.h</h2>
<dl>
<dt>
String definitions for property.
</dt>
</dl>
<hr>
<h2 align="center" id="Mw_TypeDefs_h">Mw/TypeDefs.h</h2>
<dl>
<dt>
Type definitions.
</dt>
</dl>
<hr>
<h2 align="center" id="Mw_Window_h">Mw/Window.h</h2>
<dl>
<dt>
Window widget.
</dt>
</dl>
<hr>
<pre id="Mw_Window_h__MwWindowClass"><code>MWDECL MwClass MwWindowClass;</code></pre>
<dl>
<dd>
Window widget class.
</dd>
</dl>
<hr>
<h2 align="center" id="Mw_X11_h">Mw/X11.h</h2>
<dl>
<dt>
X11 backend.
</dt>
<dt>
<img src="warning.gif" alt="warning">
</dt>
<dd>
This is used internally.
</dd>
</dl>
<hr> <hr>
</body> </body>
</html> </html>

View File

@@ -14,7 +14,7 @@ extern "C" {
#endif #endif
/*! /*!
* %brief Button class * %brief Button widget class
*/ */
MWDECL MwClass MwButtonClass; MWDECL MwClass MwButtonClass;

View File

@@ -11,7 +11,7 @@
/*! /*!
* %warning Used internally * %warning Used internally
* %brief Dispatches a 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
*/ */
@@ -90,20 +90,96 @@ MWDECL void MwStep(MwWidget handle);
*/ */
MWDECL int MwPending(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); * %brief Sets an integer property
MWDECL int MwGetInteger(MwWidget handle, const char* key); * %param handle Widget
MWDECL const char* MwGetText(MwWidget handle, const char* key); * %param key Key
MWDECL void MwSetDefault(MwWidget handle); * %param n Value
MWDECL void MwVaApply(MwWidget handle, ...); */
MWDECL void MwVaListApply(MwWidget handle, va_list va); 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); 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); 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); 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); 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); MWDECL jmp_buf MwGetBeforeStep(MwWidget handle);
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -1,4 +1,8 @@
/* $Id$ */ /* $Id$ */
/*!
* %file Mw/Default.h
* %brief Default properties
*/
#ifndef __MW_DEFAULT_H__ #ifndef __MW_DEFAULT_H__
#define __MW_DEFAULT_H__ #define __MW_DEFAULT_H__
@@ -9,7 +13,14 @@
extern "C" { extern "C" {
#endif #endif
/*!
* %brief Default background color
*/
MWDECL const char* MwDefaultBackground; MWDECL const char* MwDefaultBackground;
/*!
* %brief Default foreground color
*/
MWDECL const char* MwDefaultForeground; MWDECL const char* MwDefaultForeground;
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -1,4 +1,8 @@
/* $Id$ */ /* $Id$ */
/*!
* %file Mw/Draw.h
* %brief Common drawing API
*/
#ifndef __MW_DRAW_H__ #ifndef __MW_DRAW_H__
#define __MW_DRAW_H__ #define __MW_DRAW_H__
@@ -10,11 +14,50 @@
extern "C" { extern "C" {
#endif #endif
/*!
* %brief Parses a color text
* %param handle Widget
* %param text Color text
* %return Color
*/
MWDECL MwLLColor MwParseColor(MwWidget handle, const char* text); 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); 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); 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); 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); MWDECL void MwDrawText(MwWidget handle, MwPoint* point, const char* text, MwLLColor color);
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -1,10 +1,20 @@
/* $Id$ */ /* $Id$ */
/*!
* %file Mw/Error.h
* %brief Error codes
*/
#ifndef __MW_ERROR_H__ #ifndef __MW_ERROR_H__
#define __MW_ERROR_H__ #define __MW_ERROR_H__
#include <Mw/MachDep.h> #include <Mw/MachDep.h>
/*!
* %brief Error code enumeration
*/
enum MwErrorEnum { enum MwErrorEnum {
/*!
* %brief No error
*/
MwEsuccess = 0 MwEsuccess = 0
}; };

View File

@@ -1,4 +1,8 @@
/* $Id$ */ /* $Id$ */
/*!
* %file Mw/Font.h
* %brief Default font
*/
#ifndef __MW_FONT_H__ #ifndef __MW_FONT_H__
#define __MW_FONT_H__ #define __MW_FONT_H__
@@ -9,6 +13,9 @@
extern "C" { extern "C" {
#endif #endif
/*!
* %brief Default font data
*/
MWDECL MwFont MwFontData[]; MWDECL MwFont MwFontData[];
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -1,4 +1,8 @@
/* $Id$ */ /* $Id$ */
/*!
* %file Mw/Frame.h
* %brief Frame widget
*/
#ifndef __MW_FRAME_H__ #ifndef __MW_FRAME_H__
#define __MW_FRAME_H__ #define __MW_FRAME_H__
@@ -9,6 +13,9 @@
extern "C" { extern "C" {
#endif #endif
/*!
* %brief Frame widget class
*/
MWDECL MwClass MwFrameClass; MWDECL MwClass MwFrameClass;
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -1,4 +1,9 @@
/* $Id$ */ /* $Id$ */
/*!
* %file Mw/GDI.h
* %brief GDI backend
* %warning This is used internally
*/
#ifndef __MW_GDI_H__ #ifndef __MW_GDI_H__
#define __MW_GDI_H__ #define __MW_GDI_H__

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,8 @@
/* $Id$ */ /* $Id$ */
/*!
* %file Mw/OpenGL.h
* %brief OpenGL widget
*/
#ifndef __MW_OPENGL_H__ #ifndef __MW_OPENGL_H__
#define __MW_OPENGL_H__ #define __MW_OPENGL_H__
@@ -9,9 +13,21 @@
extern "C" { extern "C" {
#endif #endif
/*!
* %brief OpenGL widget class
*/
MWDECL MwClass MwOpenGLClass; MWDECL MwClass MwOpenGLClass;
/*!
* %brief Make a widget current OpenGL context
* %param handle Widget
*/
MWDECL void MwOpenGLMakeCurrent(MwWidget handle); MWDECL void MwOpenGLMakeCurrent(MwWidget handle);
/*!
* %brief Swaps the buffer of OpenGL context
* %param handle Widget
*/
MWDECL void MwOpenGLSwapBuffer(MwWidget handle); MWDECL void MwOpenGLSwapBuffer(MwWidget handle);
#ifdef __cplusplus #ifdef __cplusplus

View File

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

View File

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

View File

@@ -1,4 +1,8 @@
/* $Id$ */ /* $Id$ */
/*!
* %file Mw/Window.h
* %brief Window widget
*/
#ifndef __MW_WINDOW_H__ #ifndef __MW_WINDOW_H__
#define __MW_WINDOW_H__ #define __MW_WINDOW_H__
@@ -9,6 +13,9 @@
extern "C" { extern "C" {
#endif #endif
/*!
* %brief Window widget class
*/
MWDECL MwClass MwWindowClass; MWDECL MwClass MwWindowClass;
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -1,4 +1,9 @@
/* $Id$ */ /* $Id$ */
/*!
* %file Mw/X11.h
* %brief X11 backend
* %warning This is used internally
*/
#ifndef __MW_X11_H__ #ifndef __MW_X11_H__
#define __MW_X11_H__ #define __MW_X11_H__

View File

@@ -114,13 +114,14 @@ sub scan_dir {
$l =~ s/[ \t]+/ /g; $l =~ s/[ \t]+/ /g;
$l =~ s/[ ]*\\$//g; $l =~ s/[ ]*\\$//g;
$l =~ s/[ ]*(?:;|\{.+)[ ]*$/;/g; $l =~ s/[ ]*(?:;|\{.*)[ ]*$/;/g;
if (!($l =~ /^#/)) { if (!($l =~ /^#/)) {
$l =~ s/\(([^\)]+)\)/arguments($1)/ge; $l =~ s/\(([^\)]+)\)/arguments($1)/ge;
} }
$sl = $l; $sl = $l;
$sl =~ s/\n//g; $sl =~ s/\n//g;
$sl =~ s/=.+$//g;
$sl =~ s/^.+[ \t]+([^ ]+)[ \t]*\(.+\);?$/\1/g; $sl =~ s/^.+[ \t]+([^ ]+)[ \t]*\(.+\);?$/\1/g;
$sl =~ s/^.+[ \t]+([^ ]+);$/\1/g; $sl =~ s/^.+[ \t]+([^ ]+);$/\1/g;