Freeciv21
Develop your civilization from humble roots to a global empire
chatline_common.cpp File Reference
#include <QGlobalStatic>
#include <cstdarg>
#include "fcintl.h"
#include "fcthread.h"
#include "featured_text.h"
#include "packets.h"
#include "chatline.h"
#include "chatline_common.h"
#include "client_main.h"
+ Include dependency graph for chatline_common.cpp:

Go to the source code of this file.

Functions

 Q_GLOBAL_STATIC (QMutex, ow_mutex)
 
int send_chat (const char *message)
 Send the message as a chat to the server. More...
 
int send_chat_printf (const char *format,...)
 Send the message as a chat to the server. More...
 
void fc_allocate_ow_mutex ()
 Allocate output window mutex. More...
 
void fc_release_ow_mutex ()
 Release output window mutex. More...
 
void fc_init_ow_mutex ()
 Initialize output window mutex. More...
 
void fc_destroy_ow_mutex ()
 Destroy output window mutex. More...
 
void output_window_append (const struct ft_color color, const char *featured_text)
 Add a line of text to the output ("chatline") window, like puts() would do it in the console. More...
 
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. More...
 
void output_window_printf (const struct ft_color color, const char *format,...)
 Add a line of text to the output ("chatline") window. More...
 
void output_window_event (const char *plain_text, const struct text_tag_list *tags)
 Add a line of text to the output ("chatline") window from server event. More...
 
void chat_welcome_message (bool gui_has_copying_mitem)
 Standard welcome message. More...
 

Function Documentation

◆ chat_welcome_message()

void chat_welcome_message ( bool  gui_has_copying_mitem)

Standard welcome message.

Definition at line 157 of file chatline_common.cpp.

Referenced by fc_client::fc_main().

◆ fc_allocate_ow_mutex()

void fc_allocate_ow_mutex ( )

Allocate output window mutex.

Definition at line 63 of file chatline_common.cpp.

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

◆ fc_destroy_ow_mutex()

void fc_destroy_ow_mutex ( )

Destroy output window mutex.

Definition at line 78 of file chatline_common.cpp.

Referenced by at_exit().

◆ fc_init_ow_mutex()

void fc_init_ow_mutex ( )

Initialize output window mutex.

Definition at line 73 of file chatline_common.cpp.

Referenced by client_main().

◆ fc_release_ow_mutex()

void fc_release_ow_mutex ( )

Release output window mutex.

Definition at line 68 of file chatline_common.cpp.

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

◆ output_window_append()

◆ output_window_event()

void output_window_event ( const char *  plain_text,
const struct text_tag_list *  tags 
)

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

Definition at line 146 of file chatline_common.cpp.

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 133 of file chatline_common.cpp.

Referenced by api_client_chat_base(), 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 120 of file chatline_common.cpp.

Referenced by output_window_printf().

◆ Q_GLOBAL_STATIC()

Q_GLOBAL_STATIC ( QMutex  ,
ow_mutex   
)

◆ send_chat()

int send_chat ( const char *  message)

◆ send_chat_printf()

int send_chat_printf ( const char *  format,
  ... 
)

Send the message as a chat to the server.

Message is constructed in printf style.

Definition at line 44 of file chatline_common.cpp.

Referenced by pregame_options::ailevel_change(), desired_settable_option_send(), send_save_game(), fc_client::start_from_file(), and plr_report::toggle_ai_mode().