annotate lwlib/xlwscrollbarP.h @ 5630:f5315ccbf005

Cons less, be more careful about always using the environment, #'macroexpand 2011-12-30 Aidan Kehoe <kehoea@parhasard.net> * eval.c (Fmacroexpand): Don't cons if ENVIRONMENT is the same object as byte-compile-macro-environment. Always look up symbol- and other macros in the (possibly modified) byte-compile-macro-environment, not the supplied ENVIRONMENT. byte-compile-macro-environment reflects ENVIRONMENT, so that's OK and preferred.
author Aidan Kehoe <kehoea@parhasard.net>
date Fri, 30 Dec 2011 12:43:52 +0000
parents ade4c7e2c6cb
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5422
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 428
diff changeset
1 /* Implements a lightweight scrollbar widget.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 Copyright (C) 1992, 1993, 1994 Lucid, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 This file is part of the Lucid Widget Library.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5
5422
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 428
diff changeset
6 The Lucid Widget Library is free software: you can redistribute it
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 428
diff changeset
7 and/or modify it under the terms of the GNU General Public License as
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 428
diff changeset
8 published by the Free Software Foundation, either version 3 of the
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 428
diff changeset
9 License, or (at your option) any later version.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10
5422
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 428
diff changeset
11 The Lucid Widget Library is distributed in the hope that it will be
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 428
diff changeset
12 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 428
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 428
diff changeset
14 General Public License for more details.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
5422
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 428
diff changeset
17 along with the Lucid Widget Library. If not, see
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 428
diff changeset
18 <http://www.gnu.org/licenses/>. */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 /* Created by Douglas Keller <dkeller@vnet.ibm.com> */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 #ifndef _XlwScrollBarP_h
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 #define _XlwScrollBarP_h
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 ** Widget class
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 typedef struct
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 int dummy_field; /* keep compiler happy */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 } XlwScrollBarClassPart;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 typedef struct _XlwScrollbarClassRec
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 CoreClassPart core_class;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 XlwScrollBarClassPart scrollbar_class;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 } XlwScrollBarClassRec;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 enum XlwScrollbarArm
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 ARM_NONE,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 ARM_SLIDER,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 ARM_UP,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 ARM_DOWN,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 ARM_PAGEUP,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 ARM_PAGEDOWN
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 };
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 enum XlwScrollbarForcedScroll
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 FORCED_SCROLL_NONE,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 FORCED_SCROLL_DOWNRIGHT,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 FORCED_SCROLL_UPLEFT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 };
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 ** Widget instance
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 typedef struct
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 /* resources */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 XtCallbackList valueChangedCBL;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 XtCallbackList incrementCBL;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 XtCallbackList decrementCBL;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 XtCallbackList pageIncrementCBL;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 XtCallbackList pageDecrementCBL;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 XtCallbackList toTopCBL;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 XtCallbackList toBottomCBL;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 XtCallbackList dragCBL;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 Pixel foreground;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 Pixel topShadowColor;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 Pixel bottomShadowColor;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 Pixel troughColor;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 Pixel armColor;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 Pixel armTopShadowColor;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 Pixel armBottomShadowColor;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 Pixmap topShadowPixmap;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 Pixmap bottomShadowPixmap;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86 int shadowThickness;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 Boolean showArrows;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 int minimum;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 int maximum;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 int sliderSize;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 int value;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 int pageIncrement;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 int increment;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 int initialDelay;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 int repeatDelay;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 unsigned char orientation;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 char *sliderStyle;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 char *knobStyle;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 char *arrowPosition;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 /* private */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 Pixmap grayPixmap;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 GC backgroundGC;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 GC topShadowGC;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 GC bottomShadowGC;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 int above, ss, below;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 int lastY;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 enum XlwScrollbarArm armed;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 enum XlwScrollbarForcedScroll forced_scroll;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 int savedValue;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 Boolean fullRedrawNext;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 Boolean timerActive;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 XtIntervalId timerId;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 } XlwScrollBarPart;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 typedef struct _XlwScrollBarRec
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 CorePart core;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 XlwScrollBarPart sb;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 } XlwScrollBarRec;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 #endif /* _XlwScrollBarP_h */