From f72bcb2ecff195011892002dda694714853e14d3 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Tue, 11 Oct 2016 12:08:35 +0200 Subject: ucoo/{intf, hal/frame_buffer}: add on method in frame_buffer interface --- ucoo/hal/frame_buffer/sdl_frame_buffer.host.cc | 5 +++++ ucoo/hal/frame_buffer/sdl_frame_buffer.host.hh | 1 + ucoo/intf/frame_buffer.hh | 2 ++ 3 files changed, 8 insertions(+) diff --git a/ucoo/hal/frame_buffer/sdl_frame_buffer.host.cc b/ucoo/hal/frame_buffer/sdl_frame_buffer.host.cc index cbeebbd..e28bfa9 100644 --- a/ucoo/hal/frame_buffer/sdl_frame_buffer.host.cc +++ b/ucoo/hal/frame_buffer/sdl_frame_buffer.host.cc @@ -54,6 +54,11 @@ SdlFrameBuffer::disable () SDL_Quit (); } +void +SdlFrameBuffer::on (bool state) +{ +} + void SdlFrameBuffer::refresh () { diff --git a/ucoo/hal/frame_buffer/sdl_frame_buffer.host.hh b/ucoo/hal/frame_buffer/sdl_frame_buffer.host.hh index 3bf8960..92b136d 100644 --- a/ucoo/hal/frame_buffer/sdl_frame_buffer.host.hh +++ b/ucoo/hal/frame_buffer/sdl_frame_buffer.host.hh @@ -36,6 +36,7 @@ class SdlFrameBuffer : public FrameBuffer : FrameBuffer (w, h) { } void enable () override; void disable () override; + void on (bool state = true) override; void refresh () override; void fill (uint32_t color) override; void fill (uint32_t color, const Surface::Rect &rect) override; diff --git a/ucoo/intf/frame_buffer.hh b/ucoo/intf/frame_buffer.hh index c8774f2..5df91e3 100644 --- a/ucoo/intf/frame_buffer.hh +++ b/ucoo/intf/frame_buffer.hh @@ -87,6 +87,8 @@ class FrameBuffer virtual void enable () = 0; /// Disable. virtual void disable () = 0; + /// Turn display on or off. + virtual void on (bool state = true) = 0; /// Show hidden buffer on screen. virtual void refresh () = 0; /// Fill with color. -- cgit v1.2.3