summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathon Jongsma <jjongsma@gnome.org>2010-12-30 21:31:25 -0600
committerJonathon Jongsma <jjongsma@gnome.org>2010-12-30 22:05:09 -0600
commit1370fd780f35f1e001f7559f3ad17532e07cdb27 (patch)
tree81fb916b219d53d7e223e07ba36be359d8742ece
parentff59e8585670b58dcde26d72dcf123e566569930 (diff)
Wrap cairo_device_acquire|release()
-rw-r--r--cairomm/device.cc12
-rw-r--r--cairomm/device.h3
2 files changed, 15 insertions, 0 deletions
diff --git a/cairomm/device.cc b/cairomm/device.cc
index c4035dc..f4bff2e 100644
--- a/cairomm/device.cc
+++ b/cairomm/device.cc
@@ -67,6 +67,18 @@ void Device::finish()
check_object_status_and_throw_exception(*this);
}
+void Device::acquire()
+{
+ ErrorStatus status = cairo_device_acquire(m_cobject);
+ check_status_and_throw_exception(status);
+}
+
+void Device::release()
+{
+ cairo_device_release(m_cobject);
+ check_object_status_and_throw_exception(*this);
+}
+
} //namespace Cairo
// vim: ts=2 sw=2 et
diff --git a/cairomm/device.h b/cairomm/device.h
index 90972fc..056a693 100644
--- a/cairomm/device.h
+++ b/cairomm/device.h
@@ -53,6 +53,9 @@ public:
//TODO: Documentation.
void finish();
+ void acquire();
+ void release();
+
typedef cairo_device_t cobject;
inline cobject* cobj() { return m_cobject; }