Initial import of the CDE 2.1.30 sources from the Open Group.
This commit is contained in:
202
cde/programs/dtcreate/UxXt.h
Normal file
202
cde/programs/dtcreate/UxXt.h
Normal file
@@ -0,0 +1,202 @@
|
||||
/* @(#)95 1.3 com/config/UxXt.h, aic, aic324, 9322324a 6/1/93 16:14:00 */
|
||||
/*
|
||||
* COMPONENT_NAME: AIC AIXwindows Interface Composer
|
||||
*
|
||||
* ORIGINS: 58
|
||||
*
|
||||
*
|
||||
* Copyright IBM Corporation 1991, 1993
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software and its
|
||||
* documentation for any purpose and without fee is hereby granted,
|
||||
* provided that the above copyright notice appear in all copies and that
|
||||
* both that copyright notice and this permission notice appear in
|
||||
* supporting documentation, and that the name of IBM not be
|
||||
* used in advertising or publicity pertaining to distribution of the
|
||||
* software without specific, written prior permission.
|
||||
*
|
||||
* IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
||||
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
|
||||
* USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
|
||||
* OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
/*---------------------------------------------------------------------
|
||||
* $XConsortium: UxXt.h /main/4 1995/11/01 16:09:11 rswiston $
|
||||
*---------------------------------------------------------------------
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1991, Visual Edge Software Ltd.
|
||||
*
|
||||
* ALL RIGHTS RESERVED. Permission to use, copy, modify, and
|
||||
* distribute this software and its documentation for any purpose
|
||||
* and without fee is hereby granted, provided that the above
|
||||
* copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of Visual Edge Software not be
|
||||
* used in advertising or publicity pertaining to distribution of
|
||||
* the software without specific, written prior permission. The year
|
||||
* included in the notice is the year of the creation of the work.
|
||||
*-------------------------------------------------------------------*/
|
||||
|
||||
/*****************************************************************************/
|
||||
/* UxXt.h */
|
||||
/*****************************************************************************/
|
||||
|
||||
#ifndef _UX_XT_H_INCLUDED
|
||||
#define _UX_XT_H_INCLUDED
|
||||
|
||||
#include <Xm/Xm.h>
|
||||
|
||||
#ifdef UIL_CODE
|
||||
#include <Mrm/MrmPublic.h>
|
||||
#endif /* UIL_CODE */
|
||||
|
||||
#if 0
|
||||
#ifdef __STDC__
|
||||
typedef char *caddr_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------
|
||||
* UXORB_HEADER, if defined, is the include form for
|
||||
* the header that defines the CORBA Environment type
|
||||
* and exception type codes.
|
||||
*
|
||||
* You can specify a file with a compile option like
|
||||
* -DUXORB_HEADER='<SomeOrb.h>'
|
||||
*-----------------------------------------------------*/
|
||||
#ifdef UXORB_HEADER
|
||||
#include UXORB_HEADER
|
||||
#else
|
||||
/*
|
||||
* In the absence of an ORB implementation,
|
||||
* these minimal definitions satisfy our method dispatch code.
|
||||
*/
|
||||
typedef enum {
|
||||
NO_EXCEPTION,
|
||||
USER_EXCEPTION,
|
||||
SYSTEM_EXCEPTION
|
||||
} exception_type;
|
||||
|
||||
typedef struct Environment {
|
||||
exception_type _major;
|
||||
} Environment;
|
||||
#endif /* UXORB_HEADER */
|
||||
|
||||
/*
|
||||
* UxEnv is provided as a convenience for use in interface methods.
|
||||
*/
|
||||
extern Environment UxEnv;
|
||||
|
||||
|
||||
/* The following macros are used in converting string values to the form
|
||||
required by the widgets */
|
||||
|
||||
#define RES_CONVERT( res_name, res_value) \
|
||||
XtVaTypedArg, (res_name), XmRString, (res_value), strlen(res_value) + 1
|
||||
|
||||
#define UxPutStrRes( wgt, res_name, res_value ) \
|
||||
XtVaSetValues( wgt, RES_CONVERT( res_name, res_value ), NULL )
|
||||
|
||||
|
||||
#ifndef UX_INTERPRETER /* Omit this section when interpreting the code */
|
||||
|
||||
/* The following macros are supplied for compatibility with swidget code */
|
||||
#define swidget Widget
|
||||
#define UxWidgetToSwidget(w) (w)
|
||||
#define UxGetWidget(sw) (sw)
|
||||
#define UxIsValidSwidget(sw) ((sw) != NULL)
|
||||
#define NO_PARENT ((Widget) NULL)
|
||||
#define UxThisWidget (UxWidget)
|
||||
|
||||
/* Macros needed for the method support code */
|
||||
#define UxMalloc(a) (malloc(a))
|
||||
#define UxRealloc(a,b) (realloc((a), (b)))
|
||||
#define UxCalloc(a,b) (calloc((a), (b)))
|
||||
#define UxStrEqual(a,b) (!strcmp((a),(b)))
|
||||
#define UxGetParent(a) (XtParent((a)))
|
||||
|
||||
#define no_grab XtGrabNone
|
||||
#define nonexclusive_grab XtGrabNonexclusive
|
||||
#define exclusive_grab XtGrabExclusive
|
||||
|
||||
|
||||
/* The following global variables are defined in the main() function */
|
||||
extern XtAppContext UxAppContext;
|
||||
extern Widget UxTopLevel;
|
||||
extern Display *UxDisplay;
|
||||
extern int UxScreen;
|
||||
|
||||
|
||||
/* The following are error codes returned by the functions in UxXt.c */
|
||||
#define UX_ERROR -1
|
||||
#define UX_NO_ERROR 0
|
||||
|
||||
#ifdef UIL_CODE
|
||||
extern void UxMrmFetchError(MrmHierarchy, char *, Widget, Cardinal);
|
||||
extern MrmHierarchy UxMrmOpenHierarchy( char *);
|
||||
extern void UxMrmRegisterClass( char *, Widget (*)(Widget, String, Arg *, Cardinal));
|
||||
#endif /* UIL_CODE */
|
||||
|
||||
|
||||
|
||||
/* The following are declarations of the functions in UxXt.c */
|
||||
|
||||
|
||||
extern int UxPopupInterface( Widget wgt, XtGrabKind grab_flag );
|
||||
extern int UxPopdownInterface( Widget wgt );
|
||||
extern int UxDestroyInterface( Widget wgt);
|
||||
extern int UxPutContext( Widget wgt, caddr_t context );
|
||||
extern caddr_t UxGetContext( Widget wgt );
|
||||
extern void UxFreeClientDataCB( Widget wgt, XtPointer client_data,
|
||||
XtPointer call_data );
|
||||
extern void UxLoadResources( char *fname );
|
||||
extern XmFontList UxConvertFontList( char *fontlist_str );
|
||||
extern Pixmap UxConvertPixmap( char *file_name );
|
||||
extern Pixmap UxConvert_bitmap( char *file_name );
|
||||
extern wchar_t * UxConvertValueWcs( char *value_str );
|
||||
|
||||
extern void UxDestroyContextCB(Widget, XtPointer, XtPointer);
|
||||
extern void UxDeleteContextCB( Widget, XtPointer, XtPointer);
|
||||
extern XtArgVal UxRemoveValueFromArgList( Arg *args,
|
||||
Cardinal *ptr_num_args,
|
||||
String res_name );
|
||||
extern Widget UxChildSite( Widget );
|
||||
extern Widget UxRealWidget( Widget );
|
||||
|
||||
extern Widget GetTrueToplevel( Widget );
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
class _UxCInterface {
|
||||
|
||||
public:
|
||||
|
||||
virtual swidget childSite (Environment * pEnv) {
|
||||
if (pEnv)
|
||||
pEnv->_major = NO_EXCEPTION;
|
||||
return 0;
|
||||
}
|
||||
virtual swidget UxChildSite (swidget sw);
|
||||
|
||||
protected:
|
||||
swidget UxThis;
|
||||
};
|
||||
|
||||
#define CPLUS_ADAPT_CONTEXT(CLASS) \
|
||||
static inline \
|
||||
CLASS* UxGetContext(CLASS*self) {return self;} \
|
||||
static inline\
|
||||
void* UxGetContext(swidget any) {return ::UxGetContext(any);}
|
||||
|
||||
#endif /* _cplusplus */
|
||||
|
||||
#endif /* ! UX_INTERPRETER */
|
||||
|
||||
#endif /* ! _UX_XT_H_INCLUDED */
|
||||
|
||||
Reference in New Issue
Block a user