Crossfire Client, Branches
R11627
|
#include "gx11.h"
#include "client.h"
#include "gtkproto.h"
#include "pixmaps/all.xpm"
#include "pixmaps/hand.xpm"
#include "pixmaps/hand2.xpm"
#include "pixmaps/coin.xpm"
#include "pixmaps/skull.xpm"
#include "pixmaps/mag.xpm"
#include "pixmaps/nonmag.xpm"
#include "pixmaps/lock.xpm"
#include "pixmaps/unlock.xpm"
Go to the source code of this file.
Data Structures | |
struct | fixed_tab_init |
struct | inventory_viewer |
struct | item_delete |
Macros | |
#define | bool uint8 /* Grr! Pick *something*, please! */ |
#define | FMT_WEIGHT(buf, buf_size, it) snprintf(buf, buf_size, "%6.1f" , it->nrof * it->weight) |
#define | MAGIC_SAFE_WIDTH 75 |
#define | TYPE_LISTS 9 |
Typedefs | |
typedef bool(* | itemfilter )(item *it) |
Functions | |
static void | add_removal_victim (gpointer view_x, gpointer victim_views_p_x) |
static void | animate_item (gpointer view_x, gpointer item_x) |
static void | animate_items (void) |
static void | animate_one_item (gpointer item_x, gpointer ignored) |
void | close_container (item *op) |
static void | close_container_callback (item *op) |
void | command_show (const char *params) |
static void | container_clearing_one (gpointer view_x, gpointer op_x) |
static void | count_callback (GtkWidget *widget, GtkWidget *entry) |
void | get_inv_display (GtkWidget *frame) |
static GtkWidget * | get_inv_widget (void) |
void | get_look_display (GtkWidget *frame) |
static GtkWidget * | get_look_widget (void) |
static void | highlight_item (GtkWidget *list, item *it, gint row) |
void | inventory_splitwin_toggling (void) |
void | inventory_tick (void) |
static void | inventory_viewer_set_container (inventory_viewer *view, item *new_cont) |
static void | inventory_viewer_set_highlight (inventory_viewer *view, bool highlight) |
static void | inventory_viewer_set_show_flags (inventory_viewer *view, bool show_flags) |
static void | inventory_viewer_set_show_weight (inventory_viewer *view, bool show_weight) |
static void | item_changed_anim_hook (item *op) |
static void | item_changed_one (gpointer view_x, gpointer op_x) |
static void | item_deleting_one (gpointer view_x, gpointer op_x) |
void | item_event_container_clearing (item *op) |
void | item_event_item_changed (item *op) |
void | item_event_item_deleting (item *op) |
static void | item_tick_per_view (gpointer data, gpointer user_data_ignored) |
static void | item_to_widget_remove_item (item *const op) |
static void | item_to_widget_remove_widget (inventory_viewer *view) |
static item_delete * | item_to_widget_retrieve (item *op) |
static GList * | item_to_widget_retrieve_viewers (item *op) |
static void | item_to_widget_store (item *op, inventory_viewer *view) |
void | itemlist_set_show_icon (itemlist *l, int new_setting) |
static void | itemview_tick (void) |
static void | list_button_event (GtkWidget *gtklist, gint row, gint column, GdkEventButton *event, inventory_viewer *view) |
static inventory_viewer * | new_inventory_viewer (item *container, itemfilter filter, item *move_dest) |
static void | nuke_view (gpointer view_x, gpointer notused) |
void | open_container (item *op) |
static void | rebuild_our_widget (inventory_viewer *view) |
static void | redraw_on_show (GtkWidget *a, GdkEventVisibility *event, gpointer view_x) |
static void | remove_widget_one (gpointer item_and_widget_x, gpointer view_x) |
static void | resize_left_widget_one (gpointer view_x, gpointer total_width_x) |
static void | resize_left_widgets (GtkWidget *widget, GtkAllocation *event) |
static void | set_flags_one (gpointer view_x, gpointer show_flags) |
static void | set_inv_flags (bool show_flags) |
static void | set_look_flags (bool show_flags) |
void | set_look_list_env (item *op) |
static void | set_look_list_env_one (gpointer view_x, gpointer new_look_x) |
void | set_show_icon (const char *s) |
void | set_show_weight (const char *s) |
static void | set_show_weight_inv_one (gpointer view_x, gpointer new_setting) |
void | set_weight_limit (uint32 wlim) |
static bool | show_all (item *ignored) |
static bool | show_applied (item *it) |
static bool | show_cursed (item *it) |
static bool | show_locked (item *it) |
static bool | show_magical (item *it) |
static bool | show_nonmagical (item *it) |
static bool | show_unapplied (item *it) |
static bool | show_unlocked (item *it) |
static bool | show_unpaid (item *it) |
void | update_list_labels (itemlist *l) |
static void | update_lists_labels (void) |
static bool | view_visible (inventory_viewer *view) |
Variables | |
static GList * | animated_items = NULL |
GtkWidget * | closebutton |
GtkWidget * | counttext |
static fixed_tab_init | fixed_tabs [TYPE_LISTS] |
GdkColor | gdk_black |
GdkColor | gdk_grey |
static GList * | highlit_inv_viewers = NULL |
itemlist | inv_list |
static GtkWidget * | inv_notebook = NULL |
static GList * | inv_viewers = NULL |
static GList * | item_to_widgets = NULL |
itemlist | look_list |
static inventory_viewer * | look_viewer = NULL |
static GtkWidget * | look_widget = NULL |
GtkWidget * | spellinventory |
static GList * | views |
#define bool uint8 /* Grr! Pick *something*, please! */ |
Definition at line 13 of file inventory.c.
#define FMT_WEIGHT | ( | buf, | |
buf_size, | |||
it | |||
) | snprintf(buf, buf_size, "%6.1f" , it->nrof * it->weight) |
Definition at line 335 of file inventory.c.
Referenced by rebuild_our_widget().
#define MAGIC_SAFE_WIDTH 75 |
Definition at line 844 of file inventory.c.
Referenced by resize_left_widgets().
#define TYPE_LISTS 9 |
Definition at line 743 of file inventory.c.
Referenced by command_show(), and get_inv_widget().
Definition at line 20 of file inventory.c.
|
static |
Definition at line 775 of file inventory.c.
Referenced by inventory_splitwin_toggling().
|
static |
Definition at line 251 of file inventory.c.
References inventory_viewer::complete_rebuild, item_struct::face, PixmapInfo::icon_image, PixmapInfo::icon_mask, inventory_viewer::list, and pixmaps.
Referenced by animate_one_item().
|
static |
Definition at line 293 of file inventory.c.
References animate_one_item(), and animated_items.
Referenced by itemview_tick().
|
static |
Definition at line 267 of file inventory.c.
References item_struct::anim_speed, item_struct::anim_state, animate_item(), item_struct::animation_id, animations, item_struct::face, Animations::faces, item_to_widget_retrieve_viewers(), item_struct::last_anim, Animations::num_animations, and views.
Referenced by animate_items().
void close_container | ( | item * | op | ) |
Definition at line 1342 of file inventory.c.
|
static |
Definition at line 1359 of file inventory.c.
References Player_Struct::below, client_send_apply(), closebutton, cpl, itemlist::env, FALSE, set_look_list_env(), item_struct::tag, itemlist::title, and update_list_labels().
Referenced by get_look_display().
void command_show | ( | const char * | params | ) |
Definition at line 1153 of file inventory.c.
|
static |
Definition at line 506 of file inventory.c.
References inventory_viewer::complete_rebuild, inventory_viewer::cont, item_to_widget_remove_widget(), and TRUE.
Referenced by item_event_container_clearing().
|
static |
Definition at line 1074 of file inventory.c.
References Player_Struct::count, counttext, cpl, and gtkwin_info_text.
Referenced by get_inv_display().
void get_inv_display | ( | GtkWidget * | frame | ) |
Definition at line 1084 of file inventory.c.
References count_callback(), counttext, cpl, itemlist::env, FALSE, get_inv_widget(), itemlist::label, itemlist::last_maxweight, itemlist::last_title, itemlist::last_weight, itemlist::maxweightlabel, Player_Struct::ob, itemlist::show_weight, itemlist::title, tooltips, TRUE, itemlist::weight_limit, and itemlist::weightlabel.
Referenced by create_windows().
|
static |
Definition at line 920 of file inventory.c.
References Player_Struct::below, cpl, inventory_viewer::face_column_resizes, FALSE, fixed_tab_init::filter, gtkwin_root, fixed_tab_init::highlight, highlit_inv_viewers, inv_notebook, inv_viewers, inventory_viewer_set_highlight(), inventory_viewer::list, new_inventory_viewer(), Player_Struct::ob, redraw_on_show(), resize_left_widgets(), inventory_viewer::scroll_window, TYPE_LISTS, and fixed_tab_init::xpm.
Referenced by get_inv_display().
void get_look_display | ( | GtkWidget * | frame | ) |
Definition at line 1021 of file inventory.c.
References Player_Struct::below, close_container_callback(), closebutton, cpl, itemlist::env, FALSE, get_look_widget(), itemlist::label, itemlist::last_maxweight, itemlist::last_title, itemlist::last_weight, itemlist::maxweightlabel, itemlist::show_weight, itemlist::title, tooltips, TRUE, itemlist::weight_limit, and itemlist::weightlabel.
Referenced by create_windows().
|
static |
Definition at line 994 of file inventory.c.
References Player_Struct::below, cpl, inventory_viewer::face_column_resizes, inventory_viewer::highlight, highlit_inv_viewers, look_widget, new_inventory_viewer(), Player_Struct::ob, inventory_viewer::scroll_window, show_all(), and TRUE.
Referenced by get_look_display().
|
static |
Definition at line 317 of file inventory.c.
References item_struct::cursed, item_struct::damned, item_struct::magical, NDI_BLUE, NDI_NAVY, NDI_RED, and root_color.
Referenced by rebuild_our_widget().
void inventory_splitwin_toggling | ( | void | ) |
Definition at line 790 of file inventory.c.
References add_removal_victim(), highlit_inv_viewers, inv_notebook, inv_viewers, look_widget, and nuke_view().
Referenced by toggle_splitwin().
void inventory_tick | ( | void | ) |
Definition at line 1374 of file inventory.c.
|
static |
Definition at line 644 of file inventory.c.
References inventory_viewer::complete_rebuild, inventory_viewer::cont, and TRUE.
Referenced by set_look_list_env().
|
static |
Definition at line 626 of file inventory.c.
References inventory_viewer::complete_rebuild, inventory_viewer::highlight, and TRUE.
Referenced by get_inv_widget().
|
static |
Definition at line 635 of file inventory.c.
References inventory_viewer::complete_rebuild, inventory_viewer::show_flags, and TRUE.
Referenced by set_flags_one(), and set_look_flags().
|
static |
Definition at line 617 of file inventory.c.
References inventory_viewer::complete_rebuild, inventory_viewer::show_weight, and TRUE.
Referenced by set_show_weight(), and set_show_weight_inv_one().
|
static |
Definition at line 298 of file inventory.c.
References item_struct::anim_speed, animated_items, and item_struct::animation_id.
Referenced by item_event_item_changed().
|
static |
Definition at line 472 of file inventory.c.
References inventory_viewer::complete_rebuild, inventory_viewer::cont, item_struct::env, and TRUE.
Referenced by item_event_item_changed().
|
static |
Definition at line 530 of file inventory.c.
References inventory_viewer::complete_rebuild, inventory_viewer::cont, item_struct::env, item_struct::face, inventory_viewer::face_column_resizes, PixmapInfo::icon_height, PixmapInfo::icon_width, inventory_viewer::image_height, image_size, inventory_viewer::image_width, item_struct::inv, inventory_viewer::list, item_struct::next, pixmaps, and inventory_viewer::shows.
Referenced by item_event_item_deleting().
void item_event_container_clearing | ( | item * | op | ) |
Definition at line 525 of file inventory.c.
void item_event_item_changed | ( | item * | op | ) |
Definition at line 489 of file inventory.c.
void item_event_item_deleting | ( | item * | op | ) |
Definition at line 596 of file inventory.c.
|
static |
Definition at line 432 of file inventory.c.
References inventory_viewer::complete_rebuild, rebuild_our_widget(), redraw_needed, TRUE, and view_visible().
Referenced by itemview_tick().
|
static |
Definition at line 210 of file inventory.c.
References animated_items, item_delete::it, item_to_widgets, and item_delete::viewers.
Referenced by item_event_item_deleting().
|
static |
Definition at line 206 of file inventory.c.
References item_to_widgets, and remove_widget_one().
Referenced by container_clearing_one(), and nuke_view().
|
static |
Definition at line 145 of file inventory.c.
References item_delete::it, item_to_widgets, and item_delete::viewers.
Referenced by item_to_widget_retrieve_viewers(), and item_to_widget_store().
|
static |
Definition at line 171 of file inventory.c.
References item_to_widget_retrieve(), and item_delete::viewers.
Referenced by animate_one_item().
|
static |
Definition at line 175 of file inventory.c.
References item_struct::anim_speed, animated_items, item_struct::animation_id, item_to_widget_retrieve(), and item_delete::viewers.
Referenced by rebuild_our_widget().
void itemlist_set_show_icon | ( | itemlist * | l, |
int | new_setting | ||
) |
Definition at line 1288 of file inventory.c.
References set_inv_flags(), set_look_flags(), and itemlist::show_icon.
Referenced by applyconfig(), init_windows(), load_defaults(), and set_show_icon().
|
static |
Definition at line 463 of file inventory.c.
References animate_items(), item_tick_per_view(), and views.
Referenced by inventory_tick().
|
static |
Definition at line 658 of file inventory.c.
References client_send_apply(), client_send_examine(), client_send_move(), CONFIG_POPUPS, Player_Struct::count, counttext, cpl, draw_info(), item_struct::locked, inventory_viewer::move_dest, NDI_BLACK, send_mark_obj(), item_struct::tag, toggle_locked(), and use_config.
Referenced by new_inventory_viewer().
|
static |
Definition at line 57 of file inventory.c.
References inventory_viewer::complete_rebuild, inventory_viewer::cont, inventory_viewer::face_column_resizes, FALSE, gdk_black, gdk_grey, inventory_viewer::highlight, inventory_viewer::image_height, image_size, inventory_viewer::image_width, inventory_viewer::list, list, list_button_event(), inventory_viewer::move_dest, inventory_viewer::scroll_window, inventory_viewer::show_flags, inventory_viewer::show_weight, inventory_viewer::shows, TRUE, and views.
Referenced by get_inv_widget(), and get_look_widget().
|
static |
Definition at line 783 of file inventory.c.
References item_to_widget_remove_widget(), and views.
Referenced by inventory_splitwin_toggling().
void open_container | ( | item * | op | ) |
Definition at line 1334 of file inventory.c.
|
static |
Definition at line 337 of file inventory.c.
References inventory_viewer::complete_rebuild, inventory_viewer::cont, item_struct::d_name, item_struct::face, inventory_viewer::face_column_resizes, FALSE, item_struct::flags, FMT_WEIGHT, inventory_viewer::highlight, highlight_item(), PixmapInfo::icon_height, PixmapInfo::icon_image, PixmapInfo::icon_mask, PixmapInfo::icon_width, inventory_viewer::image_height, image_size, inventory_viewer::image_width, item_struct::inv, item_to_widget_store(), inventory_viewer::list, list, MAX_BUF, item_struct::next, pixmap, pixmaps, inventory_viewer::scroll_window, inventory_viewer::show_flags, inventory_viewer::show_weight, inventory_viewer::shows, and item_struct::weight.
Referenced by item_tick_per_view(), and redraw_on_show().
|
static |
Definition at line 896 of file inventory.c.
References inventory_viewer::complete_rebuild, and rebuild_our_widget().
Referenced by get_inv_widget().
|
static |
Definition at line 200 of file inventory.c.
References item_delete::viewers.
Referenced by item_to_widget_remove_widget().
|
static |
Definition at line 820 of file inventory.c.
References inventory_viewer::image_width, and inventory_viewer::list.
Referenced by resize_left_widgets().
|
static |
Definition at line 846 of file inventory.c.
References inv_viewers, inventory_viewer::list, MAGIC_SAFE_WIDTH, and resize_left_widget_one().
Referenced by get_inv_widget().
|
static |
Definition at line 1275 of file inventory.c.
References inventory_viewer_set_show_flags().
Referenced by set_inv_flags().
|
static |
Definition at line 1280 of file inventory.c.
References inv_viewers, and set_flags_one().
Referenced by itemlist_set_show_icon().
|
static |
Definition at line 1284 of file inventory.c.
References inventory_viewer_set_show_flags().
Referenced by itemlist_set_show_icon().
void set_look_list_env | ( | item * | op | ) |
Definition at line 1323 of file inventory.c.
References itemlist::env, inv_viewers, inventory_viewer_set_container(), and set_look_list_env_one().
Referenced by close_container(), close_container_callback(), main(), and open_container().
|
static |
Definition at line 1315 of file inventory.c.
References inventory_viewer::move_dest.
Referenced by set_look_list_env().
void set_show_icon | ( | const char * | s | ) |
Definition at line 1303 of file inventory.c.
void set_show_weight | ( | const char * | s | ) |
Definition at line 1258 of file inventory.c.
|
static |
Definition at line 1253 of file inventory.c.
References inventory_viewer_set_show_weight().
Referenced by set_show_weight().
void set_weight_limit | ( | uint32 | wlim | ) |
Definition at line 1245 of file inventory.c.
Definition at line 725 of file inventory.c.
References TRUE.
Referenced by get_look_widget().
Definition at line 726 of file inventory.c.
References item_struct::applied.
Definition at line 729 of file inventory.c.
References item_struct::cursed, and item_struct::damned.
Definition at line 732 of file inventory.c.
References item_struct::locked.
Definition at line 730 of file inventory.c.
References item_struct::magical.
Definition at line 731 of file inventory.c.
References item_struct::magical.
Definition at line 727 of file inventory.c.
References item_struct::applied.
Definition at line 733 of file inventory.c.
References item_struct::locked.
Definition at line 728 of file inventory.c.
References item_struct::unpaid.
void update_list_labels | ( | itemlist * | l | ) |
Definition at line 1182 of file inventory.c.
References itemlist::env, FALSE, item_struct::inv_updated, itemlist::label, itemlist::last_maxweight, itemlist::last_title, itemlist::last_weight, MAX_BUF, itemlist::maxweightlabel, itemlist::show_weight, itemlist::title, item_struct::weight, itemlist::weight_limit, and itemlist::weightlabel.
Referenced by close_container(), close_container_callback(), open_container(), set_show_weight(), set_weight_limit(), toggle_splitwin(), and update_lists_labels().
|
static |
Definition at line 1227 of file inventory.c.
References itemlist::env, item_struct::inv_updated, and update_list_labels().
Referenced by inventory_tick().
|
static |
Definition at line 875 of file inventory.c.
References inv_notebook, inv_viewers, inventory_viewer::scroll_window, and TRUE.
Referenced by item_tick_per_view().
|
static |
Definition at line 136 of file inventory.c.
Referenced by animate_items(), item_changed_anim_hook(), item_to_widget_remove_item(), and item_to_widget_store().
GtkWidget* closebutton |
Definition at line 1015 of file inventory.c.
Referenced by close_container(), close_container_callback(), draw_magic_map(), get_look_display(), and open_container().
GtkWidget* counttext |
Definition at line 1072 of file inventory.c.
Referenced by count_callback(), get_inv_display(), list_button_event(), and parse_key().
|
static |
Definition at line 746 of file inventory.c.
GdkColor gdk_black |
Definition at line 240 of file gx11.c.
Referenced by menu_spells(), and new_inventory_viewer().
GdkColor gdk_grey |
Definition at line 239 of file gx11.c.
Referenced by menu_spells(), and new_inventory_viewer().
|
static |
Definition at line 763 of file inventory.c.
Referenced by get_inv_widget(), get_look_widget(), and inventory_splitwin_toggling().
itemlist inv_list |
Definition at line 1013 of file inventory.c.
Referenced by applyconfig(), init_windows(), load_defaults(), and toggle_splitwin().
|
static |
Definition at line 766 of file inventory.c.
Referenced by command_show(), get_inv_widget(), inventory_splitwin_toggling(), and view_visible().
|
static |
Definition at line 759 of file inventory.c.
Referenced by get_inv_widget(), inventory_splitwin_toggling(), resize_left_widgets(), set_inv_flags(), set_look_list_env(), set_show_weight(), and view_visible().
|
static |
Definition at line 135 of file inventory.c.
Referenced by item_to_widget_remove_item(), item_to_widget_remove_widget(), and item_to_widget_retrieve().
itemlist look_list |
Definition at line 1013 of file inventory.c.
Referenced by toggle_splitwin().
|
static |
Definition at line 760 of file inventory.c.
|
static |
Definition at line 765 of file inventory.c.
Referenced by get_look_widget(), and inventory_splitwin_toggling().
GtkWidget* spellinventory |
Definition at line 2984 of file gx11.c.
Referenced by item_event_item_changed(), and item_event_item_deleting().
|
static |
Definition at line 47 of file inventory.c.
Referenced by animate_one_item(), item_event_container_clearing(), item_event_item_changed(), item_event_item_deleting(), itemview_tick(), new_inventory_viewer(), and nuke_view().