 |
Gorgon Game Engine
|
Go to the documentation of this file.
27 namespace WindowManager {
65 internal::icondata *data;
78 internal::pointerdata *data;
85 friend struct internal::monitordata;
124 ASSERT(primary,
"WindowManager module is not initialized or there are no connected monitors.");
138 for(
auto &monitor : monitors) {
139 if(
IsInside(monitor.GetArea(), location)) {
151 static void Refresh(
bool force=
false);
165 internal::monitordata *data;
169 bool isprimary =
false;
174 static Monitor *primary;
209 bool unicode =
true,
bool append =
false);
basic_Point< T_ > TopLeft() const
Returns the top left coordinates of the rectangle.
Definition: Rectangle.h:198
This class represents boundaries of 2D objects.
Definition: Bounds.h:27
void Initialize()
Initializes window manager system.
Definition: WindowManager.cpp:40
This class represents a window.
Definition: Window.h:31
bool IsInside(const basic_Bounds< T_ > &b, const basic_Point< T_ > &p)
Checks whether the given point is inside this bounds.
Definition: Bounds.h:514
basic_Image< Byte > Image
Definition: Image.h:1364
static const Monitor * FromLocation(Geometry::Point location)
Returns the monitor from the given location. If none found, will return nullptr.
Definition: WindowManager.h:137
std::vector< Resource::GID::Type > GetClipboardFormats()
Returns the list of formats that is in the clipboard supported by the Gorgon Library.
Definition: Clipboard.cpp:223
contains the Rectangle class
bool IsPrimary() const
Whether this display is primary.
Definition: WindowManager.h:110
This class provides event mechanism.
Definition: Event.h:134
Geometry::Bounds GetUsable() const
Returns the area usable rectangle of the monitor. This region excludes any panels on the screen.
Definition: WindowManager.h:105
void Destroy()
Definition: X11.cpp:274
contains collection, a vector of references.
friend void addpadding(const Monitor *, int, int, int, int)
Definition: Monitor.cpp:27
constexpr Type Text
Stores text data, no longer a resource.
Definition: GID.h:134
Gorgon::internal::windowdata * getdata(const Window &w)
Definition: Window.cpp:15
static void Refresh(bool force=false)
Asks WindowManager to refresh the list of monitors.
Definition: Monitor.cpp:86
void FromImage(const Containers::Image &image)
Definition: X11.cpp:260
basic_Size< T_ > GetSize() const
Returns the size of the rectangle.
Definition: Rectangle.h:218
Geometry::Rectangle GetArea() const
Returns the area of the entire monitor including shift for multihead displays.
Definition: WindowManager.h:100
Geometry::Size GetSize() const
Returns the size of this monitor in pixels.
Definition: WindowManager.h:89
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
This class represents a 2D geometric size.
Definition: Size.h:23
std::string GetName() const
Returns the name of the monitor.
Definition: WindowManager.h:115
~Monitor()
Definition: Monitor.cpp:23
Geometry::Point GetLocation() const
Returns the location of this monitor relative to the other monitors in pixels.
Definition: WindowManager.h:95
static Monitor & Primary()
Returns the default monitor.
Definition: WindowManager.h:122
void SetClipboardList(std::vector< std::string > list, Resource::GID::Type type=Resource::GID::FileList, bool append=false)
Sets a list of strings to the clipboard.
Definition: Clipboard.cpp:493
#define ASSERT(expression, message,...)
Replaces regular assert to allow messages and backtrace.
Definition: Assert.h:161
std::string GetClipboardText(Resource::GID::Type type=Resource::GID::Text)
Returns the clipboard text.
Definition: Clipboard.cpp:249
Collection is a container for reference typed objects.
Definition: Collection.h:21
Icon & operator=(const Icon &)=delete
Icon()
Definition: X11.cpp:239
constexpr Type FileList
List of local files, not a resource.
Definition: GID.h:143
Containers::Image GetClipboardBitmap()
Returns a bitmap from the clipboard.
Definition: Clipboard.cpp:541
This class represents a 2D point.
Definition: Point.h:32
static const Containers::Collection< Monitor > & Monitors()
Returns all monitors connected to this device.
Definition: WindowManager.h:131
contains event distribution mechanism
Type
Definition: Shader.h:14
This class is a container for image data.
Definition: Image.h:19
static bool IsChangeEventSupported()
In some cases, Changed event is not supported.
Definition: Monitor.cpp:179
Represents an icon object that can be used as window icon.
Definition: WindowManager.h:43
std::vector< std::string > GetClipboardList(Resource::GID::Type type=Resource::GID::FileList)
Returns a list of strings from the clipboard.
Definition: Clipboard.cpp:383
static Event ChangedEvent
Fires when window manager raises an event about a change in the monitor or screen layout.
Definition: WindowManager.h:161
Icon(const Icon &)=delete
~Icon()
Definition: X11.cpp:282
void SetClipboardText(const std::string &text, Resource::GID::Type type=Resource::GID::Text, bool unicode=true, bool append=false)
Sets the clipboard text to given string.
Definition: Clipboard.cpp:350
Represents a rectangle in a 2D space.
Definition: Rectangle.h:19
intptr_t CurrentContext()
Returns an identifier for the current context.
Definition: WindowManager.cpp:34
Represents a hardware/OS pointer graphic.
Definition: WindowManager.h:71
Definition: WindowManager.h:84
void SetClipboardBitmap(Containers::Image img, bool append=false)
Changes the clipboard to the given image.
Definition: Clipboard.cpp:668