TIC-80-guile/src/system.h

92 lines
1.5 KiB
C
Raw Normal View History

2018-02-14 12:52:10 +01:00
#pragma once
2018-02-14 13:14:05 +01:00
#include "ticapi.h"
2018-02-14 12:52:10 +01:00
#include "ext/file_dialog.h"
typedef struct
{
void (*setClipboardText)(const char* text);
bool (*hasClipboardText)();
char* (*getClipboardText)();
u64 (*getPerformanceCounter)();
u64 (*getPerformanceFrequency)();
void* (*getUrlRequest)(const char* url, s32* size);
2018-02-14 13:14:05 +01:00
void (*fileDialogLoad)(file_dialog_load_callback callback, void* data);
void (*fileDialogSave)(file_dialog_save_callback callback, const char* name, const u8* buffer, size_t size, void* data, u32 mode);
2018-02-14 12:52:10 +01:00
void (*goFullscreen)();
void (*showMessageBox)(const char* title, const char* message);
void (*setWindowTitle)(const char* title);
void (*openSystemPath)(const char* path);
2018-02-14 14:22:33 +01:00
void (*preseed)();
2018-02-15 15:06:03 +01:00
void (*poll)();
2018-02-14 12:52:10 +01:00
2018-02-26 11:56:54 +01:00
void (*updateConfig)();
2018-02-14 12:52:10 +01:00
} System;
2018-02-14 13:30:13 +01:00
typedef struct
{
struct
{
struct
{
s32 arrow;
s32 hand;
s32 ibeam;
bool pixelPerfect;
} cursor;
struct
{
tic_code_theme syntax;
u8 bg;
u8 select;
u8 cursor;
bool shadow;
} code;
struct
{
struct
{
u8 alpha;
} touch;
} gamepad;
} theme;
s32 gifScale;
s32 gifLength;
bool checkNewVersion;
bool noSound;
bool showSync;
2018-02-26 11:56:54 +01:00
bool crtMonitor;
const char* crtShader;
2018-02-14 13:30:13 +01:00
} StudioConfig;
2018-02-14 13:14:05 +01:00
typedef struct
{
tic_mem* tic;
bool quit;
2018-02-19 11:13:44 +01:00
void (*tick)();
2018-02-14 13:23:26 +01:00
void (*exit)();
2018-02-14 13:14:05 +01:00
void (*close)();
void (*updateProject)();
2018-02-14 13:30:13 +01:00
const StudioConfig* (*config)();
2018-02-14 13:14:05 +01:00
} Studio;
TIC80_API Studio* studioInit(s32 argc, char **argv, s32 samplerate, const char* appFolder, System* system);