Merge branch 'master' into clipboard

This commit is contained in:
IoI_xD 2026-04-15 23:42:47 -05:00
commit 5136207bf1
47 changed files with 841 additions and 345 deletions

View file

@ -2,7 +2,7 @@
#include "../../external/stb_ds.h"
static int create(MwWidget handle) {
static int wcreate(MwWidget handle) {
MwBox b = malloc(sizeof(*b));
memset(b, 0, sizeof(*b));
@ -135,7 +135,7 @@ static void children_update(MwWidget handle) {
}
MwClassRec MwBoxClassRec = {
create, /* create */
wcreate, /* create */
destroy, /* destroy */
draw, /* draw */
NULL, /* click */

View file

@ -2,7 +2,7 @@
#include "../../external/stb_ds.h"
static int create(MwWidget handle) {
static int wcreate(MwWidget handle) {
MwSetDefault(handle);
MwSetInteger(handle, MwNflat, 0);
@ -93,7 +93,7 @@ static void prop_change(MwWidget handle, const char* key) {
}
MwClassRec MwButtonClassRec = {
create, /* create */
wcreate, /* create */
NULL, /* destroy */
draw, /* draw */
click, /* click */

View file

@ -1,6 +1,6 @@
#include <Mw/Milsko.h>
static int create(MwWidget handle) {
static int wcreate(MwWidget handle) {
MwSetDefault(handle);
MwSetInteger(handle, MwNchecked, 0);
@ -38,7 +38,7 @@ static void prop_change(MwWidget handle, const char* key) {
}
MwClassRec MwCheckBoxClassRec = {
create, /* create */
wcreate, /* create */
NULL, /* destroy */
draw, /* draw */
click, /* click */

View file

@ -2,7 +2,7 @@
#include "../../external/stb_ds.h"
static int create(MwWidget handle) {
static int wcreate(MwWidget handle) {
MwComboBox cb = malloc(sizeof(*cb));
cb->list = NULL;
@ -189,7 +189,7 @@ static void func_handler(MwWidget handle, const char* name, void* out, va_list v
}
MwClassRec MwComboBoxClassRec = {
create, /* create */
wcreate, /* create */
destroy, /* destroy */
draw, /* draw */
click, /* click */

View file

@ -1,6 +1,6 @@
#include <Mw/Milsko.h>
static int create(MwWidget handle) {
static int wcreate(MwWidget handle) {
MwEntry t = malloc(sizeof(*t));
t->cursor = 0;
@ -186,7 +186,7 @@ static void clipboard(MwWidget handle, const char* data) {
}
MwClassRec MwEntryClassRec = {
create, /* create */
wcreate, /* create */
destroy, /* destroy */
draw, /* draw */
NULL, /* click */

View file

@ -1,6 +1,6 @@
#include <Mw/Milsko.h>
static int create(MwWidget handle) {
static int wcreate(MwWidget handle) {
MwSetDefault(handle);
MwSetInteger(handle, MwNhasBorder, 0);
@ -46,7 +46,7 @@ static void prop_change(MwWidget handle, const char* key) {
}
MwClassRec MwFrameClassRec = {
create, /* create */
wcreate, /* create */
NULL, /* destroy */
draw, /* draw */
NULL, /* click */

View file

@ -1,6 +1,6 @@
#include <Mw/Milsko.h>
static int create(MwWidget handle) {
static int wcreate(MwWidget handle) {
MwSetDefault(handle);
MwSetInteger(handle, MwNhasBorder, 0);
@ -42,7 +42,7 @@ static void prop_change(MwWidget handle, const char* key) {
}
MwClassRec MwImageClassRec = {
create, /* create */
wcreate, /* create */
NULL, /* destroy */
draw, /* draw */
NULL, /* click */

View file

@ -4,7 +4,7 @@
#define Spacing 1
static int create(MwWidget handle) {
static int wcreate(MwWidget handle) {
MwLabel lab = malloc(sizeof(*lab));
lab->segment = NULL;
@ -360,7 +360,7 @@ static void func_handler(MwWidget handle, const char* name, void* out, va_list v
}
MwClassRec MwLabelClassRec = {
create, /* create */
wcreate, /* create */
destroy, /* destroy */
draw, /* draw */
NULL, /* click */

View file

@ -347,7 +347,7 @@ static void resize(MwWidget handle) {
NULL);
}
static int create(MwWidget handle) {
static int wcreate(MwWidget handle) {
MwListBox lb = malloc(sizeof(*lb));
memset(lb, 0, sizeof(*lb));
@ -595,7 +595,7 @@ static void tick(MwWidget handle) {
}
MwClassRec MwListBoxClassRec = {
create, /* create */
wcreate, /* create */
destroy, /* destroy */
draw, /* draw */
NULL, /* click */

View file

@ -18,7 +18,7 @@ static void set_xywh(MwWidget handle) {
NULL);
}
static int create(MwWidget handle) {
static int wcreate(MwWidget handle) {
MwMenu m = malloc(sizeof(*m));
m->name = NULL;
@ -189,7 +189,7 @@ static void func_handler(MwWidget handle, const char* name, void* out, va_list v
}
MwClassRec MwMenuClassRec = {
create, /* create */
wcreate, /* create */
destroy, /* destroy */
draw, /* draw */
NULL, /* click */

View file

@ -1,6 +1,6 @@
#include <Mw/Milsko.h>
static int create(MwWidget handle) {
static int wcreate(MwWidget handle) {
int st;
MwEntry e;
@ -128,7 +128,7 @@ static void prop_change(MwWidget handle, const char* prop) {
}
MwClassRec MwNumberEntryClassRec = {
create, /* create */
wcreate, /* create */
destroy, /* destroy */
draw, /* draw */
NULL, /* click */

View file

@ -101,7 +101,7 @@ typedef struct waylandopengl {
} waylandopengl_t;
#endif
static int create(MwWidget handle) {
static int wcreate(MwWidget handle) {
void* r = NULL;
MwWidget w = handle;
@ -381,7 +381,7 @@ static void mwOpenGLMakeCurrentImpl(MwWidget handle) {
#ifdef USE_GDI
if(handle->lowlevel->common.type == MwLLBackendGDI) {
gdiopengl_t* o = handle->internal;
void (*swap_interval_ext)(int) = NULL;
BOOL (APIENTRY *swap_interval_ext)(int) = NULL;
o->wglMakeCurrent(o->dc, o->gl);

View file

@ -20,7 +20,7 @@
@end
static int create(MwWidget handle) {
static int wcreate(MwWidget handle) {
void* r = NULL;
MwWidget w = handle;
@ -128,4 +128,4 @@ MwClassRec MwOpenGLClassRec = {create, /* create */
NULL, /* children_prop_change */
NULL, /* clipboard */
NULL, NULL, NULL, NULL};
MwClass MwOpenGLClass = &MwOpenGLClassRec;
MwClass MwOpenGLClass = &MwOpenGLClassRec;

View file

@ -1,6 +1,6 @@
#include <Mw/Milsko.h>
static int create(MwWidget handle) {
static int wcreate(MwWidget handle) {
MwSetDefault(handle);
MwVaApply(handle,
MwNminValue, 0,
@ -46,7 +46,7 @@ static void prop_change(MwWidget handle, const char* key) {
}
MwClassRec MwProgressBarClassRec = {
create, /* create */
wcreate, /* create */
NULL, /* destroy */
draw, /* draw */
NULL, /* click */

View file

@ -2,7 +2,7 @@
#include "../../external/stb_ds.h"
static int create(MwWidget handle) {
static int wcreate(MwWidget handle) {
MwSetDefault(handle);
MwSetInteger(handle, MwNchecked, 0);
@ -47,7 +47,7 @@ static void prop_change(MwWidget handle, const char* key) {
}
MwClassRec MwRadioBoxClassRec = {
create, /* create */
wcreate, /* create */
NULL, /* destroy */
draw, /* draw */
click, /* click */

View file

@ -1,6 +1,6 @@
#include <Mw/Milsko.h>
static int create(MwWidget handle) {
static int wcreate(MwWidget handle) {
MwScrollBar scr = malloc(sizeof(*scr));
handle->internal = scr;
@ -58,9 +58,9 @@ static void draw(MwWidget handle) {
MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground));
MwLLColor dark = MwLightenColor(handle, base, -64, -64, -64);
MwScrollBar scr = handle->internal;
int or ;
int uy, dy, ux, dx;
MwLLPixmap bgpx = MwGetVoid(handle, MwNbackgroundPixmap);
int or;
int uy, dy, ux, dx;
MwLLPixmap bgpx = MwGetVoid(handle, MwNbackgroundPixmap);
r.x = 0;
r.y = 0;
@ -257,7 +257,7 @@ static void func_handler(MwWidget handle, const char* name, void* out, va_list v
}
MwClassRec MwScrollBarClassRec = {
create, /* create */
wcreate, /* create */
destroy, /* destroy */
draw, /* draw */
NULL, /* click */

View file

@ -1,6 +1,6 @@
#include <Mw/Milsko.h>
static int create(MwWidget handle) {
static int wcreate(MwWidget handle) {
MwSetDefault(handle);
MwSetInteger(handle, MwNorientation, MwHORIZONTAL);
@ -35,7 +35,7 @@ static void prop_change(MwWidget handle, const char* key) {
}
MwClassRec MwSeparatorClassRec = {
create, /* create */
wcreate, /* create */
NULL, /* destroy */
draw, /* draw */
NULL, /* click */

View file

@ -2,7 +2,7 @@
#include "../../external/stb_ds.h"
static int create(MwWidget handle) {
static int wcreate(MwWidget handle) {
MwLLBeginStateChange(handle->lowlevel);
MwSetDefault(handle);
@ -241,7 +241,7 @@ static void func_handler(MwWidget handle, const char* name, void* out, va_list v
}
MwClassRec MwSubMenuClassRec = {
create, /* create */
wcreate, /* create */
destroy, /* destroy */
draw, /* draw */
click, /* click */

View file

@ -297,7 +297,7 @@ static void resize(MwWidget handle) {
NULL);
}
static int create(MwWidget handle) {
static int wcreate(MwWidget handle) {
MwTreeView tv = malloc(sizeof(*tv));
memset(tv, 0, sizeof(*tv));
@ -481,7 +481,7 @@ static void tick(MwWidget handle) {
}
MwClassRec MwTreeViewClassRec = {
create, /* create */
wcreate, /* create */
destroy, /* destroy */
draw, /* draw */
NULL, /* click */

View file

@ -74,7 +74,7 @@ static void resize(MwWidget handle) {
NULL);
}
static int create(MwWidget handle) {
static int wcreate(MwWidget handle) {
MwViewport vp = malloc(sizeof(*vp));
memset(vp, 0, sizeof(*vp));
@ -176,7 +176,7 @@ static void tick(MwWidget handle) {
}
MwClassRec MwViewportClassRec = {
create, /* create */
wcreate, /* create */
destroy, /* destroy */
draw, /* draw */
NULL, /* click */

View file

@ -116,7 +116,7 @@ static int vulkan_instance_setup(MwWidget handle, vulkan_t* o);
static int vulkan_surface_setup(MwWidget handle, vulkan_t* o);
static int vulkan_devices_setup(MwWidget handle, vulkan_t* o);
static int create(MwWidget handle) {
static int wcreate(MwWidget handle) {
vulkan_t* o = malloc(sizeof(*o));
int err;
@ -556,7 +556,7 @@ static void func_handler(MwWidget handle, const char* name, void* out, va_list v
}
MwClassRec MwVulkanClassRec = {
create, /* create */
wcreate, /* create */
destroy, /* destroy */
NULL, /* draw */
NULL, /* click */

View file

@ -1,6 +1,6 @@
#include <Mw/Milsko.h>
static int create(MwWidget handle) {
static int wcreate(MwWidget handle) {
MwSetDefault(handle);
MwSetInteger(handle, MwNhasBorder, 0);
@ -44,7 +44,7 @@ static void func_handler(MwWidget handle, const char* name, void* out, va_list v
}
}
MwClassRec MwWindowClassRec = {
create, /* create */
wcreate, /* create */
NULL, /* destroy */
draw, /* draw */
NULL, /* click */