mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-19 15:44:07 +00:00
add MwLibraryInit
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@680 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
26
src/core.c
26
src/core.c
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user