mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-10 03:13:28 +00:00
introduce box widget
This commit is contained in:
63
examples/basic/box.c
Normal file
63
examples/basic/box.c
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
#include <Mw/Milsko.h>
|
||||||
|
|
||||||
|
MwWidget window, box;
|
||||||
|
|
||||||
|
void resize(MwWidget handle, void* user, void* client) {
|
||||||
|
int ww = MwGetInteger(handle, MwNwidth);
|
||||||
|
int wh = MwGetInteger(handle, MwNheight);
|
||||||
|
|
||||||
|
(void)user;
|
||||||
|
(void)client;
|
||||||
|
|
||||||
|
MwVaApply(box,
|
||||||
|
MwNwidth, ww,
|
||||||
|
MwNheight, wh,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
MwWidget box2, box3;
|
||||||
|
|
||||||
|
MwLibraryInit();
|
||||||
|
|
||||||
|
window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 200, 200,
|
||||||
|
MwNtitle, "box",
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
box = MwVaCreateWidget(MwBoxClass, "box", window, 0, 0, 0, 0,
|
||||||
|
MwNpadding, 10,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
box2 = MwVaCreateWidget(MwBoxClass, "box2", box, 0, 0, 0, 0,
|
||||||
|
MwNpadding, 10,
|
||||||
|
MwNorientation, MwVERTICAL,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
box3 = MwVaCreateWidget(MwBoxClass, "box3", box, 0, 0, 0, 0,
|
||||||
|
MwNpadding, 10,
|
||||||
|
MwNorientation, MwVERTICAL,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
MwVaCreateWidget(MwButtonClass, "btn1", box2, 0, 0, 0, 0,
|
||||||
|
MwNbackground, "#a00",
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
MwVaCreateWidget(MwButtonClass, "btn2", box2, 0, 0, 0, 0,
|
||||||
|
MwNbackground, "#0a0",
|
||||||
|
MwNboxRatio, 2,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
MwVaCreateWidget(MwButtonClass, "btn3", box2, 0, 0, 0, 0,
|
||||||
|
MwNbackground, "#00a",
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
MwVaCreateWidget(MwButtonClass, "btn4", box3, 0, 0, 0, 0,
|
||||||
|
MwNbackground, "#00a",
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
MwAddUserHandler(window, MwNresizeHandler, resize, NULL);
|
||||||
|
|
||||||
|
resize(window, NULL, NULL);
|
||||||
|
|
||||||
|
MwLoop(window);
|
||||||
|
}
|
||||||
@@ -37,6 +37,17 @@
|
|||||||
#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)
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @warning Used internally
|
||||||
|
* @brief Dispatches the handler of widget class
|
||||||
|
* @param x Widget
|
||||||
|
* @param y Handler name
|
||||||
|
* @param z Argument
|
||||||
|
* @param w Argument
|
||||||
|
*/
|
||||||
|
#define MwDispatch4(x, y, z, w) \
|
||||||
|
if(!x->destroyed && x->widget_class != NULL && x->widget_class->y != NULL) x->widget_class->y(x, z, w)
|
||||||
|
|
||||||
#define MwWaitMS 30
|
#define MwWaitMS 30
|
||||||
|
|
||||||
#define MwDoubleClickTimeout 250
|
#define MwDoubleClickTimeout 250
|
||||||
|
|||||||
@@ -50,5 +50,6 @@
|
|||||||
#include <Mw/Widget/Separator.h>
|
#include <Mw/Widget/Separator.h>
|
||||||
#include <Mw/Widget/ComboBox.h>
|
#include <Mw/Widget/ComboBox.h>
|
||||||
#include <Mw/Widget/TreeView.h>
|
#include <Mw/Widget/TreeView.h>
|
||||||
|
#include <Mw/Widget/Box.h>
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
#define MwNpadding "Ipadding"
|
#define MwNpadding "Ipadding"
|
||||||
#define MwNborderWidth "IborderWidth"
|
#define MwNborderWidth "IborderWidth"
|
||||||
#define MwNfillArea "IfillArea"
|
#define MwNfillArea "IfillArea"
|
||||||
|
#define MwNboxRatio "IboxRatio"
|
||||||
|
|
||||||
#define MwNtitle "Stitle"
|
#define MwNtitle "Stitle"
|
||||||
#define MwNtext "Stext"
|
#define MwNtext "Stext"
|
||||||
|
|||||||
@@ -32,11 +32,13 @@ typedef void* MwWidget;
|
|||||||
typedef void (*MwHandler)(MwWidget handle);
|
typedef void (*MwHandler)(MwWidget handle);
|
||||||
typedef int (*MwHandlerWithStatus)(MwWidget handle);
|
typedef int (*MwHandlerWithStatus)(MwWidget handle);
|
||||||
typedef void (*MwHandlerProp)(MwWidget handle, const char* key);
|
typedef void (*MwHandlerProp)(MwWidget handle, const char* key);
|
||||||
|
typedef void (*MwHandlerChildrenProp)(MwWidget handle, MwWidget child, const char* key);
|
||||||
typedef void (*MwHandlerKey)(MwWidget handle, int key);
|
typedef void (*MwHandlerKey)(MwWidget handle, int key);
|
||||||
typedef void (*MwHandlerMouse)(MwWidget handle, void* ptr);
|
typedef void (*MwHandlerMouse)(MwWidget handle, void* ptr);
|
||||||
|
typedef void (*MwHandlerExecute)(MwWidget handle, const char* name, void* out, va_list args);
|
||||||
|
|
||||||
typedef void (*MwUserHandler)(MwWidget handle, void* user_data, void* call_data);
|
typedef void (*MwUserHandler)(MwWidget handle, void* user_data, void* call_data);
|
||||||
typedef void (*MwErrorHandler)(int code, const char* message, void* user_data);
|
typedef void (*MwErrorHandler)(int code, const char* message, void* user_data);
|
||||||
typedef void (*MwHandlerExecute)(MwWidget handle, const char* name, void* out, va_list args);
|
|
||||||
|
|
||||||
struct _MwTextKeyValue {
|
struct _MwTextKeyValue {
|
||||||
char* key;
|
char* key;
|
||||||
@@ -175,21 +177,26 @@ struct _MwListBoxPacket {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct _MwClass {
|
struct _MwClass {
|
||||||
MwHandlerWithStatus create;
|
MwHandlerWithStatus create;
|
||||||
MwHandler destroy;
|
MwHandler destroy;
|
||||||
MwHandler draw;
|
MwHandler draw;
|
||||||
MwHandler click;
|
MwHandler click;
|
||||||
MwHandler parent_resize;
|
MwHandler parent_resize;
|
||||||
MwHandlerProp prop_change;
|
MwHandlerProp prop_change;
|
||||||
MwHandler mouse_move;
|
MwHandler mouse_move;
|
||||||
MwHandlerMouse mouse_up;
|
MwHandlerMouse mouse_up;
|
||||||
MwHandlerMouse mouse_down;
|
MwHandlerMouse mouse_down;
|
||||||
MwHandlerKey key;
|
MwHandlerKey key;
|
||||||
MwHandlerExecute execute;
|
MwHandlerExecute execute;
|
||||||
MwHandler tick;
|
MwHandler tick;
|
||||||
void* reserved3;
|
MwHandler resize;
|
||||||
void* reserved4;
|
MwHandler children_update;
|
||||||
void* reserved5;
|
MwHandlerChildrenProp children_prop_change;
|
||||||
|
void* reserved1;
|
||||||
|
void* reserved2;
|
||||||
|
void* reserved3;
|
||||||
|
void* reserved4;
|
||||||
|
void* reserved5;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
24
include/Mw/Widget/Box.h
Normal file
24
include/Mw/Widget/Box.h
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
/*!
|
||||||
|
* @file Mw/Widget/Box.h
|
||||||
|
* @brief Box widget
|
||||||
|
*/
|
||||||
|
#ifndef __MW_WIDGET_BOX_H__
|
||||||
|
#define __MW_WIDGET_BOX_H__
|
||||||
|
|
||||||
|
#include <Mw/MachDep.h>
|
||||||
|
#include <Mw/TypeDefs.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief Box widget class
|
||||||
|
*/
|
||||||
|
MWDECL MwClass MwBoxClass;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -49,6 +49,7 @@
|
|||||||
- MwNheight
|
- MwNheight
|
||||||
- MwNborderWidth
|
- MwNborderWidth
|
||||||
- MwNbackgroundPixmap
|
- MwNbackgroundPixmap
|
||||||
|
- MwNboxRatio
|
||||||
|
|
||||||
Integer properties must be prefixed with I.
|
Integer properties must be prefixed with I.
|
||||||
String properties must be prefixed with S.
|
String properties must be prefixed with S.
|
||||||
@@ -82,6 +83,7 @@
|
|||||||
<integer name="showArrows" />
|
<integer name="showArrows" />
|
||||||
<integer name="padding" />
|
<integer name="padding" />
|
||||||
<integer name="borderWidth" />
|
<integer name="borderWidth" />
|
||||||
|
<integer name="boxRatio" />
|
||||||
|
|
||||||
<string name="title" />
|
<string name="title" />
|
||||||
<string name="text" />
|
<string name="text" />
|
||||||
@@ -483,6 +485,12 @@
|
|||||||
</header>
|
</header>
|
||||||
</headers>
|
</headers>
|
||||||
<widgets>
|
<widgets>
|
||||||
|
<widget name="Box">
|
||||||
|
<properties>
|
||||||
|
<property name="orientation" />
|
||||||
|
<property name="padding" />
|
||||||
|
</properties>
|
||||||
|
</widget>
|
||||||
<widget name="Button">
|
<widget name="Button">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="pixmap" />
|
<property name="pixmap" />
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ new_object("src/icon/*.c");
|
|||||||
new_object("src/font/*.c");
|
new_object("src/font/*.c");
|
||||||
new_object("src/cursor/*.c");
|
new_object("src/cursor/*.c");
|
||||||
|
|
||||||
|
new_object("src/widget/box.c");
|
||||||
new_object("src/widget/button.c");
|
new_object("src/widget/button.c");
|
||||||
new_object("src/widget/checkbox.c");
|
new_object("src/widget/checkbox.c");
|
||||||
new_object("src/widget/combobox.c");
|
new_object("src/widget/combobox.c");
|
||||||
@@ -116,6 +117,7 @@ new_example("examples/basic/progressbar");
|
|||||||
new_example("examples/basic/colorpicker");
|
new_example("examples/basic/colorpicker");
|
||||||
new_example("examples/basic/combobox");
|
new_example("examples/basic/combobox");
|
||||||
new_example("examples/basic/treeview");
|
new_example("examples/basic/treeview");
|
||||||
|
new_example("examples/basic/box");
|
||||||
|
|
||||||
if (param_get("opengl")) {
|
if (param_get("opengl")) {
|
||||||
new_example("examples/gldemos/boing", $gl_libs);
|
new_example("examples/gldemos/boing", $gl_libs);
|
||||||
|
|||||||
22
src/core.c
22
src/core.c
@@ -50,6 +50,7 @@ static void llresizehandler(MwLL handle, void* data) {
|
|||||||
for(i = 0; i < arrlen(h->children); i++) {
|
for(i = 0; i < arrlen(h->children); i++) {
|
||||||
MwDispatch(h->children[i], parent_resize);
|
MwDispatch(h->children[i], parent_resize);
|
||||||
}
|
}
|
||||||
|
MwDispatch(h, resize);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void llclosehandler(MwLL handle, void* data) {
|
static void llclosehandler(MwLL handle, void* data) {
|
||||||
@@ -176,6 +177,8 @@ MwWidget MwCreateWidget(MwClass widget_class, const char* name, MwWidget parent,
|
|||||||
MwAddTickList(h);
|
MwAddTickList(h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(h->parent != NULL) MwDispatch(h->parent, children_update);
|
||||||
|
|
||||||
return h;
|
return h;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -378,7 +381,10 @@ void MwSetInteger(MwWidget handle, const char* key, int n) {
|
|||||||
} else {
|
} else {
|
||||||
shput(handle->integer, key, n);
|
shput(handle->integer, key, n);
|
||||||
}
|
}
|
||||||
if(handle->prop_event) MwDispatch3(handle, prop_change, key);
|
if(handle->prop_event) {
|
||||||
|
MwDispatch3(handle, prop_change, key);
|
||||||
|
if(handle->parent != NULL) MwDispatch4(handle->parent, children_prop_change, handle, key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MwSetText(MwWidget handle, const char* key, const char* value) {
|
void MwSetText(MwWidget handle, const char* key, const char* value) {
|
||||||
@@ -395,7 +401,10 @@ void MwSetText(MwWidget handle, const char* key, const char* value) {
|
|||||||
shdel(handle->text, key);
|
shdel(handle->text, key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(handle->prop_event) MwDispatch3(handle, prop_change, key);
|
if(handle->prop_event) {
|
||||||
|
MwDispatch3(handle, prop_change, key);
|
||||||
|
if(handle->parent != NULL) MwDispatch4(handle->parent, children_prop_change, handle, key);
|
||||||
|
}
|
||||||
if(strcmp(key, MwNbackground) == 0 || strcmp(key, MwNforeground) == 0 || strcmp(key, MwNsubBackground) == 0 || strcmp(key, MwNsubForeground) == 0) {
|
if(strcmp(key, MwNbackground) == 0 || strcmp(key, MwNforeground) == 0 || strcmp(key, MwNsubBackground) == 0 || strcmp(key, MwNsubForeground) == 0) {
|
||||||
MwForceRender(handle);
|
MwForceRender(handle);
|
||||||
}
|
}
|
||||||
@@ -413,7 +422,10 @@ void MwSetVoid(MwWidget handle, const char* key, void* value) {
|
|||||||
} else {
|
} else {
|
||||||
shput(handle->data, key, value);
|
shput(handle->data, key, value);
|
||||||
}
|
}
|
||||||
if(handle->prop_event) MwDispatch3(handle, prop_change, key);
|
if(handle->prop_event) {
|
||||||
|
MwDispatch3(handle, prop_change, key);
|
||||||
|
if(handle->parent != NULL) MwDispatch4(handle->parent, children_prop_change, handle, key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int MwGetInteger(MwWidget handle, const char* key) {
|
int MwGetInteger(MwWidget handle, const char* key) {
|
||||||
@@ -732,10 +744,14 @@ void MwReparent(MwWidget handle, MwWidget new_parent) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MwDispatch(handle->parent, children_update);
|
||||||
}
|
}
|
||||||
|
|
||||||
handle->parent = new_parent;
|
handle->parent = new_parent;
|
||||||
arrput(new_parent->children, handle);
|
arrput(new_parent->children, handle);
|
||||||
|
|
||||||
|
MwDispatch(handle->parent, children_update);
|
||||||
}
|
}
|
||||||
|
|
||||||
MwClass MwGetClass(MwWidget handle) {
|
MwClass MwGetClass(MwWidget handle) {
|
||||||
|
|||||||
100
src/widget/box.c
Normal file
100
src/widget/box.c
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
#include <Mw/Milsko.h>
|
||||||
|
|
||||||
|
#include "../../external/stb_ds.h"
|
||||||
|
|
||||||
|
static int create(MwWidget handle) {
|
||||||
|
MwSetDefault(handle);
|
||||||
|
|
||||||
|
MwSetInteger(handle, MwNorientation, MwHORIZONTAL);
|
||||||
|
MwSetInteger(handle, MwNpadding, 0);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void draw(MwWidget handle) {
|
||||||
|
MwRect r;
|
||||||
|
MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground));
|
||||||
|
|
||||||
|
r.x = 0;
|
||||||
|
r.y = 0;
|
||||||
|
r.width = MwGetInteger(handle, MwNwidth);
|
||||||
|
r.height = MwGetInteger(handle, MwNheight);
|
||||||
|
MwDrawRect(handle, &r, base);
|
||||||
|
|
||||||
|
MwLLFreeColor(base);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void layout(MwWidget handle) {
|
||||||
|
int i;
|
||||||
|
int sum = 0;
|
||||||
|
int horiz = MwGetInteger(handle, MwNorientation) == MwHORIZONTAL ? 1 : 0;
|
||||||
|
int sz = MwGetInteger(handle, horiz ? MwNwidth : MwNheight) - MwGetInteger(handle, MwNpadding);
|
||||||
|
int fsz = MwGetInteger(handle, horiz ? MwNheight : MwNwidth) - MwGetInteger(handle, MwNpadding) * 2;
|
||||||
|
int sk = 0;
|
||||||
|
if(arrlen(handle->children) == 0) return;
|
||||||
|
|
||||||
|
for(i = 0; i < arrlen(handle->children); i++) {
|
||||||
|
int n = MwGetInteger(handle->children[i], MwNboxRatio);
|
||||||
|
if(n == MwDEFAULT) n = 1;
|
||||||
|
|
||||||
|
sum += n;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(i = 0; i < arrlen(handle->children); i++) {
|
||||||
|
int n = MwGetInteger(handle->children[i], MwNboxRatio);
|
||||||
|
int wsz;
|
||||||
|
if(n == MwDEFAULT) n = 1;
|
||||||
|
|
||||||
|
wsz = sz * n / sum - MwGetInteger(handle, MwNpadding);
|
||||||
|
|
||||||
|
sk += MwGetInteger(handle, MwNpadding);
|
||||||
|
MwVaApply(handle->children[i],
|
||||||
|
horiz ? MwNx : MwNy, sk, /* this is what gets changed */
|
||||||
|
horiz ? MwNy : MwNx, MwGetInteger(handle, MwNpadding), /* fixed between widgets */
|
||||||
|
horiz ? MwNwidth : MwNheight, wsz, /* this is what gets changed */
|
||||||
|
horiz ? MwNheight : MwNwidth, fsz, /* fixed between widgets */
|
||||||
|
NULL);
|
||||||
|
sk += wsz;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void prop_change(MwWidget handle, const char* key) {
|
||||||
|
if(strcmp(key, MwNorientation) == 0) layout(handle);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void children_prop_change(MwWidget handle, MwWidget child, const char* key) {
|
||||||
|
(void)child;
|
||||||
|
|
||||||
|
if(strcmp(key, MwNboxRatio) == 0) layout(handle);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void resize(MwWidget handle) {
|
||||||
|
layout(handle);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void children_update(MwWidget handle) {
|
||||||
|
layout(handle);
|
||||||
|
}
|
||||||
|
|
||||||
|
MwClassRec MwBoxClassRec = {
|
||||||
|
create, /* create */
|
||||||
|
NULL, /* destroy */
|
||||||
|
draw, /* draw */
|
||||||
|
NULL, /* click */
|
||||||
|
NULL, /* parent_resize */
|
||||||
|
prop_change, /* prop_change */
|
||||||
|
NULL, /* mouse_move */
|
||||||
|
NULL, /* mouse_up */
|
||||||
|
NULL, /* mouse_down */
|
||||||
|
NULL, /* key */
|
||||||
|
NULL, /* execute */
|
||||||
|
NULL, /* tick */
|
||||||
|
resize, /* resize */
|
||||||
|
children_update, /* children_update */
|
||||||
|
children_prop_change, /* children_prop_change */
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL};
|
||||||
|
MwClass MwBoxClass = &MwBoxClassRec;
|
||||||
@@ -101,6 +101,11 @@ MwClassRec MwButtonClassRec = {
|
|||||||
NULL, /* key */
|
NULL, /* key */
|
||||||
NULL, /* execute */
|
NULL, /* execute */
|
||||||
NULL, /* tick */
|
NULL, /* tick */
|
||||||
|
NULL, /* resize */
|
||||||
|
NULL, /* children_update */
|
||||||
|
NULL, /* children_prop_change */
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL};
|
NULL};
|
||||||
|
|||||||
@@ -50,6 +50,11 @@ MwClassRec MwCheckBoxClassRec = {
|
|||||||
NULL, /* key */
|
NULL, /* key */
|
||||||
NULL, /* execute */
|
NULL, /* execute */
|
||||||
NULL, /* tick */
|
NULL, /* tick */
|
||||||
|
NULL, /* resize */
|
||||||
|
NULL, /* children_update */
|
||||||
|
NULL, /* children_prop_change */
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL};
|
NULL};
|
||||||
|
|||||||
@@ -201,6 +201,11 @@ MwClassRec MwComboBoxClassRec = {
|
|||||||
NULL, /* key */
|
NULL, /* key */
|
||||||
func_handler, /* execute */
|
func_handler, /* execute */
|
||||||
NULL, /* tick */
|
NULL, /* tick */
|
||||||
|
NULL, /* resize */
|
||||||
|
NULL, /* children_update */
|
||||||
|
NULL, /* children_prop_change */
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL};
|
NULL};
|
||||||
|
|||||||
@@ -170,6 +170,11 @@ MwClassRec MwEntryClassRec = {
|
|||||||
key, /* key */
|
key, /* key */
|
||||||
NULL, /* execute */
|
NULL, /* execute */
|
||||||
NULL, /* tick */
|
NULL, /* tick */
|
||||||
|
NULL, /* resize */
|
||||||
|
NULL, /* children_update */
|
||||||
|
NULL, /* children_prop_change */
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL};
|
NULL};
|
||||||
|
|||||||
@@ -59,6 +59,11 @@ MwClassRec MwFrameClassRec = {
|
|||||||
NULL, /* key */
|
NULL, /* key */
|
||||||
NULL, /* execute */
|
NULL, /* execute */
|
||||||
NULL, /* tick */
|
NULL, /* tick */
|
||||||
|
NULL, /* resize */
|
||||||
|
NULL, /* children_update */
|
||||||
|
NULL, /* children_prop_change */
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL};
|
NULL};
|
||||||
|
|||||||
@@ -46,6 +46,11 @@ MwClassRec MwImageClassRec = {
|
|||||||
NULL, /* key */
|
NULL, /* key */
|
||||||
NULL, /* execute */
|
NULL, /* execute */
|
||||||
NULL, /* tick */
|
NULL, /* tick */
|
||||||
|
NULL, /* resize */
|
||||||
|
NULL, /* children_update */
|
||||||
|
NULL, /* children_prop_change */
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL};
|
NULL};
|
||||||
|
|||||||
@@ -59,6 +59,11 @@ MwClassRec MwLabelClassRec = {
|
|||||||
NULL, /* key */
|
NULL, /* key */
|
||||||
NULL, /* execute */
|
NULL, /* execute */
|
||||||
NULL, /* tick */
|
NULL, /* tick */
|
||||||
|
NULL, /* resize */
|
||||||
|
NULL, /* children_update */
|
||||||
|
NULL, /* children_prop_change */
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL};
|
NULL};
|
||||||
|
|||||||
@@ -606,6 +606,11 @@ MwClassRec MwListBoxClassRec = {
|
|||||||
NULL, /* key */
|
NULL, /* key */
|
||||||
func_handler, /* execute */
|
func_handler, /* execute */
|
||||||
tick, /* tick */
|
tick, /* tick */
|
||||||
|
NULL, /* resize */
|
||||||
|
NULL, /* children_update */
|
||||||
|
NULL, /* children_prop_change */
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL};
|
NULL};
|
||||||
|
|||||||
@@ -201,6 +201,11 @@ MwClassRec MwMenuClassRec = {
|
|||||||
NULL, /* key */
|
NULL, /* key */
|
||||||
func_handler, /* execute */
|
func_handler, /* execute */
|
||||||
NULL, /* tick */
|
NULL, /* tick */
|
||||||
|
NULL, /* resize */
|
||||||
|
NULL, /* children_update */
|
||||||
|
NULL, /* children_prop_change */
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL};
|
NULL};
|
||||||
|
|||||||
@@ -140,6 +140,11 @@ MwClassRec MwNumberEntryClassRec = {
|
|||||||
key, /* key */
|
key, /* key */
|
||||||
NULL, /* execute */
|
NULL, /* execute */
|
||||||
NULL, /* tick */
|
NULL, /* tick */
|
||||||
|
NULL, /* resize */
|
||||||
|
NULL, /* children_update */
|
||||||
|
NULL, /* children_prop_change */
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL};
|
NULL};
|
||||||
|
|||||||
@@ -249,6 +249,11 @@ MwClassRec MwOpenGLClassRec = {
|
|||||||
NULL, /* key */
|
NULL, /* key */
|
||||||
func_handler, /* execute */
|
func_handler, /* execute */
|
||||||
NULL, /* tick */
|
NULL, /* tick */
|
||||||
|
NULL, /* resize */
|
||||||
|
NULL, /* children_update */
|
||||||
|
NULL, /* children_prop_change */
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL};
|
NULL};
|
||||||
|
|||||||
@@ -58,6 +58,11 @@ MwClassRec MwProgressBarClassRec = {
|
|||||||
NULL, /* key */
|
NULL, /* key */
|
||||||
NULL, /* execute */
|
NULL, /* execute */
|
||||||
NULL, /* tick */
|
NULL, /* tick */
|
||||||
|
NULL, /* resize */
|
||||||
|
NULL, /* children_update */
|
||||||
|
NULL, /* children_prop_change */
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL};
|
NULL};
|
||||||
|
|||||||
@@ -59,6 +59,11 @@ MwClassRec MwRadioBoxClassRec = {
|
|||||||
NULL, /* key */
|
NULL, /* key */
|
||||||
NULL, /* execute */
|
NULL, /* execute */
|
||||||
NULL, /* tick */
|
NULL, /* tick */
|
||||||
|
NULL, /* resize */
|
||||||
|
NULL, /* children_update */
|
||||||
|
NULL, /* children_prop_change */
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL};
|
NULL};
|
||||||
|
|||||||
@@ -275,6 +275,11 @@ MwClassRec MwScrollBarClassRec = {
|
|||||||
NULL, /* key */
|
NULL, /* key */
|
||||||
func_handler, /* execute */
|
func_handler, /* execute */
|
||||||
NULL, /* tick */
|
NULL, /* tick */
|
||||||
|
NULL, /* resize */
|
||||||
|
NULL, /* children_update */
|
||||||
|
NULL, /* children_prop_change */
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL};
|
NULL};
|
||||||
|
|||||||
@@ -47,6 +47,11 @@ MwClassRec MwSeparatorClassRec = {
|
|||||||
NULL, /* key */
|
NULL, /* key */
|
||||||
NULL, /* execute */
|
NULL, /* execute */
|
||||||
NULL, /* tick */
|
NULL, /* tick */
|
||||||
|
NULL, /* resize */
|
||||||
|
NULL, /* children_update */
|
||||||
|
NULL, /* children_prop_change */
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL};
|
NULL};
|
||||||
|
|||||||
@@ -212,6 +212,11 @@ MwClassRec MwSubMenuClassRec = {
|
|||||||
NULL, /* key */
|
NULL, /* key */
|
||||||
func_handler, /* execute */
|
func_handler, /* execute */
|
||||||
NULL, /* tick */
|
NULL, /* tick */
|
||||||
|
NULL, /* resize */
|
||||||
|
NULL, /* children_update */
|
||||||
|
NULL, /* children_prop_change */
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL};
|
NULL};
|
||||||
|
|||||||
@@ -493,6 +493,11 @@ MwClassRec MwTreeViewClassRec = {
|
|||||||
NULL, /* key */
|
NULL, /* key */
|
||||||
func_handler, /* execute */
|
func_handler, /* execute */
|
||||||
tick, /* tick */
|
tick, /* tick */
|
||||||
|
NULL, /* resize */
|
||||||
|
NULL, /* children_update */
|
||||||
|
NULL, /* children_prop_change */
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL};
|
NULL};
|
||||||
|
|||||||
@@ -188,6 +188,11 @@ MwClassRec MwViewportClassRec = {
|
|||||||
NULL, /* key */
|
NULL, /* key */
|
||||||
func_handler, /* execute */
|
func_handler, /* execute */
|
||||||
tick, /* tick */
|
tick, /* tick */
|
||||||
|
NULL, /* resize */
|
||||||
|
NULL, /* children_update */
|
||||||
|
NULL, /* children_prop_change */
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL};
|
NULL};
|
||||||
|
|||||||
@@ -521,6 +521,11 @@ MwClassRec MwVulkanClassRec = {
|
|||||||
NULL, /* key */
|
NULL, /* key */
|
||||||
func_handler, /* execute */
|
func_handler, /* execute */
|
||||||
NULL, /* tick */
|
NULL, /* tick */
|
||||||
|
NULL, /* resize */
|
||||||
|
NULL, /* children_update */
|
||||||
|
NULL, /* children_prop_change */
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL};
|
NULL};
|
||||||
|
|||||||
@@ -56,6 +56,11 @@ MwClassRec MwWindowClassRec = {
|
|||||||
NULL, /* key */
|
NULL, /* key */
|
||||||
func_handler, /* execute */
|
func_handler, /* execute */
|
||||||
NULL, /* tick */
|
NULL, /* tick */
|
||||||
|
NULL, /* resize */
|
||||||
|
NULL, /* children_update */
|
||||||
|
NULL, /* children_prop_change */
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL};
|
NULL};
|
||||||
|
|||||||
@@ -18,5 +18,6 @@ for i in *.c; do
|
|||||||
done
|
done
|
||||||
cd ../..
|
cd ../..
|
||||||
rm -f milsko-examples.zip
|
rm -f milsko-examples.zip
|
||||||
|
cp resource/logo/logo.png examples/picture.jpg examples/picture.png milsko-examples/
|
||||||
zip -rv milsko-examples.zip milsko-examples
|
zip -rv milsko-examples.zip milsko-examples
|
||||||
rm -rf milsko-examples
|
rm -rf milsko-examples
|
||||||
|
|||||||
Reference in New Issue
Block a user