nesemu/gui/main_window.h

41 lines
898 B
C

//
// Created by william on 6/8/24.
//
#ifndef NES_EMULATOR_MAIN_WINDOW_H
#define NES_EMULATOR_MAIN_WINDOW_H
#include <SDL.h>
#include "../include/ppu.h"
#include "components/window.h"
#define MAIN_WINDOW_WIDTH 256
#define MAIN_WINDOW_HEIGHT 240
#define MAIN_WINDOW_SCALE 3
typedef struct nes_main_window {
Window window;
SDL_Texture *texture;
} MainWindow;
/**
* Creates an instance of the main window.
* @return A reference to the created main window instance
*/
MainWindow *main_window_create(int *window_id);
/**
* Destroys an instance of the main window.
* @param window A reference to the window to destroy
*/
void main_window_destroy(MainWindow *window);
void main_window_render(MainWindow *window, pixel *pixels);
void main_window_mouse_motion(MainWindow *window, int x, int y);
void main_window_mouse_click(MainWindow *window);
#endif //NES_EMULATOR_MAIN_WINDOW_H