Crossfire Client, Trunk
Functions
gtk2proto.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void account_add_character_failure (char *message)
 
void account_creation_failure (char *message)
 
void account_login_failure (char *message)
 
void account_show_login (void)
 
void add_marked_text_to_pane (Info_Pane *pane, const char *message, int type, int subtype, int orig_color)
 
void add_style_to_textbuffer (Info_Pane *pane, GtkStyle *base_style)
 
void add_tags_to_textbuffer (Info_Pane *pane, GtkTextBuffer *textbuf)
 
void addsmooth (guint16 face, guint16 smooth_face)
 
int associate_cache_entry (Cache_Entry *ce, int pixnum)
 
void bind_key (char *params)
 
void choose_char_window_show ()
 
void choose_character_init (void)
 
void clear_stat_mapping (void)
 
void client_pickup (guint32 pickup)
 
void client_tick (guint32 tick)
 
void close_container (item *op)
 
void command_show (const char *params)
 
void config_check ()
 
void config_init (GtkWidget *window_root)
 
void config_load (void)
 
int create_and_rescale_image_from_data (Cache_Entry *ce, int pixmap_num, guint8 *rgba_data, int width, int height)
 
void create_character_window_hide ()
 
void create_character_window_show ()
 
void create_new_character_failure (char *message)
 
void create_opengl_map_image (guint8 *data, PixmapInfo *pi)
 
void create_opengl_question_mark (void)
 
void default_msgctrl_configuration (void)
 
void display_map_doneupdate (int redraw, int notice)
 
int display_mapscroll (int dx, int dy)
 
void do_new_image (guint8 *data, PixmapInfo *pi)
 
void draw_ext_info (int orig_color, int type, int subtype, const char *message)
 
void draw_lists (void)
 
void draw_look_list (void)
 
void draw_magic_map (void)
 
void draw_map (void)
 
void draw_message_window (int redraw)
 
void draw_prompt (const char *str)
 
void draw_stats (int redraw)
 
void drawquarterlightmap_sdl (int tl, int tr, int bl, int br, int width, int height, int startx, int starty, int endx, int endy, int destx, int desty)
 
void error_dialog (char *description, char *information)
 
void focusoutfunc (GtkWidget *widget, GdkEventKey *event, GtkWidget *window)
 
void get_map_image_size (int face, guint8 *w, guint8 *h)
 
void get_window_coord (GtkWidget *win, int *x, int *y, int *wx, int *wy, int *w, int *h)
 
void gtk_command_history (int direction)
 
void gtk_complete_command (void)
 
void hide_all_login_windows (void)
 
void image_update_download_status (int start, int end, int total)
 
void info_buffer_flush (const int id)
 
void info_buffer_init (void)
 
void info_buffer_tick (void)
 
void info_get_styles (void)
 
void info_init (GtkWidget *window_root)
 
void init_create_character_window ()
 
void init_glx_opengl (GtkWidget *drawingarea)
 
void init_image_cache_data (void)
 
void init_menu_items ()
 
void init_opengl (GtkWidget *drawingarea)
 
int init_sounds (void)
 
void init_theme ()
 
void inventory_get_styles (void)
 
void inventory_init (GtkWidget *window_root)
 
void inventory_tick (void)
 
void item_event_container_clearing (item *container)
 
void item_event_item_changed (item *it)
 
void item_event_item_deleting (item *it)
 
gboolean keybinding_selection_func (GtkTreeSelection *selection, GtkTreeModel *model, GtkTreePath *path, gboolean path_currently_selected, gpointer userdata)
 
void keybindings_init (const char *character_name)
 
void keyfunc (GtkWidget *widget, GdkEventKey *event, GtkWidget *window)
 
void keyrelfunc (GtkWidget *widget, GdkEventKey *event, GtkWidget *window)
 
void keys_init (GtkWidget *window_root)
 
void load_msgctrl_configuration (void)
 
void load_theme (int reload)
 
void load_window_positions (GtkWidget *window_root)
 
void magic_map_flash_pos (void)
 
int main (int argc, char *argv[])
 
void map_check_resize (void)
 
void map_init (GtkWidget *window_root)
 
void menu_clear (void)
 
void metaserver_show_prompt (void)
 
void metaserver_ui_init ()
 
void msgctrl_init (GtkWidget *window_root)
 
void MusicCmd (const char *data, int len)
 
void my_log_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data)
 
void on_button_add_character_clicked (GtkButton *button, gpointer user_data)
 
void on_button_create_account_clicked (GtkButton *button, gpointer user_data)
 
void on_button_create_character_clicked (GtkButton *button, gpointer user_data)
 
void on_button_create_new_char_clicked (GtkButton *button, gpointer user_data)
 
void on_button_do_add_character_clicked (GtkButton *button, gpointer user_data)
 
void on_button_exit_client_clicked (GtkButton *button, gpointer user_data)
 
void on_button_go_metaserver_clicked (GtkButton *button, gpointer user_data)
 
void on_button_login_clicked (GtkButton *button, gpointer user_data)
 
void on_button_metaserver_quit_pressed (GtkButton *button, gpointer user_data)
 
void on_button_new_cancel_clicked (GtkButton *button, gpointer user_data)
 
void on_button_new_char_cancel_clicked (GtkButton *button, gpointer user_data)
 
void on_button_new_create_account_clicked (GtkButton *button, gpointer user_data)
 
void on_button_play_character_clicked (GtkButton *button, gpointer user_data)
 
void on_button_return_character_select_clicked (GtkButton *button, gpointer user_data)
 
void on_button_return_login_clicked (GtkButton *button, gpointer user_data)
 
void on_configure_activate (GtkWidget *menuitem, gpointer user_data)
 
gboolean on_drawingarea_magic_map_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
 
void on_entry_account_name_activate (GtkEntry *entry, gpointer user_data)
 
void on_entry_account_password_activate (GtkEntry *entry, gpointer user_data)
 
void on_entry_character (GtkEntry *entry, gpointer user_data)
 
void on_entry_commands_activate (GtkEntry *entry, gpointer user_data)
 
void on_entry_new_account (GtkEntry *entry, gpointer user_data)
 
void on_entry_new_character_name (GtkEntry *entry, gpointer user_data)
 
void on_kb_scope_togglebutton_character_toggled (GtkToggleButton *toggle_button, gpointer user_data)
 
void on_kb_scope_togglebutton_global_toggled (GtkToggleButton *toggle_button, gpointer user_data)
 
void on_keybinding_button_bind_clicked (GtkButton *button, gpointer user_data)
 
void on_keybinding_button_clear_clicked (GtkButton *button, gpointer user_data)
 
void on_keybinding_button_close_clicked (GtkButton *button, gpointer user_data)
 
void on_keybinding_button_remove_clicked (GtkButton *button, gpointer user_data)
 
void on_keybinding_button_update_clicked (GtkButton *button, gpointer user_data)
 
void on_keybinding_checkbutton_any_clicked (GtkCheckButton *cb, gpointer user_data)
 
gboolean on_keybinding_entry_key_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data)
 
void on_keybindings_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_all_weapons_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_arrows_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_body_armor_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_boots_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_bows_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_cloaks_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_containers_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_dont_pickup_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_drinks_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_flesh_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_food_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_gloves_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_helmets_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_jewels_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_keys_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_magical_items_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_missile_weapons_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_normal_book_scrolls_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_not_cursed_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_potions_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_ratio_10_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_ratio_15_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_ratio_20_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_ratio_25_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_ratio_30_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_ratio_35_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_ratio_40_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_ratio_45_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_ratio_50_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_ratio_5_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_ratio_pickup_off_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_shields_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_skillscrolls_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_spellbooks_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_stop_before_pickup_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_valuables_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_wands_rods_horns_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_metaserver_select_clicked (GtkButton *button, gpointer user_data)
 
void on_msgctrl_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_msgctrl_button_apply_clicked (GtkButton *button, gpointer user_data)
 
void on_msgctrl_button_close_clicked (GtkButton *button, gpointer user_data)
 
void on_msgctrl_button_defaults_clicked (GtkButton *button, gpointer user_data)
 
void on_msgctrl_button_load_clicked (GtkButton *button, gpointer user_data)
 
void on_msgctrl_button_save_clicked (GtkButton *button, gpointer user_data)
 
void on_save_window_position_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_skill_close_clicked (GtkButton *button, gpointer user_data)
 
void on_skill_ready_clicked (GtkButton *button, gpointer user_data)
 
void on_skill_treeview_row_activated (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data)
 
void on_skill_use_clicked (GtkButton *button, gpointer user_data)
 
void on_skills_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_spell_cast_clicked (GtkButton *button, gpointer user_data)
 
void on_spell_close_clicked (GtkButton *button, gpointer user_data)
 
void on_spell_invoke_clicked (GtkButton *button, gpointer user_data)
 
void on_spell_treeview_row_activated (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data)
 
void on_spell_window_size_allocate (GtkWidget *widget, gpointer user_data)
 
void on_spells_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_treeview_choose_character_activated (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data)
 
gboolean on_window_delete_event (GtkWidget *window, gpointer *user_data)
 
void on_window_destroy_event (GtkWidget *object, gpointer user_data)
 
void open_container (item *op)
 
void opengl_free_pixmap (PixmapInfo *pi)
 
void opengl_gen_map (int redraw)
 
void pickup_init (GtkWidget *window_root)
 
void play_sound_effect (gint8 x, gint8 y, guint8 dir, guint8 vol, guint8 type, const char *sound, const char *source)
 
guint8 * png_to_data (guint8 *data, int len, guint32 *width, guint32 *height)
 
void read_msgctrl_configuration (void)
 
guint8 * rescale_rgba_data (guint8 *data, int *width, int *height, int scale)
 
void reset_image_data (void)
 
void reset_keybinding_status (void)
 
void resize_map_window (int x, int y)
 
cairo_surface_t * rgba_to_cairo_surface (guint8 *data, int width, int height)
 
GdkPixbuf * rgba_to_gdkpixbuf (guint8 *data, int width, int height)
 
void save_defaults (void)
 
void save_msgctrl_configuration (void)
 
void save_winpos (void)
 
void sdl_gen_map (int redraw)
 
int sdl_mapscroll (int dx, int dy)
 
void set_text_tag_from_style (GtkTextTag *tag, GtkStyle *style, const GtkStyle *const base_style)
 
void set_weight_limit (guint32 wlim)
 
void show_main_client (void)
 
void Sound2Cmd (unsigned char *data, int len)
 
void spell_get_styles (void)
 
void start_login (int method)
 
void stats_get_styles (void)
 
void stats_init (GtkWidget *window_root)
 
void trigger_skill (GtkTreeIter iter, GtkTreeModel *model, int use_skill)
 
void unbind_key (const char *params)
 
void update_character_choose (const char *name, const char *class, const char *race, const char *face, const char *party, const char *map, int level, int faceno)
 
void update_keybinding_list (void)
 
void update_login_info (int type)
 
void update_msgctrl_configuration (void)
 
void update_skill_information (void)
 
void update_spell_information (void)
 
void update_stat (int stat_no, gint64 max_stat, gint64 current_stat, gint64 statbar_max, gint64 statbar_stat, int can_alert)
 
void x_set_echo (void)
 

Function Documentation

◆ account_add_character_failure()

void account_add_character_failure ( char *  message)

Handles a failure from the server - pretty basic - just throw up the message and let the user try again. This is a response to the 'failure accountaddplayer' command. Calling this account_add_character_failure may be a little bit of a misnomer, but all the other routines in this area refer to character, not player.

Parameters
messageMessage to display. Unlike other messages, the first word of this message should be an integer, which denotes if using the 'force' option would allow the user to override this.

Definition at line 282 of file account.c.

References add_character_to_account(), entry_character_name, entry_character_password, and label_add_status.

Here is the call graph for this function:

◆ account_creation_failure()

void account_creation_failure ( char *  message)

Handles a failure from the server - pretty basic - just throw up the message and let the user try again.

Parameters
message

Definition at line 692 of file account.c.

References label_create_account_status.

◆ account_login_failure()

void account_login_failure ( char *  message)

Handles a failure from the server - pretty basic - just throw up the message and let the user try again.

Parameters
message

Definition at line 868 of file account.c.

References label_account_login_status.

◆ account_show_login()

void account_show_login ( void  )

Definition at line 1302 of file account.c.

References button_login, entry_account_name, and main_notebook.

Referenced by main().

Here is the caller graph for this function:

◆ add_marked_text_to_pane()

void add_marked_text_to_pane ( Info_Pane pane,
const char *  message,
int  type,
int  subtype,
int  orig_color 
)

This just does the work of taking text (which may have markup) and putting it into the target pane. This is a lower level than the draw_ext_info() below, as it does not do message routing. This is called from draw_ext_info() below, as well as account.c to update news/motd/rules.

Parameters
panePointer to the pane info to draw info.
messageMessage that is parsed and displayed.
typeType of the message - for default coloring information.
subtypeSubtype of message - used for default coloring information.
orig_colorLegacy color hint not based on type that is used when a theme does not define a style for the message.
Note
Note both type and subtype are the values passed to draw_ext_info().

< Only if we get a [color] tag should we care, otherwise, the type/subtype should dictate color (unless no style set!)

Definition at line 802 of file info.c.

References add_to_textbuf(), FONT_ARCANE, FONT_FIXED, FONT_HAND, FONT_NORMAL, FONT_STRANGE, has_style, LOG(), LOG_ERROR, LOG_INFO, Info_Pane::msg_type_tags, NUM_COLORS, and usercolorname.

Referenced by draw_ext_info(), on_combobox_starting_map_changed(), and update_login_info().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_style_to_textbuffer()

void add_style_to_textbuffer ( Info_Pane pane,
GtkStyle *  base_style 
)

This is like add_tags_to_textbuffer above, but styles can be changed during the run of the client. So this has to be separate to note it it might be a reload.

Parameters
paneMessage panel number to update.
base_styleBase style if retrieved - may be null.

Definition at line 409 of file info.c.

References Info_Pane::color_tags, font_style_names, Info_Pane::font_tags, MAX_BUF, NUM_COLORS, NUM_FONTS, set_text_tag_from_style(), Info_Pane::textbuffer, and usercolorname.

Referenced by info_get_styles(), init_choose_char_window(), init_create_account_window(), init_create_character_window(), and init_login_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_tags_to_textbuffer()

void add_tags_to_textbuffer ( Info_Pane pane,
GtkTextBuffer *  textbuf 
)

Adds the various tags to the next buffer. If textbuf is non-null, then it also sets the text buffer for that pane to textbuf. This is called right now by info_get_styles() below and from within the account code.

Parameters
paneMessage panel number to add buffer to.
textbufText buffer to apply tags to. It is allowed to be null if info_pane[pane].textbuffer has already been set.

Definition at line 355 of file info.c.

References Info_Pane::bold_tag, Info_Pane::color_tags, Info_Pane::default_tag, Info_Pane::font_tags, Info_Pane::italic_tag, max_subtype, MSG_TYPE_LAST, Info_Pane::msg_type_tags, NUM_COLORS, NUM_FONTS, Info_Pane::textbuffer, and Info_Pane::underline_tag.

Referenced by info_get_styles(), init_choose_char_window(), init_create_account_window(), init_create_character_window(), and init_login_window().

Here is the caller graph for this function:

◆ addsmooth()

void addsmooth ( guint16  face,
guint16  smooth_face 
)

Referenced from common/commands.c

Parameters
face
smooth_face

Definition at line 251 of file image.c.

References pixmaps, and PixmapInfo::smooth_face.

◆ associate_cache_entry()

int associate_cache_entry ( Cache_Entry ce,
int  pixnum 
)

This functions associates image_data in the cache entry with the specific pixmap number. Currently, there is no failure condition, but there is the potential that in the future, we want to more closely look at the data and if it isn't valid, return the failure code.

Returns
0 on success, -1 on failure.

Definition at line 264 of file image.c.

References Cache_Entry::image_data, and pixmaps.

Referenced by finish_face_cmd().

Here is the caller graph for this function:

◆ choose_char_window_show()

void choose_char_window_show ( )

Basic little function - this is used because we make the choose_char_window widget private to this file, but the create_char.c file will need to show this if the user decides to abandon creation of a new character.

Definition at line 436 of file account.c.

References main_notebook.

Referenced by choose_character_init(), on_button_cc_cancel(), and on_button_new_char_cancel_clicked().

Here is the caller graph for this function:

◆ choose_character_init()

void choose_character_init ( )

Called when we get the accountplayers command from the server (indirectly via AccountPlayersCmd). This tells us to wipe any data from the treeview, but also hide any other windows and make the choose_character_window visible.

Definition at line 421 of file account.c.

References character_store, choose_char_window_show(), and hide_main_client().

Here is the call graph for this function:

◆ clear_stat_mapping()

void clear_stat_mapping ( void  )

Definition at line 771 of file stats.c.

References need_mapping_update.

Referenced by show_main_client().

Here is the caller graph for this function:

◆ client_pickup()

void client_pickup ( guint32  pickup)

We get pickup information from server, update our status.

Definition at line 630 of file pickup.c.

References no_recurse, num_pickups, pickup_mapping, pmode, and PU_RATIO.

◆ client_tick()

void client_tick ( guint32  tick)

◆ close_container()

void close_container ( item op)

Open and close_container are now no-ops - since these are now drawn inline as treestores, we don't need to update what we are drawing were. and since the activation of a container will cause the list to be redrawn, don't need to worry about making an explicit call here.

Parameters
op

Definition at line 647 of file inventory.c.

◆ command_show()

void command_show ( const char *  params)
Parameters
params

Definition at line 661 of file inventory.c.

References draw_ext_info(), inv_notebook, inv_notebooks, MAX_BUF, MSG_TYPE_CLIENT, MSG_TYPE_CLIENT_ERROR, NDI_RED, NUM_INV_LISTS, and num_inv_notebook_pages.

Here is the call graph for this function:

◆ config_init()

void config_init ( GtkWidget *  window_root)

◆ config_load()

void config_load ( )

Load settings from the user's configuration file into want_config.

Definition at line 442 of file config.c.

References config, config_dir, config_load_legacy(), config_names, CONFIG_NUMS, config_path, face_info, last_server, LOG(), LOG_DEBUG, predict_alpha, theme, THEME_DEFAULT, use_config, want_config, Face_Information_struct::want_faceset, and window_xml_file.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_and_rescale_image_from_data()

int create_and_rescale_image_from_data ( Cache_Entry ce,
int  pixmap_num,
guint8 *  rgba_data,
int  width,
int  height 
)

Takes the pixmap to put the data into, as well as the rgba data (ie, already loaded with png_to_data). Scales and stores the relevant data into the pixmap structure.

Parameters
cecan be NULL
pixmap_num
rgba_data
width
height
Returns
1 on failure.

Definition at line 142 of file image.c.

References CFG_DM_OPENGL, CONFIG_CACHE, CONFIG_DISPLAYMODE, CONFIG_ICONSCALE, create_full_icon_image(), create_icon_image(), create_map_image(), DEFAULT_IMAGE_SIZE, free_pixmap(), PixmapInfo::full_icon_height, PixmapInfo::full_icon_width, have_new_image, height, PixmapInfo::icon_height, PixmapInfo::icon_image, icon_rescale_factor, PixmapInfo::icon_width, Cache_Entry::image_data, PixmapInfo::map_image, MAX_ICON_SPACES, MAXPIXMAPNUM, pixmaps, rescale_rgba_data(), use_config, and width.

Referenced by display_newpng(), and finish_face_cmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_character_window_hide()

void create_character_window_hide ( )

Basically opposite as above - hide the create character windows - this is called from hide_all_login_windows(), which is called when the client gets an addme success command.

Definition at line 195 of file create_char.c.

References show_window(), and WINDOW_NONE.

Referenced by hide_all_login_windows().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_character_window_show()

void create_character_window_show ( )

This function is here so that other files, in particular account.c:on_button_create_character_clicked() can pop up this window. This function also requests necessary data from server if we don't already have it.

Definition at line 152 of file create_char.c.

References classes, create_character_set_sensitive(), create_character_window, cs_print_string(), csocket, ClientSocket::fd, label_cc_status_update, races, and stat_points.

Referenced by on_button_create_character_clicked().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_new_character_failure()

void create_new_character_failure ( char *  message)

Pop up a dialog window with the error from the server. Since both v1 and v2 character creation are supported, either the new_character_window or the create_character_window may be up, so we can not easily display an in window message - a pop up is probably better, but it will also work no matter what window is up.

Parameters
messagemessage - this comes from the server.

Definition at line 142 of file account.c.

References hide_main_client().

Here is the call graph for this function:

◆ create_opengl_map_image()

void create_opengl_map_image ( guint8 *  data,
PixmapInfo pi 
)

◆ create_opengl_question_mark()

void create_opengl_question_mark ( void  )

◆ default_msgctrl_configuration()

void default_msgctrl_configuration ( void  )

Setup the state of the message control dialog so the configuration matches the default settings built in to the client.

Iterate through each message type. For each, copy the built-in client default to the Message Control dialog state variables. All supported defaults are copied, not just the ones supported by the layout.

Definition at line 1774 of file info.c.

References message_control_t::buffer, msgctrl_data_t::buffer, buffer_control, buffer_control_t::count, buffer_parameter_t::default_state, MSG_TYPE_LAST, msgctrl_defaults, msgctrl_widgets, NUM_TEXT_VIEWS, message_control_t::pane, msgctrl_data_t::pane, buffer_parameter_t::state, boolean_widget_t::state, buffer_control_t::timer, and update_msgctrl_configuration().

Referenced by msgctrl_init(), and on_msgctrl_button_defaults_clicked().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ display_map_doneupdate()

void display_map_doneupdate ( int  redraw,
int  notice 
)

This is called after the map has been all digested. this should perhaps be removed, and left to being done from from the main event loop.

Parameters
redrawIf set, force redraw of all tiles.
noticeIf set, another call will follow soon.

Definition at line 622 of file map.c.

References map_updated, and redraw().

Here is the call graph for this function:

◆ display_mapscroll()

int display_mapscroll ( int  dx,
int  dy 
)

Definition at line 155 of file map.c.

◆ do_new_image()

void do_new_image ( guint8 *  data,
PixmapInfo pi 
)

Wrapper for accessing outside this file.

Definition at line 105 of file image.c.

References create_full_icon_image(), create_icon_image(), and create_map_image().

Referenced by map_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw_ext_info()

void draw_ext_info ( int  orig_color,
int  type,
int  subtype,
const char *  message 
)

A message processor that accepts messages along with meta information color and type. The message type and subtype are analyzed to select font and other text attributes. All gtk-v2 client messages pass through this processor before being output. Before addition of the output buffering feature, this was the message callback function. It is a separate function so that it can be called both by the callback, and but buffer maintenance functions.

Client-sourced messages generally should be passed directly to this handler instead of to the callback. This will save some overhead as the callback implements a system that coalesces duplicate messages - a feature that is not really applicable to most messages that do not come from the server.

Parameters
orig_colorSuggested text color that type/subtype can over-ride.
typeMessage type. See MSG_TYPE definitions in newclient.h.
subtypeMessage subtype. See MSG_TYPE_*_* values in newclient.h.
messageThe message text to display.

< When 0, the type is valid and may be used to pick the panel routing, otherwise the message can only go to the main message pane.

Definition at line 915 of file info.c.

References add_marked_text_to_pane(), CONFIG_TIMESTAMP, info_pane, LOG(), LOG_ERROR, MSG_TYPE_LAST, msgctrl_widgets, NUM_TEXT_VIEWS, and want_config.

Referenced by info_buffer_flush(), launch_mapedit(), load_msgctrl_configuration(), message_callback(), and save_msgctrl_configuration().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw_lists()

void draw_lists ( )

Redraws inventory and look windows when necessary

Definition at line 1165 of file inventory.c.

References Player_Struct::below, Player_Struct::container, cpl, draw_inv(), draw_look_list(), item_struct::env, inv_notebook, item_struct::inv_updated, and Player_Struct::ob.

Referenced by load_theme(), and redraw().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw_look_list()

void draw_look_list ( )

Draws the objects beneath the player.

Definition at line 835 of file inventory.c.

References add_object_to_store(), Player_Struct::below, Player_Struct::container, cpl, item_struct::inv, item_struct::next, item_struct::open, store_look, and treeview_look.

Referenced by draw_lists().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw_magic_map()

void draw_magic_map ( void  )

Definition at line 24 of file magicmap.c.

References cpl, FACE_COLOR_MASK, LOG(), LOG_WARNING, magic_map, MAGIC_MAP_PAGE, Player_Struct::magicmap, map_notebook, Player_Struct::mapxres, Player_Struct::mapyres, Player_Struct::mmapx, Player_Struct::mmapy, root_color, and Player_Struct::showmagic.

Referenced by on_drawingarea_magic_map_expose_event().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw_map()

void draw_map ( )

Draw the map window using the appropriate backend.

Definition at line 476 of file map.c.

References CONFIG_MAPSCALE, gtk_map_redraw(), LOG(), LOG_DEBUG, map_check_resize(), MIN, time_map_redraw, update_global_offset(), and use_config.

Referenced by map_expose_event(), and redraw().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw_message_window()

void draw_message_window ( int  redraw)

◆ draw_stats()

void draw_stats ( int  redraw)

◆ drawquarterlightmap_sdl()

void drawquarterlightmap_sdl ( int  tl,
int  tr,
int  bl,
int  br,
int  width,
int  height,
int  startx,
int  starty,
int  endx,
int  endy,
int  destx,
int  desty 
)

◆ error_dialog()

void error_dialog ( char *  error,
char *  message 
)

Display an error message dialog. The dialog contains a multi-line, bolded heading that includes the client version information, an error description, and information relevant to the error condition.

Definition at line 314 of file main.c.

Referenced by event_loop(), and init_ui().

Here is the caller graph for this function:

◆ get_map_image_size()

void get_map_image_size ( int  face,
guint8 *  w,
guint8 *  h 
)
Parameters
face
w
h

Definition at line 341 of file image.c.

References PixmapInfo::full_icon_height, PixmapInfo::full_icon_width, map_image_size, MAXPIXMAPNUM, and pixmaps.

◆ get_window_coord()

void get_window_coord ( GtkWidget *  win,
int *  x,
int *  y,
int *  wx,
int *  wy,
int *  w,
int *  h 
)

Gets the coordinates of a specified window.

Parameters
winPass in a GtkWidget pointer to get its coordinates.
xParent-relative window x coordinate
yParent-relative window y coordinate
wx?
wy?
wWindow width
hWindow height

Definition at line 579 of file main.c.

Referenced by image_update_download_status(), and save_winpos().

Here is the caller graph for this function:

◆ hide_all_login_windows()

void hide_all_login_windows ( )

Hides all the login related windows. This is needed in case the client loses the connection to the server (either through player going to client/disconnect or network failure). get_metaserver() calls this, as well as AddMeSuccess

Definition at line 96 of file account.c.

References connect_window, create_character_window_hide(), has_init, new_character_window, and treeview_look.

Here is the call graph for this function:

◆ image_update_download_status()

void image_update_download_status ( int  start,
int  end,
int  total 
)

Draws a status bar showing where we our in terms of downloading all the image data. A few hacks: If start is 1, this is the first batch, so it means we need to create the appropriate status window. If start = end = total, it means were finished, so destroy the gui element.

Parameters
startThe start value just sent to the server.
end
totalThe total number of images.

Definition at line 309 of file image.c.

References get_window_coord(), pbar, pbar_window, and window_root.

Here is the call graph for this function:

◆ info_get_styles()

void info_get_styles ( void  )

Loads up values from the style file. Note that the actual name of the style file is set elsewhere.

This function is designed so that it should be possible to call it multiple times - it will release old style data and load up new values. In this way, a user should be able to change styles on the fly and have things work.

Definition at line 499 of file info.c.

References add_style_to_textbuffer(), add_tags_to_textbuffer(), has_init, has_style, info_pane, LOG(), LOG_INFO, MAX_BUF, max_subtype, Info_Pane::msg_type_tags, NUM_TEXT_VIEWS, and set_text_tag_from_style().

Referenced by load_theme().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ info_init()

void info_init ( GtkWidget *  window_root)

Initialize the information panels in the client. These panels are the client areas where text is drawn.

Parameters
window_rootPointer to the parent (root) application window.

Definition at line 632 of file info.c.

References Info_Pane::adjustment, info_buffer_init(), info_pane, MAX_BUF, message_callback(), MSG_TYPE_LAST, NUM_TEXT_VIEWS, Info_Pane::scrolled_window, setTextManager(), Info_Pane::textbuffer, Info_Pane::textmark, Info_Pane::textview, and window_xml.

Referenced by init_ui().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_create_character_window()

void init_create_character_window ( )

◆ init_glx_opengl()

void init_glx_opengl ( GtkWidget *  drawingarea)

◆ init_image_cache_data()

void init_image_cache_data ( void  )

Initializes the data for image caching Create question mark to display in each supported rendering mode when an image is not cached. When image caching is enabled, if a needed image is not yet in the cache, a question mark image is displayed instead. The image displayed is unique to the display mode. This function creates the image to use when OpenGL mode is in effect.

Definition at line 376 of file image.c.

References PixmapInfo::full_icon_height, PixmapInfo::full_icon_image, PixmapInfo::full_icon_width, PixmapInfo::icon_height, PixmapInfo::icon_image, PixmapInfo::icon_width, init_common_cache_data(), PixmapInfo::map_image, map_image_size, MAXPIXMAPNUM, pixmaps, and PixmapInfo::smooth_face.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_menu_items()

void init_menu_items ( )

Initialize menu bar items and connect their signals to their handlers.

Definition at line 89 of file menubar.c.

References menu_about(), menu_quit_character(), menu_quit_program(), on_configure_activate(), on_disconnect_activate(), on_keybindings_activate(), on_menu_all_weapons_activate(), on_menu_arrows_activate(), on_menu_body_armor_activate(), on_menu_boots_activate(), on_menu_bows_activate(), on_menu_cloaks_activate(), on_menu_containers_activate(), on_menu_dont_pickup_activate(), on_menu_drinks_activate(), on_menu_flesh_activate(), on_menu_food_activate(), on_menu_gloves_activate(), on_menu_helmets_activate(), on_menu_jewels_activate(), on_menu_keys_activate(), on_menu_magical_items_activate(), on_menu_missile_weapons_activate(), on_menu_normal_book_scrolls_activate(), on_menu_not_cursed_activate(), on_menu_potions_activate(), on_menu_ratio_10_activate(), on_menu_ratio_15_activate(), on_menu_ratio_20_activate(), on_menu_ratio_25_activate(), on_menu_ratio_35_activate(), on_menu_ratio_40_activate(), on_menu_ratio_45_activate(), on_menu_ratio_50_activate(), on_menu_ratio_5_activate(), on_menu_ratio_pickup_off_activate(), on_menu_shields_activate(), on_menu_skillscrolls_activate(), on_menu_spellbooks_activate(), on_menu_stop_before_pickup_activate(), on_menu_valuables_activate(), on_menu_wands_rods_horns_activate(), on_msgctrl_activate(), on_save_window_position_activate(), on_skills_activate(), on_spells_activate(), and window_xml.

Referenced by init_ui().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_opengl()

void init_opengl ( GtkWidget *  drawingarea)

◆ init_sounds()

int init_sounds ( void  )

Definition at line 26 of file sound.c.

References cf_snd_init().

Referenced by config_check(), and main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_theme()

void init_theme ( )

Definition at line 92 of file config.c.

References config_dir, default_files, MAX_BUF, and ui_name().

Referenced by init_ui().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ inventory_get_styles()

void inventory_get_styles ( )

Gets the style information for the inventory windows. This is a separate function because if the user changes styles, it can be nice to re-load the configuration. The style for the inventory/look is a bit special. That is because with gtk, styles are widget wide - all rows in the widget would use the same style. We want to adjust the styles based on other attributes.

Definition at line 501 of file inventory.c.

References has_init, inv_styles, LOG(), LOG_INFO, Style_Last, and Style_Names.

Referenced by load_theme().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ inventory_init()

void inventory_init ( GtkWidget *  window_root)

Set up the inventory viewer.

Parameters
window_rootThe client main window.

Definition at line 528 of file inventory.c.

References encumbrance_current, encumbrance_max, inv_notebook, inv_notebooks, inv_table, inv_table_children, INV_TREE, LIST_NUM_COLUMNS, list_row_collapse(), LOG(), LOG_ERROR, MAX_INV, NUM_INV_LISTS, num_inv_notebook_pages, on_switch_page(), setup_list_columns(), store_look, treestore, Notebook_Info::treeview, treeview_look, and window_xml.

Referenced by init_ui().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ inventory_tick()

void inventory_tick ( )

This is called periodically from main.c - basically a timeout, used to animate the inventory.

Definition at line 1304 of file inventory.c.

References animate_inventory(), and animate_look().

Referenced by client_tick().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ item_event_container_clearing()

void item_event_container_clearing ( item container)

Definition at line 773 of file inventory.c.

◆ item_event_item_changed()

void item_event_item_changed ( item it)

Definition at line 776 of file inventory.c.

◆ item_event_item_deleting()

void item_event_item_deleting ( item it)

Definition at line 760 of file inventory.c.

References Player_Struct::below, cpl, get_item_env(), item_struct::inv_updated, ITEM_GROUND, ITEM_INVENTORY, Player_Struct::ob, remove_object_from_store(), store_look, and treestore.

Here is the call graph for this function:

◆ load_msgctrl_configuration()

void load_msgctrl_configuration ( void  )

Setup the state of the message control dialog so the configuration matches a previously saved configuration.

Definition at line 1593 of file info.c.

References message_control_t::buffer, buffer_control, config_dir, buffer_control_t::count, draw_ext_info(), LOG(), LOG_DEBUG, LOG_ERROR, MAX_BUF, MSG_TYPE_CLIENT, MSG_TYPE_CLIENT_ERROR, MSG_TYPE_LAST, msgctrl_widgets, NDI_RED, NUM_TEXT_VIEWS, message_control_t::pane, buffer_parameter_t::state, boolean_widget_t::state, buffer_control_t::timer, and update_msgctrl_configuration().

Referenced by msgctrl_init(), and on_msgctrl_button_load_clicked().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_theme()

void load_theme ( int  reload)

◆ load_window_positions()

void load_window_positions ( GtkWidget *  window_root)

Resize the client window and its panels using saved window positions.

Parameters
window_rootThe client's main window.

Definition at line 848 of file config.c.

References config, ui_name(), window_root, and window_xml.

Referenced by init_ui().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ magic_map_flash_pos()

void magic_map_flash_pos ( )

Flash the player's position on the magic map.

Definition at line 77 of file magicmap.c.

References cpl, magic_map, Player_Struct::mapxres, Player_Struct::mapyres, Player_Struct::pmapx, Player_Struct::pmapy, root_color, and Player_Struct::showmagic.

Referenced by client_tick().

Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ map_init()

void map_init ( GtkWidget *  window_root)

This initializes the stuff we need for the map.

Parameters
window_rootThe client's main playing window.

Definition at line 86 of file map.c.

References CONFIG_MAPSCALE, DEFAULT_IMAGE_SIZE, do_new_image(), face_info, Face_Information_struct::faceset, Face_Information_struct::facesets, PixmapInfo::icon_height, PixmapInfo::icon_width, image_size, LOG(), LOG_ERROR, map_button_event(), map_check_resize(), map_drawing_area, map_expose_event(), map_image_size, map_notebook, pixmaps, rescale_rgba_data(), FaceSets_struct::size, use_config, and window_xml.

Referenced by show_main_client().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ menu_clear()

void menu_clear ( void  )

Clears all the message panels. It is not clear why someone would use it, but is called from the common area, and so is supported here.

Definition at line 1329 of file info.c.

References info_pane, and NUM_TEXT_VIEWS.

◆ metaserver_show_prompt()

void metaserver_show_prompt ( )

Constructs the metaserver dialog and handles metaserver selection. If the player has a servers.cache file in their .crossfire folder, the cached server list is added to the contents of the metaserver dialog.

Definition at line 215 of file metaserver.c.

References cpl, Player_Struct::input_state, last_server, main_notebook, metaserver_button, metaserver_entry, metaserver_refresh(), Metaserver_Select, and on_server_entry_changed().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ metaserver_ui_init()

void metaserver_ui_init ( )

◆ msgctrl_init()

void msgctrl_init ( GtkWidget *  window_root)

Initialize the message control panel by populating it with descriptions of each message type along with checkboxes that are used to configure the routing and duplicate suppression system. If previously saved settings are found on disk, they are loaded and applied, otherwise the built in client defaults are loaded and applied. This initialization must occur after the info_init() function runs.

Parameters
window_rootThe client main window
Todo:
Panes that are unsupported in the current layout should always have their routing disabled, and should disallow user interaction with the control but this logic is not yet implemented.

Definition at line 1348 of file info.c.

References message_control_t::buffer, buffer_control, buffer_control_t::count, default_msgctrl_configuration(), dialog_xml, load_msgctrl_configuration(), MSG_TYPE_LAST, msgctrl_defaults, msgctrl_table, msgctrl_widgets, msgctrl_window, NUM_TEXT_VIEWS, on_msgctrl_button_apply_clicked(), on_msgctrl_button_close_clicked(), on_msgctrl_button_defaults_clicked(), on_msgctrl_button_load_clicked(), on_msgctrl_button_save_clicked(), message_control_t::pane, buffer_parameter_t::ptr, boolean_widget_t::ptr, and buffer_control_t::timer.

Referenced by init_ui().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MusicCmd()

void MusicCmd ( const char *  data,
int  len 
)

Parse the data contained by a music command coming from the server and pass the name along to cfsndserv as a quoted string.

Parameters
dataData provided following the music command from the server that hints what kind of music should play. NONE is an indication that music should stop playing.
lenLength of the string describing the music to play.

Format of the music command received in data:

music {string}

Definition at line 113 of file sound.c.

References cf_play_music(), CONFIG_SOUND, LOG(), LOG_ERROR, and use_config.

Here is the call graph for this function:

◆ my_log_handler()

void my_log_handler ( const gchar *  log_domain,
GLogLevelFlags  log_level,
const gchar *  message,
gpointer  user_data 
)

This goes with the g_log_set_handler below in main(). I leave it here since it may be useful - basically, it can prove handy to try and track down error messages like:

file gtklabel.c: line 1845: assertion ‘GTK_IS_LABEL (label)’ failed

In the debugger, you can set a breakpoint in this function, and then see the stacktrace on what is trying to access a widget that isn't set or otherwise having issues.

Definition at line 337 of file main.c.

◆ on_button_add_character_clicked()

void on_button_add_character_clicked ( GtkButton *  button,
gpointer  user_data 
)

User has hit the add character button, so hide this window, show the add character window.

Parameters
button
user_data

Definition at line 500 of file account.c.

References entry_character_name, entry_character_password, and main_notebook.

Referenced by init_choose_char_window().

Here is the caller graph for this function:

◆ on_button_create_account_clicked()

void on_button_create_account_clicked ( GtkButton *  button,
gpointer  user_data 
)

User hit the create account button. So we need to hide the login window and bring up the create login window.

Parameters
button
user_data

Definition at line 879 of file account.c.

References entry_new_account_name, entry_new_account_password, entry_new_confirm_password, label_create_account_status, and main_notebook.

Referenced by init_login_window().

Here is the caller graph for this function:

◆ on_button_create_character_clicked()

void on_button_create_character_clicked ( GtkButton *  button,
gpointer  user_data 
)
Parameters
button
user_data

Definition at line 484 of file account.c.

References create_character_window_show(), entry_new_character_name, new_character_window, and serverloginmethod.

Referenced by init_choose_char_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_button_create_new_char_clicked()

void on_button_create_new_char_clicked ( GtkButton *  button,
gpointer  user_data 
)

User hit the create character button. Get data, send to server.

Parameters
button
user_data

Definition at line 184 of file account.c.

References create_new_character().

Referenced by init_new_character_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_button_do_add_character_clicked()

void on_button_do_add_character_clicked ( GtkButton *  button,
gpointer  user_data 
)

User has hit the add character button. Let add_character_to_account() do all the work.

Parameters
button
user_data

Definition at line 334 of file account.c.

References add_character_to_account(), entry_character_name, and entry_character_password.

Referenced by init_add_character_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_button_exit_client_clicked()

void on_button_exit_client_clicked ( GtkButton *  button,
gpointer  user_data 
)

User hit the exit client button. Pretty simple in this case.

Parameters
button
user_data

Definition at line 904 of file account.c.

References script_killall().

Here is the call graph for this function:

◆ on_button_go_metaserver_clicked()

void on_button_go_metaserver_clicked ( GtkButton *  button,
gpointer  user_data 
)

User hit the go to metaserver button. Need to disconnect from The server, and by clearing the csocket_fd, the main loop routine will bring up the metaserver window.

Parameters
button
user_data

Definition at line 895 of file account.c.

References client_disconnect().

Referenced by init_login_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_button_login_clicked()

void on_button_login_clicked ( GtkButton *  button,
gpointer  user_data 
)

User hit the login button - just call do_account_login()

Parameters
button
user_data

Definition at line 944 of file account.c.

References do_account_login(), entry_account_name, and entry_account_password.

Referenced by init_login_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_button_metaserver_quit_pressed()

void on_button_metaserver_quit_pressed ( GtkButton *  button,
gpointer  user_data 
)

Quits the client application if the quit button is pressed. This is also used to quit the client if the button's accelerator is pressed.

Parameters
button
user_data

Definition at line 281 of file metaserver.c.

References on_window_destroy_event().

Referenced by metaserver_ui_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_button_new_cancel_clicked()

void on_button_new_cancel_clicked ( GtkButton *  button,
gpointer  user_data 
)
Parameters
button
user_data

Definition at line 759 of file account.c.

References main_notebook.

Referenced by init_create_account_window().

Here is the caller graph for this function:

◆ on_button_new_char_cancel_clicked()

void on_button_new_char_cancel_clicked ( GtkButton *  button,
gpointer  user_data 
)

User his hit the cancel button in the new character window, so hide the new character window, show the choose character window.

Parameters
button
user_data

Definition at line 205 of file account.c.

References choose_char_window_show(), and new_character_window.

Referenced by init_new_character_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_button_new_create_account_clicked()

void on_button_new_create_account_clicked ( GtkButton *  button,
gpointer  user_data 
)

User clicked on the create account button. In this case, we just process the data and call do_account_create();

Parameters
button
user_data

Definition at line 738 of file account.c.

References do_account_create(), entry_new_account_name, entry_new_account_password, entry_new_confirm_password, and label_create_account_status.

Referenced by init_create_account_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_button_play_character_clicked()

void on_button_play_character_clicked ( GtkButton *  button,
gpointer  user_data 
)

User has hit the play character button. Grab the selected entry, if there is one.

Parameters
button
user_data

Definition at line 462 of file account.c.

References CHAR_NAME, play_character(), show_main_client(), and treeview_choose_character.

Referenced by init_choose_char_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_button_return_character_select_clicked()

void on_button_return_character_select_clicked ( GtkButton *  button,
gpointer  user_data 
)

User has hit the return to character selection button. Pretty simple - just hide this window, activate the other window.

Parameters
button
user_data

Definition at line 348 of file account.c.

References main_notebook.

Referenced by init_add_character_window().

Here is the caller graph for this function:

◆ on_button_return_login_clicked()

void on_button_return_login_clicked ( GtkButton *  button,
gpointer  user_data 
)

User has hit the return to login window, so hide this window, show the account login window.

Parameters
button
user_data

Definition at line 514 of file account.c.

References main_notebook.

Referenced by init_choose_char_window().

Here is the caller graph for this function:

◆ on_configure_activate()

void on_configure_activate ( GtkWidget *  menuitem,
gpointer  user_data 
)

Definition at line 778 of file config.c.

References config_dialog, and setup_config_dialog().

Referenced by init_menu_items(), and metaserver_ui_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_drawingarea_magic_map_expose_event()

gboolean on_drawingarea_magic_map_expose_event ( GtkWidget *  widget,
GdkEventExpose *  event,
gpointer  user_data 
)

Referenced by init_ui().

Here is the caller graph for this function:

◆ on_entry_account_name_activate()

void on_entry_account_name_activate ( GtkEntry *  entry,
gpointer  user_data 
)

User hit return in the name entry box.

Parameters
entry
user_data

Definition at line 954 of file account.c.

References entry_account_password.

Referenced by init_login_window().

Here is the caller graph for this function:

◆ on_entry_account_password_activate()

void on_entry_account_password_activate ( GtkEntry *  entry,
gpointer  user_data 
)

◆ on_entry_character()

void on_entry_character ( GtkEntry *  entry,
gpointer  user_data 
)

User has hit return in either name or password box. If both boxes have non empty data, process request. Otherwise, either stay in same box if this box is empty, or move to the other box.

Parameters
entryEntry widget which generated this callback.
user_data

Definition at line 361 of file account.c.

References add_character_to_account(), entry_character_name, and entry_character_password.

Referenced by init_add_character_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_entry_new_account()

void on_entry_new_account ( GtkEntry *  entry,
gpointer  user_data 
)

This handles cases where the user hits return in one of the entry boxes. We use the same callback for all 3 entry boxes, since the processing is basically the same - if there is valid data in all of them, we try to create an account - otherwise, we move to the next box.

Parameters
entryEntry box used to figure out what the next box is.
user_dataNot used.

Definition at line 773 of file account.c.

References do_account_create(), entry_new_account_name, entry_new_account_password, and entry_new_confirm_password.

Referenced by init_create_account_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_entry_new_character_name()

void on_entry_new_character_name ( GtkEntry *  entry,
gpointer  user_data 
)

User hit return in the new character name box. Like above, get data and send to server.

Parameters
entry
user_data

Definition at line 194 of file account.c.

References create_new_character().

Referenced by init_new_character_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_all_weapons_activate()

void on_menu_all_weapons_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 287 of file pickup.c.

References new_menu_pickup(), and PU_ALLWEAPON.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_arrows_activate()

void on_menu_arrows_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 308 of file pickup.c.

References new_menu_pickup(), and PU_ARROW.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_body_armor_activate()

void on_menu_body_armor_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 135 of file pickup.c.

References new_menu_pickup(), and PU_ARMOUR.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_boots_activate()

void on_menu_boots_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 142 of file pickup.c.

References new_menu_pickup(), and PU_BOOTS.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_bows_activate()

void on_menu_bows_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 301 of file pickup.c.

References new_menu_pickup(), and PU_BOW.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_cloaks_activate()

void on_menu_cloaks_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 149 of file pickup.c.

References new_menu_pickup(), and PU_CLOAK.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_containers_activate()

void on_menu_containers_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 269 of file pickup.c.

References new_menu_pickup(), and PU_CONTAINERS.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_dont_pickup_activate()

void on_menu_dont_pickup_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 117 of file pickup.c.

References new_menu_pickup(), and PU_INHIBIT.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_drinks_activate()

void on_menu_drinks_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 206 of file pickup.c.

References new_menu_pickup(), and PU_DRINK.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_flesh_activate()

void on_menu_flesh_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 276 of file pickup.c.

References new_menu_pickup(), and PU_FLESH.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_food_activate()

void on_menu_food_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 213 of file pickup.c.

References new_menu_pickup(), and PU_FOOD.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_gloves_activate()

void on_menu_gloves_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 156 of file pickup.c.

References new_menu_pickup(), and PU_GLOVES.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_helmets_activate()

void on_menu_helmets_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 163 of file pickup.c.

References new_menu_pickup(), and PU_HELMET.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_jewels_activate()

void on_menu_jewels_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 262 of file pickup.c.

References new_menu_pickup(), and PU_JEWELS.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_keys_activate()

void on_menu_keys_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 220 of file pickup.c.

References new_menu_pickup(), and PU_KEY.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_magical_items_activate()

void on_menu_magical_items_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 227 of file pickup.c.

References new_menu_pickup(), and PU_MAGICAL.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_missile_weapons_activate()

void on_menu_missile_weapons_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 294 of file pickup.c.

References new_menu_pickup(), and PU_MISSILEWEAPON.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_normal_book_scrolls_activate()

void on_menu_normal_book_scrolls_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 189 of file pickup.c.

References new_menu_pickup(), and PU_READABLES.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_not_cursed_activate()

void on_menu_not_cursed_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 255 of file pickup.c.

References new_menu_pickup(), and PU_NOT_CURSED.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_potions_activate()

void on_menu_potions_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 234 of file pickup.c.

References new_menu_pickup(), and PU_POTION.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_ratio_10_activate()

void on_menu_ratio_10_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 333 of file pickup.c.

References new_menu_pickup().

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_ratio_15_activate()

void on_menu_ratio_15_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 340 of file pickup.c.

References new_menu_pickup().

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_ratio_20_activate()

void on_menu_ratio_20_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 347 of file pickup.c.

References new_menu_pickup().

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_ratio_25_activate()

void on_menu_ratio_25_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 354 of file pickup.c.

References new_menu_pickup().

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_ratio_30_activate()

void on_menu_ratio_30_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 361 of file pickup.c.

References new_menu_pickup().

Here is the call graph for this function:

◆ on_menu_ratio_35_activate()

void on_menu_ratio_35_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 368 of file pickup.c.

References new_menu_pickup().

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_ratio_40_activate()

void on_menu_ratio_40_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 375 of file pickup.c.

References new_menu_pickup().

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_ratio_45_activate()

void on_menu_ratio_45_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 382 of file pickup.c.

References new_menu_pickup().

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_ratio_50_activate()

void on_menu_ratio_50_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 389 of file pickup.c.

References new_menu_pickup().

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_ratio_5_activate()

void on_menu_ratio_5_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 326 of file pickup.c.

References new_menu_pickup().

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_ratio_pickup_off_activate()

void on_menu_ratio_pickup_off_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 319 of file pickup.c.

References new_menu_pickup().

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_shields_activate()

void on_menu_shields_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 170 of file pickup.c.

References new_menu_pickup(), and PU_SHIELD.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_skillscrolls_activate()

void on_menu_skillscrolls_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 181 of file pickup.c.

References new_menu_pickup(), and PU_SKILLSCROLL.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_spellbooks_activate()

void on_menu_spellbooks_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 197 of file pickup.c.

References new_menu_pickup(), and PU_SPELLBOOK.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_stop_before_pickup_activate()

void on_menu_stop_before_pickup_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 124 of file pickup.c.

References new_menu_pickup(), and PU_STOP.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_valuables_activate()

void on_menu_valuables_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 241 of file pickup.c.

References new_menu_pickup(), and PU_VALUABLES.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_menu_wands_rods_horns_activate()

void on_menu_wands_rods_horns_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 248 of file pickup.c.

References new_menu_pickup(), and PU_MAGIC_DEVICE.

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_metaserver_select_clicked()

void on_metaserver_select_clicked ( GtkButton *  button,
gpointer  user_data 
)

Establish a connection with the server when pressing the connect button.

Parameters
button
user_data

Definition at line 267 of file metaserver.c.

References metaserver_connect_to(), and metaserver_entry.

Referenced by metaserver_ui_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_msgctrl_activate()

void on_msgctrl_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Shows the message control dialog when the menu item is activated. The settings shown on the dialog when it is activated are the settings currently in use.

Parameters
menuitem
user_data

Definition at line 1910 of file info.c.

References msgctrl_window.

Referenced by init_menu_items().

Here is the caller graph for this function:

◆ on_msgctrl_button_apply_clicked()

void on_msgctrl_button_apply_clicked ( GtkButton *  button,
gpointer  user_data 
)

When the message control dialog apply button is pressed, the currently displayed settings are applied. The dialog is not dismissed, but remains open for further adjustments to be made.

Parameters
button
user_data

Definition at line 1880 of file info.c.

References read_msgctrl_configuration().

Referenced by msgctrl_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_msgctrl_button_close_clicked()

void on_msgctrl_button_close_clicked ( GtkButton *  button,
gpointer  user_data 
)

When the message control dialog close button is pressed, the currently displayed settings are applied and the dialog is dismissed.

Parameters
button
user_data

Definition at line 1894 of file info.c.

References msgctrl_window, and read_msgctrl_configuration().

Referenced by msgctrl_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_msgctrl_button_defaults_clicked()

void on_msgctrl_button_defaults_clicked ( GtkButton *  button,
gpointer  user_data 
)

When the message control dialog defaults button is pressed, the default settings built into the client are restored and applied.

Parameters
button
user_data

Definition at line 1865 of file info.c.

References default_msgctrl_configuration().

Referenced by msgctrl_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_msgctrl_button_load_clicked()

void on_msgctrl_button_load_clicked ( GtkButton *  button,
gpointer  user_data 
)

When the message control dialog load button is pressed, the settings last saved are restored and applied. It may be used to "undo" both applied and unapplied setting changes.

Parameters
button
user_data

Definition at line 1851 of file info.c.

References load_msgctrl_configuration().

Referenced by msgctrl_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_msgctrl_button_save_clicked()

void on_msgctrl_button_save_clicked ( GtkButton *  button,
gpointer  user_data 
)

When the message control dialog save button is pressed, the currently shown settings are applied for immediate use and they are saved to disk so the settings persist across client sessions. Saved settings automatically load and apply when the client is started.

Parameters
button
user_data

Definition at line 1835 of file info.c.

References read_msgctrl_configuration(), and save_msgctrl_configuration().

Referenced by msgctrl_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_save_window_position_activate()

void on_save_window_position_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Handles saving of the window positions when the Client | Save Window Position menu item is activated.

Parameters
menuitem
user_data

Definition at line 834 of file config.c.

References save_winpos().

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_skill_close_clicked()

void on_skill_close_clicked ( GtkButton *  button,
gpointer  user_data 
)
Parameters
button
user_data

Definition at line 267 of file skills.c.

References skill_window.

Referenced by on_skills_activate().

Here is the caller graph for this function:

◆ on_skill_ready_clicked()

void on_skill_ready_clicked ( GtkButton *  button,
gpointer  user_data 
)
Parameters
button
user_data

Definition at line 238 of file skills.c.

References skill_selection, skill_window, and trigger_skill().

Referenced by on_skills_activate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_skill_treeview_row_activated()

void on_skill_treeview_row_activated ( GtkTreeView *  treeview,
GtkTreePath *  path,
GtkTreeViewColumn *  column,
gpointer  user_data 
)
Parameters
treeview
path
column
user_data

Definition at line 221 of file skills.c.

References skill_window, and trigger_skill().

Referenced by on_skills_activate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_skill_use_clicked()

void on_skill_use_clicked ( GtkButton *  button,
gpointer  user_data 
)
Parameters
button
user_data

Definition at line 253 of file skills.c.

References skill_selection, and trigger_skill().

Referenced by on_skills_activate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_skills_activate()

void on_skills_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)
Parameters
menuitem
user_data

Definition at line 106 of file skills.c.

References dialog_xml, has_init, LIST_EXP, LIST_LEVEL, LIST_NAME, LIST_NEXTLEVEL, on_skill_close_clicked(), on_skill_ready_clicked(), on_skill_treeview_row_activated(), on_skill_use_clicked(), skill_ready, skill_selection, skill_selection_func(), skill_store, skill_treeview, skill_use, skill_window, and update_skill_information().

Referenced by init_menu_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_spell_cast_clicked()

void on_spell_cast_clicked ( GtkButton *  button,
gpointer  user_data 
)
Parameters
button
user_data

Definition at line 515 of file spells.c.

References LIST_TAG, LOG(), LOG_ERROR, MAX_BUF, options, send_command(), spell_options, and spell_selection.

Referenced by on_spell_treeview_row_activated(), and on_spells_activate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_spell_close_clicked()

void on_spell_close_clicked ( GtkButton *  button,
gpointer  user_data 
)
Parameters
button
user_data

Definition at line 571 of file spells.c.

References spell_window.

Referenced by on_spells_activate().

Here is the caller graph for this function:

◆ on_spell_invoke_clicked()

void on_spell_invoke_clicked ( GtkButton *  button,
gpointer  user_data 
)
Parameters
button
user_data

Definition at line 543 of file spells.c.

References LIST_TAG, LOG(), LOG_ERROR, MAX_BUF, options, send_command(), spell_options, and spell_selection.

Referenced by on_spells_activate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_spell_treeview_row_activated()

void on_spell_treeview_row_activated ( GtkTreeView *  treeview,
GtkTreePath *  path,
GtkTreeViewColumn *  column,
gpointer  user_data 
)
Parameters
treeview
path
column
user_data

Definition at line 502 of file spells.c.

References on_spell_cast_clicked().

Referenced by on_spells_activate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_spell_window_size_allocate()

void on_spell_window_size_allocate ( GtkWidget *  widget,
gpointer  user_data 
)

Adjust the line wrap width used by the spells dialog Description column text renderer and force redraw of the rows to cause row height adjustment. To compute the new wrap width, the widths of all other columns are subtracted from the width of the spells window to determine the available width for the description column. The remaining space is then configured as the new wrap width. Once the new wrap is computed, mark all the rows changed so that the renderer adjusts the row height to expand or contract to fit the reformatted description.

Parameters
widget
user_data

Definition at line 124 of file spells.c.

References description_renderer, has_init, spell_store, spell_treeview, and width.

Referenced by on_spells_activate().

Here is the caller graph for this function:

◆ on_spells_activate()

void on_spells_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

◆ on_treeview_choose_character_activated()

void on_treeview_choose_character_activated ( GtkTreeView *  treeview,
GtkTreePath *  path,
GtkTreeViewColumn *  column,
gpointer  user_data 
)

◆ on_window_delete_event()

gboolean on_window_delete_event ( GtkWidget *  window,
gpointer *  user_data 
)

Prevent delete_event closure and/or hiding of account windows. All account system windows ignore delete events and remain visible unless the user clicks an appropriate button.

Parameters
windowPointer to an account window that received a delete_event.
user_dataUnused.

Definition at line 123 of file account.c.

Referenced by init_new_character_window().

Here is the caller graph for this function:

◆ on_window_destroy_event()

void on_window_destroy_event ( GtkWidget *  object,
gpointer  user_data 
)

Handles client shutdown.

Definition at line 213 of file main.c.

References LOG(), LOG_DEBUG, and script_killall().

Referenced by init_ui(), and on_button_metaserver_quit_pressed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ open_container()

void open_container ( item op)
Parameters
op

Definition at line 654 of file inventory.c.

◆ opengl_free_pixmap()

void opengl_free_pixmap ( PixmapInfo pi)

◆ opengl_gen_map()

void opengl_gen_map ( int  redraw)

◆ pickup_init()

void pickup_init ( GtkWidget *  window_root)

Maps the menuitem lists into pickup values. In this way, client_pickup knows what values to change.

Parameters
window_root

Definition at line 401 of file pickup.c.

References has_init, LOG(), LOG_ERROR, MAX_PICKUPS, PickupMapping::menuitem, num_pickups, pickup_mapping, PickupMapping::pickup_mode, PU_ALLWEAPON, PU_ARMOUR, PU_ARROW, PU_BOOTS, PU_BOW, PU_CLOAK, PU_CONTAINERS, PU_DRINK, PU_FLESH, PU_FOOD, PU_GLOVES, PU_HELMET, PU_INHIBIT, PU_JEWELS, PU_KEY, PU_MAGIC_DEVICE, PU_MAGICAL, PU_MISSILEWEAPON, PU_NOT_CURSED, PU_POTION, PU_RATIO, PU_READABLES, PU_SHIELD, PU_SKILLSCROLL, PU_SPELLBOOK, PU_STOP, PU_VALUABLES, and window_xml.

Referenced by init_ui().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ play_sound_effect()

void play_sound_effect ( gint8  x,
gint8  y,
guint8  dir,
guint8  vol,
guint8  type,
const char *  sound,
const char *  source 
)

◆ png_to_data()

guint8* png_to_data ( guint8 *  data,
int  len,
guint32 *  width,
guint32 *  height 
)

Definition at line 49 of file png.c.

References data_cp, data_len, data_start, height, LOG(), LOG_CRITICAL, LOG_ERROR, user_read_data(), and width.

Here is the call graph for this function:

◆ read_msgctrl_configuration()

void read_msgctrl_configuration ( void  )

Reads the state of the message control dialog and applies the settings to the msgctrl_widgets[] state variables that control the message routing and duplicate suppression system.

Definition at line 1796 of file info.c.

References message_control_t::buffer, buffer_control, buffer_control_t::count, MSG_TYPE_LAST, msgctrl_widgets, NUM_TEXT_VIEWS, message_control_t::pane, buffer_parameter_t::ptr, buffer_parameter_t::state, boolean_widget_t::state, and buffer_control_t::timer.

Referenced by on_msgctrl_button_apply_clicked(), on_msgctrl_button_close_clicked(), on_msgctrl_button_save_clicked(), and save_msgctrl_configuration().

Here is the caller graph for this function:

◆ rescale_rgba_data()

guint8* rescale_rgba_data ( guint8 *  data,
int *  width,
int *  height,
int  scale 
)

Takes png data and scales it accordingly. This function is based on pnmscale, but has been modified to support alpha channel - instead of blending the alpha channel, it takes the most opaque value - blending it is not likely to give sane results IMO - for any image that has transparent information, if we blended the alpha, the result would be the edges of that region being partially transparent. This function has also been re-written to use more static data - in the case of the client, it will be called thousands of times, so it doesn't make sense to free the data and then re-allocate it.

For pixels that are fully transparent, the end result after scaling is they will be tranparent black. This is a needed effect for blending to work properly.

This function returns a new pointer to the scaled image data. This is g_malloc'd data, so should be freed at some point to prevent leaks. This function does not modify the data passed to it - the caller is responsible for freeing it if it is no longer needed.

function arguments:

Parameters
*dataPNG data - this is any 4 byte per pixel data, in RGBA format.
*widthSource width modified to contain the new image size.
*heightSource height modified to contain the new image size.
scalePercentage size that new image should be. 100 is a same size image - values larger than 100 will result in zoom, values less than 100 will result in a shrinkage.

Definition at line 235 of file png.c.

References BPP, height, LOG(), LOG_CRITICAL, MAX_IMAGE_HEIGHT, MAX_IMAGE_WIDTH, RATIO, and width.

Referenced by create_and_rescale_image_from_data(), and map_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset_image_data()

void reset_image_data ( void  )

Connecting to different servers, try to clear out any old images. Try to free the data to prevent memory leaks. This could be more clever, ie, if we're caching images and go to a new server and get a name, we should try to re-arrange our cache or the like.

Definition at line 276 of file image.c.

References CONFIG_CACHE, free_pixmap(), MAXPIXMAPNUM, pixmaps, reset_image_cache_data(), and want_config.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resize_map_window()

void resize_map_window ( int  x,
int  y 
)

Resize_map_window is a NOOP for the time being - not sure if it will in fact need to do something, since there are scrollbars for the map window now. Note - this is note a window resize request, but rather process the size (in spaces) of the map - is received from server.

Definition at line 462 of file map.c.

◆ rgba_to_cairo_surface()

cairo_surface_t* rgba_to_cairo_surface ( guint8 *  data,
int  width,
int  height 
)

Create a Cairo surface for the given RGBA data.

Definition at line 440 of file png.c.

References height, and width.

Referenced by create_map_image().

Here is the caller graph for this function:

◆ rgba_to_gdkpixbuf()

GdkPixbuf* rgba_to_gdkpixbuf ( guint8 *  data,
int  width,
int  height 
)

Create a GdkPixbuf for the given RGBA data.

Definition at line 414 of file png.c.

References height, and width.

Referenced by create_full_icon_image(), and create_icon_image().

Here is the caller graph for this function:

◆ save_defaults()

void save_defaults ( )

This function saves user settings chosen using the configuration popup dialog.

Definition at line 513 of file config.c.

References config, config_names, CONFIG_NUMS, config_path, draw_ext_info(), face_info, last_server, MSG_TYPE_CLIENT, MSG_TYPE_CLIENT_CONFIG, NDI_RED, predict_alpha, theme, want_config, Face_Information_struct::want_faceset, and window_xml_file.

Referenced by on_config_close(), and save_winpos().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ save_msgctrl_configuration()

void save_msgctrl_configuration ( void  )

Applies the current state of the checkboxes to the msgctrl_widgets state variables and saves the settings to disk so the configuration persists across client sessions.

Definition at line 1525 of file info.c.

References buffer_control, config_dir, buffer_control_t::count, draw_ext_info(), LOG(), LOG_DEBUG, LOG_WARNING, make_path_to_file(), MAX_BUF, MSG_TYPE_CLIENT, MSG_TYPE_CLIENT_CONFIG, MSG_TYPE_CLIENT_ERROR, MSG_TYPE_LAST, msgctrl_widgets, NDI_BLUE, NDI_RED, NUM_TEXT_VIEWS, read_msgctrl_configuration(), buffer_parameter_t::state, and buffer_control_t::timer.

Referenced by on_msgctrl_button_save_clicked().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ save_winpos()

void save_winpos ( )

Save client window positions to a file unique to each layout.

Definition at line 793 of file config.c.

References config, draw_ext_info(), get_window_coord(), MSG_TYPE_CLIENT, MSG_TYPE_CLIENT_CONFIG, NDI_BLUE, save_defaults(), ui_name(), window_root, and window_xml.

Referenced by on_save_window_position_activate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdl_gen_map()

void sdl_gen_map ( int  redraw)

◆ sdl_mapscroll()

int sdl_mapscroll ( int  dx,
int  dy 
)

◆ set_text_tag_from_style()

void set_text_tag_from_style ( GtkTextTag *  tag,
GtkStyle *  style,
const GtkStyle *const  base_style 
)

Sets attributes in the text tag from a style. Best I can gather, there is no way to take all of the attributes from a style and apply them directly to a text tag, hence this function to do the work. GtkTextTags also know what attributes are set and which are not set - thus, you can apply multiple tags to the same text, and get all of the effects. For styles, that isn't the case - a style contains all of the information. So this function also compares the loaded style from the base style, and only sets the attributes that are different.

Parameters
tagText tag to set values on.
styleStyle name to get values from.
base_styleBase style for the widget to compare against.

Definition at line 317 of file info.c.

Referenced by add_style_to_textbuffer(), and info_get_styles().

Here is the caller graph for this function:

◆ set_weight_limit()

void set_weight_limit ( guint32  wlim)

No reason to divide by 1000 everytime we do the display, so do it once and store it here.

Parameters
wlim

Definition at line 693 of file inventory.c.

References weight_limit.

◆ show_main_client()

void show_main_client ( )

Show main client window. Called after connect if server does not support new loginmethod, or after character is selected.

Definition at line 466 of file main.c.

References clear_stat_mapping(), hide_all_login_windows(), map_init(), and window_root.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sound2Cmd()

void Sound2Cmd ( unsigned char *  data,
int  len 
)

Parse the data contained by a sound2 command coming from the server and handle playing the specified sound. See server doc/Developers/sound for details.

Parameters
dataData provided following the sound2 command from the server.
lenLength of the sound2 command data.

Format of the sound2 command recieved in data:

sound2 {x}{y}{dir}{volume}{type}{len_sound}{sound}{len_source}{source}
        b  b  b    b       b     b          str    b           str

Definition at line 38 of file sound.c.

References cf_play_sound(), CONFIG_SOUND, LOG(), LOG_WARNING, and use_config.

Here is the call graph for this function:

◆ spell_get_styles()

void spell_get_styles ( void  )

Gets the style information for the inventory windows. This is a separate function because if the user changes styles, it can be nice to re-load the configuration. The style for the inventory/look is a bit special. That is because with gtk, styles are widget wide - all rows in the widget would use the same style. We want to adjust the styles based on other attributes.

Definition at line 66 of file spells.c.

References LOG(), LOG_INFO, spell_styles, Style_Last, and Style_Names.

Referenced by load_theme(), and on_spells_activate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_login()

void start_login ( int  method)

Starts the login process. If not already done, gets widgets, sets up callboacks, etc. This is at the end of the file so all the callbacks are defined before this function - in that way, we do not need forward declarations. This is called from SetupCmd in common/commands.c

Parameters
methodLogin method that the server suppots.

Definition at line 1263 of file account.c.

References entry_account_name, entry_account_password, has_init, INFO_MOTD, INFO_NEWS, INFO_RULES, init_account_password_window(), init_add_character_window(), init_choose_char_window(), init_create_account_window(), init_login_window(), init_new_character_window(), serverloginmethod, and update_login_info().

Here is the call graph for this function:

◆ stats_get_styles()

void stats_get_styles ( void  )

Gets the style information for the stat bars (only portion of the window right now that has custom style support.

Definition at line 109 of file stats.c.

References bar_colors, has_init, LOG(), LOG_INFO, MAX_BUF, MAX_STAT_BARS, NUM_STYLES, stat_bar, stat_bar_names, and stat_style_names.

Referenced by load_theme().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stats_init()

void stats_init ( GtkWidget *  window_root)

◆ trigger_skill()

void trigger_skill ( GtkTreeIter  iter,
GtkTreeModel *  model,
int  use_skill 
)

This is where we actually do something with the skill. model and iter tell us which skill we want to trigger, use_skill is 1 to use the skill, 0 to ready it.

Parameters
iter
model
use_skill

Definition at line 197 of file skills.c.

References LIST_NAME, LOG(), LOG_ERROR, MAX_BUF, send_command(), and use_skill().

Referenced by on_skill_ready_clicked(), on_skill_treeview_row_activated(), and on_skill_use_clicked().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_character_choose()

void update_character_choose ( const char *  name,
const char *  class,
const char *  race,
const char *  face,
const char *  party,
const char *  map,
int  level,
int  faceno 
)

This gets data and adds it to the list store. This is called from AccountPlayersCmd and data is from the accountplayers protocol command. The parameters are data to add to the list store.

Parameters
name
class
race
face
party
map
level
faceno

Definition at line 547 of file account.c.

References CHAR_CLASS, CHAR_ICON, CHAR_IMAGE, CHAR_LEVEL, CHAR_MAP, CHAR_NAME, CHAR_PARTY, CHAR_RACE, character_store, map, and pixmaps.

◆ update_login_info()

void update_login_info ( int  type)

This is called from ReplyInfoCmd when it gets a response from news/motd/rules. It is very possible that the window will get displayed before we got a reply response, so this tells the client to update it.

Parameters
typeWhat data just got updated - text string of motd/news/rules

Definition at line 1174 of file account.c.

References add_marked_text_to_pane(), BIG_BUF, has_init, INFO_MOTD, INFO_NEWS, INFO_RULES, login_pane, motd, news, rules, textbuf_motd, textbuf_news, textbuf_rules_account, textbuf_rules_char, TEXTVIEW_MOTD, TEXTVIEW_NEWS, TEXTVIEW_RULES_ACCOUNT, and TEXTVIEW_RULES_CHAR.

Referenced by start_login().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_msgctrl_configuration()

void update_msgctrl_configuration ( void  )

Update the state of the message control dialog so the configuration matches the currently selected settings. Do not call this before msgctrl_widgets[] is initialized. It also really only makes sense to call it if changes have been made to msgctrl_widgets[].

Definition at line 1495 of file info.c.

References message_control_t::buffer, buffer_control, buffer_control_t::count, MSG_TYPE_LAST, msgctrl_widgets, NUM_TEXT_VIEWS, buffer_parameter_t::ptr, buffer_parameter_t::state, boolean_widget_t::state, and buffer_control_t::timer.

Referenced by default_msgctrl_configuration(), and load_msgctrl_configuration().

Here is the caller graph for this function:

◆ update_skill_information()

void update_skill_information ( void  )

Called whenever the skill window is opened or a stats packet is received. If the skills window has been created and is currently visible, it rebuilds the list store otherwise nothing happens, because it will be called again next time the window is opened anyway.

Definition at line 62 of file skills.c.

References cpl, dialog_xml, exp_table, exp_table_max, has_init, LIST_EXP, LIST_LEVEL, LIST_NAME, LIST_NEXTLEVEL, MAX_BUF, MAX_SKILL, Stat_struct::skill_exp, Stat_struct::skill_level, skill_mapping, skill_store, Player_Struct::stats, and NameMapping::value.

Referenced by draw_stats(), and on_skills_activate().

Here is the caller graph for this function:

◆ update_spell_information()

void update_spell_information ( void  )

◆ update_stat()

void update_stat ( int  stat_no,
gint64  max_stat,
gint64  current_stat,
gint64  statbar_max,
gint64  statbar_stat,
int  can_alert 
)

Updates the stat bar and text display as it pertains to a specific stat.

Parameters
stat_noThe stat number to update.
max_statThe normal maximum value this stat can have. Note that within game terms, the actual value can go above this via supercharging stats.
current_statcurrent value of the stat.
statbar_max
statbar_statthis is the stat value to use for drawing the statbar. For most stats, this is same as current stat, but for the exp bar, we basically want it to be a graph relative to amount for next level.
can_alertWhether this stat can go on alert when it gets low. It doesn't make sense for this to happen on exp (not really an alert if you gain a level). Note: This is no longer used with the new style code - if a stat shouldn't ever change color when it is low, the style should dictate that.

Definition at line 291 of file stats.c.

References bar_colors, CONFIG_GRAD_COLOR, format_si_number(), lastmax, lastval, stat_bar, STAT_BAR_EXP, STYLE_GRAD_LOW, STYLE_GRAD_NORMAL, STYLE_GRAD_SUPER, STYLE_LOW, STYLE_NORMAL, STYLE_SUPER, and use_config.

Referenced by draw_message_window().

Here is the call graph for this function:
Here is the caller graph for this function: