summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-14 16:48:48 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-14 16:48:48 +0000
commit384ac455a6cd5d23dfa24f9939f3ec04f1e5de46 (patch)
treecaf2569ba305a1d32fed698546a300d6bb22a6a3 /include
parent81ad93fde745d556aaa3880deabf3674bb3db49e (diff)
downloadxorg-lib-libXaw-384ac455a6cd5d23dfa24f9939f3ec04f1e5de46.tar.gz
Diffstat (limited to 'include')
-rw-r--r--include/X11/Xaw/AsciiSink.h16
-rw-r--r--include/X11/Xaw/AsciiSinkP.h40
-rw-r--r--include/X11/Xaw/AsciiSrc.h132
-rw-r--r--include/X11/Xaw/AsciiSrcP.h99
-rw-r--r--include/X11/Xaw/AsciiText.h33
-rw-r--r--include/X11/Xaw/AsciiTextP.h61
-rw-r--r--include/X11/Xaw/Box.h27
-rw-r--r--include/X11/Xaw/BoxP.h36
-rw-r--r--include/X11/Xaw/Command.h2
-rw-r--r--include/X11/Xaw/CommandP.h64
-rw-r--r--include/X11/Xaw/Dialog.h35
-rw-r--r--include/X11/Xaw/DialogP.h29
-rw-r--r--include/X11/Xaw/Form.h56
-rw-r--r--include/X11/Xaw/FormP.h80
-rw-r--r--include/X11/Xaw/Grip.h17
-rw-r--r--include/X11/Xaw/GripP.h41
-rw-r--r--include/X11/Xaw/Label.h17
-rw-r--r--include/X11/Xaw/LabelP.h29
-rw-r--r--include/X11/Xaw/List.h151
-rw-r--r--include/X11/Xaw/ListP.h91
-rw-r--r--include/X11/Xaw/MenuButtoP.h53
-rw-r--r--include/X11/Xaw/MenuButton.h2
-rw-r--r--include/X11/Xaw/MultiSink.h12
-rw-r--r--include/X11/Xaw/MultiSinkP.h71
-rw-r--r--include/X11/Xaw/MultiSrc.h45
-rw-r--r--include/X11/Xaw/MultiSrcP.h111
-rw-r--r--include/X11/Xaw/Paned.h159
-rw-r--r--include/X11/Xaw/PanedP.h84
-rw-r--r--include/X11/Xaw/Panner.h7
-rw-r--r--include/X11/Xaw/PannerP.h35
-rw-r--r--include/X11/Xaw/Porthole.h3
-rw-r--r--include/X11/Xaw/PortholeP.h24
-rw-r--r--include/X11/Xaw/Repeater.h5
-rw-r--r--include/X11/Xaw/RepeaterP.h31
-rw-r--r--include/X11/Xaw/Scrollbar.h28
-rw-r--r--include/X11/Xaw/ScrollbarP.h49
-rw-r--r--include/X11/Xaw/Simple.h26
-rw-r--r--include/X11/Xaw/SimpleMenP.h77
-rw-r--r--include/X11/Xaw/SimpleMenu.h102
-rw-r--r--include/X11/Xaw/SimpleP.h35
-rw-r--r--include/X11/Xaw/Sme.h17
-rw-r--r--include/X11/Xaw/SmeBSB.h14
-rw-r--r--include/X11/Xaw/SmeBSBP.h84
-rw-r--r--include/X11/Xaw/SmeLine.h17
-rw-r--r--include/X11/Xaw/SmeLineP.h63
-rw-r--r--include/X11/Xaw/SmeP.h62
-rw-r--r--include/X11/Xaw/StripCharP.h64
-rw-r--r--include/X11/Xaw/StripChart.h2
-rw-r--r--include/X11/Xaw/Template.c194
-rw-r--r--include/X11/Xaw/Template.h8
-rw-r--r--include/X11/Xaw/TemplateP.h9
-rw-r--r--include/X11/Xaw/Text.h358
-rw-r--r--include/X11/Xaw/TextP.h339
-rw-r--r--include/X11/Xaw/TextSink.h423
-rw-r--r--include/X11/Xaw/TextSinkP.h288
-rw-r--r--include/X11/Xaw/TextSrc.h320
-rw-r--r--include/X11/Xaw/TextSrcP.h241
-rw-r--r--include/X11/Xaw/Toggle.h123
-rw-r--r--include/X11/Xaw/ToggleP.h63
-rw-r--r--include/X11/Xaw/Tree.h24
-rw-r--r--include/X11/Xaw/TreeP.h12
-rw-r--r--include/X11/Xaw/VendorEP.h4
-rw-r--r--include/X11/Xaw/Viewport.h38
-rw-r--r--include/X11/Xaw/ViewportP.h34
-rw-r--r--include/X11/Xaw/XawImP.h188
-rw-r--r--include/X11/Xaw/XawInit.h21
66 files changed, 2735 insertions, 2290 deletions
diff --git a/include/X11/Xaw/AsciiSink.h b/include/X11/Xaw/AsciiSink.h
index d88288f..2f0a216 100644
--- a/include/X11/Xaw/AsciiSink.h
+++ b/include/X11/Xaw/AsciiSink.h
@@ -48,15 +48,14 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xaw/AsciiSink.h,v 1.6 2001/12/14 19:54:38 dawes Exp $ */
#ifndef _XawAsciiSink_h
#define _XawAsciiSink_h
-/***********************************************************************
- *
+/*
* AsciiSink Object
- *
- ***********************************************************************/
+ */
#include <X11/Xaw/TextSink.h>
@@ -75,16 +74,9 @@ SOFTWARE.
#define XtNecho "echo"
/* Class record constants */
-
extern WidgetClass asciiSinkObjectClass;
typedef struct _AsciiSinkClassRec *AsciiSinkObjectClass;
typedef struct _AsciiSinkRec *AsciiSinkObject;
-/************************************************************
- *
- * Public Functions.
- *
- ************************************************************/
-
-#endif /* _XawAsciiSrc_h */
+#endif /* _XawAsciiSink_h */
diff --git a/include/X11/Xaw/AsciiSinkP.h b/include/X11/Xaw/AsciiSinkP.h
index 02b9d39..7c19dd0 100644
--- a/include/X11/Xaw/AsciiSinkP.h
+++ b/include/X11/Xaw/AsciiSinkP.h
@@ -49,36 +49,23 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-
-/*
- * asciiSinkP.h - Private definitions for asciiSink object
- *
- */
+/* $XFree86: xc/lib/Xaw/AsciiSinkP.h,v 1.10 2001/12/14 19:54:38 dawes Exp $ */
#ifndef _XawAsciiSinkP_h
#define _XawAsciiSinkP_h
-/***********************************************************************
- *
+/*
* AsciiSink Object Private Data
- *
- ***********************************************************************/
-
+ */
#include <X11/Xaw/TextSinkP.h>
#include <X11/Xaw/AsciiSink.h>
-/************************************************************
- *
- * New fields for the AsciiSink object class record.
- *
- ************************************************************/
-
+/* New fields for the AsciiSink object class record */
typedef struct _AsciiSinkClassPart {
- int foo;
+ XtPointer extension;
} AsciiSinkClassPart;
/* Full class record declaration */
-
typedef struct _AsciiSinkClassRec {
ObjectClassPart object_class;
TextSinkClassPart text_sink_class;
@@ -89,24 +76,22 @@ extern AsciiSinkClassRec asciiSinkClassRec;
/* New fields for the AsciiSink object record */
typedef struct {
- /* public resources */
+ /* resources */
XFontStruct *font; /* Font to draw in. */
Boolean echo;
Boolean display_nonprinting;
- /* private state */
+ /* private */
GC normgc, invgc, xorgc;
- Pixmap insertCursorOn;
+ XawTextPosition cursor_position;
XawTextInsertState laststate;
short cursor_x, cursor_y; /* Cursor Location. */
+#ifndef OLDXAW
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} AsciiSinkPart;
-/****************************************************************
- *
- * Full instance record declaration
- *
- ****************************************************************/
-
+/* Full instance record declaration */
typedef struct _AsciiSinkRec {
ObjectPart object;
TextSinkPart text_sink;
@@ -114,4 +99,3 @@ typedef struct _AsciiSinkRec {
} AsciiSinkRec;
#endif /* _XawAsciiSinkP_h */
-
diff --git a/include/X11/Xaw/AsciiSrc.h b/include/X11/Xaw/AsciiSrc.h
index c174b01..289a8c1 100644
--- a/include/X11/Xaw/AsciiSrc.h
+++ b/include/X11/Xaw/AsciiSrc.h
@@ -25,6 +25,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xaw/AsciiSrc.h,v 1.8 2001/12/14 19:54:38 dawes Exp $ */
/*
@@ -51,7 +52,6 @@ in this Software without prior written authorization from The Open Group.
Name Class RepType Default Value
---- ----- ------- -------------
- callback Callback Callback (none)
dataCompression DataCompression Boolean True
length Length int (internal)
pieceSize PieceSize int BUFSIZ
@@ -61,24 +61,17 @@ in this Software without prior written authorization from The Open Group.
*/
-/* Class record constants */
-
extern WidgetClass asciiSrcObjectClass;
typedef struct _AsciiSrcClassRec *AsciiSrcObjectClass;
typedef struct _AsciiSrcRec *AsciiSrcObject;
-/*
- * Just to make people's lives a bit easier.
- */
-
#define AsciiSourceObjectClass AsciiSrcObjectClass
#define AsciiSourceObject AsciiSrcObject
/*
- * Resource Definitions.
+ * Resource Definitions
*/
-
#define XtCDataCompression "DataCompression"
#define XtCPieceSize "PieceSize"
#define XtCType "Type"
@@ -94,68 +87,89 @@ typedef struct _AsciiSrcRec *AsciiSrcObject;
#define XtEstring "string"
#define XtEfile "file"
-typedef enum {XawAsciiFile, XawAsciiString} XawAsciiType;
+typedef enum {
+ XawAsciiFile,
+ XawAsciiString
+} XawAsciiType;
-/************************************************************
- *
- * Public routines
- *
- ************************************************************/
+/*
+ * Public routines
+ */
_XFUNCPROTOBEGIN
-/* Function Name: XawAsciiSourceFreeString
- * Description: Frees the string returned by a get values call
- * on the string when the source is of type string.
- * Arguments: w - the AsciiSrc object.
- * Returns: none.
+/*
+ * Function:
+ * XawAsciiSourceFreeString
+ *
+ * Parameters:
+ * w - AsciiSrc object
+ *
+ * Description:
+ * Frees the string returned by a get values call
+ * on the string when the source is of type string.
*/
+void XawAsciiSourceFreeString
+(
+ Widget w
+ );
-extern void XawAsciiSourceFreeString(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
-);
-
-/* Function Name: XawAsciiSave
- * Description: Saves all the pieces into a file or string as required.
- * Arguments: w - the asciiSrc Object.
- * Returns: TRUE if the save was successful.
+/*
+ * Function:
+ * XawAsciiSave
+ *
+ * Arguments:
+ * w - asciiSrc Object.
+ *
+ * Description:
+ * Saves all the pieces into a file or string as required.
+ *
+ * Returns:
+ * True if the save was successful
*/
+Bool XawAsciiSave
+(
+ Widget w
+ );
-extern Boolean XawAsciiSave(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
-);
-
-/* Function Name: XawAsciiSaveAsFile
- * Description: Save the current buffer as a file.
- * Arguments: w - the asciiSrc object.
- * name - name of the file to save this file into.
- * Returns: True if the save was successful.
+/*
+ * Function:
+ * XawAsciiSaveAsFile
+ *
+ * Parameters:
+ * w - asciiSrc object
+ * name - name of the file to save this file into
+ *
+ * Description:
+ * Save the current buffer as a file.
+ *
+ * Returns:
+ * True if the save was successful
*/
+Bool XawAsciiSaveAsFile
+(
+ Widget w,
+ _Xconst char *name
+ );
-extern Boolean XawAsciiSaveAsFile(
-#if NeedFunctionPrototypes
- Widget /* w */,
- _Xconst char* /* name */
-#endif
-);
-
-/* Function Name: XawAsciiSourceChanged
- * Description: Returns true if the source has changed since last saved.
- * Arguments: w - the asciiSource object.
- * Returns: a Boolean (see description).
+/*
+ * Function:
+ * XawAsciiSourceChanged
+ *
+ * Parameters:
+ * w - asciiSource object
+ *
+ * Description:
+ * Returns true if the source has changed since last saved.
+ *
+ * Returns:
+ * a Boolean (see description)
*/
-
-extern Boolean XawAsciiSourceChanged(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
-);
+Bool XawAsciiSourceChanged
+(
+ Widget w
+ );
_XFUNCPROTOEND
#endif /* _XawAsciiSrc_h */
-
diff --git a/include/X11/Xaw/AsciiSrcP.h b/include/X11/Xaw/AsciiSrcP.h
index de69cf1..c12aba6 100644
--- a/include/X11/Xaw/AsciiSrcP.h
+++ b/include/X11/Xaw/AsciiSrcP.h
@@ -49,6 +49,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xaw/AsciiSrcP.h,v 1.9 2001/12/14 19:54:38 dawes Exp $ */
/*
* AsciiSrcP.h - Private Header for Ascii Text Source.
@@ -64,23 +65,12 @@ SOFTWARE.
* kit@expo.lcs.mit.edu
*/
-/*
- * TextSrcP.h - Private definitions for AsciiSrc object
- *
- */
-
#ifndef _XawAsciiSrcP_h
#define _XawAsciiSrcP_h
#include <X11/Xaw/TextSrcP.h>
#include <X11/Xaw/AsciiSrc.h>
-/************************************************************
- *
- * Private declarations.
- *
- ************************************************************/
-
#ifdef L_tmpnam
#define TMPSIZ L_tmpnam
#else
@@ -91,27 +81,19 @@ SOFTWARE.
#endif
#endif
-#define MAGIC_VALUE ((XawTextPosition) -1) /* Magic value. */
-
-#define streq(a, b) ( strcmp((a), (b)) == 0 )
-
typedef struct _Piece { /* Piece of the text file of BUFSIZ allocated
- characters. */
- char * text; /* The text in this buffer. */
- XawTextPosition used; /* The number of characters of this buffer
- that have been used. */
- struct _Piece *prev, *next; /* linked list pointers. */
+ characters */
+ char *text; /* The text in this buffer */
+ XawTextPosition used; /* The number of characters of this buffer
+ that have been used */
+ struct _Piece *prev, *next; /* linked list pointers */
} Piece;
-/************************************************************
- *
- * New fields for the AsciiSrc object class record.
- *
- ************************************************************/
-
-typedef struct _AsciiSrcClassPart { char foo; } AsciiSrcClassPart;
+typedef struct _AsciiSrcClassPart {
+ XtPointer extension;
+} AsciiSrcClassPart;
-/* Full class record declaration */
+/* Full class record */
typedef struct _AsciiSrcClassRec {
ObjectClassPart object_class;
TextSrcClassPart text_src_class;
@@ -120,47 +102,44 @@ typedef struct _AsciiSrcClassRec {
extern AsciiSrcClassRec asciiSrcClassRec;
-/* New fields for the AsciiSrc object record */
-
+/* New fields for the AsciiSrc object */
typedef struct _AsciiSrcPart {
-
- /* Resources. */
-
- char *string; /* either the string, or the
- file name, depending upon the type. */
- XawAsciiType type; /* either string or disk. */
- XawTextPosition piece_size; /* Size of text buffer for each piece. */
- Boolean data_compression; /* compress to minimum memory automatically
+ /* resources */
+ char *string; /* either the string, or the
+ file name, depending upon the type */
+ XawAsciiType type; /* either string or disk */
+ XawTextPosition piece_size; /* Size of text buffer for each piece */
+ Boolean data_compression; /* compress to minimum memory automatically
on save? */
- XtCallbackList callback; /* A callback list to call when the source is
- changed. */
- Boolean use_string_in_place; /* Use the string passed in place. */
- int ascii_length; /* length field for ascii string emulation. */
+#ifdef OLDXAW
+ XtCallbackList callback;
+#endif
+ Boolean use_string_in_place;/* Use the string passed in place */
+ int ascii_length; /* length field for ascii string emulation */
#ifdef ASCII_DISK
- String filename; /* name of file for Compatability. */
+ String filename; /* name of file for Compatability */
#endif /* ASCII_DISK */
-/* Private data. */
-
- Boolean is_tempfile; /* Is this a temporary file? */
- Boolean changes; /* Has this file been edited? */
- Boolean allocated_string; /* Have I allocated the
- string in ascii_src->string? */
- XawTextPosition length; /* length of file */
- Piece * first_piece; /* first piece of the text. */
+ /* private */
+ Boolean is_tempfile; /* Is this a temporary file? */
+#ifdef OLDXAW
+ Boolean changes;
+#endif
+ Boolean allocated_string; /* Have I allocated the
+ string in ascii_src->string? */
+ XawTextPosition length; /* length of file */
+ Piece *first_piece; /* first piece of the text */
+#ifndef OLDXAW
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} AsciiSrcPart;
-/****************************************************************
- *
- * Full instance record declaration
- *
- ****************************************************************/
-
+/* instance record */
typedef struct _AsciiSrcRec {
- ObjectPart object;
- TextSrcPart text_src;
- AsciiSrcPart ascii_src;
+ ObjectPart object;
+ TextSrcPart text_src;
+ AsciiSrcPart ascii_src;
} AsciiSrcRec;
#endif /* _XawAsciiSrcP_h */
diff --git a/include/X11/Xaw/AsciiText.h b/include/X11/Xaw/AsciiText.h
index 6f60c27..1df99cf 100644
--- a/include/X11/Xaw/AsciiText.h
+++ b/include/X11/Xaw/AsciiText.h
@@ -48,18 +48,13 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-
-/***********************************************************************
- *
- * AsciiText Widget
- *
- ***********************************************************************/
+/* $XFree86: xc/lib/Xaw/AsciiText.h,v 1.6 2001/12/14 19:54:39 dawes Exp $ */
/*
- * AsciiText.c - Public header file for AsciiText Widget.
+ * AsciiText.h - Public header file for AsciiText Widget
*
* This Widget is intended to be used as a simple front end to the
- * text widget with an ascii source and ascii sink attached to it.
+ * text widget with an ascii source and ascii sink attached to it
*
* Date: June 29, 1989
*
@@ -67,17 +62,10 @@ SOFTWARE.
* MIT X Consortium
* kit@expo.lcs.mit.edu
*/
-
#ifndef _AsciiText_h
#define _AsciiText_h
-/****************************************************************
- *
- * AsciiText widgets
- *
- ****************************************************************/
-
-#include <X11/Xaw/Text.h> /* AsciiText is a subclass of Text */
+#include <X11/Xaw/Text.h>
#include <X11/Xaw/AsciiSrc.h>
#include <X11/Xaw/MultiSrc.h>
@@ -121,21 +109,14 @@ SOFTWARE.
(see also *Src.h and *Sink.h)
*/
-/*
- * Everything else we need is in StringDefs.h or Text.h
- */
-
typedef struct _AsciiTextClassRec *AsciiTextWidgetClass;
typedef struct _AsciiRec *AsciiWidget;
extern WidgetClass asciiTextWidgetClass;
-/************************************************************
- *
- * Disk and String Emulation Info.
- *
- ************************************************************/
-
+/*
+ * Disk and String Emulation Info
+ */
#ifdef ASCII_STRING
extern WidgetClass asciiStringWidgetClass;
#endif
diff --git a/include/X11/Xaw/AsciiTextP.h b/include/X11/Xaw/AsciiTextP.h
index a525d67..68907e1 100644
--- a/include/X11/Xaw/AsciiTextP.h
+++ b/include/X11/Xaw/AsciiTextP.h
@@ -48,12 +48,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-
-/***********************************************************************
- *
- * AsciiText Widget
- *
- ***********************************************************************/
+/* $XFree86: xc/lib/Xaw/AsciiTextP.h,v 1.9 2001/12/14 19:54:39 dawes Exp $ */
/*
* AsciiText.c - Private header file for AsciiText Widget.
@@ -76,7 +71,9 @@ SOFTWARE.
#include <X11/Xaw/AsciiSrc.h>
#include <X11/Xaw/MultiSrc.h>
-typedef struct {int empty;} AsciiClassPart;
+typedef struct {
+ XtPointer extension;
+} AsciiClassPart;
typedef struct _AsciiTextClassRec {
CoreClassPart core_class;
@@ -87,7 +84,12 @@ typedef struct _AsciiTextClassRec {
extern AsciiTextClassRec asciiTextClassRec;
-typedef struct { char foo; /* keep compiler happy. */ } AsciiPart;
+typedef struct {
+ int resource;
+#ifndef OLDXAW
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
+} AsciiPart;
typedef struct _AsciiRec {
CorePart core;
@@ -96,15 +98,13 @@ typedef struct _AsciiRec {
AsciiPart ascii;
} AsciiRec;
-/************************************************************
- *
- * Ascii String Emulation widget.
- *
- ************************************************************/
-
+/*
+ * Ascii String Emulation widget
+ */
#ifdef ASCII_STRING
-
-typedef struct {int empty;} AsciiStringClassPart;
+typedef struct {
+ XtPointer extension;
+} AsciiStringClassPart;
typedef struct _AsciiStringClassRec {
CoreClassPart core_class;
@@ -116,7 +116,12 @@ typedef struct _AsciiStringClassRec {
extern AsciiStringClassRec asciiStringClassRec;
-typedef struct { char foo; /* keep compiler happy. */ } AsciiStringPart;
+typedef struct {
+ int resource;
+#ifndef OLDXAW
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
+} AsciiStringPart;
typedef struct _AsciiStringRec {
CorePart core;
@@ -125,18 +130,15 @@ typedef struct _AsciiStringRec {
AsciiPart ascii;
AsciiStringPart ascii_str;
} AsciiStringRec;
-
#endif /* ASCII_STRING */
#ifdef ASCII_DISK
-
-/************************************************************
- *
- * Ascii Disk Emulation widget.
- *
- ************************************************************/
-
-typedef struct {int empty;} AsciiDiskClassPart;
+/*
+ * Ascii Disk Emulation widget
+ */
+typedef struct {
+ XtPointer extension;
+} AsciiDiskClassPart;
typedef struct _AsciiDiskClassRec {
CoreClassPart core_class;
@@ -148,7 +150,12 @@ typedef struct _AsciiDiskClassRec {
extern AsciiDiskClassRec asciiDiskClassRec;
-typedef struct { char foo; /* keep compiler happy. */ } AsciiDiskPart;
+typedef struct {
+ char resource;
+#ifndef OLDXAW
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
+} AsciiDiskPart;
typedef struct _AsciiDiskRec {
CorePart core;
diff --git a/include/X11/Xaw/Box.h b/include/X11/Xaw/Box.h
index d265feb..7ea8815 100644
--- a/include/X11/Xaw/Box.h
+++ b/include/X11/Xaw/Box.h
@@ -49,19 +49,18 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xaw/Box.h,v 1.8 2001/12/14 19:54:39 dawes Exp $ */
#ifndef _XawBox_h
#define _XawBox_h
#include <X11/Xmu/Converters.h>
-/***********************************************************************
- *
+/*
* Box Widget (subclass of CompositeClass)
- *
- ***********************************************************************/
+ */
-/* Parameters:
+/* Resources:
Name Class RepType Default Value
---- ----- ------- -------------
@@ -69,6 +68,7 @@ SOFTWARE.
border BorderColor Pixel XtDefaultForeground
borderWidth BorderWidth Dimension 1
destroyCallback Callback Pointer NULL
+ displayList DisplayList XawDisplayList* NULL
hSpace HSpace Dimension 4
height Height Dimension 0
mappedWhenManaged MappedWhenManaged Boolean True
@@ -80,15 +80,26 @@ SOFTWARE.
*/
-
-/* New fields */
#ifndef _XtStringDefs_h_
#define XtNhSpace "hSpace"
#define XtNvSpace "vSpace"
#endif
-/* Class record constants */
+#ifndef OLDXAW
+#ifndef XawNdisplayList
+#define XawNdisplayList "displayList"
+#endif
+
+#ifndef XawCDisplayList
+#define XawCDisplayList "DisplayList"
+#endif
+
+#ifndef XawRDisplayList
+#define XawRDisplayList "XawDisplayList"
+#endif
+#endif /* OLDXAW */
+/* Class record constants */
extern WidgetClass boxWidgetClass;
typedef struct _BoxClassRec *BoxWidgetClass;
diff --git a/include/X11/Xaw/BoxP.h b/include/X11/Xaw/BoxP.h
index ecd7b35..bc1607e 100644
--- a/include/X11/Xaw/BoxP.h
+++ b/include/X11/Xaw/BoxP.h
@@ -49,26 +49,22 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-
-/*
- * BoxP.h - Private definitions for Box widget
- *
- */
+/* $XFree86: xc/lib/Xaw/BoxP.h,v 1.11 2001/12/14 19:54:39 dawes Exp $ */
#ifndef _XawBoxP_h
#define _XawBoxP_h
-/***********************************************************************
- *
+/*
* Box Widget Private Data
- *
- ***********************************************************************/
-
+ */
#include <X11/Xaw/Box.h>
#include <X11/Xmu/Converters.h>
+#include <X11/Xaw/XawInit.h>
/* New fields for the Box widget class record */
-typedef struct {int empty;} BoxClassPart;
+typedef struct {
+ XtPointer extension;
+} BoxClassPart;
/* Full class record declaration */
typedef struct _BoxClassRec {
@@ -82,22 +78,22 @@ extern BoxClassRec boxClassRec;
/* New fields for the Box widget record */
typedef struct {
/* resources */
- Dimension h_space, v_space;
+ Dimension h_space, v_space;
XtOrientation orientation;
/* private state */
- Dimension preferred_width, preferred_height;
- Dimension last_query_width, last_query_height;
+ Dimension preferred_width, preferred_height;
+ Dimension last_query_width, last_query_height;
XtGeometryMask last_query_mode;
+#ifndef OLDXAW
+ XawDisplayList *display_list;
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} BoxPart;
-
-/****************************************************************
- *
+/*
* Full instance record declaration
- *
- ****************************************************************/
-
+ */
typedef struct _BoxRec {
CorePart core;
CompositePart composite;
diff --git a/include/X11/Xaw/Command.h b/include/X11/Xaw/Command.h
index a9738d2..95f98df 100644
--- a/include/X11/Xaw/Command.h
+++ b/include/X11/Xaw/Command.h
@@ -46,6 +46,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xaw/Command.h,v 1.6 2001/12/14 19:54:39 dawes Exp $ */
#ifndef _XawCommand_h
#define _XawCommand_h
@@ -71,6 +72,7 @@ SOFTWARE.
cursorName Cursor String NULL
depth Depth int parent's depth
destroyCallback Callback XtCallbackList NULL
+ displayList DisplayList XawDisplayList* NULL
encoding Encoding UnsignedChar XawTextEncoding8bit
font Font XFontStruct* XtDefaultFont
foreground Foreground Pixel XtDefaultForeground
diff --git a/include/X11/Xaw/CommandP.h b/include/X11/Xaw/CommandP.h
index 4c4db90..541281c 100644
--- a/include/X11/Xaw/CommandP.h
+++ b/include/X11/Xaw/CommandP.h
@@ -49,47 +49,32 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-
-/*
- * CommandP.h - Private definitions for Command widget
- *
- */
+/* $XFree86: xc/lib/Xaw/CommandP.h,v 1.8 2001/12/14 19:54:39 dawes Exp $ */
#ifndef _XawCommandP_h
#define _XawCommandP_h
+/*
+ * Command Widget Private Data
+ */
#include <X11/Xaw/Command.h>
#include <X11/Xaw/LabelP.h>
-/***********************************************************************
- *
- * Command Widget Private Data
- *
- ***********************************************************************/
-
typedef enum {
- HighlightNone, /* Do not highlight. */
- HighlightWhenUnset, /* Highlight only when unset, this is
+ HighlightNone, /* Do not highlight */
+ HighlightWhenUnset, /* Highlight only when unset, this is
to preserve current command widget
- functionality. */
- HighlightAlways /* Always highlight, lets the toggle widget
- and other subclasses do the right thing. */
+ functionality */
+ HighlightAlways /* Always highlight, lets the toggle widget
+ and other subclasses do the right thing */
} XtCommandHighlight;
-/************************************
- *
- * Class structure
- *
- ***********************************/
-
-
- /* New fields for the Command widget class record */
-typedef struct _CommandClass
- {
- int makes_compiler_happy; /* not used */
- } CommandClassPart;
+/* New fields for the Command widget class record */
+typedef struct _CommandClass {
+ XtPointer extension;
+} CommandClassPart;
- /* Full class record declaration */
+/* Full class record declaration */
typedef struct _CommandClassRec {
CoreClassPart core_class;
SimpleClassPart simple_class;
@@ -99,13 +84,7 @@ typedef struct _CommandClassRec {
extern CommandClassRec commandClassRec;
-/***************************************
- *
- * Instance (widget) structure
- *
- **************************************/
-
- /* New fields for the Command widget record */
+/* New fields for the Command widget record */
typedef struct {
/* resources */
Dimension highlight_thickness;
@@ -117,16 +96,17 @@ typedef struct {
GC inverse_GC;
Boolean set;
XtCommandHighlight highlighted;
+
/* more resources */
int shape_style;
Dimension corner_round;
-} CommandPart;
-
-
-/* XtEventsPtr eventTable;*/
+#ifndef OLDXAW
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
+} CommandPart;
- /* Full widget declaration */
+/* Full widget declaration */
typedef struct _CommandRec {
CorePart core;
SimplePart simple;
@@ -135,5 +115,3 @@ typedef struct _CommandRec {
} CommandRec;
#endif /* _XawCommandP_h */
-
-
diff --git a/include/X11/Xaw/Dialog.h b/include/X11/Xaw/Dialog.h
index 2000702..5ad325a 100644
--- a/include/X11/Xaw/Dialog.h
+++ b/include/X11/Xaw/Dialog.h
@@ -46,24 +46,19 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xaw/Dialog.h,v 1.6 2001/12/14 19:54:39 dawes Exp $ */
#ifndef _XawDialog_h
#define _XawDialog_h
#include <X11/Xaw/Form.h>
-/***********************************************************************
- *
- * Dialog Widget
- *
- ***********************************************************************/
-
-/* Parameters:
+/* Resources:
Name Class RepType Default Value
---- ----- ------- -------------
background Background Pixel XtDefaultBackground
- border BorderColor Pixel XtDefaultForeground
+ borderColor BorderColor Pixel XtDefaultForeground
borderWidth BorderWidth Dimension 1
destroyCallback Callback Pointer NULL
height Height Dimension computed at create
@@ -88,19 +83,17 @@ extern WidgetClass dialogWidgetClass;
_XFUNCPROTOBEGIN
-extern void XawDialogAddButton(
-#if NeedFunctionPrototypes
- Widget /* dialog */,
- _Xconst char* /* name */,
- XtCallbackProc /* function */,
- XtPointer /* client_data */
-#endif
-);
-
-extern char *XawDialogGetValueString(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
+void XawDialogAddButton
+(
+ Widget dialog,
+ _Xconst char *name,
+ XtCallbackProc function,
+ XtPointer client_data
+ );
+
+char *XawDialogGetValueString
+(
+ Widget w
);
_XFUNCPROTOEND
diff --git a/include/X11/Xaw/DialogP.h b/include/X11/Xaw/DialogP.h
index e230f90..43e0425 100644
--- a/include/X11/Xaw/DialogP.h
+++ b/include/X11/Xaw/DialogP.h
@@ -47,8 +47,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-
-/* Private definitions for Dialog widget */
+/* $XFree86: xc/lib/Xaw/DialogP.h,v 1.9 2001/12/14 19:54:39 dawes Exp $ */
#ifndef _DialogP_h
#define _DialogP_h
@@ -56,7 +55,9 @@ SOFTWARE.
#include <X11/Xaw/Dialog.h>
#include <X11/Xaw/FormP.h>
-typedef struct {int empty;} DialogClassPart;
+typedef struct {
+ XtPointer extension;
+} DialogClassPart;
typedef struct _DialogClassRec {
CoreClassPart core_class;
@@ -70,13 +71,17 @@ extern DialogClassRec dialogClassRec;
typedef struct _DialogPart {
/* resources */
- String label; /* description of the dialog */
- String value; /* for the user response */
- Pixmap icon; /* icon bitmap */
- /* private data */
- Widget iconW; /* widget to display the icon */
- Widget labelW; /* widget to display description*/
- Widget valueW; /* user response TextWidget */
+ String label; /* description of the dialog */
+ String value; /* for the user response */
+ Pixmap icon; /* icon bitmap */
+
+ /* private */
+ Widget iconW; /* widget to display the icon */
+ Widget labelW; /* widget to display description */
+ Widget valueW; /* user response TextWidget */
+#ifndef OLDXAW
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} DialogPart;
typedef struct _DialogRec {
@@ -87,7 +92,9 @@ typedef struct _DialogRec {
DialogPart dialog;
} DialogRec;
-typedef struct {int empty;} DialogConstraintsPart;
+typedef struct {
+ XtPointer extension;
+} DialogConstraintsPart;
typedef struct _DialogConstraintsRec {
FormConstraintsPart form;
diff --git a/include/X11/Xaw/Form.h b/include/X11/Xaw/Form.h
index d12ed0b..e8aaeb9 100644
--- a/include/X11/Xaw/Form.h
+++ b/include/X11/Xaw/Form.h
@@ -47,19 +47,14 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xaw/Form.h,v 1.9 2001/12/14 19:54:40 dawes Exp $ */
#ifndef _XawForm_h
#define _XawForm_h
#include <X11/Intrinsic.h>
-/***********************************************************************
- *
- * Form Widget
- *
- ***********************************************************************/
-
-/* Parameters:
+/* Resources:
Name Class RepType Default Value
---- ----- ------- -------------
@@ -68,6 +63,7 @@ SOFTWARE.
borderWidth BorderWidth Dimension 1
defaultDistance Thickness int 4
destroyCallback Callback Pointer NULL
+ displayList DisplayList XawDisplayList* NULL
height Height Dimension computed at realize
mappedWhenManaged MappedWhenManaged Boolean True
sensitive Sensitive Boolean True
@@ -112,8 +108,6 @@ SOFTWARE.
#define XtCEdge "Edge"
#define XtCWidget "Widget"
-#ifndef _XawEdgeType_e
-#define _XawEdgeType_e
typedef enum {
XawChainTop, /* Keep this edge a constant distance from
the top of the form */
@@ -124,17 +118,8 @@ typedef enum {
XawChainRight, /* Keep this edge a constant distance from
the right of the form */
XawRubber /* Keep this edge a proportional distance
- from the edges of the form*/
+ from the edges of the form */
} XawEdgeType;
-#endif /* _XawEdgeType_e */
-
-/*
- * Unfortunatly I missed this definition for R4, so I cannot
- * protect it with XAW_BC, it looks like this particular problem is
- * one that we will have to live with for a while.
- *
- * Chris D. Peterson - 3/23/90.
- */
#define XtEdgeType XawEdgeType
@@ -144,6 +129,26 @@ typedef enum {
#define XtChainRight XawChainRight
#define XtRubber XawRubber
+#define XtEchainLeft "chainLeft"
+#define XtEchainRight "chainRight"
+#define XtEchainTop "chainTop"
+#define XtEchainBottom "chainBottom"
+#define XtErubber "rubber"
+
+#ifndef OLDXAW
+#ifndef XawNdisplayList
+#define XawNdisplayList "displayList"
+#endif
+
+#ifndef XawCDisplayList
+#define XawCDisplayList "DisplayList"
+#endif
+
+#ifndef XawRDisplayList
+#define XawRDisplayList "XawDisplayList"
+#endif
+#endif
+
typedef struct _FormClassRec *FormWidgetClass;
typedef struct _FormRec *FormWidget;
@@ -151,16 +156,15 @@ extern WidgetClass formWidgetClass;
_XFUNCPROTOBEGIN
-extern void XawFormDoLayout(
-#if NeedFunctionPrototypes
- Widget /* w */,
+void XawFormDoLayout
+(
+ Widget w,
#if NeedWidePrototypes
- /* Boolean */ int /* do_layout */
+ Bool do_layout
#else
- Boolean /* do_layout */
-#endif
+ Boolean do_layout
#endif
-);
+ );
_XFUNCPROTOEND
diff --git a/include/X11/Xaw/FormP.h b/include/X11/Xaw/FormP.h
index b2456c0..f77843f 100644
--- a/include/X11/Xaw/FormP.h
+++ b/include/X11/Xaw/FormP.h
@@ -46,35 +46,38 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xaw/FormP.h,v 1.14 2001/12/19 21:37:30 dawes Exp $ */
/* Form widget private definitions */
#ifndef _XawFormP_h
#define _XawFormP_h
+#include <X11/Xfuncproto.h>
+
#include <X11/Xaw/Form.h>
+#include <X11/Xaw/XawInit.h>
+
+_XFUNCPROTOBEGIN
#define XtREdgeType "EdgeType"
-typedef enum {LayoutPending, LayoutInProgress, LayoutDone} LayoutState;
-#define XtInheritLayout ((Boolean (*)())_XtInherit)
+typedef enum {
+ LayoutPending,
+ LayoutInProgress,
+ LayoutDone
+} LayoutState;
+
+#define XtInheritLayout \
+((Boolean (*)(FormWidget, unsigned int, unsigned int, Bool))_XtInherit)
typedef struct {
- Boolean (*layout)(/* FormWidget, Dimension, Dimension */);
+ Boolean(*layout)(FormWidget, unsigned int, unsigned int, Bool);
+#ifndef OLDXAW
+ XtPointer extension;
+#endif
} FormClassPart;
-/*
- * Layout(
- * FormWidget w - the widget whose children are to be configured
- * Dimension w, h - bounding box of layout to be calculated
- *
- * Stores preferred geometry in w->form.preferred_{width,height}.
- * If w->form.resize_in_layout is True, then a geometry request
- * may be made for the preferred bounding box if necessary.
- *
- * Returns True if a geometry request was granted, False otherwise.
- */
-
typedef struct _FormClassRec {
CoreClassPart core_class;
CompositeClassPart composite_class;
@@ -87,13 +90,18 @@ extern FormClassRec formClassRec;
typedef struct _FormPart {
/* resources */
int default_spacing; /* default distance between children */
- /* private state */
- Dimension old_width, old_height; /* last known dimensions */
+
+ /* private */
+ Dimension old_width, old_height; /* reference value for *_virtual */
int no_refigure; /* no re-layout while > 0 */
Boolean needs_relayout; /* next time no_refigure == 0 */
Boolean resize_in_layout; /* should layout() do geom request? */
Dimension preferred_width, preferred_height; /* cached from layout */
- Boolean resize_is_no_op; /* Causes resize to take not action. */
+ Boolean resize_is_no_op; /* Causes resize to take not action */
+#ifndef OLDXAW
+ XawDisplayList *display_list;
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} FormPart;
typedef struct _FormRec {
@@ -104,39 +112,31 @@ typedef struct _FormRec {
} FormRec;
typedef struct _FormConstraintsPart {
-/*
- * Constraint Resources.
- */
- XtEdgeType top, bottom, /* where to drag edge on resize */
- left, right;
+ /* resources */
+ XtEdgeType top, bottom, left, right;/* where to drag edge on resize */
int dx; /* desired horiz offset */
int dy; /* desired vertical offset */
Widget horiz_base; /* measure dx from here if non-null */
Widget vert_base; /* measure dy from here if non-null */
- Boolean allow_resize; /* TRUE if child may request resize */
+ Boolean allow_resize; /* True if child may request resize */
-/*
- * Private contstraint resources.
- */
-
-/*
- * What the size of this child would be if we did not impose the
- * constraint the width and height must be greater than zero (0).
- */
+ /* private */
short virtual_width, virtual_height;
-
-/*
- * Temporary Storage for children's new possible possition.
- */
-
- Position new_x, new_y;
-
+ Position new_x, new_y;
LayoutState layout_state; /* temporary layout state */
- Boolean deferred_resize; /* was resized while no_refigure is set */
+ Boolean deferred_resize;/* was resized while no_refigure is set */
+#ifndef OLDXAW
+ short virtual_x, virtual_y;
+ XtPointer pad[2]; /* leave some space for further optimizations
+ * in the form widget geometry
+ */
+#endif
} FormConstraintsPart;
typedef struct _FormConstraintsRec {
FormConstraintsPart form;
} FormConstraintsRec, *FormConstraints;
+_XFUNCPROTOEND
+
#endif /* _XawFormP_h */
diff --git a/include/X11/Xaw/Grip.h b/include/X11/Xaw/Grip.h
index fdf751f..4f08213 100644
--- a/include/X11/Xaw/Grip.h
+++ b/include/X11/Xaw/Grip.h
@@ -46,6 +46,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xaw/Grip.h,v 1.7 2001/12/14 19:54:40 dawes Exp $ */
/*
* Grip.h - Public Definitions for Grip widget (used by VPane Widget)
@@ -57,13 +58,7 @@ SOFTWARE.
#include <X11/Xaw/Simple.h>
-/***************************************************************************
- *
- * Grip Widget
- *
- **************************************************************************/
-
-/* Parameters:
+/* Resources:
Name Class RepType Default Value
---- ----- ------- -------------
@@ -88,11 +83,11 @@ SOFTWARE.
#define XtNgripTranslations "gripTranslations"
typedef struct _XawGripCallData {
- XEvent *event; /* the event causing the GripAction */
- String *params; /* the TranslationTable params */
- Cardinal num_params; /* count of params */
+ XEvent *event; /* the event causing the GripAction */
+ String *params; /* the TranslationTable params */
+ Cardinal num_params; /* count of params */
} XawGripCallDataRec, *XawGripCallData,
- GripCallDataRec, *GripCallData; /* supported for R4 compatibility */
+ GripCallDataRec, *GripCallData; /* supported for R4 compatibility */
/* Class Record Constant */
diff --git a/include/X11/Xaw/GripP.h b/include/X11/Xaw/GripP.h
index 4e89917..21cc845 100644
--- a/include/X11/Xaw/GripP.h
+++ b/include/X11/Xaw/GripP.h
@@ -49,11 +49,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-
-/*
- * GripP.h - Private definitions for Grip widget (Used by VPane Widget)
- *
- */
+/* $XFree86: xc/lib/Xaw/GripP.h,v 1.8 2001/12/14 19:54:40 dawes Exp $ */
#ifndef _XawGripP_h
#define _XawGripP_h
@@ -61,18 +57,14 @@ SOFTWARE.
#include <X11/Xaw/Grip.h>
#include <X11/Xaw/SimpleP.h>
-/*****************************************************************************
- *
- * Grip Widget Private Data
- *
- *****************************************************************************/
-
#define DEFAULT_GRIP_SIZE 8
-/* New fields for the Grip widget class record */
-typedef struct {int empty;} GripClassPart;
+/* New fields for the Grip widget class */
+typedef struct {
+ XtPointer extension;
+} GripClassPart;
-/* Full Class record declaration */
+/* Full Class record */
typedef struct _GripClassRec {
CoreClassPart core_class;
SimpleClassPart simple_class;
@@ -81,22 +73,19 @@ typedef struct _GripClassRec {
extern GripClassRec gripClassRec;
-/* New fields for the Grip widget record */
+/* New fields for the Grip widget */
typedef struct {
- XtCallbackList grip_action;
+ XtCallbackList grip_action;
+#ifndef OLDXAW
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} GripPart;
-/*****************************************************************************
- *
- * Full instance record declaration
- *
- ****************************************************************************/
-
+/* Full instance record */
typedef struct _GripRec {
- CorePart core;
- SimplePart simple;
- GripPart grip;
+ CorePart core;
+ SimplePart simple;
+ GripPart grip;
} GripRec;
#endif /* _XawGripP_h */
-
diff --git a/include/X11/Xaw/Label.h b/include/X11/Xaw/Label.h
index 03696ae..f0a2be0 100644
--- a/include/X11/Xaw/Label.h
+++ b/include/X11/Xaw/Label.h
@@ -46,15 +46,14 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xaw/Label.h,v 1.7 2001/12/14 19:54:40 dawes Exp $ */
#ifndef _XawLabel_h
#define _XawLabel_h
-/***********************************************************************
- *
+/*
* Label Widget
- *
- ***********************************************************************/
+ */
#include <X11/Xaw/Simple.h>
@@ -69,7 +68,7 @@ SOFTWARE.
cursor Cursor Cursor None
cursorName Cursor String NULL
destroyCallback Callback XtCallbackList NULL
- encoding Encoding unsigned char XawTextEncoding8bit
+ encoding Encoding UnsignedChar XawTextEncoding8bit
font Font XFontStruct* XtDefaultFont
foreground Foreground Pixel XtDefaultForeground
height Height Dimension text height
@@ -118,6 +117,14 @@ SOFTWARE.
#define XtCBitmap "Bitmap"
#endif
+#ifndef XtNlabelX
+#define XtNlabelX "labelX"
+#endif
+
+#ifndef XtNlabelY
+#define XtNlabelY "labelY"
+#endif
+
/* Class record constants */
extern WidgetClass labelWidgetClass;
diff --git a/include/X11/Xaw/LabelP.h b/include/X11/Xaw/LabelP.h
index 384c55e..41a9bd0 100644
--- a/include/X11/Xaw/LabelP.h
+++ b/include/X11/Xaw/LabelP.h
@@ -49,27 +49,21 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-
-/*
- * LabelP.h - Private definitions for Label widget
- *
- */
+/* $XFree86: xc/lib/Xaw/LabelP.h,v 1.8 2001/12/14 19:54:40 dawes Exp $ */
#ifndef _XawLabelP_h
#define _XawLabelP_h
-/***********************************************************************
- *
+/*
* Label Widget Private Data
- *
- ***********************************************************************/
-
+ */
#include <X11/Xaw/Label.h>
#include <X11/Xaw/SimpleP.h>
/* New fields for the Label widget class record */
-
-typedef struct {int foo;} LabelClassPart;
+typedef struct {
+ XtPointer extension;
+} LabelClassPart;
/* Full class record declaration */
typedef struct _LabelClassRec {
@@ -106,15 +100,14 @@ typedef struct {
Dimension label_len;
int lbm_y; /* where in label */
unsigned int lbm_width, lbm_height; /* size of pixmap */
+#ifndef OLDXAW
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} LabelPart;
-
-/****************************************************************
- *
+/*
* Full instance record declaration
- *
- ****************************************************************/
-
+ */
typedef struct _LabelRec {
CorePart core;
SimplePart simple;
diff --git a/include/X11/Xaw/List.h b/include/X11/Xaw/List.h
index e40e1a5..b693411 100644
--- a/include/X11/Xaw/List.h
+++ b/include/X11/Xaw/List.h
@@ -23,6 +23,7 @@ Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xaw/List.h,v 1.8 2001/12/14 19:54:40 dawes Exp $ */
/* This is the List widget, it is useful to display a list, without the
* overhead of having a widget for each item in the list. It allows
@@ -37,12 +38,6 @@ in this Software without prior written authorization from The Open Group.
#ifndef _XawList_h
#define _XawList_h
-/***********************************************************************
- *
- * List Widget
- *
- ***********************************************************************/
-
#include <X11/Xaw/Simple.h>
/* Resources:
@@ -50,7 +45,7 @@ in this Software without prior written authorization from The Open Group.
Name Class RepType Default Value
---- ----- ------- -------------
background Background Pixel XtDefaultBackground
- border BorderColor Pixel XtDefaultForeground
+ borderColor BorderColor Pixel XtDefaultForeground
borderWidth BorderWidth Dimension 1
callback Callback XtCallbackList NULL **6
columnSpacing Spacing Dimension 6
@@ -65,7 +60,7 @@ in this Software without prior written authorization from The Open Group.
insensitiveBorder Insensitive Pixmap Gray
internalHeight Height Dimension 2
internalWidth Width Dimension 4
- list List String * NULL **2
+ list List String* NULL **2
longest Longest int 0 **3 **4
mappedWhenManaged MappedWhenManaged Boolean True
numberStrings NumberStrings int 0 **4
@@ -110,11 +105,9 @@ in this Software without prior written authorization from The Open Group.
*/
-
/*
- * Value returned when there are no highlighted objects.
+ * Value returned when there are no highlighted objects
*/
-
#define XAW_LIST_NONE -1
#define XtCList "List"
@@ -133,6 +126,7 @@ in this Software without prior written authorization from The Open Group.
#define XtNpasteBuffer "pasteBuffer"
#define XtNrowSpacing "rowSpacing"
#define XtNverticalList "verticalList"
+#define XtNshowCurrent "showCurrent"
#ifndef XtNfontSet
#define XtNfontSet "fontSet"
@@ -142,94 +136,101 @@ in this Software without prior written authorization from The Open Group.
#define XtCFontSet "FontSet"
#endif
-/* Class record constants */
-
extern WidgetClass listWidgetClass;
typedef struct _ListClassRec *ListWidgetClass;
typedef struct _ListRec *ListWidget;
-/* The list return structure. */
-
+/* list return structure */
typedef struct _XawListReturnStruct {
String string;
int list_index;
} XawListReturnStruct;
-/******************************************************************
- *
- * Exported Functions
- *
- *****************************************************************/
-
_XFUNCPROTOBEGIN
-/* Function Name: XawListChange.
- * Description: Changes the list being used and shown.
- * Arguments: w - the list widget.
- * list - the new list.
- * nitems - the number of items in the list.
- * longest - the length (in Pixels) of the longest element
- * in the list.
- * resize - if TRUE the the list widget will
- * try to resize itself.
- * Returns: none.
- * NOTE: If nitems of longest are <= 0 then they will be caluculated.
- * If nitems is <= 0 then the list needs to be NULL terminated.
+/*
+ * Function:
+ * XawListChange
+ *
+ * Parameters:
+ * w - list widget
+ * list - new list
+ * nitems - number of items in the list
+ * longest - length (in Pixels) of the longest element in the list
+ * resize - if True the the list widget will try to resize itself
+ *
+ * Description:
+ * Changes the list being used and shown.
+ *
+ * Note:
+ * If nitems of longest are <= 0 then they will be caluculated
+ * If nitems is <= 0 then the list needs to be NULL terminated
*/
-
-extern void XawListChange(
-#if NeedFunctionPrototypes
- Widget /* w */,
- String* /* list */,
- int /* nitems */,
- int /* longest */,
+void XawListChange
+(
+ Widget w,
+ String *list,
+ int nitems,
+ int longest,
#if NeedWidePrototypes
- /* Boolean */ int /* resize */
+ int resize
#else
- Boolean /* resize */
-#endif
+ Boolean resize
#endif
-);
+ );
-/* Function Name: XawListUnhighlight
- * Description: unlights the current highlighted element.
- * Arguments: w - the widget.
- * Returns: none.
+/*
+ * Function:
+ * XawListUnhighlight
+ *
+ * Parameters:
+ * w - list widget
+ *
+ * Description:
+ * Unlights the current highlighted element.
*/
+void XawListUnhighlight
+(
+ Widget w
+ );
-extern void XawListUnhighlight(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
-);
-
-/* Function Name: XawListHighlight
- * Description: Highlights the given item.
- * Arguments: w - the list widget.
- * item - the item to highlight.
- * Returns: none.
+/*
+ * Function:
+ * XawListHighlight
+ *
+ * Parameters:
+ * w - list widget
+ * item - item to highlight
+ *
+ * Description:
+ * Highlights the given item.
*/
-
-extern void XawListHighlight(
-#if NeedFunctionPrototypes
- Widget /* w */,
- int /* item */
-#endif
-);
+void XawListHighlight
+(
+ Widget w,
+ int item
+ );
-/* Function Name: XawListShowCurrent
- * Description: returns the currently highlighted object.
- * Arguments: w - the list widget.
- * Returns: the info about the currently highlighted object.
+/*
+ * Function:
+ * XawListShowCurrent
+ *
+ * Paraneters:
+ * w - list widget
+ *
+ * Description:
+ * Returns the currently highlighted object.
+ *
+ * Returns:
+ * The info about the currently highlighted object
*/
-extern XawListReturnStruct * XawListShowCurrent(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
-);
+XawListReturnStruct *XawListShowCurrent
+(
+ Widget w
+ );
_XFUNCPROTOEND
diff --git a/include/X11/Xaw/ListP.h b/include/X11/Xaw/ListP.h
index f492559..12915f0 100644
--- a/include/X11/Xaw/ListP.h
+++ b/include/X11/Xaw/ListP.h
@@ -23,11 +23,10 @@ Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xaw/ListP.h,v 1.9 2001/12/14 19:54:40 dawes Exp $ */
/*
- * ListP.h - Private definitions for List widget
- *
* This is a List widget. It allows the user to select an item in a list and
* notifies the application through a callback function.
*
@@ -39,12 +38,9 @@ in this Software without prior written authorization from The Open Group.
#ifndef _XawListP_h
#define _XawListP_h
-/***********************************************************************
- *
+/*
* List Widget Private Data
- *
- ***********************************************************************/
-
+ */
#include <X11/Xaw/SimpleP.h>
#include <X11/Xaw/List.h>
@@ -52,11 +48,12 @@ in this Software without prior written authorization from The Open Group.
#define OUT_OF_RANGE -1
#define OKAY 0
-/* New fields for the List widget class record */
-
-typedef struct {int foo;} ListClassPart;
+/* New fields for the List widget class */
+typedef struct {
+ XtPointer extension;
+} ListClassPart;
-/* Full class record declaration */
+/* Full class record */
typedef struct _ListClassRec {
CoreClassPart core_class;
SimpleClassPart simple_class;
@@ -65,47 +62,53 @@ typedef struct _ListClassRec {
extern ListClassRec listClassRec;
-/* New fields for the List widget record */
+/* New fields for the List widget */
typedef struct {
/* resources */
- Pixel foreground;
- Dimension internal_width, /* if not 3d, user sets directly. */
- internal_height,
- column_space, /* half of *_space is add on top/bot/left of*/
- row_space; /* each item's text bounding box. half added to longest for right */
- int default_cols;
- Boolean force_cols,
- paste,
- vertical_cols;
- int longest; /* in pixels */
- int nitems; /* number of items in the list. */
+ Pixel foreground;
+ Dimension internal_width; /* if not 3d, user sets directly */
+ Dimension internal_height;
+ Dimension column_space; /* half of *_space is add on
+ top/bot/left of */
+ Dimension row_space; /* each item's text bounding box
+ half added to longest for right */
+ int default_cols;
+ Boolean force_cols;
+ Boolean paste;
+ Boolean vertical_cols;
+ int longest; /* in pixels */
+ int nitems;
XFontStruct *font;
- XFontSet fontset; /* Sheeran, Omron KK, 93/03/05 */
- String * list; /* for i18n, always in multibyte format */
+ XFontSet fontset; /* Sheeran, Omron KK, 93/03/05 */
+ String *list; /* for i18n, always in multibyte
+ format */
XtCallbackList callback;
- /* private state */
- int is_highlighted, /* set to the item currently highlighted. */
- highlight, /* set to the item that should be highlighted.*/
- col_width, /* width of each column. */
- row_height, /* height of each row. */
- nrows, /* number of rows in the list. */
- ncols; /* number of columns in the list. */
- GC normgc, /* a couple of GC's. */
- revgc,
- graygc; /* used when inactive. */
-
- int freedoms; /* flags for resizing height and width */
-
+ /* private */
+ int is_highlighted; /* set to the item currently
+ highlighted */
+ int highlight; /* set to the item that should be
+ highlighted */
+ int col_width; /* width of each column */
+ int row_height; /* height of each row */
+ int nrows; /* number of rows in the list */
+ int ncols; /* number of columns in the list */
+ GC normgc;
+ GC revgc;
+ GC graygc;
+ int freedoms; /* flags for resizing height
+ and width */
+#ifndef OLDXAW
+ int selected;
+ Boolean show_current;
+ char pad1[(sizeof(XtPointer) - sizeof(Boolean)) +
+ (sizeof(XtPointer) - sizeof(int))];
+ XtPointer pad2[2]; /* for future use and keep binary compatability */
+#endif
} ListPart;
-/****************************************************************
- *
- * Full instance record declaration
- *
- ****************************************************************/
-
+/* Full instance record */
typedef struct _ListRec {
CorePart core;
SimplePart simple;
diff --git a/include/X11/Xaw/MenuButtoP.h b/include/X11/Xaw/MenuButtoP.h
index 47f415f..ed168f1 100644
--- a/include/X11/Xaw/MenuButtoP.h
+++ b/include/X11/Xaw/MenuButtoP.h
@@ -22,12 +22,7 @@ Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
-
-/***********************************************************************
- *
- * MenuButton Widget
- *
- ***********************************************************************/
+/* $XFree86: xc/lib/Xaw/MenuButtoP.h,v 1.8 2001/12/14 19:54:41 dawes Exp $ */
/*
* MenuButtonP.h - Private Header file for MenuButton widget.
@@ -48,44 +43,32 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xaw/MenuButton.h>
#include <X11/Xaw/CommandP.h>
-/************************************
- *
- * Class structure
- *
- ***********************************/
-
-
- /* New fields for the MenuButton widget class record */
-typedef struct _MenuButtonClass
-{
- int makes_compiler_happy; /* not used */
+/* New fields for the MenuButton widget class */
+typedef struct _MenuButtonClass {
+ XtPointer extension;
} MenuButtonClassPart;
- /* Full class record declaration */
+/* class record declaration */
typedef struct _MenuButtonClassRec {
- CoreClassPart core_class;
- SimpleClassPart simple_class;
- LabelClassPart label_class;
- CommandClassPart command_class;
- MenuButtonClassPart menuButton_class;
+ CoreClassPart core_class;
+ SimpleClassPart simple_class;
+ LabelClassPart label_class;
+ CommandClassPart command_class;
+ MenuButtonClassPart menuButton_class;
} MenuButtonClassRec;
extern MenuButtonClassRec menuButtonClassRec;
-/***************************************
- *
- * Instance (widget) structure
- *
- **************************************/
-
- /* New fields for the MenuButton widget record */
+/* New fields for the MenuButton widget */
typedef struct {
- /* resources */
- String menu_name;
-
+ /* resources */
+ String menu_name;
+#ifndef OLDXAW
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} MenuButtonPart;
- /* Full widget declaration */
+/* widget declaration */
typedef struct _MenuButtonRec {
CorePart core;
SimplePart simple;
@@ -95,5 +78,3 @@ typedef struct _MenuButtonRec {
} MenuButtonRec;
#endif /* _XawMenuButtonP_h */
-
-
diff --git a/include/X11/Xaw/MenuButton.h b/include/X11/Xaw/MenuButton.h
index ebab47a..949dbc5 100644
--- a/include/X11/Xaw/MenuButton.h
+++ b/include/X11/Xaw/MenuButton.h
@@ -23,6 +23,7 @@ Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xaw/MenuButton.h,v 1.6 2001/12/14 19:54:41 dawes Exp $ */
/***********************************************************************
*
@@ -59,6 +60,7 @@ in this Software without prior written authorization from The Open Group.
callback Callback Pointer NULL
cursor Cursor Cursor None
destroyCallback Callback Pointer NULL
+ displayList DisplayList XawDisplayList* NULL
font Font XFontStruct* XtDefaultFont
foreground Foreground Pixel XtDefaultForeground
height Height Dimension text height
diff --git a/include/X11/Xaw/MultiSink.h b/include/X11/Xaw/MultiSink.h
index d010c31..c1d9e05 100644
--- a/include/X11/Xaw/MultiSink.h
+++ b/include/X11/Xaw/MultiSink.h
@@ -70,15 +70,14 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xaw/MultiSink.h,v 1.6 2001/12/14 19:54:41 dawes Exp $ */
#ifndef _XawMultiSink_h
#define _XawMultiSink_h
-/***********************************************************************
- *
+/*
* MultiSink Object
- *
- ***********************************************************************/
+ */
#include <X11/Xaw/TextSink.h>
@@ -106,12 +105,9 @@ SOFTWARE.
#endif
/* Class record constants */
-
extern WidgetClass multiSinkObjectClass;
typedef struct _MultiSinkClassRec *MultiSinkObjectClass;
typedef struct _MultiSinkRec *MultiSinkObject;
-
-#endif /* _XawMultiSrc_h */
-/* DON'T ADD STUFF AFTER THIS #endif */
+#endif /* _XawMultiSink_h */
diff --git a/include/X11/Xaw/MultiSinkP.h b/include/X11/Xaw/MultiSinkP.h
index 3a4b38d..a84d53f 100644
--- a/include/X11/Xaw/MultiSinkP.h
+++ b/include/X11/Xaw/MultiSinkP.h
@@ -71,36 +71,25 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-
-/*
- * multiSinkP.h - Private definitions for multiSink object
- *
- */
+/* $XFree86: xc/lib/Xaw/MultiSinkP.h,v 1.9 2001/12/14 19:54:41 dawes Exp $ */
#ifndef _XawMultiSinkP_h
#define _XawMultiSinkP_h
-/***********************************************************************
- *
- * MultiSink Object Private Data
- *
- ***********************************************************************/
+#include <X11/Xfuncproto.h>
+/*
+ * MultiSink Object Private Data
+ */
#include <X11/Xaw/TextSinkP.h>
#include <X11/Xaw/MultiSink.h>
-/************************************************************
- *
- * New fields for the MultiSink object class record.
- *
- ************************************************************/
-
+/* new fields for the MultiSink object class */
typedef struct _MultiSinkClassPart {
- int foo;
+ XtPointer extension;
} MultiSinkClassPart;
/* Full class record declaration */
-
typedef struct _MultiSinkClassRec {
ObjectClassPart object_class;
TextSinkClassPart text_sink_class;
@@ -111,46 +100,42 @@ extern MultiSinkClassRec multiSinkClassRec;
/* New fields for the MultiSink object record */
typedef struct {
- /* public resources */
+ /* resources */
Boolean echo;
Boolean display_nonprinting;
- /* private state */
+ /* private */
GC normgc, invgc, xorgc;
- Pixmap insertCursorOn;
+ XawTextPosition cursor_position;
XawTextInsertState laststate;
- short cursor_x, cursor_y; /* Cursor Location. */
- XFontSet fontset; /* font set to draw */
+ short cursor_x, cursor_y; /* Cursor Location */
+ XFontSet fontset; /* font set to draw */
+#ifndef OLDXAW
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} MultiSinkPart;
-/****************************************************************
- *
- * Full instance record declaration
- *
- ****************************************************************/
-
+/* Full instance record declaration */
typedef struct _MultiSinkRec {
ObjectPart object;
TextSinkPart text_sink;
MultiSinkPart multi_sink;
} MultiSinkRec;
-
-/********************************************
- *
+/*
* Semi-private functions
* for use by other Xaw modules only
- *
- *******************************************/
-
-extern void _XawMultiSinkPosToXY(
-#if NeedFunctionPrototypes
- Widget /* w */,
- XawTextPosition /* pos */,
- Position * /* x */,
- Position * /*y */
-#endif
+ */
+_XFUNCPROTOBEGIN
+
+void _XawMultiSinkPosToXY
+(
+ Widget w,
+ XawTextPosition pos,
+ Position *x,
+ Position *y
);
-#endif /* _XawMultiSinkP_h */
+_XFUNCPROTOEND
+#endif /* _XawMultiSinkP_h */
diff --git a/include/X11/Xaw/MultiSrc.h b/include/X11/Xaw/MultiSrc.h
index 9ac060d..90d38ed 100644
--- a/include/X11/Xaw/MultiSrc.h
+++ b/include/X11/Xaw/MultiSrc.h
@@ -49,6 +49,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xaw/MultiSrc.h,v 1.7 2001/12/14 19:54:41 dawes Exp $ */
/*
* This file was modified from AsciiSrc.h.
@@ -60,13 +61,11 @@ in this Software without prior written authorization from The Open Group.
#define _XawMultiSrc_h
#include <X11/Xaw/TextSrc.h>
-/*Xfuncproto.h included by Intrinsic.h*/
/* Resources:
Name Class RepType Default Value
---- ----- ------- -------------
- callback Callback Callback (none)
dataCompression DataCompression Boolean True
length Length int (internal)
pieceSize PieceSize int BUFSIZ
@@ -76,24 +75,14 @@ in this Software without prior written authorization from The Open Group.
*/
-/* Class record constants */
-
extern WidgetClass multiSrcObjectClass;
typedef struct _MultiSrcClassRec *MultiSrcObjectClass;
typedef struct _MultiSrcRec *MultiSrcObject;
-/*
- * Just to make people's lives a bit easier.
- */
-
#define MultiSourceObjectClass MultiSrcObjectClass
#define MultiSourceObject MultiSrcObject
-/*
- * Resource Definitions.
- */
-
#define XtCDataCompression "DataCompression"
#define XtCPieceSize "PieceSize"
#define XtCType "Type"
@@ -123,28 +112,22 @@ typedef struct _MultiSrcRec *MultiSrcObject;
_XFUNCPROTOBEGIN
+void XawMultiSourceFreeString
+(
+ Widget w
+ );
-extern void XawMultiSourceFreeString(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
-);
-
-extern Boolean _XawMultiSave(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
-);
-
-extern Boolean _XawMultiSaveAsFile(
-#if NeedFunctionPrototypes
- Widget /* w */,
- _Xconst char* /* name */
-#endif
+Bool _XawMultiSave
+(
+ Widget w
);
+Bool _XawMultiSaveAsFile
+(
+ Widget w,
+ _Xconst char *name
+ );
_XFUNCPROTOEND
-#endif /* _XawMultiSrc_h - Don't add anything after this line. */
-
+#endif /* _XawMultiSrc_h */
diff --git a/include/X11/Xaw/MultiSrcP.h b/include/X11/Xaw/MultiSrcP.h
index 00426db..1931019 100644
--- a/include/X11/Xaw/MultiSrcP.h
+++ b/include/X11/Xaw/MultiSrcP.h
@@ -71,6 +71,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xaw/MultiSrcP.h,v 1.9 2001/12/14 19:54:41 dawes Exp $ */
/*
* MultiSrcP.h - Private Header for Multi Text Source.
@@ -87,11 +88,6 @@ SOFTWARE.
*/
/*
- * TextSrcP.h - Private definitions for MultiSrc object
- *
- */
-
-/*
* This file was changed from AsciiSrcP.h.
*
* By Li Yuhong, Sept. 18, 1990
@@ -100,15 +96,10 @@ SOFTWARE.
#ifndef _XawMultiSrcP_h
#define _XawMultiSrcP_h
+#include <X11/Xfuncproto.h>
#include <X11/Xaw/TextSrcP.h>
#include <X11/Xaw/MultiSrc.h>
-/************************************************************
- *
- * Private declarations.
- *
- ************************************************************/
-
#ifdef L_tmpnam
#define TMPSIZ L_tmpnam
#else
@@ -119,27 +110,20 @@ SOFTWARE.
#endif
#endif
-#define MAGIC_VALUE ((XawTextPosition) -1) /* Magic value. */
-
-#define streq(a, b) ( strcmp((a), (b)) == 0 )
-
typedef struct _MultiPiece { /* Piece of the text file of BUFSIZ allocated
- characters. */
- wchar_t* text; /* The text in this buffer. */
- XawTextPosition used; /* The number of characters of this buffer
- that have been used. */
- struct _MultiPiece *prev, *next; /* linked list pointers. */
+ characters */
+ wchar_t* text; /* The text in this buffer */
+ XawTextPosition used; /* The number of characters of this buffer
+ that have been used */
+ struct _MultiPiece *prev, *next; /* linked list pointers */
} MultiPiece;
-/************************************************************
- *
- * New fields for the MultiSrc object class record.
- *
- ************************************************************/
-
-typedef struct _MultiSrcClassPart { char foo; } MultiSrcClassPart;
+/* New fields for the MultiSrc object class */
+typedef struct _MultiSrcClassPart {
+ XtPointer extension;
+} MultiSrcClassPart;
-/* Full class record declaration */
+/* Full class record */
typedef struct _MultiSrcClassRec {
ObjectClassPart object_class;
TextSrcClassPart text_src_class;
@@ -148,50 +132,51 @@ typedef struct _MultiSrcClassRec {
extern MultiSrcClassRec multiSrcClassRec;
-/* New fields for the MultiSrc object record */
-
+/* New fields for the MultiSrc object */
typedef struct _MultiSrcPart {
+ /* resources */
+ XIC ic; /* for X Input Method */
+ XtPointer string; /* either the string, or the file name, depend-
+ ing upon the `type'. ALWAYS IN MB FORMAT */
+ XawAsciiType type; /* either string or disk */
+ XawTextPosition piece_size; /* Size of text buffer for each piece */
+ Boolean data_compression; /* compress to minimum memory automatically
+ on save? */
+#ifdef OLDXAW
+ XtCallbackList callback;
+#endif
+ Boolean use_string_in_place;/* Use the string passed in place */
+ int multi_length; /* length field for multi string emulation */
- /* Resources. */
+ /* private */
- XIC ic; /* for X Input Method. */
- XtPointer string; /* either the string, or the file name, depend-
- ing upon the `type'. ALWAYS IN MB FORMAT. */
- XawAsciiType type; /* either string or disk. */
- XawTextPosition piece_size; /* Size of text buffer for each piece. */
- Boolean data_compression; /* compress to minimum memory automatically
- on save? */
- XtCallbackList callback; /* A callback list to call when the source is
- changed. */
- Boolean use_string_in_place; /* Use the string passed in place. */
- int multi_length; /* length field for multi string emulation. */
-
-/* Private data. */
-
- Boolean is_tempfile; /* Is this a temporary file? */
- Boolean changes; /* Has this file been edited? */
- Boolean allocated_string; /* Have I allocated the
- string in multi_src->string? */
- XawTextPosition length; /* length of file - IN CHARACTERS, NOT BYTES. */
- MultiPiece * first_piece; /* first piece of the text. */
+ Boolean is_tempfile; /* Is this a temporary file? */
+#ifdef OLDXAW
+ Boolean changes;
+#endif
+ Boolean allocated_string; /* Have I allocated the
+ string in multi_src->string? */
+ XawTextPosition length; /* length of file - IN CHARACTERS, NOT BYTES */
+ MultiPiece *first_piece; /* first piece of the text */
+#ifndef OLDXAW
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} MultiSrcPart;
-/****************************************************************
- *
- * Full instance record declaration
- *
- ****************************************************************/
-
+/* Full instance record */
typedef struct _MultiSrcRec {
ObjectPart object;
TextSrcPart text_src;
MultiSrcPart multi_src;
} MultiSrcRec;
-#if NeedFunctionPrototypes
-extern void _XawMultiSourceFreeString( Widget );
-#else
-extern void _XawMultiSourceFreeString();
-#endif
+_XFUNCPROTOBEGIN
+
+void _XawMultiSourceFreeString
+(
+ Widget w
+ );
+
+_XFUNCPROTOEND
-#endif /* _XawMultiSrcP_h --- Don't add anything after this line. */
+#endif /* _XawMultiSrcP_h */
diff --git a/include/X11/Xaw/Paned.h b/include/X11/Xaw/Paned.h
index 1f6c29e..3e4b050 100644
--- a/include/X11/Xaw/Paned.h
+++ b/include/X11/Xaw/Paned.h
@@ -49,6 +49,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xaw/Paned.h,v 1.7 2001/12/14 19:54:41 dawes Exp $ */
/*
* Paned.h - Paned Composite Widget's public header file.
@@ -68,12 +69,6 @@ SOFTWARE.
#include <X11/Intrinsic.h>
#include <X11/Xmu/Converters.h>
-/****************************************************************
- *
- * Vertical Paned Widget (SubClass of CompositeClass)
- *
- ****************************************************************/
-
/* RESOURCES:
Name Class RepType Default Value
@@ -117,7 +112,7 @@ CONSTRAINT RESOURCES:
allowResize Boolean Boolean False
max Max Dimension unlimited
min Min Dimension Grip Size
- preferredPaneSize PerferredPaneSize Dimension PANED_ASK_CHILD
+ preferredPaneSize PreferredPaneSize Dimension PANED_ASK_CHILD
resizeToPreferred Boolean Boolean False
showGrip ShowGrip Boolean True
skipAdjust Boolean Boolean False
@@ -127,7 +122,6 @@ CONSTRAINT RESOURCES:
#define PANED_ASK_CHILD 0
#define PANED_GRIP_SIZE 0
-/* New Fields */
#define XtNallowResize "allowResize"
#define XtNbetweenCursor "betweenCursor"
#define XtNverticalBetweenCursor "verticalBetweenCursor"
@@ -163,92 +157,107 @@ extern WidgetClass panedWidgetClass;
typedef struct _PanedClassRec *PanedWidgetClass;
typedef struct _PanedRec *PanedWidget;
-/************************************************************
- *
+/*
* Public Procedures
- *
- ************************************************************/
+ */
_XFUNCPROTOBEGIN
-/* Function Name: XawPanedSetMinMax
- * Description: Sets the min and max size for a pane.
- * Arguments: widget - the widget that is a child of the Paned widget.
- * min, max - the new min and max size for the pane.
- * Returns: none.
+/*
+ * Function:
+ * XawPanedSetMinMax
+ *
+ * Parameters:
+ * widget - widget that is a child of the Paned widget
+ * min - new min and max size for the pane
+ * max - ""
+ *
+ * Description:
+ * Sets the min and max size for a pane.
*/
+void XawPanedSetMinMax
+(
+ Widget w,
+ int min,
+ int max
+ );
-extern void XawPanedSetMinMax(
-#if NeedFunctionPrototypes
- Widget /* w */,
- int /* min */,
- int /* max */
-#endif
-);
-
-/* Function Name: XawPanedGetMinMax
- * Description: Gets the min and max size for a pane.
- * Arguments: widget - the widget that is a child of the Paned widget.
- ** RETURNED ** min, max - the current min and max size for the pane.
- * Returns: none.
+/*
+ * Function:
+ * XawPanedGetMinMax
+ *
+ * Parameters:
+ * widget - widget that is a child of the Paned widget
+ * min - return the current min and max size for the pane
+ * max - ""
+ *
+ * Description:
+ * Gets the min and max size for a pane.
*/
+void XawPanedGetMinMax
+(
+ Widget w,
+ int *min_return,
+ int *max_return
+ );
-extern void XawPanedGetMinMax(
-#if NeedFunctionPrototypes
- Widget /* w */,
- int * /* min_return */,
- int * /* max_return */
-#endif
-);
-
-/* Function Name: XawPanedSetRefigureMode
- * Description: Allows a flag to be set the will inhibit
- * the paned widgets relayout routine.
- * Arguments: w - the paned widget.
- * mode - if FALSE then inhibit refigure.
- * Returns: none.
+/*
+ * Function:
+ * XawPanedSetRefigureMode
+ *
+ * Parameters:
+ * w - paned widget
+ * mode - if False then inhibit refigure
+ *
+ * Description:
+ * Allows a flag to be set the will inhibit the paned widgets
+ * relayout routine.
*/
-
-extern void XawPanedSetRefigureMode(
-#if NeedFunctionPrototypes
- Widget /* w */,
+void XawPanedSetRefigureMode
+(
+ Widget w,
#if NeedWidePrototypes
- /* Boolean */ int /* mode */
+ int mode
#else
- Boolean /* mode */
+ Boolean mode
#endif
-#endif
-);
+ );
-/* Function Name: XawPanedGetNumSub
- * Description: Returns the number of panes in the paned widget.
- * Arguments: w - the paned widget.
- * Returns: the number of panes in the paned widget.
+/*
+ * Function:
+ * XawPanedGetNumSub
+ *
+ * Parameters:
+ * w - paned widget
+ *
+ * Returns:
+ * Number of panes in the paned widget.
*/
+int XawPanedGetNumSub
+(
+ Widget w
+ );
-extern int XawPanedGetNumSub(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
-);
-
-/* Function Name: XawPanedAllowResize
- * Description: Allows a flag to be set that determines if the paned
- * widget will allow geometry requests from this child
- * Arguments: widget - a child of the paned widget.
- * Returns: none.
+/*
+ * Function:
+ * XawPanedAllowResize
+ *
+ * Parameters:
+ * widget - child of the paned widget
+ *
+ * Description:
+ * Allows a flag to be set that determines if the paned widget will
+ * allow geometry requests from this child
*/
-
-extern void XawPanedAllowResize(
-#if NeedFunctionPrototypes
- Widget /* w */,
+void XawPanedAllowResize
+(
+ Widget w,
#if NeedWidePrototypes
- /* Boolean */ int /* allow_resize */
+ int allow_resize
#else
- Boolean /* allow_resize */
-#endif
+ Boolean allow_resize
#endif
-);
+ );
_XFUNCPROTOEND
diff --git a/include/X11/Xaw/PanedP.h b/include/X11/Xaw/PanedP.h
index 32b909f..863d2a2 100644
--- a/include/X11/Xaw/PanedP.h
+++ b/include/X11/Xaw/PanedP.h
@@ -47,10 +47,9 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xaw/PanedP.h,v 1.8 2001/12/14 19:54:41 dawes Exp $ */
/*
- * PanedP.h - Paned Composite Widget's private header file.
- *
* Updated and significantly modified from the Athena VPaned Widget.
*
* Date: March 1, 1989
@@ -65,16 +64,9 @@ SOFTWARE.
#include <X11/Xaw/Paned.h>
-/*********************************************************************
- *
- * Paned Widget Private Data
- *
- *********************************************************************/
-
/* New fields for the Paned widget class record */
-
typedef struct _PanedClassPart {
- int foo; /* keep compiler happy. */
+ XtPointer extension;
} PanedClassPart;
/* Full Class record declaration */
@@ -82,38 +74,37 @@ typedef struct _PanedClassRec {
CoreClassPart core_class;
CompositeClassPart composite_class;
ConstraintClassPart constraint_class;
- PanedClassPart paned_class;
+ PanedClassPart paned_class;
} PanedClassRec;
extern PanedClassRec panedClassRec;
/* Paned constraint record */
typedef struct _PanedConstraintsPart {
- /* Resources. */
+ /* Resources */
Dimension min; /* Minimum height */
Dimension max; /* Maximum height */
- Boolean allow_resize; /* TRUE iff child resize requests are ok */
- Boolean show_grip; /* TRUE iff child will have grip below it,
- when it is not the bottom pane. */
- Boolean skip_adjust; /* TRUE iff child's height should not be */
- /* changed without explicit user action. */
+ Boolean allow_resize; /* True if child resize requests are ok */
+ Boolean show_grip; /* True if child will have grip below it,
+ when it is not the bottom pane */
+ Boolean skip_adjust; /* True if child's height should not be
+ changed without explicit user action */
int position; /* position location in Paned (relative to
other children) ** NIY ** */
Dimension preferred_size; /* The Preferred size of the pane.
- Iff this is zero then ask child for size.*/
+ If this is zero then ask child for size*/
Boolean resize_to_pref; /* resize this pane to its preferred size
on a resize or change managed after
- realize. */
+ realize */
- /* Private state. */
+ /* Private state */
Position delta; /* Desired Location */
- Position olddelta; /* The last value of dy. */
+ Position olddelta; /* The last value of dy */
Boolean paned_adjusted_me; /* Has the vpaned adjusted this widget w/o
user interaction to make things fit? */
Dimension wp_size; /* widget's preferred size */
- int size; /* the size the widget will actually get. */
+ int size; /* the size the widget will actually get */
Widget grip; /* The grip for this child */
-
} PanedConstraintsPart, *Pane;
typedef struct _PanedConstraintsRec {
@@ -121,14 +112,13 @@ typedef struct _PanedConstraintsRec {
} PanedConstraintsRec, *PanedConstraints;
/*
- * The Pane Stack Structure.
+ * The Pane Stack Structure
*/
-
typedef struct _PaneStack {
- struct _PaneStack * next; /* The next element on the stack. */
- Pane pane; /* The pane in this element on the stack. */
- int start_size; /* The size of this element when it was pushed
- onto the stack. */
+ struct _PaneStack *next; /* The next element on the stack */
+ Pane pane; /* The pane in this element on the stack */
+ int start_size; /* The size of this element when it
+ was pushed onto the stack */
} PaneStack;
/* New Fields for the Paned widget record */
@@ -139,9 +129,9 @@ typedef struct {
Boolean refiguremode; /* Whether to refigure changes
right now */
XtTranslations grip_translations; /* grip translation table */
- Pixel internal_bp; /* color of internal borders. */
- Dimension internal_bw; /* internal border width. */
- XtOrientation orientation; /* Orientation of paned widget. */
+ Pixel internal_bp; /* color of internal borders */
+ Dimension internal_bw; /* internal border width */
+ XtOrientation orientation; /* Orientation of paned widget */
Cursor cursor; /* Cursor for paned window */
Cursor grip_cursor; /* inactive grip cursor */
@@ -151,42 +141,40 @@ typedef struct {
Cursor v_adjust_this_cursor; /* active vert grip cursor: T */
Cursor h_adjust_this_cursor; /* active horiz grip cursor: T */
- /* vertical. */
+ /* vertical */
Cursor adjust_upper_cursor; /* active grip cursor: U */
Cursor adjust_lower_cursor; /* active grip cursor: D */
- /* horizontal. */
- Cursor adjust_left_cursor; /* active grip cursor: U */
- Cursor adjust_right_cursor; /* active grip cursor: D */
+ /* horizontal */
+ Cursor adjust_left_cursor; /* active grip cursor: U */
+ Cursor adjust_right_cursor; /* active grip cursor: D */
/* private */
Boolean recursively_called; /* for ChangeManaged */
Boolean resize_children_to_pref; /* override constrain resources
and resize all children to
- preferred size. */
+ preferred size */
int start_loc; /* mouse origin when adjusting */
Widget whichadd; /* Which pane to add changes to */
Widget whichsub; /* Which pane to sub changes from */
GC normgc; /* GC to use when drawing borders */
GC invgc; /* GC to use when erasing borders */
- GC flipgc; /* GC to use when animating
- borders */
+ GC flipgc; /* GC to use when animating borders */
int num_panes; /* count of managed panes */
- PaneStack * stack; /* The pane stack for this widget.*/
+ PaneStack *stack; /* The pane stack for this widget */
+#ifndef OLDXAW
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} PanedPart;
-/**************************************************************************
- *
+/*
* Full instance record declaration
- *
- **************************************************************************/
-
+ */
typedef struct _PanedRec {
- CorePart core;
+ CorePart core;
CompositePart composite;
ConstraintPart constraint;
- PanedPart paned;
+ PanedPart paned;
} PanedRec;
#endif /* _XawPanedP_h */
-/* DON'T ADD STUFF AFTER THIS #endif */
diff --git a/include/X11/Xaw/Panner.h b/include/X11/Xaw/Panner.h
index 037b257..cc1ddf8 100644
--- a/include/X11/Xaw/Panner.h
+++ b/include/X11/Xaw/Panner.h
@@ -25,6 +25,7 @@ in this Software without prior written authorization from The Open Group.
*
* Author: Jim Fulton, MIT X Consortium
*/
+/* $XFree86: xc/lib/Xaw/Panner.h,v 1.6 2001/12/14 19:54:41 dawes Exp $ */
#ifndef _XawPanner_h
#define _XawPanner_h
@@ -36,9 +37,9 @@ in this Software without prior written authorization from The Open Group.
*
* Panner Widget (subclass of Simple)
*
- * This widget is used to represent navigation in a 2d coordinate system.
+ * This widget is used to represent navigation in a 2d coordinate system
*
- * Parameters:
+ * Resources:
*
* Name Class Type Default
* ---- ----- ---- -------
@@ -64,7 +65,6 @@ in this Software without prior written authorization from The Open Group.
*
*****************************************************************************/
- /* new instance and class names */
#ifndef _XtStringDefs_h_
#define XtNresize "resize"
#define XtCResize "Resize"
@@ -99,7 +99,6 @@ in this Software without prior written authorization from The Open Group.
#define XtNsliderHeight "sliderHeight"
#define XtCSliderHeight "SliderHeight"
- /* external declarations */
extern WidgetClass pannerWidgetClass;
typedef struct _PannerClassRec *PannerWidgetClass;
diff --git a/include/X11/Xaw/PannerP.h b/include/X11/Xaw/PannerP.h
index a952b02..1d185f2 100644
--- a/include/X11/Xaw/PannerP.h
+++ b/include/X11/Xaw/PannerP.h
@@ -25,25 +25,29 @@ in this Software without prior written authorization from The Open Group.
*
* Author: Jim Fulton, MIT X Consortium
*/
+/* $XFree86: xc/lib/Xaw/PannerP.h,v 1.8 2001/12/14 19:54:41 dawes Exp $ */
#ifndef _XawPannerP_h
#define _XawPannerP_h
#include <X11/Xaw/Panner.h>
-#include <X11/Xaw/SimpleP.h> /* parent */
+#include <X11/Xaw/SimpleP.h>
-typedef struct { /* new fields in widget class */
- int dummy;
+/* new fields in widget class */
+typedef struct {
+ XtPointer extension;
} PannerClassPart;
-typedef struct _PannerClassRec { /* Panner widget class */
+/* Panner widget class */
+typedef struct _PannerClassRec {
CoreClassPart core_class;
SimpleClassPart simple_class;
PannerClassPart panner_class;
} PannerClassRec;
-typedef struct { /* new fields in widget */
- /* resources... */
+/* new fields in widget */
+typedef struct {
+ /* resources */
XtCallbackList report_callbacks; /* callback/Callback */
Boolean allow_off; /* allowOff/AllowOff */
Boolean resize_to_pref; /* resizeToPreferred/Boolean */
@@ -59,8 +63,9 @@ typedef struct { /* new fields in widget */
Dimension slider_width; /* sliderWidth/SliderWidth */
Dimension slider_height; /* sliderHeight/SliderHeight */
Dimension internal_border; /* internalBorderWidth/BorderWidth */
- String stipple_name; /* backgroundStipple/BackgroundStipple */
- /* private data... */
+ String stipple_name; /* backgroundStipple/BackgroundStipple
+ */
+ /* private */
GC slider_gc; /* background of slider */
GC shadow_gc; /* edge of slider and shadow */
GC xor_gc; /* for doing XOR tmp graphics */
@@ -78,6 +83,9 @@ typedef struct { /* new fields in widget */
Boolean shadow_valid; /* true if rects are valid */
XRectangle shadow_rects[2]; /* location of shadows */
Position last_x, last_y; /* previous location of knob */
+#ifndef OLDXAW
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} PannerPart;
typedef struct _PannerRec {
@@ -86,18 +94,15 @@ typedef struct _PannerRec {
PannerPart panner;
} PannerRec;
-#define PANNER_HSCALE(pw,val) ((pw)->panner.haspect * ((double) (val)))
-#define PANNER_VSCALE(pw,val) ((pw)->panner.vaspect * ((double) (val)))
+#define PANNER_HSCALE(pw,val) ((pw)->panner.haspect * ((double)(val)))
+#define PANNER_VSCALE(pw,val) ((pw)->panner.vaspect * ((double)(val)))
#define PANNER_DSCALE(pw,val) (Dimension) \
- ((((unsigned long) (val)) * (unsigned long) pw->panner.default_scale) / 100L)
-#define PANNER_DEFAULT_SCALE 8 /* percent */
+((((unsigned long)(val)) * (unsigned long)pw->panner.default_scale) / 100L)
+#define PANNER_DEFAULT_SCALE 8 /* percent */
#define PANNER_OUTOFRANGE -30000
-/*
- * external declarations
- */
extern PannerClassRec pannerClassRec;
#endif /* _XawPannerP_h */
diff --git a/include/X11/Xaw/Porthole.h b/include/X11/Xaw/Porthole.h
index 0eb3419..774463d 100644
--- a/include/X11/Xaw/Porthole.h
+++ b/include/X11/Xaw/Porthole.h
@@ -25,6 +25,7 @@ in this Software without prior written authorization from The Open Group.
*
* Author: Jim Fulton, MIT X Consortium
*/
+/* $XFree86: xc/lib/Xaw/Porthole.h,v 1.6 2001/12/14 19:54:41 dawes Exp $ */
#ifndef _XawPorthole_h
#define _XawPorthole_h
@@ -55,8 +56,6 @@ in this Software without prior written authorization from The Open Group.
*
*****************************************************************************/
- /* external declarations */
-
extern WidgetClass portholeWidgetClass;
typedef struct _PortholeClassRec *PortholeWidgetClass;
typedef struct _PortholeRec *PortholeWidget;
diff --git a/include/X11/Xaw/PortholeP.h b/include/X11/Xaw/PortholeP.h
index e5d6ba6..74524b9 100644
--- a/include/X11/Xaw/PortholeP.h
+++ b/include/X11/Xaw/PortholeP.h
@@ -25,27 +25,32 @@ in this Software without prior written authorization from The Open Group.
*
* Author: Jim Fulton, MIT X Consortium
*/
+/* $XFree86: xc/lib/Xaw/PortholeP.h,v 1.8 2001/12/14 19:54:41 dawes Exp $ */
#ifndef _XawPortholeP_h
#define _XawPortholeP_h
#include <X11/Xaw/Porthole.h>
-typedef struct { /* new fields in widget class */
- int dummy;
+/* new fields in widget class */
+typedef struct {
+ XtPointer extension;
} PortholeClassPart;
-typedef struct _PortholeClassRec { /* Porthole widget class */
+/* widget class */
+typedef struct _PortholeClassRec {
CoreClassPart core_class;
CompositeClassPart composite_class;
PortholeClassPart porthole_class;
} PortholeClassRec;
-
-typedef struct { /* new fields in widget */
- /* resources... */
+/* new fields in widget */
+typedef struct {
+ /* resources */
XtCallbackList report_callbacks; /* callback/Callback */
- /* private data... */
+#ifndef OLDXAW
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} PortholePart;
typedef struct _PortholeRec {
@@ -54,11 +59,6 @@ typedef struct _PortholeRec {
PortholePart porthole;
} PortholeRec;
-
-/*
- * external declarations
- */
extern PortholeClassRec portholeClassRec;
-
#endif /* _XawPortholeP_h */
diff --git a/include/X11/Xaw/Repeater.h b/include/X11/Xaw/Repeater.h
index 49232cd..d548c3b 100644
--- a/include/X11/Xaw/Repeater.h
+++ b/include/X11/Xaw/Repeater.h
@@ -25,6 +25,7 @@ in this Software without prior written authorization from The Open Group.
*
* Author: Jim Fulton, MIT X Consortium
*/
+/* $XFree86: xc/lib/Xaw/Repeater.h,v 1.6 2001/12/14 19:54:42 dawes Exp $ */
#ifndef _XawRepeater_h
#define _XawRepeater_h
@@ -35,7 +36,7 @@ in this Software without prior written authorization from The Open Group.
*
* Repeater Widget (subclass of Command)
*
- * This widget is a push button that repeatedly fires when held down.
+ * This widget is a push button that repeatedly fires when held down
*
* Parameters:
*
@@ -52,7 +53,6 @@ in this Software without prior written authorization from The Open Group.
*
*****************************************************************************/
- /* new instance and class names */
#define XtNdecay "decay"
#define XtCDecay "Decay"
#define XtNinitialDelay "initialDelay"
@@ -67,7 +67,6 @@ in this Software without prior written authorization from The Open Group.
#define XtCStopCallback "StopCallback"
- /* external declarations */
extern WidgetClass repeaterWidgetClass;
typedef struct _RepeaterClassRec *RepeaterWidgetClass;
diff --git a/include/X11/Xaw/RepeaterP.h b/include/X11/Xaw/RepeaterP.h
index 0c82c4c..3336e23 100644
--- a/include/X11/Xaw/RepeaterP.h
+++ b/include/X11/Xaw/RepeaterP.h
@@ -25,6 +25,7 @@ in this Software without prior written authorization from The Open Group.
*
* Author: Jim Fulton, MIT X Consortium
*/
+/* $XFree86: xc/lib/Xaw/RepeaterP.h,v 1.8 2001/12/14 19:54:42 dawes Exp $ */
#ifndef _XawRepeaterP_h
#define _XawRepeaterP_h
@@ -32,11 +33,13 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xaw/CommandP.h>
#include <X11/Xaw/Repeater.h>
-typedef struct { /* new fields in widget class */
- int dummy;
+/* new fields in widget class */
+typedef struct {
+ XtPointer extension;
} RepeaterClassPart;
-typedef struct _RepeaterClassRec { /* Repeater widget class */
+/* repeater widget class */
+typedef struct _RepeaterClassRec {
CoreClassPart core_class;
SimpleClassPart simple_class;
LabelClassPart label_class;
@@ -44,8 +47,8 @@ typedef struct _RepeaterClassRec { /* Repeater widget class */
RepeaterClassPart repeater_class;
} RepeaterClassRec;
-typedef struct { /* new fields in widget */
- /* resources... */
+typedef struct {
+ /* resources */
int initial_delay; /* initialDelay/Delay */
int repeat_delay; /* repeatDelay/Delay */
int minimum_delay; /* minimumDelay/MinimumDelay */
@@ -53,9 +56,13 @@ typedef struct { /* new fields in widget */
Boolean flash; /* flash/Boolean */
XtCallbackList start_callbacks; /* startCallback/StartCallback */
XtCallbackList stop_callbacks; /* stopCallback/StopCallback */
- /* private data... */
+
+ /* private */
int next_delay; /* next amount for timer */
XtIntervalId timer; /* timer that will fire */
+#ifndef OLDXAW
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} RepeaterPart;
typedef struct _RepeaterRec {
@@ -66,14 +73,12 @@ typedef struct _RepeaterRec {
RepeaterPart repeater;
} RepeaterRec;
-#define REP_DEF_DECAY 5 /* milliseconds */
-#define REP_DEF_INITIAL_DELAY 200 /* milliseconds */
-#define REP_DEF_MINIMUM_DELAY 10 /* milliseconds */
-#define REP_DEF_REPEAT_DELAY 50 /* milliseconds */
+ /* milliseconds */
+#define REP_DEF_DECAY 5
+#define REP_DEF_INITIAL_DELAY 200
+#define REP_DEF_MINIMUM_DELAY 10
+#define REP_DEF_REPEAT_DELAY 50
-/*
- * external declarations
- */
extern RepeaterClassRec repeaterClassRec;
#endif /* _XawRepeaterP_h */
diff --git a/include/X11/Xaw/Scrollbar.h b/include/X11/Xaw/Scrollbar.h
index 877f81f..38ec481 100644
--- a/include/X11/Xaw/Scrollbar.h
+++ b/include/X11/Xaw/Scrollbar.h
@@ -47,15 +47,14 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xaw/Scrollbar.h,v 1.7 2001/12/14 19:54:42 dawes Exp $ */
#ifndef _Scrollbar_h
#define _Scrollbar_h
-/****************************************************************
- *
+/*
* Scrollbar Widget
- *
- ****************************************************************/
+ */
#include <X11/Xmu/Converters.h>
#include <X11/Xfuncproto.h>
@@ -107,10 +106,6 @@ SOFTWARE.
*/
-/*
- * Most things we need are in StringDefs.h
- */
-
#define XtCMinimumThumb "MinimumThumb"
#define XtCShown "Shown"
#define XtCTopOfThumb "TopOfThumb"
@@ -125,18 +120,17 @@ extern WidgetClass scrollbarWidgetClass;
_XFUNCPROTOBEGIN
-extern void XawScrollbarSetThumb(
-#if NeedFunctionPrototypes
- Widget /* scrollbar */,
+void XawScrollbarSetThumb
+(
+ Widget scrollbar,
#if NeedWidePrototypes
- /* float */ double /* top */,
- /* float */ double /* shown */
+ double top,
+ double shown
#else
- float /* top */,
- float /* shown */
-#endif
+ float top,
+ float shown
#endif
-);
+ );
_XFUNCPROTOEND
diff --git a/include/X11/Xaw/ScrollbarP.h b/include/X11/Xaw/ScrollbarP.h
index 250afbb..ec0e15d 100644
--- a/include/X11/Xaw/ScrollbarP.h
+++ b/include/X11/Xaw/ScrollbarP.h
@@ -49,6 +49,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xaw/ScrollbarP.h,v 1.8 2001/12/14 19:54:42 dawes Exp $ */
#ifndef _ScrollbarP_h
#define _ScrollbarP_h
@@ -57,32 +58,34 @@ SOFTWARE.
#include <X11/Xaw/SimpleP.h>
typedef struct {
- /* public */
- Pixel foreground; /* thumb foreground color */
- XtOrientation orientation; /* horizontal or vertical */
+ /* resources */
+ Pixel foreground; /* thumb foreground color */
+ XtOrientation orientation; /* horizontal or vertical */
XtCallbackList scrollProc; /* proportional scroll */
XtCallbackList thumbProc; /* jump (to position) scroll */
XtCallbackList jumpProc; /* same as thumbProc but pass data by ref */
- Pixmap thumb; /* thumb color */
- Cursor upCursor; /* scroll up cursor */
- Cursor downCursor; /* scroll down cursor */
- Cursor leftCursor; /* scroll left cursor */
- Cursor rightCursor; /* scroll right cursor */
- Cursor verCursor; /* scroll vertical cursor */
- Cursor horCursor; /* scroll horizontal cursor */
- float top; /* What percent is above the win's top */
- float shown; /* What percent is shown in the win */
- Dimension length; /* either height or width */
- Dimension thickness; /* either width or height */
- Dimension min_thumb; /* minium size for the thumb. */
+ Pixmap thumb; /* thumb pixmap */
+ Cursor upCursor; /* scroll up cursor */
+ Cursor downCursor; /* scroll down cursor */
+ Cursor leftCursor; /* scroll left cursor */
+ Cursor rightCursor; /* scroll right cursor */
+ Cursor verCursor; /* scroll vertical cursor */
+ Cursor horCursor; /* scroll horizontal cursor */
+ float top;
+ float shown;
+ Dimension length; /* either height or width */
+ Dimension thickness; /* either width or height */
+ Dimension min_thumb; /* minium size for the thumb */
/* private */
- Cursor inactiveCursor; /* The normal cursor for scrollbar */
- char direction; /* a scroll has started; which direction */
- GC gc; /* a (shared) gc */
- Position topLoc; /* Pixel that corresponds to top */
- Dimension shownLength; /* Num pixels corresponding to shown */
-
+ Cursor inactiveCursor; /* The normal cursor for scrollbar */
+ char direction; /* a scroll has started; which direction */
+ GC gc; /* a (shared) gc */
+ Position topLoc; /* Pixel that corresponds to top */
+ Dimension shownLength; /* Num pixels corresponding to shown */
+#ifndef OLDXAW
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} ScrollbarPart;
typedef struct _ScrollbarRec {
@@ -91,7 +94,9 @@ typedef struct _ScrollbarRec {
ScrollbarPart scrollbar;
} ScrollbarRec;
-typedef struct {int empty;} ScrollbarClassPart;
+typedef struct {
+ XtPointer extension;
+} ScrollbarClassPart;
typedef struct _ScrollbarClassRec {
CoreClassPart core_class;
diff --git a/include/X11/Xaw/Simple.h b/include/X11/Xaw/Simple.h
index e50cccf..ffcd59b 100644
--- a/include/X11/Xaw/Simple.h
+++ b/include/X11/Xaw/Simple.h
@@ -46,18 +46,13 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xaw/Simple.h,v 1.9 2001/12/14 19:54:42 dawes Exp $ */
#ifndef _Simple_h
#define _Simple_h
#include <X11/Xmu/Converters.h>
-/****************************************************************
- *
- * Simple widgets
- *
- ****************************************************************/
-
/* Resources:
Name Class RepType Default Value
@@ -68,12 +63,14 @@ SOFTWARE.
cursor Cursor Cursor None
cursorName Cursor String NULL
destroyCallback Callback Pointer NULL
+ displayList DisplayList XawDisplayList* NULL
height Height Dimension 0
insensitiveBorder Insensitive Pixmap Gray
mappedWhenManaged MappedWhenManaged Boolean True
pointerColor Foreground Pixel XtDefaultForeground
pointerColorBackground Background Pixel XtDefaultBackground
sensitive Sensitive Boolean True
+ tip Tip String NULL
width Width Dimension 0
x Position Position 0
y Position Position 0
@@ -94,6 +91,23 @@ SOFTWARE.
#define XtNinternational "international"
#endif
+#ifndef OLDXAW
+#ifndef XawNdisplayList
+#define XawNdisplayList "displayList"
+#endif
+
+#ifndef XawCDisplayList
+#define XawCDisplayList "DisplayList"
+#endif
+
+#ifndef XawRDisplayList
+#define XawRDisplayList "XawDisplayList"
+#endif
+
+#define XtNtip "tip"
+#define XtCTip "Tip"
+#endif /* OLDXAW */
+
typedef struct _SimpleClassRec *SimpleWidgetClass;
typedef struct _SimpleRec *SimpleWidget;
diff --git a/include/X11/Xaw/SimpleMenP.h b/include/X11/Xaw/SimpleMenP.h
index 6e6dc7d..d7c8d01 100644
--- a/include/X11/Xaw/SimpleMenP.h
+++ b/include/X11/Xaw/SimpleMenP.h
@@ -24,6 +24,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*
*/
+/* $XFree86: xc/lib/Xaw/SimpleMenP.h,v 1.13 2001/12/14 19:54:42 dawes Exp $ */
/*
* SimpleMenuP.h - Private Header file for SimpleMenu widget.
@@ -41,58 +42,60 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xaw/SimpleMenu.h>
#include <X11/Xaw/SmeP.h>
#include <X11/ShellP.h>
+#include <X11/Xaw/XawInit.h>
typedef struct {
- XtPointer extension; /* For future needs. */
+ XtPointer extension; /* For future needs */
} SimpleMenuClassPart;
typedef struct _SimpleMenuClassRec {
- CoreClassPart core_class;
- CompositeClassPart composite_class;
- ShellClassPart shell_class;
- OverrideShellClassPart override_shell_class;
- SimpleMenuClassPart simpleMenu_class;
+ CoreClassPart core_class;
+ CompositeClassPart composite_class;
+ ShellClassPart shell_class;
+ OverrideShellClassPart override_shell_class;
+ SimpleMenuClassPart simpleMenu_class;
} SimpleMenuClassRec;
extern SimpleMenuClassRec simpleMenuClassRec;
typedef struct _SimpleMenuPart {
-
/* resources */
-
- String label_string; /* The string for the label or NULL. */
- SmeObject label; /* If label_string is non-NULL then this is
- the label widget. */
- WidgetClass label_class; /* Widget Class of the menu label object. */
-
- Dimension top_margin; /* Top and bottom margins. */
- Dimension bottom_margin;
- Dimension row_height; /* height of each row (menu entry) */
-
- Cursor cursor; /* The menu's cursor. */
- SmeObject popup_entry; /* The entry to position the cursor on for
- when using XawPositionSimpleMenu. */
- Boolean menu_on_screen; /* Force the menus to be fully on the screen.*/
- int backing_store; /* What type of backing store to use. */
-
- /* private state */
-
- Boolean recursive_set_values; /* contain a possible infinite loop. */
-
- Boolean menu_width; /* If true then force width to remain
+ String label_string; /* The string for the label or NULL */
+ SmeObject label; /* If label_string is non-NULL then this is
+ the label widget */
+ WidgetClass label_class; /* Widget Class of the menu label object */
+ Dimension top_margin; /* Top and bottom margins */
+ Dimension bottom_margin;
+ Dimension row_height; /* height of each row (menu entry) */
+ Cursor cursor; /* The menu's cursor */
+ SmeObject popup_entry; /* The entry to position the cursor on for
+ when using XawPositionSimpleMenu */
+ Boolean menu_on_screen; /* Force the menus to be fully on the screen*/
+ int backing_store; /* What type of backing store to use */
+
+ /* private */
+ Boolean recursive_set_values; /* contain a possible infinite loop */
+ Boolean menu_width; /* If true then force width to remain
core.width */
- Boolean menu_height; /* Just like menu_width, but for height. */
-
- SmeObject entry_set; /* The entry that is currently set or
- highlighted. */
+ Boolean menu_height; /* Just like menu_width, but for height */
+ SmeObject entry_set; /* The entry that is currently set or
+ highlighted */
+#ifndef OLDXAW
+ Dimension left_margin;
+ Dimension right_margin;
+ XawDisplayList *display_list;
+ Widget sub_menu;
+ unsigned char state;
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} SimpleMenuPart;
typedef struct _SimpleMenuRec {
- CorePart core;
- CompositePart composite;
- ShellPart shell;
- OverrideShellPart override;
- SimpleMenuPart simple_menu;
+ CorePart core;
+ CompositePart composite;
+ ShellPart shell;
+ OverrideShellPart override;
+ SimpleMenuPart simple_menu;
} SimpleMenuRec;
#endif /* _SimpleMenuP_h */
diff --git a/include/X11/Xaw/SimpleMenu.h b/include/X11/Xaw/SimpleMenu.h
index 3a59fc1..8048a90 100644
--- a/include/X11/Xaw/SimpleMenu.h
+++ b/include/X11/Xaw/SimpleMenu.h
@@ -25,6 +25,7 @@ in this Software without prior written authorization from The Open Group.
*
* Author: Chris D. Peterson, MIT X Consortium
*/
+/* $XFree86: xc/lib/Xaw/SimpleMenu.h,v 1.8 2001/12/14 19:54:43 dawes Exp $ */
/*
* SimpleMenu.h - Public Header file for SimpleMenu widget.
@@ -49,13 +50,11 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Shell.h>
#include <X11/Xmu/Converters.h>
-/****************************************************************
- *
+/*
* SimpleMenu widget
- *
- ****************************************************************/
+ */
-/* SimpleMenu Resources:
+/* Resources:
Name Class RepType Default Value
---- ----- ------- -------------
@@ -68,15 +67,18 @@ in this Software without prior written authorization from The Open Group.
columnWidth ColumnWidth Dimension Width of widest text
cursor Cursor Cursor None
destroyCallback Callback Pointer NULL
+ displayList DisplayList XawDisplayList* NULL
height Height Dimension 0
label Label String NULL (No label)
labelClass LabelClass Pointer smeBSBObjectClass
+ leftMargin HorizontalMargins Dimension 0
mappedWhenManaged MappedWhenManaged Boolean True
+ rightMargin HorizontalMargins Dimension 0
rowHeight RowHeight Dimension Height of Font
sensitive Sensitive Boolean True
topMargin VerticalMargins Dimension VerticalSpace
width Width Dimension 0
- x Position Position 0n
+ x Position Position 0
y Position Position 0
*/
@@ -94,56 +96,76 @@ extern WidgetClass simpleMenuWidgetClass;
#define XtNpopupOnEntry "popupOnEntry"
#define XtNrowHeight "rowHeight"
#define XtNtopMargin "topMargin"
+#define XtNleftMargin "leftMargin"
+#define XtNrightMargin "rightMargin"
#define XtCColumnWidth "ColumnWidth"
#define XtCLabelClass "LabelClass"
#define XtCMenuOnScreen "MenuOnScreen"
#define XtCPopupOnEntry "PopupOnEntry"
#define XtCRowHeight "RowHeight"
+
#define XtCVerticalMargins "VerticalMargins"
-/************************************************************
- *
- * Public Functions.
- *
- ************************************************************/
+#ifndef OLDXAW
+#define XtCHorizontalMargins "HorizontalMargins"
+#define XawNdisplayList "displayList"
+#define XawCDisplayList "DisplayList"
+#define XawRDisplayList "XawDisplayList"
+#endif
+
+/*
+ * Public Functions
+ */
_XFUNCPROTOBEGIN
-/* Function Name: XawSimpleMenuAddGlobalActions
- * Description: adds the global actions to the simple menu widget.
- * Arguments: app_con - the appcontext.
- * Returns: none.
+/*
+ * Function:
+ * XawSimpleMenuAddGlobalActions
+ *
+ * Parameters:
+ * app_con - appcontext
+ *
+ * Description:
+ * Adds the global actions to the simple menu widget.
*/
+void XawSimpleMenuAddGlobalActions
+(
+ XtAppContext app_con
+ );
-extern void XawSimpleMenuAddGlobalActions(
-#if NeedFunctionPrototypes
- XtAppContext /* app_con */
-#endif
-);
-
-/* Function Name: XawSimpleMenuGetActiveEntry
- * Description: Gets the currently active (set) entry.
- * Arguments: w - the smw widget.
- * Returns: the currently set entry or NULL if none is set.
+/*
+ * Function:
+ * XawSimpleMenuGetActiveEntry
+ *
+ * Parameters:
+ * w - smw widget
+ *
+ * Description:
+ * Gets the currently active (set) entry.
+ *
+ * Returns:
+ * The currently set entry or NULL if none is set
*/
+Widget XawSimpleMenuGetActiveEntry
+(
+ Widget w
+ );
-extern Widget XawSimpleMenuGetActiveEntry(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
-);
-
-/* Function Name: XawSimpleMenuClearActiveEntry
- * Description: Unsets the currently active (set) entry.
- * Arguments: w - the smw widget.
- * Returns: none.
+/*
+ * Function:
+ * XawSimpleMenuClearActiveEntry
+ *
+ * Parameters:
+ * w - smw widget
+ *
+ * Description:
+ * Unsets the currently active (set) entry.
*/
-
-extern void XawSimpleMenuClearActiveEntry(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
+void XawSimpleMenuClearActiveEntry
+(
+ Widget w
);
_XFUNCPROTOEND
diff --git a/include/X11/Xaw/SimpleP.h b/include/X11/Xaw/SimpleP.h
index d052629..d48cd13 100644
--- a/include/X11/Xaw/SimpleP.h
+++ b/include/X11/Xaw/SimpleP.h
@@ -47,17 +47,27 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xaw/SimpleP.h,v 1.13 2001/12/19 21:37:31 dawes Exp $ */
#ifndef _SimpleP_h
#define _SimpleP_h
+#include <X11/Xfuncproto.h>
+
#include <X11/Xaw/Simple.h>
+_XFUNCPROTOBEGIN
+
+#include <X11/Xaw/XawInit.h>
+
typedef struct {
- Boolean (*change_sensitive)(/* widget */);
+ Bool (*change_sensitive)(Widget);
+#ifndef OLDXAW
+ XtPointer extension;
+#endif
} SimpleClassPart;
-#define XtInheritChangeSensitive ((Boolean (*)())_XtInherit)
+#define XtInheritChangeSensitive ((Bool (*)(Widget))_XtInherit)
typedef struct _SimpleClassRec {
CoreClassPart core_class;
@@ -68,13 +78,18 @@ extern SimpleClassRec simpleClassRec;
typedef struct {
/* resources */
- Cursor cursor;
- Pixmap insensitive_border;
- String cursor_name; /* cursor specified by name. */
-
- Pixel pointer_fg, pointer_bg; /* Pointer colors. */
- Boolean international;
- /* private state */
+ Cursor cursor;
+ Pixmap insensitive_border;
+ String cursor_name; /* cursor specified by name */
+ Pixel pointer_fg, pointer_bg; /* Pointer colors */
+ Boolean international;
+
+ /* private */
+#ifndef OLDXAW
+ XawDisplayList *display_list;
+ String tip;
+ XtPointer pad[3]; /* for future use and keep binary compatability */
+#endif
} SimplePart;
typedef struct _SimpleRec {
@@ -82,4 +97,6 @@ typedef struct _SimpleRec {
SimplePart simple;
} SimpleRec;
+_XFUNCPROTOEND
+
#endif /* _SimpleP_h */
diff --git a/include/X11/Xaw/Sme.h b/include/X11/Xaw/Sme.h
index 8315aa1..dc9a565 100644
--- a/include/X11/Xaw/Sme.h
+++ b/include/X11/Xaw/Sme.h
@@ -23,10 +23,9 @@ Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xaw/Sme.h,v 1.6 2001/12/14 19:54:43 dawes Exp $ */
/*
- * Sme.h - Public Header file for Sme object.
- *
* This is the public header file for the Athena Sme object.
* It is intended to be used with the simple menu widget.
*
@@ -43,13 +42,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Intrinsic.h>
#include <X11/RectObj.h>
-/****************************************************************
- *
- * Sme Object
- *
- ****************************************************************/
-
-/* Simple Menu Entry Resources:
+/* Resources:
Name Class RepType Default Value
---- ----- ------- -------------
@@ -58,7 +51,7 @@ in this Software without prior written authorization from The Open Group.
height Height Dimension 0
sensitive Sensitive Boolean True
width Width Dimension 0
- x Position Position 0n
+ x Position Position 0
y Position Position 0
*/
@@ -72,8 +65,8 @@ in this Software without prior written authorization from The Open Group.
#endif
-typedef struct _SmeClassRec* SmeObjectClass;
-typedef struct _SmeRec* SmeObject;
+typedef struct _SmeClassRec *SmeObjectClass;
+typedef struct _SmeRec *SmeObject;
extern WidgetClass smeObjectClass;
diff --git a/include/X11/Xaw/SmeBSB.h b/include/X11/Xaw/SmeBSB.h
index 0a7bc40..d337755 100644
--- a/include/X11/Xaw/SmeBSB.h
+++ b/include/X11/Xaw/SmeBSB.h
@@ -23,6 +23,7 @@ Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xaw/SmeBSB.h,v 1.7 2001/12/14 19:54:43 dawes Exp $ */
/*
* SmeBSB.h - Public Header file for SmeBSB object.
@@ -42,15 +43,8 @@ in this Software without prior written authorization from The Open Group.
#define _SmeBSB_h
#include <X11/Xmu/Converters.h>
-
#include <X11/Xaw/Sme.h>
-/****************************************************************
- *
- * SmeBSB object
- *
- ****************************************************************/
-
/* BSB Menu Entry Resources:
Name Class RepType Default Value
@@ -63,12 +57,13 @@ in this Software without prior written authorization from The Open Group.
label Label String Name of entry
leftBitmap LeftBitmap Pixmap None
leftMargin HorizontalMargins Dimension 4
+ menuName MenuName String NULL
rightBitmap RightBitmap Pixmap None
rightMargin HorizontalMargins Dimension 4
sensitive Sensitive Boolean True
vertSpace VertSpace int 25
width Width Dimension 0
- x Position Position 0n
+ x Position Position 0
y Position Position 0
*/
@@ -84,6 +79,9 @@ extern WidgetClass smeBSBObjectClass;
#define XtNrightMargin "rightMargin"
#define XtNvertSpace "vertSpace"
+#define XtNmenuName "menuName"
+#define XtCMenuName "MenuName"
+
#ifndef XtNfontSet
#define XtNfontSet "fontSet"
#endif
diff --git a/include/X11/Xaw/SmeBSBP.h b/include/X11/Xaw/SmeBSBP.h
index c3521eb..bc3a65a 100644
--- a/include/X11/Xaw/SmeBSBP.h
+++ b/include/X11/Xaw/SmeBSBP.h
@@ -25,32 +25,19 @@ in this Software without prior written authorization from The Open Group.
*
* Author: Chris D. Peterson, MIT X Consortium
*/
-
-/*
- * SmeP.h - Private definitions for Sme object
- *
- */
+/* $XFree86: xc/lib/Xaw/SmeBSBP.h,v 1.9 2001/12/14 19:54:43 dawes Exp $ */
#ifndef _XawSmeBSBP_h
#define _XawSmeBSBP_h
-/***********************************************************************
- *
+/*
* Sme Object Private Data
- *
- ***********************************************************************/
-
+ */
#include <X11/Xaw/SmeP.h>
#include <X11/Xaw/SmeBSB.h>
-/************************************************************
- *
- * New fields for the Sme Object class record.
- *
- ************************************************************/
-
typedef struct _SmeBSBClassPart {
- XtPointer extension;
+ XtPointer extension;
} SmeBSBClassPart;
/* Full class record declaration */
@@ -65,48 +52,43 @@ extern SmeBSBClassRec smeBSBClassRec;
/* New fields for the Sme Object record */
typedef struct {
/* resources */
- String label; /* The entry label. */
- int vert_space; /* extra vert space to leave, as a percentage
- of the font height of the label. */
- Pixmap left_bitmap, right_bitmap; /* bitmaps to show. */
- Dimension left_margin, right_margin; /* left and right margins. */
- Pixel foreground; /* foreground color. */
- XFontStruct * font; /* The font to show label in. */
- XFontSet fontset; /* or fontset*/
- XtJustify justify; /* Justification for the label. */
-
-/* private resources. */
-
- Boolean set_values_area_cleared; /* Remember if we need to unhighlight. */
- GC norm_gc; /* noral color gc. */
- GC rev_gc; /* reverse color gc. */
- GC norm_gray_gc; /* Normal color (grayed out) gc. */
- GC invert_gc; /* gc for flipping colors. */
-
- Dimension left_bitmap_width; /* size of each bitmap. */
+ String label; /* The entry label */
+ int vert_space; /* extra vert space to leave, as a
+ percentage of the font height of
+ the label */
+ Pixmap left_bitmap, right_bitmap; /* bitmaps to show */
+ Dimension left_margin, right_margin;/* left and right margins */
+ Pixel foreground; /* foreground color */
+ XFontStruct *font; /* The font to show label in */
+ XFontSet fontset; /* or fontset */
+ XtJustify justify; /* Justification for the label. */
+
+ /* private */
+ Boolean set_values_area_cleared; /* do we need to unhighlight? */
+ GC norm_gc; /* noral color gc */
+ GC rev_gc; /* reverse color gc */
+ GC norm_gray_gc; /* Normal color (grayed out) gc */
+ GC invert_gc; /* gc for flipping colors */
+ Dimension left_bitmap_width; /* size of each bitmap */
Dimension left_bitmap_height;
Dimension right_bitmap_width;
Dimension right_bitmap_height;
+#ifndef OLDXAW
+ /* new resources */
+ String menu_name; /* name of nested sub menu or NULL */
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} SmeBSBPart;
-/****************************************************************
- *
+/*
* Full instance record declaration
- *
- ****************************************************************/
-
+ */
typedef struct _SmeBSBRec {
- ObjectPart object;
- RectObjPart rectangle;
- SmePart sme;
- SmeBSBPart sme_bsb;
+ ObjectPart object;
+ RectObjPart rectangle;
+ SmePart sme;
+ SmeBSBPart sme_bsb;
} SmeBSBRec;
-/************************************************************
- *
- * Private declarations.
- *
- ************************************************************/
-
#endif /* _XawSmeBSBP_h */
diff --git a/include/X11/Xaw/SmeLine.h b/include/X11/Xaw/SmeLine.h
index bd529f3..e5d09d3 100644
--- a/include/X11/Xaw/SmeLine.h
+++ b/include/X11/Xaw/SmeLine.h
@@ -24,10 +24,9 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*
*/
+/* $XFree86: xc/lib/Xaw/SmeLine.h,v 1.6 2001/12/14 19:54:43 dawes Exp $ */
/*
- * SmeLine.h - Public Header file for SmeLine object.
- *
* This is the public header file for the Athena SmeLine object.
* It is intended to be used with the simple menu widget.
*
@@ -44,13 +43,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xaw/Sme.h>
#include <X11/Xmu/Converters.h>
-/****************************************************************
- *
- * SmeLine Object
- *
- ****************************************************************/
-
-/* Menu Entry Resources:
+/* Resources:
Name Class RepType Default Value
---- ----- ------- -------------
@@ -59,7 +52,7 @@ in this Software without prior written authorization from The Open Group.
height Height Dimension 0
sensitive Sensitive Boolean True
width Width Dimension 0
- x Position Position 0n
+ x Position Position 0
y Position Position 0
*/
@@ -70,8 +63,8 @@ in this Software without prior written authorization from The Open Group.
#define XtNlineWidth "lineWidth"
#define XtNstipple "stipple"
-typedef struct _SmeLineClassRec* SmeLineObjectClass;
-typedef struct _SmeLineRec* SmeLineObject;
+typedef struct _SmeLineClassRec *SmeLineObjectClass;
+typedef struct _SmeLineRec *SmeLineObject;
extern WidgetClass smeLineObjectClass;
diff --git a/include/X11/Xaw/SmeLineP.h b/include/X11/Xaw/SmeLineP.h
index 32831f7..07f12a7 100644
--- a/include/X11/Xaw/SmeLineP.h
+++ b/include/X11/Xaw/SmeLineP.h
@@ -25,35 +25,23 @@ in this Software without prior written authorization from The Open Group.
*
* Author: Chris D. Peterson, MIT X Consortium
*/
-
-/*
- * SmeLineP.h - Private definitions for SmeLine widget
- *
- */
+/* $XFree86: xc/lib/Xaw/SmeLineP.h,v 1.8 2001/12/14 19:54:43 dawes Exp $ */
#ifndef _XawSmeLineP_h
#define _XawSmeLineP_h
-/***********************************************************************
- *
+/*
* SmeLine Widget Private Data
- *
- ***********************************************************************/
-
+ */
#include <X11/Xaw/SmeP.h>
#include <X11/Xaw/SmeLine.h>
-/************************************************************
- *
- * New fields for the SmeLine widget class record.
- *
- ************************************************************/
-
+/* New fields for the SmeLine widget class */
typedef struct _SmeLineClassPart {
- XtPointer extension;
+ XtPointer extension;
} SmeLineClassPart;
-/* Full class record declaration */
+/* Full class record */
typedef struct _SmeLineClassRec {
RectObjClassPart rect_class;
SmeClassPart sme_class;
@@ -62,35 +50,26 @@ typedef struct _SmeLineClassRec {
extern SmeLineClassRec smeLineClassRec;
-/* New fields for the SmeLine widget record */
+/* New fields for the SmeLine widget */
typedef struct {
/* resources */
- Pixel foreground; /* Foreground color. */
- Pixmap stipple; /* Line Stipple. */
- Dimension line_width; /* Width of the line. */
-
- /* private data. */
-
- GC gc; /* Graphics context for drawing line. */
+ Pixel foreground; /* Foreground color */
+ Pixmap stipple; /* Line Stipple */
+ Dimension line_width; /* Width of the line */
+
+ /* private */
+ GC gc; /* Graphics context for drawing line */
+#ifndef OLDXAW
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} SmeLinePart;
-/****************************************************************
- *
- * Full instance record declaration
- *
- ****************************************************************/
-
+/* Full instance record */
typedef struct _SmeLineRec {
- ObjectPart object;
- RectObjPart rectangle;
- SmePart sme;
- SmeLinePart sme_line;
+ ObjectPart object;
+ RectObjPart rectangle;
+ SmePart sme;
+ SmeLinePart sme_line;
} SmeLineRec;
-/************************************************************
- *
- * Private declarations.
- *
- ************************************************************/
-
#endif /* _XawSmeLineP_h */
diff --git a/include/X11/Xaw/SmeP.h b/include/X11/Xaw/SmeP.h
index 9a5d9fd..02b8018 100644
--- a/include/X11/Xaw/SmeP.h
+++ b/include/X11/Xaw/SmeP.h
@@ -23,10 +23,9 @@ Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xaw/SmeP.h,v 1.9 2001/12/19 21:37:31 dawes Exp $ */
/*
- * SmeP.h - Private Header file for Sme object.
- *
* This is the private header file for the Athena Sme object.
* This object is intended to be used with the simple menu widget.
*
@@ -40,28 +39,24 @@ in this Software without prior written authorization from The Open Group.
#ifndef _XawSmeP_h
#define _XawSmeP_h
-/***********************************************************************
- *
+/*
* Sme Widget Private Data
- *
- ***********************************************************************/
+ */
+#include <X11/Xfuncproto.h>
#include <X11/Xaw/Sme.h>
-/************************************************************
- *
- * New fields for the Sme widget class record.
- *
- ************************************************************/
+_XFUNCPROTOBEGIN
+/* New fields for the Sme widget class */
typedef struct _SmeClassPart {
- void (*highlight)();
- void (*unhighlight)();
- void (*notify)();
- XtPointer extension;
+ XtWidgetProc highlight;
+ XtWidgetProc unhighlight;
+ XtWidgetProc notify;
+ XtPointer extension;
} SmeClassPart;
-/* Full class record declaration */
+/* Full class record */
typedef struct _SmeClassRec {
RectObjClassPart rect_class;
SmeClassPart sme_class;
@@ -69,36 +64,27 @@ typedef struct _SmeClassRec {
extern SmeClassRec smeClassRec;
-/* New fields for the Sme widget record */
+/* New fields for the Sme widget */
typedef struct {
/* resources */
- XtCallbackList callbacks; /* The callback list */
- Boolean international;
-
+ XtCallbackList callbacks;
+ Boolean international;
+#ifndef OLDXAW
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} SmePart;
-/****************************************************************
- *
- * Full instance record declaration
- *
- ****************************************************************/
-
+/* Full instance record */
typedef struct _SmeRec {
- ObjectPart object;
- RectObjPart rectangle;
- SmePart sme;
+ ObjectPart object;
+ RectObjPart rectangle;
+ SmePart sme;
} SmeRec;
-/************************************************************
- *
- * Private declarations.
- *
- ************************************************************/
-
-typedef void (*_XawEntryVoidFunc)();
-
-#define XtInheritHighlight ((_XawEntryVoidFunc) _XtInherit)
+#define XtInheritHighlight ((XtWidgetProc)_XtInherit)
#define XtInheritUnhighlight XtInheritHighlight
#define XtInheritNotify XtInheritHighlight
+_XFUNCPROTOEND
+
#endif /* _XawSmeP_h */
diff --git a/include/X11/Xaw/StripCharP.h b/include/X11/Xaw/StripCharP.h
index 19584cf..062b744 100644
--- a/include/X11/Xaw/StripCharP.h
+++ b/include/X11/Xaw/StripCharP.h
@@ -49,6 +49,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xaw/StripCharP.h,v 1.8 2001/12/14 19:54:43 dawes Exp $ */
#ifndef _XawStripChartP_h
#define _XawStripChartP_h
@@ -57,50 +58,53 @@ SOFTWARE.
#include <X11/Xaw/SimpleP.h>
#define NO_GCS 0
-#define FOREGROUND 1 << 0
-#define HIGHLIGHT 1 << 1
+#define FOREGROUND (1 << 0)
+#define HIGHLIGHT (1 << 1)
#define ALL_GCS (FOREGROUND | HIGHLIGHT)
-/* New fields for the stripChart widget instance record */
-
+/* new fields for the stripChart widget */
typedef struct {
- Pixel fgpixel; /* color index for graph */
- Pixel hipixel; /* color index for lines */
- GC fgGC; /* graphics context for fgpixel */
- GC hiGC; /* graphics context for hipixel */
-
- /* start of graph stuff */
+ /* resources */
+ Pixel fgpixel; /* color index for graph */
+ Pixel hipixel; /* color index for lines */
+ GC fgGC; /* graphics context for fgpixel */
+ GC hiGC; /* graphics context for hipixel */
- int update; /* update frequence */
- int scale; /* scale factor */
- int min_scale; /* smallest scale factor */
- int interval; /* data point interval */
- XPoint * points ; /* Poly point for repairing graph lines. */
- double max_value; /* Max Value in window */
- double valuedata[2048];/* record of data points */
+ /* private */
+ int update; /* update frequence */
+ int scale; /* scale factor */
+ int min_scale; /* smallest scale factor */
+ int interval; /* data point interval */
+ XPoint *points; /* Poly point for repairing graph lines */
+ double max_value; /* Max Value in window */
+ double valuedata[2048]; /* record of data points */
XtIntervalId interval_id;
- XtCallbackList get_value; /* proc to call to fetch load pt */
- int jump_val; /* Amount to jump on each scroll. */
+ XtCallbackList get_value; /* proc to call to fetch load pt */
+ int jump_val; /* Amount to jump on each scroll */
+#ifndef OLDXAW
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} StripChartPart;
-/* Full instance record declaration */
+/* instance record declaration */
typedef struct _StripChartRec {
- CorePart core;
- SimplePart simple;
- StripChartPart strip_chart;
+ CorePart core;
+ SimplePart simple;
+ StripChartPart strip_chart;
} StripChartRec;
-/* New fields for the StripChart widget class record */
-typedef struct {int dummy;} StripChartClassPart;
+/* new fields for the StripChart widget class record */
+typedef struct {
+ XtPointer extension;
+} StripChartClassPart;
-/* Full class record declaration. */
+/* class record declaration */
typedef struct _StripChartClassRec {
- CoreClassPart core_class;
- SimpleClassPart simple_class;
- StripChartClassPart strip_chart_class;
+ CoreClassPart core_class;
+ SimpleClassPart simple_class;
+ StripChartClassPart strip_chart_class;
} StripChartClassRec;
-/* Class pointer. */
extern StripChartClassRec stripChartClassRec;
#endif /* _XawStripChartP_h */
diff --git a/include/X11/Xaw/StripChart.h b/include/X11/Xaw/StripChart.h
index 325a6db..b6c2f0f 100644
--- a/include/X11/Xaw/StripChart.h
+++ b/include/X11/Xaw/StripChart.h
@@ -46,6 +46,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xaw/StripChart.h,v 1.6 2001/12/14 19:54:44 dawes Exp $ */
#ifndef _XawStripChart_h
#define _XawStripChart_h
@@ -116,4 +117,3 @@ typedef struct _StripChartClassRec *StripChartWidgetClass;
extern WidgetClass stripChartWidgetClass;
#endif /* _XawStripChart_h */
-/* DON'T ADD STUFF AFTER THIS #endif */
diff --git a/include/X11/Xaw/Template.c b/include/X11/Xaw/Template.c
index 8f9ba8b..17180d6 100644
--- a/include/X11/Xaw/Template.c
+++ b/include/X11/Xaw/Template.c
@@ -25,69 +25,171 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xaw/Template.c,v 1.9 2001/12/14 19:54:44 dawes Exp $ */
#include <X11/IntrinsicP.h>
#include <X11/StringDefs.h>
-#include "TemplateP.h"
+#include <X11/Xaw/TemplateP.h>
-static XtResource resources[] = {
+/*
+ * Class Methods
+ */
+static void TemplateInitialize(Widget, Widget, ArgList, Cardinal*);
+
+/*
+ * Prototypes
+ */
+static Bool TemplateFunction(TemplateWidget, int, int, Bool);
+
+/*
+ * Actions
+ */
+static void TemplateAction(Widget, XEvent*, String*, Cardinal*);
+
+/*
+ * Initialization
+ */
#define offset(field) XtOffsetOf(TemplateRec, template.field)
- /* {name, class, type, size, offset, default_type, default_addr}, */
- { XtNtemplateResource, XtCTemplateResource, XtRTemplateResource,
- sizeof(char*), offset(resource), XtRString, (XtPointer) "default" },
-#undef offset
+static XtResource resources[] = {
+/*{
+ name,
+ class,
+ type,
+ size,
+ offset,
+ default_type,
+ default_addr
+ },*/
+ {
+ XtNtemplateResource,
+ XtCTemplateResource,
+ XtRTemplateResource,
+ sizeof(char*),
+ offset(resource),
+ XtRString,
+ (XtPointer)"default"
+ },
};
-
-static void TemplateAction(/* Widget, XEvent*, String*, Cardinal* */);
+#undef offset
static XtActionsRec actions[] =
{
- /* {name, procedure}, */
+ /*{name, procedure},*/
{"template", TemplateAction},
};
static char translations[] =
-"<Key>: template() \n\
-";
+"<Key>:" "template()\n"
+;
+#define Superclass (&widgetClassRec)
TemplateClassRec templateClassRec = {
- { /* core fields */
- /* superclass */ (WidgetClass) &widgetClassRec,
- /* class_name */ "Template",
- /* widget_size */ sizeof(TemplateRec),
- /* class_initialize */ NULL,
- /* class_part_initialize */ NULL,
- /* class_inited */ FALSE,
- /* initialize */ NULL,
- /* initialize_hook */ NULL,
- /* realize */ XtInheritRealize,
- /* actions */ actions,
- /* num_actions */ XtNumber(actions),
- /* resources */ resources,
- /* num_resources */ XtNumber(resources),
- /* xrm_class */ NULLQUARK,
- /* compress_motion */ TRUE,
- /* compress_exposure */ TRUE,
- /* compress_enterleave */ TRUE,
- /* visible_interest */ FALSE,
- /* destroy */ NULL,
- /* resize */ NULL,
- /* expose */ NULL,
- /* set_values */ NULL,
- /* set_values_hook */ NULL,
- /* set_values_almost */ XtInheritSetValuesAlmost,
- /* get_values_hook */ NULL,
- /* accept_focus */ NULL,
- /* version */ XtVersion,
- /* callback_private */ NULL,
- /* tm_table */ translations,
- /* query_geometry */ XtInheritQueryGeometry,
- /* display_accelerator */ XtInheritDisplayAccelerator,
- /* extension */ NULL
+ /* core */
+ {
+ (WidgetClass)Superclass, /* superclass */
+ "Template", /* class_name */
+ sizeof(TemplateRec), /* widget_size */
+ NULL, /* class_initialize */
+ NULL, /* class_part_initialize */
+ False, /* class_inited */
+ TemplateInitialize, /* initialize */
+ NULL, /* initialize_hook */
+ XtInheritRealize, /* realize */
+ actions, /* actions */
+ XtNumber(actions), /* num_actions */
+ resources, /* resources */
+ XtNumber(resources), /* num_resources */
+ NULLQUARK, /* xrm_class */
+ True, /* compress_motion */
+ True, /* compress_exposure */
+ True, /* compress_enterleave */
+ False, /* visible_interest */
+ NULL, /* destroy */
+ NULL, /* resize */
+ NULL, /* expose */
+ NULL, /* set_values */
+ NULL, /* set_values_hook */
+ XtInheritSetValuesAlmost, /* set_values_almost */
+ NULL, /* get_values_hook */
+ NULL, /* accept_focus */
+ XtVersion, /* version */
+ NULL, /* callback_private */
+ translations, /* tm_table */
+ XtInheritQueryGeometry, /* query_geometry */
+ XtInheritDisplayAccelerator, /* display_accelerator */
+ NULL, /* extension */
},
- { /* template fields */
- /* empty */ 0
+ /* template */
+ {
+ NULL, /* extension */
}
};
WidgetClass templateWidgetClass = (WidgetClass)&templateClassRec;
+
+/*
+ * Implementation
+ */
+/*
+ * Function:
+ * TemplateInitialize
+ *
+ * Parameters:
+ * request - requested widget
+ * w - the widget
+ * args - arguments
+ * num_args - number of arguments
+ *
+ * Description:
+ * Initializes widget instance.
+ */
+/*ARGSUSED*/
+static void
+TemplateInitialize(Widget request, Widget w, ArgList args, Cardinal *num_args)
+{
+ TemplateWidget tw = (TemplateWidget)w;
+
+ tw->template.private = NULL;
+}
+
+/*
+ * Function:
+ * TemplateFunction
+ *
+ * Parameters:
+ * tw - template widget
+ * x - x coordinate
+ * y - y coordinate
+ * force - force action
+ *
+ * Description:
+ * This function does nothing.
+ *
+ * Return:
+ * Parameter force
+ */
+/*ARGSUSED*/
+static Bool
+TemplateFunction(TemplateWidget tw, int x, int y, Bool force)
+{
+ return (force);
+}
+
+/*
+ * Function:
+ * TemplateAction
+ *
+ * Parameters:
+ * w - template widget
+ * event - event that caused this action
+ * params - parameters
+ * num_params - number of parameters
+ *
+ * Description:
+ * This function does nothing.
+ */
+/*ARGSUSED*/
+static void
+TemplateAction(Widget w, XEvent *event, String *params, Cardinal *num_params)
+{
+}
diff --git a/include/X11/Xaw/Template.h b/include/X11/Xaw/Template.h
index d51e228..ec2df82 100644
--- a/include/X11/Xaw/Template.h
+++ b/include/X11/Xaw/Template.h
@@ -25,6 +25,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xaw/Template.h,v 1.6 2001/12/14 19:54:44 dawes Exp $ */
#ifndef _Template_h
#define _Template_h
@@ -55,18 +56,15 @@ in this Software without prior written authorization from The Open Group.
*/
/* define any special resource names here that are not in <X11/StringDefs.h> */
-
#define XtNtemplateResource "templateResource"
#define XtCTemplateResource "TemplateResource"
/* declare specific TemplateWidget class and instance datatypes */
-
-typedef struct _TemplateClassRec* TemplateWidgetClass;
-typedef struct _TemplateRec* TemplateWidget;
+typedef struct _TemplateClassRec *TemplateWidgetClass;
+typedef struct _TemplateRec *TemplateWidget;
/* declare the class constant */
-
extern WidgetClass templateWidgetClass;
#endif /* _Template_h */
diff --git a/include/X11/Xaw/TemplateP.h b/include/X11/Xaw/TemplateP.h
index 08488ed..29e36fb 100644
--- a/include/X11/Xaw/TemplateP.h
+++ b/include/X11/Xaw/TemplateP.h
@@ -25,21 +25,21 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
-
+/* $XFree86: xc/lib/Xaw/TemplateP.h,v 1.7 2001/12/14 19:54:44 dawes Exp $ */
#ifndef _TemplateP_h
#define _TemplateP_h
#include <X11/Xaw/Template.h>
+
/* include superclass private header file */
#include <X11/CoreP.h>
/* define unique representation types not found in <X11/StringDefs.h> */
-
#define XtRTemplateResource "TemplateResource"
typedef struct {
- int empty;
+ XtPointer extension;
} TemplateClassPart;
typedef struct _TemplateClassRec {
@@ -52,7 +52,8 @@ extern TemplateClassRec templateClassRec;
typedef struct {
/* resources */
char* resource;
- /* private state */
+ /* private */
+ char *private;
} TemplatePart;
typedef struct _TemplateRec {
diff --git a/include/X11/Xaw/Text.h b/include/X11/Xaw/Text.h
index 84f2a3f..b04175a 100644
--- a/include/X11/Xaw/Text.h
+++ b/include/X11/Xaw/Text.h
@@ -46,6 +46,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xaw/Text.h,v 1.15 2001/12/14 19:54:44 dawes Exp $ */
#ifndef _XawText_h
#define _XawText_h
@@ -53,7 +54,6 @@ SOFTWARE.
#include <X11/Xaw/Simple.h>
/*
- Text widget
Class: textWidgetClass
Class Name: Text
@@ -67,11 +67,14 @@ SOFTWARE.
bottomMargin Margin Position 2
displayPosition TextPosition XawTextPosition 0
insertPosition TextPosition XawTextPosition 0
+ justify JustifyMode JustifyMode left
+ leftColumn Column Column 0
+ rightColumn Column Column 0
leftMargin Margin Position 2
- resize Resize XawTextResizeMode XawTextResizeNever
rightMargin Margin Position 4
- scrollHorizontal Scroll XawTextScrollMode XawtextScrollNever
- scrollVertical Scroll XawTextScrollMode XawtextScrollNever
+ positionCallback Callback Callback NULL
+ scrollHorizontal Scroll Boolean False
+ scrollVertical Scroll Boolean False
selectTypes SelectTypes Pointer see documentation
textSink TextSink Widget NULL
textSource TextSource Widget NULL
@@ -83,26 +86,82 @@ SOFTWARE.
typedef long XawTextPosition;
-typedef enum { XawtextScrollNever,
- XawtextScrollWhenNeeded, XawtextScrollAlways} XawTextScrollMode;
-
-typedef enum { XawtextWrapNever,
- XawtextWrapLine, XawtextWrapWord} XawTextWrapMode;
-
-typedef enum { XawtextResizeNever, XawtextResizeWidth,
- XawtextResizeHeight, XawtextResizeBoth} XawTextResizeMode;
+#ifndef notdef
+typedef enum {
+ XawtextScrollNever,
+ XawtextScrollWhenNeeded,
+ XawtextScrollAlways
+} XawTextScrollMode;
+
+typedef enum {
+ XawtextResizeNever,
+ XawtextResizeWidth,
+ XawtextResizeHeight,
+ XawtextResizeBoth
+} XawTextResizeMode;
+#endif
-typedef enum {XawsdLeft, XawsdRight} XawTextScanDirection;
-typedef enum {XawtextRead, XawtextAppend, XawtextEdit} XawTextEditType;
-typedef enum {XawselectNull, XawselectPosition, XawselectChar, XawselectWord,
- XawselectLine, XawselectParagraph, XawselectAll} XawTextSelectType;
+typedef enum {
+ XawtextWrapNever,
+ XawtextWrapLine,
+ XawtextWrapWord
+} XawTextWrapMode;
+
+typedef enum {
+ XawsdLeft,
+ XawsdRight
+} XawTextScanDirection;
+
+typedef enum {
+ XawtextRead,
+ XawtextAppend,
+ XawtextEdit
+} XawTextEditType;
+
+typedef enum {
+ XawselectNull,
+ XawselectPosition,
+ XawselectChar,
+ XawselectWord,
+ XawselectLine,
+ XawselectParagraph,
+ XawselectAll,
+ XawselectAlphaNumeric
+} XawTextSelectType;
+
+typedef enum {
+ XawjustifyLeft,
+ XawjustifyRight,
+ XawjustifyCenter,
+ XawjustifyFull
+} XawTextJustifyMode;
typedef struct {
int firstPos;
int length;
char *ptr;
unsigned long format;
- } XawTextBlock, *XawTextBlockPtr;
+} XawTextBlock, *XawTextBlockPtr;
+
+#ifndef OLDXAW
+typedef struct {
+ int line_number;
+ int column_number;
+ XawTextPosition insert_position;
+ XawTextPosition last_position;
+ Boolean overwrite_mode;
+} XawTextPositionInfo;
+
+typedef struct {
+ XawTextPosition left, right;
+ XawTextBlock *block;
+} XawTextPropertyInfo;
+
+typedef struct _XawTextAnchor XawTextAnchor;
+typedef struct _XawTextEntity XawTextEntity;
+typedef struct _XawTextProperty XawTextProperty;
+typedef struct _XawTextPropertyList XawTextPropertyList;
+#endif
#include <X11/Xaw/TextSink.h>
#include <X11/Xaw/TextSrc.h>
@@ -110,16 +169,15 @@ typedef struct {
#define XtEtextScrollNever "never"
#define XtEtextScrollWhenNeeded "whenneeded"
#define XtEtextScrollAlways "always"
-
-#define XtEtextWrapNever "never"
-#define XtEtextWrapLine "line"
-#define XtEtextWrapWord "word"
-
#define XtEtextResizeNever "never"
#define XtEtextResizeWidth "width"
#define XtEtextResizeHeight "height"
#define XtEtextResizeBoth "both"
+#define XtEtextWrapNever "never"
+#define XtEtextWrapLine "line"
+#define XtEtextWrapWord "word"
+
#define XtNautoFill "autoFill"
#define XtNbottomMargin "bottomMargin"
#define XtNdialogHOffset "dialogHOffset"
@@ -128,41 +186,56 @@ typedef struct {
#define XtNdisplayPosition "displayPosition"
#define XtNleftMargin "leftMargin"
#define XtNrightMargin "rightMargin"
+#define XtNpositionCallback "positionCallback"
#define XtNscrollVertical "scrollVertical"
#define XtNscrollHorizontal "scrollHorizontal"
#define XtNselectTypes "selectTypes"
#define XtNtopMargin "topMargin"
#define XtNwrap "wrap"
+#define XtCColumn "Column"
+#define XtNleftColumn "leftColumn"
+#define XtNrightColumn "rightColumn"
+
+#define XtCJustifyMode XtCJustify
+#define XtNjustifyMode XtNjustify
+#define XtEtextJustifyLeft "left"
+#define XtEtextJustifyRight "right"
+#define XtEtextJustifyCenter "center"
+#define XtEtextJustifyFull "full"
+
#define XtCAutoFill "AutoFill"
-#define XtCScroll "Scroll"
#define XtCSelectTypes "SelectTypes"
#define XtCWrap "Wrap"
+#ifndef notdef
+#define XtCScroll "Scroll"
+#endif
#ifndef _XtStringDefs_h_
#define XtNinsertPosition "insertPosition"
+#ifndef notdef
#define XtNresize "resize"
-#define XtNselection "selection"
#define XtCResize "Resize"
#endif
+#define XtNselection "selection"
+#endif
-/* Return Error code for XawTextSearch */
-
+/* return Error code for XawTextSearch */
#define XawTextSearchError (-12345L)
-/* Return codes from XawTextReplace */
-
+/* return codes from XawTextReplace */
#define XawReplaceError -1
#define XawEditDone 0
#define XawEditError 1
#define XawPositionError 2
+/* XrmQuark is not unsigned long */
+#define XawTextFormat(tw,fmt) ((unsigned long)_XawTextFormat(tw) == (fmt))
+
extern unsigned long FMT8BIT;
extern unsigned long XawFmt8Bit;
extern unsigned long XawFmtWide;
-/* Class record constants */
-
extern WidgetClass textWidgetClass;
typedef struct _TextClassRec *TextWidgetClass;
@@ -170,140 +243,131 @@ typedef struct _TextRec *TextWidget;
_XFUNCPROTOBEGIN
-extern XrmQuark _XawTextFormat(
-#if NeedFunctionPrototypes
- TextWidget /* tw */
-#endif
-);
-
-extern void XawTextDisplay(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
-);
-
-extern void XawTextEnableRedisplay(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
-);
-
-extern void XawTextDisableRedisplay(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
-);
-
-extern void XawTextSetSelectionArray(
-#if NeedFunctionPrototypes
- Widget /* w */,
- XawTextSelectType* /* sarray */
-#endif
-);
-
-extern void XawTextGetSelectionPos(
-#if NeedFunctionPrototypes
- Widget /* w */,
- XawTextPosition* /* begin_return */,
- XawTextPosition* /* end_return */
-#endif
-);
-
-extern void XawTextSetSource(
-#if NeedFunctionPrototypes
- Widget /* w */,
- Widget /* source */,
- XawTextPosition /* position */
-#endif
-);
-
-extern int XawTextReplace(
-#if NeedFunctionPrototypes
- Widget /* w */,
- XawTextPosition /* start */,
- XawTextPosition /* end */,
- XawTextBlock* /* text */
-#endif
-);
-
-extern XawTextPosition XawTextTopPosition(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
-);
-
-extern void XawTextSetInsertionPoint(
-#if NeedFunctionPrototypes
- Widget /* w */,
- XawTextPosition /* position */
-#endif
-);
-
-extern XawTextPosition XawTextGetInsertionPoint(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
-);
-
-extern void XawTextUnsetSelection(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
+XrmQuark _XawTextFormat
+(
+ TextWidget tw
+ );
+
+void XawTextDisplay
+(
+ Widget w
+ );
+
+void XawTextEnableRedisplay
+(
+ Widget w
+ );
+
+void XawTextDisableRedisplay
+(
+ Widget w
+ );
+
+void XawTextSetSelectionArray
+(
+ Widget w,
+ XawTextSelectType *sarray
+ );
+
+void XawTextGetSelectionPos
+(
+ Widget w,
+ XawTextPosition *begin_return,
+ XawTextPosition *end_return
+ );
+
+void XawTextSetSource
+(
+ Widget w,
+ Widget source,
+ XawTextPosition top
+ );
+
+int XawTextReplace
+(
+ Widget w,
+ XawTextPosition start,
+ XawTextPosition end,
+ XawTextBlock *text
+ );
+
+XawTextPosition XawTextTopPosition
+(
+ Widget w
+ );
+
+XawTextPosition XawTextLastPosition
+(
+ Widget w
+ );
+
+void XawTextSetInsertionPoint
+(
+ Widget w,
+ XawTextPosition position
+ );
+
+XawTextPosition XawTextGetInsertionPoint
+(
+ Widget w
+ );
+
+void XawTextUnsetSelection
+(
+ Widget w
+ );
+
+void XawTextSetSelection
+(
+ Widget w,
+ XawTextPosition left,
+ XawTextPosition right
+ );
+
+void XawTextInvalidate
+(
+ Widget w,
+ XawTextPosition from,
+ XawTextPosition to
);
-extern void XawTextSetSelection(
-#if NeedFunctionPrototypes
- Widget /* w */,
- XawTextPosition /* left */,
- XawTextPosition /* right */
-#endif
-);
-
-extern void XawTextInvalidate(
-#if NeedFunctionPrototypes
- Widget /* w */,
- XawTextPosition /* from */,
- XawTextPosition /* to */
-#endif
-);
+Widget XawTextGetSource
+(
+ Widget w
+ );
-extern Widget XawTextGetSource(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
-);
+Widget XawTextGetSink
+(
+ Widget w
+ );
-extern XawTextPosition XawTextSearch(
-#if NeedFunctionPrototypes
- Widget /* w */,
+XawTextPosition XawTextSearch
+(
+ Widget w,
#if NeedWidePrototypes
- /* XawTextScanDirection */ int /* dir */,
+ int dir,
#else
- XawTextScanDirection /* dir */,
-#endif
- XawTextBlock* /* text */
+ XawTextScanDirection dir,
#endif
-);
+ XawTextBlock *text
+ );
-extern void XawTextDisplayCaret(
-#if NeedFunctionPrototypes
- Widget /* w */,
+void XawTextDisplayCaret
+(
+ Widget w,
#if NeedWidePrototypes
- /* Boolean */ int /* visible */
+ int visible
#else
- Boolean /* visible */
-#endif
+ Boolean visible
#endif
-);
+ );
_XFUNCPROTOEND
/*
- * For R3 compatability only.
+ * For R3 compatability only
*/
-
#include <X11/Xaw/AsciiSrc.h>
#include <X11/Xaw/AsciiSink.h>
#endif /* _XawText_h */
-/* DON'T ADD STUFF AFTER THIS #endif */
diff --git a/include/X11/Xaw/TextP.h b/include/X11/Xaw/TextP.h
index f679db1..cf11b85 100644
--- a/include/X11/Xaw/TextP.h
+++ b/include/X11/Xaw/TextP.h
@@ -49,117 +49,135 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xaw/TextP.h,v 3.22 2001/12/19 21:37:31 dawes Exp $ */
#ifndef _XawTextP_h
#define _XawTextP_h
+#include <X11/Xfuncproto.h>
+
#include <X11/Xaw/Text.h>
#include <X11/Xaw/SimpleP.h>
-/****************************************************************
- *
- * Text widget private
- *
- ****************************************************************/
-#define MAXCUT 30000 /* Maximum number of characters that can be cut. */
+_XFUNCPROTOBEGIN
+
+#define MAXCUT 30000 /* Maximum number of characters that can be cut */
-#define GETLASTPOS XawTextSourceScan(ctx->text.source, 0, \
- XawstAll, XawsdRight, 1, TRUE)
+#define XawTextGetLastPosition(ctx) \
+ XawTextSourceScan((ctx)->text.source, 0, \
+ XawstAll, XawsdRight, 1, True)
+#define GETLASTPOS XawTextGetLastPosition(ctx)
-#define zeroPosition ((XawTextPosition) 0)
+#define zeroPosition ((XawTextPosition)0)
extern XtActionsRec _XawTextActionsTable[];
extern Cardinal _XawTextActionsTableCount;
-#define XawLF 0x0a
-#define XawCR 0x0d
-#define XawTAB 0x09
-#define XawBS 0x08
-#define XawSP 0x20
-#define XawDEL 0x7f
-#define XawESC 0x1b
+#define XawLF 0x0a
+#define XawCR 0x0d
+#define XawTAB 0x09
+#define XawBS 0x08
+#define XawSP 0x20
+#define XawDEL 0x7f
+#define XawESC 0x1b
#define XawBSLASH '\\'
/* constants that subclasses may want to know */
#define DEFAULT_TEXT_HEIGHT ((Dimension)~0)
+#define DEFAULT_TAB_SIZE 8
/* displayable text management data structures */
-
typedef struct {
- XawTextPosition position;
- Position y;
- Dimension textWidth;
+ XawTextPosition position;
+ Position y;
+#ifndef OLDXAW
+ unsigned int textWidth;
+#else
+ Dimension textWidth;
+#endif
} XawTextLineTableEntry, *XawTextLineTableEntryPtr;
typedef struct {
- XawTextPosition left, right;
+ XawTextPosition left, right;
XawTextSelectType type;
- Atom* selections;
- int atom_count;
- int array_size;
+ Atom *selections;
+ int atom_count;
+ int array_size;
} XawTextSelection;
typedef struct _XawTextSelectionSalt {
- struct _XawTextSelectionSalt *next;
+ struct _XawTextSelectionSalt *next;
XawTextSelection s;
/*
* The element "contents" stores the CT string which is gotten in the
- * function _XawTextSaltAwaySelection().
+ * function _XawTextSaltAwaySelection()
*/
char *contents;
int length;
} XawTextSelectionSalt;
+#ifndef OLDXAW
+typedef struct _XawTextKillRing {
+ struct _XawTextKillRing *next;
+ char *contents;
+ int length;
+ unsigned refcount;
+ unsigned long format;
+} XawTextKillRing;
+
+extern XawTextKillRing *xaw_text_kill_ring;
+#endif
+
/* Line Tables are n+1 long - last position displayed is in last lt entry */
typedef struct {
- XawTextPosition top; /* Top of the displayed text. */
- int lines; /* How many lines in this table. */
- XawTextLineTableEntry *info; /* A dynamic array, one entry per line */
+ XawTextPosition top; /* Top of the displayed text */
+ int lines; /* How many lines in this table */
+#ifndef OLDXAW
+ int base_line; /* line number of first entry */
+#endif
+ XawTextLineTableEntry *info; /* A dynamic array, one entry per line */
} XawTextLineTable, *XawTextLineTablePtr;
-
typedef struct _XawTextMargin {
- Position left, right, top, bottom;
+ Position left, right, top, bottom;
} XawTextMargin;
-#define VMargins(ctx) ( (ctx)->text.margin.top + (ctx)->text.margin.bottom )
-#define HMargins(ctx) ( (ctx)->text.margin.left + (ctx)->text.margin.right )
+typedef struct _XmuScanline XmuTextUpdate;
+
+#define VMargins(ctx) ((ctx)->text.margin.top + (ctx)->text.margin.bottom)
+#define HMargins(ctx) ((ctx)->text.left_margin + (ctx)->text.margin.right)
+#define RVMargins(ctx) ((ctx)->text.r_margin.top + (ctx)->text.r_margin.bottom)
+#define RHMargins(ctx) ((ctx)->text.r_margin.left + (ctx)->text.r_margin.right)
#define IsPositionVisible(ctx, pos) \
- (pos >= ctx->text.lt.info[0].position && \
+(pos >= ctx->text.lt.info[0].position && \
pos < ctx->text.lt.info[ctx->text.lt.lines].position)
/*
- * Search & Replace data structure.
+ * Search & Replace data structure
*/
-
struct SearchAndReplace {
- Boolean selection_changed; /* flag so that the selection cannot be
+ Boolean selection_changed; /* flag so that the selection cannot be
changed out from underneath query-replace.*/
- Widget search_popup; /* The poppup widget that allows searches.*/
- Widget label1; /* The label widgets for the search window. */
- Widget label2;
- Widget left_toggle; /* The left search toggle radioGroup. */
- Widget right_toggle; /* The right search toggle radioGroup. */
- Widget rep_label; /* The Replace label string. */
- Widget rep_text; /* The Replace text field. */
- Widget search_text; /* The Search text field. */
- Widget rep_one; /* The Replace one button. */
- Widget rep_all; /* The Replace all button. */
+ Widget search_popup; /* The poppup widget that allows searches.*/
+ Widget label1; /* The label widgets for the search window. */
+ Widget label2;
+ Widget left_toggle; /* The left search toggle radioGroup. */
+ Widget right_toggle; /* The right search toggle radioGroup. */
+ Widget rep_label; /* The Replace label string. */
+ Widget rep_text; /* The Replace text field. */
+ Widget search_text; /* The Search text field. */
+ Widget rep_one; /* The Replace one button. */
+ Widget rep_all; /* The Replace all button. */
+#ifndef OLDXAW
+ Widget case_sensitive; /* The "Case Sensitive" toggle */
+#endif
};
-
-/* Private Text Definitions */
-
-typedef int (*ActionProc)();
/* New fields for the Text widget class record */
-
-typedef struct {int empty;} TextClassPart;
-
-struct text_move {
- int h, v;
- struct text_move * next;
-};
+typedef struct {
+ XtPointer extension;
+} TextClassPart;
/* Full class record declaration */
typedef struct _TextClassRec {
@@ -173,116 +191,131 @@ extern TextClassRec textClassRec;
/* New fields for the Text widget record */
typedef struct _TextPart {
/* resources */
+ Widget source, sink;
+ XawTextPosition insertPos;
+ XawTextSelection s;
+ XawTextSelectType *sarray; /* Array to cycle for selections */
+ XawTextSelectionSalt *salt; /* salted away selections */
+ int left_margin;
+ int dialog_horiz_offset, dialog_vert_offset; /* position for popup dialog */
+ Boolean display_caret; /* insertion pt visible iff T */
+ Boolean auto_fill; /* Auto fill mode? */
+ XawTextScrollMode scroll_vert, scroll_horiz;
+ XawTextWrapMode wrap; /* The type of wrapping */
+ XawTextResizeMode resize;
+ XawTextMargin r_margin; /* The real margins */
+#ifndef OLDXAW
+ XtCallbackList position_callbacks;
+#else
+ XtPointer pad1;
+#endif
- Widget source, sink;
- XawTextPosition insertPos;
- XawTextSelection s;
- XawTextSelectType *sarray; /* Array to cycle for selections. */
- XawTextSelectionSalt *salt; /* salted away selections */
- int options; /* wordbreak, scroll, etc. */
- int dialog_horiz_offset; /* position for popup dialog */
- int dialog_vert_offset; /* position for popup dialog */
- Boolean display_caret; /* insertion pt visible iff T */
- Boolean auto_fill; /* Auto fill mode? */
- XawTextScrollMode scroll_vert, scroll_horiz; /*what type of scrollbars.*/
- XawTextWrapMode wrap; /* The type of wrapping. */
- XawTextResizeMode resize; /* what to resize */
- XawTextMargin r_margin; /* The real margins. */
- XtCallbackList unrealize_callbacks; /* used for scrollbars */
-
/* private state */
-
- XawTextMargin margin; /* The current margins. */
- XawTextLineTable lt;
+ XawTextMargin margin; /* The current margins */
+ XawTextLineTable lt;
XawTextScanDirection extendDir;
- XawTextSelection origSel; /* the selection being modified */
- Time lasttime; /* timestamp of last processed action */
- Time time; /* time of last key or button action */
- Position ev_x, ev_y; /* x, y coords for key or button action */
- Widget vbar, hbar; /* The scroll bars (none = NULL). */
- struct SearchAndReplace * search;/* Search and replace structure. */
- Widget file_insert; /* The file insert popup widget. */
- XawTextPosition *updateFrom; /* Array of start positions for update. */
- XawTextPosition *updateTo; /* Array of end positions for update. */
- int numranges; /* How many update ranges there are. */
- int maxranges; /* How many ranges we have space for */
- XawTextPosition lastPos; /* Last position of source. */
- GC gc;
- Boolean showposition; /* True if we need to show the position. */
- Boolean hasfocus; /* TRUE if we currently have input focus.*/
- Boolean update_disabled; /* TRUE if display updating turned off */
- Boolean single_char; /* Single character replaced. */
- XawTextPosition old_insert; /* Last insertPos for batched updates */
- short mult; /* Multiplier. */
- struct text_move * copy_area_offsets; /* Text offset area (linked list) */
+ XawTextSelection origSel; /* the selection being modified */
+ Time lasttime; /* timestamp of last processed action */
+ Time time; /* time of last key or button action */
+ Position ev_x, ev_y; /* x, y coords for key or button action */
+ Widget vbar, hbar; /* The scroll bars (none = NULL) */
+ struct SearchAndReplace *search; /* Search and replace structure */
+ Widget file_insert; /* The file insert popup widget */
+ XmuTextUpdate *update; /* Position intervals to update */
+#ifndef OLDXAW
+ int line_number;
+ short column_number;
+ unsigned char kill_ring;
+ Boolean selection_state;
+#else
+ XtPointer pad2;
+ int pad3;
+#endif
+ int from_left; /* Cursor position */
+ XawTextPosition lastPos; /* Last position of source */
+ GC gc;
+ Boolean showposition; /* True if we need to show the position */
+ Boolean hasfocus; /* TRUE if we currently have input focus*/
+ Boolean update_disabled; /* TRUE if display updating turned off */
+ Boolean clear_to_eol; /* Clear to eol when painting text? */
+ XawTextPosition old_insert; /* Last insertPos for batched updates */
+ short mult; /* Multiplier */
+#ifndef OLDXAW
+ XawTextKillRing *kill_ring_ptr;
+#else
+ XtPointer pad4;
+#endif
/* private state, shared w/Source and Sink */
- Boolean redisplay_needed; /* in SetValues */
- XawTextSelectionSalt *salt2; /* salted away selections */
+ Boolean redisplay_needed; /* in SetValues */
+ XawTextSelectionSalt *salt2; /* salted away selections */
+
+#ifndef OLDXAW
+ char numeric;
+ char source_changed;
+ Boolean overwrite; /* Overwrite mode */
+
+ /* new resources and states, for text edition
+ * Note: a fixed width font is required for these resources/states.
+ */
+ short left_column, right_column;
+ XawTextJustifyMode justify;
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} TextPart;
-/*************************************************************
- *
- * Resource types private to Text widget.
- *
- *************************************************************/
-
-#define XtRScrollMode "ScrollMode"
-#define XtRWrapMode "WrapMode"
-#define XtRResizeMode "ResizeMode"
-
-/****************************************************************
- *
- * Full instance record declaration
- *
- ****************************************************************/
+#define XtRWrapMode "WrapMode"
+#define XtRScrollMode "ScrollMode"
+#define XtRResizeMode "ResizeMode"
+#define XtRJustifyMode "JustifyMode"
+/* full instance record */
typedef struct _TextRec {
CorePart core;
SimplePart simple;
TextPart text;
} TextRec;
-/********************************************
- *
+/*
* Semi-private functions
* for use by other Xaw modules only
- *
- *******************************************/
-
-extern void _XawTextBuildLineTable (
-#if NeedFunctionPrototypes
- TextWidget /*ctx*/,
- XawTextPosition /*top pos*/,
- _XtBoolean /* force_rebuild */
-#endif
-);
-
-extern char* _XawTextGetSTRING(
-#if NeedFunctionPrototypes
- TextWidget /*ctx*/,
- XawTextPosition /*left*/,
- XawTextPosition /*right*/
-#endif
-);
-
-extern void _XawTextSaltAwaySelection(
-#if NeedFunctionPrototypes
- TextWidget /*ctx*/,
- Atom* /*selections*/,
- int /*num_atoms*/
-#endif
-);
-
-extern void _XawTextPosToXY(
-#if NeedFunctionPrototypes
- Widget /* w */,
- XawTextPosition /* pos */,
- Position * /* x */,
- Position * /*y */
-#endif
-);
+ */
+void _XawTextBuildLineTable
+(
+ TextWidget ctx,
+ XawTextPosition top_pos,
+ _XtBoolean force_rebuild
+ );
+
+char *_XawTextGetSTRING
+(
+ TextWidget ctx,
+ XawTextPosition left,
+ XawTextPosition right
+ );
+
+void _XawTextSaltAwaySelection
+(
+ TextWidget ctx,
+ Atom *selections,
+ int num_atoms
+ );
+
+void _XawTextPosToXY
+(
+ Widget w,
+ XawTextPosition pos,
+ Position *x,
+ Position *y
+ );
+
+void _XawTextNeedsUpdating
+(
+ TextWidget ctx,
+ XawTextPosition left,
+ XawTextPosition right
+ );
+
+_XFUNCPROTOEND
#endif /* _XawTextP_h */
-
-
diff --git a/include/X11/Xaw/TextSink.h b/include/X11/Xaw/TextSink.h
index f5ce84b..b379de9 100644
--- a/include/X11/Xaw/TextSink.h
+++ b/include/X11/Xaw/TextSink.h
@@ -48,6 +48,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xaw/TextSink.h,v 1.10 2001/12/14 19:54:45 dawes Exp $ */
#ifndef _XawTextSink_h
#define _XawTextSink_h
@@ -67,7 +68,7 @@ SOFTWARE.
font Font XFontStruct * XtDefaultFont
foreground Foreground Pixel XtDefaultForeground
background Background Pixel XtDefaultBackground
-
+ cursorColor Color Pixel XtDefaultForeground
*/
/* Class record constants */
@@ -79,239 +80,285 @@ typedef struct _TextSinkRec *TextSinkObject;
typedef enum {XawisOn, XawisOff} XawTextInsertState;
-/************************************************************
- *
- * Public Functions.
- *
- ************************************************************/
+#ifndef OLDXAW
+#ifndef XtNcursorColor
+#define XtNcursorColor "cursorColor"
+#endif
+#define XawNtextProperties "textProperties"
+#define XawCTextProperties "TextProperties"
+#define XawRTextProperties "XawTextProperties"
+#endif
+
+/*
+ * Public Functions
+ */
_XFUNCPROTOBEGIN
-/* Function Name: XawTextSinkDisplayText
- * Description: Stub function that in subclasses will display text.
- * Arguments: w - the TextSink Object.
- * x, y - location to start drawing text.
- * pos1, pos2 - location of starting and ending points
- * in the text buffer.
- * highlight - hightlight this text?
- * Returns: none.
+/*
+ * Function:
+ * XawTextSinkDisplayText
*
- * This function doesn't actually display anything, it is only a place
- * holder.
+ * Parameters:
+ * w - the TextSink Object
+ * x - location to start drawing text
+ * y - ""
+ * pos1 - location of starting and ending points in the text buffer
+ * pos2 - ""
+ * highlight - hightlight this text?
+ *
+ * Description:
+ * Stub function that in subclasses will display text.
+ *
+ * Note:
+ * This function doesn't actually display anything, it is only a place
+ * holder.
*/
-
-extern void XawTextSinkDisplayText(
-#if NeedFunctionPrototypes
- Widget /* w */,
+void XawTextSinkDisplayText
+(
+ Widget w,
#if NeedWidePrototypes
- /* Position */ int /* x */,
- /* Position */ int /* y */,
+ int x,
+ int y,
#else
- Position /* x */,
- Position /* y */,
+ Position x,
+ Position y,
#endif
- XawTextPosition /* pos1 */,
- XawTextPosition /* pos2 */,
+ XawTextPosition pos1,
+ XawTextPosition pos2,
#if NeedWidePrototypes
- /* Boolean */ int /* highlight */
+ int highlight
#else
- Boolean /* highlight */
-#endif
+ Boolean highlight
#endif
-);
+ );
-/* Function Name: XawTextSinkInsertCursor
- * Description: Places the InsertCursor.
- * Arguments: w - the TextSink Object.
- * x, y - location for the cursor.
- * staye - whether to turn the cursor on, or off.
- * Returns: none.
+/*
+ * Function:
+ * XawTextSinkInsertCursor
+ *
+ * Parameters:
+ * w - the TextSink Object.
+ * x - location for the cursor.
+ * y - ""
+ * state - whether to turn the cursor on, or off
+ *
+ * Description:
+ * Places the InsertCursor.
*
- * This function doesn't actually display anything, it is only a place
- * holder.
+ * Note:
+ * This function doesn't actually display anything, it is only a place
+ * holder.
*/
-
-extern void XawTextSinkInsertCursor(
-#if NeedFunctionPrototypes
- Widget /* w */,
+void XawTextSinkInsertCursor
+(
+ Widget w,
#if NeedWidePrototypes
- /* Position */ int /* x */,
- /* Position */ int /* y */,
- /* XawTextInsertState */ int /* state */
+ int x,
+ int y,
+ int state
#else
- Position /* x */,
- Position /* y */,
- XawTextInsertState /* state */
-#endif
+ Position x,
+ Position y,
+ XawTextInsertState state
#endif
-);
+ );
-/* Function Name: XawTextSinkClearToBackground
- * Description: Clears a region of the sink to the background color.
- * Arguments: w - the TextSink Object.
- * x, y - location of area to clear.
- * width, height - size of area to clear
- * Returns: void.
+/*
+ * Function:
+ * XawTextSinkClearToBackground
*
- * This function doesn't actually display anything, it is only a place
- * holder.
+ * Parameters:
+ * w - TextSink Object
+ * x - location of area to clear
+ * y - ""
+ * width - size of area to clear
+ * height - ""
+ *
+ * Description:
+ * Clears a region of the sink to the background color.
+ *
+ * Note:
+ * This function doesn't actually display anything, it is only a place
+ * holder.
*/
-
-extern void XawTextSinkClearToBackground(
-#if NeedFunctionPrototypes
- Widget /* w */,
+void XawTextSinkClearToBackground
+(
+ Widget w,
#if NeedWidePrototypes
- /* Position */ int /* x */,
- /* Position */ int /* y */,
- /* Dimension */ int /* width */,
- /* Dimension */ int /* height */
+ int x,
+ int y,
+ unsigned int width,
+ unsigned int height
#else
- Position /* x */,
- Position /* y */,
- Dimension /* width */,
- Dimension /* height */
-#endif
+ Position x,
+ Position y,
+ Dimension width,
+ Dimension height
#endif
-);
+ );
-/* Function Name: XawTextSinkFindPosition
- * Description: Finds a position in the text.
- * Arguments: w - the TextSink Object.
- * fromPos - reference position.
- * fromX - reference location.
- * width, - width of section to paint text.
- * stopAtWordBreak - returned position is a word break?
- * resPos - Position to return. *** RETURNED ***
- * resWidth - Width actually used. *** RETURNED ***
- * resHeight - Height actually used. *** RETURNED ***
- * Returns: none (see above).
+/*
+ * Function:
+ * XawTextSinkFindPosition
+ *
+ * Parameters:
+ * w - TextSink Object
+ * fromPos - reference position
+ * fromX - reference location
+ * width - width of section to paint text
+ * stopAtWordBreak - returned position is a word break?
+ * resPos - Position to return
+ * resWidth - Width actually used
+ * resHeight - Height actually used
+ *
+ * Description:
+ * Finds a position in the text.
*/
-
-extern void XawTextSinkFindPosition(
-#if NeedFunctionPrototypes
- Widget /* w */,
- XawTextPosition /* fromPos */,
- int /* fromX */,
- int /* width */,
+void XawTextSinkFindPosition
+(
+ Widget w,
+ XawTextPosition fromPos,
+ int fromX,
+ int width,
#if NeedWidePrototypes
- /* Boolean */ int /* stopAtWordBreak */,
+ int stopAtWordBreak,
#else
- Boolean /* stopAtWordBreak */,
-#endif
- XawTextPosition* /* pos_return */,
- int* /* width_return */,
- int* /* height_return */
+ Boolean stopAtWordBreak,
#endif
-);
+ XawTextPosition* pos_return,
+ int *width_return,
+ int *height_return
+ );
-/* Function Name: XawTextSinkFindDistance
- * Description: Find the Pixel Distance between two text Positions.
- * Arguments: w - the TextSink Object.
- * fromPos - starting Position.
- * fromX - x location of starting Position.
- * toPos - end Position.
- * resWidth - Distance between fromPos and toPos.
- * resPos - Acutal toPos used.
- * resHeight - Height required by this text.
- * Returns: none.
+/*
+ * Function:
+ * XawTextSinkFindDistance
+ *
+ * Parameters:
+ * w - TextSink Object
+ * fromPos - starting Position
+ * fromX - x location of starting Position
+ * toPos - end Position
+ * resWidth - Distance between fromPos and toPos
+ * resPos - Acutal toPos used
+ * resHeight - Height required by this text
+ *
+ * Description:
+ * Find the Pixel Distance between two text Positions.
*/
+void XawTextSinkFindDistance
+(
+ Widget w,
+ XawTextPosition fromPos,
+ int fromX,
+ XawTextPosition toPos,
+ int *width_return,
+ XawTextPosition *pos_return,
+ int *height_return
+ );
-extern void XawTextSinkFindDistance (
-#if NeedFunctionPrototypes
- Widget /* w */,
- XawTextPosition /* fromPos */,
- int /* fromX */,
- XawTextPosition /* toPos */,
- int* /* width_return */,
- XawTextPosition* /* pos_return */,
- int* /* height_return */
-#endif
-);
-
-/* Function Name: XawTextSinkResolve
- * Description: Resloves a location to a position.
- * Arguments: w - the TextSink Object.
- * pos - a reference Position.
- * fromx - a reference Location.
- * width - width to move.
- * resPos - the resulting position.
- * Returns: none
+/*
+ * Function:
+ * XawTextSinkResolve
+ *
+ * Parameters:
+ * w - TextSink Object
+ * pos - reference Position
+ * fromx - reference Location
+ * width - width to move
+ * resPos - resulting position
+ *
+ * Description:
+ * Resloves a location to a position.
*/
+void XawTextSinkResolve
+(
+ Widget w,
+ XawTextPosition fromPos,
+ int fromX,
+ int width,
+ XawTextPosition *pos_return
+ );
-extern void XawTextSinkResolve(
-#if NeedFunctionPrototypes
- Widget /* w */,
- XawTextPosition /* fromPos */,
- int /* fromX */,
- int /* width */,
- XawTextPosition* /* pos_return */
-#endif
-);
-
-/* Function Name: XawTextSinkMaxLines
- * Description: Finds the Maximum number of lines that will fit in
- * a given height.
- * Arguments: w - the TextSink Object.
- * height - height to fit lines into.
- * Returns: the number of lines that will fit.
+/*
+ * Function:
+ * XawTextSinkMaxLines
+ *
+ * Parameters:
+ * w - TextSink Object
+ * height - height to fit lines into
+ *
+ * Returns:
+ * Number of lines that will fit
+ *
+ * Description:
+ * Finds the Maximum number of lines that will fit in a given height.
*/
-
-extern int XawTextSinkMaxLines(
-#if NeedFunctionPrototypes
- Widget /* w */,
+int XawTextSinkMaxLines
+(
+ Widget w,
#if NeedWidePrototypes
- /* Dimension */ int /* height */
+ unsigned int height
#else
- Dimension /* height */
+ Dimension height
#endif
-#endif
-);
+ );
-/* Function Name: XawTextSinkMaxHeight
- * Description: Finds the Minium height that will contain a given number
- * lines.
- * Arguments: w - the TextSink Object.
- * lines - the number of lines.
- * Returns: the height.
+/*
+ * Function:
+ * XawTextSinkMaxHeight
+ *
+ * Parameters:
+ * w - TextSink Object
+ * lines - number of lines
+ *
+ * Returns:
+ * Height
+ *
+ * Description:
+ * Finds the Minium height that will contain a given number lines.
*/
-
-extern int XawTextSinkMaxHeight(
-#if NeedFunctionPrototypes
- Widget /* w */,
- int /* lines */
-#endif
+int XawTextSinkMaxHeight
+(
+ Widget w,
+ int lines
);
-/* Function Name: XawTextSinkSetTabs
- * Description: Sets the Tab stops.
- * Arguments: w - the TextSink Object.
- * tab_count - the number of tabs in the list.
- * tabs - the text positions of the tabs.
- * Returns: none
+/*
+ * Function:
+ * XawTextSinkSetTabs
+ *
+ * Parameters:
+ * w - TextSink Object
+ * tab_count - number of tabs in the list
+ * tabs - text positions of the tabs
+ * Description:
+ * Sets the Tab stops.
*/
-
-extern void XawTextSinkSetTabs(
-#if NeedFunctionPrototypes
- Widget /* w */,
- int /* tab_count */,
- int* /* tabs */
-#endif
+void XawTextSinkSetTabs
+(
+ Widget w,
+ int tab_count,
+ int *tabs
);
-/* Function Name: XawTextSinkGetCursorBounds
- * Description: Finds the bounding box for the insert curor (caret).
- * Arguments: w - the TextSinkObject.
- * rect - an X rectance containing the cursor bounds.
- * Returns: none (fills in rect).
+/*
+ * Function:
+ * XawTextSinkGetCursorBounds
+ *
+ * Parameters:
+ * w - TextSink Object
+ * rect - X rectance containing the cursor bounds
+ * Description:
+ * Finds the bounding box for the insert curor (caret).
*/
-
-extern void XawTextSinkGetCursorBounds(
-#if NeedFunctionPrototypes
- Widget /* w */,
- XRectangle* /* rect_return */
-#endif
+void XawTextSinkGetCursorBounds
+(
+ Widget w,
+ XRectangle *rect_return
);
_XFUNCPROTOEND
-#endif /* _XawTextSrc_h */
+#endif /* _XawTextSink_h */
diff --git a/include/X11/Xaw/TextSinkP.h b/include/X11/Xaw/TextSinkP.h
index 9645145..122f7da 100644
--- a/include/X11/Xaw/TextSinkP.h
+++ b/include/X11/Xaw/TextSinkP.h
@@ -49,45 +49,153 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-
-/*
- * TextSinkP.h - Private definitions for TextSink object
- *
- */
+/* $XFree86: xc/lib/Xaw/TextSinkP.h,v 1.12 2001/12/14 19:54:45 dawes Exp $ */
#ifndef _XawTextSinkP_h
#define _XawTextSinkP_h
-/***********************************************************************
- *
+/*
* TextSink Object Private Data
- *
- ***********************************************************************/
-
+ */
#include <X11/Xaw/TextSink.h>
-#include <X11/Xaw/TextP.h> /* This source works with the Text widget. */
-#include <X11/Xaw/TextSrcP.h> /* This source works with the Text Source. */
+#include <X11/Xaw/TextP.h> /* This sink works with the Text widget */
+#include <X11/Xaw/TextSrcP.h> /* This sink works with the Text Source */
+#include <X11/Xmu/Xmu.h>
+
+#ifndef OLDXAW
+/* font/fontset defined? */
+#define XAW_TPROP_FONT (1<<0)
+#define XAW_TPROP_FONTSET (1<<1)
+
+/* extra attributes */
+#define XAW_TPROP_FOREGROUND (1<<2)
+#define XAW_TPROP_BACKGROUND (1<<3)
+#define XAW_TPROP_FPIXMAP (1<<4)
+#define XAW_TPROP_BPIXMAP (1<<5)
+#define XAW_TPROP_UNDERLINE (1<<6)
+#define XAW_TPROP_OVERSTRIKE (1<<7)
+#define XAW_TPROP_SUBSCRIPT (1<<8)
+#define XAW_TPROP_SUPERSCRIPT (1<<9)
+
+/* xlfd attributes */
+#define XAW_TPROP_FOUNDRY (1<<0)
+#define XAW_TPROP_FAMILY (1<<1)
+#define XAW_TPROP_WEIGHT (1<<2)
+#define XAW_TPROP_SLANT (1<<3)
+#define XAW_TPROP_SETWIDTH (1<<4)
+#define XAW_TPROP_ADDSTYLE (1<<5)
+#define XAW_TPROP_PIXELSIZE (1<<6)
+#define XAW_TPROP_POINTSIZE (1<<7)
+#define XAW_TPROP_RESX (1<<8)
+#define XAW_TPROP_RESY (1<<9)
+#define XAW_TPROP_SPACING (1<<10)
+#define XAW_TPROP_AVGWIDTH (1<<11)
+#define XAW_TPROP_REGISTRY (1<<12)
+#define XAW_TPROP_ENCODING (1<<13)
+struct _XawTextProperty { /* to be extended/modified */
+ XrmQuark identifier, code;
+ unsigned long mask;
+ XFontStruct *font;
+ XFontSet fontset;
+ Pixel foreground, background;
+ Pixmap foreground_pixmap, background_pixmap;
+ XrmQuark xlfd;
+
+ unsigned long xlfd_mask;
+ XrmQuark foundry, family, weight, slant, setwidth, addstyle, pixel_size,
+ point_size, res_x, res_y, spacing, avgwidth, registry, encoding;
+
+ short underline_position, underline_thickness;
+};
+
+struct _XawTextPropertyList {
+ XrmQuark identifier;
+ Screen *screen;
+ Colormap colormap;
+ int depth;
+ XawTextProperty **properties;
+ Cardinal num_properties;
+ XawTextPropertyList *next;
+};
+
+typedef struct _XawTextPaintStruct XawTextPaintStruct;
+struct _XawTextPaintStruct {
+ XawTextPaintStruct *next;
+ int x, y, width;
+ char *text; /* formatted text */
+ Cardinal length; /* length of text */
+ XawTextProperty *property;
+ int max_ascent, max_descent;
+ XmuArea *backtabs;
+ Boolean highlight;
+};
+
+typedef struct {
+ XmuArea *clip, *hightabs; /* clip list */
+ XawTextPaintStruct *paint, *bearings; /* drawing information */
+} XawTextPaintList;
+
+typedef struct {
+ XtPointer next_extension;
+ XrmQuark record_type;
+ long version;
+ Cardinal record_size;
+ Bool (*BeginPaint)(Widget);
+ void (*PreparePaint)(Widget, int, int,
+ XawTextPosition, XawTextPosition, Bool);
+ void (*DoPaint)(Widget);
+ Bool (*EndPaint)(Widget);
+} TextSinkExtRec, *TextSinkExt;
+#endif
+
+typedef void (*_XawSinkDisplayTextProc)
+ (Widget, int, int, XawTextPosition, XawTextPosition, Bool);
+
+typedef void (*_XawSinkInsertCursorProc)
+ (Widget, int, int, XawTextInsertState);
-/************************************************************
- *
- * New fields for the TextSink object class record.
- *
- ************************************************************/
+typedef void (*_XawSinkClearToBackgroundProc)
+ (Widget, int, int, unsigned int, unsigned int);
+
+typedef void (*_XawSinkFindPositionProc)
+ (Widget, XawTextPosition, int, int, Bool, XawTextPosition*, int*, int*);
+
+typedef void (*_XawSinkFindDistanceProc)
+ (Widget, XawTextPosition, int, XawTextPosition, int*,
+ XawTextPosition*, int*);
+
+typedef void (*_XawSinkResolveProc)
+ (Widget, XawTextPosition, int, int, XawTextPosition*);
+
+typedef int (*_XawSinkMaxLinesProc)
+ (Widget, unsigned int);
+
+typedef int (*_XawSinkMaxHeightProc)
+ (Widget, int);
+
+typedef void (*_XawSinkSetTabsProc)
+ (Widget, int, short*);
+
+typedef void (*_XawSinkGetCursorBoundsProc)
+ (Widget, XRectangle*);
typedef struct _TextSinkClassPart {
- void (*DisplayText)();
- void (*InsertCursor)();
- void (*ClearToBackground)();
- void (*FindPosition)();
- void (*FindDistance)();
- void (*Resolve)();
- int (*MaxLines)();
- int (*MaxHeight)();
- void (*SetTabs)();
- void (*GetCursorBounds)();
+ _XawSinkDisplayTextProc DisplayText;
+ _XawSinkInsertCursorProc InsertCursor;
+ _XawSinkClearToBackgroundProc ClearToBackground;
+ _XawSinkFindPositionProc FindPosition;
+ _XawSinkFindDistanceProc FindDistance;
+ _XawSinkResolveProc Resolve;
+ _XawSinkMaxLinesProc MaxLines;
+ _XawSinkMaxHeightProc MaxHeight;
+ _XawSinkSetTabsProc SetTabs;
+ _XawSinkGetCursorBoundsProc GetCursorBounds;
+#ifndef OLDXAW
+ TextSinkExt extension;
+#endif
} TextSinkClassPart;
-/* Full class record declaration */
+/* Full class record */
typedef struct _TextSinkClassRec {
ObjectClassPart object_class;
TextSinkClassPart text_sink_class;
@@ -95,48 +203,104 @@ typedef struct _TextSinkClassRec {
extern TextSinkClassRec textSinkClassRec;
-/* New fields for the TextSink object record */
+/* New fields for the TextSink object */
typedef struct {
/* resources */
- Pixel foreground; /* Foreground color. */
- Pixel background; /* Background color. */
+ Pixel foreground; /* Foreground color */
+ Pixel background; /* Background color */
- /* private state. */
- Position *tabs; /* The tab stops as pixel values. */
- short *char_tabs; /* The tabs stops as character values. */
- int tab_count; /* number of items in tabs */
+ /* private */
+ Position *tabs; /* The tab stops as pixel values */
+ short *char_tabs; /* The tabs stops as character values */
+ int tab_count; /* number of items in tabs */
+#ifndef OLDXAW
+ /* more resources */
+ Pixel cursor_color;
+ XawTextPropertyList *properties;
+ XawTextPaintList *paint;
+ XtPointer pad[2]; /* for future use and keep binary compatability */
+#endif
} TextSinkPart;
-/****************************************************************
- *
- * Full instance record declaration
- *
- ****************************************************************/
-
+/* Full instance record */
typedef struct _TextSinkRec {
- ObjectPart object;
- TextSinkPart text_sink;
+ ObjectPart object;
+ TextSinkPart text_sink;
} TextSinkRec;
-/************************************************************
- *
- * Private declarations.
- *
- ************************************************************/
-
-typedef int (*_XawSinkIntFunc)();
-typedef void (*_XawSinkVoidFunc)();
-
-#define XtInheritDisplayText ((_XawSinkVoidFunc) _XtInherit)
-#define XtInheritInsertCursor ((_XawSinkVoidFunc) _XtInherit)
-#define XtInheritClearToBackground ((_XawSinkVoidFunc) _XtInherit)
-#define XtInheritFindPosition ((_XawSinkVoidFunc) _XtInherit)
-#define XtInheritFindDistance ((_XawSinkVoidFunc) _XtInherit)
-#define XtInheritResolve ((_XawSinkVoidFunc) _XtInherit)
-#define XtInheritMaxLines ((_XawSinkIntFunc) _XtInherit)
-#define XtInheritMaxHeight ((_XawSinkIntFunc) _XtInherit)
-#define XtInheritSetTabs ((_XawSinkVoidFunc) _XtInherit)
-#define XtInheritGetCursorBounds ((_XawSinkVoidFunc) _XtInherit)
+/* Semi private routines */
+#ifndef OLDXAW
+XawTextPropertyList *XawTextSinkConvertPropertyList
+(
+ String name,
+ String spec,
+ Screen *screen,
+ Colormap Colormap,
+ int depth
+ );
+
+XawTextProperty *XawTextSinkGetProperty
+(
+ Widget w,
+ XrmQuark property
+ );
+
+XawTextProperty *XawTextSinkCopyProperty
+(
+ Widget w,
+ XrmQuark property
+ );
+
+XawTextProperty *XawTextSinkAddProperty
+(
+ Widget w,
+ XawTextProperty *property
+ );
+
+XawTextProperty *XawTextSinkCombineProperty
+(
+ Widget w,
+ XawTextProperty *result_in_out,
+ XawTextProperty *property,
+ Bool override
+ );
+
+Bool XawTextSinkBeginPaint
+(
+ Widget w
+ );
+
+void XawTextSinkPreparePaint
+(
+ Widget w,
+ int y,
+ int line,
+ XawTextPosition from,
+ XawTextPosition to,
+ Bool highlight
+);
+
+void XawTextSinkDoPaint
+(
+ Widget w
+ );
+
+Bool XawTextSinkEndPaint
+(
+ Widget w
+ );
+#endif
+
+#define XtInheritDisplayText ((_XawSinkDisplayTextProc)_XtInherit)
+#define XtInheritInsertCursor ((_XawSinkInsertCursorProc)_XtInherit)
+#define XtInheritClearToBackground ((_XawSinkClearToBackgroundProc)_XtInherit)
+#define XtInheritFindPosition ((_XawSinkFindPositionProc)_XtInherit)
+#define XtInheritFindDistance ((_XawSinkFindDistanceProc)_XtInherit)
+#define XtInheritResolve ((_XawSinkResolveProc)_XtInherit)
+#define XtInheritMaxLines ((_XawSinkMaxLinesProc)_XtInherit)
+#define XtInheritMaxHeight ((_XawSinkMaxHeightProc)_XtInherit)
+#define XtInheritSetTabs ((_XawSinkSetTabsProc)_XtInherit)
+#define XtInheritGetCursorBounds ((_XawSinkGetCursorBoundsProc)_XtInherit)
#endif /* _XawTextSinkP_h */
diff --git a/include/X11/Xaw/TextSrc.h b/include/X11/Xaw/TextSrc.h
index b976174..c978e73 100644
--- a/include/X11/Xaw/TextSrc.h
+++ b/include/X11/Xaw/TextSrc.h
@@ -48,189 +48,233 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xaw/TextSrc.h,v 1.13 2002/02/10 02:40:08 paulo Exp $ */
#ifndef _XawTextSrc_h
#define _XawTextSrc_h
-/***********************************************************************
- *
- * TextSrc Object
- *
- ***********************************************************************/
-
#include <X11/Xaw/Text.h>
/* Resources:
Name Class RepType Default Value
---- ----- ------- -------------
+ callback Callback Callback NULL
editType EditType XawTextEditType XawtextRead
+ enableUndo Undo Boolean False
+ sourceChanged Changed Boolean False
*/
/* Class record constants */
-
extern WidgetClass textSrcObjectClass;
typedef struct _TextSrcClassRec *TextSrcObjectClass;
typedef struct _TextSrcRec *TextSrcObject;
-typedef enum {XawstPositions, XawstWhiteSpace, XawstEOL, XawstParagraph,
- XawstAll} XawTextScanType;
-typedef enum {Normal, Selected }highlightType;
-typedef enum {XawsmTextSelect, XawsmTextExtend} XawTextSelectionMode;
-typedef enum {XawactionStart, XawactionAdjust, XawactionEnd}
- XawTextSelectionAction;
-
-/*
- * Error Conditions:
- */
+typedef enum {
+ XawstPositions,
+ XawstWhiteSpace,
+ XawstEOL,
+ XawstParagraph,
+ XawstAll,
+ XawstAlphaNumeric
+ } XawTextScanType;
+
+typedef enum {
+ Normal,
+ Selected
+} highlightType;
+
+typedef enum {
+ XawsmTextSelect,
+ XawsmTextExtend
+} XawTextSelectionMode;
+
+typedef enum {
+ XawactionStart,
+ XawactionAdjust,
+ XawactionEnd
+} XawTextSelectionAction;
#define XawTextReadError -1
#define XawTextScanError -1
-/************************************************************
- *
- * Public Functions.
- *
- ************************************************************/
+#ifndef OLDXAW
+#define XtNenableUndo "enableUndo"
+#define XtCUndo "Undo"
-_XFUNCPROTOBEGIN
+#define XtNsourceChanged "sourceChanged"
+#define XtCChanged "Changed"
+
+#define XtNpropertyCallback "propertyCallback"
+#endif
-/* Function Name: XawTextSourceRead
- * Description: This function reads the source.
- * Arguments: w - the TextSrc Object.
- * pos - position of the text to retreive.
- * RETURNED text - text block that will contain returned text.
- * length - maximum number of characters to read.
- * Returns: The number of characters read into the buffer.
+/*
+ * Public Functions
*/
+_XFUNCPROTOBEGIN
-extern XawTextPosition XawTextSourceRead(
-#if NeedFunctionPrototypes
- Widget /* w */,
- XawTextPosition /* pos */,
- XawTextBlock* /* text_return */,
- int /* length */
-#endif
-);
-
-/* Function Name: XawTextSourceReplace.
- * Description: Replaces a block of text with new text.
- * Arguments: src - the Text Source Object.
- * startPos, endPos - ends of text that will be removed.
- * text - new text to be inserted into buffer at startPos.
- * Returns: XawEditError or XawEditDone.
+/*
+ * Function:
+ * XawTextSourceRead
+ *
+ * Parameters:
+ * w - TextSrc Object
+ * pos - position of the text to retreive
+ * text - text block that will contain returned text
+ * length - maximum number of characters to read
+ *
+ * Description:
+ * This function reads the source.
+ *
+ * Returns:
+ * The number of characters read into the buffer
*/
+XawTextPosition XawTextSourceRead
+(
+ Widget w,
+ XawTextPosition pos,
+ XawTextBlock *text_return,
+ int length
+ );
-extern int XawTextSourceReplace (
-#if NeedFunctionPrototypes
- Widget /* w */,
- XawTextPosition /* start */,
- XawTextPosition /* end */,
- XawTextBlock* /* text */
-#endif
-);
-
-/* Function Name: XawTextSourceScan
- * Description: Scans the text source for the number and type
- * of item specified.
- * Arguments: w - the TextSrc Object.
- * position - the position to start scanning.
- * type - type of thing to scan for.
- * dir - direction to scan.
- * count - which occurance if this thing to search for.
- * include - whether or not to include the character found in
- * the position that is returned.
- * Returns: The position of the text.
+/*
+ * Function:
+ * XawTextSourceReplace
*
+ * Parameters:
+ * src - Text Source Object
+ * startPos - ends of text that will be removed
+ * endPos - ""
+ * text - new text to be inserted into buffer at startPos
+ *
+ * Description:
+ * Replaces a block of text with new text
+ *
+ * Returns:
+ * XawEditError or XawEditDone
*/
+int XawTextSourceReplace
+(
+ Widget w,
+ XawTextPosition start,
+ XawTextPosition end,
+ XawTextBlock *text
+ );
-extern XawTextPosition XawTextSourceScan(
-#if NeedFunctionPrototypes
- Widget /* w */,
- XawTextPosition /* position */,
-#if NeedWidePrototypes
- /* XawTextScanType */ int /* type */,
- /* XawTextScanDirection */ int /* dir */,
-#else
- XawTextScanType /* type */,
- XawTextScanDirection /* dir */,
-#endif
- int /* count */,
+/*
+ * Function:
+ * XawTextSourceScan
+ *
+ * Parameters:
+ * w - TextSrc Object
+ * position - position to start scanning
+ * type - type of thing to scan for
+ * dir - direction to scan
+ * count - which occurance if this thing to search for
+ * include - whether or not to include the character found in
+ * the position that is returned.
+ *
+ * Description:
+ * Scans the text source for the number and type of item specified.
+ *
+ * Returns:
+ * The position of the text
+ */
+XawTextPosition XawTextSourceScan
+(
+ Widget w,
+ XawTextPosition position,
#if NeedWidePrototypes
- /* Boolean */ int /* include */
+ int type,
+ int dir,
+ int count,
+ int include
#else
- Boolean /* include */
-#endif
+ XawTextScanType type,
+ XawTextScanDirection dir,
+ int count,
+ Boolean include
#endif
-);
-
-/* Function Name: XawTextSourceSearch
- * Description: Searchs the text source for the text block passed
- * Arguments: w - the TextSource Object.
- * position - the position to start scanning.
- * dir - direction to scan.
- * text - the text block to search for.
- * Returns: The position of the text we are searching for or
- * XawTextSearchError.
- */
+ );
-extern XawTextPosition XawTextSourceSearch(
-#if NeedFunctionPrototypes
- Widget /* w */,
- XawTextPosition /* position */,
+/*
+ * Function:
+ * XawTextSourceSearch
+ *
+ * Parameters:
+ * w - TextSource Object
+ * position - position to start scanning
+ * dir - direction to search
+ * text - the text block to search for
+ *
+ * Description:
+ * Searchs the text source for the text block passed.
+ *
+ * Returns:
+ * The position of the text we are searching for or XawTextSearchError
+ */
+XawTextPosition XawTextSourceSearch
+(
+ Widget w,
+ XawTextPosition position,
#if NeedWidePrototypes
- /* XawTextScanDirection */ int /* dir */,
+ int dir,
#else
- XawTextScanDirection /* dir */,
-#endif
- XawTextBlock* /* text */
+ XawTextScanDirection dir,
#endif
-);
-
-/* Function Name: XawTextSourceConvertSelection
- * Description: Dummy selection converter.
- * Arguments: w - the TextSrc object.
- * selection - the current selection atom.
- * target - the current target atom.
- * type - the type to conver the selection to.
- * RETURNED value, length - the return value that has been converted.
- * RETURNED format - the format of the returned value.
- * Returns: TRUE if the selection has been converted.
+ XawTextBlock *text
+ );
+
+/*
+ * Function:
+ * XawTextSourceConvertSelection
+ *
+ * Parameters:
+ * w - TextSrc object
+ * selection - current selection atom
+ * target - current target atom
+ * type - type to conver the selection to
+ * value - return value that has been converted
+ * length - ""
+ * format - format of the returned value
*
+ * Returns:
+ * True if the selection has been converted
*/
+Boolean XawTextSourceConvertSelection
+(
+ Widget w,
+ Atom *selection,
+ Atom *target,
+ Atom *type,
+ XtPointer *value_return,
+ unsigned long *length_return,
+ int *format_return
+ );
-extern Boolean XawTextSourceConvertSelection(
-#if NeedFunctionPrototypes
- Widget /* w */,
- Atom* /* selection */,
- Atom* /* target */,
- Atom* /* type */,
- XtPointer* /* value_return */,
- unsigned long* /* length_return */,
- int* /* format_return */
-#endif
-);
-
-/* Function Name: XawTextSourceSetSelection
- * Description: allows special setting of the selection.
- * Arguments: w - the TextSrc object.
- * left, right - bounds of the selection.
- * selection - the selection atom.
- * Returns: none
+/*
+ * Function:
+ * XawTextSourceSetSelection
+ *
+ * Parameters:
+ * w - TextSrc object
+ * left - bounds of the selection
+ * right - ""
+ * selection - selection atom
+ *
+ * Description:
+ * Allows special setting of the selection.
*/
-
-extern void XawTextSourceSetSelection(
-#if NeedFunctionPrototypes
- Widget /* w */,
- XawTextPosition /* start */,
- XawTextPosition /* end */,
- Atom /* selection */
-#endif
-);
+void XawTextSourceSetSelection
+(
+ Widget w,
+ XawTextPosition start,
+ XawTextPosition end,
+ Atom selection
+ );
_XFUNCPROTOEND
#endif /* _XawTextSrc_h */
-/* DON'T ADD STUFF AFTER THIS #endif */
diff --git a/include/X11/Xaw/TextSrcP.h b/include/X11/Xaw/TextSrcP.h
index c85f404..02f62ae 100644
--- a/include/X11/Xaw/TextSrcP.h
+++ b/include/X11/Xaw/TextSrcP.h
@@ -49,30 +49,43 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-
-/*
- * TextSrcP.h - Private definitions for TextSrc object
- *
- */
+/* $XFree86: xc/lib/Xaw/TextSrcP.h,v 1.15 2001/12/19 21:37:31 dawes Exp $ */
#ifndef _XawTextSrcP_h
#define _XawTextSrcP_h
-/***********************************************************************
- *
+/*
* TextSrc Object Private Data
- *
- ***********************************************************************/
+ */
+#include <X11/Xfuncproto.h>
#include <X11/Xaw/TextSrc.h>
-#include <X11/Xaw/TextP.h> /* This source works with the Text widget. */
-
-/************************************************************
- *
- * New fields for the TextSrc object class record.
- *
- ************************************************************/
+#include <X11/Xaw/TextP.h> /* This source works with the Text widget */
+
+_XFUNCPROTOBEGIN
+
+#ifndef OLDXAW
+struct _XawTextAnchor {
+ XawTextPosition position;
+ XawTextEntity *entities, *cache;
+};
+
+#define XAW_TENTF_HIDE 0x0001
+#define XAW_TENTF_READ 0x0002
+#define XAW_TENTF_REPLACE 0x0004
+struct _XawTextEntity {
+ short type;
+ short flags;
+ XawTextEntity *next;
+ XtPointer data;
+ XawTextPosition offset; /* from the anchor */
+ Cardinal length;
+ XrmQuark property;
+};
+#endif
+#if 0 /* no longer used */
+/* New fields for the TextSrc object class */
typedef struct {
XtPointer next_extension;
XrmQuark record_type;
@@ -80,17 +93,40 @@ typedef struct {
Cardinal record_size;
int (*Input)();
} TextSrcExtRec, *TextSrcExt;
+#endif
+
+typedef XawTextPosition (*_XawSrcReadProc)
+ (Widget, XawTextPosition, XawTextBlock*, int);
+
+typedef int (*_XawSrcReplaceProc)
+ (Widget, XawTextPosition, XawTextPosition, XawTextBlock*);
+
+typedef XawTextPosition (*_XawSrcScanProc)
+ (Widget, XawTextPosition, XawTextScanType, XawTextScanDirection,
+ int, Bool);
+
+typedef XawTextPosition (*_XawSrcSearchProc)
+ (Widget, XawTextPosition, XawTextScanDirection, XawTextBlock*);
+
+typedef void (*_XawSrcSetSelectionProc)
+ (Widget, XawTextPosition, XawTextPosition, Atom);
+
+typedef Boolean (*_XawSrcConvertSelectionProc)
+ (Widget, Atom*, Atom*, Atom*, XtPointer*, unsigned long*, int*);
typedef struct _TextSrcClassPart {
- XawTextPosition (*Read)();
- int (*Replace)();
- XawTextPosition (*Scan)();
- XawTextPosition (*Search)();
- void (*SetSelection)();
- Boolean (*ConvertSelection)();
+ _XawSrcReadProc Read;
+ _XawSrcReplaceProc Replace;
+ _XawSrcScanProc Scan;
+ _XawSrcSearchProc Search;
+ _XawSrcSetSelectionProc SetSelection;
+ _XawSrcConvertSelectionProc ConvertSelection;
+#ifndef OLDXAW
+ XtPointer extension;
+#endif
} TextSrcClassPart;
-/* Full class record declaration */
+/* Full class record */
typedef struct _TextSrcClassRec {
ObjectClassPart object_class;
TextSrcClassPart textSrc_class;
@@ -98,66 +134,131 @@ typedef struct _TextSrcClassRec {
extern TextSrcClassRec textSrcClassRec;
-/* New fields for the TextSrc object record */
+#ifndef OLDXAW
+typedef struct _XawTextUndo XawTextUndo;
+#endif
+
+/* New fields for the TextSrc object */
typedef struct {
/* resources */
- XawTextEditType edit_mode;
- XrmQuark text_format; /* 2 formats: FMT8BIT for Ascii */
- /* FMTWIDE for ISO 10646 */
+ XawTextEditType edit_mode;
+ XrmQuark text_format; /* 2 formats: FMT8BIT for Ascii
+ FMTWIDE for ISO 10646 */
+#ifndef OLDXAW
+ XtCallbackList callback; /* A callback list to call when the
+ source is changed */
+ Boolean changed;
+ Boolean enable_undo;
+
+ /* private state */
+ Boolean undo_state; /* to protect undo manipulation */
+ XawTextUndo *undo;
+ WidgetList text; /* TextWidget's using this source */
+ Cardinal num_text;
+ XtCallbackList property_callback;
+ XawTextAnchor **anchors;
+ int num_anchors;
+ XtPointer pad[1]; /* for future use and keep binary compatability */
+#endif
} TextSrcPart;
-/****************************************************************
- *
- * Full instance record declaration
- *
- ****************************************************************/
-
+/* Full instance record */
typedef struct _TextSrcRec {
- ObjectPart object;
- TextSrcPart textSrc;
+ ObjectPart object;
+ TextSrcPart textSrc;
} TextSrcRec;
-/******************************************************************
- *
+/*
* Semiprivate declarations of functions used in other modules
- *
- ******************************************************************/
-
-char* _XawTextWCToMB(
-#if NeedFunctionPrototypes
- Display* /* d */,
- wchar_t* /* wstr */,
- int* /* len_in_out */
+ */
+char* _XawTextWCToMB
+(
+ Display *display,
+ wchar_t *wstr,
+ int *len_in_out
+ );
+
+wchar_t* _XawTextMBToWC
+(
+ Display *display,
+ char *str,
+ int *len_in_out
+ );
+
+#ifndef OLDXAW
+XawTextAnchor *XawTextSourceAddAnchor
+(
+ Widget source,
+ XawTextPosition position
+ );
+
+XawTextAnchor *XawTextSourceFindAnchor
+(
+ Widget source,
+ XawTextPosition position
+ );
+
+XawTextAnchor *XawTextSourceNextAnchor
+(
+ Widget source,
+ XawTextAnchor *anchor
+ );
+
+XawTextAnchor *XawTextSourcePrevAnchor
+(
+ Widget source,
+ XawTextAnchor *anchor
+ );
+
+XawTextAnchor *XawTextSourceRemoveAnchor
+(
+ Widget source,
+ XawTextAnchor *anchor
+ );
+
+Bool XawTextSourceAnchorAndEntity
+(
+ Widget w,
+ XawTextPosition position,
+ XawTextAnchor **anchor_return,
+ XawTextEntity **entity_return
+ );
+
+XawTextEntity *XawTextSourceAddEntity
+(
+ Widget source,
+ int type,
+ int flags,
+ XtPointer data,
+ XawTextPosition position,
+ Cardinal length,
+ XrmQuark property
+ );
+
+void XawTextSourceClearEntities
+(
+ Widget w,
+ XawTextPosition left,
+ XawTextPosition right
+ );
#endif
-);
-wchar_t* _XawTextMBToWC(
-#if NeedFunctionPrototypes
- Display* /* d */,
- char* /* str */,
- int* /* len_in_out */
+#if 0 /* no longer used */
+typedef XawTextPosition (*_XawTextPositionFunc)();
#endif
-);
-
-/************************************************************
- *
- * Private declarations.
- *
- ************************************************************/
-typedef Boolean (*_XawBooleanFunc)();
-typedef int (*_XawIntFunc)();
-typedef XawTextPosition (*_XawTextPositionFunc)();
-typedef void (*_XawTextVoidFunc)();
-
-#define XtInheritInput ((_XawTextPositionFunc) _XtInherit)
-#define XtInheritRead ((_XawTextPositionFunc) _XtInherit)
-#define XtInheritReplace ((_XawIntFunc) _XtInherit)
-#define XtInheritScan ((_XawTextPositionFunc) _XtInherit)
-#define XtInheritSearch ((_XawTextPositionFunc) _XtInherit)
-#define XtInheritSetSelection ((_XawTextVoidFunc) _XtInherit)
-#define XtInheritConvertSelection ((_XawBooleanFunc) _XtInherit)
+#define XtInheritInput ((_XawTextPositionFunc)_XtInherit)
+#define XtInheritRead ((_XawSrcReadProc)_XtInherit)
+#define XtInheritReplace ((_XawSrcReplaceProc)_XtInherit)
+#define XtInheritScan ((_XawSrcScanProc)_XtInherit)
+#define XtInheritSearch ((_XawSrcSearchProc)_XtInherit)
+#define XtInheritSetSelection ((_XawSrcSetSelectionProc)_XtInherit)
+#define XtInheritConvertSelection ((_XawSrcConvertSelectionProc)_XtInherit)
+#if 0
#define XtTextSrcExtVersion 1
#define XtTextSrcExtTypeString "XT_TEXTSRC_EXT"
+#endif
+
+_XFUNCPROTOEND
#endif /* _XawTextSrcP_h */
diff --git a/include/X11/Xaw/Toggle.h b/include/X11/Xaw/Toggle.h
index a433bd0..68bb742 100644
--- a/include/X11/Xaw/Toggle.h
+++ b/include/X11/Xaw/Toggle.h
@@ -23,6 +23,7 @@ Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xaw/Toggle.h,v 1.6 2001/12/14 19:54:45 dawes Exp $ */
/*
* ToggleP.h - Private definitions for Toggle widget
@@ -37,12 +38,6 @@ in this Software without prior written authorization from The Open Group.
#ifndef _XawToggle_h
#define _XawToggle_h
-/***********************************************************************
- *
- * Toggle Widget
- *
- ***********************************************************************/
-
#include <X11/Xaw/Command.h>
/* Resources:
@@ -60,6 +55,7 @@ in this Software without prior written authorization from The Open Group.
callback Callback Pointer NULL
cursor Cursor Cursor None
destroyCallback Callback Pointer NULL
+ displayList DisplayList XawDisplayList* NULL
font Font XFontStructx* XtDefaultFont
foreground Foreground Pixel XtDefaultForeground
height Height Dimension text height
@@ -86,10 +82,8 @@ in this Software without prior written authorization from The Open Group.
/*
* These should be in StringDefs.h but aren't so we will define
- * them here if they are needed.
+ * them here if they are needed
*/
-
-
#define XtCWidget "Widget"
#define XtCState "State"
#define XtCRadioGroup "RadioGroup"
@@ -108,68 +102,79 @@ extern WidgetClass toggleWidgetClass;
typedef struct _ToggleClassRec *ToggleWidgetClass;
typedef struct _ToggleRec *ToggleWidget;
-
-/************************************************************
- *
+/*
* Public Functions
- *
- ************************************************************/
+ */
_XFUNCPROTOBEGIN
-/* Function Name: XawToggleChangeRadioGroup
- * Description: Allows a toggle widget to change radio lists.
- * Arguments: w - The toggle widget to change lists.
- * radio_group - any widget in the new list.
- * Returns: none.
+/*
+ * Function:
+ * XawToggleChangeRadioGroup
+ *
+ * Parameters:
+ * w - toggle widget to change lists
+ * radio_group - any widget in the new list
+ *
+ * Description:
+ * Allows a toggle widget to change radio lists.
*/
+void XawToggleChangeRadioGroup
+(
+ Widget w,
+ Widget radio_group
+ );
-extern void XawToggleChangeRadioGroup(
-#if NeedFunctionPrototypes
- Widget /* w */,
- Widget /* radio_group */
-#endif
-);
-
-/* Function Name: XawToggleGetCurrent
- * Description: Returns the RadioData associated with the toggle
+/*
+ * Function:
+ * XawToggleGetCurrent
+ *
+ * Parameters:
+ * radio_group - any toggle widget in the toggle list
+ *
+ * Description:
+ * Returns the RadioData associated with the toggle
* widget that is currently active in a toggle list.
- * Arguments: radio_group - any toggle widget in the toggle list.
- * Returns: The XtNradioData associated with the toggle widget.
+ * Returns:
+ * The XtNradioData associated with the toggle widget
*/
-extern XtPointer XawToggleGetCurrent(
-#if NeedFunctionPrototypes
- Widget /* radio_group */
-#endif
-);
-
-/* Function Name: XawToggleSetCurrent
- * Description: Sets the Toggle widget associated with the
- * radio_data specified.
- * Arguments: radio_group - any toggle widget in the toggle list.
- * radio_data - radio data of the toggle widget to set.
- * Returns: none.
- */
+XtPointer XawToggleGetCurrent
+(
+ Widget radio_group
+ );
-extern void XawToggleSetCurrent(
-#if NeedFunctionPrototypes
- Widget /* radio_group */,
- XtPointer /* radio_data */
-#endif
-);
-
-/* Function Name: XawToggleUnsetCurrent
- * Description: Unsets all Toggles in the radio_group specified.
- * Arguments: radio_group - any toggle widget in the toggle list.
- * Returns: none.
+/*
+ * Function:
+ * XawToggleSetCurrent
+ *
+ * Parameters:
+ * radio_group - any toggle widget in the toggle list
+ * radio_data - radio data of the toggle widget to set
+ *
+ * Description:
+ * Sets the Toggle widget associated with the radio_data specified.
*/
+void XawToggleSetCurrent
+(
+ Widget radio_group,
+ XtPointer radio_data
+ );
-extern void XawToggleUnsetCurrent(
-#if NeedFunctionPrototypes
- Widget /* radio_group */
-#endif
-);
+/*
+ * Function:
+ * XawToggleUnsetCurrent
+ *
+ * Parameters:
+ * radio_group - any toggle widget in the toggle list
+ *
+ * Description:
+ * Unsets all Toggles in the radio_group specified.
+ */
+void XawToggleUnsetCurrent
+(
+ Widget radio_group
+ );
_XFUNCPROTOEND
diff --git a/include/X11/Xaw/ToggleP.h b/include/X11/Xaw/ToggleP.h
index bacee25..e9afe41 100644
--- a/include/X11/Xaw/ToggleP.h
+++ b/include/X11/Xaw/ToggleP.h
@@ -25,10 +25,9 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xaw/ToggleP.h,v 1.8 2001/12/14 19:54:45 dawes Exp $ */
/*
- * ToggleP.h - Private definitions for Toggle widget
- *
* Author: Chris D. Peterson
* MIT X Consortium
* kit@expo.lcs.mit.edu
@@ -43,68 +42,54 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xaw/Toggle.h>
#include <X11/Xaw/CommandP.h>
-/***********************************************************************
- *
+/*
* Toggle Widget Private Data
- *
- ***********************************************************************/
-
-#define streq(a, b) ( strcmp((a), (b)) == 0 )
+ */
+#define streq(a, b) (strcmp((a), (b)) == 0)
typedef struct _RadioGroup {
- struct _RadioGroup *prev, *next; /* Pointers to other elements in group. */
- Widget widget; /* Widget corrosponding to this element. */
+ struct _RadioGroup *prev, *next; /* Pointers to other elements in group */
+ Widget widget; /* Widget corrosponding to this element */
} RadioGroup;
-/************************************
- *
- * Class structure
- *
- ***********************************/
-
- /* New fields for the Toggle widget class record */
+/* New fields for the Toggle widget class */
typedef struct _ToggleClass {
XtActionProc Set;
XtActionProc Unset;
XtPointer extension;
} ToggleClassPart;
- /* Full class record declaration */
+/* class record declaration */
typedef struct _ToggleClassRec {
CoreClassPart core_class;
SimpleClassPart simple_class;
LabelClassPart label_class;
CommandClassPart command_class;
- ToggleClassPart toggle_class;
+ ToggleClassPart toggle_class;
} ToggleClassRec;
extern ToggleClassRec toggleClassRec;
-/***************************************
- *
- * Instance (widget) structure
- *
- **************************************/
-
- /* New fields for the Toggle widget record */
+/* New fields for the Toggle widget */
typedef struct {
/* resources */
- Widget widget;
- XtPointer radio_data;
-
- /* private data */
- RadioGroup * radio_group;
+ Widget widget;
+ XtPointer radio_data;
+
+ /* private */
+ RadioGroup *radio_group;
+#ifndef OLDXAW
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} TogglePart;
- /* Full widget declaration */
+/* Full widget declaration */
typedef struct _ToggleRec {
- CorePart core;
- SimplePart simple;
- LabelPart label;
- CommandPart command;
- TogglePart toggle;
+ CorePart core;
+ SimplePart simple;
+ LabelPart label;
+ CommandPart command;
+ TogglePart toggle;
} ToggleRec;
#endif /* _XawToggleP_h */
-
-
diff --git a/include/X11/Xaw/Tree.h b/include/X11/Xaw/Tree.h
index 9e45d47..30697bb 100644
--- a/include/X11/Xaw/Tree.h
+++ b/include/X11/Xaw/Tree.h
@@ -48,6 +48,7 @@ in this Software without prior written authorization from The Open Group.
* additional blank space to make the structure of the graph easier to see
* as well as to support vertical trees.
*/
+/* $XFree86: xc/lib/Xaw/Tree.h,v 1.7 2001/12/14 19:54:45 dawes Exp $ */
#ifndef _XawTree_h
@@ -105,6 +106,20 @@ in this Software without prior written authorization from The Open Group.
#define XtCGravity "Gravity"
#define XtRGC "GC"
+
+#ifndef OLDXAW
+#ifndef XawNdisplayList
+#define XawNdisplayList "displayList"
+#endif
+
+#ifndef XawCDisplayList
+#define XawCDisplayList "DisplayList"
+#endif
+
+#ifndef XawRDisplayList
+#define XawRDisplayList "XawDisplayList"
+#endif
+#endif
/* external declarations */
extern WidgetClass treeWidgetClass;
@@ -113,11 +128,10 @@ typedef struct _TreeRec *TreeWidget;
_XFUNCPROTOBEGIN
-extern void XawTreeForceLayout (
-#if NeedFunctionPrototypes
- Widget /* tree */
-#endif
-);
+void XawTreeForceLayout
+(
+ Widget tree
+ );
_XFUNCPROTOEND
diff --git a/include/X11/Xaw/TreeP.h b/include/X11/Xaw/TreeP.h
index 3b4e0ff..3a09170 100644
--- a/include/X11/Xaw/TreeP.h
+++ b/include/X11/Xaw/TreeP.h
@@ -48,6 +48,7 @@ in this Software without prior written authorization from The Open Group.
* additional blank space to make the structure of the graph easier to see
* as well as to support vertical trees.
*/
+/* $XFree86: xc/lib/Xaw/TreeP.h,v 1.7 2001/12/14 19:54:45 dawes Exp $ */
#ifndef _XawTreeP_h
@@ -56,7 +57,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xaw/Tree.h>
typedef struct _TreeClassPart {
- int ignore;
+ XtPointer extension;
} TreeClassPart;
typedef struct _TreeClassRec {
@@ -82,6 +83,10 @@ typedef struct {
Dimension *largest; /* list of largest per depth */
int n_largest; /* number of elements in largest */
Dimension maxwidth, maxheight; /* for shrink wrapping */
+#ifndef OLDXAW
+ XawDisplayList *display_list;
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} TreePart;
@@ -107,6 +112,11 @@ typedef struct _TreeConstraintsPart {
Dimension bbsubwidth, bbsubheight; /* bounding box of sub tree */
Dimension bbwidth, bbheight; /* bounding box including node */
Position x, y;
+#ifndef OLDXAW
+ XtPointer pad[2]; /* leave some space for future optimizations, and
+ * keep binary compatability
+ */
+#endif
} TreeConstraintsPart;
typedef struct _TreeConstraintsRec {
diff --git a/include/X11/Xaw/VendorEP.h b/include/X11/Xaw/VendorEP.h
index 37d65ef..30c6fe3 100644
--- a/include/X11/Xaw/VendorEP.h
+++ b/include/X11/Xaw/VendorEP.h
@@ -51,6 +51,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xaw/VendorEP.h,v 1.6 2001/12/14 19:54:45 dawes Exp $ */
#ifndef _VendorEP_h
#define _VendorEP_h
@@ -70,6 +71,9 @@ typedef struct {
Widget parent;
XawImPart im;
XawIcPart ic;
+#ifndef OLDXAW
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} XawVendorShellExtPart;
typedef struct XawVendorShellExtRec {
diff --git a/include/X11/Xaw/Viewport.h b/include/X11/Xaw/Viewport.h
index 6f09420..b242ff2 100644
--- a/include/X11/Xaw/Viewport.h
+++ b/include/X11/Xaw/Viewport.h
@@ -46,6 +46,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
********************************************************/
+/* $XFree86: xc/lib/Xaw/Viewport.h,v 1.7 2001/12/14 19:54:46 dawes Exp $ */
#ifndef _XawViewport_h
#define _XawViewport_h
@@ -63,7 +64,7 @@ SOFTWARE.
border BorderColor Pixel XtDefaultForeground
borderWidth BorderWidth Dimension 1
destroyCallback Callback Pointer NULL
- foreceBars Boolean Boolean False
+ forceBars Boolean Boolean False
height Height Dimension 0
mappedWhenManaged MappedWhenManaged Boolean True
reportCallback ReportCallback Pointer NULL
@@ -76,7 +77,6 @@ SOFTWARE.
*/
-/* fields added to Form */
#ifndef _XtStringDefs_h_
#define XtNforceBars "forceBars"
#define XtNallowHoriz "allowHoriz"
@@ -92,31 +92,29 @@ typedef struct _ViewportRec *ViewportWidget;
_XFUNCPROTOBEGIN
-extern void XawViewportSetLocation (
-#if NeedFunctionPrototypes
- Widget /* gw */,
+void XawViewportSetLocation
+(
+ Widget gw,
#if NeedWidePrototypes
- /* float */ double /* xoff */,
- /* float */ double /* yoff */
+ double xoff,
+ double yoff
#else
- float /* xoff */,
- float /* yoff */
+ float xoff,
+ float yoff
#endif
-#endif
-);
+ );
-extern void XawViewportSetCoordinates (
-#if NeedFunctionPrototypes
- Widget /* gw */,
+void XawViewportSetCoordinates
+(
+ Widget gw,
#if NeedWidePrototypes
- /* Position */ int /* x */,
- /* Position */ int /* y */
+ int x,
+ int y
#else
- Position /* x */,
- Position /* y */
-#endif
+ Position x,
+ Position y
#endif
-);
+ );
_XFUNCPROTOEND
diff --git a/include/X11/Xaw/ViewportP.h b/include/X11/Xaw/ViewportP.h
index 6792426..4801885 100644
--- a/include/X11/Xaw/ViewportP.h
+++ b/include/X11/Xaw/ViewportP.h
@@ -49,6 +49,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
********************************************************/
+/* $XFree86: xc/lib/Xaw/ViewportP.h,v 1.8 2001/12/14 19:54:46 dawes Exp $ */
#ifndef _ViewportP_h
#define _ViewportP_h
@@ -56,7 +57,9 @@ SOFTWARE.
#include <X11/Xaw/Viewport.h>
#include <X11/Xaw/FormP.h>
-typedef struct {int empty;} ViewportClassPart;
+typedef struct {
+ XtPointer extension;
+} ViewportClassPart;
typedef struct _ViewportClassRec {
CoreClassPart core_class;
@@ -70,20 +73,24 @@ extern ViewportClassRec viewportClassRec;
typedef struct _ViewportPart {
/* resources */
- Boolean forcebars; /* Whether we should always display */
- /* the selected scrollbars. */
- Boolean allowhoriz; /* Whether we allow horizontal scrollbars. */
- Boolean allowvert; /* Whether we allow vertical scrollbars. */
- Boolean usebottom; /* True iff horiz bars appear at bottom. */
- Boolean useright; /* True iff vert bars appear at right. */
- XtCallbackList report_callbacks; /* when size/position changes */
- /* private state */
+ Boolean forcebars; /* Whether we should always display
+ the selected scrollbars */
+ Boolean allowhoriz; /* Whether we allow horizontal scrollbars */
+ Boolean allowvert; /* Whether we allow vertical scrollbars */
+ Boolean usebottom; /* True if horiz bars appear at bottom */
+ Boolean useright; /* True if vert bars appear at right */
+ XtCallbackList report_callbacks;/* when size/position changes */
+
+ /* private */
Widget clip, child; /* The clipping and (scrolled) child widgets */
- Widget horiz_bar, vert_bar;/* What scrollbars we currently have. */
+ Widget horiz_bar, vert_bar; /* What scrollbars we currently have */
+#ifndef OLDXAW
+ XtPointer pad[4]; /* for future use and keep binary compatability */
+#endif
} ViewportPart;
typedef struct _ViewportRec {
- CorePart core;
+ CorePart core;
CompositePart composite;
ConstraintPart constraint;
FormPart form;
@@ -91,10 +98,7 @@ typedef struct _ViewportRec {
} ViewportRec;
typedef struct {
- /* resources */
-
- /* private state */
- Boolean reparented; /* True if child has been re-parented */
+ Bool reparented; /* True if child has been re-parented */
} ViewportConstraintsPart;
typedef struct _ViewportConstraintsRec {
diff --git a/include/X11/Xaw/XawImP.h b/include/X11/Xaw/XawImP.h
index 1974a19..4f70554 100644
--- a/include/X11/Xaw/XawImP.h
+++ b/include/X11/Xaw/XawImP.h
@@ -51,6 +51,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xaw/XawImP.h,v 3.9 2001/12/14 19:54:46 dawes Exp $ */
#ifndef _XawImP_h
#define _XawImP_h
@@ -74,8 +75,7 @@ in this Software without prior written authorization from The Open Group.
#define CICursorP (1 << 5)
#define CILineS (1 << 6)
-typedef struct _XawImPart
-{
+typedef struct _XawImPart {
XIM xim;
XrmResourceList resources;
Cardinal num_resources;
@@ -86,8 +86,7 @@ typedef struct _XawImPart
String preedit_type;
} XawImPart;
-typedef struct _XawIcTablePart
-{
+typedef struct _XawIcTablePart {
Widget widget;
XIC xic;
XIMStyle input_style;
@@ -104,8 +103,7 @@ typedef struct _XawIcTablePart
struct _XawIcTablePart *next;
} XawIcTablePart, *XawIcTableList;
-typedef struct _XawIcPart
-{
+typedef struct _XawIcPart {
XIMStyle input_style;
Boolean shared_ic;
XawIcTableList shared_ic_table;
@@ -113,111 +111,103 @@ typedef struct _XawIcPart
XawIcTableList ic_table;
} XawIcPart;
-typedef struct _contextDataRec
-{
+typedef struct _contextDataRec {
Widget parent;
Widget ve;
} contextDataRec;
-typedef struct _contextErrDataRec
-{
+typedef struct _contextErrDataRec {
Widget widget;
XIM xim;
} contextErrDataRec;
-void _XawImResizeVendorShell(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
-);
-
-Dimension _XawImGetShellHeight(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
-);
-
-void _XawImRealize(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
-);
-
-void _XawImInitialize(
-#if NeedFunctionPrototypes
- Widget, /* w */
- Widget /* ext */
-#endif
-);
-
-void _XawImReconnect(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
-);
-
-void _XawImRegister(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
-);
+void _XawImResizeVendorShell
+(
+ Widget w
+ );
-void _XawImUnregister(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
+Dimension _XawImGetShellHeight
+(
+ Widget w
);
-void _XawImSetValues(
-#if NeedFunctionPrototypes
- Widget, /* w */
- ArgList, /* args */
- Cardinal /* num_args */
-#endif
+void _XawImRealize
+(
+ Widget w
+ );
+
+void _XawImInitialize
+(
+ Widget w,
+ Widget ext
+ );
+
+void _XawImReconnect
+(
+ Widget w
+ );
+
+void _XawImRegister
+(
+ Widget w
+ );
+
+void _XawImUnregister
+(
+ Widget w
+ );
+
+void _XawImSetValues
+(
+ Widget w,
+ ArgList args,
+ Cardinal num_args
+ );
+
+void _XawImSetFocusValues
+(
+ Widget w,
+ ArgList args,
+ Cardinal num_args
);
-void _XawImSetFocusValues(
-#if NeedFunctionPrototypes
- Widget, /* w */
- ArgList, /* args */
- Cardinal /* num_args */
-#endif
-);
-
-void _XawImUnsetFocus(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
-);
-
-int _XawImWcLookupString(
-#if NeedFunctionPrototypes
- Widget, /* w */
- XKeyPressedEvent*, /* event */
- wchar_t*, /* buffer_return */
- int, /* bytes_buffer */
- KeySym*, /* keysym_return */
- Status* /* status return */
-#endif
-);
-
-int _XawImGetImAreaHeight(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
-);
-
-void _XawImCallVendorShellExtResize(
-#if NeedFunctionPrototypes
- Widget /* w */
-#endif
-);
-
-void _XawImDestroy(
-#if NeedFunctionPrototypes
- Widget, /* w */
- Widget /* ext */
-#endif
-);
+void _XawImUnsetFocus
+(
+ Widget w
+ );
+
+int _XawImWcLookupString
+(
+ Widget w,
+ XKeyPressedEvent *event,
+ wchar_t *buffer_return,
+ int bytes_buffer,
+ KeySym *keysym_return
+ );
+
+int _XawLookupString
+(
+ Widget w,
+ XKeyEvent *event,
+ char *buffer_return,
+ int buffer_size,
+ KeySym *keysym_return
+ );
+
+int _XawImGetImAreaHeight
+(
+ Widget w
+ );
+
+void _XawImCallVendorShellExtResize
+(
+ Widget w
+ );
+
+void _XawImDestroy
+(
+ Widget w,
+ Widget ext
+ );
#endif /* _XawImP_h */
diff --git a/include/X11/Xaw/XawInit.h b/include/X11/Xaw/XawInit.h
index 53de0ef..57c330c 100644
--- a/include/X11/Xaw/XawInit.h
+++ b/include/X11/Xaw/XawInit.h
@@ -22,11 +22,30 @@ Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xaw/XawInit.h,v 1.13 2001/12/14 19:54:46 dawes Exp $ */
+
+#ifndef _XawInit_h
+#define _XawInit_h
+
+#define XawVendor "XFree86"
+
+#ifdef OLDXAW
+#define XawVersion 6700002L
+#else
+#define XawVersion 7000002L
+
+typedef struct _XawDL XawDisplayList;
+#endif /* OLDXAW */
#include <X11/Xfuncproto.h>
_XFUNCPROTOBEGIN
-extern void XawInitializeWidgetSet(); /* called from ClassInit procs */
+void XawInitializeWidgetSet(void);
+#ifndef OLDXAW
+void XawInitializeDefaultConverters(void);
+#endif
_XFUNCPROTOEND
+
+#endif /* _XawInit_h */