Back to index

im-sdk  12.3.91
xaux_common.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 #pragma ident "@(#)xaux_common.h 1.7 99/11/29"
00043 
00044 #ifndef       XAUX_COMMON_H
00045 #define       XAUX_COMMON_H
00046 
00047 #define       ME_SO  "xaux_so"
00048 #define       ME_EXT "xaux_ext"
00049 
00050 #define       XAUX_SOWIN_SUFFIX    "_sowin"
00051 #define       XAUX_EXTWIN_SUFFIX   "_extwin"
00052 #define       XAUX_XS_SUFFIX              "_xs"
00053 #define       XAUX_SX_SUFFIX              "_sx"
00054 
00055 #define       XAUX_RETRYINT_EXTWIN 1
00056 #define       XAUX_MAXRETRY_EXTWIN 10
00057 
00058 #define       XAUX_MAXCLASSNAMELEN 255
00059 #define       XAUX_MAXSUFFIXLEN    16
00060 
00061 #define       SX_PROP_ATOM_AUX_NAME(prop) (*((CARD32 *)((prop) + 0)))
00062 #define       SX_PROP_TYPE(prop)          (*((CARD16 *)((prop) + 4)))
00063 #define       SX_PROP_INDEX(prop)         (*((CARD16 *)((prop) + 6)))
00064 #define       SX_PROP_IMID(prop)          (*((CARD16 *)((prop) + 8)))
00065 #define       SX_PROP_ICID(prop)          (*((CARD16 *)((prop) + 10)))
00066 #define       SX_SIZE_PROP_STARTDONE             12
00067 #define       SX_PROP_SOWIN(prop)         (*((CARD32 *)((prop) + 12)))
00068 #define       SX_PROP_CLIENTWIN(prop)            (*((CARD32 *)((prop) + 16)))
00069 #define       SX_PROP_FOCUSWIN(prop)             (*((CARD32 *)((prop) + 20)))
00070 #define       SX_PROP_POSX(prop)          (*((CARD16 *)((prop) + 24)))
00071 #define       SX_PROP_POSY(prop)          (*((CARD16 *)((prop) + 26)))
00072 #define       SX_PROP_INT_COUNT(prop)            (*((CARD16 *)((prop) + 28)))
00073 #define       SX_PROP_STR_COUNT(prop)            (*((CARD16 *)((prop) + 30)))
00074 #define SX_SIZE_PROP_HEADER_DRAW   32
00075 #define       SX_PROP_INT_LIST(prop)             ((CARD32 *)((prop) + 32))
00076 #define       SX_PROP_STR_LIST(prop) \
00077        ((unsigned char *)((prop) + 32) \
00078               + SX_PROP_INT_COUNT((prop)) * 4)
00079 
00080 #define       XS_PROP_ATOM_AUX_NAME(prop) (*((CARD32 *)((prop) + 0)))
00081 #define       XS_PROP_IMID(prop)          (*((CARD16 *)((prop) + 4)))
00082 #define       XS_PROP_ICID(prop)          (*((CARD16 *)((prop) + 6)))
00083 #define       XS_PROP_INT_COUNT(prop)            (*((CARD16 *)((prop) + 8)))
00084 #define       XS_PROP_STR_COUNT(prop)            (*((CARD16 *)((prop) + 10)))
00085 #define XS_SIZE_PROP_HEADER_SETVALUE      12
00086 #define       XS_PROP_INT_LIST(prop)             ((CARD32 *)((prop) + 12))
00087 #define       XS_PROP_STR_LIST(prop) \
00088        ((unsigned char *)((prop) + 12) \
00089               + XS_PROP_INT_COUNT((prop)) * 4)
00090 
00091 #define       XAUX_SX_NATOMS                     64
00092 #define       XAUX_XS_NATOMS                     64
00093 
00094 typedef struct xaux_class_struct {
00095        const char    *classname;   /* aux_name */
00096        int           index;        /* aux_index */
00097        const char    *extexec;     /* full path of aux_ext executable */
00098        Window        sowin;        /* aux.so's window */
00099        Window        extwin;              /* aux_ext's window */
00100        Atom          atom_classname;      /* "${CLASSNAME}" */
00101        Atom          atom_sowin;   /* "${CLASSNAME}_sowin" */
00102        Atom          atom_extwin;  /* "${CLASSNAME}_extwin" */
00103        Atom          atom_sx[XAUX_SX_NATOMS]; /* "${CLASSNAME}_sx */
00104        size_t        atom_sx_idx;  /* next atom_sx to use */
00105        Atom          atom_xs[XAUX_XS_NATOMS]; /* "${CLASSNAME}_xs */
00106        size_t        atom_xs_idx;  /* next atom_xs to use */
00107        const CARD16  *utfname;     /* UTF-16 version of classname */
00108 } xaux_class_t;
00109 
00110 static const int     padding[4] = {0, 3, 2, 1};
00111 
00112 #endif /* !XAUX_COMMON_H */