git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@703 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
Nishi 2025-11-14 10:48:08 +00:00
commit 1792b95516
25 changed files with 17743 additions and 17752 deletions

View file

@ -92,7 +92,6 @@ MWDECL MwU32 MwIconUp[];
*/
MWDECL MwU32 MwIconWarning[];
#ifdef __cplusplus
}
#endif

View file

@ -354,13 +354,16 @@ MwWidget MwColorPicker(MwWidget handle, const char* title) {
color_picker_t* wheel;
MwWidget window;
MwSizeHints sh;
int ww = MwGetInteger(handle, MwNwidth);
int wh = MwGetInteger(handle, MwNheight);
p.x = p.y = 0;
p.x = (ww - WIN_SIZE) / 2;
p.y = (wh - WIN_SIZE) / 2;
sh.min_width = sh.max_width = WIN_SIZE;
sh.min_height = sh.max_height = WIN_SIZE;
window = MwVaCreateWidget(MwWindowClass, "main", handle, MwDEFAULT, MwDEFAULT,
window = MwVaCreateWidget(MwWindowClass, "main", handle, 0, 0,
WIN_SIZE, WIN_SIZE,
MwNtitle, title,
MwNsizeHints, &sh,
@ -372,8 +375,10 @@ MwWidget MwColorPicker(MwWidget handle, const char* title) {
MwAddUserHandler(window, MwNtickHandler, color_picker_tick, wheel);
MwAddTickList(window);
MwLLShow(window->lowlevel, 0);
MwLLDetach(window->lowlevel, &p);
MwLLMakePopup(window->lowlevel, handle->lowlevel);
MwLLShow(window->lowlevel, 1);
return window;
}

View file

@ -468,15 +468,15 @@ MwWidget MwFileChooser(MwWidget handle, const char* title) {
memset(fc, 0, sizeof(*fc));
p.x = 0;
p.y = 0;
w = 700;
h = w * 2 / 3;
window = MwVaCreateWidget(MwWindowClass, "filechooser", handle, ww, wh, w, h,
window = MwVaCreateWidget(MwWindowClass, "filechooser", handle, 0, 0, w, h,
MwNtitle, title,
NULL);
p.x = (ww - w) / 2;
p.y = (wh - h) / 2;
fc->history_seek = 0;
fc->dir = MwLoadIcon(window, MwIconDirectory);
@ -501,8 +501,10 @@ MwWidget MwFileChooser(MwWidget handle, const char* title) {
scan(window, path, 1);
free(path);
MwLLShow(handle->lowlevel, 0);
MwLLDetach(window->lowlevel, &p);
MwLLMakePopup(window->lowlevel, handle->lowlevel);
MwLLShow(handle->lowlevel, 1);
return window;
}

View file

@ -100,9 +100,9 @@ MwWidget MwMessageBox(MwWidget handle, const char* text, const char* title, unsi
NULL);
MwLLShow(window->lowlevel, 0);
MwLLDetach(window->lowlevel, &p);
MwLLSetSizeHints(window->lowlevel, w, h, w, h);
MwLLMakePopup(window->lowlevel, handle->lowlevel);
MwLLDetach(window->lowlevel, &p);
MwLLShow(window->lowlevel, 1);
MwAddUserHandler(window, MwNcloseHandler, messagebox_close, NULL);

3
src/icon/back.c generated
View file

@ -443,5 +443,4 @@ MwU32 MwIconBack[] = {
0xCCFFFF00,
0xCCFFFF00,
0xCCFFFF00,
0
};
0};

3
src/icon/clock.c generated
View file

@ -2307,5 +2307,4 @@ MwU32 MwIconClock[] = {
0x00000000,
0x00000000,
0x00000000,
0
};
0};

3
src/icon/computer.c generated
View file

@ -259,5 +259,4 @@ MwU32 MwIconComputer[] = {
0x00000000,
0x00000000,
0x00000000,
0
};
0};

3
src/icon/directory.c generated
View file

@ -259,5 +259,4 @@ MwU32 MwIconDirectory[] = {
0x2B251DFF,
0xC0C0C000,
0xC0C0C000,
0
};
0};

3
src/icon/down.c generated
View file

@ -443,5 +443,4 @@ MwU32 MwIconDown[] = {
0xCCFFFF00,
0xCCFFFF00,
0xCCFFFF00,
0
};
0};

3
src/icon/error.c generated
View file

@ -2307,5 +2307,4 @@ MwU32 MwIconError[] = {
0x00000000,
0x00000000,
0x00000000,
0
};
0};

3
src/icon/file.c generated
View file

@ -259,5 +259,4 @@ MwU32 MwIconFile[] = {
0xC0C0C000,
0xC0C0C000,
0xC0C0C000,
0
};
0};

3
src/icon/forward.c generated
View file

@ -443,5 +443,4 @@ MwU32 MwIconForward[] = {
0xCCFFFF00,
0xCCFFFF00,
0xCCFFFF00,
0
};
0};

3
src/icon/info.c generated
View file

@ -2307,5 +2307,4 @@ MwU32 MwIconInfo[] = {
0x00000000,
0x00000000,
0x00000000,
0
};
0};

3
src/icon/left.c generated
View file

@ -443,5 +443,4 @@ MwU32 MwIconLeft[] = {
0xCCFFFF00,
0xCCFFFF00,
0xCCFFFF00,
0
};
0};

3
src/icon/news.c generated
View file

@ -2307,5 +2307,4 @@ MwU32 MwIconNews[] = {
0x00000000,
0x00000000,
0x00000000,
0
};
0};

3
src/icon/note.c generated
View file

@ -2307,5 +2307,4 @@ MwU32 MwIconNote[] = {
0x00000000,
0x00000000,
0x00000000,
0
};
0};

3
src/icon/right.c generated
View file

@ -443,5 +443,4 @@ MwU32 MwIconRight[] = {
0xCCFFFF00,
0xCCFFFF00,
0xCCFFFF00,
0
};
0};

3
src/icon/search.c generated
View file

@ -443,5 +443,4 @@ MwU32 MwIconSearch[] = {
0x000000FF,
0xCCFFFF00,
0xCCFFFF00,
0
};
0};

3
src/icon/up.c generated
View file

@ -443,5 +443,4 @@ MwU32 MwIconUp[] = {
0xCCFFFF00,
0xCCFFFF00,
0xCCFFFF00,
0
};
0};

3
src/icon/warning.c generated
View file

@ -2307,5 +2307,4 @@ MwU32 MwIconWarning[] = {
0x00000000,
0x00000000,
0x00000000,
0
};
0};

View file

@ -90,7 +90,8 @@ static int create(MwWidget handle) {
attribs[3] = 24;
attribs[4] = None;
while(glpath[glincr] != NULL && (o->lib = MwDynamicOpen(glpath[glincr++])) == NULL);
while(glpath[glincr] != NULL && (o->lib = MwDynamicOpen(glpath[glincr++])) == NULL)
;
o->glXChooseVisual = (MWglXChooseVisual)MwDynamicSymbol(o->lib, "glXChooseVisual");
o->glXCreateContext = (MWglXCreateContext)MwDynamicSymbol(o->lib, "glXCreateContext");