Fission FSN
Loading...
Searching...
No Matches
fsCHardware.h
Go to the documentation of this file.
1/********************************************************************
2*
3* File: fsCHardware.h
4*
5* Purpose: Cocos2d-x implementation.
6*
7*********************************************************************/
8
9#ifndef fsCHardwarehdr
10#define fsCHardwarehdr
11
12#include "../../fsIHardware.h"
13
14#if defined fsDesktop
15struct GLFWwindow;
16struct GLFWcursor;
17struct GLFWvidmode;
18
19#if defined fsMacStore
20 //class fsCHardwareImpl;
21#endif
22#endif
23
24class fsCHardware : public fsIHardware
25{
26public:
27
28#if defined fsDesktop
29 void hardwareCursorInit() override;
30 void hardwareCursorUninit() override;
31 void hardwareCursorChange(const fsStr& pID) override;
32 void windowedDisplayModesEnumerate(fsDisplayInfo*& pAvailableModeList, fsS32& pNumModesInList) override;
33 void appMinimize() override;
34 void appMaximize() override;
35#endif
36
37 void hardwareCursorEnabledSet(fsBool pEnabled) const override;
38 void hardwareCursorSet(const fsCResourceName& pFilename, fsBool pFlipped) override;
39
40 void timeScaleSet(fsF32 pScale) override;
41
42 fsU64 utcTimeGet() const override;
43
44 ePlatform platformGet() const override;
45
46 fsBool smallDeviceGet() const override;
47
48 fsStr sdkVersionStringGet() const override;
49
50 fsStr appDataFolderGet() const override;
51
52 fsBool multipleAppInstances() const override;
53 fsBool processRunning(const fsStr& pProcessName) const override;
54
56
57 void browserLaunch(const fsStr& pUrl) const override;
58
60 ~fsCHardware() override;
61
62protected:
63
64#if defined fsDesktop
65 fsBool wallpaperApplyDo(const fsCResourceName& pWallpaper) override;
66#endif
67
68 void rndSeedDo() const override;
69
70private:
71
72#if defined fsPCStore
73 fsBool mCursorInClientArea;
74#endif
75
76#if defined fsDesktop
77
78 static void enterEvent(GLFWwindow* window, int entered);
79
80 void cursorApply();
81 void cursorCreate(fsStr const& pFilename, fsBool pFlipped);
82 void cursorClear();
83
84 GLFWcursor* mCursor = nullptr;
85
86 struct SCursor
87 {
88 SCursor(fsStr const& pFilename) : mFilename(pFilename)
89 {
90 }
91
92 ~SCursor();
93 const fsStr mFilename;
94 GLFWcursor* mCursor = nullptr;
95 };
96
97 fsS32 mWindowWWidth;
98 fsS32 mWindowHeight;
99 fsBool mWindowFullscreen;
100
101#if defined fsMacStore
102 // std::unique_ptr<fsCHardwareImpl> mImpl;
103#endif
104#endif
105};
106
107#endif
Definition fsCHardware.h:27
ePlatform platformGet() const override
fsBool multipleAppInstances() const override
~fsCHardware() override
void hardwareCursorEnabledSet(fsBool pEnabled) const override
fsBool smallDeviceGet() const override
void timeScaleSet(fsF32 pScale) override
fsStr appDataFolderGet() const override
fsStr sdkVersionStringGet() const override
fsBool processRunning(const fsStr &pProcessName) const override
void rndSeedDo() const override
fsU64 utcTimeGet() const override
void hardwareCursorSet(const fsCResourceName &pFilename, fsBool pFlipped) override
void browserLaunch(const fsStr &pUrl) const override
fsBool windowedModePossibleGet() const override
Definition fsCResourceName.h:32
Definition fsIHardware.h:26
ePlatform
Definition fsIHardware.h:30
Definition fsStr.h:23
bool fsBool
Definition fsBaseTypes.h:26
int fsS32
Definition fsBaseTypes.h:20
float fsF32
Definition fsBaseTypes.h:28
unsigned long long fsU64
Definition fsBaseTypes.h:24