Freeciv-3.3
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
options.h File Reference
#include "support.h"
#include "events.h"
#include "fc_types.h"
#include "featured_text.h"
#include "mapimg.h"
#include "specenum_gen.h"

Go to the source code of this file.

Data Structures

struct  video_mode
 
struct  overview
 
struct  client_options
 

Macros

#define DEFAULT_METASERVER_OPTION   "default"
 
#define DEFAULT_FOLLOWTAG_OPTION   "builtin"
 
#define FONT_NAME_SIZE   512
 
#define MAJOR_NEW_OPTION_FILE_NAME   MAJOR_VERSION
 
#define MINOR_NEW_OPTION_FILE_NAME   MINOR_VERSION
 
#define VIDEO_MODE(ARG_width, ARG_height)    (struct video_mode){ ARG_width, ARG_height }
 
#define FC_GTK3_22_DEFAULT_THEME_NAME   "Freeciv"
 
#define FC_GTK4_DEFAULT_THEME_NAME   "Freeciv"
 
#define FC_GTK5_DEFAULT_THEME_NAME   "Freeciv"
 
#define FC_SDL2_DEFAULT_THEME_NAME   "human"
 
#define FC_SDL3_DEFAULT_THEME_NAME   "human"
 
#define FC_QT_DEFAULT_THEME_NAME   "NightStalker"
 
#define SPECENUM_NAME   option_type
 
#define SPECENUM_VALUE0   OT_BOOLEAN
 
#define SPECENUM_VALUE1   OT_INTEGER
 
#define SPECENUM_VALUE2   OT_STRING
 
#define SPECENUM_VALUE3   OT_ENUM
 
#define SPECENUM_VALUE4   OT_BITWISE
 
#define SPECENUM_VALUE5   OT_FONT
 
#define SPECENUM_VALUE6   OT_COLOR
 
#define SPECENUM_VALUE7   OT_VIDEO_MODE
 
#define optset_option_by_index   optset_option_by_number
 
#define option_index   option_number
 
#define options_iterate(poptset, poption)
 
#define options_iterate_end
 
#define NUM_MW   3
 
#define MW_OUTPUT   1 /* add to the output window */
 
#define MW_MESSAGES   2 /* add to the messages window */
 
#define MW_POPUP   4 /* popup an individual window */
 
#define GUI_DEFAULT_CHAT_LOGFILE   "freeciv-chat.log"
 
#define GUI_GTK2_CITYDLG_DEFAULT_XSIZE   770
 
#define GUI_GTK2_CITYDLG_MIN_XSIZE   256
 
#define GUI_GTK2_CITYDLG_MAX_XSIZE   4096
 
#define GUI_GTK2_CITYDLG_DEFAULT_YSIZE   512
 
#define GUI_GTK2_CITYDLG_MIN_YSIZE   128
 
#define GUI_GTK2_CITYDLG_MAX_YSIZE   4096
 
#define GUI_GTK_OVERVIEW_MIN_XSIZE   160
 
#define GUI_GTK_OVERVIEW_MIN_YSIZE   100
 
#define GUI_GTK3_CITYDLG_DEFAULT_XSIZE   770
 
#define GUI_GTK3_CITYDLG_MIN_XSIZE   256
 
#define GUI_GTK3_CITYDLG_MAX_XSIZE   4096
 
#define GUI_GTK3_CITYDLG_DEFAULT_YSIZE   512
 
#define GUI_GTK3_CITYDLG_MIN_YSIZE   128
 
#define GUI_GTK3_CITYDLG_MAX_YSIZE   4096
 
#define GUI_GTK3_GOV_RANGE_MIN_DEFAULT   -20
 
#define GUI_GTK3_GOV_RANGE_MIN_MIN   -100
 
#define GUI_GTK3_GOV_RANGE_MIN_MAX   0
 
#define GUI_GTK3_GOV_RANGE_MAX_DEFAULT   20
 
#define GUI_GTK3_GOV_RANGE_MAX_MIN   0
 
#define GUI_GTK3_GOV_RANGE_MAX_MAX   100
 
#define GUI_GTK3_22_CITYDLG_DEFAULT_XSIZE   770
 
#define GUI_GTK3_22_CITYDLG_MIN_XSIZE   256
 
#define GUI_GTK3_22_CITYDLG_MAX_XSIZE   4096
 
#define GUI_GTK3_22_CITYDLG_DEFAULT_YSIZE   512
 
#define GUI_GTK3_22_CITYDLG_MIN_YSIZE   128
 
#define GUI_GTK3_22_CITYDLG_MAX_YSIZE   4096
 
#define GUI_GTK3_22_GOV_RANGE_MIN_DEFAULT   -20
 
#define GUI_GTK3_22_GOV_RANGE_MIN_MIN   -100
 
#define GUI_GTK3_22_GOV_RANGE_MIN_MAX   0
 
#define GUI_GTK3_22_GOV_RANGE_MAX_DEFAULT   20
 
#define GUI_GTK3_22_GOV_RANGE_MAX_MIN   0
 
#define GUI_GTK3_22_GOV_RANGE_MAX_MAX   100
 
#define GUI_GTK4_CITYDLG_DEFAULT_XSIZE   770
 
#define GUI_GTK4_CITYDLG_MIN_XSIZE   256
 
#define GUI_GTK4_CITYDLG_MAX_XSIZE   4096
 
#define GUI_GTK4_CITYDLG_DEFAULT_YSIZE   512
 
#define GUI_GTK4_CITYDLG_MIN_YSIZE   128
 
#define GUI_GTK4_CITYDLG_MAX_YSIZE   4096
 
#define GUI_GTK4_GOV_RANGE_MIN_DEFAULT   -20
 
#define GUI_GTK4_GOV_RANGE_MIN_MIN   -100
 
#define GUI_GTK4_GOV_RANGE_MIN_MAX   0
 
#define GUI_GTK4_GOV_RANGE_MAX_DEFAULT   20
 
#define GUI_GTK4_GOV_RANGE_MAX_MIN   0
 
#define GUI_GTK4_GOV_RANGE_MAX_MAX   100
 
#define GUI_GTK5_CITYDLG_DEFAULT_XSIZE   770
 
#define GUI_GTK5_CITYDLG_MIN_XSIZE   256
 
#define GUI_GTK5_CITYDLG_MAX_XSIZE   4096
 
#define GUI_GTK5_CITYDLG_DEFAULT_YSIZE   512
 
#define GUI_GTK5_CITYDLG_MIN_YSIZE   128
 
#define GUI_GTK5_CITYDLG_MAX_YSIZE   4096
 
#define GUI_GTK5_GOV_RANGE_MIN_DEFAULT   -20
 
#define GUI_GTK5_GOV_RANGE_MIN_MIN   -100
 
#define GUI_GTK5_GOV_RANGE_MIN_MAX   0
 
#define GUI_GTK5_GOV_RANGE_MAX_DEFAULT   20
 
#define GUI_GTK5_GOV_RANGE_MAX_MIN   0
 
#define GUI_GTK5_GOV_RANGE_MAX_MAX   100
 
#define GUI_DEFAULT_MAPIMG_FILENAME   "freeciv"
 

Typedefs

typedef void(* option_save_log_callback) (enum log_level lvl, const char *msg,...)
 

Enumerations

enum  { GUI_GTK_MSGCHAT_SPLIT , GUI_GTK_MSGCHAT_SEPARATE , GUI_GTK_MSGCHAT_MERGED }
 
enum  { GUI_POPUP_TECH_HELP_ENABLED , GUI_POPUP_TECH_HELP_DISABLED , GUI_POPUP_TECH_HELP_RULESET }
 
enum  overview_layers {
  OLAYER_BACKGROUND , OLAYER_RELIEF , OLAYER_BORDERS , OLAYER_BORDERS_ON_OCEAN ,
  OLAYER_UNITS , OLAYER_CITIES , OLAYER_COUNT
}
 

Functions

static struct video_mode video_mode_construct (int width, int height)
 
void options_init (void)
 
void options_free (void)
 
void server_options_init (void)
 
void server_options_free (void)
 
void options_load (void)
 
void options_save (option_save_log_callback log_cb)
 
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 charoptset_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 charoption_name (const struct option *poption)
 
const charoption_description (const struct option *poption)
 
const charoption_help_text (const struct option *poption)
 
enum option_type option_type (const struct option *poption)
 
int option_category (const struct option *poption)
 
const charoption_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)
 
voidoption_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 charoption_str_get (const struct option *poption)
 
const charoption_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 charoption_enum_int_to_str (const struct option *poption, int val)
 
int option_enum_get_int (const struct option *poption)
 
const charoption_enum_get_str (const struct option *poption)
 
int option_enum_def_int (const struct option *poption)
 
const charoption_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 charoption_font_get (const struct option *poption)
 
const charoption_font_def (const struct option *poption)
 
const charoption_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)
 
void desired_settable_options_update (void)
 
void desired_settable_option_update (const char *op_name, const char *op_value, bool allow_replace)
 
void resend_desired_settable_options (void)
 
void options_dialogs_update (void)
 
void options_dialogs_set (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 chartileset_name_for_topology (int topology_id)
 
void option_set_default_ts (struct tileset *t)
 
void fill_topo_ts_default (void)
 

Variables

struct client_options gui_options
 
const struct option_setclient_optset
 
const struct option_setserver_optset
 
int messages_where []
 

Macro Definition Documentation

◆ DEFAULT_FOLLOWTAG_OPTION

#define DEFAULT_FOLLOWTAG_OPTION   "builtin"

Definition at line 30 of file options.h.

◆ DEFAULT_METASERVER_OPTION

#define DEFAULT_METASERVER_OPTION   "default"

Definition at line 29 of file options.h.

◆ FC_GTK3_22_DEFAULT_THEME_NAME

#define FC_GTK3_22_DEFAULT_THEME_NAME   "Freeciv"

Definition at line 301 of file options.h.

◆ FC_GTK4_DEFAULT_THEME_NAME

#define FC_GTK4_DEFAULT_THEME_NAME   "Freeciv"

Definition at line 337 of file options.h.

◆ FC_GTK5_DEFAULT_THEME_NAME

#define FC_GTK5_DEFAULT_THEME_NAME   "Freeciv"

Definition at line 373 of file options.h.

◆ FC_QT_DEFAULT_THEME_NAME

#define FC_QT_DEFAULT_THEME_NAME   "NightStalker"

Definition at line 441 of file options.h.

◆ FC_SDL2_DEFAULT_THEME_NAME

#define FC_SDL2_DEFAULT_THEME_NAME   "human"

Definition at line 416 of file options.h.

◆ FC_SDL3_DEFAULT_THEME_NAME

#define FC_SDL3_DEFAULT_THEME_NAME   "human"

Definition at line 429 of file options.h.

◆ FONT_NAME_SIZE

#define FONT_NAME_SIZE   512

Definition at line 32 of file options.h.

◆ GUI_DEFAULT_CHAT_LOGFILE

#define GUI_DEFAULT_CHAT_LOGFILE   "freeciv-chat.log"

Client options

Definition at line 623 of file options.h.

◆ GUI_DEFAULT_MAPIMG_FILENAME

#define GUI_DEFAULT_MAPIMG_FILENAME   "freeciv"

Definition at line 705 of file options.h.

◆ GUI_GTK2_CITYDLG_DEFAULT_XSIZE

#define GUI_GTK2_CITYDLG_DEFAULT_XSIZE   770

Definition at line 626 of file options.h.

◆ GUI_GTK2_CITYDLG_DEFAULT_YSIZE

#define GUI_GTK2_CITYDLG_DEFAULT_YSIZE   512

Definition at line 630 of file options.h.

◆ GUI_GTK2_CITYDLG_MAX_XSIZE

#define GUI_GTK2_CITYDLG_MAX_XSIZE   4096

Definition at line 628 of file options.h.

◆ GUI_GTK2_CITYDLG_MAX_YSIZE

#define GUI_GTK2_CITYDLG_MAX_YSIZE   4096

Definition at line 632 of file options.h.

◆ GUI_GTK2_CITYDLG_MIN_XSIZE

#define GUI_GTK2_CITYDLG_MIN_XSIZE   256

Definition at line 627 of file options.h.

◆ GUI_GTK2_CITYDLG_MIN_YSIZE

#define GUI_GTK2_CITYDLG_MIN_YSIZE   128

Definition at line 631 of file options.h.

◆ GUI_GTK3_22_CITYDLG_DEFAULT_XSIZE

#define GUI_GTK3_22_CITYDLG_DEFAULT_XSIZE   770

Definition at line 655 of file options.h.

◆ GUI_GTK3_22_CITYDLG_DEFAULT_YSIZE

#define GUI_GTK3_22_CITYDLG_DEFAULT_YSIZE   512

Definition at line 659 of file options.h.

◆ GUI_GTK3_22_CITYDLG_MAX_XSIZE

#define GUI_GTK3_22_CITYDLG_MAX_XSIZE   4096

Definition at line 657 of file options.h.

◆ GUI_GTK3_22_CITYDLG_MAX_YSIZE

#define GUI_GTK3_22_CITYDLG_MAX_YSIZE   4096

Definition at line 661 of file options.h.

◆ GUI_GTK3_22_CITYDLG_MIN_XSIZE

#define GUI_GTK3_22_CITYDLG_MIN_XSIZE   256

Definition at line 656 of file options.h.

◆ GUI_GTK3_22_CITYDLG_MIN_YSIZE

#define GUI_GTK3_22_CITYDLG_MIN_YSIZE   128

Definition at line 660 of file options.h.

◆ GUI_GTK3_22_GOV_RANGE_MAX_DEFAULT

#define GUI_GTK3_22_GOV_RANGE_MAX_DEFAULT   20

Definition at line 667 of file options.h.

◆ GUI_GTK3_22_GOV_RANGE_MAX_MAX

#define GUI_GTK3_22_GOV_RANGE_MAX_MAX   100

Definition at line 669 of file options.h.

◆ GUI_GTK3_22_GOV_RANGE_MAX_MIN

#define GUI_GTK3_22_GOV_RANGE_MAX_MIN   0

Definition at line 668 of file options.h.

◆ GUI_GTK3_22_GOV_RANGE_MIN_DEFAULT

#define GUI_GTK3_22_GOV_RANGE_MIN_DEFAULT   -20

Definition at line 663 of file options.h.

◆ GUI_GTK3_22_GOV_RANGE_MIN_MAX

#define GUI_GTK3_22_GOV_RANGE_MIN_MAX   0

Definition at line 665 of file options.h.

◆ GUI_GTK3_22_GOV_RANGE_MIN_MIN

#define GUI_GTK3_22_GOV_RANGE_MIN_MIN   -100

Definition at line 664 of file options.h.

◆ GUI_GTK3_CITYDLG_DEFAULT_XSIZE

#define GUI_GTK3_CITYDLG_DEFAULT_XSIZE   770

Definition at line 638 of file options.h.

◆ GUI_GTK3_CITYDLG_DEFAULT_YSIZE

#define GUI_GTK3_CITYDLG_DEFAULT_YSIZE   512

Definition at line 642 of file options.h.

◆ GUI_GTK3_CITYDLG_MAX_XSIZE

#define GUI_GTK3_CITYDLG_MAX_XSIZE   4096

Definition at line 640 of file options.h.

◆ GUI_GTK3_CITYDLG_MAX_YSIZE

#define GUI_GTK3_CITYDLG_MAX_YSIZE   4096

Definition at line 644 of file options.h.

◆ GUI_GTK3_CITYDLG_MIN_XSIZE

#define GUI_GTK3_CITYDLG_MIN_XSIZE   256

Definition at line 639 of file options.h.

◆ GUI_GTK3_CITYDLG_MIN_YSIZE

#define GUI_GTK3_CITYDLG_MIN_YSIZE   128

Definition at line 643 of file options.h.

◆ GUI_GTK3_GOV_RANGE_MAX_DEFAULT

#define GUI_GTK3_GOV_RANGE_MAX_DEFAULT   20

Definition at line 650 of file options.h.

◆ GUI_GTK3_GOV_RANGE_MAX_MAX

#define GUI_GTK3_GOV_RANGE_MAX_MAX   100

Definition at line 652 of file options.h.

◆ GUI_GTK3_GOV_RANGE_MAX_MIN

#define GUI_GTK3_GOV_RANGE_MAX_MIN   0

Definition at line 651 of file options.h.

◆ GUI_GTK3_GOV_RANGE_MIN_DEFAULT

#define GUI_GTK3_GOV_RANGE_MIN_DEFAULT   -20

Definition at line 646 of file options.h.

◆ GUI_GTK3_GOV_RANGE_MIN_MAX

#define GUI_GTK3_GOV_RANGE_MIN_MAX   0

Definition at line 648 of file options.h.

◆ GUI_GTK3_GOV_RANGE_MIN_MIN

#define GUI_GTK3_GOV_RANGE_MIN_MIN   -100

Definition at line 647 of file options.h.

◆ GUI_GTK4_CITYDLG_DEFAULT_XSIZE

#define GUI_GTK4_CITYDLG_DEFAULT_XSIZE   770

Definition at line 672 of file options.h.

◆ GUI_GTK4_CITYDLG_DEFAULT_YSIZE

#define GUI_GTK4_CITYDLG_DEFAULT_YSIZE   512

Definition at line 676 of file options.h.

◆ GUI_GTK4_CITYDLG_MAX_XSIZE

#define GUI_GTK4_CITYDLG_MAX_XSIZE   4096

Definition at line 674 of file options.h.

◆ GUI_GTK4_CITYDLG_MAX_YSIZE

#define GUI_GTK4_CITYDLG_MAX_YSIZE   4096

Definition at line 678 of file options.h.

◆ GUI_GTK4_CITYDLG_MIN_XSIZE

#define GUI_GTK4_CITYDLG_MIN_XSIZE   256

Definition at line 673 of file options.h.

◆ GUI_GTK4_CITYDLG_MIN_YSIZE

#define GUI_GTK4_CITYDLG_MIN_YSIZE   128

Definition at line 677 of file options.h.

◆ GUI_GTK4_GOV_RANGE_MAX_DEFAULT

#define GUI_GTK4_GOV_RANGE_MAX_DEFAULT   20

Definition at line 684 of file options.h.

◆ GUI_GTK4_GOV_RANGE_MAX_MAX

#define GUI_GTK4_GOV_RANGE_MAX_MAX   100

Definition at line 686 of file options.h.

◆ GUI_GTK4_GOV_RANGE_MAX_MIN

#define GUI_GTK4_GOV_RANGE_MAX_MIN   0

Definition at line 685 of file options.h.

◆ GUI_GTK4_GOV_RANGE_MIN_DEFAULT

#define GUI_GTK4_GOV_RANGE_MIN_DEFAULT   -20

Definition at line 680 of file options.h.

◆ GUI_GTK4_GOV_RANGE_MIN_MAX

#define GUI_GTK4_GOV_RANGE_MIN_MAX   0

Definition at line 682 of file options.h.

◆ GUI_GTK4_GOV_RANGE_MIN_MIN

#define GUI_GTK4_GOV_RANGE_MIN_MIN   -100

Definition at line 681 of file options.h.

◆ GUI_GTK5_CITYDLG_DEFAULT_XSIZE

#define GUI_GTK5_CITYDLG_DEFAULT_XSIZE   770

Definition at line 689 of file options.h.

◆ GUI_GTK5_CITYDLG_DEFAULT_YSIZE

#define GUI_GTK5_CITYDLG_DEFAULT_YSIZE   512

Definition at line 693 of file options.h.

◆ GUI_GTK5_CITYDLG_MAX_XSIZE

#define GUI_GTK5_CITYDLG_MAX_XSIZE   4096

Definition at line 691 of file options.h.

◆ GUI_GTK5_CITYDLG_MAX_YSIZE

#define GUI_GTK5_CITYDLG_MAX_YSIZE   4096

Definition at line 695 of file options.h.

◆ GUI_GTK5_CITYDLG_MIN_XSIZE

#define GUI_GTK5_CITYDLG_MIN_XSIZE   256

Definition at line 690 of file options.h.

◆ GUI_GTK5_CITYDLG_MIN_YSIZE

#define GUI_GTK5_CITYDLG_MIN_YSIZE   128

Definition at line 694 of file options.h.

◆ GUI_GTK5_GOV_RANGE_MAX_DEFAULT

#define GUI_GTK5_GOV_RANGE_MAX_DEFAULT   20

Definition at line 701 of file options.h.

◆ GUI_GTK5_GOV_RANGE_MAX_MAX

#define GUI_GTK5_GOV_RANGE_MAX_MAX   100

Definition at line 703 of file options.h.

◆ GUI_GTK5_GOV_RANGE_MAX_MIN

#define GUI_GTK5_GOV_RANGE_MAX_MIN   0

Definition at line 702 of file options.h.

◆ GUI_GTK5_GOV_RANGE_MIN_DEFAULT

#define GUI_GTK5_GOV_RANGE_MIN_DEFAULT   -20

Definition at line 697 of file options.h.

◆ GUI_GTK5_GOV_RANGE_MIN_MAX

#define GUI_GTK5_GOV_RANGE_MIN_MAX   0

Definition at line 699 of file options.h.

◆ GUI_GTK5_GOV_RANGE_MIN_MIN

#define GUI_GTK5_GOV_RANGE_MIN_MIN   -100

Definition at line 698 of file options.h.

◆ GUI_GTK_OVERVIEW_MIN_XSIZE

#define GUI_GTK_OVERVIEW_MIN_XSIZE   160

Definition at line 634 of file options.h.

◆ GUI_GTK_OVERVIEW_MIN_YSIZE

#define GUI_GTK_OVERVIEW_MIN_YSIZE   100

Definition at line 635 of file options.h.

◆ MAJOR_NEW_OPTION_FILE_NAME

#define MAJOR_NEW_OPTION_FILE_NAME   MAJOR_VERSION

Definition at line 38 of file options.h.

◆ MINOR_NEW_OPTION_FILE_NAME

#define MINOR_NEW_OPTION_FILE_NAME   MINOR_VERSION

Definition at line 42 of file options.h.

◆ MW_MESSAGES

#define MW_MESSAGES   2 /* add to the messages window */

Definition at line 615 of file options.h.

◆ MW_OUTPUT

#define MW_OUTPUT   1 /* add to the output window */

Definition at line 614 of file options.h.

◆ MW_POPUP

#define MW_POPUP   4 /* popup an individual window */

Definition at line 616 of file options.h.

◆ NUM_MW

#define NUM_MW   3

Message Options:

Definition at line 613 of file options.h.

◆ option_index

#define option_index   option_number

Definition at line 512 of file options.h.

◆ options_iterate

#define options_iterate (   poptset,
  poption 
)
Value:
{ \
char * incite_cost
Definition comments.c:76
struct option * optset_option_first(const struct option_set *poptset)
Definition options.c:483
struct option * option_next(const struct option *poption)
Definition options.c:735
const struct option_set * poptset
Definition options.c:517

Definition at line 587 of file options.h.

◆ options_iterate_end

#define options_iterate_end
Value:
} \
}

Definition at line 592 of file options.h.

◆ optset_option_by_index

#define optset_option_by_index   optset_option_by_number

Definition at line 499 of file options.h.

◆ SPECENUM_NAME

Definition at line 467 of file options.h.

◆ SPECENUM_VALUE0

#define SPECENUM_VALUE0   OT_BOOLEAN

Definition at line 468 of file options.h.

◆ SPECENUM_VALUE1

#define SPECENUM_VALUE1   OT_INTEGER

Definition at line 469 of file options.h.

◆ SPECENUM_VALUE2

#define SPECENUM_VALUE2   OT_STRING

Definition at line 470 of file options.h.

◆ SPECENUM_VALUE3

#define SPECENUM_VALUE3   OT_ENUM

Definition at line 471 of file options.h.

◆ SPECENUM_VALUE4

#define SPECENUM_VALUE4   OT_BITWISE

Definition at line 472 of file options.h.

◆ SPECENUM_VALUE5

#define SPECENUM_VALUE5   OT_FONT

Definition at line 473 of file options.h.

◆ SPECENUM_VALUE6

#define SPECENUM_VALUE6   OT_COLOR

Definition at line 474 of file options.h.

◆ SPECENUM_VALUE7

#define SPECENUM_VALUE7   OT_VIDEO_MODE

Definition at line 475 of file options.h.

◆ VIDEO_MODE

#define VIDEO_MODE (   ARG_width,
  ARG_height 
)     (struct video_mode){ ARG_width, ARG_height }

Definition at line 51 of file options.h.

Typedef Documentation

◆ option_save_log_callback

typedef void(* option_save_log_callback) (enum log_level lvl, const char *msg,...)

Definition at line 482 of file options.h.

Enumeration Type Documentation

◆ anonymous enum

Enumerator
GUI_GTK_MSGCHAT_SPLIT 
GUI_GTK_MSGCHAT_SEPARATE 
GUI_GTK_MSGCHAT_MERGED 

Definition at line 64 of file options.h.

◆ anonymous enum

Enumerator
GUI_POPUP_TECH_HELP_ENABLED 
GUI_POPUP_TECH_HELP_DISABLED 
GUI_POPUP_TECH_HELP_RULESET 

Definition at line 72 of file options.h.

◆ overview_layers

Enumerator
OLAYER_BACKGROUND 
OLAYER_RELIEF 
OLAYER_BORDERS 
OLAYER_BORDERS_ON_OCEAN 
OLAYER_UNITS 
OLAYER_CITIES 
OLAYER_COUNT 

Definition at line 80 of file options.h.

Function Documentation

◆ 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 5859 of file options.c.

Referenced by client_start_server().

◆ desired_settable_options_update()

void desired_settable_options_update ( void  )

Desired settable options.

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

Definition at line 5791 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 6862 of file options.c.

Referenced by default_tileset_select().

◆ option_bitwise_def()

unsigned option_bitwise_def ( const struct option poption)

Returns the default value of this bitwise option.

Definition at line 1121 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 1110 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 1132 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 1160 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 1149 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 844 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 855 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 714 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 1237 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 1226 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 1249 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 674 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 1040 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 1052 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 1016 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 1028 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 1001 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 1076 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 1093 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 979 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 1065 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 1188 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 1210 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 1199 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 823 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 684 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 881 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 903 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 892 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 914 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 735 of file options.c.

◆ option_number()

int option_number ( const struct option poption)

Returns the number of the option.

Definition at line 654 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 745 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 773 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 6803 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 940 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 1276 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 1264 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 1289 of file options.c.

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

◆ 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 6125 of file options.c.

Referenced by set_client_state().

◆ options_dialogs_update()

void options_dialogs_update ( void  )

Dialog report options.

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 6097 of file options.c.

Referenced by set_client_state().

◆ options_free()

void options_free ( void  )

Free the option module.

Definition at line 6578 of file options.c.

Referenced by client_exit().

◆ options_init()

void options_init ( void  )

Initialize the option module.

Definition at line 6480 of file options.c.

Referenced by client_main().

◆ 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 6158 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 503 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 493 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 456 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 483 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 6002 of file options.c.

Referenced by handle_ruleset_control().

◆ server_options_free()

void server_options_free ( void  )

Free the server options, if already received.

Definition at line 4491 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 4422 of file options.c.

Referenced by client_game_init().

◆ 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 6760 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 6776 of file options.c.

Referenced by default_tileset_select(), and handle_set_topology().

◆ video_mode_construct()

static struct video_mode video_mode_construct ( int  width,
int  height 
)
inlinestatic

Definition at line 57 of file options.h.

Referenced by option_video_mode_def(), and option_video_mode_get().

◆ 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 6752 of file options.c.

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

Variable Documentation

◆ client_optset

const struct option_set* client_optset
extern

◆ gui_options

struct client_options gui_options
extern

Definition at line 71 of file options.c.

Referenced by action_decision_handle(), activate_gui(), 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(), 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_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(), get_city_dialog_production(), get_citybar_sprites(), get_TB_aggr(), get_TB_caravan(), get_turn_done_button_state(), get_unit_nation_flag_sprite(), 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(), 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_gtk2(), migrate_options_from_gtk3(), migrate_options_from_gtk3_22(), migrate_options_from_gtk4(), migrate_options_from_sdl(), migrate_options_from_sdl2(), 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(), plr_report::plr_report(), 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_paths(), request_toggle_pollution(), request_toggle_resources(), request_toggle_terrain(), request_toggle_unit_shields(), request_toggle_unit_solid_bg(), request_toggle_unit_stack_size(), request_toggle_units(), resend_desired_settable_options(), 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_paths_callback(), show_pollution_callback(), plr_report::show_relations_toggle(), show_resources_callback(), show_small_citybar(), show_stack_size_callback(), plr_report::show_techs_toggle(), show_terrain_callback(), show_unit_shields_callback(), show_unit_solid_bg_callback(), show_units_callback(), plr_report::show_wonders_toggle(), 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(), chatwdg::state_changed_depr(), fc_client::state_preview(), fc_client::state_preview_depr(), fc_client::switch_page(), tileset_use_preferred_theme(), tilespec_reread_callback(), tilespec_try_read(), timer_callback(), 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(), 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[]
extern

◆ server_optset

const struct option_set* server_optset
extern