67#define SPECLIST_TAG dialog
68#define SPECLIST_TYPE struct spaceship_dialog
71#define dialog_list_iterate(dialoglist, pdialog) \
72 TYPED_LIST_ITERATE(struct spaceship_dialog, dialoglist, pdialog)
73#define dialog_list_iterate_end LIST_ITERATE_END
106 if (pdialog->pplayer ==
pplayer) {
133 GTK_RESPONSE_ACCEPT,
TRUE);
136 GTK_RESPONSE_ACCEPT,
FALSE);
203 case GTK_RESPONSE_ACCEPT:
219 GtkWidget *hgrid, *frame;
232 GTK_RESPONSE_ACCEPT);
234 g_signal_connect(pdialog->
shell->
grid,
"destroy",
238 hgrid = gtk_grid_new();
239 gtk_grid_set_column_spacing(GTK_GRID(hgrid), 5);
242 frame = gtk_frame_new(NULL);
243 gtk_grid_attach(GTK_GRID(hgrid), frame, grid_col++, 0, 1, 1);
248 gtk_widget_set_size_request(pdialog->
image_canvas, w, h);
250 gtk_frame_set_child(GTK_FRAME(frame), pdialog->
image_canvas);
253 gtk_drawing_area_set_draw_func(GTK_DRAWING_AREA(pdialog->
image_canvas),
258 gtk_label_set_justify(GTK_LABEL(pdialog->
info_label), GTK_JUSTIFY_LEFT);
259 gtk_widget_set_halign(pdialog->
info_label, GTK_ALIGN_START);
260 gtk_widget_set_valign(pdialog->
info_label, GTK_ALIGN_START);
262 gtk_grid_attach(GTK_GRID(hgrid), pdialog->
info_label, grid_col++, 0, 1, 1);
263 gtk_widget_set_name(pdialog->
info_label,
"spaceship_label");
281 gtk_label_set_text(GTK_LABEL(pdialog->
info_label),
struct canvas int int struct sprite int int int int height
struct canvas int int struct sprite int int int width
#define FC_STATIC_CANVAS_INIT
void gui_dialog_destroy(struct gui_dialog *dlg)
void gui_dialog_raise(struct gui_dialog *dlg)
void gui_dialog_new(struct gui_dialog **pdlg, GtkNotebook *notebook, gpointer user_data, bool check_top)
void gui_dialog_response_set_callback(struct gui_dialog *dlg, GUI_DIALOG_RESPONSE_FUN fun)
GtkWidget * gui_dialog_add_button(struct gui_dialog *dlg, const char *text, int response)
void gui_dialog_show_all(struct gui_dialog *dlg)
void gui_dialog_set_title(struct gui_dialog *dlg, const char *title)
void gui_dialog_set_response_sensitive(struct gui_dialog *dlg, int response, bool setting)
static void spaceship_dialog_update_info(struct spaceship_dialog *pdialog)
static struct spaceship_dialog * get_spaceship_dialog(struct player *pplayer)
void popdown_spaceship_dialog(struct player *pplayer)
static void spaceship_destroy_callback(GtkWidget *w, gpointer data)
#define dialog_list_iterate_end
void spaceship_dialog_init(void)
#define dialog_list_iterate(dialoglist, pdialog)
static struct dialog_list * dialog_list
static void spaceship_dialog_update_image(struct spaceship_dialog *pdialog)
void spaceship_dialog_done(void)
void popup_spaceship_dialog(struct player *pplayer)
void refresh_spaceship_dialog(struct player *pplayer)
static struct spaceship_dialog * create_spaceship_dialog(struct player *pplayer)
static void spaceship_response(struct gui_dialog *dlg, int response, gpointer data)
void gui_dialog_add_content_widget(struct gui_dialog *dlg, GtkWidget *wdg)
static void spaceship_image_canvas_draw(GtkDrawingArea *w, cairo_t *cr, int width, int height, gpointer data)
void get_spaceship_dimensions(int *width, int *height)
void put_spaceship(struct canvas *pcanvas, int canvas_x, int canvas_y, const struct player *pplayer)
int send_packet_spaceship_launch(struct connection *pc)
const char * player_name(const struct player *pplayer)
enum spaceship_state state
struct player_spaceship spaceship
struct gui_dialog * shell
const char * get_spaceship_descr(struct player_spaceship *pship)
bool victory_enabled(enum victory_condition_type victory)