blob: 4560abc61454f7aafd43bb920b638acd06d03cde (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
/****************************************************************************
* Theme functions.
* Copyright (C) 2006 Joe Wingbermuehle
****************************************************************************/
#include "jwm.h"
#include "theme.h"
#include "error.h"
#include "misc.h"
typedef struct ThemePathNode {
char *path;
struct ThemePathNode *next;
} ThemePathNode;
static ThemePathNode *themePaths;
static char *themeName;
/****************************************************************************
****************************************************************************/
void InitializeThemes() {
themeName = NULL;
themePaths = NULL;
}
/****************************************************************************
****************************************************************************/
void StartupThemes() {
}
/****************************************************************************
****************************************************************************/
void ShutdownThemes() {
}
/****************************************************************************
****************************************************************************/
void DestroyThemes() {
ThemePathNode *tp;
if(themeName) {
Release(themeName);
}
while(themePaths) {
tp = themePaths->next;
Release(themePaths->path);
Release(themePaths);
themePaths = tp;
}
}
/****************************************************************************
****************************************************************************/
void AddThemePath(const char *path) {
ThemePathNode *tp;
if(!path) {
return;
}
tp = Allocate(sizeof(ThemePathNode));
tp->path = CopyString(path);
Trim(tp->path);
tp->next = themePaths;
themePaths = tp;
}
/****************************************************************************
****************************************************************************/
void SetTheme(const char *name) {
if(themeName) {
Warning("theme set multiple times");
}
themeName = CopyString(name);
Trim(themeName);
}
|