Freeciv-3.2
Loading...
Searching...
No Matches
Functions | Variables
chatline_common.c File Reference
#include <stdarg.h>
#include <string.h>
#include "astring.h"
#include "fcintl.h"
#include "fcthread.h"
#include "fc_utf8.h"
#include "log.h"
#include "featured_text.h"
#include "packets.h"
#include "chatline_g.h"
#include "client_main.h"
#include "options.h"
#include "chatline_common.h"

Go to the source code of this file.

Functions

int send_chat (const char *message)
 
int send_chat_printf (const char *format,...)
 
void fc_allocate_ow_mutex (void)
 
void fc_release_ow_mutex (void)
 
void fc_init_ow_mutex (void)
 
void fc_destroy_ow_mutex (void)
 
void output_window_append (const struct ft_color color, const char *featured_text)
 
void output_window_vprintf (const struct ft_color color, const char *format, va_list args)
 
void output_window_printf (const struct ft_color color, const char *format,...)
 
void output_window_event (const char *plain_text, const struct text_tag_list *tags, int conn_id)
 
void chat_welcome_message (bool gui_has_copying_mitem)
 
void write_chatline_content (const char *txt)
 

Variables

static fc_mutex ow_mutex
 

Function Documentation

◆ chat_welcome_message()

void chat_welcome_message ( bool  gui_has_copying_mitem)

Standard welcome message.

Definition at line 177 of file chatline_common.c.

Referenced by fc_client::fc_main(), setup_widgets(), and show_main_page().

◆ fc_allocate_ow_mutex()

void fc_allocate_ow_mutex ( void  )

Allocate output window mutex

Definition at line 71 of file chatline_common.c.

Referenced by fc_client::fc_main(), output_window_append(), and output_window_event().

◆ fc_destroy_ow_mutex()

void fc_destroy_ow_mutex ( void  )

Destroy output window mutex

Definition at line 95 of file chatline_common.c.

Referenced by at_exit().

◆ fc_init_ow_mutex()

void fc_init_ow_mutex ( void  )

Initialize output window mutex

Definition at line 87 of file chatline_common.c.

Referenced by client_main().

◆ fc_release_ow_mutex()

void fc_release_ow_mutex ( void  )

Release output window mutex

Definition at line 79 of file chatline_common.c.

Referenced by fc_client::fc_main(), output_window_append(), and output_window_event().

◆ output_window_append()

void output_window_append ( const struct ft_color  color,
const char featured_text 
)

◆ output_window_event()

void output_window_event ( const char plain_text,
const struct text_tag_list tags,
int  conn_id 
)

Add a line of text to the output ("chatline") window from server event.

Definition at line 166 of file chatline_common.c.

Referenced by handle_event().

◆ output_window_printf()

void output_window_printf ( const struct ft_color  color,
const char format,
  ... 
)

Add a line of text to the output ("chatline") window. The text is constructed in printf style.

Definition at line 153 of file chatline_common.c.

Referenced by api_client_chat_base(), chatline_autocomplete(), client_conn_close_callback(), handle_server_join_reply(), and start_autoconnecting_to_server().

◆ output_window_vprintf()

void output_window_vprintf ( const struct ft_color  color,
const char format,
va_list  args 
)

Add a line of text to the output ("chatline") window. The text is constructed in printf style.

Definition at line 139 of file chatline_common.c.

Referenced by output_window_printf().

◆ send_chat()

int send_chat ( const char message)

◆ send_chat_printf()

int send_chat_printf ( const char format,
  ... 
)

◆ write_chatline_content()

void write_chatline_content ( const char txt)

Writes the supplied string into the file defined by the variable 'default_chat_logfile'.

Definition at line 196 of file chatline_common.c.

Referenced by log_output_window().

Variable Documentation

◆ ow_mutex

fc_mutex ow_mutex
static