Initial import of the CDE 2.1.30 sources from the Open Group.

This commit is contained in:
Peter Howkins
2012-03-10 18:21:40 +00:00
commit 83b6996daa
18978 changed files with 3945623 additions and 0 deletions

View File

@@ -0,0 +1,97 @@
<!-- $XConsortium: Get_Modi.sgm /main/5 1996/08/30 14:24:53 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.MAN254.rsml.1">]]>
<![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN254.rsml.1">]]>
<RefMeta>
<RefEntryTitle>ttdt_Get_Modified</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>ttdt_Get_Modified</Function></RefName>
<RefPurpose>ask if any ToolTalk client has changes pending on a file
</RefPurpose>
</RefNameDiv>
<!-- $XConsortium: Get_Modi.sgm /main/5 1996/08/30 14:24:53 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>int <Function>ttdt_Get_Modified</Function></FuncDef>
<ParamDef>Tt_message <Parameter>context</Parameter></ParamDef>
<ParamDef>const char *<Parameter>pathname</Parameter></ParamDef>
<ParamDef>Tt_scope <Parameter>the_scope</Parameter></ParamDef>
<ParamDef>XtAppContext <Parameter>app2run</Parameter></ParamDef>
<ParamDef>int <Parameter>ms_timeout</Parameter></ParamDef>
</FuncSynopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para>The
<Function>ttdt_Get_Modified</Function> function
sends a
<Symbol Role="Message">Get_Modified</Symbol> request in the scope
<Emphasis>the_scope</Emphasis> and waits for the reply.
A
<Symbol Role="Message">Get_Modified</Symbol> request asks if any ToolTalk client has
changes pending on
<Symbol Role="Variable">pathname</Symbol> that it intends to make persistent.
</Para>
<Para>The
<Symbol Role="Variable">context</Symbol> argument describes the environment to use.
If
<Symbol Role="Variable">context</Symbol> is not zero, messages created by
<Function>ttdt_Get_Modified</Function> inherit from
<Symbol Role="Variable">context</Symbol> all contexts whose slotname begins with the characters
<SystemItem Class="Constant">ENV_</SystemItem>. That is, the environment described in
<Symbol Role="Variable">context</Symbol> is propagated to messages created by
<Function>ttdt_Get_Modified</Function>.</Para>
<Para>The
<Symbol Role="Variable">pathname</Symbol> argument is a pointer to a pathname
on which the client is operating.
</Para>
<Para>The
<Emphasis>the_scope</Emphasis> argument identifies the scope of the request.
If
<Emphasis>the_scope</Emphasis> is
<SystemItem Class="Constant">TT_SCOPE_NONE</SystemItem>, <Function>ttdt_Get_Modified</Function> tries
<SystemItem Class="Constant">TT_BOTH</SystemItem>, and falls back to
<SystemItem Class="Constant">TT_FILE_IN_SESSION</SystemItem> if, for example,
the ToolTalk database server
is not installed on the file server that owns
<Symbol Role="Variable">pathname</Symbol>.</Para>
<Para>The
<Function>ttdt_Get_Modified</Function> function
passes
<Emphasis>app2run</Emphasis> and
<Emphasis>ms_timeout</Emphasis> to
&cdeman.tttk.block.while;, blocking on the reply to the
<Symbol Role="Message">Get_Modified</Symbol> request it sends.
</Para>
</RefSect1>
<RefSect1>
<Title>RETURN VALUE</Title>
<Para>Upon successful completion, the
<Function>ttdt_Get_Modified</Function> function returns non-zero if the
<Symbol Role="Message">Get_Modified</Symbol> request receives an affirmative reply within
<Emphasis>ms_timeout</Emphasis> milliseconds;
otherwise, it returns zero.
</Para>
</RefSect1>
<RefSect1>
<Title>SEE ALSO</Title>
<Para>&cdeman.Tt.tttk.h;, &cdeman.ttdt.file.join;, &cdeman.ttdt.file.event;, &cdeman.tttk.block.while;.</Para>
</RefSect1>
</RefEntry>
<!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->

View File

@@ -0,0 +1,170 @@
<!-- $XConsortium: Revert.sgm /main/5 1996/08/30 14:25:27 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.MAN255.rsml.1">]]>
<![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN255.rsml.1">]]>
<RefMeta>
<RefEntryTitle>ttdt_Revert</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>ttdt_Revert</Function></RefName>
<RefPurpose>request a ToolTalk client to revert a file
</RefPurpose>
</RefNameDiv>
<!-- $XConsortium: Revert.sgm /main/5 1996/08/30 14:25:27 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_status <Function>ttdt_Revert</Function></FuncDef>
<ParamDef>Tt_message <Parameter>context</Parameter></ParamDef>
<ParamDef>const char *<Parameter>pathname</Parameter></ParamDef>
<ParamDef>Tt_scope <Parameter>the_scope</Parameter></ParamDef>
<ParamDef>XtAppContext <Parameter>app2run</Parameter></ParamDef>
<ParamDef>int <Parameter>ms_timeout</Parameter></ParamDef>
</FuncSynopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para>The
<Function>ttdt_Revert</Function> function
sends a
<Symbol Role="Message">Revert</Symbol> request in the
<Emphasis>the_scope</Emphasis> argument and waits for the reply.
A
<Symbol Role="Message">Revert</Symbol> request asks the handling
ToolTalk client to discard any changes pending on
<Symbol Role="Variable">pathname</Symbol>.</Para>
<Para>The
<Symbol Role="Variable">context</Symbol> argument describes the environment to use.
If
<Symbol Role="Variable">context</Symbol> is not zero, messages created by
<Function>ttdt_Revert</Function> inherit from
<Symbol Role="Variable">context</Symbol> all contexts whose slotname begins with the characters
<SystemItem Class="Constant">ENV_</SystemItem>.</Para>
<Para>The
<Emphasis>the_scope</Emphasis> argument identifies the scope of the request.
If
<Emphasis>the_scope</Emphasis> is
<SystemItem Class="Constant">TT_SCOPE_NONE</SystemItem>, <Function>ttdt_Revert</Function> tries
<SystemItem Class="Constant">TT_BOTH</SystemItem>, and falls back to
<SystemItem Class="Constant">TT_FILE_IN_SESSION</SystemItem> if, for example,
the ToolTalk database server
is not installed on the file server that owns
<Symbol Role="Variable">pathname</Symbol>.</Para>
<Para>The
<Function>ttdt_Revert</Function> function passes
<Emphasis>app2run</Emphasis> and
<Emphasis>ms_timeout</Emphasis> to
&cdeman.tttk.block.while;, blocking on the reply to the
<Symbol Role="Message">Save</Symbol> request it sends.
</Para>
</RefSect1>
<RefSect1>
<Title>RETURN VALUE</Title>
<Para>Upon successful completion, the
<Function>ttdt_Revert</Function> function returns the status of the operation as one of the following
<StructName Role="typedef">Tt_status</StructName> values:
</Para>
<VariableList>
<VarListEntry>
<Term>TT_OK</Term>
<ListItem>
<Para>The sent request received an affirmative reply within
<Emphasis>ms_timeout</Emphasis> milliseconds.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_DESKTOP_ETIMEDOUT</Term>
<ListItem>
<Para>No reply was received within
<Emphasis>ms_timeout</Emphasis> milliseconds.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_DESKTOP_EPROTO</Term>
<ListItem>
<Para>The request was failed, but the handler set the
<Function>tt_message_status</Function> of the failure reply to
<SystemItem Class="Constant">TT_OK</SystemItem>, instead of a specific error status.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_ERR_DBAVAIL</Term>
<ListItem>
<Para>The ToolTalk service could not access the ToolTalk database
needed for this operation.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_ERR_DBEXIST</Term>
<ListItem>
<Para>The ToolTalk service could not access the specified ToolTalk database
in the expected place.
</Para>
</ListItem>
</VarListEntry>
<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_OVERFLOW</Term>
<ListItem>
<Para>The ToolTalk service has more active messages than it can handle.
(The maximum number of active messages is
implementation specific, but is at least 2000.)
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_ERR_POINTER</Term>
<ListItem>
<Para>The
<Symbol Role="Variable">pathname</Symbol> argument was
<SystemItem Class="Constant">NULL</SystemItem> or was a ToolTalk error pointer.
</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.ttdt.Save;, &cdeman.ttdt.file.join;, &cdeman.ttdt.file.event;, &cdeman.tttk.block.while;.</Para>
</RefSect1>
</RefEntry>
<!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->

View File

@@ -0,0 +1,171 @@
<!-- $XConsortium: Save.sgm /main/5 1996/08/30 14:25:55 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.MAN256.rsml.1">]]>
<![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN256.rsml.1">]]>
<RefMeta>
<RefEntryTitle>ttdt_Save</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>ttdt_Save</Function></RefName>
<RefPurpose>request a ToolTalk client to save a file
</RefPurpose>
</RefNameDiv>
<!-- $XConsortium: Save.sgm /main/5 1996/08/30 14:25:55 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_status <Function>ttdt_Save</Function></FuncDef>
<ParamDef>Tt_message <Parameter>context</Parameter></ParamDef>
<ParamDef>const char *<Parameter>pathname</Parameter></ParamDef>
<ParamDef>Tt_scope <Parameter>the_scope</Parameter></ParamDef>
<ParamDef>XtAppContext <Parameter>app2run</Parameter></ParamDef>
<ParamDef>int <Parameter>ms_timeout</Parameter></ParamDef>
</FuncSynopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para>The
<Function>ttdt_Save</Function> function
sends a
<Symbol Role="Message">Save</Symbol> request in the
<Emphasis>the_scope</Emphasis> argument and waits for the reply.
A
<Symbol Role="Message">Save</Symbol> request asks the handling ToolTalk client to
save any changes pending on
<Symbol Role="Variable">pathname</Symbol>.</Para>
<Para>The
<Symbol Role="Variable">context</Symbol> argument describes the environment to use.
If
<Symbol Role="Variable">context</Symbol> is not zero, messages created by
<Function>ttdt_Save</Function> inherit from
<Symbol Role="Variable">context</Symbol> all contexts whose slotname begins with the characters
<SystemItem Class="Constant">ENV_</SystemItem>.</Para>
<Para>The
<Emphasis>the_scope</Emphasis> argument identifies the scope of the request.
If
<Emphasis>the_scope</Emphasis> is
<SystemItem Class="Constant">TT_SCOPE_NONE</SystemItem>, <Function>ttdt_Save</Function> tries
<SystemItem Class="Constant">TT_BOTH</SystemItem>, and falls back to
<SystemItem Class="Constant">TT_FILE_IN_SESSION</SystemItem> if, for example,
the ToolTalk database server
is not installed on the file server that owns
<Symbol Role="Variable">pathname</Symbol>.</Para>
<Para>The
<Function>ttdt_Save</Function> function
passes
<Emphasis>app2run</Emphasis> and
<Emphasis>ms_timeout</Emphasis> to
&cdeman.tttk.block.while;, blocking on the reply to the
<Symbol Role="Message">Save</Symbol> request it sends.
</Para>
</RefSect1>
<RefSect1>
<Title>RETURN VALUE</Title>
<Para>Upon successful completion, the
<Function>ttdt_Save</Function> function returns the status of the operation as one of the following
<StructName Role="typedef">Tt_status</StructName> values:
</Para>
<VariableList>
<VarListEntry>
<Term>TT_OK</Term>
<ListItem>
<Para>The sent request received an affirmative reply within
<Emphasis>ms_timeout</Emphasis> milliseconds.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_DESKTOP_ETIMEDOUT</Term>
<ListItem>
<Para>No reply was received within
<Emphasis>ms_timeout</Emphasis> milliseconds.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_DESKTOP_EPROTO</Term>
<ListItem>
<Para>The request was failed, but the handler set the
<Function>tt_message_status</Function> of the failure reply to
<SystemItem Class="Constant">TT_OK</SystemItem>, instead of a specific error status.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_ERR_DBAVAIL</Term>
<ListItem>
<Para>The ToolTalk service could not access the ToolTalk database
needed for this operation.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_ERR_DBEXIST</Term>
<ListItem>
<Para>The ToolTalk service could not access the specified ToolTalk database
in the expected place.
</Para>
</ListItem>
</VarListEntry>
<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_OVERFLOW</Term>
<ListItem>
<Para>The ToolTalk service has more active messages than it can handle.
(The maximum number of active messages is
implementation specific, but is at least 2000.)
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_ERR_POINTER</Term>
<ListItem>
<Para>The
<Symbol Role="Variable">pathname</Symbol> argument was
<SystemItem Class="Constant">NULL</SystemItem> or was a ToolTalk error pointer.
</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.ttdt.Revert;, &cdeman.ttdt.file.join;, &cdeman.ttdt.file.event;, &cdeman.tttk.block.while;.</Para>
</RefSect1>
</RefEntry>
<!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->

View File

@@ -0,0 +1,75 @@
<!-- $XConsortium: close.sgm /main/5 1996/08/30 14:26:29 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.MAN257.rsml.1">]]>
<![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN257.rsml.1">]]>
<RefMeta>
<RefEntryTitle>ttdt_close</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>ttdt_close</Function></RefName>
<RefPurpose>destroy a ToolTalk communication endpoint
</RefPurpose>
</RefNameDiv>
<!-- $XConsortium: close.sgm /main/5 1996/08/30 14:26:29 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_status <Function>ttdt_close</Function></FuncDef>
<ParamDef>const char *<Parameter>procid</Parameter></ParamDef>
<ParamDef>const char *<Parameter>new_procid</Parameter></ParamDef>
<ParamDef>int <Parameter>sendStopped</Parameter></ParamDef>
</FuncSynopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para>The
<Function>ttdt_close</Function> function destroys a ToolTalk communication endpoint.
</Para>
<Para>If
<Emphasis>sendStopped</Emphasis> is True, the
<Function>ttdt_close</Function> function sends a
<Symbol Role="Message">Stopped</Symbol> notice; otherwise, it sends no notice.
If
<Emphasis>procid</Emphasis> is not
<SystemItem Class="Constant">NULL</SystemItem>, <Function>ttdt_close</Function> calls
<Function>tt_default_procid_set</Function> with a
<Emphasis>procid</Emphasis> argument and then calls
<Function>tt_close</Function>; otherwise, it closes the current default
procid.
If
<Emphasis>new_procid</Emphasis> is not
<SystemItem Class="Constant">NULL</SystemItem>, <Function>ttdt_close</Function> calls
<Function>tt_default_procid_set</Function> with a
<Emphasis>new_procid</Emphasis> argument.
</Para>
</RefSect1>
<RefSect1>
<Title>RETURN VALUE</Title>
<Para>The
<Function>ttdt_close</Function> function may return any of the errors returned by
&cdeman.tt.default.procid.set; and
&cdeman.tt.close;.</Para>
<Para>No errors are propagated if sending the
<Symbol Role="Message">Stopped</Symbol> notice fails.
</Para>
</RefSect1>
<RefSect1>
<Title>SEE ALSO</Title>
<Para>&cdeman.Tt.tttk.h;, &cdeman.ttdt.open;, &cdeman.tt.default.procid.set;, &cdeman.tt.close;.</Para>
</RefSect1>
</RefEntry>
<!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->

View File

@@ -0,0 +1,133 @@
<!-- $XConsortium: f_event.sgm /main/5 1996/08/30 14:27:01 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.MAN258.rsml.1">]]>
<![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN258.rsml.1">]]>
<RefMeta>
<RefEntryTitle>ttdt_file_event</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>ttdt_file_event</Function></RefName>
<RefPurpose>use ToolTalk to announce an event about a file
</RefPurpose>
</RefNameDiv>
<!-- $XConsortium: f_event.sgm /main/5 1996/08/30 14:27:01 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_status <Function>ttdt_file_event</Function></FuncDef>
<ParamDef>Tt_message <Parameter>context</Parameter></ParamDef>
<ParamDef>Tttk_op <Parameter>event</Parameter></ParamDef>
<ParamDef>Tt_pattern *<Parameter>patterns</Parameter></ParamDef>
<ParamDef>int <Parameter>send</Parameter></ParamDef>
</FuncSynopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para>The
<Function>ttdt_file_event</Function> function
is used to create and send a ToolTalk notice announcing an event
pertaining to a file.
The file is indicated by the
<Symbol Role="Variable">pathname</Symbol> argument that was passed to
&cdeman.ttdt.file.join; when
<Emphasis>patterns</Emphasis> was created.
</Para>
<Para>The
<Symbol Role="Variable">event</Symbol> argument identifies the event.
If
<Symbol Role="Variable">event</Symbol> is
<SystemItem Class="Constant">TTDT_MODIFIED</SystemItem>, <Function>ttdt_file_event</Function> registers in the
<Emphasis>the_scope</Emphasis> argument passed to
&cdeman.ttdt.file.join; to handle
<Symbol Role="Message">Get_Modified</Symbol>, <Symbol Role="Message">Save</Symbol>, and
<Symbol Role="Message">Revert</Symbol> requests.
<Symbol Role="Message">Get_Modified</Symbol> is handled transparently by associating the
modified state of the file with
<Emphasis>patterns</Emphasis>. <Symbol Role="Message">Save</Symbol> and
<Symbol Role="Message">Revert</Symbol> requests are passed to the
<StructName Role="typedef">Ttdt_file_cb</StructName> that was given to
&cdeman.ttdt.file.join;. If
<Emphasis>send</Emphasis> is True,
<Function>ttdt_file_event</Function> sends
<Symbol Role="Message">Modified</Symbol> in
<Emphasis>the_scope</Emphasis>. If
<Symbol Role="Variable">event</Symbol> is
<SystemItem Class="Constant">TTDT_SAVED</SystemItem> or
<SystemItem Class="Constant">TTDT_REVERTED</SystemItem>, <Function>ttdt_file_event</Function> unregisters handler patterns for
<Symbol Role="Message">Get_Modified</Symbol>, <Symbol Role="Message">Save</Symbol>, and
<Symbol Role="Message">Revert</Symbol> requests.
If
<Emphasis>send</Emphasis> is True,
<Function>ttdt_file_event</Function> sends
<Symbol Role="Message">Saved</Symbol> or
<Symbol Role="Message">Reverted</Symbol>, respectively, in
<Emphasis>the_scope</Emphasis>.</Para>
<Para>The
<Symbol Role="Variable">context</Symbol> argument describes the environment to use.
If
<Symbol Role="Variable">context</Symbol> is not zero, messages created by
<Function>ttdt_file_event</Function> inherit from
<Symbol Role="Variable">context</Symbol> all contexts whose slotname begins with the characters
<SystemItem Class="Constant">ENV_</SystemItem>.</Para>
</RefSect1>
<RefSect1>
<Title>RETURN VALUE</Title>
<Para>Upon successful completion, the
<Function>ttdt_file_event</Function> function returns the status of the operation as one of the following
<StructName Role="typedef">Tt_status</StructName> values:
</Para>
<VariableList>
<VarListEntry>
<Term>TT_OK</Term>
<ListItem>
<Para>The operation completed successfully.
</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_OVERFLOW</Term>
<ListItem>
<Para>The ToolTalk service has more active messages than it can handle.
(The maximum number of active messages is
implementation specific, but is at least 2000.)
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_ERR_POINTER</Term>
<ListItem>
<Para>The
<Emphasis>patterns</Emphasis> argument was
<SystemItem Class="Constant">NULL</SystemItem>.</Para>
</ListItem>
</VarListEntry>
</VariableList>
</RefSect1>
<RefSect1>
<Title>SEE ALSO</Title>
<Para>&cdeman.Tt.tttk.h;, &cdeman.ttdt.file.join;, &cdeman.ttdt.Get.Modified;, &cdeman.ttdt.file.quit;.</Para>
</RefSect1>
</RefEntry>
<!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->

View File

@@ -0,0 +1,262 @@
<!-- $XConsortium: f_join.sgm /main/6 1996/09/08 20:22:03 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.MAN259.rsml.1">]]>
<![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN259.rsml.1">]]>
<RefMeta>
<RefEntryTitle>ttdt_file_join</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>ttdt_file_join</Function></RefName>
<RefPurpose>register to observe ToolTalk events on a file
</RefPurpose>
</RefNameDiv>
<!-- $XConsortium: f_join.sgm /main/6 1996/09/08 20:22:03 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_pattern <Function>*ttdt_file_join</Function></FuncDef>
<ParamDef>const char *<Parameter>pathname</Parameter></ParamDef>
<ParamDef>Tt_scope <Parameter>the_scope</Parameter></ParamDef>
<ParamDef>int <Parameter>join</Parameter></ParamDef>
<ParamDef>Ttdt_file_cb <Parameter>cb</Parameter></ParamDef>
<ParamDef>void *<Parameter>clientdata</Parameter></ParamDef>
</FuncSynopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para>The
<Function>ttdt_file_join</Function> function registers to observe
<Emphasis>Deleted</Emphasis>, <Symbol Role="Message">Modified</Symbol>, <Symbol Role="Message">Reverted</Symbol>, <Emphasis>Moved</Emphasis>, and
<Symbol Role="Message">Saved</Symbol> notices.
</Para>
<Para>If
<Emphasis>join</Emphasis> is True,
<Function>ttdt_file_join</Function> calls
<Function>tt_file_join</Function> with a
<Symbol Role="Variable">pathname</Symbol> argument.
</Para>
<Para>The
<Emphasis>the_scope</Emphasis> argument identifies the scope of the request.
If
<Emphasis>the_scope</Emphasis> is
<SystemItem Class="Constant">TT_SCOPE_NONE</SystemItem>, it tries
<SystemItem Class="Constant">TT_BOTH</SystemItem>, and falls back to
<SystemItem Class="Constant">TT_FILE_IN_SESSION</SystemItem> if, for example,
the ToolTalk database server
is not installed on the file server that owns
<Symbol Role="Variable">pathname</Symbol>.</Para>
<Para>The
<Function>ttdt_file_join</Function> function
associates
<Emphasis>the_scope</Emphasis> and a copy of
<Symbol Role="Variable">pathname</Symbol> with the
<StructName Role="typedef">Tt_pattern</StructName>s returned, so that
<Function>ttdt_file_quit</Function> can access them.
Thus, the caller is free to modify or free
<Symbol Role="Variable">pathname</Symbol> after
<Function>ttdt_file_join</Function> returns.
</Para>
<Para>The
<Emphasis>clientdata</Emphasis> argument points to arbitrary data that will be passed
into the callback unmodified.
</Para>
<Para>The
<StructName Role="typedef">Ttdt_file_cb</StructName> argument is a callback defined as:
</Para>
<InformalExample Remap="indent">
<ProgramListing>Tt_message (*Ttdt_file_cb)(Tt_message <Emphasis>msg</Emphasis>,
Tttk_op <Symbol Role="Variable">op</Symbol>,
char *<Symbol Role="Variable">pathname</Symbol>,
void *<Emphasis>clientdata</Emphasis>,
int <Emphasis>same_euid_egid</Emphasis>,
int <Emphasis>same_procid</Emphasis>);
</ProgramListing>
</InformalExample>
<Para>The
<Symbol Role="Variable">message</Symbol> argument is the message.
The
<Symbol Role="Variable">op</Symbol> argument is the operation.
The
<Symbol Role="Variable">pathname</Symbol> argument is the pathname of the file the message is about.
The
<Emphasis>clientdata</Emphasis> argument is the client data passed into
<Function>ttdt_file_join</Function>. The
<Emphasis>same_euid_egid</Emphasis> argument is
True if the sender can be trusted;
otherwise it is False.
The
<Emphasis>same_procid</Emphasis> argument is True if the sender
is the same
procid
as the receiver;
otherwise it is False.
A
<StructName Role="typedef">Ttdt_file_cb</StructName> must return the message if it does not consume the message.
(Consuming means replying, rejecting or failing
a request, and then destroying the message.)
Otherwise, it must consume the message and return either zero or a
<Function>tt_error_pointer</Function> cast to
<StructName Role="typedef">Tt_message</StructName>.</Para>
</RefSect1>
<RefSect1>
<Title>RETURN VALUE</Title>
<Para>Upon successful completion, the
<Function>ttdt_file_join</Function> function
returns a null-terminated array of
<StructName Role="typedef">Tt_pattern</StructName>, which can be passed to
&cdeman.ttdt.file.event; to register for requests that the application should handle
once it begins to modify the file;
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_DBAVAIL</Term>
<ListItem>
<Para>The ToolTalk service could not access the ToolTalk database
needed for this operation.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_ERR_DBEXIST</Term>
<ListItem>
<Para>The ToolTalk service could not access the specified ToolTalk database
in the expected place.
</Para>
</ListItem>
</VarListEntry>
<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_PATH</Term>
<ListItem>
<Para>The specified pathname included an unsearchable directory.
</Para>
</ListItem>
</VarListEntry>
</VariableList>
</RefSect1>
<RefSect1>
<Title>APPLICATION USAGE</Title>
<Para>The null-terminated array of
<StructName Role="typedef">Tt_pattern</StructName> returned by
<Function>ttdt_file_join</Function> should be destroyed by passing the array to
&cdeman.ttdt.file.quit;.</Para>
<Para>The
<Symbol Role="Variable">pathname</Symbol> argument to
<StructName Role="typedef">Ttdt_file_cb</StructName> is a copy that can be freed using
&cdeman.tt.free;.</Para>
</RefSect1>
<RefSect1>
<Title>EXAMPLES</Title>
<Para>This is the typical algorithm of a
<StructName Role="typedef">Ttdt_file_cb</StructName>:</Para>
<InformalExample>
<ProgramListing>Tt_message myFileCB(Tt_message msg,
Tttk_op op,
char *pathname,
int trust,
int isMe)
{
tt_free(pathname);
Tt_status status = TT_OK;
switch(op) {
case TTDT_MODIFIED:
if ((_modifiedByMe)&amp;&amp;(! isMe)) {
/* Hmm, the other editor either does not know or
* does not care that we are already modifying the
* file, so the last saver will win.
*/
} else {
/* Interrogate user if she ever modifies the buffer */
_modifiedByOther = 1;
XtAddCallback(myTextWidget, XmNmodifyVerifyCallback,
myTextModifyCB, 0);
}
break;
case TTDT_GET_MODIFIED:
tt_message_arg_ival_set(msg, 1, _modifiedByMe);
tt_message_reply(msg);
break;
case TTDT_SAVE:
status = mySave(trust);
if (status == TT_OK) {
tt_message_reply(msg);
} else {
tttk_message_fail(msg, status, 0, 0);
}
break;
case TTDT_REVERT:
status = myRevert(trust);
if (status == TT_OK) {
tt_message_reply(msg);
} else {
tttk_message_fail(msg, status, 0, 0);
}
break;
case TTDT_REVERTED:
if (! isMe) {
_modifiedByOther = 0;
}
break;
case TTDT_SAVED:
if (! isMe) {
_modifiedByOther = 0;
int choice = myUserChoice(myContext, myBaseFrame,
"Another tool has saved "
"this file.", 2, "Ignore",
"Revert");
switch(choice) {
case 1:
myRevert(1);
break;
}
}
break;
case TTDT_MOVED:
case TTDT_DELETED:
/* Do something appropriate */
break;
}
tttk_message_destroy(msg);
return 0;
}
</ProgramListing>
</InformalExample>
</RefSect1>
<RefSect1>
<Title>SEE ALSO</Title>
<Para>&cdeman.Tt.tttk.h;, &cdeman.ttdt.file.quit;, &cdeman.ttdt.file.event;, &cdeman.ttdt.Get.Modified;, &cdeman.ttdt.Save;, &cdeman.ttdt.Revert;, &cdeman.tt.file.join;, &cdeman.tt.free;.</Para>
</RefSect1>
</RefEntry>
<!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->

View File

@@ -0,0 +1,163 @@
<!-- $XConsortium: f_notice.sgm /main/5 1996/08/30 14:28:02 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.MAN260.rsml.1">]]>
<![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN260.rsml.1">]]>
<RefMeta>
<RefEntryTitle>ttdt_file_notice</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>ttdt_file_notice</Function></RefName>
<RefPurpose>create and send a standard ToolTalk notice about a file
</RefPurpose>
</RefNameDiv>
<!-- $XConsortium: f_notice.sgm /main/5 1996/08/30 14:28:02 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>ttdt_file_notice</Function></FuncDef>
<ParamDef>Tt_message <Parameter>context</Parameter></ParamDef>
<ParamDef>Tttk_op <Parameter>op</Parameter></ParamDef>
<ParamDef>Tt_scope <Parameter>scope</Parameter></ParamDef>
<ParamDef>const char *<Parameter>pathname</Parameter></ParamDef>
<ParamDef>int <Parameter>send_and_destroy</Parameter></ParamDef>
</FuncSynopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para>The
<Function>ttdt_file_notice</Function> function
is used to create (and optionally send) any of the standard file notices:
<Emphasis>Created</Emphasis>, <Emphasis>Deleted</Emphasis>, <Emphasis>Moved</Emphasis>, <Symbol Role="Message">Reverted</Symbol>, <Symbol Role="Message">Saved</Symbol>, and
<Symbol Role="Message">Modified</Symbol>.</Para>
<Para>The
<Function>ttdt_file_notice</Function> function
creates a notice with the specified
<Symbol Role="Variable">op</Symbol> and
<Emphasis>scope</Emphasis>, and sets its file attribute to
<Symbol Role="Variable">pathname</Symbol>. The function adds an unset argument of
<StructName Role="typedef">Tt_mode</StructName> <SystemItem Class="Constant">TT_IN</SystemItem> and
vtype
<Emphasis>File</Emphasis> to the notice, per the Desktop messaging conventions.
If
<Emphasis>send_and_destroy</Emphasis> is True,
<Function>ttdt_file_notice</Function> sends the message and then destroys it;
otherwise, it only creates the message.
</Para>
<Para>The
<Symbol Role="Variable">context</Symbol> argument describes the environment to use.
If
<Symbol Role="Variable">context</Symbol> is not zero, messages created by
<Function>ttdt_file_notice</Function> inherit from
<Symbol Role="Variable">context</Symbol> all contexts whose slotname begins with the characters
<SystemItem Class="Constant">ENV_</SystemItem>.</Para>
</RefSect1>
<RefSect1>
<Title>RETURN VALUE</Title>
<Para>If
<Emphasis>send_and_destroy</Emphasis> is False, the
<Function>ttdt_file_notice</Function> function returns the created
<StructName Role="typedef">Tt_message</StructName>. If
<Emphasis>send_and_destroy</Emphasis> is True, it returns zero;
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_DESKTOP_EINVAL</Term>
<ListItem>
<Para>The
<Symbol Role="Variable">op</Symbol> argument was
<SystemItem Class="Constant">TTDT_MOVED</SystemItem> and
<Emphasis>send_and_destroy</Emphasis> was True.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_ERR_DBAVAIL</Term>
<ListItem>
<Para>The ToolTalk service could not access the ToolTalk database
needed for this operation.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_ERR_DBEXIST</Term>
<ListItem>
<Para>The ToolTalk service could not access the specified ToolTalk database
in the expected place.
</Para>
</ListItem>
</VarListEntry>
<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_OVERFLOW</Term>
<ListItem>
<Para>The ToolTalk service has more active messages than it can handle.
(The maximum number of active messages is
implementation specific, but is at least 2000.)
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_ERR_POINTER</Term>
<ListItem>
<Para>The
<Symbol Role="Variable">pathname</Symbol> argument was
<SystemItem Class="Constant">NULL</SystemItem> or was a ToolTalk error pointer.
</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>APPLICATION USAGE</Title>
<Para>The
<Function>ttdt_file_event</Function> function
is a higher-level interface than
<Function>ttdt_file_notice</Function>, and is the preferred way to send all but the
<Emphasis>Moved</Emphasis> notice.
</Para>
</RefSect1>
<RefSect1>
<Title>SEE ALSO</Title>
<Para>&cdeman.Tt.tttk.h;, &cdeman.ttdt.file.event;.</Para>
</RefSect1>
</RefEntry>
<!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->

View File

@@ -0,0 +1,116 @@
<!-- $XConsortium: f_quit.sgm /main/5 1996/08/30 14:28:37 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.MAN261.rsml.1">]]>
<![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN261.rsml.1">]]>
<RefMeta>
<RefEntryTitle>ttdt_file_quit</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>ttdt_file_quit</Function></RefName>
<RefPurpose>unregister interest in ToolTalk events about a file
</RefPurpose>
</RefNameDiv>
<!-- $XConsortium: f_quit.sgm /main/5 1996/08/30 14:28:37 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_status <Function>ttdt_file_quit</Function></FuncDef>
<ParamDef>Tt_pattern *<Parameter>patterns</Parameter></ParamDef>
<ParamDef>int <Parameter>quit</Parameter></ParamDef>
</FuncSynopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para>The
<Function>ttdt_file_quit</Function> function
is used to unregister interest in the
<Symbol Role="Variable">pathname</Symbol> that was passed to
&cdeman.ttdt.file.join; when
<Emphasis>patterns</Emphasis> was created.
The
<Function>ttdt_file_quit</Function> function destroys
<Emphasis>patterns</Emphasis> and sets the default file to
<SystemItem Class="Constant">NULL</SystemItem>.</Para>
<Para>If
<Symbol Role="Variable">quit</Symbol> is True,
<Function>ttdt_file_quit</Function> calls
&cdeman.tt.file.quit; with a
<Symbol Role="Variable">pathname</Symbol> argument; otherwise, it returns without quitting.
</Para>
</RefSect1>
<RefSect1>
<Title>RETURN VALUE</Title>
<Para>Upon successful completion, the
<Function>ttdt_file_quit</Function> function returns the status of the operation as one of the following
<StructName Role="typedef">Tt_status</StructName> values:
</Para>
<VariableList>
<VarListEntry>
<Term>TT_OK</Term>
<ListItem>
<Para>The operation completed successfully.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_ERR_DBAVAIL</Term>
<ListItem>
<Para>The ToolTalk service could not access the ToolTalk database
needed for this operation.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_ERR_DBEXIST</Term>
<ListItem>
<Para>The ToolTalk service could not access the specified ToolTalk database
in the expected place.
</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_POINTER</Term>
<ListItem>
<Para>The
<Emphasis>patterns</Emphasis> argument was
<SystemItem Class="Constant">NULL</SystemItem> or otherwise invalid.
</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.ttdt.file.join;, &cdeman.tt.default.file;, &cdeman.tt.file.quit;.</Para>
</RefSect1>
</RefEntry>
<!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->

View File

@@ -0,0 +1,169 @@
<!-- $XConsortium: f_reques.sgm /main/5 1996/08/30 14:29:08 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.MAN262.rsml.1">]]>
<![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN262.rsml.1">]]>
<RefMeta>
<RefEntryTitle>ttdt_file_request</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>ttdt_file_request</Function></RefName>
<RefPurpose>create and send a standard ToolTalk request about a file
</RefPurpose>
</RefNameDiv>
<!-- $XConsortium: f_reques.sgm /main/5 1996/08/30 14:29:08 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>ttdt_file_request</Function></FuncDef>
<ParamDef>Tt_message <Parameter>context</Parameter></ParamDef>
<ParamDef>Tttk_op <Parameter>op</Parameter></ParamDef>
<ParamDef>Tt_scope <Parameter>scope</Parameter></ParamDef>
<ParamDef>const char *<Parameter>pathname</Parameter></ParamDef>
<ParamDef>Ttdt_file_cb <Parameter>cb</Parameter></ParamDef>
<ParamDef>void *<Parameter>client_data</Parameter></ParamDef>
<ParamDef>int <Parameter>send_and_destroy</Parameter></ParamDef>
</FuncSynopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para>The
<Function>ttdt_file_request</Function> function
is used to create (and optionally send) any of
the standard Desktop file requests
<![ %CDE.C.XO; [defined in
<XRef Linkend="XCDI.TT.anch.6" Role="2">, ]]>such as
<Symbol Role="Message">Get_Modified</Symbol>, <Symbol Role="Message">Save</Symbol>, and
<Symbol Role="Message">Revert</Symbol>.</Para>
<Para>The
<Function>ttdt_file_request</Function> function
creates a request with the specified
<Symbol Role="Variable">op</Symbol> and
<Emphasis>scope</Emphasis>, and sets its file attribute to
<Symbol Role="Variable">pathname</Symbol>. The function adds an unset argument of
<StructName Role="typedef">Tt_mode</StructName> <SystemItem Class="Constant">TT_IN</SystemItem> and
vtype
<Emphasis>File</Emphasis> to the request, per the Desktop messaging conventions.
If
<Symbol Role="Variable">op</Symbol> is
<SystemItem Class="Constant">TTDT_GET_MODIFIED</SystemItem>, <Function>ttdt_file_request</Function> also adds an unset
<SystemItem Class="Constant">TT_OUT</SystemItem> argument of
vtype
<StructName Role="typedef">Boolean</StructName> to the request.
The
<Function>ttdt_file_request</Function> function
installs
<Emphasis>cb</Emphasis> as a message callback for the created request, and ensures that
<Symbol Role="Variable">client_data</Symbol> will be passed into the callback.
(The
<StructName Role="typedef">Ttdt_file_cb</StructName> callback is described under
&cdeman.ttdt.file.join;). If
<Emphasis>send</Emphasis> is True,
<Function>ttdt_file_request</Function> sends the request before returning the handle to it;
otherwise, it only creates the request.
</Para>
<Para>The
<Symbol Role="Variable">context</Symbol> argument describes the environment to use.
If
<Symbol Role="Variable">context</Symbol> is not zero, messages created by
<Function>ttdt_file_request</Function> inherit from
<Symbol Role="Variable">context</Symbol> all contexts whose slotname begins with the characters
<SystemItem Class="Constant">ENV_</SystemItem>.</Para>
</RefSect1>
<RefSect1>
<Title>RETURN VALUE</Title>
<Para>Upon successful completion, the
<Function>ttdt_file_request</Function> function returns the created
<StructName Role="typedef">Tt_message</StructName>; 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_DBAVAIL</Term>
<ListItem>
<Para>The ToolTalk service could not access the ToolTalk database
needed for this operation.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_ERR_DBEXIST</Term>
<ListItem>
<Para>The ToolTalk service could not access the specified ToolTalk database
in the expected place.
</Para>
</ListItem>
</VarListEntry>
<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_OVERFLOW</Term>
<ListItem>
<Para>The ToolTalk service has more active messages than it can handle.
(The maximum number of active messages is
implementation specific, but is at least 2000.)
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_ERR_POINTER</Term>
<ListItem>
<Para>The
<Symbol Role="Variable">pathname</Symbol> argument was
<SystemItem Class="Constant">NULL</SystemItem> or was a ToolTalk error pointer.
</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>APPLICATION USAGE</Title>
<Para>The
<Function>ttdt_file_request</Function> function
is a lower-level interface than
<Function>ttdt_Get_Modified</Function>, <Function>ttdt_Save</Function>, and
<Function>ttdt_Revert</Function>, since the latter functions create and send the request and then block
on its reply.
</Para>
</RefSect1>
<RefSect1>
<Title>SEE ALSO</Title>
<Para>&cdeman.Tt.tttk.h;, &cdeman.ttdt.Get.Modified;, &cdeman.ttdt.Save;, &cdeman.ttdt.Revert;, &cdeman.ttdt.file.join;.</Para>
</RefSect1>
</RefEntry>
<!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->

View File

@@ -0,0 +1,186 @@
<!-- $XConsortium: m_accept.sgm /main/8 1996/08/30 14:29:32 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.MAN263.rsml.1">]]>
<![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN263.rsml.1">]]>
<RefMeta>
<RefEntryTitle>ttdt_message_accept</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>ttdt_message_accept</Function></RefName>
<RefPurpose>accept a contract to handle a ToolTalk request
</RefPurpose>
</RefNameDiv>
<RefSynopsisDiv>
<FuncSynopsis Remap="ANSI">
<FuncSynopsisInfo>#include &lt;Tt/tttk.h>
</FuncSynopsisInfo>
<FuncDef>Tt_pattern <Function>*ttdt_message_accept</Function></FuncDef>
<ParamDef>Tt_message <Parameter>contract</Parameter></ParamDef>
<ParamDef>Ttdt_contract_cb <Parameter>cb</Parameter></ParamDef>
<ParamDef>Widget <Parameter>shell</Parameter></ParamDef>
<ParamDef>void *<Parameter>clientdata</Parameter></ParamDef>
<ParamDef>int <Parameter>accept</Parameter></ParamDef>
<ParamDef>int <Parameter>sendStatus</Parameter></ParamDef>
</FuncSynopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para>The
<Function>ttdt_message_accept</Function> function
registers in the default session for
<SystemItem Class="Constant">TT_HANDLER</SystemItem>-addressed requests:
</Para>
<OrderedList>
<ListItem>
<Para><Symbol Role="Message">Get_Geometry</Symbol>, <Symbol Role="Message">Set_Geometry</Symbol>, <Symbol Role="Message">Get_Iconified</Symbol>, <Symbol Role="Message">Set_Iconified</Symbol>, <Symbol Role="Message">Get_Mapped</Symbol>, <Symbol Role="Message">Set_Mapped</Symbol>, <Symbol Role="Message">Raise</Symbol>, <Symbol Role="Message">Lower</Symbol>, <Symbol Role="Message">Get_XInfo</Symbol></Para>
</ListItem>
<ListItem>
<Para><Symbol Role="Message">Pause</Symbol>, <Symbol Role="Message">Resume</Symbol></Para>
</ListItem>
<ListItem>
<Para><Symbol Role="Message">Quit</Symbol>, <Symbol Role="Message">Get_Status</Symbol></Para>
</ListItem>
</OrderedList>
<Para>If the
<Symbol Role="Variable">shell</Symbol> argument is not
<SystemItem Class="Constant">NULL</SystemItem>, the ToolTalk service
handles messages in (1) transparently;
otherwise, it treats them like messages in (3).
</Para>
<Para>If
<Symbol Role="Variable">shell</Symbol> is non-
<SystemItem Class="Constant">NULL</SystemItem> and
<Emphasis>cb</Emphasis> is
<SystemItem Class="Constant">NULL</SystemItem>, then
the ToolTalk service
handles messages in (2) transparently by passing
<Symbol Role="Variable">shell</Symbol> and the appropriate boolean value to
<Function>XtSetSensitive</Function>(3). If
<Emphasis>cb</Emphasis> is
<SystemItem Class="Constant">NULL</SystemItem>, then
the ToolTalk service
treats messages in (2) like (3).
</Para>
<Para>If
<Emphasis>cb</Emphasis> is not
<SystemItem Class="Constant">NULL</SystemItem>, <Function>ttdt_message_accept</Function> passes messages in (3) to the
<Emphasis>cb</Emphasis> callback; otherwise it fails with
<SystemItem Class="Constant">TT_DESKTOP_ENOTSUP</SystemItem>.</Para>
<Para>If
<Emphasis>accept</Emphasis> is True,
<Function>ttdt_message_accept</Function> calls
&cdeman.tt.message.accept; with a
<Emphasis>contract</Emphasis> argument.
If
<Emphasis>contract</Emphasis> has a returned value from
<Function>tt_message_status</Function> of
<SystemItem Class="Constant">TT_WRN_START_MESSAGE</SystemItem>, it is the message that caused the tool to be started.
The tool should join any scopes it wants to serve before accepting
<Emphasis>contract</Emphasis>, so that it will receive any other messages already dispatched to its
ptype.
Otherwise, those messages will cause other instances of the
ptype
to be started.
If that is in fact desired (for example,
because the tool can only service one message at a time), then
the tool should undeclare its
ptype
while it is busy.
</Para>
<Para>If
<Emphasis>sendStatus</Emphasis> is True,
<Function>ttdt_message_accept</Function> sends a
<Symbol Role="Message">Status</Symbol> notice to the requester, using the
arguments (if any) passed to
<Function>ttdt_open</Function>.</Para>
</RefSect1>
<RefSect1>
<Title>RETURN VALUE</Title>
<Para>Upon successful completion, the
<Function>ttdt_message_accept</Function> function
returns a null-terminated array of
<StructName Role="typedef">Tt_pattern</StructName>, and associates this array with
<Emphasis>contract</Emphasis>; 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_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_POINTER</Term>
<ListItem>
<Para>The pointer passed does not point to an object
of the correct type for this operation.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_ERR_UNIMP</Term>
<ListItem>
<Para>The
&cdeman.ttsession; for the default session is of a version that does not support
<Function>tt_message_accept</Function>. If
<Emphasis>contract</Emphasis> is a
<SystemItem Class="Constant">TT_WRN_START_MESSAGE</SystemItem>, messages to the tool's
ptype
will remain blocked until
<Emphasis>contract</Emphasis> is rejected, replied to, or failed.
</Para>
</ListItem>
</VarListEntry>
</VariableList>
</RefSect1>
<RefSect1>
<Title>APPLICATION USAGE</Title>
<Para>The
<Function>ttdt_message_accept</Function> function
is what a tool calls when it wants to accept responsibility for
handling (that is, failing or rejecting) a request.
</Para>
<Para>If
<Emphasis>contract</Emphasis> is destroyed by
&cdeman.tttk.message.destroy;, then the patterns will also be destroyed.
Otherwise, the caller
is responsible for iterating over the array and destroying each
pattern.
</Para>
</RefSect1>
<RefSect1>
<Title>EXAMPLES</Title>
<Para>See
&cdeman.ttdt.session.join; for an example of a
<StructName Role="typedef">Ttdt_contract_cb</StructName> callback that can be used with
<Function>ttdt_message_accept</Function>.</Para>
</RefSect1>
<RefSect1>
<Title>SEE ALSO</Title>
<Para>&cdeman.Tt.tttk.h;,
&cdeman.ttdt.open;,
&cdeman.ttmedia.ptype.declare;,
&cdeman.tt.ptype.declare;,
&cdeman.ttdt.session.join;,
&cdeman.ttdt.file.join;,
<![ %CDE.C.CDE;[&cdeman.tt.ptype.undeclare;,
<Function>XtSetSensitive</Function>(3). ]]><![ %CDE.C.XO;
[&cdeman.tt.ptype.undeclare;;
<Function>XtSetSensitive</Function> in the &str-Zt;.
]]>
</Para>
</RefSect1>
</RefEntry>
<!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->

View File

@@ -0,0 +1,77 @@
<!-- $XConsortium: open.sgm /main/5 1996/08/30 14:30:24 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.MAN264.rsml.1">]]>
<![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN264.rsml.1">]]>
<RefMeta>
<RefEntryTitle>ttdt_open</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>ttdt_open</Function></RefName>
<RefPurpose>create a ToolTalk communication endpoint
</RefPurpose>
</RefNameDiv>
<!-- $XConsortium: open.sgm /main/5 1996/08/30 14:30:24 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>char <Function>*ttdt_open</Function></FuncDef>
<ParamDef>int *<Parameter>ttfd</Parameter></ParamDef>
<ParamDef>const char *<Parameter>toolname</Parameter></ParamDef>
<ParamDef>const char *<Parameter>vendor</Parameter></ParamDef>
<ParamDef>const char *<Parameter>version</Parameter></ParamDef>
<ParamDef>int <Parameter>sendStarted</Parameter></ParamDef>
</FuncSynopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para>The
<Function>ttdt_open</Function> function calls
&cdeman.tt.open; and
&cdeman.tt.fd;. It associates
<Emphasis>toolname</Emphasis>, <Emphasis>vendor</Emphasis> and
<Symbol Role="Variable">version</Symbol> with the created
procid,
and initializes the new
procid's
default contexts from the process environment.
If
<Emphasis>sendStarted</Emphasis> is True,
<Function>ttdt_open</Function> sends a
<Symbol Role="Message">Started</Symbol> notice.
</Para>
</RefSect1>
<RefSect1>
<Title>RETURN VALUE</Title>
<Para>Upon successful completion, the
<Function>ttdt_open</Function> function
returns the created
procid
in a string that can be freed with
<Function>tt_free</Function>; otherwise, the
<Function>ttdt_open</Function> function may return any of the errors returned by
&cdeman.tt.open; and
&cdeman.tt.fd;.</Para>
<Para>No errors are propagated if sending the
<Symbol Role="Message">Started</Symbol> notice fails.
</Para>
</RefSect1>
<RefSect1>
<Title>SEE ALSO</Title>
<Para>&cdeman.Tt.tttk.h;, &cdeman.ttdt.close;, &cdeman.tt.open;, &cdeman.tt.fd;, &cdeman.tt.free;.</Para>
</RefSect1>
</RefEntry>
<!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->

View File

@@ -0,0 +1,175 @@
<!-- $XConsortium: s_imp_on.sgm /main/5 1996/08/30 14:31:03 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.MAN265.rsml.1">]]>
<![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN265.rsml.1">]]>
<RefMeta>
<RefEntryTitle>ttdt_sender_imprint_on</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>ttdt_sender_imprint_on</Function></RefName>
<RefPurpose>act like a child of the specified tool
</RefPurpose>
</RefNameDiv>
<!-- $XConsortium: s_imp_on.sgm /main/5 1996/08/30 14:31:03 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_status <Function>ttdt_sender_imprint_on</Function></FuncDef>
<ParamDef>const char *<Parameter>handler</Parameter></ParamDef>
<ParamDef>Tt_message <Parameter>contract</Parameter></ParamDef>
<ParamDef>char **<Parameter>display</Parameter></ParamDef>
<ParamDef>int *<Parameter>width</Parameter></ParamDef>
<ParamDef>int *<Parameter>height</Parameter></ParamDef>
<ParamDef>int *<Parameter>xoffset</Parameter></ParamDef>
<ParamDef>int *<Parameter>yoffset</Parameter></ParamDef>
<ParamDef>XtAppContext <Parameter>app2run</Parameter></ParamDef>
<ParamDef>int <Parameter>ms_timeout</Parameter></ParamDef>
</FuncSynopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para>The
<Function>ttdt_sender_imprint_on</Function> function
is used to make the calling tool act equivalently to a child of
another specified tool.
The calling tool adopts the other
tool's X11 display, locale, and current working directory.
It also learns the other tool's X11 geometry, so that it may
position itself appropriately.
</Para>
<Para>If the
<Emphasis>handler</Emphasis> argument is non-
<SystemItem Class="Constant">NULL</SystemItem>, the requests are addressed to that procid using
<SystemItem Class="Constant">TT_HANDLER</SystemItem>. If
<Emphasis>handler</Emphasis> is
<SystemItem Class="Constant">NULL</SystemItem> and the
<Emphasis>contract</Emphasis> argument is non-
<SystemItem Class="Constant">NULL</SystemItem>, the requests are addressed to the
&cdeman.tt.message.sender; of the contract, using
<SystemItem Class="Constant">TT_HANDLER</SystemItem>.</Para>
<Para>The
<Emphasis>contract</Emphasis> argument is passed to
&cdeman.tttk.message.create; as the
<Symbol Role="Variable">context</Symbol> argument.
</Para>
<Para>If the
<Symbol Role="Variable">display</Symbol> argument is not
<SystemItem Class="Constant">NULL</SystemItem>, <Function>ttdt_sender_imprint_on</Function> returns the other tool's display in
<Symbol Role="Variable">*display</Symbol>. If
<Symbol Role="Variable">display</Symbol> is
<SystemItem Class="Constant">NULL</SystemItem>, <Function>ttdt_sender_imprint_on</Function> sets the
<SystemItem Class="EnvironVar">DISPLAY</SystemItem> environment variable to the other tool's display.
</Para>
<Para>If each of the
<Symbol Role="Variable">width</Symbol>, <Symbol Role="Variable">height</Symbol>, <Symbol Role="Variable">xoffset</Symbol>, and
<Symbol Role="Variable">yoffset</Symbol> arguments are
<SystemItem Class="Constant">NULL</SystemItem>, then
<Function>ttdt_sender_imprint_on</Function> does not send the other tool a
<Symbol Role="Message">Get_Geometry</Symbol> request.
</Para>
<Para>The
<Function>ttdt_sender_imprint_on</Function> function
passes the
<Emphasis>app2run</Emphasis> and
<Emphasis>ms_timeout</Emphasis> arguments to
&cdeman.tttk.block.while;, blocking on the replies to the requests it sends.
</Para>
<Para>If the
<Symbol Role="Variable">display</Symbol> argument is not
<SystemItem Class="Constant">NULL</SystemItem>, <Function>ttdt_sender_imprint_on</Function> sets
<Symbol Role="Variable">*display</Symbol> to a string that can be freed with
<Function>tt_free</Function>.</Para>
<Para>If for some reason no width or height is returned by the other tool,
<Function>ttdt_sender_imprint_on</Function> sets
<Symbol Role="Variable">*width</Symbol> or
<Symbol Role="Variable">*height</Symbol> to &minus;1.
If no positional information is returned,
<Function>ttdt_sender_imprint_on</Function> sets
<Emphasis>*xoffset</Emphasis> and
<Emphasis>*yoffset</Emphasis> to {INT_MAX}.
</Para>
</RefSect1>
<RefSect1>
<Title>RETURN VALUE</Title>
<Para>Upon successful completion, the
<Function>ttdt_sender_imprint_on</Function> function returns the status of the operation as one of the following
<StructName Role="typedef">Tt_status</StructName> values:
</Para>
<VariableList>
<VarListEntry>
<Term>TT_OK</Term>
<ListItem>
<Para>The operation completed successfully.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_DESKTOP_ETIMEDOUT</Term>
<ListItem>
<Para>One or more of the sent requests did not complete within
<Emphasis>ms_timeout</Emphasis> milliseconds.
</Para>
</ListItem>
</VarListEntry>
<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_OVERFLOW</Term>
<ListItem>
<Para>The ToolTalk service has more active messages than it can handle.
(The maximum number of active messages is
implementation specific, but is at least 2000.)
</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>APPLICATION USAGE</Title>
<Para>If both the
<Emphasis>handler</Emphasis> and
<Emphasis>contract</Emphasis> are zero, the requests are addressed to no tool in
particular, using
<SystemItem Class="Constant">TT_PROCEDURE</SystemItem>; this is not recommended.
</Para>
</RefSect1>
<RefSect1>
<Title>SEE ALSO</Title>
<Para>&cdeman.Tt.tttk.h;, &cdeman.tt.free;, &cdeman.tt.message.sender;, &cdeman.tttk.block.while;, &cdeman.tttk.message.create;.</Para>
</RefSect1>
</RefEntry>
<!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->

View File

@@ -0,0 +1,354 @@
<!-- $XConsortium: ses_join.sgm /main/7 1996/09/08 20:22:12 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.MAN266.rsml.1">]]>
<![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN266.rsml.1">]]>
<RefMeta>
<RefEntryTitle>ttdt_session_join</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>ttdt_session_join</Function></RefName>
<RefPurpose>join a ToolTalk session
</RefPurpose>
</RefNameDiv>
<!-- $XConsortium: ses_join.sgm /main/7 1996/09/08 20:22:12 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_pattern <Function>*ttdt_session_join</Function></FuncDef>
<ParamDef>const char *<Parameter>sessid</Parameter></ParamDef>
<ParamDef>Ttdt_contract_cb <Parameter>cb</Parameter></ParamDef>
<ParamDef>Widget <Parameter>shell</Parameter></ParamDef>
<ParamDef>void *<Parameter>clientdata</Parameter></ParamDef>
<ParamDef>int <Parameter>join</Parameter></ParamDef>
</FuncSynopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para>The
<Function>ttdt_session_join</Function> function
joins the session
<Emphasis>sessid</Emphasis>, registering patterns and
default callbacks for many standard Desktop message interfaces.
If
<Emphasis>sessid</Emphasis> is
<SystemItem Class="Constant">NULL</SystemItem>, the default session is joined.
</Para>
<Para>The
<Function>ttdt_session_join</Function> function
registers for the following
<SystemItem Class="Constant">TT_HANDLER</SystemItem>-addressed requests:
</Para>
<OrderedList>
<ListItem>
<Para><Symbol Role="Message">Get_Environment</Symbol>, <Symbol Role="Message">Set_Environment</Symbol>, <Symbol Role="Message">Get_Locale</Symbol>, <Symbol Role="Message">Set_Locale</Symbol>, <Symbol Role="Message">Get_Situation</Symbol>, <Symbol Role="Message">Set_Situation</Symbol>, <Symbol Role="Message">Signal</Symbol>, <Symbol Role="Message">Get_Sysinfo</Symbol></Para>
</ListItem>
<ListItem>
<Para><Symbol Role="Message">Get_Geometry</Symbol>, <Symbol Role="Message">Set_Geometry</Symbol>, <Symbol Role="Message">Get_Iconified</Symbol>, <Symbol Role="Message">Set_Iconified</Symbol>, <Symbol Role="Message">Get_Mapped</Symbol>, <Symbol Role="Message">Set_Mapped</Symbol>, <Symbol Role="Message">Raise</Symbol>, <Symbol Role="Message">Lower</Symbol>, <Symbol Role="Message">Get_XInfo</Symbol></Para>
</ListItem>
<ListItem>
<Para><Symbol Role="Message">Pause</Symbol>, <Symbol Role="Message">Resume</Symbol>, <Symbol Role="Message">Quit</Symbol></Para>
</ListItem>
<ListItem>
<Para><Symbol Role="Message">Get_Status</Symbol>, <Emphasis>Do_Command</Emphasis></Para>
</ListItem>
</OrderedList>
<Para>If
<Emphasis>join</Emphasis> is True,
<Function>ttdt_session_join</Function> actually joins the indicated session.
</Para>
<Para>The ToolTalk service
handles messages in (1) transparently.
</Para>
<Para>If
<Symbol Role="Variable">shell</Symbol> is non-
<SystemItem Class="Constant">NULL</SystemItem>, then it is expected to be a realized
<Emphasis>mappedWhenManaged</Emphasis> <Emphasis>applicationShellWidget</Emphasis>, and
the ToolTalk service
handles messages in (2) transparently.
(If
<Symbol Role="Variable">shell</Symbol> is merely a realized widget, then
the ToolTalk service
handles only the
<Symbol Role="Message">Get_XInfo</Symbol> request, and
<Function>ttdt_session_join</Function> fails the rest of (2) with
<SystemItem Class="Constant">TT_DESKTOP_ENOTSUP</SystemItem>.) If
<Symbol Role="Variable">shell</Symbol> is
<SystemItem Class="Constant">NULL</SystemItem>, then
the ToolTalk service
treats messages in (2) equivalently to those in (4).
</Para>
<Para>If
<Symbol Role="Variable">shell</Symbol> is non-
<SystemItem Class="Constant">NULL</SystemItem> and
<Emphasis>cb</Emphasis> is
<SystemItem Class="Constant">NULL</SystemItem>, then
the ToolTalk service
handles messages in (3) transparently as follows;
otherwise, it treats them as equivalent to those in (4).
The
<Symbol Role="Message">Quit</Symbol> request results in a
<SystemItem Class="Constant">WM_DELETE_WINDOW</SystemItem> event on
<Symbol Role="Variable">shell</Symbol> if the
<Emphasis>silent</Emphasis> and
<Emphasis>force</Emphasis> arguments of the
<Symbol Role="Message">Quit</Symbol> request are both False.
In other words, if
<Symbol Role="Variable">shell</Symbol> is supplied without a
<Emphasis>cb</Emphasis>, then a
<Symbol Role="Message">Quit</Symbol> request may imply that the user
quit the application's top-level window using the window manager.
<Symbol Role="Message">Pause</Symbol> and
<Symbol Role="Message">Resume</Symbol> requests result in
the ToolTalk service
passing
<Symbol Role="Variable">shell</Symbol> and the appropriate boolean value to
<Function>XtSetSensitive</Function>(3).</Para>
<Para>If
<Emphasis>cb</Emphasis> is not
<SystemItem Class="Constant">NULL</SystemItem>, the ToolTalk service passes
messages in (4) to
<Emphasis>cb</Emphasis>; otherwise,
<Function>ttdt_session_join</Function> fails with
<SystemItem Class="Constant">TT_DESKTOP_ENOTSUP</SystemItem>.</Para>
<Para>The
<StructName Role="typedef">Ttdt_contract_cb</StructName> argument is a callback defined as:
</Para>
<InformalExample Remap="indent">
<ProgramListing>Tt_message (*Ttdt_contract_cb)(Tt_message <Emphasis>msg</Emphasis>,
void *<Emphasis>clientdata</Emphasis>,
Tt_message <Emphasis>contract</Emphasis>);
</ProgramListing>
</InformalExample>
<Para>The
<Emphasis>msg</Emphasis> argument is
a message in
<StructName Role="typedef">Tt_state</StructName> <SystemItem Class="Constant">TT_SENT</SystemItem>. If
<Emphasis>msg</Emphasis> is a
<SystemItem Class="Constant">TT_REQUEST</SystemItem>, the client program becomes responsible for either failing,
rejecting or replying to
<Emphasis>msg</Emphasis>. After doing so, the client program may dispose of
<Emphasis>msg</Emphasis> with
<Function>tttk_message_destroy</Function>. The
<Emphasis>clientdata</Emphasis> argument is the
<Emphasis>clientdata</Emphasis> passed to
<Function>ttdt_session_join</Function> or
&cdeman.ttdt.message.accept;. The
<Emphasis>contract</Emphasis> argument is the
<Emphasis>contract</Emphasis> passed to
<Function>ttdt_message_accept</Function>. For callbacks installed by
<Function>ttdt_session_join</Function>, <Emphasis>contract</Emphasis> is always zero.
</Para>
</RefSect1>
<RefSect1>
<Title>RETURN VALUE</Title>
<Para>Upon successful completion, the
<Function>ttdt_session_join</Function> function
returns a null-terminated array of
<StructName Role="typedef">Tt_pattern</StructName>; 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_POINTER</Term>
<ListItem>
<Para>The pointer passed does not point to an object
of the correct type for this operation.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_ERR_PROCID</Term>
<ListItem>
<Para>The specified process identifier is out of date or invalid.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_ERR_SESSION</Term>
<ListItem>
<Para>The specified ToolTalk session is out of date or invalid.
</Para>
</ListItem>
</VarListEntry>
</VariableList>
</RefSect1>
<RefSect1>
<Title>APPLICATION USAGE</Title>
<Para>The null-terminated array of
<StructName Role="typedef">Tt_pattern</StructName> returned by
<Function>ttdt_session_join</Function> should be destroyed by passing the array to
&cdeman.ttdt.file.quit;.</Para>
<Para>The ToolTalk service will reply to the
<Symbol Role="Message">Quit</Symbol> request before generating the
<SystemItem Class="Constant">WM_DELETE_WINDOW</SystemItem> event.
If the application catches and cancels this event,
then the sender of the
<Symbol Role="Message">Quit</Symbol> request will be misled
into thinking the application actually quit.
Applications that can cancel
<SystemItem Class="Constant">WM_DELETE_WINDOW</SystemItem> should install a real
<StructName Role="typedef">Ttdt_contract_cb</StructName>.</Para>
<Para>The ToolTalk service handles the
<Symbol Role="Message">Pause</Symbol> and
<Symbol Role="Message">Resume</Symbol> requests by setting the sensitivity of
<Symbol Role="Variable">widget</Symbol>. If
<Symbol Role="Variable">widget</Symbol> is the parent of any top-level pop-up shells,
<Function>XtSetSensitive</Function>(3) will not affect them.
Applications that can have such pop-ups
should install a real
<StructName Role="typedef">Ttdt_contract_cb</StructName>.</Para>
<Para>A
<StructName Role="typedef">Ttdt_contract_cb</StructName> should return zero if it processes
<Emphasis>msg</Emphasis> successfully, or a
<Function>tt_error_pointer</Function> cast to
<StructName Role="typedef">Tt_message</StructName> if processing results in an error.
It should return the
<Emphasis>msg</Emphasis> if it does not consume it.
If
<Emphasis>msg</Emphasis> is returned, then the ToolTalk service passes
<SystemItem Class="Constant">TT_CALLBACK_CONTINUE</SystemItem> down the call stack, so that
<Emphasis>msg</Emphasis> will be offered to other callbacks or (more likely) be returned from
&cdeman.tt.message.receive;. Applications will rarely want
<Emphasis>msg</Emphasis> to get processed by other callbacks or in the main event loop.
</Para>
</RefSect1>
<RefSect1>
<Title>EXAMPLES</Title>
<Para>This is the typical algorithm of a
<StructName Role="typedef">Ttdt_contract_cb</StructName> for an application that handles
<Symbol Role="Message">Pause</Symbol>, <Symbol Role="Message">Resume</Symbol> or
<Symbol Role="Message">Quit</Symbol> requests for itself, but lets the ToolTalk service
handle the X11-related requests listed in (2).
Since this example callback deals with the case when
<Emphasis>contract</Emphasis> is not zero, it can also be used as the
<StructName Role="typedef">Ttdt_contract_cb</StructName> passed to
<Function>ttdt_message_accept</Function>.</Para>
<InformalExample>
<ProgramListing>Tt_message myContractCB(Tt_message msg,
void *clientdata,
Tt_message contract)
{
char *opString = tt_message_op(msg);
Tttk_op op = tttk_string_op(opString);
tt_free(opString);
int silent = 0;
int force = 0;
Boolean cancel = False;
Boolean sensitive = True;
char *status, command;
switch(op) {
case TTDT_QUIT:
tt_message_arg_ival(msg, 0, &amp;silent);
tt_message_arg_ival(msg, 1, &amp;force);
if (contract == 0) {
/* Quit entire application */
cancel = ! myQuitWholeApp(silent, force);
} else {
/* Quit just the specified request being
worked on */
cancel = ! myCancelThisRequest(contract,
silent, force);
}
if (cancel) {
/* User canceled Quit; fail the Quit request */
tttk_message_fail(msg, TT_DESKTOP_ECANCELED, 0, 1);
} else {
tt_message_reply(msg);
tttk_message_destroy(msg);
}
return 0;
case TTDT_PAUSE:
sensitive = False;
case TTDT_RESUME:
if (contract == 0) {
int already = 1;
if (XtIsSensitive(myTopShell) != sensitive) {
already = 0;
XtSetSensitive(myTopShell, sensitive);
}
if (already) {
tt_message_status_set(msg,
TT_DESKTOP_EALREADY);
}
} else {
if (XtIsSensitive(thisShell) == sensitive) {
tt_message_status_set(msg,
TT_DESKTOP_EALREADY);
} else {
XtSetSensitive(thisShell, sensitive);
}
}
tt_message_reply(msg);
tttk_message_destroy(msg);
return 0;
case TTDT_GET_STATUS:
if (contract == 0) {
status = "Message about status of entire app";
} else {
status = "Message about status of this request";
}
tt_message_arg_val_set(msg, 0, status);
tt_message_reply(msg);
tttk_message_destroy(msg);
return 0;
case TTDT_DO_COMMAND:
if (! haveExtensionLanguage) {
tttk_message_fail(msg, TT_DESKTOP_ENOTSUP, 0, 1);
return 0;
}
command = tt_message_arg_val(msg, 0);
result = myEval(command);
tt_free(command);
tt_message_status_set(msg, result);
if (tt_is_err(result)) {
tttk_message_fail(msg, result, 0, 1);
} else {
tt_message_reply(msg);
tttk_message_destroy(msg);
}
return 0;
}
/* Unrecognized message; do not consume it */
return msg;
}
</ProgramListing>
</InformalExample>
</RefSect1>
<RefSect1>
<Title>SEE ALSO</Title>
<Para>&cdeman.Tt.tttk.h;, &cdeman.ttdt.session.quit;, &cdeman.tt.session.join;, <![ %CDE.C.CDE; [<Function>XtSetSensitive</Function>(3), ]]><![ %CDE.C.XO; [<Function>XtSetSensitive</Function> in the &str-Zt;,
]]></Para>
</RefSect1>
</RefEntry>
<!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->

View File

@@ -0,0 +1,100 @@
<!-- $XConsortium: ses_quit.sgm /main/5 1996/08/30 14:31:54 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.MAN267.rsml.1">]]>
<![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN267.rsml.1">]]>
<RefMeta>
<RefEntryTitle>ttdt_session_quit</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>ttdt_session_quit</Function></RefName>
<RefPurpose>quit a ToolTalk session
</RefPurpose>
</RefNameDiv>
<!-- $XConsortium: ses_quit.sgm /main/5 1996/08/30 14:31:54 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_status <Function>ttdt_session_quit</Function></FuncDef>
<ParamDef>const char *<Parameter>sessid</Parameter></ParamDef>
<ParamDef>Tt_pattern *<Parameter>sess_pats</Parameter></ParamDef>
<ParamDef>int <Parameter>quit</Parameter></ParamDef>
</FuncSynopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para>The
<Function>ttdt_session_quit</Function> function
destroys the patterns in
<Emphasis>sess_pats</Emphasis>. If
<Symbol Role="Variable">quit</Symbol> is True,
it quits the session
<Emphasis>sessid</Emphasis>, or the default session if
<Emphasis>sessid</Emphasis> is
<SystemItem Class="Constant">NULL</SystemItem>.</Para>
</RefSect1>
<RefSect1>
<Title>RETURN VALUE</Title>
<Para>Upon successful completion, the
<Function>ttdt_session_quit</Function> function returns the status of the operation as one of the following
<StructName Role="typedef">Tt_status</StructName> values:
</Para>
<VariableList>
<VarListEntry>
<Term>TT_OK</Term>
<ListItem>
<Para>The operation completed successfully.
</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_POINTER</Term>
<ListItem>
<Para>The pointer passed does not point to an object
of the correct type for this operation.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_ERR_PROCID</Term>
<ListItem>
<Para>The specified process identifier is out of date or invalid.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>TT_ERR_SESSION</Term>
<ListItem>
<Para>The specified ToolTalk session is out of date or invalid.
</Para>
</ListItem>
</VarListEntry>
</VariableList>
</RefSect1>
<RefSect1>
<Title>SEE ALSO</Title>
<Para>&cdeman.Tt.tttk.h;, &cdeman.ttdt.session.join;, &cdeman.tt.session.quit;.</Para>
</RefSect1>
</RefEntry>
<!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->

View File

@@ -0,0 +1,130 @@
<!-- $XConsortium: subc_man.sgm /main/5 1996/08/30 14:32:35 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.MAN268.rsml.1">]]>
<![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN268.rsml.1">]]>
<RefMeta>
<RefEntryTitle>ttdt_subcontract_manage</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>ttdt_subcontract_manage</Function></RefName>
<RefPurpose>manage an outstanding request
</RefPurpose>
</RefNameDiv>
<!-- $XConsortium: subc_man.sgm /main/5 1996/08/30 14:32:35 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_pattern <Function>*ttdt_subcontract_manage</Function></FuncDef>
<ParamDef>Tt_message <Parameter>subcontract</Parameter></ParamDef>
<ParamDef>Ttdt_contract_cb <Parameter>cb</Parameter></ParamDef>
<ParamDef>Widget <Parameter>shell</Parameter></ParamDef>
<ParamDef>void *<Parameter>clientdata</Parameter></ParamDef>
</FuncSynopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para>The
<Function>ttdt_subcontract_manage</Function> function
allows a requester to manage the standard Desktop interactions
with the tool that is handling the request.
The
<Function>ttdt_subcontract_manage</Function> function registers in the default session for
<SystemItem Class="Constant">TT_HANDLER</SystemItem>-addressed requests
<Symbol Role="Message">Get_Geometry</Symbol> and
<Symbol Role="Message">Get_XInfo</Symbol>, and
<Symbol Role="Message">Status</Symbol> notices.
</Para>
<Para>If
<Symbol Role="Variable">shell</Symbol> is not
<SystemItem Class="Constant">NULL</SystemItem>, the ToolTalk service
handles the
<Symbol Role="Message">Get_Geometry</Symbol> and
<Symbol Role="Message">Get_XInfo</Symbol> notices transparently;
otherwise, it passes them to
<Emphasis>cb</Emphasis>. The
<Symbol Role="Message">Status</Symbol> notice is always passed to the callback.
</Para>
<Para>See
&cdeman.ttdt.session.join; for a description of a
<StructName Role="typedef">Ttdt_contract_cb</StructName> callback.
</Para>
<Para>If
<Emphasis>subcontract</Emphasis> is destroyed by
<Function>tttk_message_destroy</Function>, then the patterns will also be destroyed;
otherwise, the caller
is responsible for iterating over the array and destroying each pattern.
</Para>
</RefSect1>
<RefSect1>
<Title>RETURN VALUE</Title>
<Para>Upon successful completion, the
<Function>ttdt_subcontract_manage</Function> function
returns a null-terminated array of
<StructName Role="typedef">Tt_pattern</StructName>, and associates this array with
<Emphasis>subcontract</Emphasis>; 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_DESKTOP_EINVAL</Term>
<ListItem>
<Para>Both the
<Symbol Role="Variable">shell</Symbol> and
<Emphasis>cb</Emphasis> arguments were
<SystemItem Class="Constant">NULL</SystemItem>.</Para>
</ListItem>
</VarListEntry>
<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_POINTER</Term>
<ListItem>
<Para>The
<Emphasis>subcontract</Emphasis> argument was not a valid
<StructName Role="typedef">Tt_message</StructName>.</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.ttdt.session.join;, &cdeman.tttk.message.destroy;.</Para>
</RefSect1>
</RefEntry>
<!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->