neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
i_basic_services.hpp
Go to the documentation of this file.
1
// i_basic_services.hpp
2
/*
3
neogfx C++ App/Game Engine
4
Copyright (c) 2015, 2020 Leigh Johnston. All Rights Reserved.
5
6
This program is free software: you can redistribute it and / or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation, either version 3 of the License, or
9
(at your option) any later version.
10
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with this program. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#pragma once
21
22
#include <
neogfx/neogfx.hpp
>
23
#include <
neogfx/core/async_task.hpp
>
24
#include <
neogfx/core/primitives.hpp
>
25
26
namespace
neogfx
27
{
28
class
i_display;
29
class
i_native_clipboard;
30
class
i_shared_menu_bar;
31
32
enum class
platform
33
{
34
Windows
,
35
Mac
,
36
Kde
,
37
Gnome
38
};
39
40
class
i_basic_services
:
public
i_service
41
{
42
public
:
43
struct
bad_display_index
: std::logic_error {
bad_display_index
() : std::logic_error(
"neogfx::i_basic_services::bad_display_index"
) {} };
44
struct
no_system_menu_bar
: std::logic_error {
no_system_menu_bar
() : std::logic_error(
"neogfx::i_basic_services::no_system_menu_bar"
) {} };
45
public
:
46
virtual
~i_basic_services
() =
default
;
47
public
:
48
virtual
neogfx::platform
platform
()
const
= 0;
49
virtual
i_async_task
&
app_task
() = 0;
50
virtual
void
system_beep
() = 0;
51
virtual
void
display_error_dialog
(std::string
const
& aTitle, std::string
const
& aMessage,
void
* aParentWindowHandle = 0)
const
= 0;
52
virtual
uint32_t
display_count
()
const
= 0;
53
virtual
i_display&
display
(uint32_t aDisplayIndex = 0)
const
= 0;
54
virtual
bool
has_system_clipboard
()
const
= 0;
55
virtual
i_native_clipboard&
system_clipboard
() = 0;
56
virtual
bool
has_system_menu_bar
()
const
= 0;
57
virtual
i_shared_menu_bar
&
system_menu_bar
() = 0;
58
virtual
bool
open_uri
(std::string
const
& aUri) = 0;
59
public
:
60
static
uuid
const
&
iid
() {
static
uuid
const
sIid{ 0x86d1e3fa, 0xbf79, 0x4940, 0xa648, { 0xaf, 0xad, 0xbf, 0xf2, 0x9c, 0xcd } };
return
sIid; }
61
};
62
}
neogfx::i_basic_services
Definition
i_basic_services.hpp:41
neogfx::i_basic_services::has_system_menu_bar
virtual bool has_system_menu_bar() const =0
neogfx::i_basic_services::~i_basic_services
virtual ~i_basic_services()=default
neogfx::i_basic_services::system_menu_bar
virtual i_shared_menu_bar & system_menu_bar()=0
neogfx::i_basic_services::open_uri
virtual bool open_uri(std::string const &aUri)=0
neogfx::i_basic_services::display_error_dialog
virtual void display_error_dialog(std::string const &aTitle, std::string const &aMessage, void *aParentWindowHandle=0) const =0
neogfx::i_basic_services::platform
virtual neogfx::platform platform() const =0
neogfx::i_basic_services::system_beep
virtual void system_beep()=0
neogfx::i_basic_services::display_count
virtual uint32_t display_count() const =0
neogfx::i_basic_services::system_clipboard
virtual i_native_clipboard & system_clipboard()=0
neogfx::i_basic_services::app_task
virtual i_async_task & app_task()=0
neogfx::i_basic_services::display
virtual i_display & display(uint32_t aDisplayIndex=0) const =0
neogfx::i_basic_services::iid
static uuid const & iid()
Definition
i_basic_services.hpp:60
neogfx::i_basic_services::has_system_clipboard
virtual bool has_system_clipboard() const =0
neogfx::i_shared_menu_bar
Definition
i_shared_menu_bar.hpp:28
neolib::i_async_task
Definition
i_async_task.hpp:88
neolib::services::i_service
Definition
services.hpp:57
primitives.hpp
neogfx
Definition
action.hpp:28
neogfx::platform
platform
Definition
i_basic_services.hpp:33
neogfx::platform::Mac
@ Mac
neogfx::platform::Kde
@ Kde
neogfx::platform::Gnome
@ Gnome
neogfx::platform::Windows
@ Windows
async_task.hpp
neogfx.hpp
neogfx::i_basic_services::bad_display_index
Definition
i_basic_services.hpp:43
neogfx::i_basic_services::bad_display_index::bad_display_index
bad_display_index()
Definition
i_basic_services.hpp:43
neogfx::i_basic_services::no_system_menu_bar
Definition
i_basic_services.hpp:44
neogfx::i_basic_services::no_system_menu_bar::no_system_menu_bar
no_system_menu_bar()
Definition
i_basic_services.hpp:44
neolib::uuid
Definition
uuid.hpp:51
include
neogfx
app
i_basic_services.hpp
Generated by
1.9.8