1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
<!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 at the end, it means that a <b>Bitmap</b> must be created instead of a
metafile, and, if the string <font face="Courier">"-m"</font> is
present at the end, 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>"widthxheight [resolution]
-b"</em> or in C "<tt><em><strong>%dx%d %g -b"</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>
|