24 #if defined(USE_SDL_MAINLOOP)
26 #define MK_SHIFT (KMOD_LSHIFT | KMOD_RSHIFT)
27 #define MK_CONTROL (KMOD_LCTRL | KMOD_RCTRL)
28 #define MK_ALT (KMOD_LALT | KMOD_RALT)
29 #elif defined(USE_CONSOLE)
35 #elif defined(USE_COCOA)
38 extern int MK_CONTROL;
40 #elif defined(USE_WIN32_WINDOWS)
47 #if defined(USE_WIN32_WINDOWS) || defined(USE_CONSOLE) || defined(USE_SDL_MAINLOOP)
73 #define K_LEFT_BRACKET 26
74 #define K_RIGHT_BRACKET 27
76 #define K_CONTROL_L 29
86 #define K_SEMICOLON 39
87 #define K_APOSTROPHE 40
88 #define K_GRAVE_ACCENT 41
90 #define K_BACKSLASH 43
102 #define K_MULTIPLY 55
118 #define K_SUBTRACT 74
176 #define K_CONTROL_R 97
177 #define K_NUM_RETURN 96
186 #define K_PAGEDOWN 109
196 #elif defined(USE_COCOA)
200 const int CocoaKeycodeOffset = 300;
277 virtual void Clear();
294 bool StorePosition(
const char *szWindowName,
const char *szSubKey,
bool fStoreSize =
true);
295 bool RestorePosition(
const char *szWindowName,
const char *szSubKey,
bool fHidden =
false);
297 void SetSize(
unsigned int cx,
unsigned int cy);
307 #if defined(USE_WIN32_WINDOWS)
308 HWND hWindow{
nullptr};
309 virtual bool Win32DialogMessageHandling(MSG * msg) {
return false; };
310 #elif defined(USE_SDL_MAINLOOP)
312 void HandleSDLEvent(SDL_WindowEvent &e);
313 std::vector<int> available_samples;
318 #ifdef WITH_QT_EDITOR
319 class QOpenGLWidget *glwidget{
nullptr};
virtual void EnumerateMultiSamples(std::vector< int > &samples, int min_expected=0) const
virtual C4Window * Init(WindowKind windowKind, C4AbstractApp *pApp, const char *Title, const C4Rect *size)
bool GetSize(C4Rect *pRect)
virtual bool ReInit(C4AbstractApp *pApp)
virtual void CharIn(const char *)
void SetTitle(const char *Title)
virtual void PerformUpdate()
bool RestorePosition(const char *szWindowName, const char *szSubKey, bool fHidden=false)
void SetSize(unsigned int cx, unsigned int cy)
virtual void RequestUpdate()
bool StorePosition(const char *szWindowName, const char *szSubKey, bool fStoreSize=true)
void GrabMouse(bool grab)