From 1370fd780f35f1e001f7559f3ad17532e07cdb27 Mon Sep 17 00:00:00 2001 From: Jonathon Jongsma Date: Thu, 30 Dec 2010 21:31:25 -0600 Subject: Wrap cairo_device_acquire|release() --- cairomm/device.cc | 12 ++++++++++++ cairomm/device.h | 3 +++ 2 files changed, 15 insertions(+) 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; } -- cgit v1.2.3