Back to index

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