Back to index

im-sdk  12.3.91
XAuxMethods.h
Go to the documentation of this file.
00001 /*
00002 Copyright 1990-2001 Sun Microsystems, Inc. All Rights Reserved.
00003 
00004 Permission is hereby granted, free of charge, to any person obtaining a
00005 copy of this software and associated documentation files (the
00006 "Software"), to deal in the Software without restriction, including
00007 without limitation the rights to use, copy, modify, merge, publish,
00008 distribute, sublicense, and/or sell copies of the Software, and to
00009 permit persons to whom the Software is furnished to do so, subject to
00010 the following conditions: The above copyright notice and this
00011 permission notice shall be included in all copies or substantial
00012 portions of the Software.
00013 
00014 
00015 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00016 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00017 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00018 IN NO EVENT SHALL THE OPEN GROUP OR SUN MICROSYSTEMS, INC. BE LIABLE
00019 FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
00020 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
00021 THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE EVEN IF
00022 ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
00023 
00024 
00025 Except as contained in this notice, the names of The Open Group and/or
00026 Sun Microsystems, Inc. shall not be used in advertising or otherwise to
00027 promote the sale, use or other dealings in this Software without prior
00028 written authorization from The Open Group and/or Sun Microsystems,
00029 Inc., as applicable.
00030 
00031 
00032 X Window System is a trademark of The Open Group
00033 
00034 OSF/1, OSF/Motif and Motif are registered trademarks, and OSF, the OSF
00035 logo, LBX, X Window System, and Xinerama are trademarks of the Open
00036 Group. All other trademarks and registered trademarks mentioned herein
00037 are the property of their respective owners. No right, title or
00038 interest in or to any trademark, service mark, logo or trade name of
00039 Sun Microsystems, Inc. or its licensors is granted.
00040 
00041 */
00042 #include "XSunExt.h"
00043 
00044 #ifndef _XAuxMethod_h
00045 #define _XAuxMethod_h
00046 
00047 typedef struct _XAuxAttribute {
00048        int      nAttrID;
00049        int      nLenName;
00050        char    *pszName;
00051        int      nLenValue;
00052        void    *pvValue;
00053        int      nType;
00054 } XAuxAttribute;
00055 
00056 
00057 typedef struct _XAuxCallbackStruct{
00058        char    *pszEngName;                /* Point to Engine Name     */
00059        int      nEngClsIdx;                /* Engine Class Index       */
00060        int      nNumIntVal;                /* Count Integer Values     */
00061        int     *pnIntVal;                  /* Point to Integer Values  */
00062        int      nNumStrVal;                /* count String Values      */
00063        char    *pszStrVal;                 /* Point to String Values   */
00064 } XAuxCallbackStruct;                   /* Acbs */
00065 
00066 
00067 typedef struct _xaux_methods {
00068        Bool    (*xaux_Create)(int, XAuxAttribute *, int);
00069        Bool    (*xaux_Start)(int, XIMAuxStartCallbackStruct *);    /* Added by Scott Ma, 05/26, 98 */
00070        Bool    (*xaux_Draw)(int, XIMAuxDrawCallbackStruct *);
00071        Bool    (*xaux_Done)(int, XIMAuxDoneCallbackStruct *);     /* Added by Scott Ma, 05/26, 98 */
00072        Bool    (*xaux_SetFocus)(int);
00073        Bool    (*xaux_UnsetFocus)(int);
00074        Bool    (*xaux_SetValues)(int, XAuxAttribute *, int);
00075        Bool    (*xaux_GetValues)(int, XAuxAttribute *, int);
00076        Bool    (*xaux_Destroy)(int);
00077 } xaux_methods_t ;
00078 
00079 
00080 /* Functions to be exported */
00081 Bool XAux_Create   (int, XAuxAttribute *, int);
00082 Bool XAux_SetValues(int, XAuxAttribute *, int);
00083 Bool XAux_GetValues(int, XAuxAttribute *, int);
00084 
00085 Bool XAux_Start(int, XIMAuxStartCallbackStruct *);     /* Added by Scott Ma, 05/26, 98 */
00086 Bool XAux_Draw (int, XIMAuxDrawCallbackStruct *);
00087 Bool XAux_Done (int, XIMAuxDoneCallbackStruct *);     /* Added by Scott Ma, 05/26, 98 */
00088 
00089 Bool XAux_SetFocus  (int);
00090 Bool XAux_UnsetFocus(int);
00091 Bool XAux_Destroy   (int);
00092 
00093 #define XAUX_DISPLAY            1
00094 #define XAUX_SCREENNUM          2
00095 #define XAUX_HTTWINDOW          3
00096 #define XAUX_FONTSET            4
00097 #define XAUX_AREA               5
00098 #define XAUX_AREANEEDED         6
00099 #define XAUX_COLORMAP           7
00100 #define XAUX_STDCOLORMAP        8
00101 #define XAUX_FOREGROUND         9
00102 #define XAUX_BACKGROUND         10
00103 #define XAUX_BACKGROUNDPIXMAP   11
00104 #define XAUX_LOCATION           12
00105 #define XAUX_FONTNAME           13
00106 #define XAUX_CURSOR             14
00107 #define XAUX_REPLYCALLBACK      15
00108 #define XAUX_REPLYCLIENTDATA    16
00109 #define XAUX_GC                 17
00110 #define XAUX_TOPLEVEL                 18
00111 
00112 
00113 /*
00114 ** _XAux_SesDspParaNode structure
00115 **        Session_Display Parameters Node (sdpn)
00116 */
00117 typedef struct _XAux_SesDspParaNode {
00118        int         nIcID;
00119        Display    *pDsp;
00120        int         nScreenNum;
00121        Window      wndHttWin;
00122        XFontSet    xfsFontSet;
00123        XRectangle  rectArea;
00124        XRectangle  rectNeeded;
00125        Colormap    cmap;
00126        Colormap    cmapStd;
00127        unsigned long  fgPix;      /* foreground pixel */
00128        unsigned long  bgPix;      /* background pixel */
00129                                   /* bgPixmap is omitted!! - Scott Ma */
00130        xPoint      xyPointLoc;    /* defined in Xprotostr.h: INT16 x, y; */
00131        char       *pszFontName;
00132                                   /* Cursor is omitted!! - Scott Ma */
00133        void      (*fpReplyCb)();  /* Reply Callback */
00134        void       *pbReplyData;   /* Reply Client Data */
00135        GC          gc;
00136        
00137        /* Following 4 elements are not set by SetAuxNodeValues()!! */
00138        int         nWndStatus;    /* Is this window mapped or unmapped? */
00139        Window      wndIM;
00140        Window      wndBmp1;
00141        Window      wndBmp2;
00142                                   /* Direct Child of RootWindow */
00143        Window      wndParent;     /* Parent Window of wndBmp1 and wndBmp2 */
00144        
00145        int         nPuncState;    /* 0, 1, ChinesePunc / EnglishPunc  */
00146        int         nSkbState;     /* 0~14, SoftKB State, Default 13, HalfWid */
00147        
00148        struct     _XAux_SesDspParaNode  *next;
00149 } XAux_SesDspParaNode;
00150 
00151 
00152 #endif   /* XAuxMethod_h */