21#include <gdk/gdkkeysyms.h>
89#define SPECHASH_TAG stored_tag
90#define SPECHASH_INT_KEY_TYPE
91#define SPECHASH_INT_DATA_TYPE
118#define PF_MAX_CLAUSES 16
119#define PF_DISJUNCTION_SEPARATOR "|"
120#define PF_CONJUNCTION_SEPARATOR "&"
267#define SPECHASH_TAG propstate
268#define SPECHASH_INT_KEY_TYPE
269#define SPECHASH_IDATA_TYPE struct propstate *
270#define SPECHASH_IDATA_FREE propstate_destroy
449#define SPECHASH_TAG objprop
450#define SPECHASH_INT_KEY_TYPE
451#define SPECHASH_IDATA_TYPE struct objprop *
503#define SPECHASH_TAG objbind
504#define SPECHASH_INT_KEY_TYPE
505#define SPECHASH_IDATA_TYPE struct objbind *
506#define SPECHASH_IDATA_FREE objbind_destroy
576 const struct tile *ptile);
614 int tag,
int object_id);
635#define property_page_objprop_iterate(ARG_pp, NAME_op) \
636 TYPED_HASH_DATA_ITERATE(struct objprop *, (ARG_pp)->objprop_table, NAME_op)
637#define property_page_objprop_iterate_end HASH_DATA_ITERATE_END
639#define property_page_objbind_iterate(ARG_pp, NAME_ob) \
640 TYPED_HASH_DATA_ITERATE(struct objbind *, (ARG_pp)->objbind_table, NAME_ob)
641#define property_page_objbind_iterate_end HASH_DATA_ITERATE_END
673 return _(
"Start Position");
681 return Q_(
"?play:Game");
686 log_error(
"%s() Unhandled request to get name of object type %d.",
705 return ((
struct unit *)
object)->id;
707 return ((
struct city *)
object)->id;
716 log_error(
"%s(): Unhandled request to get object ID from object %p of "
745 log_error(
"%s(): Unhandled request to get object of type %d (%s) "
771 log_error(
"%s(): Unhandled request for object type %d (%s)).",
793 return "struct built_status[B_LAST]";
795 return "bool[A_LAST]";
805 return "struct nation_hash";
809 return "struct tile_vision_data";
868 switch (
pv->valtype) {
882 if (
pv->data.v_gov !=
NULL) {
895 if (
pv->data.v_built[
id].turn < 0) {
915 if (
BV_ISSET(
pv->data.v_bv_inventions, tech)) {
924 if (
BV_ISSET(
pv->data.v_bv_special,
spe->data.special_idx)) {
963 count =
strlen(
pv->data.v_const_string);
972 log_error(
"%s(): Unhandled value type %d for property value %p.",
1058 switch (
pv->valtype) {
1073 pv_copy->data.v_pixbuf =
pv->data.v_pixbuf;
1083 pv_copy->data.v_bv_special =
pv->data.v_bv_special;
1086 pv_copy->data.v_bv_roads =
pv->data.v_bv_roads;
1089 pv_copy->data.v_bv_bases =
pv->data.v_bv_bases;
1092 pv_copy->data.v_nation =
pv->data.v_nation;
1103 pv_copy->data.v_bv_inventions =
pv->data.v_bv_inventions;
1108 pv_copy->data.v_tile_vision->tile_known
1109 =
pv->data.v_tile_vision->tile_known;
1111 pv_copy->data.v_tile_vision->tile_seen[v]
1112 =
pv->data.v_tile_vision->tile_seen[v];
1118 log_error(
"%s(): Unhandled value type %d for property value %p.",
1144 if (!
pv || !
pv->must_free) {
1148 switch (
pv->valtype) {
1165 free(
pv->data.v_pointer);
1172 log_error(
"%s(): Unhandled request to free data %p (type %s).",
1186 if (
pva->valtype !=
pvb->valtype) {
1190 switch (
pva->valtype) {
1194 return pva->data.v_int ==
pvb->data.v_int;
1196 return pva->data.v_bool ==
pvb->data.v_bool;
1198 if (
pva->data.v_const_string !=
NULL
1199 &&
pvb->data.v_const_string !=
NULL) {
1200 return !
strcmp(
pva->data.v_const_string,
1201 pvb->data.v_const_string);
1203 return pva->data.v_const_string ==
pvb->data.v_const_string;
1205 return pva->data.v_pixbuf ==
pvb->data.v_pixbuf;
1207 if (
pva->data.v_pointer ==
pvb->data.v_pointer) {
1209 }
else if (!
pva->data.v_pointer || !
pvb->data.v_pointer) {
1235 return pva->data.v_nation ==
pvb->data.v_nation;
1238 pvb->data.v_nation_hash);
1240 return pva->data.v_gov ==
pvb->data.v_gov;
1243 pvb->data.v_tile_vision->tile_known)) {
1248 pvb->data.v_tile_vision->tile_seen[v])) {
1255 log_error(
"%s(): Unhandled value type %d for property values %p and %p.",
1257 return pva->data.v_pointer ==
pvb->data.v_pointer;
1277 ps->property_value =
pv;
1292 ps->property_value =
NULL;
1320 ps->property_value =
pv;
1333 return ps->property_value;
1346 if (
object ==
NULL) {
1387 return ob->object_id;
1431 log_error(
"%s(): Unhandled request to destroy object %p (ID %d) of type "
1466 if (
NULL == ptile) {
1488 if (
NULL != pterrain) {
1491 pv->data.v_const_string =
"";
1499 if (
NULL != presource) {
1502 pv->data.v_const_string =
"";
1532 BV_SET(
pv->data.v_bv_special, pextra->data.special_idx);
1562 BV_SET(
pv->data.v_tile_vision->tile_known,
1571 BV_SET(
pv->data.v_tile_vision->tile_seen[v],
1580 pv->data.v_const_string = ptile->
label;
1582 pv->data.v_const_string =
"";
1586 log_error(
"%s(): Unhandled request for value of property %d "
1597 const struct tile *ptile;
1622 log_error(
"%s(): Unhandled request for value of property %d "
1689 log_error(
"%s(): Unhandled request for value of property %d "
1728 pv->data.v_const_string =
pcity->name;
1734 pv->data.v_int =
pcity->history;
1742 pv->data.v_int =
pcity->food_stock;
1745 pv->data.v_int =
pcity->shield_stock;
1748 log_error(
"%s(): Unhandled request for value of property %d "
1761 if (
NULL == pplayer) {
1767 pv->data.v_const_string = pplayer->
name;
1789 BV_SET(
pv->data.v_bv_inventions, tech);
1810 log_error(
"%s(): Unhandled request for value of property %d "
1828 pv->data.v_bool =
pgame->scenario.is_scenario;
1831 pv->data.v_const_string =
pgame->scenario.name;
1834 pv->data.v_const_string =
pgame->scenario.authors;
1837 pv->data.v_const_string =
pgame->scenario_desc.description;
1840 pv->data.v_bool =
pgame->scenario.save_random;
1843 pv->data.v_bool =
pgame->scenario.players;
1846 pv->data.v_bool =
pgame->scenario.startpos_nations;
1849 pv->data.v_bool =
pgame->scenario.prevent_new_cities;
1852 pv->data.v_bool =
pgame->scenario.lake_flooding;
1855 pv->data.v_bool =
pgame->scenario.ruleset_locked;
1858 log_error(
"%s(): Unhandled request for value of property %d "
1870 log_error(
"%s(): Unhandled request for object type \"%s\" (nb %d).",
1927 log_error(
"%s(): Unhandled request for value range of property %d (%s) "
1972 log_error(
"%s(): Unhandled request for value range of property %d (%s) "
2014 log_error(
"%s(): Unhandled request for value range of property %d (%s) "
2048 log_error(
"%s(): Unhandled request for value range of property %d (%s) "
2054 log_error(
"%s(): Unhandled request for value range of property %d (%s) "
2063 log_error(
"%s(): Unhandled request for object type \"%s\" (nb %d).",
2074 if (!
ob || !
op || !
ob->propstate_table) {
2200 if (
ob->propstate_table) {
2202 ob->propstate_table =
NULL;
2231 ob->parent_property_page =
pp;
2256 if (
NULL == ptile) {
2328 if (
NULL == pplayer) {
2418 if (
BV_ISSET(
pv->data.v_bv_special, pextra->data.special_idx)) {
2454 log_error(
"%s(): Unhandled request to pack value of property "
2477 log_error(
"%s(): Unhandled request to pack value of property "
2491 packet->
fuel =
pv->data.v_int;
2494 packet->
moved =
pv->data.v_bool;
2500 packet->
hp =
pv->data.v_int;
2506 packet->
stay =
pv->data.v_bool;
2512 log_error(
"%s(): Unhandled request to pack value of property "
2526 packet->
size =
pv->data.v_int;
2542 packet->
built[
i] =
pv->data.v_built[
i].turn;
2550 log_error(
"%s(): Unhandled request to pack value of property "
2584 packet->
gold =
pv->data.v_int;
2593 log_error(
"%s(): Unhandled request to pack value of property "
2637 log_error(
"%s(): Unhandled request to pack value of property "
2646 log_error(
"%s(): Unhandled request for object type \"%s\" (nb %d).",
2696 switch (
op->valtype) {
2804 return op->column_id;
2816 op->view_column =
col;
2828 return op->view_column;
3120 log_error(
"%s(): Unhandled request to create widget for property %d (%s).",
3356 "<span foreground=\"red\">%s</span>",
name);
3395 log_error(
"Cannot store child widget %p under name "
3396 "\"%s\" using objprop_set_child_widget for object "
3397 "property %d (%s) because objprop_get_widget does "
3398 "not return a valid widget.",
3421 log_error(
"Cannot retrieve child widget under name "
3422 "\"%s\" using objprop_get_child_widget for object "
3423 "property %d (%s) because objprop_get_widget does "
3424 "not return a valid widget.",
3431 log_error(
"Child widget \"%s\" not found for object "
3432 "property %d (%s) via objprop_get_child_widget.",
3460 return op->extviewer;
3471 return op->parent_page;
3543 ev->panel_label = label;
3552 ev->panel_widget = vbox;
3558 ev->panel_label = label;
3578 log_error(
"Unhandled request to create panel widget "
3579 "for property %d (%s) in extviewer_new().",
3595 ev->panel_button = button;
3636 log_error(
"Unhandled request to create data store "
3637 "for property %d (%s) in extviewer_new().",
3652 ev->view_widget = vbox;
3658 ev->view_label = label;
3771 log_error(
"Unhandled request to configure view widget "
3772 "for property %d (%s) in extviewer_new().",
3803 return ev->panel_widget;
3815 return ev->view_widget;
3848 textbuf =
ev->textbuf;
3859 id =
spe->data.special_idx;
3861 present =
BV_ISSET(
pv->data.v_bv_special,
id);
3921 present =
BV_ISSET(
pv->data.v_tile_vision->tile_known,
id);
3924 present =
BV_ISSET(
pv->data.v_tile_vision->tile_seen[v],
id);
3935 _(
"All nations"), -1);
3980 enum barbarian_type barbarian_type =
3989 present = (pnation ==
pv->data.v_nation);
4015 present = (
pgov ==
pv->data.v_gov);
4026 if (
pv->data.v_gov !=
NULL) {
4047 present =
BV_ISSET(
pv->data.v_bv_inventions,
id);
4081 log_error(
"Unhandled request to refresh widgets "
4082 "extviewer_refresh_widgets() for objprop id=%d "
4106 if (
ev->panel_label !=
NULL) {
4135 log_error(
"Unhandled request to clear widgets "
4136 "in extviewer_clear_widgets() for objprop id=%d "
4178 bool active, present;
4300 if (!(0 <=
id &&
id <
B_LAST)) {
4337 if (
pv->data.v_gov !=
NULL) {
4363 BV_SET(
pv->data.v_bv_inventions,
id);
4365 BV_CLR(
pv->data.v_bv_inventions,
id);
4374 log_error(
"Unhandled widget toggled signal in "
4375 "extviewer_view_cell_toggled() for objprop id=%d "
4422 log_error(
"Unhandled widget modified signal in "
4423 "extviewer_textbuf_changed() for objprop id=%d "
4438#define ADDPROP(ARG_id, ARG_name, ARG_tooltip, ARG_flags, ARG_valtype) do { \
4439 struct objprop *MY_op = objprop_new(ARG_id, ARG_name, ARG_tooltip, \
4440 ARG_flags, ARG_valtype, pp); \
4441 objprop_hash_insert(pp->objprop_table, MY_op->id, MY_op); \
4584 _(
"How likely user is to get this player by autoselect. '-1' for default behavior."),
4602 _(
"Scenario Name"),
NULL,
4606 _(
"Scenario Authors"),
NULL,
4610 _(
"Scenario Description"),
NULL,
4614 _(
"Save Random Number State"),
NULL,
4617 _(
"Save Players"),
NULL,
4620 _(
"Nation Start Positions"),
NULL,
4623 _(
"Prevent New Cities"),
NULL,
4626 _(
"Saltwater Flooding Lakes"),
NULL,
4629 _(
"Lock to current Ruleset"),
NULL,
4699 for (p =
rows; p !=
NULL; p = p->next) {
4911 _(
"Pressing this button will create a new object of the "
4912 "same type as the current property page and add it to "
4913 "the page. The specific type and count of the objects "
4914 "is taken from the editor tool state. So for example, "
4915 "the \"tool value\" of the unit tool and its \"count\" "
4916 "parameter affect unit creation."));
4928 _(
"Pressing this button will send a request to the server "
4929 "to destroy (i.e. erase) the objects selected in the object "
4967 pp->extviewer_notebook = notebook;
5035 _(
"Enter a filter string to limit which properties are shown. "
5036 "The filter is one or more text patterns separated by | "
5037 "(\"or\") or & (\"and\"). The symbol & has higher precedence "
5038 "than |. A pattern may also be negated by prefixing it with !."));
5050 _(
"Pressing this button will reset all modified properties of "
5051 "the selected objects to their current values (the values "
5052 "they have on the server)."));
5060 _(
"Pressing this button will send all modified properties of "
5061 "the objects selected in the object list to the server. "
5062 "Modified properties' names are shown in red in the properties "
5234 const struct tile *ptile)
5237 if (!
pp || !ptile) {
5300 if (!
pp || !
pp->object_store || !
op || !
ob) {
5319 store =
pp->object_store;
5335 for (p =
buf; *p; p++) {
5336 if (*p ==
'\n' || *p ==
'\t' || *p ==
'\r') {
5363 if (
pv->data.v_gov !=
NULL) {
5391 if (!
pp || !
pp->objbind_table) {
5395 if (
pp->object_store) {
5441 return pp->focused_objbind;
5454 pp->focused_objbind =
ob;
5466 if (!
pp || !
pp->objbind_table) {
5481 if (!
pp || !tiles) {
5497 if (!
pp || !
pp->objbind_table) {
5517 bool changed =
FALSE;
5519 if (!
pp || !
op || !
pp->object_view) {
5530 for (p =
rows; p !=
NULL; p = p->next) {
5560 if (!
pp || !
pp->object_view) {
5576 for (p =
rows; p !=
NULL; p = p->next) {
5677 log_error(
"%s(): Unhandled object type %s (nb %d).",
5714 if (!
pp || !
pp->object_view) {
5724 for (p =
rows; p !=
NULL; p = p->next) {
5756 if (!
pp || !
pp->object_view) {
5767 for (p =
rows; p !=
NULL; p = p->next) {
5818 if (
NULL == ptile) {
5822 if (
NULL == ptile) {
6035 if (!
pp || !
pp->tag_table) {
6040 log_error(
"Attempted to insert object creation tag %d "
6041 "twice into tag table for property page %p (%d %s).",
6059 if (!
pp || !
pp->tag_table) {
6075 if (!
pp || !
pp->tag_table) {
6086 if (!
pp || !
pp->tag_table) {
6162 if (!
pe || !
pe->notebook) {
6269 if (!
pe || !tiles) {
6295 if (!
pe || !
pe->widget) {
6312 if (!
pe || !
pe->widget) {
6345 int tag,
int object_id)
6442 if (!filter || filter[0] ==
'\0') {
6454 pfc = &
pf->disjunction[
pf->count];
6525 if (
pf->count < 1) {
6531 for (
i = 0;
i <
pf->count;
i++) {
6532 pfc = &
pf->disjunction[
i];
6534 for (j = 0; j <
pfc->count; j++) {
6535 pfp = &
pfc->conjunction[j];
6536 match = (
pfp->text[0] ==
'\0'
6568 for (
i = 0;
i <
pf->count;
i++) {
6569 pfc = &
pf->disjunction[
i];
6570 for (j = 0; j <
pfc->count; j++) {
6591 return _(
"Seen (Main)");
6594 return _(
"Seen (Invis)");
6597 return _(
"Seen (Subsurface)");
6603 return _(
"Unknown");
Base_type_id base_number(const struct base_type *pbase)
Base_type_id base_count(void)
bool dbv_isset(const struct dbv *pdbv, int bit)
#define BV_ARE_EQUAL(vec1, vec2)
#define BV_ISSET(bv, bit)
struct canvas int int canvas_y
struct canvas int canvas_x
int city_granary_size(int city_size)
bool city_can_be_built_here(const struct civ_map *nmap, const struct tile *ptile, const struct unit *punit, bool hut_test)
#define city_tile(_pcity_)
static citizens city_size_get(const struct city *pcity)
#define city_owner(_pcity_)
bool client_nation_is_in_current_set(const struct nation_type *pnation)
void connection_do_buffer(struct connection *pc)
void connection_do_unbuffer(struct connection *pc)
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int const struct action *paction struct unit struct city * pcity
int editor_tool_get_size(enum editor_tool_type ett)
int editor_tool_get_value(enum editor_tool_type ett)
int editor_tool_get_count(enum editor_tool_type ett)
struct unit * editor_unit_virtual_create(void)
int editor_tool_get_applied_player(enum editor_tool_type ett)
void free_tokens(char **tokens, size_t ntokens)
int get_tokens(const char *str, char **tokens, size_t num_tokens, const char *delimiterset)
const struct functions * fc_funcs
#define PL_(String1, String2, n)
struct unit * game_unit_by_number(int id)
struct city * game_city_by_number(int id)
const char * government_name_translation(const struct government *pgovern)
Government_type_id government_count(void)
struct government * government_by_number(const Government_type_id gov)
Government_type_id government_index(const struct government *pgovern)
#define governments_iterate(NAME_pgov)
#define governments_iterate_end
#define FC_STATIC_CANVAS_INIT
static void add_column(GtkWidget *view, int col_id, const char *name, GType gtype, bool editable, bool is_radio, GCallback edit_callback, gpointer callback_userdata)
static void property_page_reset_objbinds(struct property_page *pp)
static void property_page_send_values(struct property_page *pp)
static void objprop_setup_widget(struct objprop *op)
static void property_page_store_creation_tag(struct property_page *pp, int tag, int count)
static gchar * propval_as_string(struct propval *pv)
static struct property_page * objprop_get_property_page(const struct objprop *op)
static const char * objprop_get_name(const struct objprop *op)
const char * vision_layer_get_name(enum vision_layer)
static int objbind_get_object_id(struct objbind *ob)
static void objprop_set_extviewer(struct objprop *op, struct extviewer *ev)
static GtkWidget * extviewer_get_panel_widget(struct extviewer *ev)
static gpointer objtype_get_object_from_id(enum editor_object_type objtype, int id)
void property_editor_handle_object_changed(struct property_editor *pe, enum editor_object_type objtype, int object_id, bool remove)
static struct propstate * propstate_new(struct objprop *op, struct propval *pv)
static const char * valtype_get_name(enum value_types valtype)
static void propstate_destroy(struct propstate *ps)
static bool objbind_set_modified_value(struct objbind *ob, struct objprop *op, struct propval *pv)
static GtkCellRenderer * objprop_create_cell_renderer(const struct objprop *op)
static void extviewer_clear_widgets(struct extviewer *ev)
@ VALTYPE_INVENTIONS_ARRAY
@ VALTYPE_TILE_VISION_DATA
static void objprop_set_child_widget(struct objprop *op, const char *widget_name, GtkWidget *widget)
static bool property_editor_add_page(struct property_editor *pe, enum editor_object_type objtype)
static void propstate_clear_value(struct propstate *ps)
static void objbind_pack_modified_value(struct objbind *ob, struct objprop *op, union packetdata packet)
static struct objbind * property_page_get_focused_objbind(struct property_page *pp)
static bool objprop_has_widget(const struct objprop *op)
static int objtype_get_id_from_object(enum editor_object_type objtype, gpointer object)
static enum editor_object_type objbind_get_objtype(const struct objbind *ob)
static struct extviewer * objprop_get_extviewer(struct objprop *op)
static void extviewer_refresh_widgets(struct extviewer *ev, struct propval *pv)
static enum editor_object_type property_page_get_objtype(const struct property_page *pp)
#define property_page_objbind_iterate_end
static void property_page_show_extviewer(struct property_page *pp, struct extviewer *ev)
static gpointer objbind_get_object(struct objbind *ob)
static const char * property_page_get_name(const struct property_page *pp)
void property_editor_handle_object_created(struct property_editor *pe, int tag, int object_id)
static bool objbind_property_is_modified(struct objbind *ob, struct objprop *op)
static struct propval * propstate_get_value(struct propstate *ps)
static void property_page_clear_tags(struct property_page *pp)
static void property_page_object_created(struct property_page *pp, int tag, int object_id)
static bool property_page_tag_is_known(struct property_page *pp, int tag)
static void property_page_remove_creation_tag(struct property_page *pp, int tag)
static void property_page_load_tiles(struct property_page *pp, const struct tile_list *tiles)
static void property_page_create_objects(struct property_page *pp, struct tile_list *hint_tiles)
static void property_page_add_extviewer(struct property_page *pp, struct extviewer *ev)
static void property_page_refresh_button_clicked(GtkButton *button, gpointer userdata)
static void property_page_set_focused_objbind(struct property_page *pp, struct objbind *ob)
static void property_page_setup_objprops(struct property_page *pp)
static void objbind_set_rowref(struct objbind *ob, GtkTreeRowReference *rr)
static void objbind_clear_modified_value(struct objbind *ob, struct objprop *op)
static struct propval * objbind_get_value_from_object(struct objbind *ob, struct objprop *op)
static void propval_free(struct propval *pv)
static struct property_filter * property_filter_new(const char *filter)
static bool property_page_set_store_value(struct property_page *pp, struct objprop *op, struct objbind *ob, GtkTreeIter *iter)
static const char * objtype_get_name(enum editor_object_type objtype)
static void objprop_widget_entry_changed(GtkEntry *entry, gpointer userdata)
static void objbind_clear_all_modified_values(struct objbind *ob)
static bool property_filter_match(struct property_filter *pf, const struct objprop *op)
void property_editor_popup(struct property_editor *pe, enum editor_object_type objtype)
static void property_page_destroy_button_clicked(GtkButton *button, gpointer userdata)
static struct objbind * objbind_new(enum editor_object_type objtype, gpointer object)
static gboolean property_page_selection_func(GtkTreeSelection *sel, GtkTreeModel *model, GtkTreePath *path, gboolean currently_selected, gpointer data)
static int property_page_get_num_objbinds(const struct property_page *pp)
static bool objprop_show_in_listview(const struct objprop *op)
static GType objprop_get_gtype(const struct objprop *op)
static void objprop_set_treeview_column(struct objprop *op, GtkTreeViewColumn *col)
static void objbind_pack_current_values(struct objbind *ob, union packetdata packet)
static const char * objprop_get_attribute_type_string(const struct objprop *op)
static struct propval * propval_copy(struct propval *pv)
struct property_editor * editprop_get_property_editor(void)
void property_editor_reload(struct property_editor *pe, enum editor_object_type objtype)
static GdkPixbuf * create_unit_pixbuf(const struct unit *punit)
static void extviewer_view_cell_toggled(GtkCellRendererToggle *cell, gchar *path, gpointer userdata)
static struct property_editor * property_editor_new(void)
static void property_page_send_packet(struct property_page *pp, union packetdata packet)
static gchar * built_status_to_string(struct built_status *bs)
static int objprop_get_id(const struct objprop *op)
@ OPID_GAME_LAKE_FLOODING
@ OPID_GAME_SCENARIO_NAME
@ OPID_GAME_SCENARIO_AUTHORS
@ OPID_PLAYER_SELECT_WEIGHT
@ OPID_GAME_PREVENT_CITIES
@ OPID_GAME_SCENARIO_DESC
@ OPID_GAME_STARTPOS_NATIONS
@ OPID_PLAYER_SCENARIO_RESERVED
@ OPID_GAME_SCENARIO_RANDSTATE
@ OPID_PLAYER_INFRAPOINTS
@ OPID_GAME_SCENARIO_PLAYERS
@ OPID_GAME_RULESET_LOCKED
static enum value_types objprop_get_valtype(const struct objprop *op)
static int get_next_unique_tag(void)
static bool objprop_is_sortable(const struct objprop *op)
static void property_page_add_objbinds_from_tile(struct property_page *pp, const struct tile *ptile)
static const char * objprop_get_tooltip(const struct objprop *op)
static GtkTreeRowReference * objbind_get_rowref(struct objbind *ob)
static void property_filter_free(struct property_filter *pf)
static void objprop_widget_spin_button_changed(GtkSpinButton *spin, gpointer userdata)
#define PF_DISJUNCTION_SEPARATOR
static GtkWidget * objprop_get_child_widget(struct objprop *op, const char *widget_name)
static void property_page_selection_changed(GtkTreeSelection *sel, gpointer userdata)
static bool objtype_is_conserved(enum editor_object_type objtype)
static struct extviewer * extviewer_new(struct objprop *op)
static bool propval_equal(struct propval *pva, struct propval *pvb)
static void property_page_quick_find_entry_changed(GtkWidget *entry, gpointer userdata)
static void objprop_refresh_widget(struct objprop *op, struct objbind *ob)
void property_editor_popdown(struct property_editor *pe)
static void objbind_destroy(struct objbind *ob)
static void property_page_add_objbind(struct property_page *pp, gpointer object_data)
static void objbind_request_destroy_object(struct objbind *ob)
static void property_page_create_button_clicked(GtkButton *button, gpointer userdata)
static GdkPixbuf * create_pixbuf_from_layers(const struct tile *ptile, const struct unit *punit, const struct city *pcity, enum layer_category category)
static union packetdata property_page_new_packet(struct property_page *pp)
static void propstate_set_value(struct propstate *ps, struct propval *pv)
static int objprop_get_column_id(const struct objprop *op)
static GdkPixbuf * create_tile_pixbuf(const struct tile *ptile)
static struct objprop * extviewer_get_objprop(struct extviewer *ev)
static bool can_create_unit_at_tile(struct tile *ptile)
static struct objbind * property_page_get_objbind(struct property_page *pp, int object_id)
static bool objbind_get_allowed_value_span(struct objbind *ob, struct objprop *op, double *pmin, double *pmax, double *pstep, double *pbig_step)
static void property_page_free_packet(struct property_page *pp, union packetdata packet)
static GdkPixbuf * create_city_pixbuf(const struct city *pcity)
#define ADDPROP(ARG_id, ARG_name, ARG_tooltip, ARG_flags, ARG_valtype)
static void extviewer_panel_button_clicked(GtkButton *button, gpointer userdata)
static void property_page_destroy_objects(struct property_page *pp)
void property_editor_load_tiles(struct property_editor *pe, const struct tile_list *tiles)
static struct property_page * property_page_new(enum editor_object_type objtype, struct property_editor *parent)
#define property_page_objprop_iterate_end
static void property_page_clear_objbinds(struct property_page *pp)
void property_editor_clear(struct property_editor *pe)
#define property_page_objprop_iterate(ARG_pp, NAME_op)
static void objprop_set_column_id(struct objprop *op, int col_id)
static void objbind_bind_properties(struct objbind *ob, struct property_page *pp)
static void property_page_fill_widgets(struct property_page *pp)
static bool objbind_has_modified_properties(struct objbind *ob)
static void property_page_change_value(struct property_page *pp, struct objprop *op, struct propval *pv)
static void objprop_widget_toggle_button_changed(GtkToggleButton *button, gpointer userdata)
#define PF_CONJUNCTION_SEPARATOR
static void property_page_apply_button_clicked(GtkButton *button, gpointer userdata)
static struct objprop * objprop_new(int id, const char *name, const char *tooltip, enum object_property_flags flags, enum value_types valtype, struct property_page *parent)
static GtkWidget * extviewer_get_view_widget(struct extviewer *ev)
static GtkWidget * objprop_get_widget(struct objprop *op)
static void propval_free_data(struct propval *pv)
static void extviewer_textbuf_changed(GtkTextBuffer *textbuf, gpointer userdata)
static struct property_editor * the_property_editor
static void property_page_object_changed(struct property_page *pp, int object_id, bool remove)
static bool objprop_is_readonly(const struct objprop *op)
#define property_page_objbind_iterate(ARG_pp, NAME_ob)
static GtkTreeViewColumn * objprop_get_treeview_column(const struct objprop *op)
static struct property_page * property_editor_get_page(struct property_editor *pe, enum editor_object_type objtype)
static struct propval * objbind_get_modified_value(struct objbind *ob, struct objprop *op)
void disable_gobject_callback(GObject *obj, GCallback cb)
void enable_gobject_callback(GObject *obj, GCallback cb)
GdkPixbuf * get_flag(const struct nation_type *nation)
GdkPixbuf * surface_get_pixbuf(cairo_surface_t *surf, int width, int height)
GdkPixbuf * sprite_get_pixbuf(struct sprite *sprite)
bool is_special_improvement(const struct impr_type *pimprove)
Impr_type_id improvement_index(const struct impr_type *pimprove)
bool is_great_wonder(const struct impr_type *pimprove)
const char * improvement_name_translation(const struct impr_type *pimprove)
bool is_small_wonder(const struct impr_type *pimprove)
#define improvement_iterate_end
#define improvement_iterate(_p)
#define fc_assert_ret_val(condition, val)
#define log_error(message,...)
struct startpos * map_startpos_get(const struct tile *ptile)
int startpos_number(const struct startpos *psp)
struct tile * startpos_tile(const struct startpos *psp)
const struct nation_hash * startpos_raw_nations(const struct startpos *psp)
bool startpos_pack(const struct startpos *psp, struct packet_edit_startpos_full *packet)
struct tile * index_to_tile(const struct civ_map *imap, int mindex)
bool startpos_is_excluding(const struct startpos *psp)
struct startpos * map_startpos_by_number(int id)
#define index_to_native_pos(pnat_x, pnat_y, mindex)
#define index_to_map_pos(pmap_x, pmap_y, mindex)
struct tile * get_center_tile_mapcanvas(void)
void put_one_element(struct canvas *pcanvas, float zoom, enum mapview_layer layer, const struct tile *ptile, const struct tile_edge *pedge, const struct tile_corner *pcorner, const struct unit *punit, const struct city *pcity, int canvas_x, int canvas_y, const struct city *citymode, const struct unit_type *putype)
#define fc_calloc(n, esz)
bool can_unit_exist_at_tile(const struct civ_map *nmap, const struct unit *punit, const struct tile *ptile)
Nation_type_id nation_count(void)
Nation_type_id nation_number(const struct nation_type *pnation)
const char * nation_adjective_translation(const struct nation_type *pnation)
struct nation_type * nation_by_number(const Nation_type_id nation)
struct nation_type * nation_of_player(const struct player *pplayer)
bool is_nation_playable(const struct nation_type *nation)
Nation_type_id nation_index(const struct nation_type *pnation)
enum barbarian_type nation_barbarian_type(const struct nation_type *nation)
#define nation_hash_iterate(nationhash, pnation)
#define nations_iterate_end
#define nations_iterate(NAME_pnation)
#define nation_hash_iterate_end
int dsend_packet_edit_city_create(struct connection *pc, int owner, int tile, int size, int tag)
int send_packet_edit_city(struct connection *pc, const struct packet_edit_city *packet)
int send_packet_edit_game(struct connection *pc, const struct packet_edit_game *packet)
int send_packet_edit_startpos_full(struct connection *pc, const struct packet_edit_startpos_full *packet)
int dsend_packet_edit_startpos(struct connection *pc, int id, bool removal, int tag)
int send_packet_edit_player(struct connection *pc, const struct packet_edit_player *packet)
int dsend_packet_edit_player_create(struct connection *pc, int tag)
int send_packet_edit_unit(struct connection *pc, const struct packet_edit_unit *packet)
int send_packet_edit_scenario_desc(struct connection *pc, const struct packet_edit_scenario_desc *packet)
int dsend_packet_edit_unit_remove_by_id(struct connection *pc, int id)
int dsend_packet_edit_unit_create(struct connection *pc, int owner, int tile, Unit_type_id type, int count, int tag)
int dsend_packet_edit_player_remove(struct connection *pc, int id)
int send_packet_edit_tile(struct connection *pc, const struct packet_edit_tile *packet)
int dsend_packet_edit_city_remove(struct connection *pc, int id)
bool player_slot_is_used(const struct player_slot *pslot)
struct player * player_by_number(const int player_id)
int player_number(const struct player *pplayer)
const char * player_name(const struct player *pplayer)
int player_slot_index(const struct player_slot *pslot)
bool player_has_flag(const struct player *pplayer, enum plr_flag_id flag)
int player_index(const struct player *pplayer)
bool pplayers_allied(const struct player *pplayer, const struct player *pplayer2)
struct player * player_slot_get_player(const struct player_slot *pslot)
#define players_iterate_end
#define players_iterate(_pplayer)
#define player_slots_iterate(_pslot)
#define player_slots_iterate_end
struct research * research_get(const struct player *pplayer)
enum tech_state research_invention_state(const struct research *presearch, Tech_type_id tech)
Road_type_id road_count(void)
Road_type_id road_number(const struct road_type *proad)
cairo_surface_t * surface
struct packet_game_info info
struct government * government_during_revolution
struct propval * pv_cached
bool(* player_tile_vision_get)(const struct tile *ptile, const struct player *pplayer, enum vision_layer vision)
struct propstate_hash * propstate_table
struct property_page * parent_property_page
GtkTreeRowReference * rowref
enum editor_object_type objtype
struct property_page * parent_page
enum object_property_flags flags
struct extviewer * extviewer
GtkTreeViewColumn * view_column
char name[MAX_LEN_CITYNAME]
char scenario_authors[MAX_LEN_PACKET/3]
Government_type_id government
bool inventions[A_LAST+1]
bv_startpos_nations nations
struct pf_pattern conjunction[PF_MAX_CLAUSES]
struct government * government
struct player_economic economic
struct nation_type * nation
struct property_page * property_pages[NUM_OBJTYPES]
struct pf_conjunction disjunction[PF_MAX_CLAUSES]
GtkListStore * object_store
struct property_editor * pe_parent
GtkWidget * extviewer_notebook
struct objbind_hash * objbind_table
struct objbind * focused_objbind
struct stored_tag_hash * tag_table
enum editor_object_type objtype
struct objprop_hash * objprop_table
struct propval * property_value
bv_player tile_seen[V_COUNT]
int fc_snprintf(char *str, size_t n, const char *format,...)
size_t fc_strlcpy(char *dest, const char *src, size_t n)
char * fc_strcasestr(const char *haystack, const char *needle)
#define sz_strlcpy(dest, src)
#define sz_strlcat(dest, src)
const char * advance_name_translation(const struct advance *padvance)
Tech_type_id advance_index(const struct advance *padvance)
#define advance_index_iterate_end
static Tech_type_id advance_count(void)
#define advance_iterate(_p)
#define advance_iterate_end
#define advance_index_iterate(_start, _index)
const char * terrain_name_translation(const struct terrain *pterrain)
struct city * tile_city(const struct tile *ptile)
#define tile_resource(_tile)
#define tile_list_iterate(tile_list, ptile)
#define tile_terrain(_tile)
#define tile_list_iterate_end
static const bv_extras * tile_extras(const struct tile *ptile)
#define tile_has_extra(ptile, pextra)
struct sprite * get_government_sprite(const struct tileset *t, const struct government *gov)
int tileset_full_tile_height(const struct tileset *t)
bool tileset_layer_in_category(enum mapview_layer layer, enum layer_category cat)
int tileset_tile_height(const struct tileset *t)
int tileset_full_tile_width(const struct tileset *t)
#define mapview_layer_iterate(layer)
#define mapview_layer_iterate_end
struct packet_edit_tile * tile
struct packet_edit_unit * unit
struct packet_edit_player * player
struct packetdata::@152 pointers
struct packet_edit_scenario_desc * desc
struct packet_edit_city * city
struct packet_edit_game * game
struct packet_edit_startpos_full * startpos
struct government * v_gov
bv_max_extras v_bv_special
struct tile_vision_data * v_tile_vision
struct built_status * v_built
struct nation_type * v_nation
struct nation_hash * v_nation_hash
const char * v_const_string
static bool is_enemy_unit_tile(const struct tile *ptile, const struct player *pplayer)
static bool is_non_allied_unit_tile(const struct tile *ptile, const struct player *pplayer, bool everyone_non_allied)
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_end
const struct unit_type * unit_type_get(const struct unit *punit)
int utype_veteran_levels(const struct unit_type *punittype)
bool unit_has_type_flag(const struct unit *punit, enum unit_type_flag_id flag)
const char * utype_name_translation(const struct unit_type *punittype)
#define utype_fuel(ptype)
#define vision_layer_iterate(v)
#define vision_layer_iterate_end