1/*
2 * LegacyClonk
3 *
4 * Copyright (c) 2020-2022, The LegacyClonk Team and contributors
5 *
6 * Distributed under the terms of the ISC license; see accompanying file
7 * "COPYING" for details.
8 *
9 * "Clonk" is a registered trademark of Matthes Bender, used with permission.
10 * See accompanying file "TRADEMARK" for details.
11 *
12 * To redistribute this file separately, substitute the full license texts
13 * for the above references.
14 */
15
16#include "C4Log.h"
17#include "C4Toast.h"
18
19#ifdef USE_LIBNOTIFY
20#include "C4ToastLibNotify.h"
21#elif defined(USE_WINDOWS_RUNTIME)
22#include "C4ToastWinRT.h"
23#endif
24
25std::unique_ptr<C4ToastSystem> C4ToastSystem::NewInstance()
26{
27#ifdef USE_LIBNOTIFY
28 return std::make_unique<C4ToastSystemLibNotify>();
29#elif defined(USE_WINDOWS_RUNTIME)
30 return std::make_unique<C4ToastSystemWinRT>();
31#else
32 return nullptr;
33#endif
34}
35
36void C4Toast::SetEventHandler(C4ToastEventHandler *const eventHandler)
37{
38 this->eventHandler = eventHandler;
39}
40