add MwLibraryInit

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@680 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-11-13 01:30:10 +00:00
parent a5db4f8eac
commit b0ea597d62
27 changed files with 263 additions and 350 deletions

View File

@@ -47,6 +47,8 @@ static void key_pressed(MwWidget handle, void* user, void* client) {
int main() {
MwWidget window;
MwLibraryInit();
window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 500, 500,
MwNtitle, TITLE,
NULL);

View File

@@ -71,6 +71,8 @@ void activate(MwWidget handle, void* user_data, void* call_data) {
}
int main() {
MwLibraryInit();
window = MwVaCreateWidget(MwWindowClass, "main", NULL, 0, 0, 400, 450,
MwNtitle, "hello world",
NULL);

View File

@@ -109,10 +109,14 @@ static void mouse_move(MwWidget handle, void* user, void* call) {
int main() {
MwSizeHints hints;
MwWidget window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 640, 480,
MwWidget window, viewport;
MwLibraryInit();
window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 640, 480,
MwNtitle, "tripaint",
NULL);
MwWidget viewport = MwCreateWidget(MwViewportClass, "viewport", window, 5, 5, 630, 470 - 16 - 5);
viewport = MwCreateWidget(MwViewportClass, "viewport", window, 5, 5, 630, 470 - 16 - 5);
hints.min_width = hints.max_width = 640;
hints.min_height = hints.max_height = 480;