Back to index

im-sdk  12.3.91
xaux_ext_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 #ifndef       XAUX_EXT_COMMON_H
00044 #define       XAUX_EXT_COMMON_H
00045 
00046 #pragma ident "$Id$"
00047 
00048 typedef enum aux_ext_data_type_enum {
00049        AUX_EXT_DATA_NONE = 0,
00050        AUX_EXT_DATA_START = 1,
00051        AUX_EXT_DATA_DRAW = 2,
00052        AUX_EXT_DATA_DONE = 3,
00053        AUX_EXT_DATA_SETVALUE = 4
00054 } aux_ext_data_type_t;
00055 
00056 typedef struct aux_ext_string_struct {
00057        int           length;
00058        unsigned char *      ptr;
00059 } aux_ext_string_t;
00060 
00061 typedef struct aux_ext_data_struct {
00062        aux_ext_data_type_t  type;
00063        int           im;
00064        int           ic;
00065        int           aux_index;
00066        int           aux_name_length;
00067        unsigned char *      aux_name;
00068        int           integer_count;
00069        int *         integer_list;
00070        int           string_count;
00071        aux_ext_string_t *   string_list;
00072        unsigned char *      string_ptr;
00073        Window        clientwin;
00074        Window        focuswin;
00075        XPoint        point;
00076 } aux_ext_data_t;
00077 
00078 typedef void *       xaux_ext_handle_t;
00079 
00080 typedef Bool (*xaux_ext_cb_evhandler_t)(
00081        xaux_ext_handle_t,          /* handle */
00082        Window,                            /* window */
00083        XEvent *,                   /* event */
00084        void *                      /* so's data */
00085 );
00086 
00087 typedef Bool (*xaux_ext_cb_addevhandler_t)(
00088        xaux_ext_handle_t,          /* handle */
00089        long,                       /* event mask */
00090        Bool,                       /* nonmaskable */
00091        xaux_ext_cb_evhandler_t,    /* handler */
00092        void *,                            /* so's data */
00093        void *                      /* ext's data */
00094 );
00095 
00096 typedef Bool (*xaux_ext_cb_rmevhandler_t)(
00097        xaux_ext_handle_t,          /* handle */
00098        long,                       /* event mask */
00099        Bool,                       /* nonmaskable */
00100        xaux_ext_cb_evhandler_t,    /* handler */
00101        void *,                            /* so's data */
00102        void *                      /* ext's data */
00103 );
00104 
00105 typedef Bool (*xaux_ext_cb_start_t)(
00106        xaux_ext_handle_t,
00107        aux_ext_data_t *,
00108        void *
00109 );
00110 
00111 typedef Bool (*xaux_ext_cb_draw_t)(
00112        xaux_ext_handle_t,
00113        aux_ext_data_t *,
00114        void *
00115 );
00116 
00117 typedef Bool (*xaux_ext_cb_done_t)(
00118        xaux_ext_handle_t,
00119        aux_ext_data_t *,
00120        void *
00121 );
00122 
00123 typedef struct xaux_ext_methods_struct {
00124        xaux_ext_handle_t    (*open)(const char *, Display *, Window, ...);
00125        void   (*close)(xaux_ext_handle_t);
00126        Bool   (*registercb_start)(
00127               xaux_ext_handle_t, xaux_ext_cb_start_t, void *);
00128        Bool   (*registercb_draw)(
00129               xaux_ext_handle_t, xaux_ext_cb_draw_t, void *);
00130        Bool   (*registercb_done)(
00131               xaux_ext_handle_t, xaux_ext_cb_done_t, void *);
00132        Bool   (*call_setvalue)(
00133               xaux_ext_handle_t, aux_ext_data_t *);
00134        Bool   (*registercb_addevhandler)(
00135               xaux_ext_handle_t, xaux_ext_cb_addevhandler_t, void *);
00136        Bool   (*registercb_rmevhandler)(
00137               xaux_ext_handle_t, xaux_ext_cb_rmevhandler_t, void *);
00138        Bool   (*set)(xaux_ext_handle_t, ...);
00139        Bool   (*get)(xaux_ext_handle_t, ...);
00140 } xaux_ext_methods_t;
00141 
00142 typedef void *       xaux_ext_hdlrmng_handle_t;
00143 
00144 typedef struct xaux_ext_hdlrmng_methods_struct {
00145        xaux_ext_hdlrmng_handle_t   (*open)(void);
00146        Bool   (*add)(xaux_ext_hdlrmng_handle_t, xaux_ext_cb_evhandler_t,
00147                      void *, long, Bool, long *, Bool *, long *, Bool *);
00148        Bool   (*remove)(xaux_ext_hdlrmng_handle_t, xaux_ext_cb_evhandler_t,
00149                      void *, long, Bool, long *, Bool *, long *, Bool *);
00150        Bool   (*filter)(xaux_ext_hdlrmng_handle_t,
00151                      xaux_ext_handle_t, XEvent *);
00152        void   (*close)(xaux_ext_hdlrmng_handle_t);
00153 } xaux_ext_hdlrmng_methods_t;
00154 
00155 #endif /* !XAUX_EXT_COMMON_H */