Freeciv-3.3
Loading...
Searching...
No Matches
Data Structures | Functions | Variables
themes_common.c File Reference
#include <unistd.h>
#include <string.h>
#include <sys/stat.h>
#include "log.h"
#include "mem.h"
#include "shared.h"
#include "string_vector.h"
#include "support.h"
#include "themes_g.h"
#include "themes_common.h"

Go to the source code of this file.

Data Structures

struct  theme_directory
 

Functions

void init_themes (void)
 
const struct strvecget_themes_list (const struct option *poption)
 
bool load_theme (const char *theme_name)
 
void theme_reread_callback (struct option *poption)
 

Variables

static int num_directories
 
struct theme_directorydirectories
 

Function Documentation

◆ get_themes_list()

const struct strvec * get_themes_list ( const struct option poption)

Return a static string vector of usable theme names.

Definition at line 90 of file themes_common.c.

◆ init_themes()

void init_themes ( void  )

Initialized themes data

Definition at line 65 of file themes_common.c.

Referenced by client_main().

◆ load_theme()

bool load_theme ( const char theme_name)

Loads a theme with the given name. First matching directory will be used. If there's no such theme the function returns FALSE.

Definition at line 120 of file themes_common.c.

◆ theme_reread_callback()

void theme_reread_callback ( struct option poption)

Wrapper for load_theme. It's is used by local options dialog

Definition at line 138 of file themes_common.c.

Variable Documentation

◆ directories

struct theme_directory* directories

◆ num_directories

int num_directories
static

Definition at line 59 of file themes_common.c.

Referenced by get_themes_list(), init_themes(), and load_theme().