Files
cdesktop/cde/doc/C/guides/man/m3_tttk/m_create.sgm

113 lines
4.4 KiB
Plaintext

<!-- $XConsortium: m_create.sgm /main/5 1996/08/30 14:02:51 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. -->
<![ %CDE.C.CDE; [<RefEntry Id="CDEMX.XCDI.MAN276.rsml.1">]]>
<![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN276.rsml.1">]]>
<RefMeta>
<RefEntryTitle>tttk_message_create</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>tttk_message_create</Function></RefName>
<RefPurpose>create a message conforming to the &str-XZ; conventions
</RefPurpose>
</RefNameDiv>
<!-- $XConsortium: m_create.sgm /main/5 1996/08/30 14:02:51 rws $-->
<!-- CDE Common Source Format, Version 1.0.0-->
<!-- (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company-->
<!-- (c) Copyright 1993, 1994, 1995 International Business Machines Corp.-->
<!-- (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.-->
<!-- (c) Copyright 1993, 1994, 1995 Novell, Inc.-->
<RefSynopsisDiv>
<FuncSynopsis Remap="ANSI">
<FuncSynopsisInfo>#include &lt;Tt/tttk.h>
</FuncSynopsisInfo>
<FuncDef>Tt_message <Function>tttk_message_create</Function></FuncDef>
<ParamDef>Tt_message <Parameter>context</Parameter></ParamDef>
<ParamDef>Tt_class <Parameter>the_class</Parameter></ParamDef>
<ParamDef>Tt_scope <Parameter>the_scope</Parameter></ParamDef>
<ParamDef>const char *<Parameter>handler</Parameter></ParamDef>
<ParamDef>const char *<Parameter>op</Parameter></ParamDef>
<ParamDef>Tt_message_callback <Parameter>callback</Parameter></ParamDef>
</FuncSynopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para>The
<Function>tttk_message_create</Function> function
creates a message that propagates inherited contexts
from one message to another.
The
<Function>tttk_message_create</Function> function creates a message and copies onto it all the context slots from
<Symbol Role="Variable">context</Symbol> whose slotname begins with the characters
<SystemItem Class="Constant">ENV_</SystemItem>. It gives
the created message a
<StructName Role="typedef">Tt_class</StructName> of
<Emphasis>the_class</Emphasis> and a
<StructName Role="typedef">Tt_scope</StructName> of
<Emphasis>the_scope</Emphasis>. If
<Emphasis>handler</Emphasis> is not
<SystemItem Class="Constant">NULL</SystemItem>, then
<Function>tttk_message_create</Function> addresses the message as a
<SystemItem Class="Constant">TT_HANDLER</SystemItem> to that
procid;
otherwise, it gives the message a
<StructName Role="typedef">Tt_address</StructName> of
<SystemItem Class="Constant">TT_PROCEDURE</SystemItem>. It sets
the message's op to
<Symbol Role="Variable">op</Symbol> if
<Symbol Role="Variable">op</Symbol> is not
<SystemItem Class="Constant">NULL</SystemItem>. If
<Symbol Role="Variable">callback</Symbol> is not
<SystemItem Class="Constant">NULL</SystemItem>, <Function>tttk_message_create</Function> adds it to the message as a message callback.
</Para>
</RefSect1>
<RefSect1>
<Title>RETURN VALUE</Title>
<Para>Upon successful completion, the
<Function>tttk_message_create</Function> function
returns the created
<StructName Role="typedef">Tt_message</StructName>, which can be modified, sent, and destroyed like any other
<StructName Role="typedef">Tt_message</StructName> <Literal>;</Literal> otherwise, it returns an error pointer.
The application can use
&cdeman.tt.ptr.error; to extract one of the following
<StructName Role="typedef">Tt_status</StructName> values from the returned handle:
</Para>
<VariableList>
<VarListEntry>
<Term>TT_ERR_NOMEM</Term>
<ListItem>
<Para>There is insufficient memory available to perform the function.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_ERR_NOMP</Term>
<ListItem>
<Para>The
&cdeman.ttsession; process is not running and the ToolTalk service cannot restart it.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_ERR_PROCID</Term>
<ListItem>
<Para>The specified process identifier is out of date or invalid.
</Para>
</ListItem>
</VarListEntry>
</VariableList>
</RefSect1>
<RefSect1>
<Title>SEE ALSO</Title>
<Para>&cdeman.Tt.tttk.h;, &cdeman.tt.message.create;, &cdeman.tttk.message.create;, &cdeman.ttdt.file.notice;, &cdeman.ttdt.file.request;.</Para>
</RefSect1>
</RefEntry>
<!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->