summaryrefslogtreecommitdiff
path: root/src/xcb_resource.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/xcb_resource.cc')
-rw-r--r--src/xcb_resource.cc37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/xcb_resource.cc b/src/xcb_resource.cc
new file mode 100644
index 0000000..b64b611
--- /dev/null
+++ b/src/xcb_resource.cc
@@ -0,0 +1,37 @@
+#include "common.hh"
+
+#include "xcb_resource.hh"
+
+namespace xcb {
+
+unique_wnd make_unique_wnd(shared_conn conn) {
+ return std::make_unique<xcb_resource<xcb_window_t,
+ internal::WndDeleter>>(conn);
+}
+
+shared_wnd make_shared_wnd(shared_conn conn) {
+ return std::make_shared<xcb_resource<xcb_window_t,
+ internal::WndDeleter>>(conn);
+}
+
+unique_gc make_unique_gc(shared_conn conn) {
+ return std::make_unique<xcb_resource<xcb_gcontext_t,
+ internal::GCDeleter>>(conn);
+}
+
+shared_gc make_shared_gc(shared_conn conn) {
+ return std::make_shared<xcb_resource<xcb_gcontext_t,
+ internal::GCDeleter>>(conn);
+}
+
+unique_font make_unique_font(shared_conn conn) {
+ return std::make_unique<xcb_resource<xcb_font_t,
+ internal::FontDeleter>>(conn);
+}
+
+shared_font make_shared_font(shared_conn conn) {
+ return std::make_shared<xcb_resource<xcb_font_t,
+ internal::FontDeleter>>(conn);
+}
+
+} // namespace xcb