Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:15:27

0001 /* 
0002  * Motif
0003  *
0004  * Copyright (c) 1987-2012, The Open Group. All rights reserved.
0005  *
0006  * These libraries and programs are free software; you can
0007  * redistribute them and/or modify them under the terms of the GNU
0008  * Lesser General Public License as published by the Free Software
0009  * Foundation; either version 2 of the License, or (at your option)
0010  * any later version.
0011  *
0012  * These libraries and programs are distributed in the hope that
0013  * they will be useful, but WITHOUT ANY WARRANTY; without even the
0014  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
0015  * PURPOSE. See the GNU Lesser General Public License for more
0016  * details.
0017  *
0018  * You should have received a copy of the GNU Lesser General Public
0019  * License along with these librararies and programs; if not, write
0020  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
0021  * Floor, Boston, MA 02110-1301 USA
0022 */ 
0023 #ifndef _XmProtocols_h
0024 #define _XmProtocols_h
0025 
0026 #include <Xm/Xm.h>
0027 #include <Xm/AtomMgr.h>
0028 
0029 #ifdef __cplusplus
0030 extern "C" {
0031 #endif
0032 
0033 /* should be in XmP.h */
0034 
0035 #ifndef XmCR_WM_PROTOCOLS
0036 #define XmCR_WM_PROTOCOLS 6666
0037 #endif /* XmCR_WM_PROTOCOLS */
0038 
0039 /* define the XM_PROTOCOLS atom for use in  routines */
0040 #ifdef XA_WM_PROTOCOLS
0041 #define XM_WM_PROTOCOL_ATOM(shell) XA_WM_PROTOCOLS
0042 #else
0043 #define XM_WM_PROTOCOL_ATOM(shell) \
0044     XInternAtom(XtDisplay(shell),"WM_PROTOCOLS",FALSE)
0045 #endif /* XA_WM_PROTOCOLS */
0046 
0047 
0048 #define XmAddWMProtocols(shell, protocols, num_protocols) \
0049       XmAddProtocols(shell, XM_WM_PROTOCOL_ATOM(shell), \
0050              protocols, num_protocols)
0051 
0052 #define XmRemoveWMProtocols(shell, protocols, num_protocols) \
0053       XmRemoveProtocols(shell, XM_WM_PROTOCOL_ATOM(shell), \
0054             protocols, num_protocols)
0055 
0056 #define XmAddWMProtocolCallback(shell, protocol, callback, closure) \
0057       XmAddProtocolCallback(shell, XM_WM_PROTOCOL_ATOM(shell), \
0058                 protocol, callback, closure)
0059 
0060 #define XmRemoveWMProtocolCallback(shell, protocol, callback, closure) \
0061   XmRemoveProtocolCallback(shell, XM_WM_PROTOCOL_ATOM(shell), \
0062                 protocol, callback, closure)
0063 
0064 #define XmActivateWMProtocol(shell, protocol) \
0065       XmActivateProtocol(shell, XM_WM_PROTOCOL_ATOM(shell), protocol)
0066 
0067 #define XmDeactivateWMProtocol(shell, protocol) \
0068       XmDeactivateProtocol(shell, XM_WM_PROTOCOL_ATOM(shell), protocol)
0069 
0070 #define XmSetWMProtocolHooks(shell, protocol, pre_h, pre_c, post_h, post_c) \
0071       XmSetProtocolHooks(shell, XM_WM_PROTOCOL_ATOM(shell), \
0072              protocol, pre_h, pre_c, post_h, post_c)
0073 
0074 
0075 /********    Public Function Declarations    ********/
0076 
0077 extern void XmAddProtocols( 
0078                         Widget shell,
0079                         Atom property,
0080                         Atom *protocols,
0081                         Cardinal num_protocols) ;
0082 extern void XmRemoveProtocols( 
0083                         Widget shell,
0084                         Atom property,
0085                         Atom *protocols,
0086                         Cardinal num_protocols) ;
0087 extern void XmAddProtocolCallback( 
0088                         Widget shell,
0089                         Atom property,
0090                         Atom proto_atom,
0091                         XtCallbackProc callback,
0092                         XtPointer closure) ;
0093 extern void XmRemoveProtocolCallback( 
0094                         Widget shell,
0095                         Atom property,
0096                         Atom proto_atom,
0097                         XtCallbackProc callback,
0098                         XtPointer closure) ;
0099 extern void XmActivateProtocol( 
0100                         Widget shell,
0101                         Atom property,
0102                         Atom proto_atom) ;
0103 extern void XmDeactivateProtocol( 
0104                         Widget shell,
0105                         Atom property,
0106                         Atom proto_atom) ;
0107 extern void XmSetProtocolHooks( 
0108                         Widget shell,
0109                         Atom property,
0110                         Atom proto_atom,
0111                         XtCallbackProc pre_hook,
0112                         XtPointer pre_closure,
0113                         XtCallbackProc post_hook,
0114                         XtPointer post_closure) ;
0115 
0116 /********    End Public Function Declarations    ********/
0117 
0118 
0119 #ifdef __cplusplus
0120 }  /* Close scope of 'extern "C"' declaration which encloses file. */
0121 #endif
0122 
0123 #endif /* _XmProtocols_h */