fix some stuff

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@654 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-11-09 12:13:46 +00:00
parent ddd5e30de8
commit 2f5539048b
9 changed files with 14 additions and 19 deletions

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -28,7 +28,7 @@ MwInline int MwScrollBarGetVisibleLength(MwWidget handle) {
int out;
MwVaWidgetExecute(handle, "mwScrollBarGetVisibleLength", &out, NULL);
return out;
};
}
#ifdef __cplusplus
}

View File

@@ -21,7 +21,7 @@ MWDECL MwClass MwSubMenuClass;
MwInline void MwSubMenuAppear(MwWidget handle, MwMenu menu, MwPoint* point) {
MwVaWidgetExecute(handle, "mwSubMenuAppear", NULL, menu, point);
};
}
#ifdef __cplusplus
}

View File

@@ -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
}

View File

@@ -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.

View File

@@ -26,7 +26,7 @@ MWDECL MwClass MwWindowClass;
*/
MwInline void MwWindowMakeBorderless(MwWidget handle, int toggle) {
MwVaWidgetExecute(handle, "mwWindowMakeBorderless", NULL, toggle);
};
}
#ifdef __cplusplus
}

View File

@@ -2,7 +2,6 @@
#include <Mw/Milsko.h>
#include <Mw/Widget/OpenGL.h>
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);