merge generic_func_idea from git

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@433 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
IoIxD
2025-10-20 21:55:30 +00:00
parent 65f5942f9d
commit ebc674f403
29 changed files with 499 additions and 234 deletions

View File

@@ -20,29 +20,32 @@ static void draw(MwWidget handle) {
MwLLFreeColor(c);
}
static void mwWindowMakeBorderlessImpl(MwWidget handle, int toggle) {
MwLLMakeBorderless(handle->lowlevel, toggle);
}
static void func_handler(MwWidget handle, const char* name, void* out, va_list va) {
(void)out;
if(strcmp(name, "mwWindowMakeBorderless") == 0) {
int toggle = va_arg(va, int);
mwWindowMakeBorderlessImpl(handle, toggle);
}
}
MwClassRec MwWindowClassRec = {
create, /* create */
NULL, /* destroy */
draw, /* draw */
NULL, /* click */
NULL, /* parent_resize */
NULL, /* prop_change */
NULL, /* mouse_move */
NULL, /* mouse_up */
NULL, /* mouse_down */
NULL, /* key */
NULL,
create, /* create */
NULL, /* destroy */
draw, /* draw */
NULL, /* click */
NULL, /* parent_resize */
NULL, /* prop_change */
NULL, /* mouse_move */
NULL, /* mouse_up */
NULL, /* mouse_down */
NULL, /* key */
func_handler, /* custom */
NULL,
NULL,
NULL,
NULL};
MwClass MwWindowClass = &MwWindowClassRec;
void MwWindowSetIcon(MwWidget handle, MwLLPixmap pixmap) {
MwLLSetIcon(handle->lowlevel, pixmap);
}
void MwWindowMakeBorderless(MwWidget handle, int toggle) {
MwLLMakeBorderless(handle->lowlevel, toggle);
}