mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-07 09:59:45 +00:00
fix some stuff
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@654 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -73,7 +73,7 @@ MwInline void MwListBoxInsert(MwWidget handle, int index, void* packet) {
|
|||||||
*/
|
*/
|
||||||
MwInline void MwListBoxDelete(MwWidget handle, int index) {
|
MwInline void MwListBoxDelete(MwWidget handle, int index) {
|
||||||
MwVaWidgetExecute(handle, "mwListboxDelete", NULL, index);
|
MwVaWidgetExecute(handle, "mwListboxDelete", NULL, index);
|
||||||
};
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Gets item from the listbox
|
* @brief Gets item from the listbox
|
||||||
@@ -85,7 +85,7 @@ MwInline const char* MwListBoxGet(MwWidget handle, int index) {
|
|||||||
const char* out;
|
const char* out;
|
||||||
MwVaWidgetExecute(handle, "mwListBoxGet", (void*)&out, index);
|
MwVaWidgetExecute(handle, "mwListBoxGet", (void*)&out, index);
|
||||||
return out;
|
return out;
|
||||||
};
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Sets an item width of the listbox
|
* @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) {
|
MwInline void MwListBoxSetWidth(MwWidget handle, int index, int width) {
|
||||||
MwVaWidgetExecute(handle, "mwListBoxSetWidth", NULL, index, width);
|
MwVaWidgetExecute(handle, "mwListBoxSetWidth", NULL, index, width);
|
||||||
};
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Resets the listbox
|
* @brief Resets the listbox
|
||||||
@@ -103,7 +103,7 @@ MwInline void MwListBoxSetWidth(MwWidget handle, int index, int width) {
|
|||||||
*/
|
*/
|
||||||
MwInline void MwListBoxReset(MwWidget handle) {
|
MwInline void MwListBoxReset(MwWidget handle) {
|
||||||
MwVaWidgetExecute(handle, "mwListBoxReset", NULL);
|
MwVaWidgetExecute(handle, "mwListBoxReset", NULL);
|
||||||
};
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ MwInline MwMenu MwMenuAdd(MwWidget handle, MwMenu menu, const char* name) {
|
|||||||
MwMenu out;
|
MwMenu out;
|
||||||
MwVaWidgetExecute(handle, "mwMenuAdd", &out, menu, name);
|
MwVaWidgetExecute(handle, "mwMenuAdd", &out, menu, name);
|
||||||
return out;
|
return out;
|
||||||
};
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ MWDECL MwClass MwOpenGLClass;
|
|||||||
*/
|
*/
|
||||||
MwInline void MwOpenGLMakeCurrent(MwWidget handle) {
|
MwInline void MwOpenGLMakeCurrent(MwWidget handle) {
|
||||||
MwVaWidgetExecute(handle, "mwOpenGLMakeCurrent", NULL);
|
MwVaWidgetExecute(handle, "mwOpenGLMakeCurrent", NULL);
|
||||||
};
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Get a procedure from OpenGL
|
* @brief Get a procedure from OpenGL
|
||||||
@@ -48,7 +48,7 @@ MwInline void* MwOpenGLGetProcAddress(MwWidget handle, const char* name) {
|
|||||||
void* out;
|
void* out;
|
||||||
MwVaWidgetExecute(handle, "mwOpenGLGetProcAddress", &out, name);
|
MwVaWidgetExecute(handle, "mwOpenGLGetProcAddress", &out, name);
|
||||||
return out;
|
return out;
|
||||||
};
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Swaps the buffer of OpenGL context
|
* @brief Swaps the buffer of OpenGL context
|
||||||
@@ -56,7 +56,7 @@ MwInline void* MwOpenGLGetProcAddress(MwWidget handle, const char* name) {
|
|||||||
*/
|
*/
|
||||||
MwInline void MwOpenGLSwapBuffer(MwWidget handle) {
|
MwInline void MwOpenGLSwapBuffer(MwWidget handle) {
|
||||||
MwVaWidgetExecute(handle, "mwOpenGLSwapBuffer", NULL);
|
MwVaWidgetExecute(handle, "mwOpenGLSwapBuffer", NULL);
|
||||||
};
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ MwInline int MwScrollBarGetVisibleLength(MwWidget handle) {
|
|||||||
int out;
|
int out;
|
||||||
MwVaWidgetExecute(handle, "mwScrollBarGetVisibleLength", &out, NULL);
|
MwVaWidgetExecute(handle, "mwScrollBarGetVisibleLength", &out, NULL);
|
||||||
return out;
|
return out;
|
||||||
};
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ MWDECL MwClass MwSubMenuClass;
|
|||||||
|
|
||||||
MwInline void MwSubMenuAppear(MwWidget handle, MwMenu menu, MwPoint* point) {
|
MwInline void MwSubMenuAppear(MwWidget handle, MwMenu menu, MwPoint* point) {
|
||||||
MwVaWidgetExecute(handle, "mwSubMenuAppear", NULL, menu, point);
|
MwVaWidgetExecute(handle, "mwSubMenuAppear", NULL, menu, point);
|
||||||
};
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ MwInline MwWidget MwViewportGetViewport(MwWidget handle) {
|
|||||||
MwWidget out;
|
MwWidget out;
|
||||||
MwVaWidgetExecute(handle, "mwViewportGetViewport", &out);
|
MwVaWidgetExecute(handle, "mwViewportGetViewport", &out);
|
||||||
return out;
|
return out;
|
||||||
};
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Set viewport size
|
* @brief Set viewport size
|
||||||
@@ -38,7 +38,7 @@ MwInline MwWidget MwViewportGetViewport(MwWidget handle) {
|
|||||||
*/
|
*/
|
||||||
MwInline void MwViewportSetSize(MwWidget handle, int w, int h) {
|
MwInline void MwViewportSetSize(MwWidget handle, int w, int h) {
|
||||||
MwVaWidgetExecute(handle, "mwViewportSetSize", NULL, w, h);
|
MwVaWidgetExecute(handle, "mwViewportSetSize", NULL, w, h);
|
||||||
};
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ MwInline void* MwVulkanGetField(MwWidget handle, MwVulkanField field, MwErrorEnu
|
|||||||
void* field_out;
|
void* field_out;
|
||||||
MwVaWidgetExecute(handle, "mwVulkanGetField", &field_out, field, out);
|
MwVaWidgetExecute(handle, "mwVulkanGetField", &field_out, field, out);
|
||||||
return field_out;
|
return field_out;
|
||||||
};
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Return whether Vulkan is installed on the target platform.
|
* @brief Return whether Vulkan is installed on the target platform.
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ MWDECL MwClass MwWindowClass;
|
|||||||
*/
|
*/
|
||||||
MwInline void MwWindowMakeBorderless(MwWidget handle, int toggle) {
|
MwInline void MwWindowMakeBorderless(MwWidget handle, int toggle) {
|
||||||
MwVaWidgetExecute(handle, "mwWindowMakeBorderless", NULL, toggle);
|
MwVaWidgetExecute(handle, "mwWindowMakeBorderless", NULL, toggle);
|
||||||
};
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
#include <Mw/Milsko.h>
|
#include <Mw/Milsko.h>
|
||||||
#include <Mw/Widget/OpenGL.h>
|
#include <Mw/Widget/OpenGL.h>
|
||||||
|
|
||||||
typedef void(GLAPIENTRY* MWglColor3f)(GLfloat red, GLfloat green, GLfloat blue);
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
typedef HGLRC(WINAPI* MWwglCreateContext)(HDC);
|
typedef HGLRC(WINAPI* MWwglCreateContext)(HDC);
|
||||||
typedef BOOL(WINAPI* MWwglMakeCurrent)(HDC, HGLRC);
|
typedef BOOL(WINAPI* MWwglMakeCurrent)(HDC, HGLRC);
|
||||||
@@ -19,7 +18,6 @@ typedef struct opengl {
|
|||||||
MWwglMakeCurrent wglMakeCurrent;
|
MWwglMakeCurrent wglMakeCurrent;
|
||||||
MWwglDeleteContext wglDeleteContext;
|
MWwglDeleteContext wglDeleteContext;
|
||||||
MWwglGetProcAddress wglGetProcAddress;
|
MWwglGetProcAddress wglGetProcAddress;
|
||||||
MWglColor3f glColor3f;
|
|
||||||
} opengl_t;
|
} opengl_t;
|
||||||
#else
|
#else
|
||||||
typedef XVisualInfo* (*MWglXChooseVisual)(Display* dpy, int screen, int* attribList);
|
typedef XVisualInfo* (*MWglXChooseVisual)(Display* dpy, int screen, int* attribList);
|
||||||
@@ -41,7 +39,6 @@ typedef struct opengl {
|
|||||||
MWglXMakeCurrent glXMakeCurrent;
|
MWglXMakeCurrent glXMakeCurrent;
|
||||||
MWglXSwapBuffers glXSwapBuffers;
|
MWglXSwapBuffers glXSwapBuffers;
|
||||||
MWglXGetProcAddress glXGetProcAddress;
|
MWglXGetProcAddress glXGetProcAddress;
|
||||||
MWglColor3f glColor3f;
|
|
||||||
} opengl_t;
|
} opengl_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -69,7 +66,6 @@ static int create(MwWidget handle) {
|
|||||||
o->wglMakeCurrent = (MWwglMakeCurrent)(void*)GetProcAddress(o->lib, "wglMakeCurrent");
|
o->wglMakeCurrent = (MWwglMakeCurrent)(void*)GetProcAddress(o->lib, "wglMakeCurrent");
|
||||||
o->wglDeleteContext = (MWwglDeleteContext)(void*)GetProcAddress(o->lib, "wglDeleteContext");
|
o->wglDeleteContext = (MWwglDeleteContext)(void*)GetProcAddress(o->lib, "wglDeleteContext");
|
||||||
o->wglGetProcAddress = (MWwglGetProcAddress)(void*)GetProcAddress(o->lib, "wglGetProcAddress");
|
o->wglGetProcAddress = (MWwglGetProcAddress)(void*)GetProcAddress(o->lib, "wglGetProcAddress");
|
||||||
o->glColor3f = (MWglColor3f)(void*)GetProcAddress(o->lib, "glColor3f");
|
|
||||||
|
|
||||||
o->gl = o->wglCreateContext(o->dc);
|
o->gl = o->wglCreateContext(o->dc);
|
||||||
#else
|
#else
|
||||||
@@ -95,7 +91,6 @@ static int create(MwWidget handle) {
|
|||||||
o->glXMakeCurrent = (MWglXMakeCurrent)dlsym(o->lib, "glXMakeCurrent");
|
o->glXMakeCurrent = (MWglXMakeCurrent)dlsym(o->lib, "glXMakeCurrent");
|
||||||
o->glXSwapBuffers = (MWglXSwapBuffers)dlsym(o->lib, "glXSwapBuffers");
|
o->glXSwapBuffers = (MWglXSwapBuffers)dlsym(o->lib, "glXSwapBuffers");
|
||||||
o->glXGetProcAddress = (MWglXGetProcAddress)dlsym(o->lib, "glXGetProcAddress");
|
o->glXGetProcAddress = (MWglXGetProcAddress)dlsym(o->lib, "glXGetProcAddress");
|
||||||
o->glColor3f = (MWglColor3f)dlsym(o->lib, "glColor3f");
|
|
||||||
|
|
||||||
/* XXX: fix this */
|
/* XXX: fix this */
|
||||||
o->visual = o->glXChooseVisual(handle->lowlevel->display, DefaultScreen(handle->lowlevel->display), attribs);
|
o->visual = o->glXChooseVisual(handle->lowlevel->display, DefaultScreen(handle->lowlevel->display), attribs);
|
||||||
|
|||||||
Reference in New Issue
Block a user