File: classCairo_1_1Device_1_1Lock.html

package info (click to toggle)
cairomm 1.12.2-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 6,836 kB
  • sloc: cpp: 5,924; sh: 4,228; perl: 236; makefile: 164
file content (148 lines) | stat: -rw-r--r-- 8,645 bytes parent folder | download
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>cairomm: Cairo::Device::Lock Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">cairomm
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceCairo.html">Cairo</a></li><li class="navelem"><a class="el" href="classCairo_1_1Device.html">Device</a></li><li class="navelem"><a class="el" href="classCairo_1_1Device_1_1Lock.html">Lock</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classCairo_1_1Device_1_1Lock-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Cairo::Device::Lock Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A convenience class for acquiring a <a class="el" href="classCairo_1_1Device.html" title="Devices are the abstraction Cairo employs for the rendering system used by a cairo_surface_t. ">Device</a> object in an exception-safe manner.  
 <a href="classCairo_1_1Device_1_1Lock.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a7a376f275131519394fb4256418ee607"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1Device_1_1Lock.html#a7a376f275131519394fb4256418ee607">Lock</a> (const <a class="el" href="classCairo_1_1RefPtr.html">RefPtr</a>&lt; <a class="el" href="classCairo_1_1Device.html">Device</a> &gt;&amp; device)</td></tr>
<tr class="memdesc:a7a376f275131519394fb4256418ee607"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new <a class="el" href="classCairo_1_1Device.html" title="Devices are the abstraction Cairo employs for the rendering system used by a cairo_surface_t. ">Device</a> lock for <em>device</em>.  <a href="#a7a376f275131519394fb4256418ee607">More...</a><br /></td></tr>
<tr class="separator:a7a376f275131519394fb4256418ee607"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac717b4a10ad681aae711c852e0824571"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1Device_1_1Lock.html#ac717b4a10ad681aae711c852e0824571">Lock</a> (const <a class="el" href="classCairo_1_1Device_1_1Lock.html">Lock</a>&amp; other)</td></tr>
<tr class="separator:ac717b4a10ad681aae711c852e0824571"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a5e7c6b770589a05554ebae5681ed10"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCairo_1_1Device_1_1Lock.html#a0a5e7c6b770589a05554ebae5681ed10">~Lock</a> ()</td></tr>
<tr class="separator:a0a5e7c6b770589a05554ebae5681ed10"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A convenience class for acquiring a <a class="el" href="classCairo_1_1Device.html" title="Devices are the abstraction Cairo employs for the rendering system used by a cairo_surface_t. ">Device</a> object in an exception-safe manner. </p>
<p>The device is automatically acquired when a <a class="el" href="classCairo_1_1Device_1_1Lock.html" title="A convenience class for acquiring a Device object in an exception-safe manner. ">Lock</a> object is created and released when the <a class="el" href="classCairo_1_1Device_1_1Lock.html" title="A convenience class for acquiring a Device object in an exception-safe manner. ">Lock</a> object is destroyed. For example:</p>
<div class="fragment"><div class="line"><span class="keywordtype">void</span></div>
<div class="line">my_device_modifying_function (<span class="keyword">const</span> RefPtr&lt;Device&gt;&amp; device)</div>
<div class="line">{</div>
<div class="line">  <span class="comment">// Ensure the device is properly reset</span></div>
<div class="line">  device-&gt;flush();</div>
<div class="line"></div>
<div class="line">  Device::Lock <a class="codeRef" doxygen="libstdc++.tag:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01650.html#ga24630a7020b341d48604f46e9eb210cd">lock</a>(device);</div>
<div class="line">  <span class="comment">// Do the custom operations on the device here.</span></div>
<div class="line">  <span class="comment">// But do not call any Cairo functions that might acquire devices.</span></div>
<div class="line"></div>
<div class="line">} <span class="comment">// device is automatically released at the end of the function scope</span></div>
</div><!-- fragment --> </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a7a376f275131519394fb4256418ee607"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Cairo::Device::Lock::Lock </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classCairo_1_1RefPtr.html">RefPtr</a>&lt; <a class="el" href="classCairo_1_1Device.html">Device</a> &gt;&amp;&#160;</td>
          <td class="paramname"><em>device</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new <a class="el" href="classCairo_1_1Device.html" title="Devices are the abstraction Cairo employs for the rendering system used by a cairo_surface_t. ">Device</a> lock for <em>device</em>. </p>

</div>
</div>
<a class="anchor" id="ac717b4a10ad681aae711c852e0824571"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Cairo::Device::Lock::Lock </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classCairo_1_1Device_1_1Lock.html">Lock</a>&amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a0a5e7c6b770589a05554ebae5681ed10"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Cairo::Device::Lock::~Lock </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>cairomm/device.h</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Nov 15 2016 12:52:12 for cairomm by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>