shrooms-vb-native/window.h

35 lines
1.0 KiB
C
Raw Normal View History

#ifndef SHROOMS_VB_NATIVE_WINDOW_
#define SHROOMS_VB_NATIVE_WINDOW_
#include <SDL2/SDL.h>
#include "nuklear.h"
typedef struct WindowContext {
SDL_Window *window;
2024-11-01 01:11:13 +00:00
int winWidth, winHeight;
float screenScaleX, screenScaleY;
SDL_Renderer *renderer;
SDL_Texture *leftEye;
SDL_Texture *rightEye;
struct nk_context *nk;
struct nk_font *font;
} WindowContext;
int windowInit(WindowContext *win, const char *title);
void windowDestroy(WindowContext *win);
void windowUpdate(WindowContext *win, const uint8_t *left, const uint8_t *right);
2024-11-01 01:11:13 +00:00
int windowScaleX(WindowContext *win, int x);
int windowScaleY(WindowContext *win, int y);
int windowGetMenuHeight(WindowContext *win);
int windowGetScreenHeight(WindowContext *win);
void windowDisplayBegin(WindowContext *win);
void windowDisplayEnd(WindowContext *win);
bool windowGuiBegin(WindowContext *win, const char *title);
void windowGuiEnd(WindowContext *win);
void windowMenubarBegin(WindowContext *win, const char **items);
void windowMenubarEnd(WindowContext *win);
#endif