Change DisplayServerMacOS from GDCLASS to GDSOFTCLASS. Add GDSOFTCLASS to other display servers.

This commit is contained in:
Pāvels Nadtočajevs 2025-04-10 09:18:58 +03:00
parent c374ce211c
commit 0497522933
No known key found for this signature in database
GPG key ID: 8413210218EF35D2
8 changed files with 11 additions and 6 deletions

View file

@ -56,7 +56,7 @@
#import <QuartzCore/CAMetalLayer.h>
class DisplayServerIOS : public DisplayServer {
// No need to register with GDCLASS, it's platform-specific and nothing is added.
GDSOFTCLASS(DisplayServerIOS, DisplayServer);
_THREAD_SAFE_CLASS_

View file

@ -67,7 +67,8 @@
#undef CursorShape
class DisplayServerWayland : public DisplayServer {
// No need to register with GDCLASS, it's platform-specific and nothing is added.
GDSOFTCLASS(DisplayServerWayland, DisplayServer);
struct WindowData {
WindowID id = INVALID_WINDOW_ID;

View file

@ -123,7 +123,7 @@ typedef struct _xrr_monitor_info {
#undef CursorShape
class DisplayServerX11 : public DisplayServer {
// No need to register with GDCLASS, it's platform-specific and nothing is added.
GDSOFTCLASS(DisplayServerX11, DisplayServer);
_THREAD_SAFE_CLASS_

View file

@ -64,7 +64,7 @@
#undef CursorShape
class DisplayServerMacOS : public DisplayServer {
GDCLASS(DisplayServerMacOS, DisplayServer); // Note: required for Object::cast_to.
GDSOFTCLASS(DisplayServerMacOS, DisplayServer);
_THREAD_SAFE_CLASS_

View file

@ -38,7 +38,7 @@
#include <emscripten/html5.h>
class DisplayServerWeb : public DisplayServer {
// No need to register with GDCLASS, it's platform-specific and nothing is added.
GDSOFTCLASS(DisplayServerWeb, DisplayServer);
private:
struct JSTouchEvent {

View file

@ -366,7 +366,7 @@ class DropTargetWindows;
#endif
class DisplayServerWindows : public DisplayServer {
// No need to register with GDCLASS, it's platform-specific and nothing is added.
GDSOFTCLASS(DisplayServerWindows, DisplayServer);
friend class DropTargetWindows;

View file

@ -35,6 +35,8 @@
#include "servers/rendering/dummy/rasterizer_dummy.h"
class DisplayServerHeadless : public DisplayServer {
GDSOFTCLASS(DisplayServerHeadless, DisplayServer);
private:
friend class DisplayServer;

View file

@ -37,6 +37,8 @@
// Specialized DisplayServer for unittests based on DisplayServerHeadless, that
// additionally supports things like mouse enter/exit events and clipboard.
class DisplayServerMock : public DisplayServerHeadless {
GDSOFTCLASS(DisplayServerMock, DisplayServerHeadless);
private:
friend class DisplayServer;