<!-- $XConsortium: SetProto.sgm /main/7 1996/08/30 16:06:00 rws $ -->
<!-- (c) Copyright 1995 Digital Equipment Corporation. -->
<!-- (c) Copyright 1995 Hewlett-Packard Company. -->
<!-- (c) Copyright 1995 International Business Machines Corp. -->
<!-- (c) Copyright 1995 Sun Microsystems, Inc. -->
<!-- (c) Copyright 1995 Novell, Inc. -->
<!-- (c) Copyright 1995 FUJITSU LIMITED. -->
<!-- (c) Copyright 1995 Hitachi. -->

<RefEntry Id="CDEMMA.MAN399.rsml.1">
<RefMeta>
<RefEntryTitle>XmSetProtocolHooks</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>XmSetProtocolHooks</Function></RefName>
<RefPurpose>A VendorShell function that allows preactions and postactions to be executed when a protocol message is received from MWM
<IndexTerm>
<Primary>XmSetProtocolHooks</Primary>
</IndexTerm><IndexTerm>
<Primary>VendorShell functions</Primary>
<Secondary>XmSetProtocolHooks</Secondary>
</IndexTerm><IndexTerm>
<Primary>protocols</Primary>
</IndexTerm></RefPurpose>
</RefNameDiv>
<!-- -->
<!-- @OSF_COPYRIGHT@-->
<!-- COPYRIGHT NOTICE-->
<!-- Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.-->
<!-- ALL RIGHTS RESERVED (MOTIF). See the file named COPY.MOTIF.DOC for-->
<!-- the full copyright text.-->
<!-- -->
<!-- HISTORY-->
<!-- -->
<!-- **-->
<!-- **-->
<!-- **  (c) Copyright 1989, 1990, 1992 by Open Software Foundation, Inc.-->
<!-- **      All Rights Reserved.-->
<!-- **-->
<!-- **  (c) Copyright 1987, 1988, 1989, by Hewlett-Packard Company-->
<!-- **-->
<!-- **  (c) Copyright 1987, 1988 by Digital Equipment Corporation,-->
<!-- **      Maynard, MA.  All Rights Reserved.-->
<!-- **-->
<!-- **-->
<RefSynopsisDiv>
<FuncSynopsis>
<FuncSynopsisInfo>#include &lt;Xm/Xm.h>
#include &lt;Xm/Protocols.h>
</FuncSynopsisInfo>
<FuncDef>void <Function>XmSetProtocolHooks</Function></FuncDef>
<!--<ParamDef><Replaceable>shell, property, protocol, prehook, pre_closure,
posthook, post_closure</Replaceable></ParamDef>-->
<ParamDef>Widget <Parameter>shell</Parameter></ParamDef>
<ParamDef>Atom <Parameter>property</Parameter></ParamDef>
<ParamDef>Atom <Parameter>protocol</Parameter></ParamDef>
<ParamDef>XtCallbackProc <Parameter>prehook</Parameter></ParamDef>
<ParamDef>XtPointer <Parameter>pre_closure</Parameter></ParamDef>
<ParamDef>XtCallbackProc <Parameter>posthook</Parameter></ParamDef>
<ParamDef>XtPointer <Parameter>post_closure</Parameter></ParamDef>
</FuncSynopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para><Function>XmSetProtocolHooks</Function> is used by shells that want to have preactions
and postactions
executed when a protocol message is received from MWM.
Since there is no guaranteed ordering in execution of event handlers or
callback lists, this allows the shell to control the flow while leaving the
protocol manager structures opaque.
</Para>
<Para><Function>XmSetWMProtocolHooks</Function> is a convenience interface.
It calls <Function>XmSetProtocolHooks</Function>
with the property value set to the atom returned by
interning <Property>WM_PROTOCOLS</Property>.
</Para>
<VariableList>
<VarListEntry>
<Term><Symbol Role="Variable">shell</Symbol></Term>
<ListItem>
<Para>Specifies the widget with which the protocol property is associated
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">property</Symbol></Term>
<ListItem>
<Para>Specifies the protocol property
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">protocol</Symbol></Term>
<ListItem>
<Para>Specifies the protocol atom
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">prehook</Symbol></Term>
<ListItem>
<Para>Specifies the procedure to call before calling entries on the client callback
list
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">pre_closure</Symbol></Term>
<ListItem>
<Para>Specifies the client data to be passed to the prehook when it is invoked
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">posthook</Symbol></Term>
<ListItem>
<Para>Specifies the procedure to call after calling entries on the client callback
list
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">post_closure</Symbol></Term>
<ListItem>
<Para>Specifies the client data to be passed to the posthook when it is invoked
</Para>
</ListItem>
</VarListEntry>
</VariableList>
<Para>For a complete definition of VendorShell and its associated resources, see
&cdeman.VendorShell;.
</Para>
</RefSect1>
<RefSect1>
<Title>RELATED</Title>
<Para>&cdeman.VendorShell;,
&cdeman.XmInternAtom;, and &cdeman.XmSetWMProtocolHooks;.
</Para>
</RefSect1>
</RefEntry>
<!--fickle 1.09 7/2/95-->
