]> asedeno.scripts.mit.edu Git - 1ts-debian.git/blob - zephyr/zwgc/X_gram.h
r4275@bucket (orig r265): kcr | 2008-01-21 02:57:32 -0500
[1ts-debian.git] / zephyr / zwgc / 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$
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    Font fid;
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 } xblock;
34
35 typedef struct _x_gram {
36    unsigned long bgcolor;
37    int numblocks;
38    xblock *blocks;
39    char *text;
40    struct _x_gram *below,*above;
41    Window w;
42    struct timeval can_die;
43 } x_gram;
44
45 typedef struct _xauxblock {
46    int align;
47    XFontStruct *font;
48    char *str;
49    int len;
50    int width;
51 } xauxblock;
52
53 typedef struct _xmode {
54    int bold;
55    int italic;
56    int size;
57    int align;
58    int expcolor;
59    unsigned long color;
60    char *substyle;
61    char *font;
62 } xmode;
63
64 typedef struct _xlinedesc {
65    int startblock;
66    int numblock;
67    int lsize;
68    int csize;
69    int rsize;
70    int ascent;
71    int descent;
72 } xlinedesc;
73
74 /* alignment values: */
75 #define LEFTALIGN   0
76 #define CENTERALIGN 1
77 #define RIGHTALIGN  2
78
79 extern void x_gram_init(Display *);
80 extern void x_gram_create(Display *, x_gram *, int, int, int, int, int, int, int);
81 extern void x_gram_expose(Display *, Window, x_gram *, XExposeEvent *);
82 extern void xshow(Display *, desctype *, int, int);
83 extern void xcut(Display *, XEvent *, XContext);
84 extern void x_get_input(Display *);
85 extern void xshowinit(void);
86
87 #endif