Hicolor raw dumping
[lsnes.git] / include / core / framebuffer.hpp
blob9f47d8b14fb50766b02e01043f6813d2630566c7
1 #ifndef _framebuffer__hpp__included__
2 #define _framebuffer__hpp__included__
4 #include "core/render.hpp"
6 /**
7 * The main framebuffer.
8 */
9 extern lcscreen framebuffer;
10 /**
11 * Special screen: "NO SIGNAL".
13 extern lcscreen screen_nosignal;
14 /**
15 * Special screen: "SYSTEM STATE CORRUPT".
17 extern lcscreen screen_corrupt;
18 /**
19 * The main screen to draw on.
21 extern screen<false> main_screen;
22 /**
23 * Initialize special screens.
25 * throws std::bad_alloc: Not enough memory.
27 void init_special_screens() throw(std::bad_alloc);
28 /**
29 * Copy framebuffer to backing store, running Lua hooks if any.
31 void redraw_framebuffer(lcscreen& torender, bool no_lua = false);
32 /**
33 * Redraw the framebuffer, reusing contents from last redraw. Runs lua hooks if last redraw ran them.
35 void redraw_framebuffer();
36 /**
37 * Return last complete framebuffer.
39 lcscreen get_framebuffer() throw(std::bad_alloc);
40 /**
41 * Render framebuffer to main screen.
43 void render_framebuffer();
44 /**
45 * Get the size of current framebuffer.
47 std::pair<uint32_t, uint32_t> get_framebuffer_size();
48 /**
49 * Take a screenshot to specified file.
51 void take_screenshot(const std::string& file) throw(std::bad_alloc, std::runtime_error);
52 /**
53 * Get scale factors.
55 std::pair<uint32_t, uint32_t> get_scale_factors(uint32_t width, uint32_t height);
57 #endif