mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Introduce <Xm/XmPrivate.h>
We need ANSI C prototypes of certain Motif functions that are not published in the official header files. <Xm/XmPrivate.h> header file contains the prototypes extracted from the Motif source. To re-create <Xm/XmPrivate.h>: 1) Make sure you have sources of libXm (lib/Xm directory of the Motif distribution) accessible via imports/motif/lib/Xm 2) rm include/Xm/XmPrivate.h 3) make includes
This commit is contained in:
parent
237fa4a599
commit
8a57173ec2
4 changed files with 213 additions and 0 deletions
|
@ -1,7 +1,11 @@
|
||||||
XCOMM $TOG: Imakefile /main/4 1997/07/09 10:03:24 samborn $
|
XCOMM $TOG: Imakefile /main/4 1997/07/09 10:03:24 samborn $
|
||||||
#define PassCDebugFlags /**/
|
#define PassCDebugFlags /**/
|
||||||
|
#define IHaveSubdirs
|
||||||
|
|
||||||
HEADERS = hpversion.h EUSCompat.h
|
HEADERS = hpversion.h EUSCompat.h
|
||||||
|
SUBDIRS = Xm
|
||||||
|
|
||||||
|
MakeSubdirs($(SUBDIRS))
|
||||||
|
|
||||||
all::
|
all::
|
||||||
|
|
||||||
|
|
23
cde/include/Xm/Imakefile
Normal file
23
cde/include/Xm/Imakefile
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
XCOMM
|
||||||
|
XCOMM Generate XmPrivate.h containing ANSI C
|
||||||
|
XCOMM function prototypes extracted from the private
|
||||||
|
XCOMM include headers files
|
||||||
|
XCOMM
|
||||||
|
XCOMM libXm source from Motif (lib/Xm subdirectory)
|
||||||
|
XCOMM needs to be available in ../../imports/motif/lib/Xm
|
||||||
|
XCOMM
|
||||||
|
|
||||||
|
HEADERS = XmPrivate.h
|
||||||
|
ALLHEADERS = *.h
|
||||||
|
|
||||||
|
includes:: $(HEADERS)
|
||||||
|
|
||||||
|
BuildIncludes($(HEADERS),Xm,..)
|
||||||
|
|
||||||
|
XmPrivate.h: extractprototype.awk
|
||||||
|
awk -f extractprototype.awk $(MLIBSRC)/Xm/$(ALLHEADERS) > $@
|
||||||
|
|
||||||
|
depend::
|
||||||
|
|
||||||
|
clean::
|
||||||
|
|
129
cde/include/Xm/XmPrivate.h
Normal file
129
cde/include/Xm/XmPrivate.h
Normal file
|
@ -0,0 +1,129 @@
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* PRIVATE MOTIF FUNCTIONS
|
||||||
|
* Declarations extracted from Open Motif header files
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <Xm/TextStrSoP.h>
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
/* Extracted from BaseClassI.h */
|
||||||
|
extern void _XmPushWidgetExtData(
|
||||||
|
Widget widget,
|
||||||
|
XmWidgetExtData data,
|
||||||
|
#if NeedWidePrototypes
|
||||||
|
unsigned int extType) ;
|
||||||
|
#else
|
||||||
|
unsigned char extType) ;
|
||||||
|
#endif /* NeedWidePrototypes */
|
||||||
|
extern void _XmPopWidgetExtData(
|
||||||
|
Widget widget,
|
||||||
|
XmWidgetExtData *dataRtn,
|
||||||
|
#if NeedWidePrototypes
|
||||||
|
unsigned int extType) ;
|
||||||
|
#else
|
||||||
|
unsigned char extType) ;
|
||||||
|
#endif /* NeedWidePrototypes */
|
||||||
|
/* Extracted from MenuStateI.h */
|
||||||
|
extern void _XmSetInDragMode(
|
||||||
|
Widget widget,
|
||||||
|
#if NeedWidePrototypes
|
||||||
|
int mode) ;
|
||||||
|
#else
|
||||||
|
Boolean mode) ;
|
||||||
|
#endif /* NeedWidePrototypes */
|
||||||
|
/* Extracted from MenuUtilI.h */
|
||||||
|
extern int _XmGrabPointer(
|
||||||
|
Widget widget,
|
||||||
|
int owner_events,
|
||||||
|
unsigned int event_mask,
|
||||||
|
int pointer_mode,
|
||||||
|
int keyboard_mode,
|
||||||
|
Window confine_to,
|
||||||
|
Cursor cursor,
|
||||||
|
Time time) ;
|
||||||
|
/* Extracted from SyntheticI.h */
|
||||||
|
extern void _XmExtGetValuesHook(
|
||||||
|
Widget w,
|
||||||
|
ArgList args,
|
||||||
|
Cardinal *num_args) ;
|
||||||
|
extern void _XmGadgetImportSecondaryArgs(
|
||||||
|
Widget w,
|
||||||
|
ArgList args,
|
||||||
|
Cardinal *num_args) ;
|
||||||
|
/* Extracted from TextStrSoI.h */
|
||||||
|
extern char * _XmStringSourceGetString(XmTextWidget tw,
|
||||||
|
XmTextPosition from,
|
||||||
|
XmTextPosition to,
|
||||||
|
#if NeedWidePrototypes
|
||||||
|
int want_wchar);
|
||||||
|
#else
|
||||||
|
Boolean want_wchar);
|
||||||
|
#endif /* NeedWidePrototypes */
|
||||||
|
/* Extracted from TravActI.h */
|
||||||
|
extern void _XmEnterGadget(
|
||||||
|
Widget wid,
|
||||||
|
XEvent *event,
|
||||||
|
String *params,
|
||||||
|
Cardinal *num_params) ;
|
||||||
|
extern void _XmLeaveGadget(
|
||||||
|
Widget wid,
|
||||||
|
XEvent *event,
|
||||||
|
String *params,
|
||||||
|
Cardinal *num_params) ;
|
||||||
|
extern void _XmFocusInGadget(
|
||||||
|
Widget wid,
|
||||||
|
XEvent *event,
|
||||||
|
String *params,
|
||||||
|
Cardinal *num_params) ;
|
||||||
|
extern void _XmFocusOutGadget(
|
||||||
|
Widget wid,
|
||||||
|
XEvent *event,
|
||||||
|
String *params,
|
||||||
|
Cardinal *num_params) ;
|
||||||
|
/* Extracted from TraversalI.h */
|
||||||
|
extern Boolean _XmFocusIsHere(
|
||||||
|
Widget w) ;
|
||||||
|
extern Boolean _XmShellIsExclusive(
|
||||||
|
Widget wid) ;
|
||||||
|
/* Extracted from UniqueEvnI.h */
|
||||||
|
extern Boolean _XmIsEventUnique(XEvent *event) ;
|
||||||
|
/* Extracted from VendorSI.h */
|
||||||
|
extern void _XmAddGrab(
|
||||||
|
Widget wid,
|
||||||
|
#if NeedWidePrototypes
|
||||||
|
int exclusive,
|
||||||
|
int spring_loaded) ;
|
||||||
|
#else
|
||||||
|
Boolean exclusive,
|
||||||
|
Boolean spring_loaded) ;
|
||||||
|
#endif /* NeedWidePrototypes */
|
||||||
|
extern void _XmRemoveGrab(
|
||||||
|
Widget wid) ;
|
||||||
|
/* Extracted from XmI.h */
|
||||||
|
extern void _XmSocorro(
|
||||||
|
Widget w,
|
||||||
|
XEvent *event,
|
||||||
|
String *params,
|
||||||
|
Cardinal *num_params) ;
|
||||||
|
extern void _XmClearShadowType(
|
||||||
|
Widget w,
|
||||||
|
#if NeedWidePrototypes
|
||||||
|
int old_width,
|
||||||
|
int old_height,
|
||||||
|
int old_shadow_thickness,
|
||||||
|
int old_highlight_thickness) ;
|
||||||
|
#else
|
||||||
|
Dimension old_width,
|
||||||
|
Dimension old_height,
|
||||||
|
Dimension old_shadow_thickness,
|
||||||
|
Dimension old_highlight_thickness) ;
|
||||||
|
#endif /* NeedWidePrototypes */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
/*************************************************************
|
||||||
|
* END OF EXTRACTED DATA
|
||||||
|
*************************************************************/
|
57
cde/include/Xm/extractprototype.awk
Normal file
57
cde/include/Xm/extractprototype.awk
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
BEGIN {
|
||||||
|
curfile = FILENAME;
|
||||||
|
s = ""; for (i = 0; i < 60; i++) s = s "*";
|
||||||
|
printf("/*\n *\n * PRIVATE MOTIF FUNCTIONS\n");
|
||||||
|
printf(" * Declarations extracted from Open Motif header files\n *\n */\n\n", s);
|
||||||
|
printf("#include <Xm/TextStrSoP.h>\n");
|
||||||
|
printf("#ifdef __cplusplus\nextern \"C\" {\n#endif\n");
|
||||||
|
}
|
||||||
|
END {
|
||||||
|
printf("#ifdef __cplusplus\n}\n#endif\n");
|
||||||
|
printf("/*%s\n * END OF EXTRACTED DATA\n *%s/\n", s, s);
|
||||||
|
}
|
||||||
|
function proto() {
|
||||||
|
if ($0 ~ /extern/) {
|
||||||
|
pattern = 0;
|
||||||
|
do {
|
||||||
|
line = $0;
|
||||||
|
if (line ~ /#if/) {
|
||||||
|
pattern = 1;
|
||||||
|
}
|
||||||
|
if (curfile != FILENAME) {
|
||||||
|
n = FILENAME;
|
||||||
|
sub(/.*\//, "", n);
|
||||||
|
printf("/* Extracted from %s */\n", n);
|
||||||
|
curfile = FILENAME;
|
||||||
|
}
|
||||||
|
print line;
|
||||||
|
getline;
|
||||||
|
if ( pattern == 0) {
|
||||||
|
terminate = (line ~ /;/);
|
||||||
|
} else {
|
||||||
|
terminate = (line ~ /^#.*endif/);
|
||||||
|
}
|
||||||
|
} while (!terminate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/_XmClearShadowType/ { proto(); }
|
||||||
|
/_XmShellIsExclusive/ { proto(); }
|
||||||
|
/_XmGrabKeyboard/ { proto(); }
|
||||||
|
/_XmFocusIsHere/ { proto(); }
|
||||||
|
/_XmAddGrab/ { proto(); }
|
||||||
|
/_XmGrabPointer/ { proto(); }
|
||||||
|
/_XmRemoveGrab/ { proto(); }
|
||||||
|
/_XmEnterGadget/ { proto(); }
|
||||||
|
/_XmLeaveGadget/ { proto(); }
|
||||||
|
/_XmPushWidgetExtData/ { proto(); }
|
||||||
|
/_XmPopWidgetExtData/ { proto(); }
|
||||||
|
/_XmGadgetImportSecondaryArgs/ { proto(); }
|
||||||
|
/_XmExtImportArgs/ { proto(); }
|
||||||
|
/_XmExtGetValuesHook/ { proto(); }
|
||||||
|
/_XmSocorro/ { proto(); }
|
||||||
|
/_XmFocusInGadget/ { proto(); }
|
||||||
|
/_XmFocusOutGadget/ { proto(); }
|
||||||
|
/_XmIsEventUnique/ { proto(); }
|
||||||
|
/_XmSetInDragMode/ { proto(); }
|
||||||
|
/_XmStringSourceGetString/ { proto(); }
|
||||||
|
/_XmShellIsExclusive/ { proto(); }
|
Loading…
Add table
Add a link
Reference in a new issue