Fix declarations

This commit is contained in:
Maschell 2024-04-26 13:47:55 +02:00
parent a8d4290981
commit 38e02d706a

View File

@ -16,14 +16,15 @@ static NotificationModuleStatus (*sNMAddStaticNotification)(const char *,
float, float,
NMColor, NMColor,
NMColor, NMColor,
void (*)(void *context), void (*)(NotificationModuleHandle, void *),
void *) = nullptr; void *) = nullptr;
static NotificationModuleStatus (*sNMAddDynamicNotification)(const char *, static NotificationModuleStatus (*sNMAddDynamicNotification)(const char *,
NMColor, NMColor,
NMColor, NMColor,
void (*)(void *context), void (*)(NotificationModuleHandle, void *),
void *) = nullptr; void *,
NotificationModuleHandle *) = nullptr;
static NotificationModuleStatus (*sNMUpdateDynamicNotificationText)(NotificationModuleHandle, static NotificationModuleStatus (*sNMUpdateDynamicNotificationText)(NotificationModuleHandle,
const char *) = nullptr; const char *) = nullptr;
@ -180,13 +181,6 @@ NotificationModuleStatus NotificationModule_IsOverlayReady(bool *outIsReady) {
return reinterpret_cast<decltype(&NotificationModule_IsOverlayReady)>(sNMIsOverlayReady)(outIsReady); return reinterpret_cast<decltype(&NotificationModule_IsOverlayReady)>(sNMIsOverlayReady)(outIsReady);
} }
NotificationModuleStatus NotificationModule_AddDynamicNotificationExDeclare(const char *text,
NMColor textColor,
NMColor backgroundColor,
NotificationModuleNotificationFinishedCallback callback,
void *callbackContext,
NotificationModuleHandle *outHandle);
NotificationModuleStatus NotificationModule_AddDynamicNotificationEx(const char *text, NotificationModuleStatus NotificationModule_AddDynamicNotificationEx(const char *text,
NotificationModuleHandle *outHandle, NotificationModuleHandle *outHandle,
NMColor textColor, NMColor textColor,
@ -204,7 +198,7 @@ NotificationModuleStatus NotificationModule_AddDynamicNotificationEx(const char
return NOTIFICATION_MODULE_RESULT_INVALID_ARGUMENT; return NOTIFICATION_MODULE_RESULT_INVALID_ARGUMENT;
} }
return reinterpret_cast<decltype(&NotificationModule_AddDynamicNotificationExDeclare)>(sNMAddDynamicNotification)(text, return reinterpret_cast<decltype(sNMAddDynamicNotification)>(sNMAddDynamicNotification)(text,
textColor, textColor,
backgroundColor, backgroundColor,
finishFunc, finishFunc,
@ -254,7 +248,7 @@ static NotificationModuleStatus NotificationModule_AddStaticNotification(const c
return NOTIFICATION_MODULE_RESULT_INVALID_ARGUMENT; return NOTIFICATION_MODULE_RESULT_INVALID_ARGUMENT;
} }
return reinterpret_cast<decltype(&NotificationModule_AddStaticNotification)>(sNMAddStaticNotification)(text, return reinterpret_cast<decltype(sNMAddStaticNotification)>(sNMAddStaticNotification)(text,
type, type,
durationBeforeFadeOutInSeconds, durationBeforeFadeOutInSeconds,
shakeDurationInSeconds, shakeDurationInSeconds,