/* 
 * -- $Header: /cec/src/nestor/shX/shXlib/X11/XmuX.h,v 1.1.1.1 90/11/28 16:47:27 altenhof Exp $ 
 * -- $Log:	XmuX.h,v $
 * Revision 1.1.1.1  90/11/28  16:47:27  altenhof
 * First public release
 * 
 * Revision 1.1  90/11/28  16:47:25  altenhof
 * Initial revision
 * 
 * Revision 1.1.1.1  90/11/28  16:15:07  spanachi
 * First public version of shX
 * 
 * Revision 1.1  90/11/28  16:15:06  spanachi
 * Initial revision
 * 
 * Revision 1.1.1.1  90/11/28  16:14:18  spanachi
 * First public version of shX
 * 
 * Revision 1.1  90/11/28  16:14:17  spanachi
 * Initial revision
 * 
 * Revision 1.1.1.1  90/04/23  10:10:32  spanachi
 * First version of 'shared X' library (X11R3). 
 * 
 * Revision 1.1  90/04/23  10:10:29  spanachi
 * Initial revision
 * 
 * Revision 1.1  89/11/03  14:46:00  neideck
 * Original send to X consortium
 * 
 * Revision 1.1  89/08/23  11:47:18  michael
 * Initial revision
 * 
 */

/* 
 * -- Public definition header file 
 * -- used with Xlib Multiplex extension (XmuX)
 */

#ifndef _XMUX_H  
#define _XMUX_H

/* 
 * -- want we need are some definitions to allow communication with XmuX
 * -- via ClientMessage Events and Properties; this implies that we 
 * -- need to create unique atoms
 */

#define _MUX_CPORT       0
#define _MUX_MESSAGE     1
#define _MUX_HOSTS       2
#define _MUX_CHALKHOLDER 3

#define XMUX_MESSAGE_NAME   "XMUX_MESSAGE"  /* should be used in XInternAtom 
					       to create/get the unique 
					       XMUX_MESSAGE Atom */
#define XMUX_CPORT_NAME  "XMUX_CPORT"       /* should be used in XInternAtom
					       to create/get the unique
					       XMUX_CPORT Atom */

#define XMUX_HOSTS_NAME "XMUX_HOSTS"        /* /* should be used in XInternAtom
                                               to create/get the unique
                                               XMUX_HOSTS Atom */

#define XMUX_CHALKHOLDER_NAME "XMUX_CHALKHOLDER"
                                            /* should be used in XInternAtom
                                               to create/get the unique
                                               XMUX_CHALKHOLDER Atom */


#define XMUX_MESSAGE_FORMAT 32              /* we use long values 
					       to communicate with messages */

#define MuxAdd     '+'
#define MuxRemove  '-'

#define XMUXType     0
#define XMUXSubtype  1
#define XMUXDetail   2
/* 
 * -- the different possible meanings of this new message type are defined
 * -- as constants; clients are recommended to use these constants -- or
 * -- (even better) to use the convenience functions that hide these details)
 * -- when communicating with XmuX
 * -- LOGICAL STRUCTURE :
 * -- xmessage.data.l[ 0 ] --> message type: Action/Information/Error
 * -- xmessage.data.l[ 1 ] --> message subtype: e.g. Error-DuplicationFailed
 */

/* -- message types -- */

#define XMUXAction  (1L << 0)
#define XMUXInfo    (1L << 1)
#define XMUXError   (1L << 2)

/* -- message subtypes -- */

/* -- action subtypes -- */
#define XMUXPassChalk 0L
#define XMUXDebug     1L

#define DbgEvents    1L
#define DbgRequests  2L
#define DbgResources 3L
#define DbgMux       4L
#define DbgAll       5L

/* -- Information subtypes -- */
#define XMUXMuxSetup    0L           /* XmuX says: "I'm trying to multiplex an
					application" */
#define XMUXBroadSetup  1L           /* XmuX says: "I'm trying to broadcast an
					application" */
#define XMUXChalkPassed 2L           /* XmuX says: "I've passed the chalk" */
					
#define XMUXFinished    3L           /* XmuX says: "I've successfully finished
					multiplexing/broadcasting" */
/* -- error subtypes -- */
#define XMUXMuxFailed   0L           /* XmuX says: "I'm sorry, can't 
					multiplex" */
#define XMUXBroadFailed 1L           /* XmuX says: "I'm sorry, can't 
					braodcast */

#define XMUXProperty 0
#define XMUXMessage  1

typedef 
struct _XmuXHints {
    int type ;              /* message or property */
    union {
	char  *strings[ 2 ] ;
	long   mess[ 3 ] ;
    } u ;
} XmuXHints ;

#endif
    


