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
|
/* This file is part of the Project Athena Zephyr Notification System.
* It is one of the source files comprising zwgc, the Zephyr WindowGram
* client.
*
* Created by: Marc Horowitz <marc@athena.mit.edu>
*
* $Id$
*
* Copyright (c) 1989 by the Massachusetts Institute of Technology.
* For copying and distribution information, see the file
* "mit-copyright.h".
*/
#include <zephyr/mit-copyright.h>
#ifndef x_gram_TYPE
#define x_gram_TYPE
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <sys/time.h>
#include "formatter.h"
typedef struct _xblock {
unsigned long fgcolor;
XFontSet font;
int x,y;
int x1,y1,x2,y2; /* bounds of block. used for cut and paste. */
int strindex;
int strlen;
char *wstr;
int wlen;
} xblock;
typedef struct _x_gram {
unsigned long bgcolor;
int numblocks;
xblock *blocks;
char *text;
struct _x_gram *below,*above;
Window w;
#ifdef CMU_ZWGCPLUS
ZNotice_t *notice;
#endif
struct timeval can_die;
} x_gram;
typedef struct _xauxblock {
int align;
XFontSet font;
char *str;
int len;
int width;
} xauxblock;
typedef struct _xmode {
int bold;
int italic;
int size;
int align;
int expcolor;
unsigned long color;
char *substyle;
char *font;
} xmode;
typedef struct _xlinedesc {
int startblock;
int numblock;
int lsize;
int csize;
int rsize;
int ascent;
int descent;
} xlinedesc;
/* alignment values: */
#define LEFTALIGN 0
#define CENTERALIGN 1
#define RIGHTALIGN 2
extern void x_gram_init(Display *);
extern void x_gram_create(Display *, x_gram *, int, int, int, int, int, int, int);
extern void x_gram_expose(Display *, Window, x_gram *, XExposeEvent *);
extern void xshow(Display *, desctype *, int, int);
extern void xcut(Display *, XEvent *, XContext);
extern void x_get_input(Display *);
extern void xshowinit(void);
#endif
|