86 lines
2.2 KiB
C
86 lines
2.2 KiB
C
#pragma once
|
|
|
|
void CC_QString_insert(void *ptr, const char *str);
|
|
void *CC_QString_create(const char *str);
|
|
void CC_QString_destroy(void *str);
|
|
|
|
// QUrl
|
|
void CC_QUrl_insert(void *ptr, const char *str);
|
|
void *CC_QUrl_create(const char *str);
|
|
void CC_QUrl_destroy(void *str);
|
|
|
|
// QStringList
|
|
void *CC_QStringList_create();
|
|
void CC_QStringList_destroy(void *lst);
|
|
void CC_QStringList_append(void *lst, void *el);
|
|
|
|
// QUrlList
|
|
void *CC_QUrlList_create(const char *str);
|
|
void CC_QUrlList_destroy(void *lst);
|
|
void CC_QUrlList_append(void *lst, void *el);
|
|
|
|
/*
|
|
// QString
|
|
void (*CC_QString_insert)(void *ptr, const char *str);
|
|
void *(*CC_QString_create)(const char *str);
|
|
void (*CC_QString_destroy)(void *str);
|
|
|
|
// QUrl
|
|
void (*CC_QUrl_insert)(void *ptr, const char *str);
|
|
void *(*CC_QUrl_create)(const char *str);
|
|
void (*CC_QUrl_destroy)(void *str);
|
|
|
|
// QStringList
|
|
void *(*CC_QStringList_create)();
|
|
void (*CC_QStringList_destroy)(void *lst);
|
|
void (*CC_QStringList_append)(void *lst, void *el);
|
|
|
|
// QUrlList
|
|
void *(*CC_QUrlList_create)(const char *str);
|
|
void (*CC_QUrlList_destroy)(void *lst);
|
|
void (*CC_QUrlList_append)(void *lst, void *el);
|
|
|
|
inline void CC_QTLib_load() {
|
|
#ifndef CC_QTLIB_DLL_PATH
|
|
#error "CC_QTLIB_DLL_PATH not defined"
|
|
#else
|
|
|
|
HMODULE hDLL;
|
|
|
|
// hDLL = LoadLibrary("C:\\Qt\\6.9.0\\msvc2022_64\\bin\\Qt6Core.dll");
|
|
// if (!hDLL) {
|
|
// dr_printf("failed to load %s\n", "C:\\Qt\\6.9.0\\msvc2022_64\\bin\\Qt6Core.dll");
|
|
// exit(1);
|
|
// }
|
|
|
|
hDLL = LoadLibrary(CC_QTLIB_DLL_PATH);
|
|
if (!hDLL) {
|
|
dr_printf("failed to load %s\n", CC_QTLIB_DLL_PATH);
|
|
exit(1);
|
|
}
|
|
|
|
#define CC_QTLIB_LOAD(name) name = GetProcAddress(hDLL, #name);
|
|
|
|
CC_QTLIB_LOAD(CC_QString_insert);
|
|
CC_QTLIB_LOAD(CC_QString_create);
|
|
CC_QTLIB_LOAD(CC_QString_destroy);
|
|
|
|
CC_QTLIB_LOAD(CC_QUrl_insert);
|
|
CC_QTLIB_LOAD(CC_QUrl_create);
|
|
CC_QTLIB_LOAD(CC_QUrl_destroy);
|
|
|
|
CC_QTLIB_LOAD(CC_QStringList_create);
|
|
CC_QTLIB_LOAD(CC_QStringList_destroy);
|
|
CC_QTLIB_LOAD(CC_QStringList_append);
|
|
|
|
CC_QTLIB_LOAD(CC_QUrlList_create);
|
|
CC_QTLIB_LOAD(CC_QUrlList_destroy);
|
|
CC_QTLIB_LOAD(CC_QUrlList_append);
|
|
|
|
dr_printf("%s loaded!\n", CC_QTLIB_DLL_PATH);
|
|
|
|
#endif
|
|
|
|
}
|
|
*/
|