MGL(Win32)
読み取り中…
検索中…
一致する文字列を見つけられません
mgl_application_module_macos.h
[詳解]
1// SPDX-License-Identifier: Zlib
2/* ------------------------------------------------------------------------- */
9/* ------------------------------------------------------------------------- */
10
11#ifndef INCGUARD_MGL_APPLICATION_MODULE_MACOS_H_1613958478
12#define INCGUARD_MGL_APPLICATION_MODULE_MACOS_H_1613958478
13
14#include <mgl/mgl_environment.h>
15#if defined(MGL_TARGET_MACOS)
16
17#include <IOKit/pwr_mgt/IOPMLib.h>
18
20
21namespace MGL::System
22{
24class MacOSApplicationModule : public CommonApplicationModule
25{
26public:
27 MacOSApplicationModule() noexcept;
28
29 bool Caffeinate(bool isEnabled) noexcept override;
30 [[nodiscard]] bool IsCaffeinated() const noexcept override;
31
32 const ArgumentArray &GetArguments() const noexcept override;
33
34 void Quit() noexcept override;
35
36 /* ------------------------------------------------------------------------- */
42 /* ------------------------------------------------------------------------- */
43 [[nodiscard]] bool IsAvailableQuit() const noexcept override
44 {
45 return true;
46 }
47
48 bool SetClipboardText(const char *text) noexcept override;
49 [[nodiscard]] bool GetClipboardText(STL::string &text) noexcept override;
50
51 /* ------------------------------------------------------------------------- */
57 /* ------------------------------------------------------------------------- */
58 [[nodiscard]] bool IsAvailableClipboard() const noexcept override
59 {
60 return true;
61 }
62
63private:
64 ArgumentArray _argumentArray;
65 IOPMAssertionID _caffeinateAssertionID;
66};
67} // namespace MGL::System
68
69#endif // MGL_TARGET_MACOS
70#endif // INCGUARD_MGL_APPLICATION_MODULE_MACOS_H_1613958478
71
72// vim: et ts=4 sw=4 sts=4
MGL 共通アプリケーションモジュール
STL::vector< STL::string > ArgumentArray
引数配列の型
Definition mgl_application_module_interface.h:22
MGL 環境定義