diff options
author | Yaakov Selkowitz <yselkowitz@users.sourceforge.net> | 2011-08-26 00:26:26 -0500 |
---|---|---|
committer | Yaakov Selkowitz <yselkowitz@users.sourceforge.net> | 2011-08-26 17:31:45 -0500 |
commit | 46aab45f6a089e39075ed36f2e3e569c2f74bd4c (patch) | |
tree | 681d48e6f4278bda0b042663d72ded3df0652798 /include | |
parent | c9f8e4d90a70e63fd51bf8d517a5650b25055241 (diff) |
include: Fix old-style function definitions
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Acked-by: Gaetan Nadon <memsize@videotron.ca>
Diffstat (limited to 'include')
-rw-r--r-- | include/X11/Xaw3d/FormP.h | 5 | ||||
-rw-r--r-- | include/X11/Xaw3d/SimpleP.h | 4 | ||||
-rw-r--r-- | include/X11/Xaw3d/SmeP.h | 8 | ||||
-rw-r--r-- | include/X11/Xaw3d/TextP.h | 2 | ||||
-rw-r--r-- | include/X11/Xaw3d/TextSinkP.h | 73 | ||||
-rw-r--r-- | include/X11/Xaw3d/TextSrcP.h | 50 | ||||
-rw-r--r-- | include/X11/Xaw3d/ThreeDP.h | 5 | ||||
-rw-r--r-- | include/X11/Xaw3d/XawInit.h | 2 |
8 files changed, 98 insertions, 51 deletions
diff --git a/include/X11/Xaw3d/FormP.h b/include/X11/Xaw3d/FormP.h index a7390c4..50a405e 100644 --- a/include/X11/Xaw3d/FormP.h +++ b/include/X11/Xaw3d/FormP.h @@ -56,10 +56,11 @@ SOFTWARE. #define XtREdgeType "EdgeType" typedef enum {LayoutPending, LayoutInProgress, LayoutDone} LayoutState; -#define XtInheritLayout ((Boolean (*)())_XtInherit) +#define XtInheritLayout \ +((Boolean (*)(FormWidget, Dimension, Dimension, Boolean))_XtInherit) typedef struct { - Boolean (*layout)(/* FormWidget, Dimension, Dimension */); + Boolean (*layout)(FormWidget, Dimension, Dimension, Boolean); } FormClassPart; /* diff --git a/include/X11/Xaw3d/SimpleP.h b/include/X11/Xaw3d/SimpleP.h index 6650e20..96e9050 100644 --- a/include/X11/Xaw3d/SimpleP.h +++ b/include/X11/Xaw3d/SimpleP.h @@ -53,10 +53,10 @@ SOFTWARE. #include <X11/Xaw3d/Simple.h> typedef struct { - Boolean (*change_sensitive)(/* widget */); + Boolean (*change_sensitive)(Widget); } SimpleClassPart; -#define XtInheritChangeSensitive ((Boolean (*)())_XtInherit) +#define XtInheritChangeSensitive ((Boolean (*)(Widget))_XtInherit) typedef struct _SimpleClassRec { CoreClassPart core_class; diff --git a/include/X11/Xaw3d/SmeP.h b/include/X11/Xaw3d/SmeP.h index a580be2..888ce75 100644 --- a/include/X11/Xaw3d/SmeP.h +++ b/include/X11/Xaw3d/SmeP.h @@ -55,9 +55,9 @@ in this Software without prior written authorization from the X Consortium. ************************************************************/ typedef struct _SmeClassPart { - void (*highlight)(); - void (*unhighlight)(); - void (*notify)(); + void (*highlight)(Widget); + void (*unhighlight)(Widget); + void (*notify)(Widget); XtPointer extension; } SmeClassPart; @@ -96,7 +96,7 @@ typedef struct _SmeRec { * ************************************************************/ -typedef void (*_XawEntryVoidFunc)(); +typedef void (*_XawEntryVoidFunc)(Widget); #define XtInheritHighlight ((_XawEntryVoidFunc) _XtInherit) #define XtInheritUnhighlight XtInheritHighlight diff --git a/include/X11/Xaw3d/TextP.h b/include/X11/Xaw3d/TextP.h index 25515b3..e3b481b 100644 --- a/include/X11/Xaw3d/TextP.h +++ b/include/X11/Xaw3d/TextP.h @@ -146,8 +146,6 @@ struct SearchAndReplace { /* Private Text Definitions */ -typedef int (*ActionProc)(); - /* New fields for the Text widget class record */ typedef struct {int empty;} TextClassPart; diff --git a/include/X11/Xaw3d/TextSinkP.h b/include/X11/Xaw3d/TextSinkP.h index 2e5d6cf..fb3d8bd 100644 --- a/include/X11/Xaw3d/TextSinkP.h +++ b/include/X11/Xaw3d/TextSinkP.h @@ -70,17 +70,47 @@ SOFTWARE. * ************************************************************/ +typedef void (*_XawSinkDisplayTextProc) + (Widget, Position, Position, XawTextPosition, XawTextPosition, Boolean); + +typedef void (*_XawSinkInsertCursorProc) + (Widget, Position, Position, XawTextInsertState); + +typedef void (*_XawSinkClearToBackgroundProc) + (Widget, Position, Position, Dimension, Dimension); + +typedef void (*_XawSinkFindPositionProc) + (Widget, XawTextPosition, int, int, Boolean, 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, Dimension); + +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; } TextSinkClassPart; /* Full class record declaration */ @@ -121,18 +151,15 @@ typedef struct _TextSinkRec { * ************************************************************/ -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) +#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/Xaw3d/TextSrcP.h b/include/X11/Xaw3d/TextSrcP.h index d944849..973420a 100644 --- a/include/X11/Xaw3d/TextSrcP.h +++ b/include/X11/Xaw3d/TextSrcP.h @@ -69,6 +69,7 @@ SOFTWARE. * ************************************************************/ +#if 0 /* no longer used */ typedef struct { XtPointer next_extension; XrmQuark record_type; @@ -76,14 +77,34 @@ 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, Boolean); + +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; } TextSrcClassPart; /* Full class record declaration */ @@ -137,18 +158,17 @@ wchar_t* _XawTextMBToWC( * ************************************************************/ -typedef Boolean (*_XawBooleanFunc)(); -typedef int (*_XawIntFunc)(); +#if 0 /* no longer used */ typedef XawTextPosition (*_XawTextPositionFunc)(); -typedef void (*_XawTextVoidFunc)(); +#endif #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 XtInheritRead ((_XawSrcReadProc) _XtInherit) +#define XtInheritReplace ((_XawSrcReplaceProc) _XtInherit) +#define XtInheritScan ((_XawSrcScanProc) _XtInherit) +#define XtInheritSearch ((_XawSrcSearchProc) _XtInherit) +#define XtInheritSetSelection ((_XawSrcSetSelectionProc) _XtInherit) +#define XtInheritConvertSelection ((_XawSrcConvertSelectionProc) _XtInherit) #define XtTextSrcExtVersion 1 #define XtTextSrcExtTypeString "XT_TEXTSRC_EXT" diff --git a/include/X11/Xaw3d/ThreeDP.h b/include/X11/Xaw3d/ThreeDP.h index 79aec65..817753f 100644 --- a/include/X11/Xaw3d/ThreeDP.h +++ b/include/X11/Xaw3d/ThreeDP.h @@ -54,10 +54,11 @@ typedef struct _ThreeDRec { } ThreeDRec; typedef struct { - void (*shadowdraw)(); + void (*shadowdraw)(Widget, XEvent *, Region, XtRelief, Boolean); } ThreeDClassPart; -#define XtInheritXaw3dShadowDraw ((void (*)())_XtInherit) +#define XtInheritXaw3dShadowDraw \ +((void (*)(Widget, XEvent *, Region, XtRelief, Boolean))_XtInherit) /* Full class record declaration. */ typedef struct _ThreeDClassRec { diff --git a/include/X11/Xaw3d/XawInit.h b/include/X11/Xaw3d/XawInit.h index 76574ec..cd023ec 100644 --- a/include/X11/Xaw3d/XawInit.h +++ b/include/X11/Xaw3d/XawInit.h @@ -25,6 +25,6 @@ in this Software without prior written authorization from the X Consortium. _XFUNCPROTOBEGIN -extern void XawInitializeWidgetSet(); /* called from ClassInit procs */ +extern void XawInitializeWidgetSet(void); /* called from ClassInit procs */ _XFUNCPROTOEND |