13#ifndef FC__FEATURED_TEXT_H
14#define FC__FEATURED_TEXT_H
104#define FT_OFFSET_UNSET ((ft_offset_t) -1)
110#define SPECLIST_TAG text_tag
111#define SPECLIST_TYPE struct text_tag
114#define text_tag_list_iterate(tags, ptag) \
115 TYPED_LIST_ITERATE(struct text_tag, tags, ptag)
116#define text_tag_list_iterate_end LIST_ITERATE_END
138#define MAX_LEN_LINK 128
145#define FT_COLOR(fg, bg) { fg, bg }
162 return ((
color.foreground !=
nullptr &&
color.foreground[0] !=
'\0')
163 || (
color.background !=
nullptr &&
color.background[0] !=
'\0'));
213#define text_tag_list_new() \
214 text_tag_list_new_full(text_tag_destroy)
215#define text_tag_list_copy(tags) \
216 text_tag_list_copy_full(tags, text_tag_copy, text_tag_destroy)
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int const struct action *paction struct unit struct city * pcity
const struct ft_color ftc_chat_private
size_t featured_text_apply_tag(const char *text_source, char *featured_text, size_t featured_text_len, enum text_tag_type tag_type, ft_offset_t start_offset, ft_offset_t stop_offset,...)
const struct ft_color ftc_luaconsole_debug
const struct ft_color ftc_vote_abstain
enum text_link_type text_tag_link_type(const struct text_tag *ptag)
static bool ft_color_requested(const struct ft_color color)
const struct ft_color ftc_log
const struct ft_color ftc_player_lost
const char * city_tile_link(const struct city *pcity)
size_t featured_text_to_plain_text(const char *featured_text, char *plain_text, size_t plain_text_len, struct text_tag_list **tags, bool replace_link_text)
const struct ft_color ftc_luaconsole_verbose
struct text_tag * text_tag_copy(const struct text_tag *ptag)
const char * tile_link(const struct tile *ptile)
const struct ft_color ftc_command
ft_offset_t text_tag_stop_offset(const struct text_tag *ptag)
const struct ft_color ftc_server
const struct ft_color ftc_vote_failed
void text_tag_destroy(struct text_tag *ptag)
const struct ft_color ftc_vote_yes
const struct ft_color ftc_luaconsole_error
const struct ft_color ftc_warning
const char * text_tag_color_foreground(const struct text_tag *ptag)
const struct ft_color ftc_client
const struct ft_color ftc_luaconsole_normal
const struct ft_color ftc_editor
const char * city_link(const struct city *pcity)
const struct ft_color ftc_any
const struct ft_color ftc_vote_no
const struct ft_color ftc_vote_passed
VAR_ARG_CONST struct ft_color ftc_changed
const struct ft_color ftc_luaconsole_warn
int text_tag_link_id(const struct text_tag *ptag)
const struct ft_color ftc_chat_luaconsole
ft_offset_t text_tag_start_offset(const struct text_tag *ptag)
struct text_tag * text_tag_new(enum text_tag_type tag_type, ft_offset_t start_offset, ft_offset_t stop_offset,...)
const struct ft_color ftc_vote_team
const struct ft_color ftc_game_start
const char * unit_link(const struct unit *punit)
const struct ft_color ftc_server_prompt
const struct ft_color ftc_vote_public
const char * unit_tile_link(const struct unit *punit)
static struct ft_color ft_color_construct(const char *foreground, const char *background)
const char * text_tag_color_background(const struct text_tag *ptag)
const struct ft_color ftc_luaconsole_input
const struct ft_color ftc_chat_public
const struct ft_color ftc_chat_ally