<!doctype HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>CD_CLIPBOARD</title> <link rel="stylesheet" type="text/css" href="../../style.css"> </head> <body> <h2 style="text-align: left">CD_CLIPBOARD - Clipboard Driver (cdclipbd.h)</h2> <p>This driver allows the access to a Clipboard area. It is greatly dependent on the system. In Win32, it creates an <a href="emf.html">Enhanced Metafile</a>, a <b>Bitmap</b> or a <a href="mf.html">CD Metafile</a>; in X-Windows and with GDK it creates only a <a href="mf.html">CD Metafile</a>.</p> <h3>Use</h3> <p>The canvas is created by means of a call to function <font face="Courier"> <a href="../func/init.html#cdCreateCanvas"> <strong>cdCreateCanvas</strong></a>(CD_CLIPBOARD, Data)</font>, after which other functions in the CD library can be called as usual. The <font face="Courier">Data</font> parameter string is platform-dependent and varies according to the metafile created. See each metafile's documentation, but remember to exclude parameter <font face="Courier">"filename".</font></p> <p>In the Windows environment, if the string "<font face="Courier">-b</font>" is present, it means that a <b>Bitmap</b> must be created instead of a metafile, and, if the string <font face="Courier">"-m"</font> is specified, a <b>CD Metafile</b> will be created. For a <b>Bitmap</b> the remaining string must contains the bitmap size and optionally its resolution: <em>"-b widthxheight [resolution]"</em> or in C "<tt><em><strong>%dx%d %g"</strong></em></tt>, the resolution default is the screen resolution.</p> <p>In the X-Windows environment, the Display <font face="Courier">("%p")</font> where the data will be stored must be passed as a parameter before the <b>CD Metafile</b> parameters. This environment's driver is used only for applications that use CD to communicate with each other, because only CD Metafiles are created.</p> <p>Any amount of such canvases may exist simultaneously. It is important to note that a call to function <a href="../func/init.html#cdKillCanvas"> <font face="Courier"><strong>cdKillCanvas</strong></font></a> is required to properly copy the data to the Clipboard.</p> <p>You can interpret the data from the Clipboard using function <strong>cdPlay</strong>. In the X-Windows environment, the parameter <font face="Courier">"data"</font> for the <strong>cdPlay </strong>function is the pointer to the Display where the metafile will be obtained. The <strong>cdRegisterCallback</strong> must be called for the driver that will interpret the file, except for bitmaps that the <strong>CD_CLIPBOARD</strong> driver must be used.</p> <p>To use this driver in Windows using GDI+ is necessary to call <font face="Courier"><strong> cdUseContextPlus</strong></font><strong><font face="Courier">(1)</font></strong> before creating the canvas.</p> <h3>Behavior of Functions</h3> <p>This driver is greatly platform-dependent. For further detail, see the <b> Behavior of Functions</b> in each platform: <a href="win32.html">Microsoft Windows (GDI)</a>, <a href="xwin.html">X-Windows (XLIB)</a>. However, it should be noted that some functions behave differently from the basic functions of each platform.</p> </body> </html>