ScummVM
Glk::GlkAPI Class Reference

Implements the GLK interface. More...

#include <glk_api.h>

+ Inheritance diagram for Glk::GlkAPI:
+ Collaboration diagram for Glk::GlkAPI:

Public Member Functions

 GlkAPI (OSystem *syst, const GlkGameDescription &gameDesc)
 Constructor. More...
 
 ~GlkAPI () override
 
void glk_exit (void)
 
void glk_set_interrupt_handler (void(*func)(void))
 
void glk_tick (void)
 
uint glk_gestalt (uint id, uint val)
 
uint glk_gestalt_ext (uint id, uint val, uint *arr, uint arrlen)
 
unsigned char glk_char_to_lower (unsigned char ch)
 
unsigned char glk_char_to_upper (unsigned char ch)
 
winid_t glk_window_get_root (void) const
 Get the root window of the window hierarchy. More...
 
winid_t glk_window_open (winid_t split, uint method, uint size, uint wintype, uint rock=0) const
 Open a new window. More...
 
void glk_window_close (winid_t win, stream_result_t *result=nullptr)
 
void glk_window_get_size (winid_t win, uint *width, uint *height)
 
void glk_window_set_arrangement (winid_t win, uint method, uint size, winid_t keyWin)
 
void glk_window_get_arrangement (winid_t win, uint *method, uint *size, winid_t *keyWin)
 
winid_t glk_window_iterate (winid_t win, uint *rock=0)
 
uint glk_window_get_rock (winid_t win)
 
uint glk_window_get_type (winid_t win)
 
winid_t glk_window_get_parent (winid_t win)
 
winid_t glk_window_get_sibling (winid_t win)
 
void glk_window_clear (winid_t win)
 
void glk_window_move_cursor (winid_t win, uint xpos, uint ypos)
 
strid_t glk_window_get_stream (winid_t win)
 
void glk_window_set_echo_stream (winid_t win, strid_t str)
 
strid_t glk_window_get_echo_stream (winid_t win)
 
void glk_set_window (winid_t win)
 
strid_t glk_stream_open_file (frefid_t fileref, FileMode fmode, uint rock=0)
 
strid_t glk_stream_open_memory (char *buf, uint buflen, FileMode fmode, uint rock=0)
 
void glk_stream_close (strid_t str, stream_result_t *result=nullptr)
 
strid_t glk_stream_iterate (strid_t str, uint *rockptr) const
 
uint glk_stream_get_rock (strid_t str) const
 
void glk_stream_set_position (strid_t str, int pos, uint seekMode)
 
uint glk_stream_get_position (strid_t str) const
 
void glk_stream_set_current (strid_t str)
 
strid_t glk_stream_get_current (void)
 
void glk_put_char (unsigned char ch)
 
void glk_put_char_stream (strid_t str, unsigned char ch)
 
void glk_put_string (const char *s)
 
void glk_put_string_stream (strid_t str, const char *s)
 
void glk_put_buffer (const char *buf, uint len)
 
void glk_put_buffer_stream (strid_t str, const char *buf, uint len)
 
void glk_set_style (uint styl)
 
void glk_set_style_stream (strid_t str, uint styl)
 
int glk_get_char_stream (strid_t str)
 
uint glk_get_line_stream (strid_t str, char *buf, uint len)
 
uint glk_get_buffer_stream (strid_t str, char *buf, uint len)
 
void glk_stylehint_set (uint wintype, uint styl, uint hint, int val)
 
void glk_stylehint_clear (uint wintype, uint style, uint hint)
 
uint glk_style_distinguish (winid_t win, uint style1, uint style2)
 
bool glk_style_measure (winid_t win, uint style, uint hint, uint *result)
 
frefid_t glk_fileref_create_temp (uint usage, uint rock=0)
 
frefid_t glk_fileref_create_by_name (uint usage, const char *name, uint rock=0)
 
frefid_t glk_fileref_create_by_prompt (uint usage, FileMode fmode, uint rock=0)
 
frefid_t glk_fileref_create_from_fileref (uint usage, frefid_t fref, uint rock=0)
 
void glk_fileref_destroy (frefid_t fref)
 
frefid_t glk_fileref_iterate (frefid_t fref, uint *rockptr)
 
uint glk_fileref_get_rock (frefid_t fref)
 
void glk_fileref_delete_file (frefid_t fref)
 
uint glk_fileref_does_file_exist (frefid_t fref)
 
void glk_select (event_t *event)
 
void glk_select_poll (event_t *event)
 
void glk_request_timer_events (uint millisecs)
 
void glk_request_line_event (winid_t win, char *buf, uint maxlen, uint initlen)
 
void glk_request_char_event (winid_t win)
 
void glk_request_mouse_event (winid_t win)
 
void glk_cancel_line_event (winid_t win, event_t *event)
 
void glk_cancel_char_event (winid_t win)
 
void glk_cancel_mouse_event (winid_t win)
 
void glk_set_echo_line_event (winid_t win, uint val)
 
void glk_set_terminators_line_event (winid_t win, const uint32 *keycodes, uint count)
 
uint glk_buffer_to_lower_case_uni (uint32 *buf, uint len, uint numchars)
 
uint glk_buffer_to_upper_case_uni (uint32 *buf, uint len, uint numchars)
 
uint glk_buffer_to_title_case_uni (uint32 *buf, uint len, uint numchars, uint lowerrest)
 
void glk_put_char_uni (uint32 ch)
 
void glk_put_string_uni (const uint32 *s)
 
void glk_put_buffer_uni (const uint32 *buf, uint len)
 
void glk_put_char_stream_uni (strid_t str, uint32 ch)
 
void glk_put_string_stream_uni (strid_t str, const uint32 *s)
 
void glk_put_buffer_stream_uni (strid_t str, const uint32 *buf, uint len)
 
int glk_get_char_stream_uni (strid_t str)
 
uint glk_get_buffer_stream_uni (strid_t str, uint32 *buf, uint len)
 
uint glk_get_line_stream_uni (strid_t str, uint32 *buf, uint len)
 
strid_t glk_stream_open_file_uni (frefid_t fileref, FileMode fmode, uint rock=0)
 
strid_t glk_stream_open_memory_uni (uint32 *buf, uint buflen, FileMode fmode, uint rock=0)
 
void glk_request_char_event_uni (winid_t win)
 
void glk_request_line_event_uni (winid_t win, uint32 *buf, uint maxlen, uint initlen)
 
uint glk_buffer_canon_decompose_uni (uint32 *buf, uint len, uint numchars)
 
uint glk_buffer_canon_normalize_uni (uint32 *buf, uint len, uint numchars)
 
bool glk_image_draw (winid_t win, uint image, int val1, int val2)
 
bool glk_image_draw_scaled (winid_t win, uint image, int val1, int val2, uint width, uint height)
 
bool glk_image_draw (winid_t win, const Graphics::Surface &image, uint transColor=(uint) -1, int xp=0, int yp=0)
 
bool glk_image_draw_scaled (winid_t win, const Graphics::Surface &image, uint transColor, int xp, int yp, uint width, uint height)
 
bool glk_image_get_info (uint image, uint *width, uint *height)
 
void glk_window_flow_break (winid_t win)
 
void glk_window_erase_rect (winid_t win, int left, int top, uint width, uint height)
 
void glk_window_fill_rect (winid_t win, uint color, int left, int top, uint width, uint height)
 
void glk_window_set_background_color (winid_t win, uint color)
 
schanid_t glk_schannel_create (uint rock=0)
 
void glk_schannel_destroy (schanid_t chan)
 
schanid_t glk_schannel_iterate (schanid_t chan, uint *rockptr)
 
uint glk_schannel_get_rock (schanid_t chan)
 
uint glk_schannel_play (schanid_t chan, uint snd)
 
uint glk_schannel_play_ext (schanid_t chan, uint snd, uint repeats, uint notify)
 
void glk_schannel_stop (schanid_t chan)
 
void glk_schannel_set_volume (schanid_t chan, uint vol)
 
void glk_sound_load_hint (uint snd, uint flag)
 
schanid_t glk_schannel_create_ext (uint rock, uint volume)
 
uint glk_schannel_play_multi (schanid_t *chanarray, uint chancount, uint *sndarray, uint soundcount, uint notify)
 
void glk_schannel_pause (schanid_t chan)
 
void glk_schannel_unpause (schanid_t chan)
 
void glk_schannel_set_volume_ext (schanid_t chan, uint vol, uint duration, uint notify)
 
void glk_set_hyperlink (uint linkval)
 
void glk_set_hyperlink_stream (strid_t str, uint linkval)
 
void glk_request_hyperlink_event (winid_t win)
 
void glk_cancel_hyperlink_event (winid_t win)
 
void glk_current_time (glktimeval_t *time)
 
int glk_current_simple_time (uint factor)
 
void glk_time_to_date_utc (const glktimeval_t *time, glkdate_t *date)
 
void glk_time_to_date_local (const glktimeval_t *time, glkdate_t *date)
 
void glk_simple_time_to_date_utc (int time, uint factor, glkdate_t *date)
 
void glk_simple_time_to_date_local (int time, uint factor, glkdate_t *date)
 
void glk_date_to_time_utc (const glkdate_t *date, glktimeval_t *time)
 
void glk_date_to_time_local (const glkdate_t *date, glktimeval_t *time)
 
int glk_date_to_simple_time_utc (const glkdate_t *date, uint factor)
 
int glk_date_to_simple_time_local (const glkdate_t *date, uint factor)
 
const char * garglk_fileref_get_name (frefid_t fref) const
 
void garglk_set_program_name (const char *name)
 
void garglk_set_program_info (const char *info)
 
void garglk_set_story_name (const char *name)
 
void garglk_set_story_title (const char *title)
 
void garglk_set_config (const char *name)
 
void garglk_unput_string (const char *str)
 Removes the specified string from the end of the output buffer, if indeed it is there. More...
 
void garglk_unput_string_uni (const uint32 *str)
 Removes the specified string from the end of the output buffer, if indeed it is there. More...
 
void garglk_set_zcolors (uint fg, uint bg)
 
void garglk_set_zcolors_stream (strid_t str, uint fg, uint bg)
 
void garglk_set_reversevideo (uint reverse)
 
void garglk_set_reversevideo_stream (strid_t str, uint reverse)
 
void garglk_window_get_cursor (winid_t win, uint *xpos, uint *ypos)
 
void garglk_window_get_cursor_current (uint *xpos, uint *ypos)
 
void gidispatch_set_object_registry (gidispatch_rock_t(*regi)(void *obj, uint objclass), void(*unregi)(void *obj, uint objclass, gidispatch_rock_t objrock))
 
void gidispatch_set_retained_registry (gidispatch_rock_t(*regi)(void *array, uint len, const char *typecode), void(*unregi)(void *array, uint len, const char *typecode, gidispatch_rock_t objrock))
 
uint32 gidispatch_count_classes () const
 
const gidispatch_intconst_tgidispatch_get_class (uint32 index) const
 
uint32 gidispatch_count_intconst () const
 
const gidispatch_intconst_tgidispatch_get_intconst (uint32 index) const
 
const char * gidispatch_prototype (uint32 funcnum) const
 
void gidispatch_call (uint32 funcnum, uint32 numargs, gluniversal_t *arglist)
 
gidispatch_rock_t gidispatch_get_objrock (void *obj, uint objclass)
 
- Public Member Functions inherited from Glk::GlkEngine
 GlkEngine (OSystem *syst, const GlkGameDescription &gameDesc)
 
 ~GlkEngine () override
 
bool canLoadGameStateCurrently () override
 Returns true if a savegame can be loaded. More...
 
bool canSaveGameStateCurrently () override
 Returns true if the game can be saved. More...
 
Common::Language getLanguage () const
 Returns the language. More...
 
virtual InterpreterType getInterpreterType () const =0
 Returns the running interpreter type. More...
 
const Common::StringgetGameID () const
 Returns the game's Id. More...
 
const Common::StringgetGameMD5 () const
 Returns the game's md5. More...
 
const Common::StringgetFilename () const
 Returns the primary filename for the game. More...
 
uint getOptions () const
 Returns any options returned with the game's detection entry. More...
 
const Common::StringgetTargetName () const
 Return the game engine's target name. More...
 
Common::String getSaveName (uint slot) const
 Return the filename for a given save slot. More...
 
Common::Error loadGame ()
 Prompt the user for a savegame to load, and then load it. More...
 
Common::Error saveGame ()
 Prompt the user to save their game, and then save it. More...
 
Common::Error loadGameState (int slot) override
 Load a savegame from a given slot. More...
 
Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false) override
 Save the game to a given slot. More...
 
virtual Common::Error readSaveData (Common::SeekableReadStream *rs)=0
 Load a savegame from the passed Quetzal file chunk stream. More...
 
virtual Common::Error writeGameData (Common::WriteStream *ws)=0
 Save the game. More...
 
void syncSoundSettings () override
 Updates sound settings. More...
 
void beep ()
 Generate a beep. More...
 
uint getRandomNumber (uint max)
 Get a random number. More...
 
void setRandomNumberSeed (uint seed)
 Set a random number seed. More...
 
void quitGame ()
 Flags to quit the game. More...
 
bool shouldQuit () const
 Returns true if the game should be quit. More...
 
- Public Member Functions inherited from Engine
 Engine (OSystem *syst)
 
virtual ~Engine ()
 
virtual void initializePath (const Common::FSNode &gamePath)
 Init SearchMan according to the game path. More...
 
virtual void errorString (const char *buf_input, char *buf_output, int buf_output_size)
 Prepare an error string, which is printed by the error() function. More...
 
virtual GUI::DebuggergetDebugger ()
 Return the engine's debugger instance, if any. More...
 
void setDebugger (GUI::Debugger *debugger)
 Sets the engine's debugger. More...
 
GUI::DebuggergetOrCreateDebugger ()
 Return the engine's debugger instance, or create one if none is present. More...
 
virtual void flipMute ()
 Flip mute all sound option. More...
 
virtual Common::String getSaveStateName (int slot) const
 Generates the savegame filename. More...
 
virtual Common::Error loadGameStream (Common::SeekableReadStream *stream)
 Load a game state. More...
 
void setGameToLoadSlot (int slot)
 Sets the game slot for a savegame to be loaded after global main menu execution. More...
 
virtual Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false)
 Save a game state. More...
 
bool saveGameDialog ()
 Shows the ScummVM save dialog, allowing users to save their game. More...
 
bool loadGameDialog ()
 Shows the ScummVM Restore dialog, allowing users to load a game. More...
 
void pauseEngine (bool pause)
 Pause or resume the engine. More...
 
bool isPaused () const
 Return whether the engine is currently paused or not. More...
 
void openMainMenuDialog ()
 Run the Global Main Menu Dialog. More...
 
uint32 getTotalPlayTime () const
 Get the total play time. More...
 
void setTotalPlayTime (uint32 time=0)
 Set the game time counter to the specified time. More...
 
Common::TimerManagergetTimerManager ()
 
Common::EventManagergetEventManager ()
 
Common::SaveFileManagergetSaveFileManager ()
 
void checkCD ()
 On some systems, check if the game appears to be run from CD. More...
 
void handleAutoSave ()
 Checks for whether it's time to do an autosave, and if so, does it. More...
 
void saveAutosaveIfEnabled ()
 Does an autosave immediately if autosaves are turned on. More...
 
virtual bool canSaveAutosaveCurrently ()
 Indicates whether an autosave can currently be saved. More...
 
virtual int getAutosaveSlot () const
 Returns the slot that should be used for autosaves. More...
 
bool shouldPerformAutoSave (int lastSaveTime)
 

Private Attributes

bool _gliFirstEvent
 
unsigned char _charTolowerTable [256]
 
unsigned char _charToupperTable [256]
 

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature { kSupportsSubtitleOptions, kSupportsRTL, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime }
 A feature in this context means an ability of the engine which can be either available or not. More...
 
- Static Public Member Functions inherited from Engine
static void quitGame ()
 Request the engine to quit. More...
 
static bool shouldQuit ()
 Return whether the ENGINE should quit respectively should return to the launcher. More...
 
static MetaEnginegetMetaEngine ()
 
static bool warnUserAboutUnsupportedGame ()
 Display a warning to the user that the game is not fully supported. More...
 
- Public Attributes inherited from Glk::GlkEngine
Blorb_blorb
 
Clipboard_clipboard
 
Conf_conf
 
Events_events
 
Pictures_pictures
 
Screen_screen
 
Selection_selection
 
Streams_streams
 
Sounds_sounds
 
Windows_windows
 
bool _copySelect
 
bool _terminated
 
gidispatch_rock_t(* gli_register_obj )(void *obj, uint objclass)
 
void(* gli_unregister_obj )(void *obj, uint objclass, gidispatch_rock_t objrock)
 
gidispatch_rock_t(* gli_register_arr )(void *array, uint len, const char *typecode)
 
void(* gli_unregister_arr )(void *array, uint len, const char *typecode, gidispatch_rock_t objrock)
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 
- Protected Member Functions inherited from Glk::GlkEngine
Common::Error run () override
 Init the engine and start its main loop. More...
 
bool hasFeature (EngineFeature f) const override
 Returns true whether a given feature is supported by the engine. More...
 
virtual void initGraphicsMode ()
 Setup the video mode. More...
 
virtual ScreencreateScreen ()
 Create the screen. More...
 
virtual void runGame ()=0
 Main game loop for the individual interpreters. More...
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
virtual void pauseEngineIntern (bool pause)
 Actual implementation of pauseEngine by subclasses. More...
 
- Protected Attributes inherited from Glk::GlkEngine
const GlkGameDescription _gameDescription
 
Common::RandomSource _random
 
int _loadSaveSlot
 
Common::File _gameFile
 
PCSpeaker_pcSpeaker
 
bool _quitFlag
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 

Detailed Description

Implements the GLK interface.

Definition at line 50 of file glk_api.h.

Constructor & Destructor Documentation

◆ GlkAPI()

Glk::GlkAPI::GlkAPI ( OSystem syst,
const GlkGameDescription gameDesc 
)

Constructor.

Definition at line 38 of file glk_api.cpp.

◆ ~GlkAPI()

Glk::GlkAPI::~GlkAPI ( )
inlineoverride

Definition at line 60 of file glk_api.h.

Member Function Documentation

◆ garglk_fileref_get_name()

const char * Glk::GlkAPI::garglk_fileref_get_name ( frefid_t  fref) const

Definition at line 1188 of file glk_api.cpp.

◆ garglk_set_config()

void Glk::GlkAPI::garglk_set_config ( const char *  name)

Definition at line 1208 of file glk_api.cpp.

◆ garglk_set_program_info()

void Glk::GlkAPI::garglk_set_program_info ( const char *  info)

Definition at line 1196 of file glk_api.cpp.

◆ garglk_set_program_name()

void Glk::GlkAPI::garglk_set_program_name ( const char *  name)

Definition at line 1192 of file glk_api.cpp.

◆ garglk_set_reversevideo()

void Glk::GlkAPI::garglk_set_reversevideo ( uint  reverse)

Definition at line 1232 of file glk_api.cpp.

◆ garglk_set_reversevideo_stream()

void Glk::GlkAPI::garglk_set_reversevideo_stream ( strid_t  str,
uint  reverse 
)

Definition at line 1236 of file glk_api.cpp.

◆ garglk_set_story_name()

void Glk::GlkAPI::garglk_set_story_name ( const char *  name)

Definition at line 1200 of file glk_api.cpp.

◆ garglk_set_story_title()

void Glk::GlkAPI::garglk_set_story_title ( const char *  title)

Definition at line 1204 of file glk_api.cpp.

◆ garglk_set_zcolors()

void Glk::GlkAPI::garglk_set_zcolors ( uint  fg,
uint  bg 
)

Definition at line 1220 of file glk_api.cpp.

◆ garglk_set_zcolors_stream()

void Glk::GlkAPI::garglk_set_zcolors_stream ( strid_t  str,
uint  fg,
uint  bg 
)

Definition at line 1224 of file glk_api.cpp.

◆ garglk_unput_string()

void Glk::GlkAPI::garglk_unput_string ( const char *  str)

Removes the specified string from the end of the output buffer, if indeed it is there.

Definition at line 1212 of file glk_api.cpp.

◆ garglk_unput_string_uni()

void Glk::GlkAPI::garglk_unput_string_uni ( const uint32 str)

Removes the specified string from the end of the output buffer, if indeed it is there.

Definition at line 1216 of file glk_api.cpp.

◆ garglk_window_get_cursor()

void Glk::GlkAPI::garglk_window_get_cursor ( winid_t  win,
uint xpos,
uint ypos 
)

Definition at line 1244 of file glk_api.cpp.

◆ garglk_window_get_cursor_current()

void Glk::GlkAPI::garglk_window_get_cursor_current ( uint xpos,
uint ypos 
)

Definition at line 1250 of file glk_api.cpp.

◆ gidispatch_call()

void Glk::GlkAPI::gidispatch_call ( uint32  funcnum,
uint32  numargs,
gluniversal_t arglist 
)

Definition at line 533 of file glk_dispa.cpp.

◆ gidispatch_count_classes()

uint32 Glk::GlkAPI::gidispatch_count_classes ( ) const

Definition at line 224 of file glk_dispa.cpp.

◆ gidispatch_count_intconst()

uint32 Glk::GlkAPI::gidispatch_count_intconst ( ) const

Definition at line 234 of file glk_dispa.cpp.

◆ gidispatch_get_class()

const gidispatch_intconst_t * Glk::GlkAPI::gidispatch_get_class ( uint32  index) const

Definition at line 228 of file glk_dispa.cpp.

◆ gidispatch_get_intconst()

const gidispatch_intconst_t * Glk::GlkAPI::gidispatch_get_intconst ( uint32  index) const

Definition at line 238 of file glk_dispa.cpp.

◆ gidispatch_get_objrock()

gidispatch_rock_t Glk::GlkAPI::gidispatch_get_objrock ( void *  obj,
uint  objclass 
)

Definition at line 1344 of file glk_dispa.cpp.

◆ gidispatch_prototype()

const char * Glk::GlkAPI::gidispatch_prototype ( uint32  funcnum) const

Definition at line 244 of file glk_dispa.cpp.

◆ gidispatch_set_object_registry()

void Glk::GlkAPI::gidispatch_set_object_registry ( gidispatch_rock_t(*)(void *obj, uint objclass)  regi,
void(*)(void *obj, uint objclass, gidispatch_rock_t objrock)  unregi 
)

Definition at line 184 of file glk_dispa.cpp.

◆ gidispatch_set_retained_registry()

void Glk::GlkAPI::gidispatch_set_retained_registry ( gidispatch_rock_t(*)(void *array, uint len, const char *typecode)  regi,
void(*)(void *array, uint len, const char *typecode, gidispatch_rock_t objrock)  unregi 
)

Definition at line 218 of file glk_dispa.cpp.

◆ glk_buffer_canon_decompose_uni()

uint Glk::GlkAPI::glk_buffer_canon_decompose_uni ( uint32 buf,
uint  len,
uint  numchars 
)

Definition at line 878 of file glk_api.cpp.

◆ glk_buffer_canon_normalize_uni()

uint Glk::GlkAPI::glk_buffer_canon_normalize_uni ( uint32 buf,
uint  len,
uint  numchars 
)

Definition at line 883 of file glk_api.cpp.

◆ glk_cancel_char_event()

void Glk::GlkAPI::glk_cancel_char_event ( winid_t  win)

Definition at line 740 of file glk_api.cpp.

◆ glk_cancel_hyperlink_event()

void Glk::GlkAPI::glk_cancel_hyperlink_event ( winid_t  win)

Definition at line 1121 of file glk_api.cpp.

◆ glk_cancel_line_event()

void Glk::GlkAPI::glk_cancel_line_event ( winid_t  win,
event_t event 
)

Definition at line 732 of file glk_api.cpp.

◆ glk_cancel_mouse_event()

void Glk::GlkAPI::glk_cancel_mouse_event ( winid_t  win)

Definition at line 748 of file glk_api.cpp.

◆ glk_char_to_lower()

unsigned char Glk::GlkAPI::glk_char_to_lower ( unsigned char  ch)

Definition at line 160 of file glk_api.cpp.

◆ glk_char_to_upper()

unsigned char Glk::GlkAPI::glk_char_to_upper ( unsigned char  ch)

Definition at line 164 of file glk_api.cpp.

◆ glk_current_simple_time()

int Glk::GlkAPI::glk_current_simple_time ( uint  factor)

Definition at line 1136 of file glk_api.cpp.

◆ glk_current_time()

void Glk::GlkAPI::glk_current_time ( glktimeval_t time)

Definition at line 1131 of file glk_api.cpp.

◆ glk_date_to_simple_time_local()

int Glk::GlkAPI::glk_date_to_simple_time_local ( const glkdate_t date,
uint  factor 
)

Definition at line 1178 of file glk_api.cpp.

◆ glk_date_to_simple_time_utc()

int Glk::GlkAPI::glk_date_to_simple_time_utc ( const glkdate_t date,
uint  factor 
)

Definition at line 1171 of file glk_api.cpp.

◆ glk_date_to_time_local()

void Glk::GlkAPI::glk_date_to_time_local ( const glkdate_t date,
glktimeval_t time 
)

Definition at line 1167 of file glk_api.cpp.

◆ glk_date_to_time_utc()

void Glk::GlkAPI::glk_date_to_time_utc ( const glkdate_t date,
glktimeval_t time 
)

Definition at line 1162 of file glk_api.cpp.

◆ glk_exit()

void Glk::GlkAPI::glk_exit ( void  )

Definition at line 62 of file glk_api.cpp.

◆ glk_fileref_create_by_name()

frefid_t Glk::GlkAPI::glk_fileref_create_by_name ( uint  usage,
const char *  name,
uint  rock = 0 
)

Definition at line 631 of file glk_api.cpp.

◆ glk_fileref_create_by_prompt()

frefid_t Glk::GlkAPI::glk_fileref_create_by_prompt ( uint  usage,
FileMode  fmode,
uint  rock = 0 
)

Definition at line 642 of file glk_api.cpp.

◆ glk_fileref_create_from_fileref()

frefid_t Glk::GlkAPI::glk_fileref_create_from_fileref ( uint  usage,
frefid_t  fref,
uint  rock = 0 
)

Definition at line 646 of file glk_api.cpp.

◆ glk_fileref_create_temp()

frefid_t Glk::GlkAPI::glk_fileref_create_temp ( uint  usage,
uint  rock = 0 
)

Definition at line 627 of file glk_api.cpp.

◆ glk_fileref_delete_file()

void Glk::GlkAPI::glk_fileref_delete_file ( frefid_t  fref)

Definition at line 672 of file glk_api.cpp.

◆ glk_fileref_destroy()

void Glk::GlkAPI::glk_fileref_destroy ( frefid_t  fref)

Definition at line 655 of file glk_api.cpp.

◆ glk_fileref_does_file_exist()

uint Glk::GlkAPI::glk_fileref_does_file_exist ( frefid_t  fref)

Definition at line 676 of file glk_api.cpp.

◆ glk_fileref_get_rock()

uint Glk::GlkAPI::glk_fileref_get_rock ( frefid_t  fref)

Definition at line 663 of file glk_api.cpp.

◆ glk_fileref_iterate()

frefid_t Glk::GlkAPI::glk_fileref_iterate ( frefid_t  fref,
uint rockptr 
)

Definition at line 659 of file glk_api.cpp.

◆ glk_gestalt()

uint Glk::GlkAPI::glk_gestalt ( uint  id,
uint  val 
)

Definition at line 80 of file glk_api.cpp.

◆ glk_gestalt_ext()

uint Glk::GlkAPI::glk_gestalt_ext ( uint  id,
uint  val,
uint arr,
uint  arrlen 
)

Definition at line 84 of file glk_api.cpp.

◆ glk_get_buffer_stream()

uint Glk::GlkAPI::glk_get_buffer_stream ( strid_t  str,
char *  buf,
uint  len 
)

Definition at line 437 of file glk_api.cpp.

◆ glk_get_char_stream()

int Glk::GlkAPI::glk_get_char_stream ( strid_t  str)

Definition at line 419 of file glk_api.cpp.

◆ glk_get_line_stream()

uint Glk::GlkAPI::glk_get_line_stream ( strid_t  str,
char *  buf,
uint  len 
)

Definition at line 428 of file glk_api.cpp.

◆ glk_image_draw() [1/2]

bool Glk::GlkAPI::glk_image_draw ( winid_t  win,
const Graphics::Surface image,
uint  transColor = (uint)-1,
int  xp = 0,
int  yp = 0 
)

Definition at line 920 of file glk_api.cpp.

◆ glk_image_draw() [2/2]

bool Glk::GlkAPI::glk_image_draw ( winid_t  win,
uint  image,
int  val1,
int  val2 
)

Definition at line 887 of file glk_api.cpp.

◆ glk_image_draw_scaled() [1/2]

bool Glk::GlkAPI::glk_image_draw_scaled ( winid_t  win,
const Graphics::Surface image,
uint  transColor,
int  xp,
int  yp,
uint  width,
uint  height 
)

Definition at line 934 of file glk_api.cpp.

◆ glk_image_draw_scaled() [2/2]

bool Glk::GlkAPI::glk_image_draw_scaled ( winid_t  win,
uint  image,
int  val1,
int  val2,
uint  width,
uint  height 
)

Definition at line 903 of file glk_api.cpp.

◆ glk_image_get_info()

bool Glk::GlkAPI::glk_image_get_info ( uint  image,
uint width,
uint height 
)

Definition at line 957 of file glk_api.cpp.

◆ glk_put_buffer()

void Glk::GlkAPI::glk_put_buffer ( const char *  buf,
uint  len 
)

Definition at line 399 of file glk_api.cpp.

◆ glk_put_buffer_stream()

void Glk::GlkAPI::glk_put_buffer_stream ( strid_t  str,
const char *  buf,
uint  len 
)

Definition at line 403 of file glk_api.cpp.

◆ glk_put_char()

void Glk::GlkAPI::glk_put_char ( unsigned char  ch)

Definition at line 379 of file glk_api.cpp.

◆ glk_put_char_stream()

void Glk::GlkAPI::glk_put_char_stream ( strid_t  str,
unsigned char  ch 
)

Definition at line 383 of file glk_api.cpp.

◆ glk_put_string()

void Glk::GlkAPI::glk_put_string ( const char *  s)

Definition at line 391 of file glk_api.cpp.

◆ glk_put_string_stream()

void Glk::GlkAPI::glk_put_string_stream ( strid_t  str,
const char *  s 
)

Definition at line 395 of file glk_api.cpp.

◆ glk_request_char_event()

void Glk::GlkAPI::glk_request_char_event ( winid_t  win)

Definition at line 713 of file glk_api.cpp.

◆ glk_request_hyperlink_event()

void Glk::GlkAPI::glk_request_hyperlink_event ( winid_t  win)

Definition at line 1113 of file glk_api.cpp.

◆ glk_request_line_event()

void Glk::GlkAPI::glk_request_line_event ( winid_t  win,
char *  buf,
uint  maxlen,
uint  initlen 
)

Definition at line 702 of file glk_api.cpp.

◆ glk_request_mouse_event()

void Glk::GlkAPI::glk_request_mouse_event ( winid_t  win)

Definition at line 724 of file glk_api.cpp.

◆ glk_request_timer_events()

void Glk::GlkAPI::glk_request_timer_events ( uint  millisecs)

Definition at line 698 of file glk_api.cpp.

◆ glk_schannel_create()

schanid_t Glk::GlkAPI::glk_schannel_create ( uint  rock = 0)

Definition at line 1006 of file glk_api.cpp.

◆ glk_schannel_create_ext()

schanid_t Glk::GlkAPI::glk_schannel_create_ext ( uint  rock,
uint  volume 
)

Definition at line 1069 of file glk_api.cpp.

◆ glk_schannel_destroy()

void Glk::GlkAPI::glk_schannel_destroy ( schanid_t  chan)

Definition at line 1010 of file glk_api.cpp.

◆ glk_schannel_get_rock()

uint Glk::GlkAPI::glk_schannel_get_rock ( schanid_t  chan)

Definition at line 1022 of file glk_api.cpp.

◆ glk_schannel_iterate()

schanid_t Glk::GlkAPI::glk_schannel_iterate ( schanid_t  chan,
uint rockptr 
)

Definition at line 1018 of file glk_api.cpp.

◆ glk_schannel_pause()

void Glk::GlkAPI::glk_schannel_pause ( schanid_t  chan)

Definition at line 1079 of file glk_api.cpp.

◆ glk_schannel_play()

uint Glk::GlkAPI::glk_schannel_play ( schanid_t  chan,
uint  snd 
)

Definition at line 1031 of file glk_api.cpp.

◆ glk_schannel_play_ext()

uint Glk::GlkAPI::glk_schannel_play_ext ( schanid_t  chan,
uint  snd,
uint  repeats,
uint  notify 
)

Definition at line 1040 of file glk_api.cpp.

◆ glk_schannel_play_multi()

uint Glk::GlkAPI::glk_schannel_play_multi ( schanid_t chanarray,
uint  chancount,
uint sndarray,
uint  soundcount,
uint  notify 
)

Definition at line 1073 of file glk_api.cpp.

◆ glk_schannel_set_volume()

void Glk::GlkAPI::glk_schannel_set_volume ( schanid_t  chan,
uint  vol 
)

Definition at line 1057 of file glk_api.cpp.

◆ glk_schannel_set_volume_ext()

void Glk::GlkAPI::glk_schannel_set_volume_ext ( schanid_t  chan,
uint  vol,
uint  duration,
uint  notify 
)

Definition at line 1095 of file glk_api.cpp.

◆ glk_schannel_stop()

void Glk::GlkAPI::glk_schannel_stop ( schanid_t  chan)

Definition at line 1049 of file glk_api.cpp.

◆ glk_schannel_unpause()

void Glk::GlkAPI::glk_schannel_unpause ( schanid_t  chan)

Definition at line 1087 of file glk_api.cpp.

◆ glk_select()

void Glk::GlkAPI::glk_select ( event_t event)

Definition at line 680 of file glk_api.cpp.

◆ glk_select_poll()

void Glk::GlkAPI::glk_select_poll ( event_t event)

Definition at line 689 of file glk_api.cpp.

◆ glk_set_echo_line_event()

void Glk::GlkAPI::glk_set_echo_line_event ( winid_t  win,
uint  val 
)

Definition at line 756 of file glk_api.cpp.

◆ glk_set_hyperlink()

void Glk::GlkAPI::glk_set_hyperlink ( uint  linkval)

Definition at line 1104 of file glk_api.cpp.

◆ glk_set_hyperlink_stream()

void Glk::GlkAPI::glk_set_hyperlink_stream ( strid_t  str,
uint  linkval 
)

Definition at line 1108 of file glk_api.cpp.

◆ glk_set_interrupt_handler()

void Glk::GlkAPI::glk_set_interrupt_handler ( void(*)(void)  func)

Definition at line 72 of file glk_api.cpp.

◆ glk_set_style()

void Glk::GlkAPI::glk_set_style ( uint  styl)

Definition at line 407 of file glk_api.cpp.

◆ glk_set_style_stream()

void Glk::GlkAPI::glk_set_style_stream ( strid_t  str,
uint  styl 
)

Definition at line 411 of file glk_api.cpp.

◆ glk_set_terminators_line_event()

void Glk::GlkAPI::glk_set_terminators_line_event ( winid_t  win,
const uint32 keycodes,
uint  count 
)

Definition at line 764 of file glk_api.cpp.

◆ glk_set_window()

void Glk::GlkAPI::glk_set_window ( winid_t  win)

Definition at line 325 of file glk_api.cpp.

◆ glk_simple_time_to_date_local()

void Glk::GlkAPI::glk_simple_time_to_date_local ( int  time,
uint  factor,
glkdate_t date 
)

Definition at line 1157 of file glk_api.cpp.

◆ glk_simple_time_to_date_utc()

void Glk::GlkAPI::glk_simple_time_to_date_utc ( int  time,
uint  factor,
glkdate_t date 
)

Definition at line 1152 of file glk_api.cpp.

◆ glk_sound_load_hint()

void Glk::GlkAPI::glk_sound_load_hint ( uint  snd,
uint  flag 
)

Definition at line 1065 of file glk_api.cpp.

◆ glk_stream_close()

void Glk::GlkAPI::glk_stream_close ( strid_t  str,
stream_result_t result = nullptr 
)

Definition at line 337 of file glk_api.cpp.

◆ glk_stream_get_current()

strid_t Glk::GlkAPI::glk_stream_get_current ( void  )

Definition at line 375 of file glk_api.cpp.

◆ glk_stream_get_position()

uint Glk::GlkAPI::glk_stream_get_position ( strid_t  str) const

Definition at line 362 of file glk_api.cpp.

◆ glk_stream_get_rock()

uint Glk::GlkAPI::glk_stream_get_rock ( strid_t  str) const

Definition at line 345 of file glk_api.cpp.

◆ glk_stream_iterate()

strid_t Glk::GlkAPI::glk_stream_iterate ( strid_t  str,
uint rockptr 
) const

Definition at line 341 of file glk_api.cpp.

◆ glk_stream_open_file()

strid_t Glk::GlkAPI::glk_stream_open_file ( frefid_t  fileref,
FileMode  fmode,
uint  rock = 0 
)

Definition at line 329 of file glk_api.cpp.

◆ glk_stream_open_memory()

strid_t Glk::GlkAPI::glk_stream_open_memory ( char *  buf,
uint  buflen,
FileMode  fmode,
uint  rock = 0 
)

Definition at line 333 of file glk_api.cpp.

◆ glk_stream_set_current()

void Glk::GlkAPI::glk_stream_set_current ( strid_t  str)

Definition at line 371 of file glk_api.cpp.

◆ glk_stream_set_position()

void Glk::GlkAPI::glk_stream_set_position ( strid_t  str,
int  pos,
uint  seekMode 
)

Definition at line 354 of file glk_api.cpp.

◆ glk_style_distinguish()

uint Glk::GlkAPI::glk_style_distinguish ( winid_t  win,
uint  style1,
uint  style2 
)

Definition at line 563 of file glk_api.cpp.

◆ glk_style_measure()

bool Glk::GlkAPI::glk_style_measure ( winid_t  win,
uint  style,
uint  hint,
uint result 
)

Definition at line 571 of file glk_api.cpp.

◆ glk_stylehint_clear()

void Glk::GlkAPI::glk_stylehint_clear ( uint  wintype,
uint  style,
uint  hint 
)

Definition at line 516 of file glk_api.cpp.

◆ glk_stylehint_set()

void Glk::GlkAPI::glk_stylehint_set ( uint  wintype,
uint  styl,
uint  hint,
int  val 
)

Definition at line 446 of file glk_api.cpp.

◆ glk_tick()

void Glk::GlkAPI::glk_tick ( void  )

Definition at line 76 of file glk_api.cpp.

◆ glk_time_to_date_local()

void Glk::GlkAPI::glk_time_to_date_local ( const glktimeval_t time,
glkdate_t date 
)

Definition at line 1148 of file glk_api.cpp.

◆ glk_time_to_date_utc()

void Glk::GlkAPI::glk_time_to_date_utc ( const glktimeval_t time,
glkdate_t date 
)

Definition at line 1143 of file glk_api.cpp.

◆ glk_window_clear()

void Glk::GlkAPI::glk_window_clear ( winid_t  win)

Definition at line 270 of file glk_api.cpp.

◆ glk_window_close()

void Glk::GlkAPI::glk_window_close ( winid_t  win,
stream_result_t result = nullptr 
)

Definition at line 176 of file glk_api.cpp.

◆ glk_window_erase_rect()

void Glk::GlkAPI::glk_window_erase_rect ( winid_t  win,
int  left,
int  top,
uint  width,
uint  height 
)

Definition at line 981 of file glk_api.cpp.

◆ glk_window_fill_rect()

void Glk::GlkAPI::glk_window_fill_rect ( winid_t  win,
uint  color,
int  left,
int  top,
uint  width,
uint  height 
)

Definition at line 989 of file glk_api.cpp.

◆ glk_window_flow_break()

void Glk::GlkAPI::glk_window_flow_break ( winid_t  win)

Definition at line 973 of file glk_api.cpp.

◆ glk_window_get_arrangement()

void Glk::GlkAPI::glk_window_get_arrangement ( winid_t  win,
uint method,
uint size,
winid_t keyWin 
)

Definition at line 200 of file glk_api.cpp.

◆ glk_window_get_echo_stream()

strid_t Glk::GlkAPI::glk_window_get_echo_stream ( winid_t  win)

Definition at line 316 of file glk_api.cpp.

◆ glk_window_get_parent()

winid_t Glk::GlkAPI::glk_window_get_parent ( winid_t  win)

Definition at line 242 of file glk_api.cpp.

◆ glk_window_get_rock()

uint Glk::GlkAPI::glk_window_get_rock ( winid_t  win)

Definition at line 224 of file glk_api.cpp.

◆ glk_window_get_root()

winid_t Glk::GlkAPI::glk_window_get_root ( void  ) const

Get the root window of the window hierarchy.

Definition at line 168 of file glk_api.cpp.

◆ glk_window_get_sibling()

winid_t Glk::GlkAPI::glk_window_get_sibling ( winid_t  win)

Definition at line 251 of file glk_api.cpp.

◆ glk_window_get_size()

void Glk::GlkAPI::glk_window_get_size ( winid_t  win,
uint width,
uint height 
)

Definition at line 184 of file glk_api.cpp.

◆ glk_window_get_stream()

strid_t Glk::GlkAPI::glk_window_get_stream ( winid_t  win)

Definition at line 299 of file glk_api.cpp.

◆ glk_window_get_type()

uint Glk::GlkAPI::glk_window_get_type ( winid_t  win)

Definition at line 233 of file glk_api.cpp.

◆ glk_window_iterate()

winid_t Glk::GlkAPI::glk_window_iterate ( winid_t  win,
uint rock = 0 
)

Definition at line 209 of file glk_api.cpp.

◆ glk_window_move_cursor()

void Glk::GlkAPI::glk_window_move_cursor ( winid_t  win,
uint  xpos,
uint  ypos 
)

Definition at line 291 of file glk_api.cpp.

◆ glk_window_open()

winid_t Glk::GlkAPI::glk_window_open ( winid_t  split,
uint  method,
uint  size,
uint  wintype,
uint  rock = 0 
) const

Open a new window.

Definition at line 172 of file glk_api.cpp.

◆ glk_window_set_arrangement()

void Glk::GlkAPI::glk_window_set_arrangement ( winid_t  win,
uint  method,
uint  size,
winid_t  keyWin 
)

Definition at line 192 of file glk_api.cpp.

◆ glk_window_set_background_color()

void Glk::GlkAPI::glk_window_set_background_color ( winid_t  win,
uint  color 
)

Definition at line 998 of file glk_api.cpp.

◆ glk_window_set_echo_stream()

void Glk::GlkAPI::glk_window_set_echo_stream ( winid_t  win,
strid_t  str 
)

Definition at line 308 of file glk_api.cpp.

Member Data Documentation

◆ _charTolowerTable

unsigned char Glk::GlkAPI::_charTolowerTable[256]
private

Definition at line 53 of file glk_api.h.

◆ _charToupperTable

unsigned char Glk::GlkAPI::_charToupperTable[256]
private

Definition at line 54 of file glk_api.h.

◆ _gliFirstEvent

bool Glk::GlkAPI::_gliFirstEvent
private

Definition at line 52 of file glk_api.h.


The documentation for this class was generated from the following files: