Data Structures | Defines | Typedefs | Functions | Variables

winX.h File Reference

Go to the source code of this file.

Data Structures

struct  text_buffer
struct  text_map_info_t
struct  tile_map_info_t
struct  map_info_t
struct  line_element
struct  mesg_info_t
struct  status_info_t
struct  x11_mi
struct  menu
struct  menu_info_t
struct  text_info_t
struct  xwindow
struct  AppResources

Defines

#define E   extern
#define DIMENSION_P   Dimension
#define START_SIZE   512
#define map_information   Win_info.Map_info
#define mesg_information   Win_info.Mesg_info
#define status_information   Win_info.Status_info
#define menu_information   Win_info.Menu_info
#define text_information   Win_info.Text_info
#define MAX_WINDOWS   20
#define NHW_NONE   0
#define NO_CLICK   0
#define DEFAULT_MESSAGE_WIDTH   60
#define DISPLAY_FILE_SIZE   35
#define MAX_KEY_STRING   64
#define DEFAULT_LINES_DISPLAYED   12
#define MAX_HISTORY   60
#define EXIT_ON_KEY_PRESS   0
#define EXIT_ON_KEY_OR_BUTTON_PRESS   1
#define EXIT_ON_EXIT   2
#define EXIT_ON_SENT_EVENT   3
#define check_winid(window)

Typedefs

typedef struct x11_mi x11_menu_item

Functions

E Widget FDECL (CreateDialog,(Widget, String, XtCallbackProc, XtCallbackProc))
E void FDECL (SetDialogPrompt,(Widget, String))
E String FDECL (GetDialogResponse,(Widget))
E void FDECL (SetDialogResponse,(Widget, String))
E void FDECL (positionpopup,(Widget, BOOLEAN_P))
E struct xwindowFDECL (find_widget,(Widget))
E Boolean FDECL (nhApproxColor,(Screen *, Colormap, char *, XColor *))
E Dimension FDECL (nhFontHeight,(Widget))
E char FDECL (key_event_to_char,(XKeyEvent *))
E void FDECL (msgkey,(Widget, XtPointer, XEvent *))
E void FDECL (nh_XtPopup,(Widget, int, Widget))
E void FDECL (nh_XtPopdown,(Widget))
E void NDECL (win_X11_init)
E void FDECL (nh_keyscroll,(Widget, XEvent *, String *, Cardinal *))
E void FDECL (set_message_slider,(struct xwindow *))
E void FDECL (create_message_window,(struct xwindow *, BOOLEAN_P, Widget))
E void FDECL (destroy_message_window,(struct xwindow *))
E void FDECL (display_message_window,(struct xwindow *))
E void FDECL (append_message,(struct xwindow *, const char *))
E void FDECL (set_last_pause,(struct xwindow *))
E void NDECL (post_process_tiles)
E void FDECL (check_cursor_visibility,(struct xwindow *))
E void FDECL (display_map_window,(struct xwindow *))
E void FDECL (clear_map_window,(struct xwindow *))
E void FDECL (map_input,(Widget, XEvent *, String *, Cardinal *))
E void FDECL (set_map_size,(struct xwindow *, DIMENSION_P, DIMENSION_P))
E void FDECL (create_map_window,(struct xwindow *, BOOLEAN_P, Widget))
E void FDECL (destroy_map_window,(struct xwindow *))
E int FDECL (x_event,(int))
E void FDECL (menu_delete,(Widget, XEvent *, String *, Cardinal *))
E void FDECL (menu_key,(Widget, XEvent *, String *, Cardinal *))
E void FDECL (create_menu_window,(struct xwindow *))
E void FDECL (destroy_menu_window,(struct xwindow *))
E void FDECL (ps_key,(Widget, XEvent *, String *, Cardinal *))
E void FDECL (race_key,(Widget, XEvent *, String *, Cardinal *))
E void FDECL (gend_key,(Widget, XEvent *, String *, Cardinal *))
E void FDECL (algn_key,(Widget, XEvent *, String *, Cardinal *))
E void FDECL (ec_delete,(Widget, XEvent *, String *, Cardinal *))
E void FDECL (ec_key,(Widget, XEvent *, String *, Cardinal *))
E void FDECL (create_status_window,(struct xwindow *, BOOLEAN_P, Widget))
E void FDECL (destroy_status_window,(struct xwindow *))
E void FDECL (adjust_status,(struct xwindow *, const char *))
E void NDECL (null_out_status)
E void NDECL (check_turn_events)
E void FDECL (delete_text,(Widget, XEvent *, String *, Cardinal *))
E void FDECL (dismiss_text,(Widget, XEvent *, String *, Cardinal *))
E void FDECL (key_dismiss_text,(Widget, XEvent *, String *, Cardinal *))
E void FDECL (add_to_text_window,(struct xwindow *, int, const char *))
E void FDECL (display_text_window,(struct xwindow *, BOOLEAN_P))
E void FDECL (create_text_window,(struct xwindow *))
E void FDECL (destroy_text_window,(struct xwindow *))
E void FDECL (clear_text_window,(struct xwindow *))
E void FDECL (append_text_buffer,(struct text_buffer *, const char *, BOOLEAN_P))
E void FDECL (init_text_buffer,(struct text_buffer *))
E void FDECL (clear_text_buffer,(struct text_buffer *))
E void FDECL (free_text_buffer,(struct text_buffer *))
E Widget FDECL (create_value,(Widget, const char *))
E void FDECL (set_name,(Widget, char *))
E void FDECL (set_name_width,(Widget, int))
E int FDECL (get_name_width,(Widget))
E void FDECL (set_value,(Widget, const char *))
E void FDECL (set_value_width,(Widget, int))
E int FDECL (get_value_width,(Widget))
E void FDECL (hilight_value,(Widget))
E void FDECL (swap_fg_bg,(Widget))
E void FDECL (X11_init_nhwindows,(int *, char **))
E void NDECL (X11_player_selection)
E void NDECL (X11_askname)
E void NDECL (X11_get_nh_event)
E void FDECL (X11_exit_nhwindows,(const char *))
E void FDECL (X11_suspend_nhwindows,(const char *))
E void NDECL (X11_resume_nhwindows)
E winid FDECL (X11_create_nhwindow,(int))
E void FDECL (X11_clear_nhwindow,(winid))
E void FDECL (X11_display_nhwindow,(winid, BOOLEAN_P))
E void FDECL (X11_destroy_nhwindow,(winid))
E void FDECL (X11_curs,(winid, int, int))
E void FDECL (X11_putstr,(winid, int, const char *))
E void FDECL (X11_display_file,(const char *, BOOLEAN_P))
E void FDECL (X11_start_menu,(winid))
E void FDECL (X11_add_menu,(winid, int, const ANY_P *, CHAR_P, CHAR_P, int, const char *, BOOLEAN_P))
E void FDECL (X11_end_menu,(winid, const char *))
E int FDECL (X11_select_menu,(winid, int, MENU_ITEM_P **))
E void NDECL (X11_update_inventory)
E void NDECL (X11_mark_synch)
E void NDECL (X11_wait_synch)
E void FDECL (X11_print_glyph,(winid, XCHAR_P, XCHAR_P, int))
E void FDECL (X11_raw_print,(const char *))
E void FDECL (X11_raw_print_bold,(const char *))
E int NDECL (X11_nhgetch)
E int FDECL (X11_nh_poskey,(int *, int *, int *))
E void NDECL (X11_nhbell)
E int NDECL (X11_doprev_message)
E char FDECL (X11_yn_function,(const char *, const char *, CHAR_P))
E void FDECL (X11_getlin,(const char *, char *))
E int NDECL (X11_get_ext_cmd)
E void FDECL (X11_number_pad,(int))
E void NDECL (X11_delay_output)
E void NDECL (X11_start_screen)
E void NDECL (X11_end_screen)
E void FDECL (genl_outrip,(winid, int))

Variables

E struct xwindow window_list [MAX_WINDOWS]
E XtAppContext app_context
E Widget toplevel
E Atom wm_delete_window
E boolean exit_x_event
E int click_x
E int click_y
E int click_button
E int updated_inventory
E AppResources appResources
E void(* input_func )()
struct window_procs X11_procs

Define Documentation

#define check_winid (   window )
Value:
if ((window) < 0 || (window) >= MAX_WINDOWS) {          \
            panic("illegal windid [%d] in %s at line %d",       \
                window, __FILE__, __LINE__);                    \
        }
#define DEFAULT_LINES_DISPLAYED   12
#define DEFAULT_MESSAGE_WIDTH   60
#define DIMENSION_P   Dimension
#define DISPLAY_FILE_SIZE   35
#define E   extern
#define EXIT_ON_EXIT   2
#define EXIT_ON_KEY_OR_BUTTON_PRESS   1
#define EXIT_ON_KEY_PRESS   0
#define EXIT_ON_SENT_EVENT   3
#define map_information   Win_info.Map_info
#define MAX_HISTORY   60
#define MAX_KEY_STRING   64
#define MAX_WINDOWS   20
#define menu_information   Win_info.Menu_info
#define mesg_information   Win_info.Mesg_info
#define NHW_NONE   0
#define NO_CLICK   0
#define START_SIZE   512
#define status_information   Win_info.Status_info
#define text_information   Win_info.Text_info

Typedef Documentation

typedef struct x11_mi x11_menu_item

Function Documentation

E Widget FDECL ( CreateDialog  ,
(Widget, String, XtCallbackProc, XtCallbackProc)   
)
E void FDECL ( genl_outrip  ,
(winid, int)   
)
E void FDECL ( SetDialogPrompt  ,
(Widget, String)   
)
E void FDECL ( SetDialogResponse  ,
(Widget, String)   
)
E Dimension FDECL ( nhFontHeight  ,
(Widget)   
)
E void FDECL ( X11_number_pad  ,
(int)   
)
E void FDECL ( create_message_window  ,
(struct xwindow *, BOOLEAN_P, Widget)   
)
E void FDECL ( X11_getlin  ,
(const char *, char *)   
)
E char FDECL ( X11_yn_function  ,
(const char *, const char *, CHAR_P)   
)
E void FDECL ( create_menu_window  ,
(struct xwindow *)   
)
E void FDECL ( hilight_value  ,
(Widget)   
)
E int FDECL ( X11_nh_poskey  ,
(int *, int *, int *)   
)
E void FDECL ( swap_fg_bg  ,
(Widget)   
)
E void FDECL ( X11_raw_print_bold  ,
(const char *)   
)
E void FDECL ( destroy_menu_window  ,
(struct xwindow *)   
)
E void FDECL ( X11_init_nhwindows  ,
(int *, char **)   
)
E void FDECL ( destroy_message_window  ,
(struct xwindow *)   
)
E void FDECL ( ps_key  ,
(Widget, XEvent *, String *, Cardinal *)   
)
E void FDECL ( race_key  ,
(Widget, XEvent *, String *, Cardinal *)   
)
E int FDECL ( X11_select_menu  ,
(winid, int, MENU_ITEM_P **)   
)
E void FDECL ( X11_end_menu  ,
(winid, const char *)   
)
E void FDECL ( X11_add_menu  ,
(winid, int, const ANY_P *, CHAR_P, CHAR_P, int, const char *, BOOLEAN_P)   
)
E void FDECL ( X11_start_menu  ,
(winid  
)
E void FDECL ( X11_display_file  ,
(const char *, BOOLEAN_P)   
)
E void FDECL ( X11_putstr  ,
(winid, int, const char *)   
)
E void FDECL ( X11_curs  ,
(winid, int, int)   
)
E void FDECL ( X11_destroy_nhwindow  ,
(winid  
)
E void FDECL ( X11_display_nhwindow  ,
(winid, BOOLEAN_P)   
)
E void FDECL ( X11_clear_nhwindow  ,
(winid  
)
E winid FDECL ( X11_create_nhwindow  ,
(int)   
)
E void FDECL ( X11_exit_nhwindows  ,
(const char *)   
)
E void FDECL ( X11_suspend_nhwindows  ,
(const char *)   
)
E char FDECL ( key_event_to_char  ,
(XKeyEvent *)   
)
E void FDECL ( display_message_window  ,
(struct xwindow *)   
)
E void FDECL ( gend_key  ,
(Widget, XEvent *, String *, Cardinal *)   
)
E void FDECL ( algn_key  ,
(Widget, XEvent *, String *, Cardinal *)   
)
E void FDECL ( append_message  ,
(struct xwindow *, const char *)   
)
E void FDECL ( ec_delete  ,
(Widget, XEvent *, String *, Cardinal *)   
)
E void FDECL ( ec_key  ,
(Widget, XEvent *, String *, Cardinal *)   
)
E int FDECL ( get_value_width  ,
(Widget)   
)
E void FDECL ( set_value_width  ,
(Widget, int)   
)
E void FDECL ( set_value  ,
(Widget, const char *)   
)
E int FDECL ( get_name_width  ,
(Widget)   
)
E void FDECL ( set_name_width  ,
(Widget, int)   
)
E void FDECL ( set_name  ,
(Widget, char *)   
)
E Widget FDECL ( create_value  ,
(Widget, const char *)   
)
E void FDECL ( free_text_buffer  ,
(struct text_buffer *)   
)
E void FDECL ( clear_text_buffer  ,
(struct text_buffer *)   
)
E void FDECL ( init_text_buffer  ,
(struct text_buffer *)   
)
E void FDECL ( append_text_buffer  ,
(struct text_buffer *, const char *, BOOLEAN_P)   
)
E void FDECL ( positionpopup  ,
(Widget, BOOLEAN_P)   
)
E void FDECL ( destroy_text_window  ,
(struct xwindow *)   
)
E void FDECL ( create_text_window  ,
(struct xwindow *)   
)
E void FDECL ( display_text_window  ,
(struct xwindow *, BOOLEAN_P)   
)
E void FDECL ( add_to_text_window  ,
(struct xwindow *, int, const char *)   
)
E void FDECL ( key_dismiss_text  ,
(Widget, XEvent *, String *, Cardinal *)   
)
E void FDECL ( dismiss_text  ,
(Widget, XEvent *, String *, Cardinal *)   
)
E void FDECL ( delete_text  ,
(Widget, XEvent *, String *, Cardinal *)   
)
E void FDECL ( X11_raw_print  ,
(const char *)   
)
E void FDECL ( X11_print_glyph  ,
(winid, XCHAR_P, XCHAR_P, int)   
)
E void FDECL ( msgkey  ,
(Widget, XtPointer, XEvent *)   
)
E void FDECL ( set_last_pause  ,
(struct xwindow *)   
)
E void FDECL ( create_status_window  ,
(struct xwindow *, BOOLEAN_P, Widget)   
)
E void FDECL ( destroy_status_window  ,
(struct xwindow *)   
)
E void FDECL ( adjust_status  ,
(struct xwindow *, const char *)   
)
E void FDECL ( nh_XtPopup  ,
(Widget, int, Widget)   
)
E void FDECL ( check_cursor_visibility  ,
(struct xwindow *)   
)
E void FDECL ( display_map_window  ,
(struct xwindow *)   
)
E String FDECL ( GetDialogResponse  ,
(Widget)   
)
E struct xwindow* FDECL ( find_widget  ,
(Widget)   
) [read]
E void FDECL ( nh_XtPopdown  ,
(Widget)   
)
E void FDECL ( menu_key  ,
(Widget, XEvent *, String *, Cardinal *)   
)
E void FDECL ( menu_delete  ,
(Widget, XEvent *, String *, Cardinal *)   
)
E int FDECL ( x_event  ,
(int)   
)
E void FDECL ( destroy_map_window  ,
(struct xwindow *)   
)
E void FDECL ( create_map_window  ,
(struct xwindow *, BOOLEAN_P, Widget)   
)
E void FDECL ( clear_text_window  ,
(struct xwindow *)   
)
E void FDECL ( clear_map_window  ,
(struct xwindow *)   
)
E void FDECL ( map_input  ,
(Widget, XEvent *, String *, Cardinal *)   
)
E void FDECL ( set_map_size  ,
(struct xwindow *, DIMENSION_P, DIMENSION_P)   
)
E Boolean FDECL ( nhApproxColor  ,
(Screen *, Colormap, char *, XColor *)   
)
E void FDECL ( nh_keyscroll  ,
(Widget, XEvent *, String *, Cardinal *)   
)
E void FDECL ( set_message_slider  ,
(struct xwindow *)   
)
E void NDECL ( X11_player_selection   )
E void NDECL ( check_turn_events   )
E void NDECL ( X11_mark_synch   )
E void NDECL ( X11_nhbell   )
E void NDECL ( X11_askname   )
E void NDECL ( X11_get_nh_event   )
E int NDECL ( X11_doprev_message   )
E void NDECL ( X11_delay_output   )
E void NDECL ( null_out_status   )
E void NDECL ( X11_end_screen   )
E int NDECL ( X11_get_ext_cmd   )
E void NDECL ( X11_update_inventory   )
E void NDECL ( win_X11_init   )
E int NDECL ( X11_nhgetch   )
E void NDECL ( X11_resume_nhwindows   )
E void NDECL ( X11_start_screen   )
E void NDECL ( post_process_tiles   )
E void NDECL ( X11_wait_synch   )

Variable Documentation

E XtAppContext app_context
E int click_button
E int click_x
E int click_y
E void(* input_func)()
E Widget toplevel
E struct xwindow window_list[MAX_WINDOWS]