Debian Codegraph @

doc/defuns-cairo-device.xml.texi

raw
1
2 @c %start of fragment
3
4 @deffn Function cairo-device-finish (@var{device}@tie{}@code{<cairo-device-t>})
5 This function finishes the device and drops all references to external
6 resources. All surfaces, fonts and other objects created for this
7 @var{device} will be finished, too. Further operations on the
8 @var{device} will not affect the @var{device} but will instead trigger a
9 @samp{CAIRO_STATUS_DEVICE_FINISHED} error.
10
11 When the last call to @code{cairo-device-destroy} decreases the
12 reference count to zero, cairo will call @code{cairo-device-finish} if
13 it hasn't been called already, before freeing the resources associated
14 with the device.
15
16 This function may acquire devices.
17
18 @table @var
19 @item device
20 the @code{<cairo-device-t>} to finish
21
22 @end table
23
24 Since 1.10
25
26 @end deffn
27
28 @deffn Function cairo-device-flush (@var{device}@tie{}@code{<cairo-device-t>})
29 Finish any pending operations for the device and also restore any
30 temporary modifications cairo has made to the device's state. This
31 function must be called before switching from using the device with
32 Cairo to operating on it directly with native APIs. If the device
33 doesn't support direct access, then this function does nothing.
34
35 This function may acquire devices.
36
37 @table @var
38 @item device
39 a @code{<cairo-device-t>}
40
41 @end table
42
43 Since 1.10
44
45 @end deffn
46
47 @deffn Function cairo-device-get-type (@var{device}@tie{}@code{<cairo-device-t>}) @result{}@tie{} (@var{ret}@tie{}@code{<cairo-device-type-t>})
48 This function returns the type of the device. See
49 @code{<cairo-device-type-t>} for available types.
50
51 @table @var
52 @item device
53 a @code{<cairo-device-t>}
54
55 @item ret
56 The type of @var{device}.
57
58 @end table
59
60 Since 1.10
61
62 @end deffn
63
64 @deffn Function cairo-device-acquire (@var{device}@tie{}@code{<cairo-device-t>}) @result{}@tie{} (@var{ret}@tie{}@code{<cairo-status-t>})
65 Acquires the @var{device} for the current thread. This function will
66 block until no other thread has acquired the device.
67
68 If the return value is @samp{CAIRO_STATUS_SUCCESS}, you successfully
69 acquired the device. From now on your thread owns the device and no
70 other thread will be able to acquire it until a matching call to
71 @code{cairo-device-release}. It is allowed to recursively acquire the
72 device multiple times from the same thread.
73
74 You must never acquire two different devices at the same time unless
75 this is explicitly allowed. Otherwise the possibility of deadlocks
76 exist.
77
78 As various Cairo functions can acquire devices when called, these
79 functions may also cause deadlocks when you call them with an acquired
80 device. So you must not have a device acquired when calling them. These
81 functions are marked in the documentation.
82
83 @table @var
84 @item device
85 a @code{<cairo-device-t>}
86
87 @item ret
88 @samp{CAIRO_STATUS_SUCCESS} on success or an error code if the device is
89 in an error state and could not be acquired. After a successful call to
90 @code{cairo-device-acquire}, a matching call to
91 @code{cairo-device-release} is required.
92
93 @end table
94
95 Since 1.10
96
97 @end deffn
98
99 @deffn Function cairo-device-release (@var{device}@tie{}@code{<cairo-device-t>})
100 Releases a @var{device} previously acquired using
101 @code{cairo-device-acquire}. See that function for details.
102
103 @table @var
104 @item device
105 a @code{<cairo-device-t>}
106
107 @end table
108
109 Since 1.10
110
111 @end deffn
112
113
114 @c %end of fragment