File: asclock.h

package info (click to toggle)
asclock 2.0.12-33
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 1,464 kB
  • sloc: ansic: 1,229; sh: 179; makefile: 74
file content (164 lines) | stat: -rw-r--r-- 3,340 bytes parent folder | download | duplicates (11)
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
#ifndef ASCLOCK_H
#define ASCLOCK_H
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <ctype.h>
#include <X11/Xlib.h>
#include <string.h>
#include <math.h>
#include <unistd.h>
#include <stdlib.h>
#include <dirent.h>
#include <time.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <X11/Xlib.h>
#include <X11/xpm.h>
#include <X11/extensions/shape.h>
#include <X11/Xatom.h>

extern char VERSION[];

#define TRUE 1
#define FALSE 0
#define VISIBLE 1
#define UNDEFINED 99999

typedef struct _symbol symbol;

struct _symbol
{
  char *name;
  int *addr;
};
extern symbol config_symbols[];

#define MAX_PATH_LEN 512
#define INT_TYPE 0;

/* the xpm data */
extern char *clock_xpm[];
extern char *month_xpm[];
extern char *weekday_xpm[];
extern char *led_xpm[];
extern char *date_xpm[];
extern char *hour_xpm[];
extern char *minute_xpm[];
extern char *second_xpm[];
extern char *beats_xpm[];

/* the filenames */
extern char clock_xpm_fn[MAX_PATH_LEN];
extern char month_xpm_fn[MAX_PATH_LEN];
extern char weekday_xpm_fn[MAX_PATH_LEN];
extern char led_xpm_fn[MAX_PATH_LEN];
extern char date_xpm_fn[MAX_PATH_LEN];
extern char hour_xpm_fn[MAX_PATH_LEN];
extern char min_xpm_fn[MAX_PATH_LEN];
extern char sec_xpm_fn[MAX_PATH_LEN];
extern char beats_xpm_fn[MAX_PATH_LEN];

extern char exec_str[MAX_PATH_LEN];

extern int itblinks;
extern int showampm;
extern int itdocks;

extern int led_visible;
extern int led_elem_width;
extern int led_elem_height;
extern int led_12h_hour1_x;
extern int led_12h_hour2_x;
extern int led_12h_colon_x;
extern int led_12h_min1_x;
extern int led_12h_min2_x;
extern int led_ampm_x;
extern int led_ampm_y;
extern int led_ampm_width;
extern int led_12h_y;
extern int led_24h_hour1_x;
extern int led_24h_hour2_x;
extern int led_24h_colon_x;
extern int led_24h_min1_x;
extern int led_24h_min2_x;
extern int led_24h_y;

extern int week_visible;
extern int week_elem_width;
extern int week_elem_height;
extern int week_x;
extern int week_y;

extern int day_visible;
extern int day_elem_width;
extern int day_elem_height;
extern int day_x;
extern int day1_x;
extern int day2_x;
extern int day_y;

extern int month_visible;
extern int month_elem_width;
extern int month_elem_height;
extern int month_x;
extern int month_y;

extern int analog_visible;
extern int hour_visible ;
extern int hour_center_x ;
extern int hour_center_y ;
extern int hour_rot_x ;
extern int hour_rot_y ;

extern int min_visible ;
extern int min_center_x ;
extern int min_center_y ;
extern int min_rot_x ;
extern int min_rot_y ;

extern int sec_visible ;
extern int sec_center_x ;
extern int sec_center_y ;
extern int sec_rot_x ;
extern int sec_rot_y ;

extern int beats_visible;
extern int beats_at_x;
extern int beats_at_width;
extern int beats1_x;
extern int beats2_x;
extern int beats3_x;
extern int beats_y;
extern int beats_elem_width;
extern int beats_elem_height;

extern char *hour_map;
extern char *min_map;
extern char *sec_map;

/********* symbols.c ***************/
void init_symbols();
void postconfig();

/********* config.c ****************/

void config();
void parseArgs(int argc, char **argv);

/********* parser.c ****************/

int read_init(FILE *f);
int read_type(int *type);
int read_token(char *str, int max);
int read_assign();
int read_int(int *ret);
int read_semicolon();

#endif /* ASCLOCK_H */