Freeciv-3.3
Loading...
Searching...
No Matches
Data Structures | Macros | Enumerations | Functions | Variables
inteldlg.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include "fcintl.h"
#include "log.h"
#include "shared.h"
#include "support.h"
#include "government.h"
#include "nation.h"
#include "packets.h"
#include "player.h"
#include "research.h"
#include "client_main.h"
#include "options.h"
#include "gui_main.h"
#include "gui_stuff.h"
#include "mapview.h"
#include "inteldlg.h"
#include "speclist.h"

Go to the source code of this file.

Data Structures

struct  intel_dialog
 
struct  intel_wonder_dialog
 
struct  _FcTechRow
 
struct  _FcTechRowClass
 
struct  _FcWonderRow
 
struct  _FcWonderRowClass
 

Macros

#define SPECLIST_TAG   dialog
 
#define SPECLIST_TYPE   struct intel_dialog
 
#define dialog_list_iterate(dialoglist, pdialog)    TYPED_LIST_ITERATE(struct intel_dialog, dialoglist, pdialog)
 
#define dialog_list_iterate_end   LIST_ITERATE_END
 
#define SPECLIST_TAG   wonder_dialog
 
#define SPECLIST_TYPE   struct intel_wonder_dialog
 
#define wonder_dialog_list_iterate(dialoglist, pdialog)    TYPED_LIST_ITERATE(struct intel_wonder_dialog, dialoglist, pdialog)
 
#define wonder_dialog_list_iterate_end   LIST_ITERATE_END
 
#define FC_TYPE_TECH_ROW   (fc_tech_row_get_type())
 
#define FC_TYPE_WONDER_ROW   (fc_wonder_row_get_type())
 
#define TECH_ROW_NAME   0
 
#define TECH_ROW_KNOWN   1
 
#define WONDER_ROW_NAME   0
 
#define WONDER_ROW_CITY   1
 

Enumerations

enum  table_label {
  LABEL_RULER , LABEL_GOVERNMENT , LABEL_CAPITAL , LABEL_GOLD ,
  LABEL_SEP1 , LABEL_TAX , LABEL_SCIENCE , LABEL_LUXURY ,
  LABEL_SEP2 , LABEL_RESEARCHING , LABEL_CULTURE , LABEL_LAST
}
 

Functions

static struct intel_dialogcreate_intel_dialog (struct player *p)
 
static struct intel_wonder_dialogcreate_intel_wonder_dialog (struct player *p)
 
static void fc_tech_row_class_init (FcTechRowClass *klass)
 
static void fc_tech_row_init (FcTechRow *self)
 
static FcTechRowfc_tech_row_new (void)
 
static void fc_wonder_row_class_init (FcWonderRowClass *klass)
 
static void fc_wonder_row_init (FcWonderRow *self)
 
static FcWonderRowfc_wonder_row_new (void)
 
void intel_dialog_init (void)
 
void intel_dialog_done (void)
 
static struct intel_dialogget_intel_dialog (struct player *pplayer)
 
static struct intel_wonder_dialogget_intel_wonder_dialog (struct player *pplayer)
 
void popup_intel_dialog (struct player *p)
 
void popup_intel_wonder_dialog (struct player *p)
 
static void intel_destroy_callback (GtkWidget *w, gpointer data)
 
static void intel_wonder_destroy_callback (GtkWidget *w, gpointer data)
 
void close_intel_dialog (struct player *p)
 
void close_intel_wonder_dialog (struct player *p)
 
static void tech_factory_bind (GtkSignalListItemFactory *self, GtkListItem *list_item, gpointer user_data)
 
static void tech_factory_setup (GtkSignalListItemFactory *self, GtkListItem *list_item, gpointer user_data)
 
static void wonder_factory_bind (GtkSignalListItemFactory *self, GtkListItem *list_item, gpointer user_data)
 
static void wonder_factory_setup (GtkSignalListItemFactory *self, GtkListItem *list_item, gpointer user_data)
 
void update_intel_dialog (struct player *p)
 
void update_intel_wonder_dialog (struct player *p)
 

Variables

static const chartable_text []
 
static struct dialog_list * dialog_list
 
static struct wonder_dialog_listwonder_dialogs
 

Macro Definition Documentation

◆ dialog_list_iterate

#define dialog_list_iterate (   dialoglist,
  pdialog 
)     TYPED_LIST_ITERATE(struct intel_dialog, dialoglist, pdialog)

Definition at line 91 of file inteldlg.c.

◆ dialog_list_iterate_end

#define dialog_list_iterate_end   LIST_ITERATE_END

Definition at line 93 of file inteldlg.c.

◆ FC_TYPE_TECH_ROW

#define FC_TYPE_TECH_ROW   (fc_tech_row_get_type())

Definition at line 116 of file inteldlg.c.

◆ FC_TYPE_WONDER_ROW

#define FC_TYPE_WONDER_ROW   (fc_wonder_row_get_type())

Definition at line 135 of file inteldlg.c.

◆ SPECLIST_TAG [1/2]

#define SPECLIST_TAG   dialog

Definition at line 87 of file inteldlg.c.

◆ SPECLIST_TAG [2/2]

#define SPECLIST_TAG   wonder_dialog

Definition at line 87 of file inteldlg.c.

◆ SPECLIST_TYPE [1/2]

#define SPECLIST_TYPE   struct intel_dialog

Definition at line 88 of file inteldlg.c.

◆ SPECLIST_TYPE [2/2]

#define SPECLIST_TYPE   struct intel_wonder_dialog

Definition at line 88 of file inteldlg.c.

◆ TECH_ROW_KNOWN

#define TECH_ROW_KNOWN   1

Definition at line 157 of file inteldlg.c.

◆ TECH_ROW_NAME

#define TECH_ROW_NAME   0

Definition at line 156 of file inteldlg.c.

◆ wonder_dialog_list_iterate

#define wonder_dialog_list_iterate (   dialoglist,
  pdialog 
)     TYPED_LIST_ITERATE(struct intel_wonder_dialog, dialoglist, pdialog)

Definition at line 107 of file inteldlg.c.

◆ wonder_dialog_list_iterate_end

#define wonder_dialog_list_iterate_end   LIST_ITERATE_END

Definition at line 109 of file inteldlg.c.

◆ WONDER_ROW_CITY

#define WONDER_ROW_CITY   1

Definition at line 160 of file inteldlg.c.

◆ WONDER_ROW_NAME

#define WONDER_ROW_NAME   0

Definition at line 159 of file inteldlg.c.

Enumeration Type Documentation

◆ table_label

Enumerator
LABEL_RULER 
LABEL_GOVERNMENT 
LABEL_CAPITAL 
LABEL_GOLD 
LABEL_SEP1 
LABEL_TAX 
LABEL_SCIENCE 
LABEL_LUXURY 
LABEL_SEP2 
LABEL_RESEARCHING 
LABEL_CULTURE 
LABEL_LAST 

Definition at line 62 of file inteldlg.c.

Function Documentation

◆ close_intel_dialog()

void close_intel_dialog ( struct player p)

Close an intelligence dialog for the given player.

Definition at line 325 of file inteldlg.c.

◆ close_intel_wonder_dialog()

void close_intel_wonder_dialog ( struct player p)

Close an wonders list dialog for the given player.

Definition at line 335 of file inteldlg.c.

◆ create_intel_dialog()

static struct intel_dialog * create_intel_dialog ( struct player p)
static

Create new intelligence dialog between client user and player given as parameter.

Definition at line 380 of file inteldlg.c.

◆ create_intel_wonder_dialog()

static struct intel_wonder_dialog * create_intel_wonder_dialog ( struct player p)
static

Create new wonders list dialog between client user and player given as parameter.

Definition at line 573 of file inteldlg.c.

◆ fc_tech_row_class_init()

static void fc_tech_row_class_init ( FcTechRowClass klass)
static

Initialization method for FcTechRow class

Definition at line 166 of file inteldlg.c.

◆ fc_tech_row_init()

static void fc_tech_row_init ( FcTechRow self)
static

Initialization method for FcTechRow

Definition at line 174 of file inteldlg.c.

◆ fc_tech_row_new()

static FcTechRow * fc_tech_row_new ( void  )
static

FcTechRow creation method

Definition at line 181 of file inteldlg.c.

Referenced by update_intel_dialog().

◆ fc_wonder_row_class_init()

static void fc_wonder_row_class_init ( FcWonderRowClass klass)
static

Initialization method for FcWonderRow class

Definition at line 194 of file inteldlg.c.

◆ fc_wonder_row_init()

static void fc_wonder_row_init ( FcWonderRow self)
static

Initialization method for FcWonderRow

Definition at line 202 of file inteldlg.c.

◆ fc_wonder_row_new()

static FcWonderRow * fc_wonder_row_new ( void  )
static

FcWonderRow creation method

Definition at line 209 of file inteldlg.c.

Referenced by update_intel_wonder_dialog().

◆ get_intel_dialog()

static struct intel_dialog * get_intel_dialog ( struct player pplayer)
static

Get intelligence dialog between client user and other player passed as parameter.

Definition at line 240 of file inteldlg.c.

◆ get_intel_wonder_dialog()

static struct intel_wonder_dialog * get_intel_wonder_dialog ( struct player pplayer)
static

Get wonder list dialog between client user and other player passed as parameter.

Definition at line 255 of file inteldlg.c.

◆ intel_destroy_callback()

static void intel_destroy_callback ( GtkWidget w,
gpointer  data 
)
static

Intelligence dialog destruction requested

Definition at line 301 of file inteldlg.c.

◆ intel_dialog_done()

void intel_dialog_done ( void  )

Free resources allocated for intelligence dialogs

Definition at line 230 of file inteldlg.c.

◆ intel_dialog_init()

void intel_dialog_init ( void  )

Initialize intelligence dialogs

Definition at line 221 of file inteldlg.c.

◆ intel_wonder_destroy_callback()

static void intel_wonder_destroy_callback ( GtkWidget w,
gpointer  data 
)
static

Wonders list dialog destruction requested

Definition at line 313 of file inteldlg.c.

◆ popup_intel_dialog()

void popup_intel_dialog ( struct player p)

Open intelligence dialog

Definition at line 269 of file inteldlg.c.

◆ popup_intel_wonder_dialog()

void popup_intel_wonder_dialog ( struct player p)

Open wonder list dialog

Definition at line 285 of file inteldlg.c.

◆ tech_factory_bind()

static void tech_factory_bind ( GtkSignalListItemFactory self,
GtkListItem list_item,
gpointer  user_data 
)
static

Tech table cell bind function

Definition at line 345 of file inteldlg.c.

Referenced by create_intel_dialog().

◆ tech_factory_setup()

static void tech_factory_setup ( GtkSignalListItemFactory self,
GtkListItem list_item,
gpointer  user_data 
)
static

Tech table cell setup function

Definition at line 365 of file inteldlg.c.

Referenced by create_intel_dialog().

◆ update_intel_dialog()

void update_intel_dialog ( struct player p)

Update the intelligence dialog for the given player. This is called by the core client code when that player's information changes.

Definition at line 646 of file inteldlg.c.

◆ update_intel_wonder_dialog()

void update_intel_wonder_dialog ( struct player p)

Update the wonders list dialog for the given player.

Definition at line 817 of file inteldlg.c.

◆ wonder_factory_bind()

static void wonder_factory_bind ( GtkSignalListItemFactory self,
GtkListItem list_item,
gpointer  user_data 
)
static

Wonder table cell bind function

Definition at line 526 of file inteldlg.c.

Referenced by create_intel_wonder_dialog().

◆ wonder_factory_setup()

static void wonder_factory_setup ( GtkSignalListItemFactory self,
GtkListItem list_item,
gpointer  user_data 
)
static

Wonder table cell setup function

Definition at line 562 of file inteldlg.c.

Referenced by create_intel_wonder_dialog().

Variable Documentation

◆ dialog_list

struct dialog_list* dialog_list
static

Definition at line 111 of file inteldlg.c.

◆ table_text

const char* table_text[]
static
Initial value:
= {
N_("Ruler:"),
N_("Government:"),
N_("Capital:"),
N_("Gold:"),
N_("Tax:"),
N_("Science:"),
N_("Luxury:"),
N_("Researching:"),
}
char * incite_cost
Definition comments.c:76
#define N_(String)
Definition fcintl.h:69

Definition at line 48 of file inteldlg.c.

◆ wonder_dialogs

struct wonder_dialog_list* wonder_dialogs
static

Definition at line 113 of file inteldlg.c.