Lephisto/src/toolkit.h
2013-02-28 22:49:53 +00:00

44 lines
1.2 KiB
C

#pragma once
#include <SDL.h>
#include "opengl.h"
#include "font.h"
extern int toolkit;
// Creation.
unsigned int window_create(char* name, const int x, const int y, const int w, const int h);
void window_addButton(const unsigned int wid, const int x, const int y,
const int w, const int h, char* name, char* display,
void(*call)(char*));
void window_addText(const unsigned int wid, const int x, const int y,
const int w, const int h, const int cenetered, char* name,
glFont* font, glColour* colour, char* string);
void window_addImage(const unsigned int wid, const int x, const int y,
char* name, glTexture* image);
// Modification
void window_modifyText(const unsigned int wid, char* name, char* newstring);
void window_modifyImage(const unsigned int wid, char* name, glTexture* image);
// Get the window by name.
int window_exists(const char* wdwname);
unsigned int window_get(const char* wdwname);
// Destroy window.
void window_destroy(const unsigned int wid);
void window_destroyWidget(unsigned wid, const char* wgtname);
// Render.
void toolkit_render(void);
// Input.
int toolkit_input(SDL_Event* event);
// Init/Exit.
int toolkit_init(void);
void toolkit_exit(void);