<!-- $XConsortium: GetWsOcc.sgm /main/5 1996/08/30 15:29: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.XCSA.MAN66.rsml.1">]]>
<![ %CDE.C.XO; [<RefEntry Id="XCSA.MAN66.rsml.1">]]>
<RefMeta>
<RefEntryTitle>DtWsmGetWorkspacesOccupied</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>DtWsmGetWorkspacesOccupied</Function></RefName>
<RefPurpose>get the workspaces in which a window resides
</RefPurpose>
</RefNameDiv>
<!-- 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;Dt/Wsm.h>
</FuncSynopsisInfo>
<FuncDef>Status <Function>DtWsmGetWorkspacesOccupied</Function></FuncDef>
<ParamDef>Display *<Parameter>display</Parameter></ParamDef>
<ParamDef>Window <Parameter>window</Parameter></ParamDef>
<ParamDef>Atom **<Parameter>ppaWorkspaces</Parameter></ParamDef>
<ParamDef>int *<Parameter>pNumWs</Parameter></ParamDef>
</FuncSynopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para>The
<Function>DtWsmGetWorkspacesOccupied</Function> function works with the
<![ %CDE.C.XO; [workspace manager
]]><![ %CDE.C.CDE; [&str-XZ;
workspace manager,
&cdeman.dtwm;, ]]>and returns the list of workspaces in which this window resides.
Each element of the list is the name of a workspace (converted to an X atom).
</Para>
<Para>The
<Symbol Role="Variable">display</Symbol> argument is the X display.
</Para>
<Para>The
<Symbol Role="Variable">window</Symbol> argument is the window of interest.
</Para>
<Para>The
<Emphasis>*ppaWorkspaces</Emphasis> argument is the address of a pointer to receive the pointer to
a list of workspace names (converted to X atoms).
</Para>
<Para>The
<Emphasis>pNumWs</Emphasis> argument is the address of an integer to receive the number
of elements in the list of workspaces returned in
<Emphasis>*ppaWorkspaces</Emphasis>.</Para>
</RefSect1>
<RefSect1>
<Title>RETURN VALUE</Title>
<Para>Upon successful completion, the
<Function>DtWsmGetWorkspacesOccupied</Function> function returns Success and the workspace manager returns in
<Emphasis>*ppaWorkspaces</Emphasis> a list of atoms identifying the
occupied workspaces, and returns in
<Emphasis>pNumWs</Emphasis> the number of occupied
workspaces; otherwise, it returns a value not equal to Success.
</Para>
</RefSect1>
<RefSect1>
<Title>APPLICATION USAGE</Title>
<Para>If the
<Function>DtWsmGetWorkspacesOccupied</Function> function
is not successful, failure may be due to a memory allocation error or
failure to find the correct workspace information (that is, the
<![ %CDE.C.XO; [workspace manager
]]><![ %CDE.C.CDE; [&str-XZ;
workspace manager,
&cdeman.dtwm;, ]]>is not running).
The application must use
<Function>XtFree</Function>(3) to free data returned in
<Emphasis>*ppaWorkspaces</Emphasis>.</Para>
</RefSect1>
<RefSect1>
<Title>SEE ALSO</Title>
<Para>&cdeman.Dt.Wsm.h;, <![ %CDE.C.CDE; [<Function>XtFree</Function>(3), ]]><![ %CDE.C.XO; [<Function>XtFree</Function>(3) in the &str-Zt;.
]]><![ %CDE.C.CDE; [&cdeman.dtwm;. ]]></Para>
</RefSect1>
</RefEntry>
<!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:40:24-->
