LMMS
Loading...
Searching...
No Matches
ysfx_api_gfx.cpp File Reference
#include "ysfx.hpp"
#include "ysfx_config.hpp"
#include "ysfx_api_gfx.hpp"
#include "ysfx_eel_utils.hpp"
#include "lice_stb/lice_stb_loaders.hpp"
#include "WDL/swell/swell.h"
#include "WDL/lice/lice.h"
#include "WDL/lice/lice_text.h"
#include "WDL/wdlstring.h"
#include <vector>
#include <queue>
#include <unordered_set>
#include <memory>
#include <atomic>
#include <cassert>
#include "ysfx_api_gfx_lice.hpp"

Classes

struct  ysfx_gfx_state_t

Macros

#define WDL_NO_DEFINE_MINMAX
#define GFX_GET_CONTEXT(opaque)
#define EEL_LICE_GET_FILENAME_FOR_STRING(idx, fs, p)

Enumerations

enum  { ysfx_gfx_max_images = 1024 , ysfx_gfx_max_fonts = 128 , ysfx_gfx_max_input = 1024 }

Functions

static bool eel_lice_get_filename_for_string (void *opaque, EEL_F idx, WDL_FastString *fs, int iswrite)
static bool translate_special_key (uint32_t uni_key, uint32_t &jsfx_key)
static EEL_F NSEEL_CGEN_CALL ysfx_api_gfx_getchar (void *opaque, EEL_F *p)
static EEL_F NSEEL_CGEN_CALL ysfx_api_gfx_showmenu (void *opaque, INT_PTR nparms, EEL_F **parms)
static EEL_F NSEEL_CGEN_CALL ysfx_api_gfx_setcursor (void *opaque, INT_PTR nparms, EEL_F **parms)
static EEL_F NSEEL_CGEN_CALL ysfx_api_gfx_getdropfile (void *opaque, INT_PTR np, EEL_F **parms)
ysfx_gfx_state_tysfx_gfx_state_new (ysfx_t *fx)
void ysfx_gfx_state_free (ysfx_gfx_state_t *state)
void ysfx_gfx_state_set_bitmap (ysfx_gfx_state_t *state, uint8_t *data, uint32_t w, uint32_t h, uint32_t stride)
void ysfx_gfx_state_set_scale_factor (ysfx_gfx_state_t *state, ysfx_real scale)
void ysfx_gfx_state_set_callback_data (ysfx_gfx_state_t *state, void *callback_data)
void ysfx_gfx_state_set_show_menu_callback (ysfx_gfx_state_t *state, int(*callback)(void *, const char *, int32_t, int32_t))
void ysfx_gfx_state_set_set_cursor_callback (ysfx_gfx_state_t *state, void(*callback)(void *, int32_t))
void ysfx_gfx_state_set_get_drop_file_callback (ysfx_gfx_state_t *state, const char *(*callback)(void *, int32_t))
bool ysfx_gfx_state_is_dirty (ysfx_gfx_state_t *state)
void ysfx_gfx_state_add_key (ysfx_gfx_state_t *state, uint32_t mods, uint32_t key, bool press)
void ysfx_gfx_enter (ysfx_t *fx, bool doinit)
void ysfx_gfx_leave (ysfx_t *fx)
ysfx_gfx_state_tysfx_gfx_get_context (ysfx_t *fx)
void ysfx_gfx_prepare (ysfx_t *fx)
void ysfx_api_init_gfx ()
void SWELL_SetViewGL (HWND h, char wantGL)
bool SWELL_GetViewGL (HWND h)
bool SWELL_SetGLContextToView (HWND h)

Macro Definition Documentation

◆ EEL_LICE_GET_FILENAME_FOR_STRING

#define EEL_LICE_GET_FILENAME_FOR_STRING ( idx,
fs,
p )
Value:
#define opaque
Definition eelscript.h:281
uch * p
Definition crypt.c:594
static bool eel_lice_get_filename_for_string(void *opaque, EEL_F idx, WDL_FastString *fs, int iswrite)
Definition ysfx_api_gfx.cpp:65

◆ GFX_GET_CONTEXT

#define GFX_GET_CONTEXT ( opaque)
Value:
#define nullptr
Definition DistrhoDefines.h:75
struct ysfx_s ysfx_t
Definition ysfx.h:103
ysfx_gfx_state_t * ysfx_gfx_get_context(ysfx_t *fx)
Definition ysfx_api_gfx.cpp:369

◆ WDL_NO_DEFINE_MINMAX

#define WDL_NO_DEFINE_MINMAX

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ysfx_gfx_max_images 
ysfx_gfx_max_fonts 
ysfx_gfx_max_input 

Function Documentation

◆ eel_lice_get_filename_for_string()

bool eel_lice_get_filename_for_string ( void * opaque,
EEL_F idx,
WDL_FastString * fs,
int iswrite )
static

◆ SWELL_GetViewGL()

bool SWELL_GetViewGL ( HWND h)

◆ SWELL_SetGLContextToView()

bool SWELL_SetGLContextToView ( HWND h)

◆ SWELL_SetViewGL()

void SWELL_SetViewGL ( HWND h,
char wantGL )

◆ translate_special_key()

bool translate_special_key ( uint32_t uni_key,
uint32_t & jsfx_key )
static

◆ ysfx_api_gfx_getchar()

EEL_F NSEEL_CGEN_CALL ysfx_api_gfx_getchar ( void * opaque,
EEL_F * p )
static

◆ ysfx_api_gfx_getdropfile()

EEL_F NSEEL_CGEN_CALL ysfx_api_gfx_getdropfile ( void * opaque,
INT_PTR np,
EEL_F ** parms )
static

◆ ysfx_api_gfx_setcursor()

EEL_F NSEEL_CGEN_CALL ysfx_api_gfx_setcursor ( void * opaque,
INT_PTR nparms,
EEL_F ** parms )
static

◆ ysfx_api_gfx_showmenu()

EEL_F NSEEL_CGEN_CALL ysfx_api_gfx_showmenu ( void * opaque,
INT_PTR nparms,
EEL_F ** parms )
static

◆ ysfx_api_init_gfx()

void ysfx_api_init_gfx ( )

◆ ysfx_gfx_enter()

void ysfx_gfx_enter ( ysfx_t * fx,
bool doinit )

◆ ysfx_gfx_get_context()

ysfx_gfx_state_t * ysfx_gfx_get_context ( ysfx_t * fx)

◆ ysfx_gfx_leave()

void ysfx_gfx_leave ( ysfx_t * fx)

◆ ysfx_gfx_prepare()

void ysfx_gfx_prepare ( ysfx_t * fx)

◆ ysfx_gfx_state_add_key()

void ysfx_gfx_state_add_key ( ysfx_gfx_state_t * state,
uint32_t mods,
uint32_t key,
bool press )

◆ ysfx_gfx_state_free()

void ysfx_gfx_state_free ( ysfx_gfx_state_t * state)

◆ ysfx_gfx_state_is_dirty()

bool ysfx_gfx_state_is_dirty ( ysfx_gfx_state_t * state)

◆ ysfx_gfx_state_new()

ysfx_gfx_state_t * ysfx_gfx_state_new ( ysfx_t * fx)

◆ ysfx_gfx_state_set_bitmap()

void ysfx_gfx_state_set_bitmap ( ysfx_gfx_state_t * state,
uint8_t * data,
uint32_t w,
uint32_t h,
uint32_t stride )

◆ ysfx_gfx_state_set_callback_data()

void ysfx_gfx_state_set_callback_data ( ysfx_gfx_state_t * state,
void * callback_data )

◆ ysfx_gfx_state_set_get_drop_file_callback()

void ysfx_gfx_state_set_get_drop_file_callback ( ysfx_gfx_state_t * state,
const char *(* callback )(void *, int32_t) )

◆ ysfx_gfx_state_set_scale_factor()

void ysfx_gfx_state_set_scale_factor ( ysfx_gfx_state_t * state,
ysfx_real scale )

◆ ysfx_gfx_state_set_set_cursor_callback()

void ysfx_gfx_state_set_set_cursor_callback ( ysfx_gfx_state_t * state,
void(* callback )(void *, int32_t) )

◆ ysfx_gfx_state_set_show_menu_callback()

void ysfx_gfx_state_set_show_menu_callback ( ysfx_gfx_state_t * state,
int(* callback )(void *, const char *, int32_t, int32_t) )