Freeciv21
Develop your civilization from humble roots to a global empire
messagewin_common.h
Go to the documentation of this file.
1 /*__ ___ ***************************************
2 / \ / \ Copyright (c) 1996-2020 Freeciv21 and Freeciv
3 \_ \ / __/ contributors. This file is part of Freeciv21.
4  _\ \ / /__ Freeciv21 is free software: you can redistribute it
5  \___ \____/ __/ and/or modify it under the terms of the GNU General
6  \_ _/ Public License as published by the Free Software
7  | @ @ \_ Foundation, either version 3 of the License,
8  | or (at your option) any later version.
9  _/ /\ You should have received a copy of the GNU
10  /o) (o/\ \_ General Public License along with Freeciv21.
11  \_____/ / If not, see https://www.gnu.org/licenses/.
12  \____/ ********************************************************/
13 
14 #pragma once
15 
16 struct message {
17  char *descr;
18  struct text_tag_list *tags;
19  struct tile *tile;
20  enum event_type event;
22  bool city_ok;
23  bool visited;
24  int turn;
25  int phase;
26 };
27 
28 #define MESWIN_CLEAR_ALL (-1)
29 
30 void meswin_clear_older(int turn, int phase);
31 void meswin_add(const char *message, const struct text_tag_list *tags,
32  struct tile *ptile, enum event_type event, int turn,
33  int phase);
34 
35 const struct message *meswin_get_message(int message_index);
37 void meswin_set_visited_state(int message_index, bool state);
38 void meswin_popup_city(int message_index);
39 void meswin_goto(int message_index);
enum event_type event
Definition: events.cpp:68
void meswin_popup_city(int message_index)
Called from messagewin.c if the user clicks on the popup-city button.
void meswin_goto(int message_index)
Called from messagewin.c if the user clicks on the goto button.
void meswin_clear_older(int turn, int phase)
Clear all messages.
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.
int meswin_get_num_messages()
Returns the number of message in the window.
const struct message * meswin_get_message(int message_index)
Returns the pointer to a message.
void meswin_set_visited_state(int message_index, bool state)
Sets the visited-state of a message.
char * descr
enum event_type event
struct text_tag_list * tags
bool location_ok
struct tile * tile
Definition: tile.h:42