Freeciv-3.3
Loading...
Searching...
No Matches
Data Structures | Functions | Variables
voteinfo_bar.c File Reference
#include <gtk/gtk.h>
#include "fcintl.h"
#include "mem.h"
#include "support.h"
#include "options.h"
#include "voteinfo.h"
#include "update_queue.h"
#include "chatline.h"
#include "voteinfo_bar.h"

Go to the source code of this file.

Data Structures

struct  voteinfo_bar
 

Functions

static void voteinfo_bar_do_vote_callback (GtkWidget *w, gpointer userdata)
 
static void voteinfo_bar_next_callback (GtkWidget *w, gpointer userdata)
 
static void voteinfo_bar_destroy (GtkWidget *w, gpointer userdata)
 
GtkWidgetvoteinfo_bar_new (bool split_bar)
 
void voteinfo_gui_update (void)
 

Variables

GtkWidgetpregame_votebar = NULL
 
GtkWidgetingame_votebar = NULL
 

Function Documentation

◆ voteinfo_bar_destroy()

static void voteinfo_bar_destroy ( GtkWidget w,
gpointer  userdata 
)
static

Destroy the voteinfo_bar data structure.

Definition at line 82 of file voteinfo_bar.c.

Referenced by voteinfo_bar_new().

◆ voteinfo_bar_do_vote_callback()

static void voteinfo_bar_do_vote_callback ( GtkWidget w,
gpointer  userdata 
)
static

Called after a click on a vote button.

Definition at line 55 of file voteinfo_bar.c.

Referenced by voteinfo_bar_new().

◆ voteinfo_bar_new()

GtkWidget * voteinfo_bar_new ( bool  split_bar)

Create a voteinfo_bar structure. "split_bar" controls whether to split voteinfo bar over two lines (for narrow windows) or put on a single line to save vertical space.

Definition at line 92 of file voteinfo_bar.c.

Referenced by create_start_page(), and setup_widgets().

◆ voteinfo_bar_next_callback()

static void voteinfo_bar_next_callback ( GtkWidget w,
gpointer  userdata 
)
static

Switch to the next vote.

Definition at line 73 of file voteinfo_bar.c.

Referenced by voteinfo_bar_new().

◆ voteinfo_gui_update()

void voteinfo_gui_update ( void  )

Refresh all vote related GUI widgets. Called by the voteinfo module when the client receives new vote information from the server.

Definition at line 214 of file voteinfo_bar.c.

Referenced by handle_vote_new(), handle_vote_remove(), handle_vote_resolve(), handle_vote_update(), real_set_client_page(), set_client_state(), fc_client::switch_page(), voteinfo_bar_next_callback(), and voteinfo_queue_check_removed().

Variable Documentation

◆ ingame_votebar

GtkWidget* ingame_votebar = NULL

Definition at line 50 of file voteinfo_bar.c.

Referenced by setup_widgets(), and voteinfo_gui_update().

◆ pregame_votebar

GtkWidget* pregame_votebar = NULL

Definition at line 49 of file voteinfo_bar.c.

Referenced by create_start_page(), and voteinfo_gui_update().