33#include "GraphicsApi.h"
41#ifndef DOXYGEN_SHOULD_SKIP_THIS
68#ifndef DOXYGEN_SHOULD_SKIP_THIS
73 static constexpr bool value =
true;
78 static constexpr bool value =
true;
227 return m_isFullscreen;
500 void makeMainContextCurrent();
501 void makeSharedContextCurrent();
502 void makeNoContextCurrent();
505 static std::vector<Event> g_pendingEvents;
507 bool pickEventForWindow(uint32_t windowId,
Event& event);
513 SDL_Window *m_window;
516 void *m_sharedContext;
527#ifndef DOXYGEN_SHOULD_SKIP_THIS
Utility class that measures the elapsed time.
Definition: Clock.h:61
A mouse cursor.
Definition: Cursor.h:63
Bitfield relying on an enumeration.
Definition: Flags.h:48
A class to represent the library.
Definition: Library.h:44
A window that can serve as a target for 2D drawing.
Definition: RenderWindow.h:80
A shared OpenGL context with the main thread.
Definition: SharedGraphics.h:42
Represents a time value.
Definition: Time.h:65
An OS window.
Definition: Window.h:97
void maximize()
Maximize the window.
void setFramerateLimit(unsigned int limit)
Limit the framerate to a maximum fixed frequency.
bool isVisible() const
Check if the window is visible.
void setVisible(bool visible=true)
Show or hide the window.
void setTitle(const std::string &title)
Change the title of the window.
void setDecorated(bool decorated=true)
Show or hide the decoration of the window.
bool isFocused() const
Check if the window is focused.
Window(const Window &)=delete
Deleted copy constructor.
bool pollEvent(Event &event, Flags< EventFilter > filters=None)
Pop the event on top of the event queue, if any, and return it.
void hide()
Hide a window.
void setFullscreen(bool full=true)
Change the window state to fullscreen or not.
void show()
Show a window.
void close()
Request for closing.
void setResizable(bool resizable=true)
Set the window resizable or not.
void setSize(Vector2i size)
Change the size of the rendering region of the window.
void setMouseCursorVisible(bool visible)
Show or hide the mouse cursor.
Vector2i getFramebufferSize() const
Get the size of the underlying framebuffer.
void setMouseCursor(const Cursor &cursor)
Set the displayed cursor to a native system cursor.
Vector2i getSize() const
Get the size of the rendering region of the window.
void minimize()
Minimize the window.
bool isResizable() const
Check if the window is resizable.
bool isDecorated() const
Check if the window is decorated.
Window & operator=(const Window &)=delete
Deleted copy assignment.
void setMouseCursorGrabbed(bool grabbed)
Grab or release the mouse cursor.
Vector2i getPosition() const
Get the position of the window.
Window(const std::string &title, Vector2i size, Flags< WindowHints > hints=All)
Create a new window.
bool isMaximized() const
Check if the window is maximized.
void setPosition(Vector2i position)
Change the position of the window on screen.
void toggleFullscreen()
Toggle the fullscreen state.
bool isMinimized() const
Check if the window is minimized.
bool isFullscreen() const
Check if the window is fullscreen or not.
Definition: Window.h:226
bool isVerticalSyncEnabled() const
Check if the vertical synchronization is enabled.
bool isOpen()
Tell whether or not closing has been requested.
void restore()
Restore the window.
bool waitEvent(Event &event, Flags< EventFilter > filters=None)
Wait for an event and return it.
void setVerticalSyncEnabled(bool enabled)
Enable or disable vertical synchronization.
void display()
Display on screen what has been rendered to the window so far.
uint32_t getWindowId() const
Get the window id.
Definition: Window.h:347
@ Visible
The cell is visible (computed by FoV)
constexpr AllType All
Constant to represent "all".
Definition: Types.h:61
constexpr NoneType None
Constant to represent "none".
Definition: Types.h:45
WindowHints
Hints for window creation.
Definition: Window.h:52
EventFilter
Filter for events.
Definition: Window.h:62
@ Decorated
Is the window decorated?
@ Resizable
Is the window resizable?
@ TouchAsMouse
Treat touch events as mouse events.
@ AnyWindow
Grab events from any window, not just the created window.
@ Event
An event is pending on the sockets.
ValueActivity value(float origin, float target, float &value, Time duration, Easing easing=Ease::linear)
Create a gf::ValueActivity.
Definition: Activities.h:526
The namespace for gf classes.
Defines a system event and its parameters.
Definition: Event.h:224