Freeciv-3.1
Loading...
Searching...
No Matches
Data Structures | Macros | Enumerations | Functions | Variables
options.c File Reference
#include <stdarg.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "deprecations.h"
#include "fcintl.h"
#include "ioz.h"
#include "log.h"
#include "mem.h"
#include "registry.h"
#include "shared.h"
#include "string_vector.h"
#include "support.h"
#include "events.h"
#include "version.h"
#include "cma_fec.h"
#include "chatline_g.h"
#include "dialogs_g.h"
#include "gui_main_g.h"
#include "menu_g.h"
#include "optiondlg_g.h"
#include "repodlgs_g.h"
#include "voteinfo_bar_g.h"
#include "audio.h"
#include "cityrepdata.h"
#include "client_main.h"
#include "climisc.h"
#include "connectdlg_common.h"
#include "global_worklist.h"
#include "mapctrl_common.h"
#include "mapview_common.h"
#include "music.h"
#include "overview_common.h"
#include <packhand_gen.h>
#include "plrdlg_common.h"
#include "repodlgs_common.h"
#include "servers.h"
#include "themes_common.h"
#include "tilespec.h"
#include "options.h"
#include "spechash.h"

Go to the source code of this file.

Data Structures

struct  option_set
 
struct  option
 
struct  option::option_common_vtable
 
struct  copt_val_name
 
struct  client_option
 
struct  server_option
 

Macros

#define OPTION(poption)   ((struct option *) (poption))
 
#define OPTION_INIT(optset, spec_type, spec_table_var, common_table, spec_table, changed_cb, cb_data)
 
#define OPTION_BOOL_INIT(optset, common_table, bool_table, changed_cb)
 
#define OPTION_INT_INIT(optset, common_table, int_table, changed_cb)
 
#define OPTION_STR_INIT(optset, common_table, str_table, changed_cb, cb_data)
 
#define OPTION_ENUM_INIT(optset, common_table, enum_table, changed_cb)
 
#define OPTION_BITWISE_INIT(optset, common_table, bitwise_table, changed_cb)
 
#define OPTION_FONT_INIT(optset, common_table, font_table, changed_cb)
 
#define OPTION_COLOR_INIT(optset, common_table, color_table, changed_cb)
 
#define OPTION_VIDEO_MODE_INIT(optset, common_table, video_mode_table, changed_cb)
 
#define CLIENT_OPTION(poption)   ((struct client_option *) (poption))
 
#define GEN_BOOL_OPTION(oname, odesc, ohelp, ocat, ospec, odef, ocb)
 
#define GEN_INT_OPTION(oname, odesc, ohelp, ocat, ospec, odef, omin, omax, ocb)
 
#define GEN_STR_OPTION(oname, odesc, ohelp, ocat, ospec, odef, ocb, cbd)
 
#define GEN_STR_LIST_OPTION(oname, odesc, ohelp, ocat, ospec, odef, oacc, ocb, cbd)
 
#define GEN_ENUM_OPTION(oname, odesc, ohelp, ocat, ospec, odef, oacc, ocb)
 
#define GEN_BITWISE_OPTION(oname, odesc, ohelp, ocat, ospec, odef, oacc, ocb)
 
#define GEN_FONT_OPTION(oname, otgt, odesc, ohelp, ocat, ospec, odef, ocb)
 
#define GEN_COLOR_OPTION(oname, odesc, ohelp, ocat, ospec, odef_fg, odef_bg, ocb)
 
#define GEN_VIDEO_OPTION(oname, odesc, ohelp, ocat, ospec, odef_width, odef_height, ocb)
 
#define client_options_iterate_all(poption)
 
#define client_options_iterate_all_end
 
#define color_set(color_tgt, color)
 
#define SERVER_OPTION(poption)   ((struct server_option *) (poption))
 
#define handle_server_setting_common(psoption, packet)
 
#define OLD_OPTION_FILE_NAME   ".civclientrc"
 
#define MID_OPTION_FILE_NAME   ".freeciv-client-rc-%d.%d"
 
#define NEW_OPTION_FILE_NAME   "freeciv-client-rc-%d.%d"
 
#define FIRST_MAJOR_NEW_OPTION_FILE_NAME   2
 
#define FIRST_MINOR_NEW_OPTION_FILE_NAME   6
 
#define FIRST_MAJOR_MID_OPTION_FILE_NAME   2
 
#define FIRST_MINOR_MID_OPTION_FILE_NAME   2
 
#define FIRST_MAJOR_NEW_BOOLEAN   2
 
#define FIRST_MINOR_NEW_BOOLEAN   3
 
#define SPECHASH_TAG   settable_options
 
#define SPECHASH_ASTR_KEY_TYPE
 
#define SPECHASH_ASTR_DATA_TYPE
 
#define settable_options_hash_iterate(hash, name, value)    TYPED_HASH_ITERATE(const char *, const char *, hash, name, value)
 
#define settable_options_hash_iterate_end   HASH_ITERATE_END
 
#define SETTING_CASE(ARG_name, ...)
 
#define SPECHASH_TAG   dialog_options
 
#define SPECHASH_ASTR_KEY_TYPE
 
#define SPECHASH_IDATA_TYPE   bool
 
#define SPECHASH_UDATA_TO_IDATA   FC_INT_TO_PTR
 
#define SPECHASH_IDATA_TO_UDATA   FC_PTR_TO_INT
 
#define SPECHASH_VPTR_TO_IDATA   FC_PTR_TO_INT
 
#define dialog_options_hash_iterate(hash, column, visible)    TYPED_HASH_ITERATE(const char *, intptr_t, hash, column, visible)
 
#define dialog_options_hash_iterate_end   HASH_ITERATE_END
 

Enumerations

enum  client_option_category {
  COC_GRAPHICS , COC_OVERVIEW , COC_SOUND , COC_INTERFACE ,
  COC_MAPIMG , COC_NETWORK , COC_FONT , COC_MAX
}
 

Functions

static const struct strvecget_mapimg_format_list (const struct option *poption)
 
struct optionoptset_option_by_number (const struct option_set *poptset, int id)
 
struct optionoptset_option_by_name (const struct option_set *poptset, const char *name)
 
struct optionoptset_option_first (const struct option_set *poptset)
 
int optset_category_number (const struct option_set *poptset)
 
const char * optset_category_name (const struct option_set *poptset, int category)
 
const struct option_setoption_optset (const struct option *poption)
 
int option_number (const struct option *poption)
 
const char * option_name (const struct option *poption)
 
const char * option_description (const struct option *poption)
 
const char * option_help_text (const struct option *poption)
 
enum option_type option_type (const struct option *poption)
 
int option_category (const struct option *poption)
 
const char * option_category_name (const struct option *poption)
 
bool option_is_changeable (const struct option *poption)
 
struct optionoption_next (const struct option *poption)
 
bool option_reset (struct option *poption)
 
void option_set_changed_callback (struct option *poption, void(*callback)(struct option *))
 
void option_changed (struct option *poption)
 
void option_set_gui_data (struct option *poption, void *data)
 
void * option_get_gui_data (const struct option *poption)
 
int option_get_cb_data (const struct option *poption)
 
bool option_bool_get (const struct option *poption)
 
bool option_bool_def (const struct option *poption)
 
bool option_bool_set (struct option *poption, bool val)
 
int option_int_get (const struct option *poption)
 
int option_int_def (const struct option *poption)
 
int option_int_min (const struct option *poption)
 
int option_int_max (const struct option *poption)
 
bool option_int_set (struct option *poption, int val)
 
const char * option_str_get (const struct option *poption)
 
const char * option_str_def (const struct option *poption)
 
const struct strvecoption_str_values (const struct option *poption)
 
bool option_str_set (struct option *poption, const char *str)
 
int option_enum_str_to_int (const struct option *poption, const char *str)
 
const char * option_enum_int_to_str (const struct option *poption, int val)
 
int option_enum_get_int (const struct option *poption)
 
const char * option_enum_get_str (const struct option *poption)
 
int option_enum_def_int (const struct option *poption)
 
const char * option_enum_def_str (const struct option *poption)
 
const struct strvecoption_enum_values (const struct option *poption)
 
bool option_enum_set_int (struct option *poption, int val)
 
bool option_enum_set_str (struct option *poption, const char *str)
 
unsigned option_bitwise_get (const struct option *poption)
 
unsigned option_bitwise_def (const struct option *poption)
 
unsigned option_bitwise_mask (const struct option *poption)
 
const struct strvecoption_bitwise_values (const struct option *poption)
 
bool option_bitwise_set (struct option *poption, unsigned val)
 
const char * option_font_get (const struct option *poption)
 
const char * option_font_def (const struct option *poption)
 
const char * option_font_target (const struct option *poption)
 
bool option_font_set (struct option *poption, const char *font)
 
struct ft_color option_color_get (const struct option *poption)
 
struct ft_color option_color_def (const struct option *poption)
 
bool option_color_set (struct option *poption, struct ft_color color)
 
struct video_mode option_video_mode_get (const struct option *poption)
 
struct video_mode option_video_mode_def (const struct option *poption)
 
bool option_video_mode_set (struct option *poption, struct video_mode mode)
 
static struct optionclient_optset_option_by_number (int id)
 
static struct optionclient_optset_option_first (void)
 
static int client_optset_category_number (void)
 
static const char * client_optset_category_name (int category)
 
static int client_option_number (const struct option *poption)
 
static const char * client_option_name (const struct option *poption)
 
static const char * client_option_description (const struct option *poption)
 
static const char * client_option_help_text (const struct option *poption)
 
static int client_option_category (const struct option *poption)
 
static bool client_option_is_changeable (const struct option *poption)
 
static struct optionclient_option_next (const struct option *poption)
 
static bool client_option_bool_get (const struct option *poption)
 
static bool client_option_bool_def (const struct option *poption)
 
static bool client_option_bool_set (struct option *poption, bool val)
 
static int client_option_int_get (const struct option *poption)
 
static int client_option_int_def (const struct option *poption)
 
static int client_option_int_min (const struct option *poption)
 
static int client_option_int_max (const struct option *poption)
 
static bool client_option_int_set (struct option *poption, int val)
 
static const char * client_option_str_get (const struct option *poption)
 
static const char * client_option_str_def (const struct option *poption)
 
static const struct strvecclient_option_str_values (const struct option *poption)
 
static bool client_option_str_set (struct option *poption, const char *str)
 
static int client_option_enum_get (const struct option *poption)
 
static int client_option_enum_def (const struct option *poption)
 
static const struct strvecclient_option_enum_pretty_names (const struct option *poption)
 
static bool client_option_enum_set (struct option *poption, int val)
 
static const char * client_option_font_get (const struct option *poption)
 
static const char * client_option_font_def (const struct option *poption)
 
static const char * client_option_font_target (const struct option *poption)
 
static bool client_option_font_set (struct option *poption, const char *font)
 
static struct ft_color client_option_color_get (const struct option *poption)
 
static struct ft_color client_option_color_def (const struct option *poption)
 
static bool client_option_color_set (struct option *poption, struct ft_color color)
 
static struct video_mode client_option_video_mode_get (const struct option *poption)
 
static struct video_mode client_option_video_mode_def (const struct option *poption)
 
static bool client_option_video_mode_set (struct option *poption, struct video_mode mode)
 
static const struct copt_val_namegui_gtk_message_chat_location_name (int value)
 
static const struct copt_val_namegui_popup_tech_help_name (int value)
 
static void reqtree_show_icons_callback (struct option *poption)
 
static void view_option_changed_callback (struct option *poption)
 
static void manual_turn_done_callback (struct option *poption)
 
static void voteinfo_bar_callback (struct option *poption)
 
static void font_changed_callback (struct option *poption)
 
static void mapimg_changed_callback (struct option *poption)
 
static void game_music_enable_callback (struct option *poption)
 
static void menu_music_enable_callback (struct option *poption)
 
static void sound_volume_callback (struct option *poption)
 
static struct client_optionclient_option_next_valid (struct client_option *poption)
 
static const char * client_option_enum_secfile_str (secfile_data_t data, int val)
 
static const char * client_option_bitwise_secfile_str (secfile_data_t data, int val)
 
static bool client_option_load (struct option *poption, struct section_file *sf)
 
static void client_option_save (struct option *poption, struct section_file *sf)
 
static struct optionserver_optset_option_by_number (int id)
 
static struct optionserver_optset_option_first (void)
 
static int server_optset_category_number (void)
 
static const char * server_optset_category_name (int category)
 
static int server_option_number (const struct option *poption)
 
static const char * server_option_name (const struct option *poption)
 
static const char * server_option_description (const struct option *poption)
 
static const char * server_option_help_text (const struct option *poption)
 
static int server_option_category (const struct option *poption)
 
static bool server_option_is_changeable (const struct option *poption)
 
static struct optionserver_option_next (const struct option *poption)
 
static bool server_option_bool_get (const struct option *poption)
 
static bool server_option_bool_def (const struct option *poption)
 
static bool server_option_bool_set (struct option *poption, bool val)
 
static int server_option_int_get (const struct option *poption)
 
static int server_option_int_def (const struct option *poption)
 
static int server_option_int_min (const struct option *poption)
 
static int server_option_int_max (const struct option *poption)
 
static bool server_option_int_set (struct option *poption, int val)
 
static const char * server_option_str_get (const struct option *poption)
 
static const char * server_option_str_def (const struct option *poption)
 
static const struct strvecserver_option_str_values (const struct option *poption)
 
static bool server_option_str_set (struct option *poption, const char *str)
 
static int server_option_enum_get (const struct option *poption)
 
static int server_option_enum_def (const struct option *poption)
 
static const struct strvecserver_option_enum_pretty (const struct option *poption)
 
static bool server_option_enum_set (struct option *poption, int val)
 
static unsigned server_option_bitwise_get (const struct option *poption)
 
static unsigned server_option_bitwise_def (const struct option *poption)
 
static const struct strvecserver_option_bitwise_pretty (const struct option *poption)
 
static bool server_option_bitwise_set (struct option *poption, unsigned val)
 
static void desired_settable_option_send (struct option *poption)
 
void server_options_init (void)
 
static void server_option_free (struct server_option *poption)
 
void server_options_free (void)
 
void handle_server_setting_control (const struct packet_server_setting_control *packet)
 
void handle_server_setting_const (const struct packet_server_setting_const *packet)
 
void handle_server_setting_bool (const struct packet_server_setting_bool *packet)
 
void handle_server_setting_int (const struct packet_server_setting_int *packet)
 
void handle_server_setting_str (const struct packet_server_setting_str *packet)
 
void handle_server_setting_enum (const struct packet_server_setting_enum *packet)
 
void handle_server_setting_bitwise (const struct packet_server_setting_bitwise *packet)
 
static struct server_optionserver_option_next_valid (struct server_option *poption)
 
static void server_option_enum_support_name (const struct option *poption, const char **pvalue, const char **pdefault)
 
static void server_option_bitwise_support_base (const struct strvec *values, unsigned val, char *buf, size_t buf_len)
 
static void server_option_bitwise_support_name (const struct option *poption, char *val_buf, size_t val_len, char *def_buf, size_t def_len)
 
static void message_options_init (void)
 
static void message_options_free (void)
 
static void message_options_load (struct section_file *file, const char *prefix)
 
static void message_options_save (struct section_file *file, const char *prefix)
 
static void load_cma_preset (struct section_file *file, int i)
 
static void save_cma_preset (struct section_file *file, int i)
 
static void save_cma_presets (struct section_file *file)
 
static const char * get_current_option_file_name (void)
 
static const char * get_last_option_file_name (bool *allow_digital_boolean)
 
static void settable_options_load (struct section_file *sf)
 
static void settable_options_save (struct section_file *sf)
 
void desired_settable_options_update (void)
 
void desired_settable_option_update (const char *op_name, const char *op_value, bool allow_replace)
 
static bool settable_option_upgrade_value (const struct option *poption, int old_value, char *buf, size_t buf_len)
 
void resend_desired_settable_options (void)
 
static void options_dialogs_load (struct section_file *sf)
 
static void options_dialogs_save (struct section_file *sf)
 
void options_dialogs_update (void)
 
void options_dialogs_set (void)
 
void options_load (void)
 
static void option_save_output_window_callback (enum log_level lvl, const char *msg,...)
 
void options_save (option_save_log_callback log_cb)
 
static void options_init_names (const struct copt_val_name *(*acc)(int), struct strvec **support, struct strvec **pretty)
 
void options_init (void)
 
void options_free (void)
 
bool video_mode_to_string (char *buf, size_t buf_len, struct video_mode *mode)
 
bool string_to_video_mode (const char *buf, struct video_mode *mode)
 
const char * tileset_name_for_topology (int topology_id)
 
void option_set_default_ts (struct tileset *t)
 
static bool is_ts_option_unset (const char *optname)
 
void fill_topo_ts_default (void)
 

Variables

struct client_options gui_options
 
static bool options_fully_initialized = FALSE
 
static struct option_set client_optset_static
 
const struct option_setclient_optset = &client_optset_static
 
static const struct option_common_vtable client_option_common_vtable
 
static const struct option_bool_vtable client_option_bool_vtable
 
static const struct option_int_vtable client_option_int_vtable
 
static const struct option_str_vtable client_option_str_vtable
 
static const struct option_enum_vtable client_option_enum_vtable
 
static const struct option_font_vtable client_option_font_vtable
 
static const struct option_color_vtable client_option_color_vtable
 
static const struct option_video_mode_vtable client_option_video_mode_vtable
 
static struct client_option client_options []
 
static const int client_options_num = ARRAY_SIZE(client_options)
 
static char ** server_options_categories = NULL
 
static struct server_optionserver_options = NULL
 
static int server_options_categories_num = 0
 
static int server_options_num = 0
 
static struct option_set server_optset_static
 
const struct option_setserver_optset = &server_optset_static
 
static const struct option_common_vtable server_option_common_vtable
 
static const struct option_bool_vtable server_option_bool_vtable
 
static const struct option_int_vtable server_option_int_vtable
 
static const struct option_str_vtable server_option_str_vtable
 
static const struct option_enum_vtable server_option_enum_vtable
 
static const struct option_bitwise_vtable server_option_bitwise_vtable
 
int messages_where [E_COUNT]
 
static struct settable_options_hash * settable_options_hash = NULL
 
static struct dialog_options_hash * dialog_options_hash = NULL
 

Macro Definition Documentation

◆ CLIENT_OPTION

#define CLIENT_OPTION (   poption)    ((struct client_option *) (poption))

Definition at line 1466 of file options.c.

◆ client_options_iterate_all

#define client_options_iterate_all (   poption)
Value:
{ \
const struct client_option *const poption##_max = \
struct client_option *client_##poption = client_options; \
struct option *poption; \
for (; client_##poption < poption##_max; client_##poption++) { \
poption = OPTION(client_##poption);
static struct client_option client_options[]
Definition options.c:1861
#define OPTION(poption)
Definition options.c:538
static const int client_options_num
Definition options.c:3317

Definition at line 3320 of file options.c.

◆ client_options_iterate_all_end

#define client_options_iterate_all_end
Value:
} \
}

Definition at line 3329 of file options.c.

◆ color_set

#define color_set (   color_tgt,
  color 
)
Value:
if (NULL == color_tgt) { \
if (NULL != color) { \
color_tgt = fc_strdup(color); \
changed = TRUE; \
} \
} else { \
if (NULL == color) { \
free((void *) color_tgt); \
color_tgt = NULL; \
changed = TRUE; \
} else if (0 != strcmp(color_tgt, color)) { \
free((void *) color_tgt); \
color_tgt = fc_strdup(color); \
changed = TRUE; \
} \
}
#define fc_strdup(str)
Definition mem.h:43
Definition colors.h:20
#define TRUE
Definition support.h:46

◆ dialog_options_hash_iterate

#define dialog_options_hash_iterate (   hash,
  column,
  visible 
)     TYPED_HASH_ITERATE(const char *, intptr_t, hash, column, visible)

Definition at line 5783 of file options.c.

◆ dialog_options_hash_iterate_end

#define dialog_options_hash_iterate_end   HASH_ITERATE_END

Definition at line 5785 of file options.c.

◆ FIRST_MAJOR_MID_OPTION_FILE_NAME

#define FIRST_MAJOR_MID_OPTION_FILE_NAME   2

Definition at line 5258 of file options.c.

◆ FIRST_MAJOR_NEW_BOOLEAN

#define FIRST_MAJOR_NEW_BOOLEAN   2

Definition at line 5261 of file options.c.

◆ FIRST_MAJOR_NEW_OPTION_FILE_NAME

#define FIRST_MAJOR_NEW_OPTION_FILE_NAME   2

Definition at line 5255 of file options.c.

◆ FIRST_MINOR_MID_OPTION_FILE_NAME

#define FIRST_MINOR_MID_OPTION_FILE_NAME   2

Definition at line 5259 of file options.c.

◆ FIRST_MINOR_NEW_BOOLEAN

#define FIRST_MINOR_NEW_BOOLEAN   3

Definition at line 5262 of file options.c.

◆ FIRST_MINOR_NEW_OPTION_FILE_NAME

#define FIRST_MINOR_NEW_OPTION_FILE_NAME   6

Definition at line 5256 of file options.c.

◆ GEN_BITWISE_OPTION

#define GEN_BITWISE_OPTION (   oname,
  odesc,
  ohelp,
  ocat,
  ospec,
  odef,
  oacc,
  ocb 
)
Value:
{ \
client_option_bitwise_vtable, ocb), \
.name = #oname, \
.description = odesc, \
.help_text = ohelp, \
.category = ocat, \
.specific = ospec, \
INIT_BRACE_BEGIN \
.bitwise = { \
.pvalue = &gui_options.oname, \
.def = odef, \
.support_names = NULL, /* Set in options_init(). */ \
.pretty_names = NULL, \
.name_accessor = oacc \
} \
INIT_BRACE_END \
}
#define OPTION_BITWISE_INIT(optset, common_table, bitwise_table, changed_cb)
Definition options.c:564
static struct option_set client_optset_static
Definition options.c:1249
static const struct option_common_vtable client_option_common_vtable
Definition options.c:1275
struct client_options gui_options
Definition options.c:71

Definition at line 1674 of file options.c.

◆ GEN_BOOL_OPTION

#define GEN_BOOL_OPTION (   oname,
  odesc,
  ohelp,
  ocat,
  ospec,
  odef,
  ocb 
)
Value:
{ \
.name = #oname, \
.description = odesc, \
.help_text = ohelp, \
.category = ocat, \
.specific = ospec, \
INIT_BRACE_BEGIN \
.boolean = { \
.pvalue = &gui_options.oname, \
.def = odef, \
} \
INIT_BRACE_END \
}
static const struct option_bool_vtable client_option_bool_vtable
Definition options.c:1289
#define OPTION_BOOL_INIT(optset, common_table, bool_table, changed_cb)
Definition options.c:552

Definition at line 1484 of file options.c.

◆ GEN_COLOR_OPTION

#define GEN_COLOR_OPTION (   oname,
  odesc,
  ohelp,
  ocat,
  ospec,
  odef_fg,
  odef_bg,
  ocb 
)
Value:
{ \
.name = #oname, \
.description = odesc, \
.help_text = ohelp, \
.category = ocat, \
.specific = ospec, \
INIT_BRACE_BEGIN \
.color = { \
.pvalue = &gui_options.oname, \
.def = FT_COLOR(odef_fg, odef_bg) \
} \
INIT_BRACE_END \
}
#define FT_COLOR(fg, bg)
static const struct option_color_vtable client_option_color_vtable
Definition options.c:1368
#define OPTION_COLOR_INIT(optset, common_table, color_table, changed_cb)
Definition options.c:571

Definition at line 1751 of file options.c.

◆ GEN_ENUM_OPTION

#define GEN_ENUM_OPTION (   oname,
  odesc,
  ohelp,
  ocat,
  ospec,
  odef,
  oacc,
  ocb 
)
Value:
{ \
.name = #oname, \
.description = odesc, \
.help_text = ohelp, \
.category = ocat, \
.specific = ospec, \
INIT_BRACE_BEGIN \
.enumerator = { \
.pvalue = (int *) &gui_options.oname, \
.def = odef, \
.support_names = NULL, /* Set in options_init(). */ \
.pretty_names = NULL, \
.name_accessor = oacc \
} \
INIT_BRACE_END \
}
static const struct option_enum_vtable client_option_enum_vtable
Definition options.c:1328
#define OPTION_ENUM_INIT(optset, common_table, enum_table, changed_cb)
Definition options.c:561

Definition at line 1636 of file options.c.

◆ GEN_FONT_OPTION

#define GEN_FONT_OPTION (   oname,
  otgt,
  odesc,
  ohelp,
  ocat,
  ospec,
  odef,
  ocb 
)
Value:
{ \
.name = #oname, \
.description = odesc, \
.help_text = ohelp, \
.category = ocat, \
.specific = ospec, \
INIT_BRACE_BEGIN \
.font = { \
.pvalue = gui_options.oname, \
.size = sizeof(gui_options.oname), \
.def = odef, \
.target = otgt, \
} \
INIT_BRACE_END \
}
#define OPTION_FONT_INIT(optset, common_table, font_table, changed_cb)
Definition options.c:568
static const struct option_font_vtable client_option_font_vtable
Definition options.c:1356

Definition at line 1715 of file options.c.

◆ GEN_INT_OPTION

#define GEN_INT_OPTION (   oname,
  odesc,
  ohelp,
  ocat,
  ospec,
  odef,
  omin,
  omax,
  ocb 
)
Value:
{ \
.name = #oname, \
.description = odesc, \
.help_text = ohelp, \
.category = ocat, \
.specific = ospec, \
INIT_BRACE_BEGIN \
.integer = { \
.pvalue = &gui_options.oname, \
.def = odef, \
.min = omin, \
.max = omax \
} \
INIT_BRACE_END \
}
#define OPTION_INT_INIT(optset, common_table, int_table, changed_cb)
Definition options.c:555
static const struct option_int_vtable client_option_int_vtable
Definition options.c:1301

Definition at line 1520 of file options.c.

◆ GEN_STR_LIST_OPTION

#define GEN_STR_LIST_OPTION (   oname,
  odesc,
  ohelp,
  ocat,
  ospec,
  odef,
  oacc,
  ocb,
  cbd 
)
Value:
{ \
.name = #oname, \
.description = odesc, \
.help_text = ohelp, \
.category = ocat, \
.specific = ospec, \
INIT_BRACE_BEGIN \
.string = { \
.pvalue = gui_options.oname, \
.size = sizeof(gui_options.oname), \
.def = odef, \
.val_accessor = oacc \
} \
INIT_BRACE_END \
}
#define OPTION_STR_INIT(optset, common_table, str_table, changed_cb, cb_data)
Definition options.c:558
static const struct option_str_vtable client_option_str_vtable
Definition options.c:1315

Definition at line 1599 of file options.c.

◆ GEN_STR_OPTION

#define GEN_STR_OPTION (   oname,
  odesc,
  ohelp,
  ocat,
  ospec,
  odef,
  ocb,
  cbd 
)
Value:
{ \
.name = #oname, \
.description = odesc, \
.help_text = ohelp, \
.category = ocat, \
.specific = ospec, \
INIT_BRACE_BEGIN \
.string = { \
.pvalue = gui_options.oname, \
.size = sizeof(gui_options.oname), \
.def = odef, \
.val_accessor = NULL \
} \
INIT_BRACE_END \
}

Definition at line 1558 of file options.c.

◆ GEN_VIDEO_OPTION

#define GEN_VIDEO_OPTION (   oname,
  odesc,
  ohelp,
  ocat,
  ospec,
  odef_width,
  odef_height,
  ocb 
)
Value:
{ \
ocb), \
.name = #oname, \
.description = odesc, \
.help_text = ohelp, \
.category = ocat, \
.specific = ospec, \
INIT_BRACE_BEGIN \
.video_mode = { \
.pvalue = &gui_options.oname, \
.def = VIDEO_MODE(odef_width, odef_height) \
} \
INIT_BRACE_END \
}
static const struct option_video_mode_vtable client_option_video_mode_vtable
Definition options.c:1381
#define OPTION_VIDEO_MODE_INIT(optset, common_table, video_mode_table, changed_cb)
Definition options.c:574
#define VIDEO_MODE(ARG_width, ARG_height)
Definition options.h:50

Definition at line 1786 of file options.c.

◆ handle_server_setting_common

#define handle_server_setting_common (   psoption,
  packet 
)

Definition at line 4309 of file options.c.

◆ MID_OPTION_FILE_NAME

#define MID_OPTION_FILE_NAME   ".freeciv-client-rc-%d.%d"

Definition at line 5251 of file options.c.

◆ NEW_OPTION_FILE_NAME

#define NEW_OPTION_FILE_NAME   "freeciv-client-rc-%d.%d"

Definition at line 5252 of file options.c.

◆ OLD_OPTION_FILE_NAME

#define OLD_OPTION_FILE_NAME   ".civclientrc"

Definition at line 5249 of file options.c.

◆ OPTION

#define OPTION (   poption)    ((struct option *) (poption))

Definition at line 538 of file options.c.

◆ OPTION_BITWISE_INIT

#define OPTION_BITWISE_INIT (   optset,
  common_table,
  bitwise_table,
  changed_cb 
)
Value:
OPTION_INIT(optset, OT_BITWISE, bitwise_vtable, common_table, \
bitwise_table, changed_cb, 0)
#define OPTION_INIT(optset, spec_type, spec_table_var, common_table, spec_table, changed_cb, cb_data)
Definition options.c:540

Definition at line 564 of file options.c.

◆ OPTION_BOOL_INIT

#define OPTION_BOOL_INIT (   optset,
  common_table,
  bool_table,
  changed_cb 
)
Value:
OPTION_INIT(optset, OT_BOOLEAN, bool_vtable, common_table, bool_table, \
changed_cb, 0)

Definition at line 552 of file options.c.

◆ OPTION_COLOR_INIT

#define OPTION_COLOR_INIT (   optset,
  common_table,
  color_table,
  changed_cb 
)
Value:
OPTION_INIT(optset, OT_COLOR, color_vtable, common_table, color_table, \
changed_cb, 0)

Definition at line 571 of file options.c.

◆ OPTION_ENUM_INIT

#define OPTION_ENUM_INIT (   optset,
  common_table,
  enum_table,
  changed_cb 
)
Value:
OPTION_INIT(optset, OT_ENUM, enum_vtable, common_table, enum_table, \
changed_cb, 0)

Definition at line 561 of file options.c.

◆ OPTION_FONT_INIT

#define OPTION_FONT_INIT (   optset,
  common_table,
  font_table,
  changed_cb 
)
Value:
OPTION_INIT(optset, OT_FONT, font_vtable, common_table, font_table, \
changed_cb, 0)

Definition at line 568 of file options.c.

◆ OPTION_INIT

#define OPTION_INIT (   optset,
  spec_type,
  spec_table_var,
  common_table,
  spec_table,
  changed_cb,
  cb_data 
)
Value:
{ \
.poptset = optset, \
.type = spec_type, \
.common_vtable = &common_table, \
INIT_BRACE_BEGIN \
.spec_table_var = &spec_table \
INIT_BRACE_END, \
.changed_callback = changed_cb, \
.callback_data = cb_data, \
.gui_data = NULL \
}

Definition at line 540 of file options.c.

◆ OPTION_INT_INIT

#define OPTION_INT_INIT (   optset,
  common_table,
  int_table,
  changed_cb 
)
Value:
OPTION_INIT(optset, OT_INTEGER, int_vtable, common_table, int_table, \
changed_cb, 0)

Definition at line 555 of file options.c.

◆ OPTION_STR_INIT

#define OPTION_STR_INIT (   optset,
  common_table,
  str_table,
  changed_cb,
  cb_data 
)
Value:
OPTION_INIT(optset, OT_STRING, str_vtable, common_table, str_table, \
changed_cb, cb_data)

Definition at line 558 of file options.c.

◆ OPTION_VIDEO_MODE_INIT

#define OPTION_VIDEO_MODE_INIT (   optset,
  common_table,
  video_mode_table,
  changed_cb 
)
Value:
OPTION_INIT(optset, OT_VIDEO_MODE, video_mode_vtable, common_table, \
video_mode_table, changed_cb, 0)

Definition at line 574 of file options.c.

◆ SERVER_OPTION

#define SERVER_OPTION (   poption)    ((struct server_option *) (poption))

Definition at line 4145 of file options.c.

◆ settable_options_hash_iterate

#define settable_options_hash_iterate (   hash,
  name,
  value 
)     TYPED_HASH_ITERATE(const char *, const char *, hash, name, value)

Definition at line 5428 of file options.c.

◆ settable_options_hash_iterate_end

#define settable_options_hash_iterate_end   HASH_ITERATE_END

Definition at line 5430 of file options.c.

◆ SETTING_CASE

#define SETTING_CASE (   ARG_name,
  ... 
)
Value:
if (0 == strcmp(ARG_name, name)) { \
static const char *values[] = { __VA_ARGS__ }; \
if (0 <= old_value && old_value < ARRAY_SIZE(values) \
&& NULL != values[old_value]) { \
fc_strlcpy(buf, values[old_value], buf_len); \
return TRUE; \
} else { \
return FALSE; \
} \
}
const char * name
Definition inputfile.c:127
#define ARRAY_SIZE(x)
Definition shared.h:85
#define FALSE
Definition support.h:47

◆ SPECHASH_ASTR_DATA_TYPE

#define SPECHASH_ASTR_DATA_TYPE

Definition at line 5426 of file options.c.

◆ SPECHASH_ASTR_KEY_TYPE [1/2]

#define SPECHASH_ASTR_KEY_TYPE

Definition at line 5425 of file options.c.

◆ SPECHASH_ASTR_KEY_TYPE [2/2]

#define SPECHASH_ASTR_KEY_TYPE

Definition at line 5425 of file options.c.

◆ SPECHASH_IDATA_TO_UDATA

#define SPECHASH_IDATA_TO_UDATA   FC_PTR_TO_INT

Definition at line 5780 of file options.c.

◆ SPECHASH_IDATA_TYPE

#define SPECHASH_IDATA_TYPE   bool

Definition at line 5778 of file options.c.

◆ SPECHASH_TAG [1/2]

#define SPECHASH_TAG   settable_options

Definition at line 5424 of file options.c.

◆ SPECHASH_TAG [2/2]

#define SPECHASH_TAG   dialog_options

Definition at line 5424 of file options.c.

◆ SPECHASH_UDATA_TO_IDATA

#define SPECHASH_UDATA_TO_IDATA   FC_INT_TO_PTR

Definition at line 5779 of file options.c.

◆ SPECHASH_VPTR_TO_IDATA

#define SPECHASH_VPTR_TO_IDATA   FC_PTR_TO_INT

Definition at line 5781 of file options.c.

Enumeration Type Documentation

◆ client_option_category

Enumerator
COC_GRAPHICS 
COC_OVERVIEW 
COC_SOUND 
COC_INTERFACE 
COC_MAPIMG 
COC_NETWORK 
COC_FONT 
COC_MAX 

Definition at line 1387 of file options.c.

Function Documentation

◆ client_option_bitwise_secfile_str()

static const char * client_option_bitwise_secfile_str ( secfile_data_t  data,
int  val 
)
static

Returns the "support" name of a single value for this client option of type OT_BITWISE (a string suitable for saving in a file). The prototype must match the 'secfile_enum_name_data_fn_t' type.

Definition at line 3699 of file options.c.

Referenced by client_option_load(), and client_option_save().

◆ client_option_bool_def()

static bool client_option_bool_def ( const struct option poption)
static

Returns the default value of this client option of type OT_BOOLEAN.

Definition at line 3477 of file options.c.

◆ client_option_bool_get()

static bool client_option_bool_get ( const struct option poption)
static

Returns the value of this client option of type OT_BOOLEAN.

Definition at line 3469 of file options.c.

◆ client_option_bool_set()

static bool client_option_bool_set ( struct option poption,
bool  val 
)
static

Set the value of this client option of type OT_BOOLEAN. Returns TRUE if the value changed.

Definition at line 3486 of file options.c.

◆ client_option_category()

static int client_option_category ( const struct option poption)
static

Returns the category of this client option.

Definition at line 3445 of file options.c.

◆ client_option_color_def()

static struct ft_color client_option_color_def ( const struct option poption)
static

Returns the default value of this client option of type OT_COLOR.

Definition at line 3760 of file options.c.

◆ client_option_color_get()

static struct ft_color client_option_color_get ( const struct option poption)
static

Returns the value of this client option of type OT_COLOR.

Definition at line 3752 of file options.c.

◆ client_option_color_set()

static bool client_option_color_set ( struct option poption,
struct ft_color  color 
)
static

Set the value of this client option of type OT_COLOR. Returns TRUE if the value changed.

Definition at line 3769 of file options.c.

◆ client_option_description()

static const char * client_option_description ( const struct option poption)
static

Returns the description of this client option.

Definition at line 3429 of file options.c.

◆ client_option_enum_def()

static int client_option_enum_def ( const struct option poption)
static

Returns the default value of this client option of type OT_ENUM.

Definition at line 3603 of file options.c.

◆ client_option_enum_get()

static int client_option_enum_get ( const struct option poption)
static

Returns the current value of this client option of type OT_ENUM.

Definition at line 3595 of file options.c.

◆ client_option_enum_pretty_names()

static const struct strvec * client_option_enum_pretty_names ( const struct option poption)
static

Returns the possible values of this client option of type OT_ENUM, as user-visible (translatable but not translated) strings.

Definition at line 3613 of file options.c.

◆ client_option_enum_secfile_str()

static const char * client_option_enum_secfile_str ( secfile_data_t  data,
int  val 
)
static

Returns the "support" name of the value for this client option of type OT_ENUM (a string suitable for saving in a file). The prototype must match the 'secfile_enum_name_data_fn_t' type.

Definition at line 3641 of file options.c.

Referenced by client_option_load(), and client_option_save().

◆ client_option_enum_set()

static bool client_option_enum_set ( struct option poption,
int  val 
)
static

Set the value of this client option of type OT_ENUM. Returns TRUE if the value changed.

Definition at line 3622 of file options.c.

◆ client_option_font_def()

static const char * client_option_font_def ( const struct option poption)
static

Returns the default value of this client option of type OT_FONT.

Definition at line 3719 of file options.c.

◆ client_option_font_get()

static const char * client_option_font_get ( const struct option poption)
static

Returns the value of this client option of type OT_FONT.

Definition at line 3711 of file options.c.

◆ client_option_font_set()

static bool client_option_font_set ( struct option poption,
const char *  font 
)
static

Set the value of this client option of type OT_FONT. Returns TRUE if the value changed.

Definition at line 3736 of file options.c.

◆ client_option_font_target()

static const char * client_option_font_target ( const struct option poption)
static

Returns the target style name of this client option of type OT_FONT.

Definition at line 3727 of file options.c.

◆ client_option_help_text()

static const char * client_option_help_text ( const struct option poption)
static

Returns the help text for this client option.

Definition at line 3437 of file options.c.

◆ client_option_int_def()

static int client_option_int_def ( const struct option poption)
static

Returns the default value of this client option of type OT_INTEGER.

Definition at line 3509 of file options.c.

◆ client_option_int_get()

static int client_option_int_get ( const struct option poption)
static

Returns the value of this client option of type OT_INTEGER.

Definition at line 3501 of file options.c.

◆ client_option_int_max()

static int client_option_int_max ( const struct option poption)
static

Returns the maximal value for this client option of type OT_INTEGER.

Definition at line 3525 of file options.c.

◆ client_option_int_min()

static int client_option_int_min ( const struct option poption)
static

Returns the minimal value for this client option of type OT_INTEGER.

Definition at line 3517 of file options.c.

◆ client_option_int_set()

static bool client_option_int_set ( struct option poption,
int  val 
)
static

Set the value of this client option of type OT_INTEGER. Returns TRUE if the value changed.

Definition at line 3534 of file options.c.

◆ client_option_is_changeable()

static bool client_option_is_changeable ( const struct option poption)
static

Returns TRUE if this client option can be modified.

Definition at line 3453 of file options.c.

◆ client_option_load()

static bool client_option_load ( struct option poption,
struct section_file sf 
)
static

Load the option from a file. Returns TRUE if the option changed.

Definition at line 3840 of file options.c.

◆ client_option_name()

static const char * client_option_name ( const struct option poption)
static

Returns the name of this client option.

Definition at line 3421 of file options.c.

◆ client_option_next()

static struct option * client_option_next ( const struct option poption)
static

Returns the next valid option pointer for the current gui type.

Definition at line 3461 of file options.c.

◆ client_option_next_valid()

static struct client_option * client_option_next_valid ( struct client_option poption)
static

Returns the next valid option pointer for the current gui type.

Definition at line 3338 of file options.c.

Referenced by client_option_next(), and client_optset_option_first().

◆ client_option_number()

static int client_option_number ( const struct option poption)
static

Returns the number of this client option.

Definition at line 3413 of file options.c.

◆ client_option_save()

static void client_option_save ( struct option poption,
struct section_file sf 
)
static

Save the option to a file.

Definition at line 3928 of file options.c.

◆ client_option_str_def()

static const char * client_option_str_def ( const struct option poption)
static

Returns the default value of this client option of type OT_STRING.

Definition at line 3559 of file options.c.

◆ client_option_str_get()

static const char * client_option_str_get ( const struct option poption)
static

Returns the value of this client option of type OT_STRING.

Definition at line 3551 of file options.c.

◆ client_option_str_set()

static bool client_option_str_set ( struct option poption,
const char *  str 
)
static

Set the value of this client option of type OT_STRING. Returns TRUE if the value changed.

Definition at line 3579 of file options.c.

◆ client_option_str_values()

static const struct strvec * client_option_str_values ( const struct option poption)
static

Returns the possible string values of this client option of type OT_STRING.

Definition at line 3569 of file options.c.

◆ client_option_video_mode_def()

static struct video_mode client_option_video_mode_def ( const struct option poption)
static

Returns the default value of this client option of type OT_VIDEO_MODE.

Definition at line 3814 of file options.c.

◆ client_option_video_mode_get()

static struct video_mode client_option_video_mode_get ( const struct option poption)
static

Returns the value of this client option of type OT_VIDEO_MODE.

Definition at line 3805 of file options.c.

◆ client_option_video_mode_set()

static bool client_option_video_mode_set ( struct option poption,
struct video_mode  mode 
)
static

Set the value of this client option of type OT_VIDEO_MODE. Returns TRUE if the value changed.

Definition at line 3823 of file options.c.

◆ client_optset_category_name()

static const char * client_optset_category_name ( int  category)
static

Returns the name (translated) of the option class.

Definition at line 3383 of file options.c.

◆ client_optset_category_number()

static int client_optset_category_number ( void  )
static

Returns the number of client option categories.

Definition at line 3375 of file options.c.

◆ client_optset_option_by_number()

static struct option * client_optset_option_by_number ( int  id)
static

Returns the option corresponding to this id.

Definition at line 3356 of file options.c.

◆ client_optset_option_first()

static struct option * client_optset_option_first ( void  )
static

Returns the first valid option pointer for the current gui type.

Definition at line 3367 of file options.c.

◆ desired_settable_option_send()

static void desired_settable_option_send ( struct option poption)
static

Send the desired server options to the server.

Definition at line 5656 of file options.c.

Referenced by resend_desired_settable_options().

◆ desired_settable_option_update()

void desired_settable_option_update ( const char *  op_name,
const char *  op_value,
bool  allow_replace 
)

Update a desired settable option in the hash table from a value which can be different of the current configuration.

Definition at line 5599 of file options.c.

Referenced by client_start_server().

◆ desired_settable_options_update()

void desired_settable_options_update ( void  )

Update the desired settable options hash table from the current setting configuration.

Definition at line 5531 of file options.c.

Referenced by option_dialog::apply_option(), and option_dialog_reponse_callback().

◆ fill_topo_ts_default()

void fill_topo_ts_default ( void  )

Fill default tilesets for topology-specific settings.

Definition at line 6555 of file options.c.

Referenced by default_tileset_select().

◆ font_changed_callback()

static void font_changed_callback ( struct option poption)
static

Callback for font options.

Definition at line 6375 of file options.c.

◆ game_music_enable_callback()

static void game_music_enable_callback ( struct option poption)
static

Callback for music enabling option.

Definition at line 6417 of file options.c.

◆ get_current_option_file_name()

static const char * get_current_option_file_name ( void  )
static

Returns pointer to static memory containing name of the current option file. Usually used for saving. Ie, based on FREECIV_OPT env var, and freeciv storage root dir. (or an OPTION_FILE_NAME define defined in fc_config.h) Or NULL if problem.

Definition at line 5271 of file options.c.

◆ get_last_option_file_name()

static const char * get_last_option_file_name ( bool allow_digital_boolean)
static

Check the last option file we saved. Usually used to load. Ie, based on FREECIV_OPT env var, and home dir. (or an OPTION_FILE_NAME define defined in fc_config.h), or NULL if not found.

Set in allow_digital_boolean if we should look for old boolean values (saved as 0 and 1), so if the rc file version is older than 2.3.0.

Definition at line 5306 of file options.c.

◆ get_mapimg_format_list()

static const struct strvec * get_mapimg_format_list ( const struct option poption)
static

Option framework wrapper for mapimg_get_format_list()

Definition at line 6461 of file options.c.

◆ gui_gtk_message_chat_location_name()

static const struct copt_val_name * gui_gtk_message_chat_location_name ( int  value)
static

GTK message/chat layout setting names accessor.

Definition at line 1814 of file options.c.

◆ gui_popup_tech_help_name()

static const struct copt_val_name * gui_popup_tech_help_name ( int  value)
static

Popup tech help setting names accessor.

Definition at line 1834 of file options.c.

◆ handle_server_setting_bitwise()

void handle_server_setting_bitwise ( const struct packet_server_setting_bitwise packet)

Receive a bitwise server setting info packet.

Definition at line 4550 of file options.c.

Referenced by client_handle_packet().

◆ handle_server_setting_bool()

void handle_server_setting_bool ( const struct packet_server_setting_bool packet)

Receive a boolean server setting info packet.

Definition at line 4344 of file options.c.

Referenced by client_handle_packet().

◆ handle_server_setting_const()

void handle_server_setting_const ( const struct packet_server_setting_const packet)

Receive a server setting info packet.

Definition at line 4287 of file options.c.

Referenced by client_handle_packet().

◆ handle_server_setting_control()

void handle_server_setting_control ( const struct packet_server_setting_control packet)

Allocate the server options and categories.

Definition at line 4253 of file options.c.

Referenced by client_handle_packet().

◆ handle_server_setting_enum()

void handle_server_setting_enum ( const struct packet_server_setting_enum packet)

Receive an enumerator server setting info packet.

Definition at line 4461 of file options.c.

Referenced by client_handle_packet().

◆ handle_server_setting_int()

void handle_server_setting_int ( const struct packet_server_setting_int packet)

Receive a integer server setting info packet.

Definition at line 4379 of file options.c.

Referenced by client_handle_packet().

◆ handle_server_setting_str()

void handle_server_setting_str ( const struct packet_server_setting_str packet)

Receive a string server setting info packet.

Definition at line 4416 of file options.c.

Referenced by client_handle_packet().

◆ is_ts_option_unset()

static bool is_ts_option_unset ( const char *  optname)
static

Does topology-specific tileset option lack value?

Definition at line 6532 of file options.c.

◆ load_cma_preset()

static void load_cma_preset ( struct section_file file,
int  i 
)
static

Does heavy lifting for looking up a preset.

Definition at line 5183 of file options.c.

◆ manual_turn_done_callback()

static void manual_turn_done_callback ( struct option poption)
static

Callback for when ai_manual_turn_done is changed.

Definition at line 6342 of file options.c.

◆ mapimg_changed_callback()

static void mapimg_changed_callback ( struct option poption)
static

Callback for mapimg options.

Definition at line 6384 of file options.c.

◆ menu_music_enable_callback()

static void menu_music_enable_callback ( struct option poption)
static

Callback for music enabling option.

Definition at line 6431 of file options.c.

◆ message_options_free()

static void message_options_free ( void  )
static

Free resources allocated for message options system

Definition at line 5073 of file options.c.

◆ message_options_init()

static void message_options_init ( void  )
static

These could be a static table initialisation, except its easier to do it this way.

Definition at line 5035 of file options.c.

◆ message_options_load()

static void message_options_load ( struct section_file file,
const char *  prefix 
)
static

Load the message options; use the function defined by specenum_gen.h (see also events.h).

Definition at line 5082 of file options.c.

◆ message_options_save()

static void message_options_save ( struct section_file file,
const char *  prefix 
)
static

Save the message options; use the function defined by specenum_gen.h (see also events.h).

Definition at line 5162 of file options.c.

◆ option_bitwise_def()

unsigned option_bitwise_def ( const struct option poption)

Returns the default value of this bitwise option.

Definition at line 1060 of file options.c.

Referenced by option_dialog_option_reset(), option_dialog::option_dialog_reset(), and option_reset().

◆ option_bitwise_get()

unsigned option_bitwise_get ( const struct option poption)

Returns the current value of this bitwise option.

Definition at line 1049 of file options.c.

Referenced by client_option_save(), client_ss_val_bitwise_get(), option_dialog_option_refresh(), and option_dialog::option_dialog_refresh().

◆ option_bitwise_mask()

unsigned option_bitwise_mask ( const struct option poption)

Returns the mask of this bitwise option.

Definition at line 1071 of file options.c.

Referenced by option_bitwise_set().

◆ option_bitwise_set()

bool option_bitwise_set ( struct option poption,
unsigned  val 
)

Sets the value of this bitwise option. Returns TRUE if the value changed.

Definition at line 1099 of file options.c.

Referenced by option_dialog::apply_options(), client_option_load(), option_dialog_option_apply(), and option_reset().

◆ option_bitwise_values()

const struct strvec * option_bitwise_values ( const struct option poption)

Returns a vector of strings describing every bit of this option, as user-visible (translatable but not translated) strings.

Definition at line 1088 of file options.c.

Referenced by option_dialog::add_option(), and option_dialog_option_add().

◆ option_bool_def()

bool option_bool_def ( const struct option poption)

Returns the default value of this boolean option.

Definition at line 783 of file options.c.

Referenced by desired_settable_options_update(), option_dialog_option_reset(), option_dialog::option_dialog_reset(), and option_reset().

◆ option_bool_get()

bool option_bool_get ( const struct option poption)

◆ option_bool_set()

bool option_bool_set ( struct option poption,
bool  val 
)

Sets the value of this boolean option. Returns TRUE if the value changed.

Definition at line 794 of file options.c.

Referenced by option_dialog::apply_options(), client_option_load(), option_dialog_option_apply(), option_reset(), and option_widget_apply().

◆ option_category()

int option_category ( const struct option poption)

◆ option_category_name()

const char * option_category_name ( const struct option poption)

Returns the name (translated) of the category of the option.

Definition at line 653 of file options.c.

Referenced by option_dialog::add_option(), and option_dialog_option_add().

◆ option_changed()

void option_changed ( struct option poption)

◆ option_color_def()

struct ft_color option_color_def ( const struct option poption)

Returns the default value of this color option.

Definition at line 1176 of file options.c.

Referenced by option_dialog_option_reset(), option_dialog::option_dialog_reset(), and option_reset().

◆ option_color_get()

struct ft_color option_color_get ( const struct option poption)

Returns the current value of this color option.

Definition at line 1165 of file options.c.

Referenced by option_dialog::add_option(), client_option_save(), option_dialog_option_refresh(), and option_dialog::option_dialog_refresh().

◆ option_color_set()

bool option_color_set ( struct option poption,
struct ft_color  color 
)

Sets the value of this color option. Returns TRUE if the value changed.

Definition at line 1188 of file options.c.

Referenced by option_dialog::apply_options(), client_option_load(), option_dialog_option_apply(), and option_reset().

◆ option_description()

const char * option_description ( const struct option poption)

Returns the description (translated) of the option.

Definition at line 613 of file options.c.

Referenced by option_dialog::add_option(), option_dialog_option_add(), and option_widget_new().

◆ option_enum_def_int()

int option_enum_def_int ( const struct option poption)

Returns the default value of this enum option (as an integer).

Definition at line 979 of file options.c.

Referenced by option_dialog_option_reset(), option_dialog::option_dialog_reset(), and option_reset().

◆ option_enum_def_str()

const char * option_enum_def_str ( const struct option poption)

Returns the default value of this enum option as a user-visible (translatable but not translated) string.

Definition at line 991 of file options.c.

◆ option_enum_get_int()

int option_enum_get_int ( const struct option poption)

Returns the current value of this enum option (as an integer).

Definition at line 955 of file options.c.

Referenced by client_option_save(), option_dialog_option_refresh(), and option_dialog::option_dialog_refresh().

◆ option_enum_get_str()

const char * option_enum_get_str ( const struct option poption)

Returns the current value of this enum option as a user-visible (translatable but not translated) string.

Definition at line 967 of file options.c.

Referenced by option_widget_new(), and option_widget_update().

◆ option_enum_int_to_str()

const char * option_enum_int_to_str ( const struct option poption,
int  val 
)

Returns the user-visible (translatable but not translated) string corresponding to the value. Returns NULL on error.

Definition at line 940 of file options.c.

Referenced by option_dialog::add_option(), and option_dialog_option_add().

◆ option_enum_set_int()

bool option_enum_set_int ( struct option poption,
int  val 
)

Sets the value of this enum option. Returns TRUE if the value changed.

Definition at line 1015 of file options.c.

Referenced by option_dialog::apply_options(), client_option_load(), option_dialog_option_apply(), option_reset(), and option_widget_apply().

◆ option_enum_set_str()

bool option_enum_set_str ( struct option poption,
const char *  str 
)

Sets the value of this enum option from a string, which is matched as a user-visible (translatable but not translated) string. Returns TRUE if the value changed.

Definition at line 1032 of file options.c.

◆ option_enum_str_to_int()

int option_enum_str_to_int ( const struct option poption,
const char *  str 
)

Returns the value corresponding to the user-visible (translatable but not translated) string. Returns -1 if not matched.

Definition at line 918 of file options.c.

Referenced by option_enum_set_str().

◆ option_enum_values()

const struct strvec * option_enum_values ( const struct option poption)

Returns the possible string values of this enum option, as user-visible (translatable but not translated) strings.

Definition at line 1004 of file options.c.

Referenced by option_widget_new().

◆ option_font_def()

const char * option_font_def ( const struct option poption)

Returns the default value of this font option.

Definition at line 1127 of file options.c.

Referenced by option_dialog_option_reset(), option_dialog::option_dialog_reset(), and option_reset().

◆ option_font_get()

const char * option_font_get ( const struct option poption)

◆ option_font_set()

bool option_font_set ( struct option poption,
const char *  font 
)

Sets the value of this font option. Returns TRUE if the value changed.

Definition at line 1149 of file options.c.

Referenced by option_dialog::apply_options(), client_option_load(), option_dialog_option_apply(), option_reset(), and option_widget_apply().

◆ option_font_target()

const char * option_font_target ( const struct option poption)

Returns the target style name of this font option.

Definition at line 1138 of file options.c.

Referenced by apply_city_names_font(), apply_city_productions_font(), and apply_reqtree_text_font().

◆ option_get_cb_data()

int option_get_cb_data ( const struct option poption)

Returns the callback data of this option.

Definition at line 762 of file options.c.

Referenced by get_tileset_list(), and tilespec_reread_callback().

◆ option_get_gui_data()

void * option_get_gui_data ( const struct option poption)

◆ option_help_text()

const char * option_help_text ( const struct option poption)

Returns the help text (translated) of the option.

Definition at line 623 of file options.c.

Referenced by option_dialog::add_option(), option_dialog_option_add(), and option_widget_new().

◆ option_int_def()

int option_int_def ( const struct option poption)

Returns the default value of this integer option.

Definition at line 820 of file options.c.

Referenced by desired_settable_options_update(), option_dialog_option_reset(), option_dialog::option_dialog_reset(), and option_reset().

◆ option_int_get()

int option_int_get ( const struct option poption)

◆ option_int_max()

int option_int_max ( const struct option poption)

Returns the maximal value of this integer option.

Definition at line 842 of file options.c.

Referenced by option_dialog::add_option(), and option_dialog_option_add().

◆ option_int_min()

int option_int_min ( const struct option poption)

Returns the minimal value of this integer option.

Definition at line 831 of file options.c.

Referenced by option_dialog::add_option(), and option_dialog_option_add().

◆ option_int_set()

bool option_int_set ( struct option poption,
int  val 
)

Sets the value of this integer option. Returns TRUE if the value changed.

Definition at line 853 of file options.c.

Referenced by ai_fill_changed_by_user(), option_dialog::apply_options(), client_option_load(), pregame_options::max_players_change(), option_dialog_option_apply(), option_reset(), and option_widget_apply().

◆ option_is_changeable()

bool option_is_changeable ( const struct option poption)

◆ option_name()

const char * option_name ( const struct option poption)

◆ option_next()

struct option * option_next ( const struct option poption)

Returns the next option or NULL if this is the last.

Definition at line 674 of file options.c.

◆ option_number()

int option_number ( const struct option poption)

Returns the number of the option.

Definition at line 593 of file options.c.

Referenced by client_ss_by_name(), handle_server_setting_bool(), option_dialog_option_add(), option_dialog_option_enum_set(), and option_widget_new().

◆ option_optset()

const struct option_set * option_optset ( const struct option poption)

◆ option_reset()

bool option_reset ( struct option poption)

Set the option to its default value. Returns TRUE if the option changed.

Definition at line 684 of file options.c.

◆ option_save_output_window_callback()

static void option_save_output_window_callback ( enum log_level  lvl,
const char *  msg,
  ... 
)
static

Write messages from option saving to the output window.

Definition at line 6040 of file options.c.

◆ option_set_changed_callback()

void option_set_changed_callback ( struct option poption,
void(*)(struct option *)  callback 
)

Set the function to call every time this option changes. Can be NULL.

Definition at line 712 of file options.c.

◆ option_set_default_ts()

void option_set_default_ts ( struct tileset t)

Set given tileset as the default for suitable topology

Definition at line 6496 of file options.c.

Referenced by tilespec_try_read().

◆ option_set_gui_data()

void option_set_gui_data ( struct option poption,
void *  data 
)

◆ option_str_def()

const char * option_str_def ( const struct option poption)

Returns the default value of this string option.

Definition at line 879 of file options.c.

Referenced by desired_settable_options_update(), option_dialog_option_reset(), option_dialog::option_dialog_reset(), and option_reset().

◆ option_str_get()

const char * option_str_get ( const struct option poption)

◆ option_str_set()

bool option_str_set ( struct option poption,
const char *  str 
)

◆ option_str_values()

const struct strvec * option_str_values ( const struct option poption)

◆ option_type()

enum option_type option_type ( const struct option poption)

◆ option_video_mode_def()

struct video_mode option_video_mode_def ( const struct option poption)

Returns the default value of this video mode option.

Definition at line 1215 of file options.c.

Referenced by option_reset().

◆ option_video_mode_get()

struct video_mode option_video_mode_get ( const struct option poption)

Returns the current value of this video mode option.

Definition at line 1203 of file options.c.

Referenced by client_option_save(), option_widget_new(), and option_widget_update().

◆ option_video_mode_set()

bool option_video_mode_set ( struct option poption,
struct video_mode  mode 
)

Sets the value of this video mode option. Returns TRUE if the value changed.

Definition at line 1228 of file options.c.

Referenced by client_option_load(), option_reset(), and option_widget_apply().

◆ options_dialogs_load()

static void options_dialogs_load ( struct section_file sf)
static

Load the city and player report dialog options.

Definition at line 5792 of file options.c.

◆ options_dialogs_save()

static void options_dialogs_save ( struct section_file sf)
static

Save the city and player report dialog options.

Definition at line 5821 of file options.c.

◆ options_dialogs_set()

void options_dialogs_set ( void  )

This set the city and player report dialog options. It's called when the client goes to C_S_RUNNING state.

Definition at line 5864 of file options.c.

Referenced by set_client_state().

◆ options_dialogs_update()

void options_dialogs_update ( void  )

This set the city and player report dialog options to the current ones. It's called when the client goes to C_S_DISCONNECTED state.

Definition at line 5836 of file options.c.

Referenced by set_client_state().

◆ options_free()

void options_free ( void  )

Free the option module.

Definition at line 6271 of file options.c.

Referenced by client_exit().

◆ options_init()

void options_init ( void  )

Initialize the option module.

Definition at line 6173 of file options.c.

Referenced by client_main().

◆ options_init_names()

static void options_init_names ( const struct copt_val_name *(*)(int)  acc,
struct strvec **  support,
struct strvec **  pretty 
)
static

Initialize lists of names for a client option.

Definition at line 6156 of file options.c.

◆ options_load()

void options_load ( void  )

Load from the rc file any options that are not ruleset specific. It is called after ui_init(), yet before ui_main(). Unfortunately, this means that some clients cannot display. Instead, use log_*().

Definition at line 5897 of file options.c.

Referenced by client_main().

◆ options_save()

void options_save ( option_save_log_callback  log_cb)

◆ optset_category_name()

const char * optset_category_name ( const struct option_set poptset,
int  category 
)

Returns the name (translated) of the category of this option set.

Definition at line 442 of file options.c.

Referenced by option_category_name(), and option_dialog_optset().

◆ optset_category_number()

int optset_category_number ( const struct option_set poptset)

Returns the number of categories of this option set.

Definition at line 432 of file options.c.

Referenced by option_dialog_new(), and option_dialog_optset().

◆ optset_option_by_name()

struct option * optset_option_by_name ( const struct option_set poptset,
const char *  name 
)

◆ optset_option_by_number()

struct option * optset_option_by_number ( const struct option_set poptset,
int  id 
)

Returns the option corresponding of the number in this option set.

Definition at line 395 of file options.c.

Referenced by client_ss_name_get(), client_ss_type_get(), client_ss_val_bitwise_get(), client_ss_val_bool_get(), and client_ss_val_int_get().

◆ optset_option_first()

struct option * optset_option_first ( const struct option_set poptset)

Returns the first option of this option set.

Definition at line 422 of file options.c.

◆ reqtree_show_icons_callback()

static void reqtree_show_icons_callback ( struct option poption)
static

Callback when the reqtree show icons option is changed. The tree is recalculated.

Definition at line 6325 of file options.c.

◆ resend_desired_settable_options()

void resend_desired_settable_options ( void  )

Send the desired server options to the server, even if they have already been sent in the past.

Definition at line 5742 of file options.c.

Referenced by handle_ruleset_control().

◆ save_cma_preset()

static void save_cma_preset ( struct section_file file,
int  i 
)
static

Does heavy lifting for inserting a preset.

Definition at line 5213 of file options.c.

◆ save_cma_presets()

static void save_cma_presets ( struct section_file file)
static

Insert all cma presets.

Definition at line 5235 of file options.c.

◆ server_option_bitwise_def()

static unsigned server_option_bitwise_def ( const struct option poption)
static

Returns the default value of this server option of type OT_BITWISE.

Definition at line 4950 of file options.c.

◆ server_option_bitwise_get()

static unsigned server_option_bitwise_get ( const struct option poption)
static

Returns the current value of this server option of type OT_BITWISE.

Definition at line 4942 of file options.c.

◆ server_option_bitwise_pretty()

static const struct strvec * server_option_bitwise_pretty ( const struct option poption)
static

Returns the user-visible, translatable (but untranslated) "pretty" names of this server option of type OT_BITWISE.

Definition at line 4960 of file options.c.

◆ server_option_bitwise_set()

static bool server_option_bitwise_set ( struct option poption,
unsigned  val 
)
static

Set the value of this server option of type OT_BITWISE. Returns TRUE if the value changed.

Definition at line 4989 of file options.c.

◆ server_option_bitwise_support_base()

static void server_option_bitwise_support_base ( const struct strvec values,
unsigned  val,
char *  buf,
size_t  buf_len 
)
static

Compute the long support names of a value.

Definition at line 4968 of file options.c.

Referenced by server_option_bitwise_set(), and server_option_bitwise_support_name().

◆ server_option_bitwise_support_name()

static void server_option_bitwise_support_name ( const struct option poption,
char *  val_buf,
size_t  val_len,
char *  def_buf,
size_t  def_len 
)
static

Compute the long support names of the values of the server option of type OT_BITWISE.

Definition at line 5008 of file options.c.

Referenced by desired_settable_options_update().

◆ server_option_bool_def()

static bool server_option_bool_def ( const struct option poption)
static

Returns the default value of this server option of type OT_BOOLEAN.

Definition at line 4762 of file options.c.

◆ server_option_bool_get()

static bool server_option_bool_get ( const struct option poption)
static

Returns the value of this server option of type OT_BOOLEAN.

Definition at line 4754 of file options.c.

◆ server_option_bool_set()

static bool server_option_bool_set ( struct option poption,
bool  val 
)
static

Set the value of this server option of type OT_BOOLEAN. Returns TRUE if the value changed.

Definition at line 4771 of file options.c.

◆ server_option_category()

static int server_option_category ( const struct option poption)
static

Returns the category of this server option.

Definition at line 4730 of file options.c.

◆ server_option_description()

static const char * server_option_description ( const struct option poption)
static

Returns the (translated) description of this server option.

Definition at line 4714 of file options.c.

◆ server_option_enum_def()

static int server_option_enum_def ( const struct option poption)
static

Returns the default value of this server option of type OT_ENUM.

Definition at line 4887 of file options.c.

◆ server_option_enum_get()

static int server_option_enum_get ( const struct option poption)
static

Returns the current value of this server option of type OT_ENUM.

Definition at line 4879 of file options.c.

◆ server_option_enum_pretty()

static const struct strvec * server_option_enum_pretty ( const struct option poption)
static

Returns the user-visible, translatable (but untranslated) "pretty" names of this server option of type OT_ENUM.

Definition at line 4897 of file options.c.

◆ server_option_enum_set()

static bool server_option_enum_set ( struct option poption,
int  val 
)
static

Set the value of this server option of type OT_ENUM. Returns TRUE if the value changed.

Definition at line 4906 of file options.c.

◆ server_option_enum_support_name()

static void server_option_enum_support_name ( const struct option poption,
const char **  pvalue,
const char **  pdefault 
)
static

Returns the long support names of the values of the server option of type OT_ENUM.

Definition at line 4924 of file options.c.

Referenced by desired_settable_options_update().

◆ server_option_free()

static void server_option_free ( struct server_option poption)
static

Free one server option.

Definition at line 4164 of file options.c.

Referenced by server_options_free().

◆ server_option_help_text()

static const char * server_option_help_text ( const struct option poption)
static

Returns the (translated) help text for this server option.

Definition at line 4722 of file options.c.

◆ server_option_int_def()

static int server_option_int_def ( const struct option poption)
static

Returns the default value of this server option of type OT_INTEGER.

Definition at line 4795 of file options.c.

◆ server_option_int_get()

static int server_option_int_get ( const struct option poption)
static

Returns the value of this server option of type OT_INTEGER.

Definition at line 4787 of file options.c.

◆ server_option_int_max()

static int server_option_int_max ( const struct option poption)
static

Returns the maximal value for this server option of type OT_INTEGER.

Definition at line 4811 of file options.c.

◆ server_option_int_min()

static int server_option_int_min ( const struct option poption)
static

Returns the minimal value for this server option of type OT_INTEGER.

Definition at line 4803 of file options.c.

◆ server_option_int_set()

static bool server_option_int_set ( struct option poption,
int  val 
)
static

Set the value of this server option of type OT_INTEGER. Returns TRUE if the value changed.

Definition at line 4820 of file options.c.

◆ server_option_is_changeable()

static bool server_option_is_changeable ( const struct option poption)
static

Returns TRUE if this client option can be modified.

Definition at line 4738 of file options.c.

◆ server_option_name()

static const char * server_option_name ( const struct option poption)
static

Returns the name of this server option.

Definition at line 4706 of file options.c.

◆ server_option_next()

static struct option * server_option_next ( const struct option poption)
static

Returns the next valid (visible) option pointer.

Definition at line 4746 of file options.c.

◆ server_option_next_valid()

static struct server_option * server_option_next_valid ( struct server_option poption)
static

Returns the next valid option pointer for the current gui type.

Definition at line 4640 of file options.c.

◆ server_option_number()

static int server_option_number ( const struct option poption)
static

Returns the number of this server option.

Definition at line 4698 of file options.c.

◆ server_option_str_def()

static const char * server_option_str_def ( const struct option poption)
static

Returns the default value of this server option of type OT_STRING.

Definition at line 4845 of file options.c.

◆ server_option_str_get()

static const char * server_option_str_get ( const struct option poption)
static

Returns the value of this server option of type OT_STRING.

Definition at line 4837 of file options.c.

◆ server_option_str_set()

static bool server_option_str_set ( struct option poption,
const char *  str 
)
static

Set the value of this server option of type OT_STRING. Returns TRUE if the value changed.

Definition at line 4864 of file options.c.

◆ server_option_str_values()

static const struct strvec * server_option_str_values ( const struct option poption)
static

Returns the possible string values of this server option of type OT_STRING.

Definition at line 4855 of file options.c.

◆ server_options_free()

void server_options_free ( void  )

Free the server options, if already received.

Definition at line 4222 of file options.c.

Referenced by client_game_free().

◆ server_options_init()

void server_options_init ( void  )

Initialize the server options (not received yet).

Definition at line 4153 of file options.c.

Referenced by client_game_init().

◆ server_optset_category_name()

const char * server_optset_category_name ( int  category)
static

Returns the name (translated) of the server option category.

Definition at line 4686 of file options.c.

◆ server_optset_category_number()

int server_optset_category_number ( void  )
static

Returns the number of server option categories.

Definition at line 4678 of file options.c.

◆ server_optset_option_by_number()

struct option * server_optset_option_by_number ( int  id)
static

Returns the server option associated to the number

Definition at line 4659 of file options.c.

Referenced by handle_server_setting_bool(), and handle_server_setting_const().

◆ server_optset_option_first()

struct option * server_optset_option_first ( void  )
static

Returns the first valid (visible) option pointer.

Definition at line 4670 of file options.c.

◆ settable_option_upgrade_value()

static bool settable_option_upgrade_value ( const struct option poption,
int  old_value,
char *  buf,
size_t  buf_len 
)
static

Convert old integer to new values (Freeciv 2.2.x to Freeciv 2.3.x). Very ugly hack. TODO: Remove this later.

Definition at line 5616 of file options.c.

◆ settable_options_load()

static void settable_options_load ( struct section_file sf)
static

Load the server options.

Definition at line 5437 of file options.c.

◆ settable_options_save()

static void settable_options_save ( struct section_file sf)
static

Save the desired server options.

Definition at line 5501 of file options.c.

◆ sound_volume_callback()

static void sound_volume_callback ( struct option poption)
static

Definition at line 6359 of file options.c.

◆ string_to_video_mode()

bool string_to_video_mode ( const char *  buf,
struct video_mode mode 
)

Convert a string to video mode. Returns TRUE on success.

Definition at line 6453 of file options.c.

Referenced by option_widget_apply(), and parse_options().

◆ tileset_name_for_topology()

const char * tileset_name_for_topology ( int  topology_id)

What is the user defined tileset for the given topology

Definition at line 6469 of file options.c.

Referenced by handle_set_topology().

◆ video_mode_to_string()

bool video_mode_to_string ( char *  buf,
size_t  buf_len,
struct video_mode mode 
)

Convert a video mode to string. Returns TRUE on success.

Definition at line 6445 of file options.c.

Referenced by option_widget_new(), option_widget_update(), and video_mode_list().

◆ view_option_changed_callback()

static void view_option_changed_callback ( struct option poption)
static

Callback for when any view option is changed.

Definition at line 6333 of file options.c.

◆ voteinfo_bar_callback()

static void voteinfo_bar_callback ( struct option poption)
static

Callback for when any voteinfo bar option is changed.

Definition at line 6367 of file options.c.

Variable Documentation

◆ client_option_bool_vtable

const struct option_bool_vtable client_option_bool_vtable
static
Initial value:
= {
}
static bool client_option_bool_get(const struct option *poption)
Definition options.c:3469
static bool client_option_bool_def(const struct option *poption)
Definition options.c:3477
static bool client_option_bool_set(struct option *poption, bool val)
Definition options.c:3486

Definition at line 1289 of file options.c.

◆ client_option_color_vtable

const struct option_color_vtable client_option_color_vtable
static
Initial value:
= {
}
static struct ft_color client_option_color_def(const struct option *poption)
Definition options.c:3760
static bool client_option_color_set(struct option *poption, struct ft_color color)
Definition options.c:3769
static struct ft_color client_option_color_get(const struct option *poption)
Definition options.c:3752

Definition at line 1368 of file options.c.

◆ client_option_common_vtable

const struct option_common_vtable client_option_common_vtable
static
Initial value:
= {
.description = client_option_description,
.is_changeable = client_option_is_changeable,
}
static const char * client_option_name(const struct option *poption)
Definition options.c:3421
static const char * client_option_description(const struct option *poption)
Definition options.c:3429
static struct option * client_option_next(const struct option *poption)
Definition options.c:3461
static bool client_option_is_changeable(const struct option *poption)
Definition options.c:3453
static const char * client_option_help_text(const struct option *poption)
Definition options.c:3437
static int client_option_number(const struct option *poption)
Definition options.c:3413
client_option_category
Definition options.c:1387

Definition at line 1275 of file options.c.

◆ client_option_enum_vtable

const struct option_enum_vtable client_option_enum_vtable
static
Initial value:
= {
}
static int client_option_enum_get(const struct option *poption)
Definition options.c:3595
static const struct strvec * client_option_enum_pretty_names(const struct option *poption)
Definition options.c:3613
static bool client_option_enum_set(struct option *poption, int val)
Definition options.c:3622
static int client_option_enum_def(const struct option *poption)
Definition options.c:3603
int fc_strcasecmp(const char *str0, const char *str1)
Definition support.c:189

Definition at line 1328 of file options.c.

◆ client_option_font_vtable

const struct option_font_vtable client_option_font_vtable
static
Initial value:
= {
}
static bool client_option_font_set(struct option *poption, const char *font)
Definition options.c:3736
static const char * client_option_font_target(const struct option *poption)
Definition options.c:3727
static const char * client_option_font_get(const struct option *poption)
Definition options.c:3711
static const char * client_option_font_def(const struct option *poption)
Definition options.c:3719

Definition at line 1356 of file options.c.

◆ client_option_int_vtable

const struct option_int_vtable client_option_int_vtable
static
Initial value:
= {
}
static int client_option_int_min(const struct option *poption)
Definition options.c:3517
static int client_option_int_get(const struct option *poption)
Definition options.c:3501
static int client_option_int_def(const struct option *poption)
Definition options.c:3509
static int client_option_int_max(const struct option *poption)
Definition options.c:3525
static bool client_option_int_set(struct option *poption, int val)
Definition options.c:3534

Definition at line 1301 of file options.c.

◆ client_option_str_vtable

const struct option_str_vtable client_option_str_vtable
static
Initial value:
= {
}
static const char * client_option_str_def(const struct option *poption)
Definition options.c:3559
static const struct strvec * client_option_str_values(const struct option *poption)
Definition options.c:3569
static const char * client_option_str_get(const struct option *poption)
Definition options.c:3551
static bool client_option_str_set(struct option *poption, const char *str)
Definition options.c:3579

Definition at line 1315 of file options.c.

◆ client_option_video_mode_vtable

const struct option_video_mode_vtable client_option_video_mode_vtable
static
Initial value:
= {
}
static struct video_mode client_option_video_mode_def(const struct option *poption)
Definition options.c:3814
static bool client_option_video_mode_set(struct option *poption, struct video_mode mode)
Definition options.c:3823
static struct video_mode client_option_video_mode_get(const struct option *poption)
Definition options.c:3805

Definition at line 1381 of file options.c.

◆ client_options

struct client_option client_options[]
static

Definition at line 1861 of file options.c.

Referenced by client_option_number().

◆ client_options_num

const int client_options_num = ARRAY_SIZE(client_options)
static

Definition at line 3317 of file options.c.

Referenced by client_option_next_valid(), and client_optset_option_by_number().

◆ client_optset

const struct option_set* client_optset = &client_optset_static

◆ client_optset_static

struct option_set client_optset_static
static
Initial value:
= {
.option_by_number = client_optset_option_by_number,
.option_first = client_optset_option_first,
.category_number = client_optset_category_number,
.category_name = client_optset_category_name
}
static struct option * client_optset_option_first(void)
Definition options.c:3367
static const char * client_optset_category_name(int category)
Definition options.c:3383
static int client_optset_category_number(void)
Definition options.c:3375
static struct option * client_optset_option_by_number(int id)
Definition options.c:3356

Definition at line 1249 of file options.c.

◆ dialog_options_hash

struct dialog_options_hash* dialog_options_hash = NULL
static

Definition at line 5787 of file options.c.

Referenced by options_dialogs_load(), options_dialogs_set(), and options_dialogs_update().

◆ gui_options

struct client_options gui_options

Definition at line 71 of file options.c.

Referenced by action_decision_handle(), activate_gui(), animate_mouse_cursor(), append_city_buycost_string(), fc_client::apply_fullscreen(), audio_play_sound(), audio_select_plugin(), auto_center_on_focus_unit(), battle_animation(), calculate_overview_dimensions(), center_tile_overviewcanvas(), chatwdg::chatwdg(), city_widget::city_view(), client_exit(), client_main(), cmdhelp_display(), configure_fonts(), connect_to_server(), control_mouse_cursor(), cr_entry_building(), create_dead_players_menu_item(), fc_client::create_game_page(), fc_client::create_load_page(), create_show_menu(), create_surfaces(), research_diagram::create_tooltip_help(), current_focus_append(), decrease_unit_hp_smooth(), default_tileset_select(), define_tiles_within_rectangle(), disconnect_from_server(), do_map_click(), do_move_unit(), draw_calculated_trade_routes(), draw_mouse_cursor(), draw_reqtree(), draw_trade_routes(), minimap_view::draw_viewport(), explosion_animation(), fill_city_overlays_sprite_array(), fill_fog_sprite_array(), fill_grid_sprite_array(), fill_irrigation_sprite_array(), fill_road_sprite_array(), fill_sprite_array(), fill_unit_sprite_array(), fullscreen_callback(), get_city_dialog_production(), get_citybar_sprites(), get_TB_aggr(), get_TB_caravan(), get_turn_done_button_state(), get_unit_nation_flag_sprite(), gui_clear_theme(), gui_to_overview(), gui_to_overview_pos(), handle_city_info(), handle_city_name_suggestion_info(), handle_city_short_info(), handle_event(), handle_new_year(), handle_player_info(), handle_ruleset_control(), handle_start_phase(), handle_trade_route_info(), handle_unit_combat_info(), handle_unit_packet_common(), fc_client::init(), is_extra_drawing_enabled(), key_press_map_canvas(), key_press_map_canvas(), main_mouse_motion_handler(), map_to_overview_pos(), map_view::map_view(), mapimg_client_createmap(), mapimg_client_define(), meswin_clear_older(), meswin_popup_city(), migrate_options_from_2_5(), migrate_options_from_2_5(), migrate_options_from_gtk2(), migrate_options_from_gtk3(), migrate_options_from_sdl(), minimap_view::mousePressEvent(), move_unit_map_canvas(), movement_animation(), music_finished_callback(), no_fights_or_unknown_goto(), node_rectangle_minimum_size(), notify_goto_response(), order_wants_direction(), overview_canvas_draw(), overview_canvas_draw(), overview_free(), overview_size_changed(), overview_tile_color(), overview_to_map_pos(), overview_update_tile(), minimap_view::paint(), parse_options(), player_should_be_shown(), popup_iterate(), put_one_element(), put_overview_tile_area(), qtg_get_usable_themes_in_directory(), qtg_real_output_window_append(), qtg_ui_main(), real_menus_init(), real_timer_callback(), redraw_overview(), redraw_unit_info_label(), refresh_city_mapcanvas(), refresh_overview_from_canvas(), refresh_unit_mapcanvas(), request_move_unit_direction(), request_toggle_bases(), request_toggle_cities(), request_toggle_city_buycost(), request_toggle_city_full_bar(), request_toggle_city_growth(), request_toggle_city_names(), request_toggle_city_outlines(), request_toggle_city_output(), request_toggle_city_productions(), request_toggle_city_trade_routes(), request_toggle_coastline(), request_toggle_focus_unit(), request_toggle_fog_of_war(), request_toggle_huts(), request_toggle_irrigation(), request_toggle_map_borders(), request_toggle_map_grid(), request_toggle_map_native(), request_toggle_mines(), request_toggle_pollution(), request_toggle_resources(), request_toggle_roads_rails(), request_toggle_terrain(), request_toggle_unit_shields(), request_toggle_unit_solid_bg(), request_toggle_unit_stack_size(), request_toggle_units(), resize_minimap(), minimap_view::resizeEvent(), minimap_thread::run(), save_options_on_exit_callback(), save_options_on_exit_callback(), minimap_view::scale_point(), chat_listener::send_chat_message(), send_goto_route(), set_client_page_callback(), set_client_state(), set_mapview_origin(), mr_menu::setup_menus(), map_view::shortcut_pressed(), map_view::shortcut_released(), should_ask_server_for_actions(), show_bases_callback(), show_cities_callback(), show_city_buy_cost_callback(), show_city_desc(), show_city_descriptions(), show_city_full_bar_callback(), show_city_growth_callback(), show_city_names_callback(), show_city_outlines_callback(), show_city_output_callback(), show_city_productions_callback(), show_city_trade_routes_callback(), show_coastline_callback(), show_focus_unit_callback(), show_fog_of_war_callback(), show_full_citybar(), show_huts_callback(), show_irrigation_callback(), show_map_grid_callback(), show_mine_callback(), show_national_borders_callback(), show_native_tiles_callback(), show_pollution_callback(), show_resources_callback(), show_road_rails_callback(), show_small_citybar(), show_stack_size_callback(), show_terrain_callback(), show_unit_shields_callback(), show_unit_solid_bg_callback(), show_units_callback(), mr_menu::slot_fullscreen(), mr_menu::slot_select_same_continent(), mr_menu::slot_select_same_everywhere(), start_menu_music(), start_style_music(), chatwdg::state_changed(), fc_client::state_preview(), fc_client::switch_page(), tileset_use_preferred_theme(), tilespec_reread_callback(), tilespec_try_read(), toggle_dead_players(), toggle_dead_players(), ui_main(), ui_main(), unit_drawn_with_city_outline(), unit_focus_advance(), unscale_point(), fc_client::update_load_page(), update_mouse_cursor(), fc_client::update_sidebar_position(), view_menu_update_sensitivity(), view_menu_update_sensitivity(), voteinfo_bar_can_be_shown(), voteinfo_queue_add(), write_chatline_content(), and minimap_view::zoom_in().

◆ messages_where

int messages_where[E_COUNT]

◆ options_fully_initialized

bool options_fully_initialized = FALSE
static

Definition at line 377 of file options.c.

Referenced by option_changed().

◆ server_option_bitwise_vtable

const struct option_bitwise_vtable server_option_bitwise_vtable
static
Initial value:
= {
}
static unsigned server_option_bitwise_def(const struct option *poption)
Definition options.c:4950
static unsigned server_option_bitwise_get(const struct option *poption)
Definition options.c:4942
static const struct strvec * server_option_bitwise_pretty(const struct option *poption)
Definition options.c:4960
static bool server_option_bitwise_set(struct option *poption, unsigned val)
Definition options.c:4989

Definition at line 4090 of file options.c.

◆ server_option_bool_vtable

const struct option_bool_vtable server_option_bool_vtable
static
Initial value:
= {
}
static bool server_option_bool_get(const struct option *poption)
Definition options.c:4754
static bool server_option_bool_set(struct option *poption, bool val)
Definition options.c:4771
static bool server_option_bool_def(const struct option *poption)
Definition options.c:4762

Definition at line 4037 of file options.c.

Referenced by handle_server_setting_bool().

◆ server_option_common_vtable

const struct option_common_vtable server_option_common_vtable
static
Initial value:
= {
.description = server_option_description,
.is_changeable = server_option_is_changeable,
}
static const char * server_option_name(const struct option *poption)
Definition options.c:4706
static const char * server_option_description(const struct option *poption)
Definition options.c:4714
static struct option * server_option_next(const struct option *poption)
Definition options.c:4746
static int server_option_category(const struct option *poption)
Definition options.c:4730
static int server_option_number(const struct option *poption)
Definition options.c:4698
static const char * server_option_help_text(const struct option *poption)
Definition options.c:4722
static bool server_option_is_changeable(const struct option *poption)
Definition options.c:4738

Definition at line 4023 of file options.c.

Referenced by handle_server_setting_bool().

◆ server_option_enum_vtable

const struct option_enum_vtable server_option_enum_vtable
static
Initial value:
= {
.cmp = strcmp
}
static int server_option_enum_def(const struct option *poption)
Definition options.c:4887
static bool server_option_enum_set(struct option *poption, int val)
Definition options.c:4906
static const struct strvec * server_option_enum_pretty(const struct option *poption)
Definition options.c:4897
static int server_option_enum_get(const struct option *poption)
Definition options.c:4879

Definition at line 4076 of file options.c.

◆ server_option_int_vtable

const struct option_int_vtable server_option_int_vtable
static
Initial value:
= {
}
static int server_option_int_max(const struct option *poption)
Definition options.c:4811
static int server_option_int_min(const struct option *poption)
Definition options.c:4803
static int server_option_int_def(const struct option *poption)
Definition options.c:4795
static bool server_option_int_set(struct option *poption, int val)
Definition options.c:4820
static int server_option_int_get(const struct option *poption)
Definition options.c:4787

Definition at line 4049 of file options.c.

◆ server_option_str_vtable

const struct option_str_vtable server_option_str_vtable
static
Initial value:
= {
}
static const struct strvec * server_option_str_values(const struct option *poption)
Definition options.c:4855
static bool server_option_str_set(struct option *poption, const char *str)
Definition options.c:4864
static const char * server_option_str_get(const struct option *poption)
Definition options.c:4837
static const char * server_option_str_def(const struct option *poption)
Definition options.c:4845

Definition at line 4063 of file options.c.

◆ server_options

struct server_option* server_options = NULL
static

◆ server_options_categories

char** server_options_categories = NULL
static

◆ server_options_categories_num

int server_options_categories_num = 0
static

◆ server_options_num

int server_options_num = 0
static

◆ server_optset

const struct option_set* server_optset = &server_optset_static

◆ server_optset_static

struct option_set server_optset_static
static
Initial value:
= {
.option_by_number = server_optset_option_by_number,
.option_first = server_optset_option_first,
.category_number = server_optset_category_number,
.category_name = server_optset_category_name
}
static const char * server_optset_category_name(int category)
Definition options.c:4686
static struct option * server_optset_option_first(void)
Definition options.c:4670
static int server_optset_category_number(void)
Definition options.c:4678
static struct option * server_optset_option_by_number(int id)
Definition options.c:4659

Definition at line 4003 of file options.c.

◆ settable_options_hash

struct settable_options_hash* settable_options_hash = NULL
static