NetHack Proxy Reference Manual |
---|
Game servicesGame services — Communicating with external interfaces |
#include <nhproxy/nhproxy.h> struct nhproxy_serv_callbacks; void nhproxy_serv_set_callbacks (struct nhproxy_serv_callbacks *callbacks); struct nhproxy_extension; void nhproxy_serv_set_extensions (struct nhproxy_extension *extents); nhproxy_bool_t nhproxy_serv_accept (char *game_name, char *version_string); char* nhproxy_serv_get_windowtype (void); nhproxy_bool_t nhproxy_serv_get_capabilities (int *capcp, char ***capvp); FILE* nhproxy_serv_config_file_open (void); void nhproxy_serv_config_file_close (FILE *fp); nhproxy_bool_t nhproxy_serv_may_change_name (void); void nhproxy_serv_print_layer (int w, int x, int y, int z, int glyph); nhproxy_bool_t nhproxy_serv_flush_layers (int w, int clearing, int no_glyph); int nhproxy_serv_get_mapwin (int window);
struct nhproxy_serv_callbacks { void (*display_inventory)(void); int (*dlbh_fopen)(const char *name, const char *mode); char *(*dlbh_fgets)(char *buf, int len, int fh); int (*dlbh_fread)(char *buf, int size, int nmemb, int fh); int (*dlbh_fwrite)(char *buf, int size, int nmemb, int fh); int (*dlbh_fclose)(int fh); void (*flush_screen)(void); void (*doredraw)(void); void (*interface_mode)(long mode); void (*parse_options)(char *opts); char *(*get_option)(const char *opt); struct nhproxy_cb_get_player_choices_res *(*get_player_choices)(void); void (*free_player_choices)(struct nhproxy_cb_get_player_choices_res *choices); struct nhproxy_cb_get_valid_selections_res *(*get_valid_selections)(void); void (*free_valid_selections)(struct nhproxy_cb_get_valid_selections_res *selections); void (*quit_game)(void); void (*display_score)(void); void (*doset)(void); struct nhproxy_cb_get_extended_commands_res *(*get_extended_commands)(void); void (*free_extended_commands)(struct nhproxy_cb_get_extended_commands_res *commands); char (*map_menu_cmd)(char ch); int (*get_standard_winid)(const char *window); struct nhproxy_cb_get_tilesets_res *(*get_tilesets)(void); void (*free_tilesets)(struct nhproxy_cb_get_tilesets_res *tilesets); struct nhproxy_cb_get_glyph_mapping_res *(*get_glyph_mapping)(void); void (*free_glyph_mapping)(struct nhproxy_cb_get_glyph_mapping_res *mapping); void (*set_option_mod_status)(const char *optnam, int status); };
void nhproxy_serv_set_callbacks (struct nhproxy_serv_callbacks *callbacks);
callbacks : |
struct nhproxy_extension { const char *name; const char *version; void (*init)(unsigned short id); int no_procedures; void (*handler)(unsigned short id, NhProxyXdr *request, NhProxyXdr *reply); };
void nhproxy_serv_set_extensions (struct nhproxy_extension *extents);
extents : |
nhproxy_bool_t nhproxy_serv_accept (char *game_name, char *version_string);
game_name : | |
version_string : | |
Returns : |
nhproxy_bool_t nhproxy_serv_get_capabilities (int *capcp, char ***capvp);
capcp : | |
capvp : | |
Returns : |
void nhproxy_serv_print_layer (int w, int x, int y, int z, int glyph);
w : | |
x : | |
y : | |
z : | |
glyph : |
nhproxy_bool_t nhproxy_serv_flush_layers (int w, int clearing, int no_glyph);
w : | |
clearing : | |
no_glyph : | |
Returns : |
<< Window procedures | External Interface Support >> |