Debian Codegraph @

texk/xdvik/gui/TipP.h

raw
1 /*
2 * Copyright (c) 2001-2004 Marcin Dalecki and others
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to
6 * deal in the Software without restriction, including without limitation the
7 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8 * sell copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * PAUL VOJTA OR ANY OTHER AUTHOR OF THIS SOFTWARE BE LIABLE FOR ANY CLAIM,
18 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 */
23
24 #ifndef TIPP_h
25 #define TIPP_h
26
27 #include <X11/ShellP.h>
28
29 #include "Tip.h"
30
31 /* Doubly Linked List Processing.
32 */
33 struct list_thread_str {
34 struct list_thread_str *forw;
35 struct list_thread_str *back;
36 };
37 typedef struct list_thread_str ListThread;
38
39 typedef struct {
40 int __empty;
41 } TipClassPart;
42
43 /* Full class record declaration.
44 */
45 typedef struct _TipClassRec {
46 CoreClassPart core_class;
47 CompositeClassPart composite_class;
48 ShellClassPart shell_class;
49 OverrideShellClassPart override_shell_class;
50 TipClassPart tip_class;
51 } TipClassRec;
52
53 extern TipClassRec xmTipClassRec;
54
55 /* New fields for the widget record.
56 */
57 typedef struct {
58 /* resources */
59 Pixel foreground;
60 XFontSet fontset; /* the font for text in box */
61 int waitPeriod; /* the delay resource - pointer must be
62 in watched widget this long before
63 tooltip is displayed - in milliseconds
64 */
65 int cancelWaitPeriod; /* after help is popped-down - normal
66 wait period is cancelled for this
67 period - in milliseconds
68 */
69
70 /* -------- private state --------- */
71 ListThread widget_list; /* list of widgets we are liteClue-ing */
72 Dimension font_width; /* width of '1' character */
73 Dimension font_height; /* height of font, rows are spaced using this */
74 Dimension font_baseline; /* relative displacement to baseline from top */
75 GC text_GC; /* for drawing text */
76 XtIntervalId tid; /* holds timer id */
77 XtIntervalId pid; /* holds pooler id for insensitive widgets */
78 Widget parent;
79 Widget isup; /* the help popup is up on this widget */
80 Time HelpPopDownTime; /* the time at which help popup was popped down */
81 } TipPart;
82
83
84 /*
85 * Full instance record declaration
86 */
87 typedef struct _TipRec {
88 CorePart core;
89 CompositePart composite;
90 ShellPart shell;
91 OverrideShellPart override;
92 TipPart tip;
93 } TipRec;
94
95 #endif