annotate lwlib/xlwscrollbar.h @ 5925:08cfc8f77fb6 cygwin

make space for long ptr, and store as such, for frame in WINDOW data, add a bit more debugging to debug-mswindow, Vin Shelton patch to fix M-x shell
author Henry Thompson <ht@markup.co.uk>
date Fri, 27 Feb 2015 17:41:20 +0000
parents ade4c7e2c6cb
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 /* Implements a lightweight scrollbar widget.
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: 440
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: 440
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: 440
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: 440
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: 440
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: 440
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: 440
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 440
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: 440
diff changeset
17 along with the Lucid Widget Library. If not, see
ade4c7e2c6cb Migrate lwlib/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 440
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
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
22 #ifndef INCLUDED_xlwscrollbar_h_
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
23 #define INCLUDED_xlwscrollbar_h_
428
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 #include <X11/Core.h>
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 /* Motif-compatible resource names */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 #ifndef _XmStrDefs_h_
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 #define XmNbackground "background"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 #define XmNbottomShadowColor "bottomShadowColor"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 #define XmNbottomShadowPixmap "bottomShadowPixmap"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 #define XmNforeground "foreground"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 #define XmNincrement "increment"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 #define XmNinitialDelay "initialDelay"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 #define XmNmaximum "maximum"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 #define XmNminimum "minimum"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 #define XmNpageIncrement "pageIncrement"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 #define XmNrepeatDelay "repeatDelay"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 #define XmNshadowThickness "shadowThickness"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 #define XmNborderWidth "borderWidth"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 #define XmNshowArrows "showArrows"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 #define XmNsliderSize "sliderSize"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 #define XmNtopShadowColor "topShadowColor"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 #define XmNtopShadowPixmap "topShadowPixmap"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 #define XmNtroughColor "troughColor"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 #define XmNvalue "value"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 #define XmNvalueChangedCallback "valueChangedCallback"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 #define XmNincrementCallback "incrementCallback"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 #define XmNdecrementCallback "decrementCallback"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 #define XmNpageIncrementCallback "pageIncrementCallback"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 #define XmNpageDecrementCallback "pageDecrementCallback"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 #define XmNtoTopCallback "toTopCallback"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 #define XmNtoBottomCallback "toBottomCallback"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 #define XmNdragCallback "dragCallback"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 #define XmNorientation "orientation"
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 #define XmCBackground "Background"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 #define XmCBottomShadowColor "BottomShadowColor"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 #define XmCBottomShadowPixmap "BottomShadowPixmap"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 #define XmCTopShadowPixmap "TopShadowPixmap"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 #define XmCForeground "Foreground"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 #define XmCIncrement "Increment"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 #define XmCInitialDelay "InitialDelay"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 #define XmCMaximum "Maximum"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 #define XmCMinimum "Minimum"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 #define XmCPageIncrement "PageIncrement"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 #define XmCRepeatDelay "RepeatDelay"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 #define XmCShadowThickness "ShadowThickness"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 #define XmCBorderWidth "BorderWidth"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 #define XmCShowArrows "ShowArrows"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 #define XmCSliderSize "SliderSize"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 #define XmCTopShadowColor "TopShadowColor"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 #define XmCTroughColor "TroughColor"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 #define XmCValue "Value"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 #define XmCValueChangedCallback "ValueChangedCallback"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 #define XmCIncrementCallback "IncrementCallback"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 #define XmCDecrementCallback "DecrementCallback"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 #define XmCPageIncrementCallback "PageIncrementCallback"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 #define XmCPageDecrementCallback "PageDecrementCallback"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 #define XmCToTopCallback "ToTopCallback"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 #define XmCToBottomCallback "ToBottomCallback"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 #define XmCDragCallback "DragCallback"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 #define XmCOrientation "Orientation"
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 #endif /* _XmStrDefs_h_ */
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 /* New resources that Motif does not have.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 Maybe we should use a different prefix. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 /* "knob" is obsolete; use "slider" instead. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 #define XmNknobStyle "knobStyle"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 #define XmCKnobStyle "KnobStyle"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 #define XmNsliderStyle "sliderStyle"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 #define XmCSliderStyle "SliderStyle"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 #define XmNarrowPosition "arrowPosition"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 #define XmCArrowPosition "ArrowPosition"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 #ifndef _Xm_h
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 enum {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 XmCR_NONE,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 XmCR_VALUE_CHANGED = 2,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 XmCR_INCREMENT,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 XmCR_DECREMENT,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 XmCR_PAGE_INCREMENT,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 XmCR_PAGE_DECREMENT,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 XmCR_TO_TOP,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 XmCR_TO_BOTTOM,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 XmCR_DRAG
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 };
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 enum {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 XmNO_ORIENTATION,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 XmVERTICAL,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 XmHORIZONTAL
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 #endif /* ! _Xm_h */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 extern WidgetClass xlwScrollBarWidgetClass;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 typedef struct _XlwScrollBarClassRec *XlwScrollBarWidgetClass;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 typedef struct _XlwScrollBarRec *XlwScrollBarWidget;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 typedef struct
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 int reason;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 XEvent * event;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 int value;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 int pixel;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 } XlwScrollBarCallbackStruct;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136 void XlwScrollBarGetValues(Widget widget, int *value, int *sliderSize,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 int *increment, int *pageIncrement);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 void XlwScrollBarSetValues(Widget widget, int value, int sliderSize,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140 int increment, int pageIncrement, Boolean notify);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
142 #endif /* INCLUDED_xlwscrollbar_h_ */