23#include <gdk/gdkkeysyms.h>
53#define MAX_CHATLINE_HISTORY 20
111 if (s[0] ==
'\'' || s[0] ==
'"') {
126 while (p !=
NULL && *p !=
'\0') {
185 return pplayer->
name;
227 for (j = 0; j < c; j++) {
287#define MAX_MATCHES 10
324 }
else if (num > 1) {
332 for (
i = 1;
i < num;
i++) {
350 switch (
ev->keyval) {
377 switch (
ev->keyval) {
576 if (max - val < 10.0) {
578 0.0,
TRUE, 1.0, 0.0);
643 _(
"This tile doesn't exist in this game!"));
810 if (foreground && foreground[0]) {
811 if (background && background[0]) {
813 "foreground", foreground,
814 "background", background,
818 "foreground", foreground,
821 }
else if (background && background[0]) {
823 "background", background,
855 "foreground-rgba", &
pcolor->color,
984 return max - val < 0.00000001;
999 *((
guint *) data) = 0;
1022 &end, 0.0,
TRUE, 1.0, 0.0);
1026 &end, 0.0,
TRUE, 1.0, 0.0);
1054 if (
NULL != button) {
1069 if (
NULL != button) {
1189 if (!
ptoolkit->toolbar_displayed) {
1297 "button_box")), button);
1362 _(
"Strikethrough"));
1402 log_error(
"Failed to set the default foreground color.");
1414 _(
"Select the background color"));
1419 log_error(
"Failed to set the default background color.");
1432 _(
"Send the chat (Return)"));
1447 toolkit.toggle_button = button;
1466 char *
vertext = (
char *)user_data;
struct canvas int int int int struct sprite *sprite struct canvas struct color * pcolor
#define CHAT_DIRECT_PREFIX
#define CHAT_ALLIES_PREFIX
#define SERVER_COMMAND_PREFIX
int send_chat(const char *message)
void output_window_append(const struct ft_color color, const char *featured_text)
void write_chatline_content(const char *txt)
void output_window_printf(const struct ft_color color, const char *format,...)
enum client_states client_state(void)
struct tile * client_city_tile(const struct city *pcity)
static struct fc_sockaddr_list * list
struct color * get_color(const struct tileset *t, enum color_std stdcolor)
struct unit * find_visible_unit(struct tile *ptile)
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
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,...)
enum text_link_type text_tag_link_type(const struct text_tag *ptag)
const char * tile_link(const struct tile *ptile)
ft_offset_t text_tag_stop_offset(const struct text_tag *ptag)
const char * text_tag_color_foreground(const struct text_tag *ptag)
const struct ft_color ftc_client
const char * city_link(const struct city *pcity)
int text_tag_link_id(const struct text_tag *ptag)
ft_offset_t text_tag_start_offset(const struct text_tag *ptag)
const char * unit_link(const struct unit *punit)
const char * text_tag_color_background(const struct text_tag *ptag)
#define text_tag_list_iterate_end
#define text_tag_list_iterate(tags, ptag)
static struct ft_color ft_color_construct(const char *foreground, const char *background)
struct unit * game_unit_by_number(int id)
struct city * game_city_by_number(int id)
bool genlist_remove(struct genlist *pgenlist, const void *punlink)
struct genlist * genlist_new(void)
void * genlist_get(const struct genlist *pgenlist, int idx)
void genlist_prepend(struct genlist *pgenlist, void *data)
int genlist_size(const struct genlist *pgenlist)
bool inputline_has_focus(void)
static void set_cursor_if_appropriate(GtkTextView *text_view, gint x, gint y)
static size_t get_common_prefix(const char *const *prefixes, size_t num_prefixes, char *buf, size_t buf_len)
#define MAX_CHATLINE_HISTORY
static gboolean version_message_main_thread(gpointer user_data)
void inputline_toolkit_view_append_button(GtkWidget *toolkit_view, GtkWidget *button)
void version_message(const char *vertext)
static const char * get_player_or_user_name(int id)
GtkWidget * inputline_toolkit_view_new(void)
void log_output_window(void)
static gboolean chatline_scroll_callback(gpointer data)
void set_message_buffer_view_link_handlers(GtkWidget *view)
static gboolean motion_notify_event(GtkWidget *text_view, GdkEventMotion *event)
static void button_toggled(GtkToggleButton *button, gpointer data)
static void select_color_callback(GtkToolButton *button, gpointer data)
void scroll_if_necessary(GtkTextView *textview, GtkTextMark *scroll_target)
bool inputline_is_visible(void)
static void color_selected(GtkDialog *dialog, gint res, gpointer data)
static bool is_plain_public_message(const char *s)
static bool chatline_autocomplete(GtkEditable *editable)
static struct genlist * history_list
void clear_output_window(void)
void apply_text_tag(const struct text_tag *ptag, GtkTextBuffer *buf, ft_offset_t text_start_offset, const char *text)
static void make_tag_callback(GtkToolButton *button, gpointer data)
static int check_player_or_user_name(const char *prefix, const char **matches, const int max_matches)
static struct inputline_toolkit toolkit
void inputline_make_chat_link(struct tile *ptile, bool unit)
bool chatline_is_scrolled_to_bottom(void)
static gboolean event_after(GtkWidget *text_view, GdkEventButton *event)
void real_output_window_append(const char *astring, const struct text_tag_list *tags, int conn_id)
static gboolean set_toolbar_visibility(GtkWidget *w, gpointer data)
static gboolean inputline_handler(GtkWidget *w, GdkEventKey *ev)
static void inputline_return(GtkEntry *w, gpointer data)
void inputline_grab_focus(void)
void chatline_scroll_to_bottom(bool delayed)
static gboolean move_toolkit(GtkWidget *toolkit_view, gpointer data)
static void inputline_make_tag(GtkEntry *entry, enum text_tag_type type)
GtkTextBuffer * message_buffer
GtkTextView * main_message_area
#define GUI_GTK_OPTION(optname)
void setup_dialog(GtkWidget *shell, GtkWidget *parent)
void append_network_statusbar(const char *text, bool force)
GtkWidget * start_message_area
static GtkWidget * persistent
#define set_output_window_text(_pstr_)
#define fc_assert_ret(condition)
#define log_error(message,...)
struct tile * index_to_tile(const struct civ_map *imap, int mindex)
void link_mark_restore(enum text_link_type type, int id)
void center_tile_mapcanvas(const struct tile *ptile)
#define color_set(color_tgt, color)
struct player * player_by_number(const int player_id)
int player_slot_count(void)
enum m_pre_result match_prefix_full(m_pre_accessor_fn_t accessor_fn, size_t n_names, size_t max_len_name, m_pre_strncmp_fn_t cmp_fn, m_strlen_fn_t len_fn, const char *prefix, int *ind_result, int *matches, int max_matches, int *pnum_matches)
struct conn_list * all_connections
int fc_snprintf(char *str, size_t n, const char *format,...)
size_t fc_strlcpy(char *dest, const char *src, size_t n)
struct tm * fc_localtime(const time_t *timep, struct tm *result)
int cat_snprintf(char *str, size_t n, const char *format,...)
int fc_strncasecmp(const char *str0, const char *str1, size_t n)
#define sz_strlcpy(dest, src)
struct city * tile_city(const struct tile *ptile)
enum client_pages get_client_page(void)