UNPKG

glk

Version:

Glk protocol for JavaScript

275 lines (263 loc) 11.7 kB
/* This file contains data taken from gi_dispa.c, by Andrew Plotkin. The copyright notice for that file follows: gi_dispa.c: Dispatch layer for Glk API, version 0.7.5. Designed by Andrew Plotkin <erkyrath@eblong.com> http://eblong.com/zarf/glk/ This file is copyright 1998-2017 by Andrew Plotkin. It is distributed under the MIT license; see the "LICENSE" file. */ "use strict"; module.exports={ constants: [ [ "evtype_Arrange", (5) ], [ "evtype_CharInput", (2) ], [ "evtype_Hyperlink", (8) ], [ "evtype_LineInput", (3) ], [ "evtype_MouseInput", (4) ], [ "evtype_None", (0) ], [ "evtype_Redraw", (6) ], [ "evtype_SoundNotify", (7) ], [ "evtype_Timer", (1) ], [ "evtype_VolumeNotify", (9) ], [ "filemode_Read", (0x02) ], [ "filemode_ReadWrite", (0x03) ], [ "filemode_Write", (0x01) ], [ "filemode_WriteAppend", (0x05) ], [ "fileusage_BinaryMode", (0x000) ], [ "fileusage_Data", (0x00) ], [ "fileusage_InputRecord", (0x03) ], [ "fileusage_SavedGame", (0x01) ], [ "fileusage_TextMode", (0x100) ], [ "fileusage_Transcript", (0x02) ], [ "fileusage_TypeMask", (0x0f) ], [ "gestalt_CharInput", (1) ], [ "gestalt_CharOutput", (3) ], [ "gestalt_CharOutput_ApproxPrint", (1) ], [ "gestalt_CharOutput_CannotPrint", (0) ], [ "gestalt_CharOutput_ExactPrint", (2) ], [ "gestalt_DateTime", (20) ], [ "gestalt_DrawImage", (7) ], [ "gestalt_Graphics", (6) ], [ "gestalt_GraphicsTransparency", (14) ], [ "gestalt_HyperlinkInput", (12) ], [ "gestalt_Hyperlinks", (11) ], [ "gestalt_LineInput", (2) ], [ "gestalt_LineInputEcho", (17) ], [ "gestalt_LineTerminatorKey", (19) ], [ "gestalt_LineTerminators", (18) ], [ "gestalt_MouseInput", (4) ], [ "gestalt_ResourceStream", (22) ], [ "gestalt_Sound", (8) ], [ "gestalt_Sound2", (21) ], [ "gestalt_SoundMusic", (13) ], [ "gestalt_SoundNotify", (10) ], [ "gestalt_SoundVolume", (9) ], [ "gestalt_Timer", (5) ], [ "gestalt_Unicode", (15) ], [ "gestalt_UnicodeNorm", (16) ], [ "gestalt_Version", (0) ], [ "imagealign_InlineCenter", (0x03) ], [ "imagealign_InlineDown", (0x02) ], [ "imagealign_MarginLeft", (0x04) ], [ "imagealign_MarginRight", (0x05) ], [ "imagealign_InlineUp", (0x01) ], [ "keycode_Delete", (0xfffffff9) ], [ "keycode_Down", (0xfffffffb) ], [ "keycode_End", (0xfffffff3) ], [ "keycode_Escape", (0xfffffff8) ], [ "keycode_Func1", (0xffffffef) ], [ "keycode_Func10", (0xffffffe6) ], [ "keycode_Func11", (0xffffffe5) ], [ "keycode_Func12", (0xffffffe4) ], [ "keycode_Func2", (0xffffffee) ], [ "keycode_Func3", (0xffffffed) ], [ "keycode_Func4", (0xffffffec) ], [ "keycode_Func5", (0xffffffeb) ], [ "keycode_Func6", (0xffffffea) ], [ "keycode_Func7", (0xffffffe9) ], [ "keycode_Func8", (0xffffffe8) ], [ "keycode_Func9", (0xffffffe7) ], [ "keycode_Home", (0xfffffff4) ], [ "keycode_Left", (0xfffffffe) ], [ "keycode_MAXVAL", (28) ], [ "keycode_PageDown", (0xfffffff5) ], [ "keycode_PageUp", (0xfffffff6) ], [ "keycode_Return", (0xfffffffa) ], [ "keycode_Right", (0xfffffffd) ], [ "keycode_Tab", (0xfffffff7) ], [ "keycode_Unknown", (0xffffffff) ], [ "keycode_Up", (0xfffffffc) ], [ "seekmode_Current", (1) ], [ "seekmode_End", (2) ], [ "seekmode_Start", (0) ], [ "style_Alert", (5) ], [ "style_BlockQuote", (7) ], [ "style_Emphasized", (1) ], [ "style_Header", (3) ], [ "style_Input", (8) ], [ "style_NUMSTYLES", (11) ], [ "style_Normal", (0) ], [ "style_Note", (6) ], [ "style_Preformatted", (2) ], [ "style_Subheader", (4) ], [ "style_User1", (9) ], [ "style_User2", (10) ], [ "stylehint_BackColor", (8) ], [ "stylehint_Indentation", (0) ], [ "stylehint_Justification", (2) ], [ "stylehint_NUMHINTS", (10) ], [ "stylehint_Oblique", (5) ], [ "stylehint_ParaIndentation", (1) ], [ "stylehint_Proportional", (6) ], [ "stylehint_ReverseColor", (9) ], [ "stylehint_Size", (3) ], [ "stylehint_TextColor", (7) ], [ "stylehint_Weight", (4) ], [ "stylehint_just_Centered", (2) ], [ "stylehint_just_LeftFlush", (0) ], [ "stylehint_just_LeftRight", (1) ], [ "stylehint_just_RightFlush", (3) ], [ "winmethod_Above", (0x02) ], [ "winmethod_Below", (0x03) ], [ "winmethod_Border", (0x000) ], [ "winmethod_BorderMask", (0x100) ], [ "winmethod_DirMask", (0x0f) ], [ "winmethod_DivisionMask", (0xf0) ], [ "winmethod_Fixed", (0x10) ], [ "winmethod_Left", (0x00) ], [ "winmethod_NoBorder", (0x100) ], [ "winmethod_Proportional", (0x20) ], [ "winmethod_Right", (0x01) ], [ "wintype_AllTypes", (0) ], [ "wintype_Blank", (2) ], [ "wintype_Graphics", (5) ], [ "wintype_Pair", (1) ], [ "wintype_TextBuffer", (3) ], [ "wintype_TextGrid", (4) ], ], functions: g=>{ g.stream_open_resource_uni=g._dispatch(314,"3IuIu:Qb"); g.stream_open_resource=g._dispatch(73,"3IuIu:Qb"); g.date_to_simple_time_local=g._dispatch(367,"3>+[8IsIsIsIsIsIsIsIs]Iu:Is"); g.date_to_simple_time_utc=g._dispatch(366,"3>+[8IsIsIsIsIsIsIsIs]Iu:Is"); g.date_to_time_local=g._dispatch(365,"2>+[8IsIsIsIsIsIsIsIs]<+[3IsIuIs]:"); g.date_to_time_utc=g._dispatch(364,"2>+[8IsIsIsIsIsIsIsIs]<+[3IsIuIs]:"); g.simple_time_to_date_local=g._dispatch(363,"3IsIu<+[8IsIsIsIsIsIsIsIs]:"); g.simple_time_to_date_utc=g._dispatch(362,"3IsIu<+[8IsIsIsIsIsIsIsIs]:"); g.time_to_date_local=g._dispatch(361,"2>+[3IsIuIs]<+[8IsIsIsIsIsIsIsIs]:"); g.time_to_date_utc=g._dispatch(360,"2>+[3IsIuIs]<+[8IsIsIsIsIsIsIsIs]:"); g.current_simple_time=g._dispatch(353,"2Iu:Is"); g.current_time=g._dispatch(352,"1<+[3IsIuIs]:"); g.set_terminators_line_event=g._dispatch(337,"2Qa>#Iu:"); g.set_echo_line_event=g._dispatch(336,"2QaIu:"); g.buffer_canon_normalize_uni=g._dispatch(292,"3&+#IuIu:Iu"); g.buffer_canon_decompose_uni=g._dispatch(291,"3&+#IuIu:Iu"); g.request_line_event_uni=g._dispatch(321,"3Qa&+#!IuIu:"); g.request_char_event_uni=g._dispatch(320,"1Qa:"); g.stream_open_memory_uni=g._dispatch(313,"4&#!IuIuIu:Qb"); g.stream_open_file_uni=g._dispatch(312,"4QcIuIu:Qb"); g.get_line_stream_uni=g._dispatch(306,"3Qb<+#Iu:Iu"); g.get_buffer_stream_uni=g._dispatch(305,"3Qb<+#Iu:Iu"); g.get_char_stream_uni=g._dispatch(304,"2Qb:Is"); g.put_buffer_stream_uni=g._dispatch(301,"2Qb>+#Iu:"); g.put_string_stream_uni=g._dispatch(300,"2QbU:"); g.put_char_stream_uni=g._dispatch(299,"2QbIu:"); g.put_buffer_uni=g._dispatch(298,"1>+#Iu:"); g.put_string_uni=g._dispatch(297,"1U:"); g.put_char_uni=g._dispatch(296,"1Iu:"); g.buffer_to_title_case_uni=g._dispatch(290,"4&+#IuIuIu:Iu"); g.buffer_to_upper_case_uni=g._dispatch(289,"3&+#IuIu:Iu"); g.buffer_to_lower_case_uni=g._dispatch(288,"3&+#IuIu:Iu"); g.cancel_hyperlink_event=g._dispatch(259,"1Qa:"); g.request_hyperlink_event=g._dispatch(258,"1Qa:"); g.set_hyperlink_stream=g._dispatch(257,"2QbIu:"); g.set_hyperlink=g._dispatch(256,"1Iu:"); g.schannel_unpause=g._dispatch(255,"1Qd:"); g.schannel_pause=g._dispatch(254,"1Qd:"); g.schannel_set_volume_ext=g._dispatch(253,"4QdIuIuIu:"); g.schannel_play_multi=g._dispatch(247,"4>+#Qd>+#IuIu:Iu"); g.schannel_create_ext=g._dispatch(244,"3IuIu:Qd"); g.sound_load_hint=g._dispatch(252,"2IuIu:"); g.schannel_set_volume=g._dispatch(251,"2QdIu:"); g.schannel_stop=g._dispatch(250,"1Qd:"); g.schannel_play_ext=g._dispatch(249,"5QdIuIuIu:Iu"); g.schannel_play=g._dispatch(248,"3QdIu:Iu"); g.schannel_destroy=g._dispatch(243,"1Qd:"); g.schannel_create=g._dispatch(242,"2Iu:Qd"); g.schannel_get_rock=g._dispatch(241,"2Qd:Iu"); g.schannel_iterate=g._dispatch(240,"3Qd<Iu:Qd"); g.window_set_background_color=g._dispatch(235,"2QaIu:"); g.window_fill_rect=g._dispatch(234,"6QaIuIsIsIuIu:"); g.window_erase_rect=g._dispatch(233,"5QaIsIsIuIu:"); g.window_flow_break=g._dispatch(232,"1Qa:"); g.image_draw_scaled=g._dispatch(226,"7QaIuIsIsIuIu:Iu"); g.image_draw=g._dispatch(225,"5QaIuIsIs:Iu"); g.image_get_info=g._dispatch(224,"4Iu<Iu<Iu:Iu"); g.request_timer_events=g._dispatch(214,"1Iu:"); g.cancel_mouse_event=g._dispatch(213,"1Qa:"); g.request_mouse_event=g._dispatch(212,"1Qa:"); g.cancel_char_event=g._dispatch(211,"1Qa:"); g.request_char_event=g._dispatch(210,"1Qa:"); g.cancel_line_event=g._dispatch(209,"2Qa<[4IuQaIuIu]:"); g.request_line_event=g._dispatch(208,"3Qa&+#!CnIu:"); g.select_poll=g._dispatch(193,"1<+[4IuQaIuIu]:"); g.select=g._dispatch(192,"1<+[4IuQaIuIu]:"); g.style_measure=g._dispatch(179,"5QaIuIu<Iu:Iu"); g.style_distinguish=g._dispatch(178,"4QaIuIu:Iu"); g.stylehint_clear=g._dispatch(177,"3IuIuIu:"); g.stylehint_set=g._dispatch(176,"4IuIuIuIs:"); g.char_to_upper=g._dispatch(161,"2Cu:Cu"); g.char_to_lower=g._dispatch(160,"2Cu:Cu"); g.get_buffer_stream=g._dispatch(146,"3Qb<+#Cn:Iu"); g.get_line_stream=g._dispatch(145,"3Qb<+#Cn:Iu"); g.get_char_stream=g._dispatch(144,"2Qb:Is"); g.set_style_stream=g._dispatch(135,"2QbIu:"); g.set_style=g._dispatch(134,"1Iu:"); g.put_buffer_stream=g._dispatch(133,"2Qb>+#Cn:"); g.put_buffer=g._dispatch(132,"1>+#Cn:"); g.put_string_stream=g._dispatch(131,"2QbS:"); g.put_string=g._dispatch(130,"1S:"); g.put_char_stream=g._dispatch(129,"2QbCu:"); g.put_char=g._dispatch(128,"1Cu:"); g.fileref_create_from_fileref=g._dispatch(104,"4IuQcIu:Qc"); g.fileref_does_file_exist=g._dispatch(103,"2Qc:Iu"); g.fileref_delete_file=g._dispatch(102,"1Qc:"); g.fileref_get_rock=g._dispatch(101,"2Qc:Iu"); g.fileref_iterate=g._dispatch(100,"3Qc<Iu:Qc"); g.fileref_destroy=g._dispatch(99,"1Qc:"); g.fileref_create_by_prompt=g._dispatch(98,"4IuIuIu:Qc"); g.fileref_create_by_name=g._dispatch(97,"4IuSIu:Qc"); g.fileref_create_temp=g._dispatch(96,"3IuIu:Qc"); g.stream_get_current=g._dispatch(72,"1:Qb"); g.stream_set_current=g._dispatch(71,"1Qb:"); g.stream_get_position=g._dispatch(70,"2Qb:Iu"); g.stream_set_position=g._dispatch(69,"3QbIsIu:"); g.stream_close=g._dispatch(68,"2Qb<[2IuIu]:"); g.stream_open_memory=g._dispatch(67,"4&#!CnIuIu:Qb"); g.stream_open_file=g._dispatch(66,"4QcIuIu:Qb"); g.stream_get_rock=g._dispatch(65,"2Qb:Iu"); g.stream_iterate=g._dispatch(64,"3Qb<Iu:Qb"); g.window_get_sibling=g._dispatch(48,"2Qa:Qa"); g.set_window=g._dispatch(47,"1Qa:"); g.window_get_echo_stream=g._dispatch(46,"2Qa:Qb"); g.window_set_echo_stream=g._dispatch(45,"2QaQb:"); g.window_get_stream=g._dispatch(44,"2Qa:Qb"); g.window_move_cursor=g._dispatch(43,"3QaIuIu:"); g.window_clear=g._dispatch(42,"1Qa:"); g.window_get_parent=g._dispatch(41,"2Qa:Qa"); g.window_get_type=g._dispatch(40,"2Qa:Iu"); g.window_get_arrangement=g._dispatch(39,"4Qa<Iu<Iu<Qa:"); g.window_set_arrangement=g._dispatch(38,"4QaIuIuQa:"); g.window_get_size=g._dispatch(37,"3Qa<Iu<Iu:"); g.window_close=g._dispatch(36,"2Qa<[2IuIu]:"); g.window_open=g._dispatch(35,"6QaIuIuIuIu:Qa"); g.window_get_root=g._dispatch(34,"1:Qa"); g.window_get_rock=g._dispatch(33,"2Qa:Iu"); g.window_iterate=g._dispatch(32,"3Qa<Iu:Qa"); g.gestalt_ext=g._dispatch(5,"4IuIu&#Iu:Iu"); g.gestalt=g._dispatch(4,"3IuIu:Iu"); g.tick=g._dispatch(3,"0:"); g.exit=g._dispatch(1,"0:"); }, };