OpenTTD Source
20240919-master-gdf0233f4c2
|
Go to the documentation of this file.
13 #include <condition_variable>
22 std::optional<std::string_view>
Start(
const StringList ¶m)
override;
26 void MakeDirty(
int left,
int top,
int width,
int height)
override;
36 bool ClaimMousePointer()
override;
44 std::string_view GetInfoString()
const override {
return this->
driver_info; }
74 void MainLoopCleanup();
75 bool CreateMainSurface(uint w, uint h,
bool resize);
76 std::optional<std::string_view> Initialize();
void UnlockVideoBuffer() override
Unlock a previously locked video buffer.
The base of all video drivers.
Dimensions (a width and height) of a rectangle in 2D.
virtual void ReleaseVideoPointer()=0
Hand video buffer back to the painting backend.
std::string driver_info
Information string about selected driver.
void MakeDirty(int left, int top, int width, int height) override
Mark a particular area dirty.
std::vector< int > GetListOfMonitorRefreshRates() override
Get a list of refresh rates of each available monitor.
bool LockVideoBuffer() override
Make sure the video buffer is ready for drawing.
void EditBoxGainedFocus() override
This is called to indicate that an edit box has gained focus, text input mode should be enabled.
virtual bool AllocateBackingStore(int w, int h, bool force=false)=0
(Re-)create the backing store.
void MainLoop() override
Perform the actual drawing.
void Stop() override
Stop this driver.
void InputLoop() override
Handle input logic, is CTRL pressed, should we fast-forward, etc.
bool AfterBlitterChange() override
Callback invoked after the blitter was changed.
Palette local_palette
Current palette to use for drawing.
bool PollEvent() override
Process a single system event.
std::vector< std::string > StringList
Type for a list of strings.
bool ToggleFullscreen(bool fullscreen) override
Change the full screen setting.
void CheckPaletteAnim() override
Process any pending palette animation.
virtual bool CreateMainWindow(uint w, uint h, uint flags=0)
Create the main window.
void ClientSizeChanged(int w, int h, bool force)
Indicate to the driver the client-side might have changed.
void EditBoxLostFocus() override
This is called to indicate that an edit box has lost focus, text input mode should be disabled.
Rect dirty_rect
Rectangle encompassing the dirty area of the video buffer.
bool edit_box_focused
This is true to indicate that keyboard input is in text input mode, and SDL_TEXTINPUT events are enab...
bool buffer_locked
Video buffer was locked by the main thread.
bool ChangeResolution(int w, int h) override
Change the resolution of the window.
Specification of a rectangle with absolute coordinates of all edges.
Information about the currently used palette.
Dimension GetScreenSize() const override
Get the resolution of the main screen.
std::optional< std::string_view > Start(const StringList ¶m) override
Start this driver.
struct SDL_Window * sdl_window
Main SDL window.
virtual void * GetVideoPointer()=0
Get a pointer to the video buffer.