Add template getter
This commit is contained in:
parent
9d9b9e8e42
commit
bc9b9b95e0
|
@ -1,12 +1,19 @@
|
|||
#ifndef __WINRT_GLIB_2_H__
|
||||
#define __WINRT_GLIB_2_H__
|
||||
|
||||
#if !defined(WINRT_GLIB_H_INSIDE) && !defined(WINRT_GLIB_COMPILATION)
|
||||
#error "Only <winrt-glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include "winrt-enums.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
gboolean winrt_InitApartment();
|
||||
char* winrt_windows_ui_notifications_toast_notification_manager_GetTemplateContent(winrtWindowsUINotificationsToastTemplateType type);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -23,3 +23,9 @@ gboolean winrt_InitApartment()
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
char* winrt_windows_ui_notifications_toast_notification_manager_GetTemplateContent(winrtWindowsUINotificationsToastTemplateType type)
|
||||
{
|
||||
using namespace winrt::Windows::UI::Notifications;
|
||||
return wsview_to_char(ToastNotificationManager::GetTemplateContent(static_cast<ToastTemplateType>(type)).GetXml());
|
||||
}
|
|
@ -56,4 +56,10 @@ namespace winrt.Windows.UI.Notifications {
|
|||
public void Show(ToastNotification notification);
|
||||
public void Hide(ToastNotification notification);
|
||||
}
|
||||
|
||||
[Compact]
|
||||
[CCode]
|
||||
public class ToastNotificationManager {
|
||||
public static string GetTemplateContent(ToastTemplateType type);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue