SameBoy/gtk3/widgets/gb_screen.h

27 lines
876 B
C
Raw Normal View History

#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())
G_DECLARE_FINAL_TYPE(GbScreen, gb_screen, SAMEBOY, GB_SCREEN, GtkBin)
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);
void gb_screen_queue_render(GbScreen *self);
#endif