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

@@ -604,3 +604,29 @@ void MwToggleDarkTheme(MwWidget handle, int toggle) {
MwWidget MwGetParent(MwWidget handle) {
return handle->parent;
}
typedef int (*call_t)(void);
int MwLibraryInit(void) {
#ifdef USE_X11
extern call_t MwLLX11CallInit;
#endif
#ifdef USE_GDI
extern call_t MwLLGDICallInit;
#endif
call_t calls[] = {
#ifdef USE_X11
MwLLX11CallInit,
#endif
#ifdef USE_GDI
MwLLGDICallInit,
#endif
NULL};
int i;
for(i = 0; calls[i] != NULL; i++) {
if(calls[i]() == 0) return 0;
}
return 1;
}