Rename enums to better match what Vala expects
This commit is contained in:
parent
363b200272
commit
0153953b5d
|
@ -5,52 +5,52 @@
|
|||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define WINRT_TYPE_WINDOWS_UI_NOTIFICATIONS_TOAST_DISMISSAL_REASON (winrt_windows_ui_notifications_toast_dismissal_reason_get_type ())
|
||||
#define WINRT_TYPE_WINDOWS_UI_NOTIFICATIONS_TOAST_DISMISSAL_REASON (winrtWindowsUINotificationsToastDismissalReason_get_type ())
|
||||
|
||||
/**
|
||||
* winrt_Windows_UI_Notifications_Toast_Dismissal_Reason:
|
||||
* @WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_DISMISSAL_REASON_ACTIVATED: Notification was activated, clicked or through
|
||||
* @WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_DISMISSAL_REASON_Activated: Notification was activated, clicked or through
|
||||
* a button
|
||||
* @WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_DISMISSAL_REASON_APPLICATION_HIDDEN: Application was hidden
|
||||
* @WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_DISMISSAL_REASON_TIMED_OUT: Notification timed out
|
||||
* @WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_DISMISSAL_REASON_ApplicationHidden: Application was hidden
|
||||
* @WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_DISMISSAL_REASON_TimedOut: Notification timed out
|
||||
*
|
||||
* Reasons for a notification dismissal
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_DISMISSAL_REASON_ACTIVATED,
|
||||
WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_DISMISSAL_REASON_APPLICATION_HIDDEN,
|
||||
WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_DISMISSAL_REASON_TIMED_OUT,
|
||||
} winrt_Windows_UI_Notifications_Toast_Dismissal_Reason;
|
||||
WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_DISMISSAL_REASON_Activated,
|
||||
WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_DISMISSAL_REASON_ApplicationHidden,
|
||||
WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_DISMISSAL_REASON_TimedOut,
|
||||
} winrtWindowsUINotificationsToastDismissalReason;
|
||||
|
||||
GType winrt_windows_ui_notifications_toast_dismissal_reason_get_type (void);
|
||||
|
||||
#define WINRT_TYPE_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE (winrt_windows_ui_notifications_toast_template_type_get_type ())
|
||||
|
||||
/**
|
||||
* winrt_Windows_UI_Notifications_Toast_Template_Type:
|
||||
* @WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_TOAST_IMAGE_AND_TEXT01
|
||||
* @WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_TOAST_IMAGE_AND_TEXT02
|
||||
* @WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_TOAST_IMAGE_AND_TEXT03
|
||||
* @WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_TOAST_IMAGE_AND_TEXT04
|
||||
* @WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_TOAST_TEXT01
|
||||
* @WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_TOAST_TEXT02
|
||||
* @WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_TOAST_TEXT03
|
||||
* @WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_TOAST_TEXT04
|
||||
* winrtWindowsUINotificationsToastTemplateType:
|
||||
* @WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_ToastImageAndText01
|
||||
* @WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_ToastImageAndText02
|
||||
* @WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_ToastImageAndText03
|
||||
* @WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_ToastImageAndText04
|
||||
* @WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_ToastText01
|
||||
* @WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_ToastText02
|
||||
* @WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_ToastText03
|
||||
* @WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_ToastText04
|
||||
*
|
||||
* Basic templates for a toast notification.
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_TOAST_IMAGE_AND_TEXT01,
|
||||
WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_TOAST_IMAGE_AND_TEXT02,
|
||||
WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_TOAST_IMAGE_AND_TEXT03,
|
||||
WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_TOAST_IMAGE_AND_TEXT04,
|
||||
WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_TOAST_TEXT01,
|
||||
WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_TOAST_TEXT02,
|
||||
WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_TOAST_TEXT03,
|
||||
WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_TOAST_TEXT04,
|
||||
} winrt_Windows_UI_Notifications_Toast_Template_Type;
|
||||
WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_ToastImageAndText01,
|
||||
WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_ToastImageAndText02,
|
||||
WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_ToastImageAndText03,
|
||||
WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_ToastImageAndText04,
|
||||
WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_ToastText01,
|
||||
WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_ToastText02,
|
||||
WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_ToastText03,
|
||||
WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_ToastText04,
|
||||
} winrtWindowsUINotificationsToastTemplateType;
|
||||
|
||||
GType winrt_windows_ui_notifications_toast_template_type_get_type (void);
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ extern "C"
|
|||
|
||||
typedef void(*NotificationCallbackFailed)(void* userdata);
|
||||
typedef void(*NotificationCallbackActivated)(const gchar* arguments, gchar** userInput, gint count, void* userdata);
|
||||
typedef void(*NotificationCallbackDismissed)(winrt_Windows_UI_Notifications_Toast_Dismissal_Reason reason, void* userdata);
|
||||
typedef void(*NotificationCallbackDismissed)(winrtWindowsUINotificationsToastDismissalReason reason, void* userdata);
|
||||
|
||||
winrtWindowsUINotificationsToastNotification* winrt_windows_ui_notifications_toast_notification_new(const gchar* doc);
|
||||
|
||||
|
|
|
@ -20,17 +20,17 @@ type_name ## _get_type (void) \
|
|||
return g_define_id__volatile; \
|
||||
}
|
||||
|
||||
WINRT_GLIB_DEFINE_ENUM_TYPE (winrt_Windows_UI_Notifications_Toast_Dismissal_Reason, winrt_windows_ui_notifications_toast_dismissal_reason,
|
||||
WINRT_GLIB_DEFINE_ENUM_VALUE (WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_DISMISSAL_REASON_ACTIVATED, "activated")
|
||||
WINRT_GLIB_DEFINE_ENUM_VALUE (WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_DISMISSAL_REASON_APPLICATION_HIDDEN, "application-hidden")
|
||||
WINRT_GLIB_DEFINE_ENUM_VALUE (WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_DISMISSAL_REASON_TIMED_OUT, "timed-out"))
|
||||
WINRT_GLIB_DEFINE_ENUM_TYPE (winrtWindowsUINotificationsToastDismissalReason, winrt_windows_ui_notifications_toast_dismissal_reason,
|
||||
WINRT_GLIB_DEFINE_ENUM_VALUE (WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_DISMISSAL_REASON_Activated, "activated")
|
||||
WINRT_GLIB_DEFINE_ENUM_VALUE (WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_DISMISSAL_REASON_ApplicationHidden, "application-hidden")
|
||||
WINRT_GLIB_DEFINE_ENUM_VALUE (WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_DISMISSAL_REASON_TimedOut, "timed-out"))
|
||||
|
||||
WINRT_GLIB_DEFINE_ENUM_TYPE (winrt_Windows_UI_Notifications_Toast_Template_Type, winrt_windows_ui_notifications_toast_template_type,
|
||||
WINRT_GLIB_DEFINE_ENUM_VALUE (WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_TOAST_IMAGE_AND_TEXT01, "toast-image-and-text01")
|
||||
WINRT_GLIB_DEFINE_ENUM_VALUE (WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_TOAST_IMAGE_AND_TEXT02, "toast-image-and-text02")
|
||||
WINRT_GLIB_DEFINE_ENUM_VALUE (WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_TOAST_IMAGE_AND_TEXT03, "toast-image-and-text03")
|
||||
WINRT_GLIB_DEFINE_ENUM_VALUE (WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_TOAST_IMAGE_AND_TEXT04, "toast-image-and-text04")
|
||||
WINRT_GLIB_DEFINE_ENUM_VALUE (WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_TOAST_TEXT01, "toast-text01")
|
||||
WINRT_GLIB_DEFINE_ENUM_VALUE (WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_TOAST_TEXT02, "toast-text02")
|
||||
WINRT_GLIB_DEFINE_ENUM_VALUE (WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_TOAST_TEXT03, "toast-text03")
|
||||
WINRT_GLIB_DEFINE_ENUM_VALUE (WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_TOAST_TEXT04, "toast-text04"))
|
||||
WINRT_GLIB_DEFINE_ENUM_TYPE (winrtWindowsUINotificationsToastTemplateType, winrt_windows_ui_notifications_toast_template_type,
|
||||
WINRT_GLIB_DEFINE_ENUM_VALUE (WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_ToastImageAndText01, "toast-image-and-text01")
|
||||
WINRT_GLIB_DEFINE_ENUM_VALUE (WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_ToastImageAndText02, "toast-image-and-text02")
|
||||
WINRT_GLIB_DEFINE_ENUM_VALUE (WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_ToastImageAndText03, "toast-image-and-text03")
|
||||
WINRT_GLIB_DEFINE_ENUM_VALUE (WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_ToastImageAndText04, "toast-image-and-text04")
|
||||
WINRT_GLIB_DEFINE_ENUM_VALUE (WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_ToastText01, "toast-text01")
|
||||
WINRT_GLIB_DEFINE_ENUM_VALUE (WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_ToastText02, "toast-text02")
|
||||
WINRT_GLIB_DEFINE_ENUM_VALUE (WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_ToastText03, "toast-text03")
|
||||
WINRT_GLIB_DEFINE_ENUM_VALUE (WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_ToastText04, "toast-text04"))
|
||||
|
|
|
@ -299,7 +299,7 @@ winrtEventToken* winrt_windows_ui_notifications_toast_notification_Dismissed(win
|
|||
auto token = priv->notification->data.Dismissed([=](auto sender, winrt::Windows::UI::Notifications::ToastDismissedEventArgs dismissed)
|
||||
{
|
||||
auto reason = dismissed.Reason();
|
||||
callback(static_cast<winrt_Windows_UI_Notifications_Toast_Dismissal_Reason>(reason), context);
|
||||
callback(static_cast<winrtWindowsUINotificationsToastDismissalReason>(reason), context);
|
||||
});
|
||||
|
||||
auto new_token = winrt_event_token_new_from_token(&token);
|
||||
|
|
|
@ -3,7 +3,7 @@ using winrt;
|
|||
[CCode (cheader_filename = "gobject/winrt-glib.h")]
|
||||
namespace winrt.Windows.UI.Notifications {
|
||||
|
||||
[CCode (cname = "winrt_Windows_UI_Notifications_Toast_Dismissal_Reason", cprefix = "WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_DISMISSAL_REASON_", type_id = "winrt_windows_ui_notifications_toast_dismissal_reason_get_type ()")]
|
||||
[CCode (type_id = "winrt_windows_ui_notifications_toast_dismissal_reason_get_type ()")]
|
||||
public enum ToastDismissalReason
|
||||
{
|
||||
Activated,
|
||||
|
@ -11,7 +11,7 @@ namespace winrt.Windows.UI.Notifications {
|
|||
TimedOut
|
||||
}
|
||||
|
||||
[CCode (cname = "winrt_Windows_UI_Notifications_Toast_Template_Type", cprefix = "WINRT_WINDOWS_UI_NOTIFICATIONS_TOAST_TEMPLATE_TYPE_", type_id = "winrt_windows_ui_notifications_toast_template_type_get_type ()")]
|
||||
[CCode (type_id = "winrt_windows_ui_notifications_toast_template_type_get_type ()")]
|
||||
public enum ToastTemplateType
|
||||
{
|
||||
ToastImageAndText01,
|
||||
|
|
Loading…
Reference in a new issue