generate pkgconfig file (don't commit yet i fucked it up)
Some checks failed
pyrite-dev/milsko/pipeline/head There was a failure building this commit
Some checks failed
pyrite-dev/milsko/pipeline/head There was a failure building this commit
This commit is contained in:
parent
4b6eae99dc
commit
c705d2b98c
375 changed files with 203503 additions and 203476 deletions
|
|
@ -1,74 +1,74 @@
|
|||
#include <Mw/Milsko.h>
|
||||
|
||||
MwWidget window, box;
|
||||
|
||||
void MWAPI 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, box4;
|
||||
|
||||
MwLibraryInit();
|
||||
|
||||
window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 600, 200,
|
||||
MwNtitle, "box",
|
||||
NULL);
|
||||
|
||||
box = MwVaCreateWidget(MwBoxClass, "box", window, 0, 0, 0, 0,
|
||||
MwNpadding, 10,
|
||||
MwNmargin, 10,
|
||||
NULL);
|
||||
|
||||
box2 = MwVaCreateWidget(MwBoxClass, "box2", box, 0, 0, 0, 0,
|
||||
MwNmargin, 10,
|
||||
MwNorientation, MwVERTICAL,
|
||||
NULL);
|
||||
|
||||
box3 = MwVaCreateWidget(MwBoxClass, "box3", box, 0, 0, 0, 0,
|
||||
MwNmargin, 10,
|
||||
MwNorientation, MwVERTICAL,
|
||||
NULL);
|
||||
|
||||
box4 = MwVaCreateWidget(MwBoxClass, "box4", box, 0, 0, 0, 0,
|
||||
MwNmargin, 10,
|
||||
MwNorientation, MwVERTICAL,
|
||||
MwNfixedSize, 40,
|
||||
NULL);
|
||||
|
||||
MwVaCreateWidget(MwButtonClass, "btn1", box2, 0, 0, 0, 0,
|
||||
MwNbackground, "#a00",
|
||||
NULL);
|
||||
|
||||
MwVaCreateWidget(MwButtonClass, "btn2", box2, 0, 0, 0, 0,
|
||||
MwNbackground, "#0a0",
|
||||
MwNratio, 2,
|
||||
NULL);
|
||||
|
||||
MwVaCreateWidget(MwButtonClass, "btn3", box2, 0, 0, 0, 0,
|
||||
MwNbackground, "#00a",
|
||||
NULL);
|
||||
|
||||
MwVaCreateWidget(MwButtonClass, "btn4", box3, 0, 0, 0, 0,
|
||||
MwNbackground, "#a0a",
|
||||
NULL);
|
||||
|
||||
MwVaCreateWidget(MwButtonClass, "btn5", box4, 0, 0, 0, 0,
|
||||
MwNbackground, "#0aa",
|
||||
NULL);
|
||||
|
||||
MwAddUserHandler(window, MwNresizeHandler, resize, NULL);
|
||||
|
||||
resize(window, NULL, NULL);
|
||||
|
||||
MwLoop(window);
|
||||
}
|
||||
#include <Mw/Milsko.h>
|
||||
|
||||
MwWidget window, box;
|
||||
|
||||
void MWAPI 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, box4;
|
||||
|
||||
MwLibraryInit();
|
||||
|
||||
window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 600, 200,
|
||||
MwNtitle, "box",
|
||||
NULL);
|
||||
|
||||
box = MwVaCreateWidget(MwBoxClass, "box", window, 0, 0, 0, 0,
|
||||
MwNpadding, 10,
|
||||
MwNmargin, 10,
|
||||
NULL);
|
||||
|
||||
box2 = MwVaCreateWidget(MwBoxClass, "box2", box, 0, 0, 0, 0,
|
||||
MwNmargin, 10,
|
||||
MwNorientation, MwVERTICAL,
|
||||
NULL);
|
||||
|
||||
box3 = MwVaCreateWidget(MwBoxClass, "box3", box, 0, 0, 0, 0,
|
||||
MwNmargin, 10,
|
||||
MwNorientation, MwVERTICAL,
|
||||
NULL);
|
||||
|
||||
box4 = MwVaCreateWidget(MwBoxClass, "box4", box, 0, 0, 0, 0,
|
||||
MwNmargin, 10,
|
||||
MwNorientation, MwVERTICAL,
|
||||
MwNfixedSize, 40,
|
||||
NULL);
|
||||
|
||||
MwVaCreateWidget(MwButtonClass, "btn1", box2, 0, 0, 0, 0,
|
||||
MwNbackground, "#a00",
|
||||
NULL);
|
||||
|
||||
MwVaCreateWidget(MwButtonClass, "btn2", box2, 0, 0, 0, 0,
|
||||
MwNbackground, "#0a0",
|
||||
MwNratio, 2,
|
||||
NULL);
|
||||
|
||||
MwVaCreateWidget(MwButtonClass, "btn3", box2, 0, 0, 0, 0,
|
||||
MwNbackground, "#00a",
|
||||
NULL);
|
||||
|
||||
MwVaCreateWidget(MwButtonClass, "btn4", box3, 0, 0, 0, 0,
|
||||
MwNbackground, "#a0a",
|
||||
NULL);
|
||||
|
||||
MwVaCreateWidget(MwButtonClass, "btn5", box4, 0, 0, 0, 0,
|
||||
MwNbackground, "#0aa",
|
||||
NULL);
|
||||
|
||||
MwAddUserHandler(window, MwNresizeHandler, resize, NULL);
|
||||
|
||||
resize(window, NULL, NULL);
|
||||
|
||||
MwLoop(window);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue