]> asedeno.scripts.mit.edu Git - 1ts-debian.git/blob - X_gram.h
c449c261463c11c9d4b77ca38a72c7d5b9af2ff5
[1ts-debian.git] / X_gram.h
1 /* This file is part of the Project Athena Zephyr Notification System.
2  * It is one of the source files comprising zwgc, the Zephyr WindowGram
3  * client.
4  *
5  *      Created by:     Marc Horowitz <marc@athena.mit.edu>
6  *
7  *      $Id: X_gram.h 2437 2009-04-21 04:11:03Z kcr@ATHENA.MIT.EDU $
8  *
9  *      Copyright (c) 1989 by the Massachusetts Institute of Technology.
10  *      For copying and distribution information, see the file
11  *      "mit-copyright.h".
12  */
13
14
15 #include <zephyr/mit-copyright.h>
16
17 #ifndef x_gram_TYPE
18 #define x_gram_TYPE
19
20 #include <X11/Xlib.h>
21 #include <X11/Xutil.h>
22 #include <sys/time.h>
23
24 #include "formatter.h"
25
26 typedef struct _xblock {
27     unsigned long fgcolor;
28     XFontSet font;
29     int x,y;
30     int x1,y1,x2,y2; /* bounds of block.  used for cut and paste. */
31     int strindex;
32     int strlen;
33     char *wstr;
34     int wlen;
35 } xblock;
36
37 typedef struct _x_gram {
38    unsigned long bgcolor;
39    int numblocks;
40    xblock *blocks;
41    char *text;
42    struct _x_gram *below,*above;
43    Window w;
44 #ifdef CMU_ZWGCPLUS
45    ZNotice_t *notice;
46 #endif
47    struct timeval can_die;
48 } x_gram;
49
50 typedef struct _xauxblock {
51     int align;
52     XFontSet font;
53     char *str;
54     int len;
55     int width;
56 } xauxblock;
57
58 typedef struct _xmode {
59    int bold;
60    int italic;
61    int size;
62    int align;
63    int expcolor;
64    unsigned long color;
65    char *substyle;
66    char *font;
67 } xmode;
68
69 typedef struct _xlinedesc {
70    int startblock;
71    int numblock;
72    int lsize;
73    int csize;
74    int rsize;
75    int ascent;
76    int descent;
77 } xlinedesc;
78
79 /* alignment values: */
80 #define LEFTALIGN   0
81 #define CENTERALIGN 1
82 #define RIGHTALIGN  2
83
84 extern void x_gram_init(Display *);
85 extern void x_gram_create(Display *, x_gram *, int, int, int, int, int, int, int);
86 extern void x_gram_expose(Display *, Window, x_gram *, XExposeEvent *);
87 extern void xshow(Display *, desctype *, int, int);
88 extern void xcut(Display *, XEvent *, XContext);
89 extern void x_get_input(Display *);
90 extern void xshowinit(void);
91
92 #endif