Freeciv-3.2
Loading...
Searching...
No Matches
Data Structures | Functions | Variables
chatline.c File Reference
#include <SDL2/SDL.h>
#include "fcintl.h"
#include "log.h"
#include "game.h"
#include "packets.h"
#include "client_main.h"
#include "clinet.h"
#include "connectdlg_common.h"
#include "colors.h"
#include "dialogs.h"
#include "graphics.h"
#include "gui_id.h"
#include "gui_main.h"
#include "gui_tilespec.h"
#include "mapview.h"
#include "messagewin.h"
#include "pages.h"
#include "themespec.h"
#include "utf8string.h"
#include "widget.h"
#include "chatline.h"

Go to the source code of this file.

Data Structures

struct  CONNLIST
 

Functions

static void popup_conn_list_dialog (void)
 
static void add_to_chat_list (char *msg, size_t n_alloc)
 
static int move_load_game_dlg_callback (struct widget *pwindow)
 
void popdown_load_game_dialog (void)
 
static int exit_load_dlg_callback (struct widget *pwidget)
 
static int load_selected_game_callback (struct widget *pwidget)
 
static void popup_load_game_dialog (void)
 
static int inputline_return_callback (struct widget *pwidget)
 
void popup_input_line (void)
 
void real_output_window_append (const char *astring, const struct text_tag_list *tags, int conn_id)
 
void log_output_window (void)
 
void clear_output_window (void)
 
static int conn_dlg_callback (struct widget *pwindow)
 
static int disconnect_conn_callback (struct widget *pwidget)
 
static int input_edit_conn_callback (struct widget *pwidget)
 
static int start_game_callback (struct widget *pwidget)
 
static int select_nation_callback (struct widget *pwidget)
 
static int load_game_callback (struct widget *pwidget)
 
void real_conn_list_dialog_update (void *unused)
 
bool popdown_conn_list_dialog (void)
 
void version_message (const char *vertext)
 

Variables

struct CONNLISTconn_dlg = NULL
 
struct advanced_dialogload_dialog
 

Function Documentation

◆ add_to_chat_list()

static void add_to_chat_list ( char msg,
size_t  n_alloc 
)
static

Handle chat messages when connection dialog open.

Definition at line 444 of file chatline.c.

Referenced by real_output_window_append().

◆ clear_output_window()

void clear_output_window ( void  )

Clear all text from the output window.

Definition at line 412 of file chatline.c.

◆ conn_dlg_callback()

static int conn_dlg_callback ( struct widget pwindow)
static

User did something to connection list dialog.

Definition at line 422 of file chatline.c.

Referenced by popup_conn_list_dialog().

◆ disconnect_conn_callback()

static int disconnect_conn_callback ( struct widget pwidget)
static

User selected to get back from connection list dialog.

Definition at line 430 of file chatline.c.

Referenced by popup_conn_list_dialog().

◆ exit_load_dlg_callback()

static int exit_load_dlg_callback ( struct widget pwidget)
static

User clicked load game dialog close-button.

Definition at line 127 of file chatline.c.

Referenced by popup_load_game_dialog().

◆ input_edit_conn_callback()

static int input_edit_conn_callback ( struct widget pwidget)
static

User interacted with connection dialog input field.

Definition at line 505 of file chatline.c.

Referenced by popup_conn_list_dialog().

◆ inputline_return_callback()

static int inputline_return_callback ( struct widget pwidget)
static

Sent msg/command from input dlg to server

Definition at line 343 of file chatline.c.

Referenced by popup_input_line().

◆ load_game_callback()

static int load_game_callback ( struct widget pwidget)
static

User interacted with Load Game button.

Definition at line 559 of file chatline.c.

Referenced by popup_conn_list_dialog().

◆ load_selected_game_callback()

static int load_selected_game_callback ( struct widget pwidget)
static

User selected file to load.

Definition at line 143 of file chatline.c.

Referenced by popup_load_game_dialog().

◆ log_output_window()

void log_output_window ( void  )

Get the text of the output window, and call write_chatline_content() to log it.

Definition at line 404 of file chatline.c.

◆ move_load_game_dlg_callback()

static int move_load_game_dlg_callback ( struct widget pwindow)
static

User event to load game dialog window.

Definition at line 89 of file chatline.c.

Referenced by popup_load_game_dialog().

◆ popdown_conn_list_dialog()

bool popdown_conn_list_dialog ( void  )

Close connection list dialog.

Definition at line 875 of file chatline.c.

Referenced by disconnect_conn_callback(), real_conn_list_dialog_update(), and real_set_client_page().

◆ popdown_load_game_dialog()

void popdown_load_game_dialog ( void  )

Close load game dialog

Definition at line 101 of file chatline.c.

Referenced by exit_load_dlg_callback(), load_selected_game_callback(), and real_set_client_page().

◆ popup_conn_list_dialog()

static void popup_conn_list_dialog ( void  )
static

Open connection list dialog

Definition at line 667 of file chatline.c.

Referenced by real_conn_list_dialog_update().

◆ popup_input_line()

void popup_input_line ( void  )

This function is main chat/command client input.

Definition at line 358 of file chatline.c.

Referenced by main_key_down_handler(), and main_key_down_handler().

◆ popup_load_game_dialog()

static void popup_load_game_dialog ( void  )
static

Open load game dialog

Definition at line 167 of file chatline.c.

Referenced by load_game_callback(), and real_conn_list_dialog_update().

◆ real_conn_list_dialog_update()

void real_conn_list_dialog_update ( void unused)

Update the connected users list at pregame state.

Definition at line 574 of file chatline.c.

◆ real_output_window_append()

void real_output_window_append ( const char astring,
const struct text_tag_list tags,
int  conn_id 
)

Appends the string to the chat output window. The string should be inserted on its own line, although it will have no newline.

Definition at line 384 of file chatline.c.

◆ select_nation_callback()

static int select_nation_callback ( struct widget pwidget)
static

User interacted with Select Nation button.

Definition at line 536 of file chatline.c.

Referenced by popup_conn_list_dialog().

◆ start_game_callback()

static int start_game_callback ( struct widget pwidget)
static

User interacted with Start Game button.

Definition at line 524 of file chatline.c.

Referenced by popup_conn_list_dialog().

◆ version_message()

void version_message ( const char vertext)

Got version message from metaserver thread.

Definition at line 905 of file chatline.c.

Variable Documentation

◆ conn_dlg

struct CONNLIST * conn_dlg = NULL

◆ load_dialog

struct advanced_dialog* load_dialog