anotherim-desktop/plugins/windows-notification/api/include/gobject/winrt.h
mjk f1bcb6604f rewrite InitApartment and protect callers from (the rest of the) exceptions
Initializing COM by calling `winrt::init_apartment()` would always cause
stack unwinding *in practice*, which is suboptimal at best, and even using
`apartment_type::single_threaded` still would require exception filtering
*just in case*.
2021-06-09 07:20:01 -03:00

25 lines
595 B
C

#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
#define EXTERN extern "C"
#define NOEXCEPT noexcept
#else
#define EXTERN
#define NOEXCEPT
#endif
EXTERN gboolean winrt_InitApartment() NOEXCEPT;
EXTERN char* winrt_windows_ui_notifications_toast_notification_manager_GetTemplateContent(winrtWindowsUINotificationsToastTemplateType type) NOEXCEPT;
#undef EXTERN
#undef NOEXCEPT
#endif // __WINRT_GLIB_2_H__