2025-09-28 08:37:12 +00:00
|
|
|
/* $Id$ */
|
2025-09-29 00:10:20 +00:00
|
|
|
#include <Mw/Milsko.h>
|
2025-09-28 08:37:12 +00:00
|
|
|
|
2025-10-04 13:57:28 +00:00
|
|
|
static int create(MwWidget handle) {
|
2025-09-29 00:04:04 +00:00
|
|
|
MwSetDefault(handle);
|
2025-10-04 13:57:28 +00:00
|
|
|
|
|
|
|
|
return 0;
|
2025-09-28 13:28:17 +00:00
|
|
|
}
|
|
|
|
|
|
2025-09-29 00:04:04 +00:00
|
|
|
static void draw(MwWidget handle) {
|
|
|
|
|
MwLLColor c = MwParseColor(handle, MwGetText(handle, MwNbackground));
|
2025-09-29 00:10:20 +00:00
|
|
|
MwRect r;
|
2025-09-28 09:55:42 +00:00
|
|
|
|
2025-09-28 13:46:18 +00:00
|
|
|
r.x = 0;
|
|
|
|
|
r.y = 0;
|
2025-09-29 00:04:04 +00:00
|
|
|
r.width = MwGetInteger(handle, MwNwidth);
|
|
|
|
|
r.height = MwGetInteger(handle, MwNheight);
|
2025-09-28 10:01:59 +00:00
|
|
|
|
2025-09-29 00:04:04 +00:00
|
|
|
MwDrawRect(handle, &r, c);
|
2025-09-28 09:55:42 +00:00
|
|
|
|
2025-09-29 00:04:04 +00:00
|
|
|
MwLLFreeColor(c);
|
2025-09-28 09:50:28 +00:00
|
|
|
}
|
2025-10-20 21:55:30 +00:00
|
|
|
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;
|
2025-09-28 09:50:28 +00:00
|
|
|
|
2025-10-20 21:55:30 +00:00
|
|
|
if(strcmp(name, "mwWindowMakeBorderless") == 0) {
|
|
|
|
|
int toggle = va_arg(va, int);
|
|
|
|
|
mwWindowMakeBorderlessImpl(handle, toggle);
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-09-29 00:04:04 +00:00
|
|
|
MwClassRec MwWindowClassRec = {
|
2025-10-20 21:55:30 +00:00
|
|
|
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 */
|
2025-10-30 23:16:03 +00:00
|
|
|
func_handler, /* execute */
|
2025-11-04 01:52:44 +00:00
|
|
|
NULL, /* tick */
|
2025-10-08 18:03:46 +00:00
|
|
|
NULL,
|
|
|
|
|
NULL,
|
|
|
|
|
NULL};
|
2025-09-29 00:04:04 +00:00
|
|
|
MwClass MwWindowClass = &MwWindowClassRec;
|