This commit is contained in:
parent
2b15e7e0a3
commit
39dd112f2b
5 changed files with 33 additions and 22 deletions
|
|
@ -22,11 +22,12 @@ static void MWAPI resize_window(MwWidget handle, void* user, void* call) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void MWAPI layout_document(MwWidget handle, void* user, void* call) {
|
static void MWAPI layout_document(MwWidget handle, void* user, void* call) {
|
||||||
int height = *(int*)call;
|
MwRect size = *(MwRect*)call;
|
||||||
|
|
||||||
MwViewportSetSize(viewport, MwGetInteger(document, MwNwidth), height);
|
MwViewportSetSize(viewport, size.width, size.height);
|
||||||
MwVaApply(document,
|
MwVaApply(document,
|
||||||
MwNheight, height,
|
MwNwidth, size.width,
|
||||||
|
MwNheight, size.height,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
28
milsko.xml
28
milsko.xml
|
|
@ -105,15 +105,13 @@
|
||||||
<integer name="waitLayout" />
|
<integer name="waitLayout" />
|
||||||
<integer name="scale" />
|
<integer name="scale" />
|
||||||
<integer name="columns" />
|
<integer name="columns" />
|
||||||
<integer name="commonSpan" common="yes" />
|
<integer name="columnSpan" column="yes" />
|
||||||
<integer name="rowSpan" common="yes" />
|
<integer name="rowSpan" column="yes" />
|
||||||
<integer name="acceptsDnD" common="yes" />
|
<integer name="acceptsDnD" column="yes" />
|
||||||
<integer name="hour" />
|
<integer name="hour" />
|
||||||
<integer name="minute" />
|
<integer name="minute" />
|
||||||
<integer name="second" />
|
<integer name="second" />
|
||||||
<integer name="type" />
|
<integer name="type" />
|
||||||
<integer name="strikethrough" common="yes" />
|
|
||||||
<integer name="underline" common="yes" />
|
|
||||||
|
|
||||||
<!-- waitMS is a special property, only applies to toplevel widget -->
|
<!-- waitMS is a special property, only applies to toplevel widget -->
|
||||||
<integer name="waitMS" common="yes" />
|
<integer name="waitMS" common="yes" />
|
||||||
|
|
@ -206,7 +204,7 @@
|
||||||
<string />
|
<string />
|
||||||
</handler>
|
</handler>
|
||||||
<handler name="layout">
|
<handler name="layout">
|
||||||
<integer pointer="yes" />
|
<struct defname="MwRect" pointer="yes" />
|
||||||
</handler>
|
</handler>
|
||||||
</handlers>
|
</handlers>
|
||||||
<enumerations>
|
<enumerations>
|
||||||
|
|
@ -1072,10 +1070,20 @@
|
||||||
<return>
|
<return>
|
||||||
<pointer />
|
<pointer />
|
||||||
</return>
|
</return>
|
||||||
<arguments>
|
</function>
|
||||||
<integer enumname="MwVulkanField" name="field" />
|
</functions>
|
||||||
<integer pointer="yes" name="output" />
|
</widget>
|
||||||
</arguments>
|
<widget name="Direct3D9">
|
||||||
|
<functions>
|
||||||
|
<function name="GetDirect3D9">
|
||||||
|
<return>
|
||||||
|
<pointer />
|
||||||
|
</return>
|
||||||
|
</function>
|
||||||
|
<function name="GetDirect3DDevice9">
|
||||||
|
<return>
|
||||||
|
<pointer />
|
||||||
|
</return>
|
||||||
</function>
|
</function>
|
||||||
</functions>
|
</functions>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ if (grep(/^wayland$/, @backends)) {
|
||||||
scan_wayland_protocol("unstable", "primary-selection", "-unstable-v1");
|
scan_wayland_protocol("unstable", "primary-selection", "-unstable-v1");
|
||||||
scan_wayland_protocol("unstable", "pointer-constraints", "-unstable-v1");
|
scan_wayland_protocol("unstable", "pointer-constraints", "-unstable-v1");
|
||||||
scan_wayland_protocol("unstable", "relative-pointer", "-unstable-v1");
|
scan_wayland_protocol("unstable", "relative-pointer", "-unstable-v1");
|
||||||
scan_wayland_protocol("staging", "fifo", "-v1");
|
scan_wayland_protocol("staging", "fifo", "-v1");
|
||||||
scan_wayland_protocol_from_file("wlr-layer-shell",
|
scan_wayland_protocol_from_file("wlr-layer-shell",
|
||||||
"wlr-layer-shell-unstable-v1.xml");
|
"wlr-layer-shell-unstable-v1.xml");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -219,8 +219,8 @@ static void MwLLFreeColorImpl(MwLLColor color) {}
|
||||||
|
|
||||||
static MwBool lmao = MwFALSE;
|
static MwBool lmao = MwFALSE;
|
||||||
static int MwLLPendingImpl(MwLL handle) {
|
static int MwLLPendingImpl(MwLL handle) {
|
||||||
lmao = !lmao;
|
lmao = !lmao;
|
||||||
return lmao;
|
return lmao;
|
||||||
}
|
}
|
||||||
static void MwLLNextEventImpl(MwLL handle) {
|
static void MwLLNextEventImpl(MwLL handle) {
|
||||||
MwLLDispatch(handle, draw, NULL);
|
MwLLDispatch(handle, draw, NULL);
|
||||||
|
|
@ -264,10 +264,10 @@ static void MwLLRaiseImpl(MwLL handle) {}
|
||||||
static void MwLLClipImpl(MwLL handle, MwRect* rect) {}
|
static void MwLLClipImpl(MwLL handle, MwRect* rect) {}
|
||||||
static void MwLLSetupDragAndDropImpl(MwLL handle) {}
|
static void MwLLSetupDragAndDropImpl(MwLL handle) {}
|
||||||
static int MwLLCairoCallInitImpl(void) {
|
static int MwLLCairoCallInitImpl(void) {
|
||||||
if(cairo_load_funcs() != 0) {
|
if(cairo_load_funcs() != 0) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#include "call.c"
|
#include "call.c"
|
||||||
CALL(Cairo);
|
CALL(Cairo);
|
||||||
|
|
|
||||||
|
|
@ -498,6 +498,7 @@ static void layout(MwWidget handle) {
|
||||||
MwFLFont* fontstack = NULL;
|
MwFLFont* fontstack = NULL;
|
||||||
MwRect clickable;
|
MwRect clickable;
|
||||||
char* c_title = NULL;
|
char* c_title = NULL;
|
||||||
|
MwRect size;
|
||||||
|
|
||||||
arrput(fontstack, NULL);
|
arrput(fontstack, NULL);
|
||||||
|
|
||||||
|
|
@ -612,8 +613,9 @@ static void layout(MwWidget handle) {
|
||||||
l->font = TOPFONT;
|
l->font = TOPFONT;
|
||||||
}
|
}
|
||||||
|
|
||||||
y += MwTextHeight(handle, TOPFONT, "M");
|
size.width = w;
|
||||||
MwDispatchUserHandler(handle, MwNlayoutHandler, &y);
|
size.height = y + MwTextHeight(handle, TOPFONT, "M");
|
||||||
|
MwDispatchUserHandler(handle, MwNlayoutHandler, &size);
|
||||||
|
|
||||||
arrfree(fontstack);
|
arrfree(fontstack);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue