Back to index

im-sdk  12.3.91
xaux_common.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 1999 by Sun Microsystem, Inc.
00003  * All rights reserved.
00004  *
00005  * xaux_common.h
00006  */
00007 #pragma ident "@(#)xaux_common.h 1.7 99/11/29"
00008 
00009 #ifndef       XAUX_COMMON_H
00010 #define       XAUX_COMMON_H
00011 
00012 #define       ME_SO  "xaux_so"
00013 #define       ME_EXT "xaux_ext"
00014 
00015 #define       XAUX_SOWIN_SUFFIX    "_sowin"
00016 #define       XAUX_EXTWIN_SUFFIX   "_extwin"
00017 #define       XAUX_XS_SUFFIX              "_xs"
00018 #define       XAUX_SX_SUFFIX              "_sx"
00019 
00020 #define       XAUX_RETRYINT_EXTWIN 1
00021 #define       XAUX_MAXRETRY_EXTWIN 10
00022 
00023 #define       XAUX_MAXCLASSNAMELEN 255
00024 #define       XAUX_MAXSUFFIXLEN    16
00025 
00026 #define       SX_PROP_ATOM_AUX_NAME(prop) (*((CARD32 *)((prop) + 0)))
00027 #define       SX_PROP_TYPE(prop)          (*((CARD16 *)((prop) + 4)))
00028 #define       SX_PROP_INDEX(prop)         (*((CARD16 *)((prop) + 6)))
00029 #define       SX_PROP_IMID(prop)          (*((CARD16 *)((prop) + 8)))
00030 #define       SX_PROP_ICID(prop)          (*((CARD16 *)((prop) + 10)))
00031 #define       SX_SIZE_PROP_STARTDONE             12
00032 #define       SX_PROP_SOWIN(prop)         (*((CARD32 *)((prop) + 12)))
00033 #define       SX_PROP_CLIENTWIN(prop)            (*((CARD32 *)((prop) + 16)))
00034 #define       SX_PROP_FOCUSWIN(prop)             (*((CARD32 *)((prop) + 20)))
00035 #define       SX_PROP_POSX(prop)          (*((CARD16 *)((prop) + 24)))
00036 #define       SX_PROP_POSY(prop)          (*((CARD16 *)((prop) + 26)))
00037 #define       SX_PROP_INT_COUNT(prop)            (*((CARD16 *)((prop) + 28)))
00038 #define       SX_PROP_STR_COUNT(prop)            (*((CARD16 *)((prop) + 30)))
00039 #define SX_SIZE_PROP_HEADER_DRAW   32
00040 #define       SX_PROP_INT_LIST(prop)             ((CARD32 *)((prop) + 32))
00041 #define       SX_PROP_STR_LIST(prop) \
00042        ((unsigned char *)((prop) + 32) \
00043               + SX_PROP_INT_COUNT((prop)) * 4)
00044 
00045 #define       XS_PROP_ATOM_AUX_NAME(prop) (*((CARD32 *)((prop) + 0)))
00046 #define       XS_PROP_IMID(prop)          (*((CARD16 *)((prop) + 4)))
00047 #define       XS_PROP_ICID(prop)          (*((CARD16 *)((prop) + 6)))
00048 #define       XS_PROP_INT_COUNT(prop)            (*((CARD16 *)((prop) + 8)))
00049 #define       XS_PROP_STR_COUNT(prop)            (*((CARD16 *)((prop) + 10)))
00050 #define XS_SIZE_PROP_HEADER_SETVALUE      12
00051 #define       XS_PROP_INT_LIST(prop)             ((CARD32 *)((prop) + 12))
00052 #define       XS_PROP_STR_LIST(prop) \
00053        ((unsigned char *)((prop) + 12) \
00054               + XS_PROP_INT_COUNT((prop)) * 4)
00055 
00056 #define       XAUX_SX_NATOMS                     64
00057 #define       XAUX_XS_NATOMS                     64
00058 
00059 typedef struct xaux_class_struct {
00060        const char    *classname;   /* aux_name */
00061        int           index;        /* aux_index */
00062        const char    *extexec;     /* full path of aux_ext executable */
00063        Window        sowin;        /* aux.so's window */
00064        Window        extwin;              /* aux_ext's window */
00065        Atom          atom_classname;      /* "${CLASSNAME}" */
00066        Atom          atom_sowin;   /* "${CLASSNAME}_sowin" */
00067        Atom          atom_extwin;  /* "${CLASSNAME}_extwin" */
00068        Atom          atom_sx[XAUX_SX_NATOMS]; /* "${CLASSNAME}_sx */
00069        size_t        atom_sx_num;  /* size of atom_sx */
00070        size_t        atom_sx_idx;  /* next atom_sx to use */
00071        Atom          atom_xs[XAUX_XS_NATOMS]; /* "${CLASSNAME}_xs */
00072        size_t        atom_xs_num;  /* size of atom_xs */
00073        size_t        atom_xs_idx;  /* next atom_xs to use */
00074        const CARD16  *utfname;     /* UTF-16 version of classname */
00075 } xaux_class_t;
00076 
00077 static const int     padding[4] = {0, 3, 2, 1};
00078 
00079 #endif /* !XAUX_COMMON_H */