Freeciv-3.3: /fast/freeciv/nightly/main/client/gui-sdl2/chatline.c File Reference

Freeciv-3.3

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 "ratesdlg_g.h"`
`#include "update_queue.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 "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 CONNLIST * | conn_dlg = NULL
struct advanced_dialog * | load_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 445 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 413 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 423 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 431 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 128 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 506 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 344 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 560 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 144 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 405 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 90 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 876 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 102 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 668 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 359 of file chatline.c.

Referenced by main_key_down_handler().

## ◆ popup_load_game_dialog()

static void popup_load_game_dialog | ( | void |  | ) |

static

Open load game dialog

Definition at line 168 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 575 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 385 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 537 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 525 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 906 of file chatline.c.

## Variable Documentation

## ◆ conn_dlg

struct CONNLIST * conn_dlg = NULL

Referenced by add_to_chat_list(), popdown_conn_list_dialog(), popdown_load_game_dialog(), popup_conn_list_dialog(), popup_load_game_dialog(), real_conn_list_dialog_update(), and real_output_window_append().

## ◆ load_dialog

struct advanced_dialog* load_dialog

Definition at line 85 of file chatline.c.

Referenced by move_load_game_dlg_callback(), popdown_load_game_dialog(), and popup_load_game_dialog().