2020-05-19 00:31:31 +00:00
|
|
|
#ifndef gb_screen_h
|
|
|
|
#define gb_screen_h
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
#include <Core/gb.h>
|
|
|
|
#include "shader.h"
|
|
|
|
|
|
|
|
#define GB_SCREEN_TYPE (gb_screen_get_type())
|
2020-05-20 01:41:33 +00:00
|
|
|
G_DECLARE_FINAL_TYPE(GbScreen, gb_screen, SAMEBOY, GB_SCREEN, GtkBin)
|
2020-05-19 00:31:31 +00:00
|
|
|
|
|
|
|
GbScreen *gb_screen_new(bool force_fallback);
|
|
|
|
void gb_screen_clear(GbScreen *self);
|
|
|
|
bool gb_screen_uses_fallback(GbScreen *self);
|
|
|
|
|
|
|
|
uint32_t *gb_screen_get_pixels(GbScreen *self);
|
|
|
|
uint32_t *gb_screen_get_current_buffer(GbScreen *self);
|
|
|
|
uint32_t *gb_screen_get_previous_buffer(GbScreen *self);
|
|
|
|
void gb_screen_flip(GbScreen *self);
|
|
|
|
void gb_screen_set_resolution(GbScreen *self, unsigned width, unsigned height);
|
|
|
|
void gb_screen_set_blending_mode(GbScreen *self, GB_frame_blending_mode_t mode);
|
|
|
|
void gb_screen_set_shader(GbScreen *self, const char *shader_name);
|
2020-05-19 14:46:08 +00:00
|
|
|
void gb_screen_queue_render(GbScreen *self);
|
2020-05-19 00:31:31 +00:00
|
|
|
|
|
|
|
#endif
|