Milsko GUI Toolkit Documentation
Table of Contents
-
Mw/Button.h
-
MwButtonClass
-
Mw/Core.h
-
MwDispatch
-
MwCreateWidget
-
MwVaCreateWidget
-
MwVaListCreateWidget
-
MwDestroyWidget
-
MwLoop
-
MwStep
-
MwPending
-
MwSetInteger
-
MwSetText
-
MwSetVoid
-
MwGetInteger
-
MwGetText
-
MwGetVoid
-
MwSetDefault
-
MwVaApply
-
MwVaListApply
-
MwAddUserHandler
-
MwDispatchUserHandler
-
MwSetErrorHandler
-
MwDispatchError
-
MwGetBeforeStep
-
Mw/Default.h
-
MwDefaultBackground
-
MwDefaultForeground
-
Mw/Draw.h
-
MwParseColor
-
MwDrawRect
-
MwDrawFrame
-
MwDrawFrameEx
-
MwDrawText
-
MwLoadImage
-
Mw/Error.h
-
MwErrorEnum
-
MwEsuccess
-
Mw/Font.h
-
MwFontData[]
-
Mw/Frame.h
-
MwFrameClass
-
Mw/GDI.h
-
Mw/LowLevel.h
-
Mw/MachDep.h
-
Mw/Milsko.h
-
Mw/OpenGL.h
-
MwOpenGLClass
-
MwOpenGLMakeCurrent
-
MwOpenGLSwapBuffer
-
Mw/StringDefs.h
-
Mw/TypeDefs.h
-
Mw/Vulkan.h
-
MwVulkanClass
-
Mw/Window.h
-
MwWindowClass
-
Mw/X11.h
-
Button widget.
MWDECL MwClass MwButtonClass;
-
Button widget class.
Mw/Core.h
-
Core.
#define MwDispatch(x, y)
-
Dispatches the handler of widget class.
-
-
Used internally.
-
Parameter
x
-
Widget.
-
Parameter
y
-
Handler name.
MWDECL MwWidget MwCreateWidget (
MwClass widget_class,
const char* name,
MwWidget parent,
int x,
int y,
unsigned int width,
unsigned int height
);
-
Creates a widget.
-
Parameter
widget_class
-
Widget class.
-
Parameter
name
-
Widget name.
-
Parameter
parent
-
Parent widget or
NULL.
-
Parameter
x
-
X.
-
Parameter
y
-
Y.
-
Parameter
width
-
Width.
-
Parameter
height
-
Height.
-
Returns
-
Widget.
MWDECL MwWidget MwVaCreateWidget (
MwClass widget_class,
const char* name,
MwWidget parent,
int x,
int y,
unsigned int width,
unsigned int height,
...
);
-
Creates a widget.
-
Parameter
widget_class
-
Widget class.
-
Parameter
name
-
Widget name.
-
Parameter
parent
-
Parent widget or
NULL.
-
Parameter
x
-
X.
-
Parameter
y
-
Y.
-
Parameter
width
-
Width.
-
Parameter
height
-
Height.
-
Parameter
...
-
Same with MwVaApply.
-
Returns
-
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
);
-
Creates a widget.
-
Parameter
widget_class
-
Widget class.
-
Parameter
name
-
Widget name.
-
Parameter
parent
-
Parent widget or
NULL.
-
Parameter
x
-
X.
-
Parameter
y
-
Y.
-
Parameter
width
-
Width.
-
Parameter
height
-
Height.
-
Parameter
va
-
Same with MwVaListApply.
-
Returns
-
Widget.
MWDECL void MwDestroyWidget (
MwWidget handle
);
-
Destroys the widget and its child widgets.
-
Parameter
handle
-
Widget.
MWDECL void MwLoop (
MwWidget handle
);
-
Runs the main loop.
-
Parameter
handle
-
Widget.
MWDECL void MwStep (
MwWidget handle
);
-
Runs the single step.
-
Parameter
handle
-
Widget.
MWDECL int MwPending (
MwWidget handle
);
-
Check if any event is pending.
-
Parameter
handle
-
Widget.
-
Returns
-
1 if any event is pending.
MWDECL void MwSetInteger (
MwWidget handle,
const char* key,
int n
);
-
Sets an integer property.
-
Parameter
handle
-
Widget.
-
Parameter
key
-
Key.
-
Parameter
n
-
Value.
MWDECL void MwSetText (
MwWidget handle,
const char* key,
const char* value
);
-
Sets a text property.
-
Parameter
handle
-
Widget.
-
Parameter
key
-
Key.
-
Parameter
value
-
Value.
MWDECL void MwSetVoid (
MwWidget handle,
const char* key,
void* value
);
-
Sets a void pointer property.
-
Parameter
handle
-
Widget.
-
Parameter
key
-
Key.
-
Parameter
value
-
Value.
MWDECL int MwGetInteger (
MwWidget handle,
const char* key
);
-
Gets the integer property.
-
Parameter
handle
-
Widget.
-
Parameter
key
-
Key.
-
Returns
-
Value.
MWDECL const char* MwGetText (
MwWidget handle,
const char* key
);
-
Gets the text property.
-
Parameter
handle
-
Widget.
-
Parameter
key
-
Key.
-
Returns
-
Value.
MWDECL void* MwGetVoid (
MwWidget handle,
const char* key
);
-
Gets the void pointer property.
-
Parameter
handle
-
Widget.
-
Parameter
key
-
Key.
-
Returns
-
Value.
MWDECL void MwSetDefault (
MwWidget handle
);
-
Sets the default property.
-
-
This is called when widget is created.
-
Parameter
handle
-
Widget.
MWDECL void MwVaApply (
MwWidget handle,
...
);
-
Sets the properties.
-
Parameter
handle
-
Widget.
-
Parameter
...
-
Properties.
MWDECL void MwVaListApply (
MwWidget handle,
va_list va
);
-
Sets properties.
-
Parameter
handle
-
Widget.
-
Parameter
va
-
Properties.
MWDECL void MwAddUserHandler (
MwWidget handle,
const char* key,
MwUserHandler handler,
void* user_data
);
-
Sets a user handler.
-
Parameter
handle
-
Widget.
-
Parameter
key
-
Key.
-
Parameter
handler
-
Handler.
-
Parameter
user_data
-
User data passed to handler.
MWDECL void MwDispatchUserHandler (
MwWidget handle,
const char* key,
void* handler_data
);
-
Dispatches the user handler.
-
Parameter
handle
-
Widget.
-
Parameter
key
-
Key.
-
Parameter
handler_data
-
Handler data passed to handler.
MWDECL void MwSetErrorHandler (
MwErrorHandler handler,
void* user_data
);
-
Sets an error handler.
-
Parameter
handle
-
Widget.
-
Parameter
handler
-
Handler.
-
Parameter
user_data
-
User data passed to handler.
MWDECL void MwDispatchError (
int code,
const char* message
);
-
Dispatches the error handler.
-
Parameter
code
-
Error code.
-
Parameter
message
-
Error message.
MWDECL void MwGetBeforeStep (
MwWidget handle,
jmp_buf* jmpbuf
);
-
Gets the before_step of widget.
-
Parameter
handle
-
Widget.
-
Parameter
jmpbuf
-
jmp_buf.
Mw/Default.h
-
Default properties.
MWDECL const char* MwDefaultBackground;
-
Default background color.
MWDECL const char* MwDefaultForeground;
-
Default foreground color.
Mw/Draw.h
-
Common drawing API.
MWDECL MwLLColor MwParseColor (
MwWidget handle,
const char* text
);
-
Parses a color text.
-
Parameter
handle
-
Widget.
-
Parameter
text
-
Color text.
-
Returns
-
Color.
MWDECL void MwDrawRect (
MwWidget handle,
MwRect* rect,
MwLLColor color
);
-
Draws a filled rectangle.
-
Parameter
handle
-
Widget.
-
Parameter
rect
-
Rectangle area.
-
Parameter
color
-
Color.
MWDECL void MwDrawFrame (
MwWidget handle,
MwRect* rect,
MwLLColor color,
int invert
);
-
Draws a frame.
-
-
rect gets changed to the area of rectangle inside.
-
Parameter
handle
-
Widget.
-
Parameter
rect
-
Rectangle area.
-
Parameter
color
-
Color.
-
Parameter
invert
-
Invert the 3D border color or not.
MWDECL void MwDrawFrameEx (
MwWidget handle,
MwRect* rect,
MwLLColor color,
int invert,
int border
);
-
Draws a frame with specified border width.
-
-
rect gets changed to the area of rectangle inside.
-
Parameter
handle
-
Widget.
-
Parameter
rect
-
Rectangle area.
-
Parameter
color
-
Color.
-
Parameter
invert
-
Invert the 3D border color or not.
-
Parameter
border
-
Border width.
MWDECL void MwDrawText (
MwWidget handle,
MwPoint* point,
const char* text,
MwLLColor color
);
-
Draws a text.
-
Parameter
handle
-
Widget.
-
Parameter
point
-
Center point of the text.
-
Parameter
text
-
Text.
-
Parameter
color
-
Color.
MWDECL MwLLPixmap MwLoadImage (
MwWidget handle,
const char* path
);
-
Creates a pixmap from image.
-
Parameter
handle
-
Widget.
-
Parameter
path
-
Path.
-
Returns
-
Pixmap.
Mw/Error.h
-
Error codes.
enum MwErrorEnum;
-
Error code enumeration.
MwEsuccess = 0
-
No error.
Mw/Font.h
-
Default font.
MWDECL MwFont MwFontData[];
-
Default font data.
Mw/Frame.h
-
Frame widget.
MWDECL MwClass MwFrameClass;
-
Frame widget class.
Mw/GDI.h
-
GDI backend.
-
-
This is used internally.
Mw/LowLevel.h
-
Low-level drawing API.
-
-
This is used internally.
Mw/MachDep.h
Mw/Milsko.h
-
Includes all headers.
Mw/OpenGL.h
-
OpenGL widget.
MWDECL MwClass MwOpenGLClass;
-
OpenGL widget class.
MWDECL void MwOpenGLMakeCurrent (
MwWidget handle
);
-
Make a widget current OpenGL context.
-
Parameter
handle
-
Widget.
MWDECL void MwOpenGLSwapBuffer (
MwWidget handle
);
-
Swaps the buffer of OpenGL context.
-
Parameter
handle
-
Widget.
Mw/StringDefs.h
-
String definitions for property.
Mw/TypeDefs.h
-
Type definitions.
Mw/Vulkan.h
-
Vulkan widget.
-
-
This header is not documented yet.
MWDECL MwClass MwVulkanClass;
-
Vulkan widget class.
Mw/Window.h
-
Window widget.
MWDECL MwClass MwWindowClass;
-
Window widget class.
Mw/X11.h
-
X11 backend.
-
-
This is used internally.