[libwnck/wip/muktupavels/wnck-handle: 1/8] handle: make it public




commit d2c2ff578837cb2e994b19069c47627fdf842c95
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Mon Aug 19 16:12:32 2019 +0300

    handle: make it public

 libwnck/libwnck.h             |  2 ++
 libwnck/meson.build           |  1 +
 libwnck/wnck-handle-private.h |  4 +---
 libwnck/wnck-handle.c         | 10 +++++++---
 libwnck/wnck-handle.h         | 34 ++++++++++++++++++++++++++++++++++
 5 files changed, 45 insertions(+), 6 deletions(-)
---
diff --git a/libwnck/libwnck.h b/libwnck/libwnck.h
index 20f89f6..7b1860a 100644
--- a/libwnck/libwnck.h
+++ b/libwnck/libwnck.h
@@ -23,6 +23,8 @@
 
 #define __LIBWNCK_H_INSIDE__
 
+#include <libwnck/wnck-handle.h>
+
 #include <libwnck/window.h>
 #include <libwnck/application.h>
 #include <libwnck/class-group.h>
diff --git a/libwnck/meson.build b/libwnck/meson.build
index aa60e83..a32deaf 100644
--- a/libwnck/meson.build
+++ b/libwnck/meson.build
@@ -39,6 +39,7 @@ headers = [
   'util.h',
   'window.h',
   'window-action-menu.h',
+  'wnck-handle.h',
   'workspace.h',
 ]
 
diff --git a/libwnck/wnck-handle-private.h b/libwnck/wnck-handle-private.h
index f277661..bc3d6b1 100644
--- a/libwnck/wnck-handle-private.h
+++ b/libwnck/wnck-handle-private.h
@@ -19,11 +19,10 @@
 #define WNCK_HANDLE_PRIVATE_H
 
 #include "util.h"
+#include "wnck-handle.h"
 
 G_BEGIN_DECLS
 
-typedef struct _WnckHandle WnckHandle;
-
 WnckHandle     *_wnck_handle_new                        (WnckClientType  client_type);
 
 WnckClientType  _wnck_handle_get_client_type            (WnckHandle     *self);
@@ -33,7 +32,6 @@ void            _wnck_handle_set_default_icon_size      (WnckHandle     *self,
 
 gsize           _wnck_handle_get_default_icon_size      (WnckHandle     *self);
 
-
 void            _wnck_handle_set_default_mini_icon_size (WnckHandle     *self,
                                                          gsize           icon_size);
 
diff --git a/libwnck/wnck-handle.c b/libwnck/wnck-handle.c
index 296b949..9eaca94 100644
--- a/libwnck/wnck-handle.c
+++ b/libwnck/wnck-handle.c
@@ -17,6 +17,13 @@
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
+/**
+ * SECTION: wnck-handle
+ * @short_description: an object representing a handle.
+ *
+ * This is the main entry point into the libwnck library.
+ */
+
 #include "config.h"
 #include "wnck-handle-private.h"
 
@@ -26,9 +33,6 @@
 #include "wnck-enum-types.h"
 #include "xutils.h"
 
-#define WNCK_TYPE_HANDLE (wnck_handle_get_type ())
-G_DECLARE_FINAL_TYPE (WnckHandle, wnck_handle, WNCK, HANDLE, GObject)
-
 struct _WnckHandle
 {
   GObject        parent;
diff --git a/libwnck/wnck-handle.h b/libwnck/wnck-handle.h
new file mode 100644
index 0000000..1bb2a27
--- /dev/null
+++ b/libwnck/wnck-handle.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2021 Alberts Muktupāvels
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#if !defined (__LIBWNCK_H_INSIDE__) && !defined (WNCK_COMPILATION)
+#error "Only <libwnck/libwnck.h> can be included directly."
+#endif
+
+#ifndef WNCK_HANDLE_H
+#define WNCK_HANDLE_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define WNCK_TYPE_HANDLE (wnck_handle_get_type ())
+G_DECLARE_FINAL_TYPE (WnckHandle, wnck_handle, WNCK, HANDLE, GObject)
+
+G_END_DECLS
+
+#endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]