SameBoy/gtk3/widgets/main_window.h

28 lines
1.0 KiB
C
Raw Normal View History

#ifndef main_window_h
#define main_window_h
#include <stdbool.h>
#include <gtk/gtk.h>
#include <Core/gb.h>
#include "../shader.h"
#define MAIN_WINDOW_TYPE (main_window_get_type())
G_DECLARE_FINAL_TYPE(MainWindow, main_window, SAMEBOY, MAIN_WINDOW, GtkApplicationWindow)
MainWindow *main_window_new(GApplication *app, bool force_software_renderer);
void main_window_fullscreen(MainWindow *self, bool make_fullscreen);
void main_window_setup_menu(MainWindow *self, char *model_string);
// GbScreen wrappers
void main_window_clear(MainWindow *self);
uint32_t *main_window_get_pixels(MainWindow *self);
uint32_t *main_window_get_current_buffer(MainWindow *self);
uint32_t *main_window_get_previous_buffer(MainWindow *self);
void main_window_flip(MainWindow *self);
void main_window_set_resolution(MainWindow *self, unsigned width, unsigned height);
void main_window_set_blending_mode(MainWindow *self, GB_frame_blending_mode_t mode);
void main_window_set_shader(MainWindow *self, const char *shader_name);
void main_window_queue_render(MainWindow *self);
#endif