1 /*
2  * Dclock.c -- a digital clock widget.
3  * Copyright (c) 1988 Dan Heller <argv@sun.com>
4  */
5 #ifndef _XtDclockP_h
6 #define _XtDclockP_h
7 
8 #include <X11/CoreP.h>
9 #include "Dclock.h"
10 
11 /* Add -DXFT_SUPPORT in the Imakefile for freefont support */
12 #ifdef XFT_SUPPORT
13 #include <X11/Xft/Xft.h>
14 #endif
15 
16 
17 typedef struct {
18     Pixel      		foreground;
19     Pixel      		led_off;
20     Pixel      		background;
21     Boolean		tails;		/* put tails on 6 & 9 */
22     Boolean		scroll;
23     Boolean		fade;
24     int			fade_rate;	/* millisec. betw. fade steps */
25     float		angle;		/* rise over run */
26     float		width_factor;   /* ratio of digit to segment width */
27     float		small_ratio;	/* ratio of small to large digits */
28     float		sec_gap;	/* gap between normal digits and
29 					   seconds, as ratio to digit width */
30     float		space_factor;   /* ratio of digit width to border sp.*/
31     Boolean		seconds;
32     Boolean		blink;		/* colon blinks the seconds */
33     Boolean		bell;
34     Boolean		miltime;
35     Boolean		utc;
36     Boolean		display_time;	/* when false, display alarm time */
37     Boolean		alarm;		/* alarm goes off at alarm time */
38     String		alarm_time;	/* time alarm goes off "14:30:00" */
39     Boolean		alarm_persist;  /* stays in reverse vid after alarm */
40     String		date_fmt;
41     Boolean		dateup;
42     String		alarmfile;	/* audio file to play for alarm */
43     String		bellfile;	/* audio file to play for hour bell */
44     String		audioplay;	/* executable to use to play bell */
45     XFontStruct		*font;
46 
47 #ifdef XFT_SUPPORT
48     String		xftfontname;
49     XftFont		*xftfont;
50     XftDraw		*xftdraw;
51     XftColor		xftbg;
52     XftColor		xftfg;
53 #endif
54 
55     /* non-resources (e.g. user can't set) */
56     XtIntervalId	interval_id;
57     XtIntervalId	punt_resize;
58     GC			foreGC, backGC;
59     float		digit_w, digit_h;
60     Pixmap		digit_one[2];	/* "1" or blank, for civilian time */
61     Pixmap		digits[10];
62     Pixmap		tiny_digits[10];
63     Pixmap		colon[2];
64     Boolean		holdoff;	/* Resize/Expose holdoff */
65 } DclockPart;
66 
67 typedef struct _DclockRec {
68     CorePart	core;
69     DclockPart	dclock;
70 } DclockRec;
71 
72 typedef struct {int dummy;} DclockClassPart;
73 
74 typedef struct _DclockClassRec {
75     CoreClassPart	core_class;
76     DclockClassPart	dclock_class;
77 } DclockClassRec;
78 
79 extern DclockClassRec dclockClassRec;
80 
81 #endif /* _XtDclockP_h */
82