<!-- $XConsortium: ClipbK.sgm /main/10 1996/09/25 10:24:50 cdedoc $ -->
<!-- (c) Copyright 1995 Digital Equipment Corporation. -->
<!-- (c) Copyright 1995 Hewlett-Packard Company. -->
<!-- (c) Copyright 1995 International Business Machines Corp. -->
<!-- (c) Copyright 1995 Sun Microsystems, Inc. -->
<!-- (c) Copyright 1995 Novell, Inc. -->
<!-- (c) Copyright 1995 FUJITSU LIMITED. -->
<!-- (c) Copyright 1995 Hitachi. -->

<RefEntry Id="CDEMMA.MAN96.rsml.1">
<RefMeta>
<RefEntryTitle>XmClipboardRegisterFormat</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>XmClipboardRegisterFormat</Function></RefName>
<RefPurpose>A clipboard function that registers a new format
<IndexTerm>
<Primary>XmClipboardRegisterFormat</Primary>
</IndexTerm><IndexTerm>
<Primary>clipboard functions</Primary>
<Secondary>XmClipboardRegisterFormat</Secondary>
</IndexTerm></RefPurpose>
</RefNameDiv>
<!-- -->
<!-- @OSF_COPYRIGHT@-->
<!-- COPYRIGHT NOTICE-->
<!-- Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.-->
<!-- ALL RIGHTS RESERVED (MOTIF). See the file named COPY.MOTIF.DOC for-->
<!-- the full copyright text.-->
<!-- -->
<!-- HISTORY-->
<!-- -->
<!-- **-->
<!-- **-->
<!-- **  (c) Copyright 1989, 1990, 1992 by Open Software Foundation, Inc.-->
<!-- **      All Rights Reserved.-->
<!-- **-->
<!-- **  (c) Copyright 1987, 1988, 1989, by Hewlett-Packard Company-->
<!-- **-->
<!-- **  (c) Copyright 1988 by Massachusetts Institute of Technology-->
<!-- **-->
<!-- **  (c) Copyright 1987, 1988 by Digital Equipment Corporation,-->
<!-- **      Maynard, MA.  All Rights Reserved.-->
<!-- **-->
<!-- **-->
<RefSynopsisDiv>
<FuncSynopsis>
<FuncSynopsisInfo>#include &lt;Xm/CutPaste.h>
int XmClipboardRegisterFormat (<Replaceable>display, format_name, format_length</Replaceable>)
        Display <Replaceable>* display</Replaceable>;
        char    <Replaceable>* format_name</Replaceable>;
        int     <Replaceable>format_length</Replaceable>;
</FuncSynopsisInfo>
<FuncDef></FuncDef>
<void>
</FuncSynopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para><Function>XmClipboardRegisterFormat</Function> registers a new format. Each format
stored on the clipboard should have a length associated with it; this
length must be known to the clipboard routines. Formats are known as
targets in the <Emphasis>Inter-Client Communication Conventions Manual</Emphasis>
(ICCCM). All of the formats specified by
version 1.1 of the ICCCM
conventions are preregistered. Any other format that the application
wants to use must either be 8-bit
data or be registered via this routine.
Failure to
register the length of the data results in incompatible applications across
platforms having different byte-swapping orders.
</Para>
<VariableList>
<VarListEntry>
<Term><Symbol Role="Variable">display</Symbol></Term>
<ListItem>
<Para>Specifies a pointer to the <StructName Role="typedef">Display</StructName> structure that was returned in a
previous call to <Function>XOpenDisplay</Function> or <Function>XtDisplay</Function>.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">format_name</Symbol></Term>
<ListItem>
<Para>Specifies the string name for the new format (target).
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">format_length</Symbol></Term>
<ListItem>
<Para>Specifies the format length in bits (8, 16, or 32).
</Para>
</ListItem>
</VarListEntry>
</VariableList>
</RefSect1>
<RefSect1>
<Title>RETURN</Title>
<VariableList>
<VarListEntry>
<Term><Symbol>XmClipboardBadFormat</Symbol></Term>
<ListItem>
<Para>The <Symbol Role="Variable">format_name</Symbol> must not be NULL, and the <Symbol Role="Variable">format_length</Symbol>
must be 8, 16, or 32.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol>XmClipboardSuccess</Symbol></Term>
<ListItem>
<Para>The function was successful.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol>XmClipboardLocked</Symbol></Term>
<ListItem>
<Para>The function failed because the clipboard was locked by another
application. The application can continue to call the function again with
the same parameters until the lock goes away. This gives the application
the opportunity to ask if the user wants to keep trying or to give up
on the operation.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol>XmClipboardFail</Symbol></Term>
<ListItem>
<Para>The function failed because the specified format was already registered with a
different length from that specified now. If a specified format was already
registered with the same
length as that specified now, <Symbol>XmClipboardSuccess</Symbol> is returned.
</Para>
</ListItem>
</VarListEntry>
</VariableList>
</RefSect1>
<RefSect1>
<Title>RELATED</Title>
<Para>&cdeman.XmClipboardStartCopy;.
</Para>
</RefSect1>
</RefEntry>
<!--fickle 1.09 7/2/95-->
