From 2f5539048b7438abf8b411c78f1309655b527b82 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Sun, 9 Nov 2025 12:13:46 +0000 Subject: [PATCH] fix some stuff git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@654 b9cfdab3-6d41-4d17-bbe4-086880011989 --- include/Mw/Widget/ListBox.h | 8 ++++---- include/Mw/Widget/Menu.h | 2 +- include/Mw/Widget/OpenGL.h | 6 +++--- include/Mw/Widget/ScrollBar.h | 2 +- include/Mw/Widget/SubMenu.h | 2 +- include/Mw/Widget/Viewport.h | 4 ++-- include/Mw/Widget/Vulkan.h | 2 +- include/Mw/Widget/Window.h | 2 +- src/widget/opengl.c | 5 ----- 9 files changed, 14 insertions(+), 19 deletions(-) diff --git a/include/Mw/Widget/ListBox.h b/include/Mw/Widget/ListBox.h index 1a773bd..66e7398 100644 --- a/include/Mw/Widget/ListBox.h +++ b/include/Mw/Widget/ListBox.h @@ -73,7 +73,7 @@ MwInline void MwListBoxInsert(MwWidget handle, int index, void* packet) { */ MwInline void MwListBoxDelete(MwWidget handle, int index) { MwVaWidgetExecute(handle, "mwListboxDelete", NULL, index); -}; +} /*! * @brief Gets item from the listbox @@ -85,7 +85,7 @@ MwInline const char* MwListBoxGet(MwWidget handle, int index) { const char* out; MwVaWidgetExecute(handle, "mwListBoxGet", (void*)&out, index); return out; -}; +} /*! * @brief Sets an item width of the listbox @@ -95,7 +95,7 @@ MwInline const char* MwListBoxGet(MwWidget handle, int index) { */ MwInline void MwListBoxSetWidth(MwWidget handle, int index, int width) { MwVaWidgetExecute(handle, "mwListBoxSetWidth", NULL, index, width); -}; +} /*! * @brief Resets the listbox @@ -103,7 +103,7 @@ MwInline void MwListBoxSetWidth(MwWidget handle, int index, int width) { */ MwInline void MwListBoxReset(MwWidget handle) { MwVaWidgetExecute(handle, "mwListBoxReset", NULL); -}; +} #ifdef __cplusplus } diff --git a/include/Mw/Widget/Menu.h b/include/Mw/Widget/Menu.h index 8ca4999..15015b3 100644 --- a/include/Mw/Widget/Menu.h +++ b/include/Mw/Widget/Menu.h @@ -30,7 +30,7 @@ MwInline MwMenu MwMenuAdd(MwWidget handle, MwMenu menu, const char* name) { MwMenu out; MwVaWidgetExecute(handle, "mwMenuAdd", &out, menu, name); return out; -}; +} #ifdef __cplusplus } diff --git a/include/Mw/Widget/OpenGL.h b/include/Mw/Widget/OpenGL.h index 28538d2..6ff320a 100644 --- a/include/Mw/Widget/OpenGL.h +++ b/include/Mw/Widget/OpenGL.h @@ -36,7 +36,7 @@ MWDECL MwClass MwOpenGLClass; */ MwInline void MwOpenGLMakeCurrent(MwWidget handle) { MwVaWidgetExecute(handle, "mwOpenGLMakeCurrent", NULL); -}; +} /*! * @brief Get a procedure from OpenGL @@ -48,7 +48,7 @@ MwInline void* MwOpenGLGetProcAddress(MwWidget handle, const char* name) { void* out; MwVaWidgetExecute(handle, "mwOpenGLGetProcAddress", &out, name); return out; -}; +} /*! * @brief Swaps the buffer of OpenGL context @@ -56,7 +56,7 @@ MwInline void* MwOpenGLGetProcAddress(MwWidget handle, const char* name) { */ MwInline void MwOpenGLSwapBuffer(MwWidget handle) { MwVaWidgetExecute(handle, "mwOpenGLSwapBuffer", NULL); -}; +} #ifdef __cplusplus } diff --git a/include/Mw/Widget/ScrollBar.h b/include/Mw/Widget/ScrollBar.h index 9a71b3f..f9b0b98 100644 --- a/include/Mw/Widget/ScrollBar.h +++ b/include/Mw/Widget/ScrollBar.h @@ -28,7 +28,7 @@ MwInline int MwScrollBarGetVisibleLength(MwWidget handle) { int out; MwVaWidgetExecute(handle, "mwScrollBarGetVisibleLength", &out, NULL); return out; -}; +} #ifdef __cplusplus } diff --git a/include/Mw/Widget/SubMenu.h b/include/Mw/Widget/SubMenu.h index 8a28c64..a5328e7 100644 --- a/include/Mw/Widget/SubMenu.h +++ b/include/Mw/Widget/SubMenu.h @@ -21,7 +21,7 @@ MWDECL MwClass MwSubMenuClass; MwInline void MwSubMenuAppear(MwWidget handle, MwMenu menu, MwPoint* point) { MwVaWidgetExecute(handle, "mwSubMenuAppear", NULL, menu, point); -}; +} #ifdef __cplusplus } diff --git a/include/Mw/Widget/Viewport.h b/include/Mw/Widget/Viewport.h index 1c36091..c3bd490 100644 --- a/include/Mw/Widget/Viewport.h +++ b/include/Mw/Widget/Viewport.h @@ -28,7 +28,7 @@ MwInline MwWidget MwViewportGetViewport(MwWidget handle) { MwWidget out; MwVaWidgetExecute(handle, "mwViewportGetViewport", &out); return out; -}; +} /*! * @brief Set viewport size @@ -38,7 +38,7 @@ MwInline MwWidget MwViewportGetViewport(MwWidget handle) { */ MwInline void MwViewportSetSize(MwWidget handle, int w, int h) { MwVaWidgetExecute(handle, "mwViewportSetSize", NULL, w, h); -}; +} #ifdef __cplusplus } diff --git a/include/Mw/Widget/Vulkan.h b/include/Mw/Widget/Vulkan.h index aeec2d9..447312f 100644 --- a/include/Mw/Widget/Vulkan.h +++ b/include/Mw/Widget/Vulkan.h @@ -117,7 +117,7 @@ MwInline void* MwVulkanGetField(MwWidget handle, MwVulkanField field, MwErrorEnu void* field_out; MwVaWidgetExecute(handle, "mwVulkanGetField", &field_out, field, out); return field_out; -}; +} /*! * @brief Return whether Vulkan is installed on the target platform. diff --git a/include/Mw/Widget/Window.h b/include/Mw/Widget/Window.h index fa4f4a0..df8329f 100644 --- a/include/Mw/Widget/Window.h +++ b/include/Mw/Widget/Window.h @@ -26,7 +26,7 @@ MWDECL MwClass MwWindowClass; */ MwInline void MwWindowMakeBorderless(MwWidget handle, int toggle) { MwVaWidgetExecute(handle, "mwWindowMakeBorderless", NULL, toggle); -}; +} #ifdef __cplusplus } diff --git a/src/widget/opengl.c b/src/widget/opengl.c index 7434d33..e251302 100644 --- a/src/widget/opengl.c +++ b/src/widget/opengl.c @@ -2,7 +2,6 @@ #include #include -typedef void(GLAPIENTRY* MWglColor3f)(GLfloat red, GLfloat green, GLfloat blue); #ifdef _WIN32 typedef HGLRC(WINAPI* MWwglCreateContext)(HDC); typedef BOOL(WINAPI* MWwglMakeCurrent)(HDC, HGLRC); @@ -19,7 +18,6 @@ typedef struct opengl { MWwglMakeCurrent wglMakeCurrent; MWwglDeleteContext wglDeleteContext; MWwglGetProcAddress wglGetProcAddress; - MWglColor3f glColor3f; } opengl_t; #else typedef XVisualInfo* (*MWglXChooseVisual)(Display* dpy, int screen, int* attribList); @@ -41,7 +39,6 @@ typedef struct opengl { MWglXMakeCurrent glXMakeCurrent; MWglXSwapBuffers glXSwapBuffers; MWglXGetProcAddress glXGetProcAddress; - MWglColor3f glColor3f; } opengl_t; #endif @@ -69,7 +66,6 @@ static int create(MwWidget handle) { o->wglMakeCurrent = (MWwglMakeCurrent)(void*)GetProcAddress(o->lib, "wglMakeCurrent"); o->wglDeleteContext = (MWwglDeleteContext)(void*)GetProcAddress(o->lib, "wglDeleteContext"); o->wglGetProcAddress = (MWwglGetProcAddress)(void*)GetProcAddress(o->lib, "wglGetProcAddress"); - o->glColor3f = (MWglColor3f)(void*)GetProcAddress(o->lib, "glColor3f"); o->gl = o->wglCreateContext(o->dc); #else @@ -95,7 +91,6 @@ static int create(MwWidget handle) { o->glXMakeCurrent = (MWglXMakeCurrent)dlsym(o->lib, "glXMakeCurrent"); o->glXSwapBuffers = (MWglXSwapBuffers)dlsym(o->lib, "glXSwapBuffers"); o->glXGetProcAddress = (MWglXGetProcAddress)dlsym(o->lib, "glXGetProcAddress"); - o->glColor3f = (MWglColor3f)dlsym(o->lib, "glColor3f"); /* XXX: fix this */ o->visual = o->glXChooseVisual(handle->lowlevel->display, DefaultScreen(handle->lowlevel->display), attribs);