Freeciv-3.3
Loading...
Searching...
No Matches
Functions | Variables
messagewin_common.c File Reference
#include <string.h>
#include "fcintl.h"
#include "mem.h"
#include "featured_text.h"
#include "map.h"
#include "citydlg_g.h"
#include "mapview_g.h"
#include "messagewin_g.h"
#include "client_main.h"
#include "options.h"
#include "update_queue.h"
#include "messagewin_common.h"

Go to the source code of this file.

Functions

static void meswin_dialog_update (void)
 
void meswin_clear_older (int turn, int phase)
 
void meswin_add (const char *message, const struct text_tag_list *tags, struct tile *ptile, enum event_type event, int turn, int phase)
 
const struct messagemeswin_get_message (int message_index)
 
int meswin_get_num_messages (void)
 
void meswin_set_visited_state (int message_index, bool state)
 
void meswin_popup_city (int message_index)
 
void meswin_goto (int message_index)
 
void meswin_double_click (int message_index)
 

Variables

static struct message ** messages = NULL
 
static int messages_total = 0
 
static int messages_alloc = 0
 

Function Documentation

◆ meswin_add()

void meswin_add ( const char message,
const struct text_tag_list tags,
struct tile ptile,
enum event_type  event,
int  turn,
int  phase 
)

Add a message.

Definition at line 100 of file messagewin_common.c.

Referenced by handle_event(), and real_output_window_append().

◆ meswin_clear_older()

void meswin_clear_older ( int  turn,
int  phase 
)

Clear all messages.

Definition at line 65 of file messagewin_common.c.

Referenced by handle_end_phase(), and set_client_state().

◆ meswin_dialog_update()

static void meswin_dialog_update ( void  )
static

Update the message dialog if needed.

Definition at line 47 of file messagewin_common.c.

Referenced by meswin_add(), and meswin_clear_older().

◆ meswin_double_click()

void meswin_double_click ( int  message_index)

Called from messagewin.c if the user double clicks on a message.

Definition at line 225 of file messagewin_common.c.

Referenced by meswin_dialog_row_activated_callback(), and msg_callback().

◆ meswin_get_message()

const struct message * meswin_get_message ( int  message_index)

Returns the pointer to a message. Returns NULL on error.

Definition at line 154 of file messagewin_common.c.

Referenced by messagewdg::item_selected(), meswin_dialog_refresh(), meswin_dialog_row_activated_callback(), meswin_dialog_selection_callback(), and real_meswin_dialog_update().

◆ meswin_get_num_messages()

int meswin_get_num_messages ( void  )

Returns the number of message in the window.

Definition at line 167 of file messagewin_common.c.

Referenced by meswin_dialog_refresh(), and real_meswin_dialog_update().

◆ meswin_goto()

void meswin_goto ( int  message_index)

Called from messagewin.c if the user clicks on the goto button.

Definition at line 213 of file messagewin_common.c.

Referenced by messagewdg::item_selected(), meswin_dialog_button_press_callback(), meswin_dialog_button_press_callback(), meswin_dialog_response_callback(), and meswin_double_click().

◆ meswin_popup_city()

void meswin_popup_city ( int  message_index)

Called from messagewin.c if the user clicks on the popup-city button.

Definition at line 185 of file messagewin_common.c.

Referenced by messagewdg::item_selected(), meswin_dialog_response_callback(), and meswin_double_click().

◆ meswin_set_visited_state()

void meswin_set_visited_state ( int  message_index,
bool  state 
)

Sets the visited-state of a message

Definition at line 175 of file messagewin_common.c.

Referenced by messagewdg::item_selected(), meswin_dialog_set_visited(), and msg_callback().

Variable Documentation

◆ messages

struct message** messages = NULL
static

◆ messages_alloc

int messages_alloc = 0
static

Definition at line 42 of file messagewin_common.c.

Referenced by meswin_add().

◆ messages_total

int messages_total = 0
static