Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "NOTIFICATION_MODULE_DEFAULT_OPTION_KEEP_UNTIL_SHOWN" #6

Merged
merged 5 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/push_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/wiiu-env/devkitppc:20230621
FROM ghcr.io/wiiu-env/devkitppc:20240423

WORKDIR tmp_build
COPY . .
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.buildlocal
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM ghcr.io/wiiu-env/devkitppc:20230621
FROM ghcr.io/wiiu-env/devkitppc:20240423

WORKDIR project
1 change: 1 addition & 0 deletions include/notifications/notification_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@ typedef enum NotificationModuleNotificationOption {
NOTIFICATION_MODULE_DEFAULT_OPTION_DURATION_BEFORE_FADE_OUT, /* Time in seconds before the Notification will fade out: Type: float. Example: 2.5f = 2.5 seconds*/
NOTIFICATION_MODULE_DEFAULT_OPTION_FINISH_FUNCTION, /* Function that will be called when the Notification starts to fade out. Type: NotificationModuleNotificationFinishedCallback*/
NOTIFICATION_MODULE_DEFAULT_OPTION_FINISH_FUNCTION_CONTEXT, /* Context that will be passed to the NOTIFICATION_MODULE_DEFAULT_TYPE_FINISH_FUNCTION callback. Type: void* */
NOTIFICATION_MODULE_DEFAULT_OPTION_KEEP_UNTIL_SHOWN, /* Keeps the notification in memory until it was actually shown */
} NotificationModuleNotificationOption;
12 changes: 9 additions & 3 deletions include/notifications/notifications.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ NotificationModuleStatus NotificationModule_SetDefaultValue(NotificationModuleNo
* @param backgroundColor Background color of the Notification
* @param callback Function that will be called then the Notification fades out.
* @param callbackContext Context that will be passed to the callback.
* @param keepUntilShown The Notification will be stored in a queue until can be shown - even accross application starts
* @return NOTIFICATION_MODULE_RESULT_SUCCESS: The default value has been set.<br>
* NOTIFICATION_MODULE_RESULT_INVALID_ARGUMENT: text was NULL.<br>
* NOTIFICATION_MODULE_RESULT_UNSUPPORTED_COMMAND: The loaded module version doesn't not support this function.<br>
Expand All @@ -106,7 +107,8 @@ NotificationModuleStatus NotificationModule_AddInfoNotificationEx(const char *te
NMColor textColor,
NMColor backgroundColor,
NotificationModuleNotificationFinishedCallback callback,
void *callbackContext);
void *callbackContext,
bool keepUntilShown);

/**
* Displays a Notification that fade outs after a given time. <br>
Expand Down Expand Up @@ -161,6 +163,7 @@ NotificationModuleStatus NotificationModule_AddInfoNotificationWithCallback(cons
* @param backgroundColor Background color of the Notification
* @param callback Function that will be called then the Notification fades out.
* @param callbackContext Context that will be passed to the callback.
* @param keepUntilShown The Notification will be stored in a queue until can be shown - even accross application starts
* @return NOTIFICATION_MODULE_RESULT_SUCCESS: The default value has been set.<br>
* NOTIFICATION_MODULE_RESULT_INVALID_ARGUMENT: text was NULL.<br>
* NOTIFICATION_MODULE_RESULT_UNSUPPORTED_COMMAND: The loaded module version doesn't not support this function.<br>
Expand All @@ -174,7 +177,8 @@ NotificationModuleStatus NotificationModule_AddErrorNotificationEx(const char *t
NMColor textColor,
NMColor backgroundColor,
NotificationModuleNotificationFinishedCallback callback,
void *callbackContext);
void *callbackContext,
bool keepUntilShown);

/**
* Displays a (error) Notification (default background color: red) that shakes and fade outs after a given time. <br>
Expand Down Expand Up @@ -227,6 +231,7 @@ NotificationModuleStatus NotificationModule_AddErrorNotificationWithCallback(con
* @param backgroundColor Background color of the notification
* @param callback Function that will be called then the Notification fades out.
* @param callbackContext Context that will be passed to the callback.
* @param keepUntilShown The Notification will be stored in a queue until can be shown - even accross application starts
* @return NOTIFICATION_MODULE_RESULT_SUCCESS: The default value has been set.<br>
* NOTIFICATION_MODULE_RESULT_INVALID_ARGUMENT: text or outHandle was NULL <br>
* NOTIFICATION_MODULE_RESULT_UNSUPPORTED_COMMAND: The loaded module version doesn't not support this function.<br>
Expand All @@ -239,7 +244,8 @@ NotificationModuleStatus NotificationModule_AddDynamicNotificationEx(const char
NMColor textColor,
NMColor backgroundColor,
NotificationModuleNotificationFinishedCallback callback,
void *callbackContext);
void *callbackContext,
bool keepUntilShown);

/**
* Displays a Notification that can be updated and stays on the screen until `NotificationModule_FinishDynamicNotification*` has been called. <br>
Expand Down
1 change: 1 addition & 0 deletions source/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ struct NMDefaultValueStore {
NMColor textColor = {255, 255, 255, 255};
void (*finishFunc)(NotificationModuleHandle, void *context) = nullptr;
void *finishFuncContext = nullptr;
bool keepUntilShown = false;
};
Loading
Loading