mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-05 09:00:54 +00:00
documentation
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@80 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -14,7 +14,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* %brief Button class
|
||||
* %brief Button widget class
|
||||
*/
|
||||
MWDECL MwClass MwButtonClass;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,10 +1,20 @@
|
||||
/* $Id$ */
|
||||
/*!
|
||||
* %file Mw/Error.h
|
||||
* %brief Error codes
|
||||
*/
|
||||
#ifndef __MW_ERROR_H__
|
||||
#define __MW_ERROR_H__
|
||||
|
||||
#include <Mw/MachDep.h>
|
||||
|
||||
/*!
|
||||
* %brief Error code enumeration
|
||||
*/
|
||||
enum MwErrorEnum {
|
||||
/*!
|
||||
* %brief No error
|
||||
*/
|
||||
MwEsuccess = 0
|
||||
};
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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__
|
||||
|
||||
|
||||
@@ -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__
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
/* $Id$ */
|
||||
/*!
|
||||
* %file Mw/MachDep.h
|
||||
* %param Machine dependent headers and macros
|
||||
*/
|
||||
#ifndef __MW_MACHDEP_H__
|
||||
#define __MW_MACHDEP_H__
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
/* $Id$ */
|
||||
/*!
|
||||
* %file Mw/Milsko.h
|
||||
* %brief Includes all headers
|
||||
*/
|
||||
#ifndef __MW_MILSKO_H__
|
||||
#define __MW_MILSKO_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
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
/* $Id$ */
|
||||
/*!
|
||||
* %file Mw/StringDefs.h
|
||||
* %brief String definitions for property
|
||||
*/
|
||||
#ifndef __MW_STRINGDEFS_H__
|
||||
#define __MW_STRINGDEFS_H__
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
/* $Id$ */
|
||||
/*!
|
||||
* %file Mw/TypeDefs.h
|
||||
* %brief Type definitions
|
||||
*/
|
||||
#ifndef __MW_TYPEDEFS_H__
|
||||
#define __MW_TYPEDEFS_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
|
||||
|
||||
@@ -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__
|
||||
|
||||
|
||||
Reference in New Issue
Block a user