(* Xm/Protocols.def  Oct 15  18:37:54  1996 *)
(* Copyright (c) 1996,1997 XDS Ltd, Russia. All rights reserved. *)

(* Converted from Xm/Protocols.h using H2D v1.16 *)

(* $RCSfile: Protocols.def,v $ $Revision: 4 $ $Date: 28.07.98 23:14 $ *)

<*+ M2ADDTYPES *>
<*+ M2EXTENSIONS *>
<*+ NOHEADER *> 
<* IF NOT DEFINED(GENTYPEDEF) THEN *> <* NEW GENTYPEDEF+ *> <* END *>
<*+ CSTDLIB *>

DEFINITION MODULE ["C"] Protocols;

IMPORT SYSTEM, X, Xt:=Intrinsic;
(* H2D:  Required IMPORT clause: 
IMPORT Protocols, X, Intrinsic;
*)

(*
 * (c) Copyright 1989, 1990, 1991, 1992, 1993 OPEN SOFTWARE FOUNDATION, INC.
 * ALL RIGHTS RESERVED
 *)

(*
 * Motif Release 1.2.3 
 *)

(*  should be in XmP.h  *)

CONST 
  XmCR_WM_PROTOCOLS = 6666;

(*  define the XM_PROTOCOLS atom for use in  routines  *)

<* IF __GEN_C__ THEN *>

(* H2D: this procedure corresponds to a macro. *)
PROCEDURE XM_WM_PROTOCOL_ATOM ( shell: Xt.Widget ): X.Atom;
PROCEDURE XmAddWMProtocols ( shell: Xt.Widget;
                             protocols: X.PAAtom;
                             num_protocols: Xt.Cardinal );
PROCEDURE XmRemoveWMProtocols ( shell: Xt.Widget;
                                protocols: X.PAAtom;
                                num_protocols: Xt.Cardinal );
PROCEDURE XmAddWMProtocolCallback ( shell: Xt.Widget;
                                    protocol: X.Atom;
                                    callback: Xt.XtCallbackProc;
                                    closure: Xt.XtPointer );
PROCEDURE XmRemoveWMProtocolCallback ( shell: Xt.Widget;
                                       protocol: X.Atom;
                                       callback: Xt.XtCallbackProc;
                                       closure: Xt.XtPointer );
PROCEDURE XmActivateWMProtocol ( shell: Xt.Widget;
                                 protocol: X.Atom );
PROCEDURE XmDeactivateWMProtocol ( shell: Xt.Widget;
                                   protocol: X.Atom );
PROCEDURE XmSetWMProtocolHooks ( shell: Xt.Widget;
                                 protocol: X.Atom;
                                 pre_h: Xt.XtCallbackProc;
                                 pre_c: Xt.XtPointer;
                                 post_h: Xt.XtCallbackProc;
                                 post_c: Xt.XtPointer );

<* ELSE *>

PROCEDURE  / XM_WM_PROTOCOL_ATOM ( shell: Xt.Widget ): X.Atom;
PROCEDURE  / XmAddWMProtocols ( shell: Xt.Widget;
                                protocols: X.PAAtom;
                                num_protocols: Xt.Cardinal );
PROCEDURE  / XmRemoveWMProtocols ( shell: Xt.Widget;
                                   protocols: X.PAAtom;
                                   num_protocols: Xt.Cardinal );
PROCEDURE  / XmAddWMProtocolCallback ( shell: Xt.Widget;
                                       protocol: X.Atom;
                                       callback: Xt.XtCallbackProc;
                                       closure: Xt.XtPointer );
PROCEDURE  / XmRemoveWMProtocolCallback ( shell: Xt.Widget;
                                          protocol: X.Atom;
                                          callback: Xt.XtCallbackProc;
                                          closure: Xt.XtPointer );
PROCEDURE  / XmActivateWMProtocol ( shell: Xt.Widget;
                                    protocol: X.Atom );
PROCEDURE  / XmDeactivateWMProtocol ( shell: Xt.Widget;
                                      protocol: X.Atom );
PROCEDURE  / XmSetWMProtocolHooks ( shell: Xt.Widget;
                                    protocol: X.Atom;
                                    pre_h: Xt.XtCallbackProc;
                                    pre_c: Xt.XtPointer;
                                    post_h: Xt.XtCallbackProc;
                                    post_c: Xt.XtPointer );

<* END *>

(********    Public Function Declarations    ********)

PROCEDURE XmAddProtocols ( shell: Xt.Widget;
                           property: X.Atom;
                           protocols: X.PAAtom;
                           num_protocols: Xt.Cardinal );

PROCEDURE XmRemoveProtocols ( shell: Xt.Widget;
                              property: X.Atom;
                              protocols: X.PAAtom;
                              num_protocols: Xt.Cardinal );

PROCEDURE XmAddProtocolCallback ( shell: Xt.Widget;
                                  property: X.Atom;
                                  proto_atom: X.Atom;
                                  callback: Xt.XtCallbackProc;
                                  closure: Xt.XtPointer );

PROCEDURE XmRemoveProtocolCallback ( shell: Xt.Widget;
                                     property: X.Atom;
                                     proto_atom: X.Atom;
                                     callback: Xt.XtCallbackProc;
                                     closure: Xt.XtPointer );

PROCEDURE XmActivateProtocol ( shell: Xt.Widget;
                               property: X.Atom;
                               proto_atom: X.Atom );

PROCEDURE XmDeactivateProtocol ( shell: Xt.Widget;
                                 property: X.Atom;
                                 proto_atom: X.Atom );

PROCEDURE XmSetProtocolHooks ( shell: Xt.Widget;
                               property: X.Atom;
                               proto_atom: X.Atom;
                               pre_hook: Xt.XtCallbackProc;
                               pre_closure: Xt.XtPointer;
                               post_hook: Xt.XtCallbackProc;
                               post_closure: Xt.XtPointer );

(********    End Public Function Declarations    ********)

END Protocols.
