[libwnck/wip/muktupavels/wnck-handle: 1/9] add WnckHandle object



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

    add WnckHandle object

 libwnck/Makefile.am           |  3 +++
 libwnck/libwnck.h             |  2 ++
 libwnck/meson.build           |  3 +++
 libwnck/wnck-handle-private.h | 27 +++++++++++++++++++++++++++
 libwnck/wnck-handle.c         | 43 +++++++++++++++++++++++++++++++++++++++++++
 libwnck/wnck-handle.h         | 34 ++++++++++++++++++++++++++++++++++
 6 files changed, 112 insertions(+)
---
diff --git a/libwnck/Makefile.am b/libwnck/Makefile.am
index 6b6c7f8..4c7a99e 100644
--- a/libwnck/Makefile.am
+++ b/libwnck/Makefile.am
@@ -41,6 +41,7 @@ wnck_headers =                        \
        util.h                  \
        window.h                \
        window-action-menu.h    \
+       wnck-handle.h           \
        workspace.h
 
 libwnckincludedir = $(includedir)/libwnck-3.0/libwnck
@@ -60,6 +61,7 @@ wnck_sources =                        \
        util.c                  \
        window.c                \
        window-action-menu.c    \
+       wnck-handle.c           \
        workspace.c
 
 wnck_accessibility_files =                     \
@@ -78,6 +80,7 @@ libwnck_3_la_SOURCES =                \
        private.h               \
        xutils.c                \
        xutils.h                \
+       wnck-handle-private.h \
        wnck-image-menu-item.c \
        wnck-image-menu-item-private.h \
        $(wnck_accessibility_files)
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 0cd68fc..05b85db 100644
--- a/libwnck/meson.build
+++ b/libwnck/meson.build
@@ -19,6 +19,7 @@ headers = [
   'util.h',
   'window.h',
   'window-action-menu.h',
+  'wnck-handle.h',
   'workspace.h',
 ]
 
@@ -37,6 +38,8 @@ sources = [
   'util.c',
   'window-action-menu.c',
   'window.c',
+  'wnck-handle-private.h',
+  'wnck-handle.c',
   'wnck-image-menu-item-private.h',
   'wnck-image-menu-item.c',
   'workspace.c',
diff --git a/libwnck/wnck-handle-private.h b/libwnck/wnck-handle-private.h
new file mode 100644
index 0000000..163d673
--- /dev/null
+++ b/libwnck/wnck-handle-private.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2019 Alberts Muktupāvels
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef WNCK_HANDLE_PRIVATE_H
+#define WNCK_HANDLE_PRIVATE_H
+
+#include "wnck-handle.h"
+
+G_BEGIN_DECLS
+
+G_END_DECLS
+
+#endif
diff --git a/libwnck/wnck-handle.c b/libwnck/wnck-handle.c
new file mode 100644
index 0000000..f38e631
--- /dev/null
+++ b/libwnck/wnck-handle.c
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2019 Alberts Muktupāvels
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. 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"
+
+struct _WnckHandle
+{
+  GObject parent;
+};
+
+G_DEFINE_TYPE (WnckHandle, wnck_handle, G_TYPE_OBJECT)
+
+static void
+wnck_handle_class_init (WnckHandleClass *self_class)
+{
+}
+
+static void
+wnck_handle_init (WnckHandle *self)
+{
+}
diff --git a/libwnck/wnck-handle.h b/libwnck/wnck-handle.h
new file mode 100644
index 0000000..12362d8
--- /dev/null
+++ b/libwnck/wnck-handle.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2019 Alberts Muktupāvels
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. 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]