2021-01-06 23:47:14 +00:00
|
|
|
#ifndef main_window_h
|
|
|
|
#define main_window_h
|
|
|
|
|
2021-01-07 13:36:46 +00:00
|
|
|
#include <stdbool.h>
|
2021-01-06 23:47:14 +00:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
#include <Core/gb.h>
|
2021-01-07 21:35:41 +00:00
|
|
|
#include "../sameboy_application.h"
|
2021-01-07 13:36:46 +00:00
|
|
|
#include "../shader.h"
|
2021-01-06 23:47:14 +00:00
|
|
|
|
|
|
|
#define MAIN_WINDOW_TYPE (main_window_get_type())
|
|
|
|
G_DECLARE_FINAL_TYPE(MainWindow, main_window, SAMEBOY, MAIN_WINDOW, GtkApplicationWindow)
|
|
|
|
|
2021-01-07 21:35:41 +00:00
|
|
|
MainWindow *main_window_new(SameBoyApplication *app, bool force_software_renderer);
|
2021-01-06 23:47:14 +00:00
|
|
|
void main_window_setup_menu(MainWindow *self, char *model_string);
|
|
|
|
|
2021-01-07 21:35:41 +00:00
|
|
|
void main_window_fullscreen(MainWindow *self, bool make_fullscreen);
|
|
|
|
void main_window_open_console_window(MainWindow *self);
|
|
|
|
void main_window_open_memory_viewer_window(MainWindow *self);
|
|
|
|
void main_window_open_vram_viewer_window(MainWindow *self);
|
|
|
|
void main_window_open_printer_window(MainWindow *self);
|
|
|
|
|
2021-01-06 23:47:14 +00:00
|
|
|
// 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
|