File: group__vd.html

package info (click to toggle)
g2 0.72-13
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,696 kB
  • sloc: ansic: 9,772; sh: 2,734; python: 235; perl: 228; makefile: 210; fortran: 183; cpp: 33
file content (164 lines) | stat: -rw-r--r-- 7,630 bytes parent folder | download | duplicates (8)
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>g2: virtual device related functions</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.6 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul></div>
<h1>virtual device related functions<br>
<small>
[<a class="el" href="group__interface.html">g2 User Interface</a>]</small>
</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vd.html#g140fb10e1c95834e3f2380bb4103ce4b">g2_open_vd</a> (void)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vd.html#g7b455ab14d94ad12443c7f3e7520607b">g2_attach</a> (int vd_dev, int dev)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vd.html#g62bb52898c4319f8cac9440876608b88">g2_detach</a> (int vd_dev, int dev)</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Virtual device is a method to redirect g2 output to multiple devices. Here is an example:<p>
<div class="fragment"><pre class="fragment">    <span class="keywordtype">int</span> d1 = <a class="code" href="group__X11.html#gb36e635122fa975ef0f4c646a15314bb">g2_open_X11</a>(100, 100);      create first X11 window
    <span class="keywordtype">int</span> d2 = <a class="code" href="group__X11.html#gb36e635122fa975ef0f4c646a15314bb">g2_open_X11</a>(100, 100);      create 2nd X11 window

    <span class="keywordtype">int</span> vd = <a class="code" href="group__vd.html#g140fb10e1c95834e3f2380bb4103ce4b">g2_open_vd</a>();               open a <span class="keyword">new</span> <span class="keyword">virtual</span> device

    <a class="code" href="group__vd.html#g7b455ab14d94ad12443c7f3e7520607b">g2_attach</a>(vd, d1);                   attach d1 (1st window) to <span class="keyword">virtual</span> device
    <a class="code" href="group__vd.html#g7b455ab14d94ad12443c7f3e7520607b">g2_attach</a>(vd, d2);                   attach d2 (2nd window) to <span class="keyword">virtual</span> device

    <a class="code" href="group__graphic.html#g72fe3325f5927565723b8bb655d6f9aa">g2_plot</a>(d1, 11, 11);                 output to the 1st X11 window
    <a class="code" href="group__graphic.html#g72fe3325f5927565723b8bb655d6f9aa">g2_plot</a>(d2, 12, 12);                 output to the 2nd X11 window 
    <a class="code" href="group__graphic.html#g72fe3325f5927565723b8bb655d6f9aa">g2_plot</a>(vd, 13, 13);                 output to both X11 windows
</pre></div> <hr><h2>Function Documentation</h2>
<a class="anchor" name="g7b455ab14d94ad12443c7f3e7520607b"></a><!-- doxytag: member="g2_ui_virtual_device.c::g2_attach" ref="g7b455ab14d94ad12443c7f3e7520607b" args="(int vd_dev, int dev)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void g2_attach           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname" nowrap> <em>vd_dev</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap> <em>dev</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Attach a device to virtual device <em>vd_dev</em>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>vd_dev</em>&nbsp;</td><td>virtual device (create virtual device by calling <a class="el" href="group__vd.html#g140fb10e1c95834e3f2380bb4103ce4b">g2_open_vd()</a> ) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dev</em>&nbsp;</td><td>device </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="g62bb52898c4319f8cac9440876608b88"></a><!-- doxytag: member="g2_ui_virtual_device.c::g2_detach" ref="g62bb52898c4319f8cac9440876608b88" args="(int vd_dev, int dev)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void g2_detach           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname" nowrap> <em>vd_dev</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap> <em>dev</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Dettach a device from the virtual device <em>vd_dev</em>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>vd_dev</em>&nbsp;</td><td>virtual device </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dev</em>&nbsp;</td><td>device </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="g140fb10e1c95834e3f2380bb4103ce4b"></a><!-- doxytag: member="g2_ui_virtual_device.c::g2_open_vd" ref="g140fb10e1c95834e3f2380bb4103ce4b" args="(void)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int g2_open_vd           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Create a new virtual device.<p>
<dl compact><dt><b>Returns:</b></dt><dd>virtual device ID </dd></dl>
    </td>
  </tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Tue Oct 17 21:27:48 2006 for g2 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
</body>
</html>