summaryrefslogtreecommitdiffstats
path: root/generic/tkScrollbar.h
diff options
context:
space:
mode:
authordonal.k.fellows@manchester.ac.uk <dkf>2005-11-13 00:45:47 (GMT)
committerdonal.k.fellows@manchester.ac.uk <dkf>2005-11-13 00:45:47 (GMT)
commit6dc84cce84d171e9ffcb71e724192f996d353e52 (patch)
treebfc0851201352961549e6451ef2299d0da20a9e6 /generic/tkScrollbar.h
parent85a0c280aa6116f26778d538843438100477c947 (diff)
downloadtk-6dc84cce84d171e9ffcb71e724192f996d353e52.zip
tk-6dc84cce84d171e9ffcb71e724192f996d353e52.tar.gz
tk-6dc84cce84d171e9ffcb71e724192f996d353e52.tar.bz2
ANSIfy
Diffstat (limited to 'generic/tkScrollbar.h')
-rw-r--r--generic/tkScrollbar.h153
1 files changed, 72 insertions, 81 deletions
diff --git a/generic/tkScrollbar.h b/generic/tkScrollbar.h
index f16880a..7c07c7e 100644
--- a/generic/tkScrollbar.h
+++ b/generic/tkScrollbar.h
@@ -1,15 +1,15 @@
/*
* tkScrollbar.h --
*
- * Declarations of types and functions used to implement
- * the scrollbar widget.
+ * Declarations of types and functions used to implement the scrollbar
+ * widget.
*
* Copyright (c) 1996 by Sun Microsystems, Inc.
*
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ * See the file "license.terms" for information on usage and redistribution of
+ * this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkScrollbar.h,v 1.6 2000/11/22 01:49:38 ericm Exp $
+ * RCS: @(#) $Id: tkScrollbar.h,v 1.7 2005/11/13 00:45:47 dkf Exp $
*/
#ifndef _TKSCROLLBAR
@@ -25,30 +25,29 @@
#endif
/*
- * A data structure of the following type is kept for each scrollbar
- * widget.
+ * A data structure of the following type is kept for each scrollbar widget.
*/
typedef struct TkScrollbar {
- Tk_Window tkwin; /* Window that embodies the scrollbar. NULL
+ Tk_Window tkwin; /* Window that embodies the scrollbar. NULL
* means that the window has been destroyed
* but the data structures haven't yet been
* cleaned up.*/
- Display *display; /* Display containing widget. Used, among
+ Display *display; /* Display containing widget. Used, among
* other things, so that resources can be
* freed even after tkwin has gone away. */
Tcl_Interp *interp; /* Interpreter associated with scrollbar. */
Tcl_Command widgetCmd; /* Token for scrollbar's widget command. */
int vertical; /* Non-zero means vertical orientation
* requested, zero means horizontal. */
- int width; /* Desired narrow dimension of scrollbar,
- * in pixels. */
+ int width; /* Desired narrow dimension of scrollbar, in
+ * pixels. */
char *command; /* Command prefix to use when invoking
- * scrolling commands. NULL means don't
- * invoke commands. Malloc'ed. */
+ * scrolling commands. NULL means don't invoke
+ * commands. Malloc'ed. */
int commandSize; /* Number of non-NULL bytes in command. */
- int repeatDelay; /* How long to wait before auto-repeating
- * on scrolling actions (in ms). */
+ int repeatDelay; /* How long to wait before auto-repeating on
+ * scrolling actions (in ms). */
int repeatInterval; /* Interval between autorepeats (in ms). */
int jump; /* Value of -jump option. */
@@ -64,60 +63,58 @@ typedef struct TkScrollbar {
XColor *troughColorPtr; /* Color for drawing trough. */
int relief; /* Indicates whether window as a whole is
* raised, sunken, or flat. */
- int highlightWidth; /* Width in pixels of highlight to draw
- * around widget when it has the focus.
- * <= 0 means don't draw a highlight. */
+ int highlightWidth; /* Width in pixels of highlight to draw around
+ * widget when it has the focus. <= 0 means
+ * don't draw a highlight. */
XColor *highlightBgColorPtr;
- /* Color for drawing traversal highlight
- * area when highlight is off. */
+ /* Color for drawing traversal highlight area
+ * when highlight is off. */
XColor *highlightColorPtr; /* Color for drawing traversal highlight. */
int inset; /* Total width of all borders, including
* traversal highlight and 3-D border.
- * Indicates how much interior stuff must
- * be offset from outside edges to leave
- * room for borders. */
+ * Indicates how much interior stuff must be
+ * offset from outside edges to leave room for
+ * borders. */
int elementBorderWidth; /* Width of border to draw around elements
- * inside scrollbar (arrows and slider).
- * -1 means use borderWidth. */
+ * inside scrollbar (arrows and slider). -1
+ * means use borderWidth. */
int arrowLength; /* Length of arrows along long dimension of
* scrollbar, including space for a small gap
* between the arrow and the slider.
* Recomputed on window size changes. */
- int sliderFirst; /* Pixel coordinate of top or left edge
- * of slider area, including border. */
- int sliderLast; /* Coordinate of pixel just after bottom
- * or right edge of slider area, including
+ int sliderFirst; /* Pixel coordinate of top or left edge of
+ * slider area, including border. */
+ int sliderLast; /* Coordinate of pixel just after bottom or
+ * right edge of slider area, including
* border. */
int activeField; /* Names field to be displayed in active
- * colors, such as TOP_ARROW, or 0 for
- * no field. */
- int activeRelief; /* Value of -activeRelief option: relief
- * to use for active element. */
+ * colors, such as TOP_ARROW, or 0 for no
+ * field. */
+ int activeRelief; /* Value of -activeRelief option: relief to
+ * use for active element. */
/*
- * Information describing the application related to the scrollbar.
- * This information is provided by the application by invoking the
- * "set" widget command. This information can now be provided in
- * two ways: the "old" form (totalUnits, windowUnits, firstUnit,
- * and lastUnit), or the "new" form (firstFraction and lastFraction).
- * FirstFraction and lastFraction will always be valid, but
- * the old-style information is only valid if the NEW_STYLE_COMMANDS
- * flag is 0.
+ * Information describing the application related to the scrollbar. This
+ * information is provided by the application by invoking the "set" widget
+ * command. This information can now be provided in two ways: the "old"
+ * form (totalUnits, windowUnits, firstUnit, and lastUnit), or the "new"
+ * form (firstFraction and lastFraction). FirstFraction and lastFraction
+ * will always be valid, but the old-style information is only valid if
+ * the NEW_STYLE_COMMANDS flag is 0.
*/
- int totalUnits; /* Total dimension of application, in
- * units. Valid only if the NEW_STYLE_COMMANDS
- * flag isn't set. */
+ int totalUnits; /* Total dimension of application, in units.
+ * Valid only if the NEW_STYLE_COMMANDS flag
+ * isn't set. */
int windowUnits; /* Maximum number of units that can be
- * displayed in the window at once. Valid
- * only if the NEW_STYLE_COMMANDS flag isn't
- * set. */
+ * displayed in the window at once. Valid only
+ * if the NEW_STYLE_COMMANDS flag isn't set. */
int firstUnit; /* Number of last unit visible in
- * application's window. Valid only if the
+ * application's window. Valid only if the
* NEW_STYLE_COMMANDS flag isn't set. */
int lastUnit; /* Index of last unit visible in window.
- * Valid only if the NEW_STYLE_COMMANDS
- * flag isn't set. */
+ * Valid only if the NEW_STYLE_COMMANDS flag
+ * isn't set. */
double firstFraction; /* Position of first visible thing in window,
* specified as a fraction between 0 and
* 1.0. */
@@ -130,16 +127,16 @@ typedef struct TkScrollbar {
*/
Tk_Cursor cursor; /* Current cursor for window, or None. */
- char *takeFocus; /* Value of -takefocus option; not used in
- * the C code, but used by keyboard traversal
- * scripts. Malloc'ed, but may be NULL. */
- int flags; /* Various flags; see below for
+ char *takeFocus; /* Value of -takefocus option; not used in the
+ * C code, but used by keyboard traversal
+ * scripts. Malloc'ed, but may be NULL. */
+ int flags; /* Various flags; see below for
* definitions. */
} TkScrollbar;
/*
- * Legal values for "activeField" field of Scrollbar structures. These
- * are also the return values from the ScrollbarPosition procedure.
+ * Legal values for "activeField" field of Scrollbar structures. These are
+ * also the return values from the ScrollbarPosition function.
*/
#define OUTSIDE 0
@@ -151,14 +148,13 @@ typedef struct TkScrollbar {
/*
* Flag bits for scrollbars:
- *
- * REDRAW_PENDING: Non-zero means a DoWhenIdle handler
- * has already been queued to redraw
- * this window.
+ *
+ * REDRAW_PENDING: Non-zero means a DoWhenIdle handler has
+ * already been queued to redraw this window.
* NEW_STYLE_COMMANDS: Non-zero means the new style of commands
- * should be used to communicate with the
- * widget: ".t yview scroll 2 lines", instead
- * of ".t yview 40", for example.
+ * should be used to communicate with the widget:
+ * ".t yview scroll 2 lines", instead of
+ * ".t yview 40", for example.
* GOT_FOCUS: Non-zero means this window has the input
* focus.
*/
@@ -168,7 +164,7 @@ typedef struct TkScrollbar {
#define GOT_FOCUS 4
/*
- * Declaration of scrollbar class procedures structure.
+ * Declaration of scrollbar class functions structure.
*/
extern Tk_ClassProcs tkpScrollbarProcs;
@@ -180,25 +176,20 @@ extern Tk_ClassProcs tkpScrollbarProcs;
extern Tk_ConfigSpec tkpScrollbarConfigSpecs[];
/*
- * Declaration of procedures used in the implementation of the scrollbar
- * widget.
+ * Declaration of functions used in the implementation of the scrollbar
+ * widget.
*/
-EXTERN void TkScrollbarEventProc _ANSI_ARGS_((
- ClientData clientData, XEvent *eventPtr));
-EXTERN void TkScrollbarEventuallyRedraw _ANSI_ARGS_((
- TkScrollbar *scrollPtr));
-EXTERN void TkpComputeScrollbarGeometry _ANSI_ARGS_((
- TkScrollbar *scrollPtr));
-EXTERN TkScrollbar * TkpCreateScrollbar _ANSI_ARGS_((Tk_Window tkwin));
-EXTERN void TkpDestroyScrollbar _ANSI_ARGS_((
- TkScrollbar *scrollPtr));
-EXTERN void TkpDisplayScrollbar _ANSI_ARGS_((
- ClientData clientData));
-EXTERN void TkpConfigureScrollbar _ANSI_ARGS_((
- TkScrollbar *scrollPtr));
-EXTERN int TkpScrollbarPosition _ANSI_ARGS_((
- TkScrollbar *scrollPtr, int x, int y));
+EXTERN void TkScrollbarEventProc(ClientData clientData,
+ XEvent *eventPtr);
+EXTERN void TkScrollbarEventuallyRedraw(TkScrollbar *scrollPtr);
+EXTERN void TkpComputeScrollbarGeometry(TkScrollbar *scrollPtr);
+EXTERN TkScrollbar * TkpCreateScrollbar(Tk_Window tkwin);
+EXTERN void TkpDestroyScrollbar(TkScrollbar *scrollPtr);
+EXTERN void TkpDisplayScrollbar(ClientData clientData);
+EXTERN void TkpConfigureScrollbar(TkScrollbar *scrollPtr);
+EXTERN int TkpScrollbarPosition(TkScrollbar *scrollPtr,
+ int x, int y);
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLIMPORT