GuiLite/workspace/core_include/display.h

32 lines
1016 B
C
Raw Normal View History

2019-08-19 16:03:27 +08:00
#ifndef GUILITE_CORE_INCLUDE_DISPLAY_H
#define GUILITE_CORE_INCLUDE_DISPLAY_H
2017-12-06 21:43:47 +08:00
#define SURFACE_CNT_MAX 6//root + pages
class c_hid_pipe;
class c_surface;
class c_display {
friend class c_surface;
2017-12-06 21:43:47 +08:00
public:
2019-12-17 10:45:15 +08:00
c_display(void* phy_fb, int display_width, int display_height, int surface_width, int surface_height, unsigned int color_bytes, int surface_cnt, EXTERNAL_GFX_OP* gfx_op = 0);
2019-09-28 10:24:34 +08:00
c_surface* alloc_surface(Z_ORDER_LEVEL max_zorder);
2019-10-16 10:30:02 +08:00
int swipe_surface(c_surface* s0, c_surface* s1, int x0, int x1, int y0, int y2, int offset);
2019-12-17 10:45:15 +08:00
int get_width() { return m_width; }
int get_height() { return m_height; }
2017-12-06 21:43:47 +08:00
void* get_updated_fb(int* width, int* height, bool force_update = false);
int snap_shot(const char* file_name);
2017-12-06 21:43:47 +08:00
private:
2019-12-17 10:45:15 +08:00
int m_width; //in pixels
int m_height; //in pixels
int m_color_bytes; //16 bits, 32 bits only
2017-12-06 21:43:47 +08:00
void* m_phy_fb;
int m_phy_read_index;
int m_phy_write_index;
2017-12-06 21:43:47 +08:00
c_surface* m_surface_group[SURFACE_CNT_MAX];
2019-12-17 10:45:15 +08:00
int m_surface_cnt;
int m_surface_index;
2017-12-06 21:43:47 +08:00
};
2019-02-02 11:30:40 +08:00
#endif