[gnome-flashback] backends: initial version
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] backends: initial version
- Date: Sat, 9 Sep 2017 22:18:11 +0000 (UTC)
commit 824ad004a015b5d4fe42b1d4f3ee56d1606f38c6
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sat Sep 9 20:38:50 2017 +0300
backends: initial version
Makefile.am | 1 +
backends/Makefile.am | 55 ++++++++++++++++
backends/gf-backend-native-private.h | 39 +++++++++++
backends/gf-backend-native.c | 44 ++++++++++++
backends/gf-backend-private.h | 40 +++++++++++
backends/gf-backend-x11-cm-private.h | 35 ++++++++++
backends/gf-backend-x11-cm.c | 40 +++++++++++
backends/gf-backend-x11-nested-private.h | 35 ++++++++++
backends/gf-backend-x11-nested.c | 40 +++++++++++
backends/gf-backend-x11-private.h | 44 ++++++++++++
backends/gf-backend-x11.c | 67 +++++++++++++++++++
backends/gf-backend.c | 105 ++++++++++++++++++++++++++++++
backends/gf-backend.h | 47 +++++++++++++
configure.ac | 8 ++
gnome-flashback/Makefile.am | 7 ++-
gnome-flashback/gf-application.c | 9 ++-
16 files changed, 613 insertions(+), 3 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 18a26d7..70cb5a3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,6 +2,7 @@ NULL =
SUBDIRS = \
data \
+ backends \
gnome-flashback \
po \
$(NULL)
diff --git a/backends/Makefile.am b/backends/Makefile.am
new file mode 100644
index 0000000..9f65c15
--- /dev/null
+++ b/backends/Makefile.am
@@ -0,0 +1,55 @@
+NULL =
+
+noinst_LTLIBRARIES = \
+ libbackends.la \
+ $(NULL)
+
+libbackends_la_CPPFLAGS = \
+ -DG_LOG_DOMAIN=\"gf-backends\" \
+ -DG_LOG_USE_STRUCTURED=1 \
+ -I$(top_srcdir) \
+ $(AM_CPPFLAGS) \
+ $(NULL)
+
+libbackends_la_CFLAGS = \
+ $(BACKENDS_CFLAGS) \
+ $(WARN_CFLAGS) \
+ $(AM_CFLAGS) \
+ $(NULL)
+
+libbackends_la_SOURCES = \
+ gf-backend-native-private.h \
+ gf-backend-native.c \
+ gf-backend-private.h \
+ gf-backend-x11-cm-private.h \
+ gf-backend-x11-cm.c \
+ gf-backend-x11-nested-private.h \
+ gf-backend-x11-nested.c \
+ gf-backend-x11-private.h \
+ gf-backend-x11.c \
+ gf-backend.c \
+ gf-backend.h \
+ $(BUILT_SOURCES) \
+ $(NULL)
+
+libbackends_la_LDFLAGS = \
+ $(WARN_LDFLAGS) \
+ $(AM_LDFLAGS) \
+ $(NULL)
+
+libbackends_la_LIBADD = \
+ $(BACKENDS_LIBS) \
+ $(LIBM) \
+ $(NULL)
+
+BUILT_SOURCES = \
+ $(NULL)
+
+EXTRA_DIST = \
+ $(NULL)
+
+CLEANFILES = \
+ $(BUILT_SOURCES) \
+ $(NULL)
+
+-include $(top_srcdir)/git.mk
diff --git a/backends/gf-backend-native-private.h b/backends/gf-backend-native-private.h
new file mode 100644
index 0000000..612e5ce
--- /dev/null
+++ b/backends/gf-backend-native-private.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2014 Red Hat
+ * Copyright (C) 2017 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 3 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/>.
+ *
+ * Authors:
+ * Alberts Muktupāvels <alberts muktupavels gmail com>
+ * Jasper St. Pierre <jstpierre mecheye net>
+ *
+ * Adapted from mutter:
+ * - src/backends/native/meta-backend-native.h
+ */
+
+#ifndef GF_BACKEND_NATIVE_PRIVATE_H
+#define GF_BACKEND_NATIVE_PRIVATE_H
+
+#include "gf-backend-private.h"
+
+G_BEGIN_DECLS
+
+#define GF_TYPE_BACKEND_NATIVE (gf_backend_native_get_type ())
+G_DECLARE_FINAL_TYPE (GfBackendNative, gf_backend_native,
+ GF, BACKEND_NATIVE, GfBackend)
+
+G_END_DECLS
+
+#endif
diff --git a/backends/gf-backend-native.c b/backends/gf-backend-native.c
new file mode 100644
index 0000000..8ae51ba
--- /dev/null
+++ b/backends/gf-backend-native.c
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2014 Red Hat
+ * Copyright (C) 2017 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 3 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/>.
+ *
+ * Authors:
+ * Alberts Muktupāvels <alberts muktupavels gmail com>
+ * Jasper St. Pierre <jstpierre mecheye net>
+ *
+ * Adapted from mutter:
+ * - src/backends/native/meta-backend-native.c
+ */
+
+#include "config.h"
+#include "gf-backend-native-private.h"
+
+struct _GfBackendNative
+{
+ GfBackend parent;
+};
+
+G_DEFINE_TYPE (GfBackendNative, gf_backend_native, GF_TYPE_BACKEND)
+
+static void
+gf_backend_native_class_init (GfBackendNativeClass *native_class)
+{
+}
+
+static void
+gf_backend_native_init (GfBackendNative *native)
+{
+}
diff --git a/backends/gf-backend-private.h b/backends/gf-backend-private.h
new file mode 100644
index 0000000..ac33adf
--- /dev/null
+++ b/backends/gf-backend-private.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2014 Red Hat
+ * Copyright (C) 2017 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 3 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/>.
+ *
+ * Authors:
+ * Alberts Muktupāvels <alberts muktupavels gmail com>
+ * Jasper St. Pierre <jstpierre mecheye net>
+ *
+ * Adapted from mutter:
+ * - src/backends/meta-backend-private.h
+ */
+
+#ifndef GF_BACKEND_PRIVATE_H
+#define GF_BACKEND_PRIVATE_H
+
+#include "gf-backend.h"
+
+G_BEGIN_DECLS
+
+struct _GfBackendClass
+{
+ GObjectClass parent_class;
+};
+
+G_END_DECLS
+
+#endif
diff --git a/backends/gf-backend-x11-cm-private.h b/backends/gf-backend-x11-cm-private.h
new file mode 100644
index 0000000..97a8371
--- /dev/null
+++ b/backends/gf-backend-x11-cm-private.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2017 Alberts Muktupāvels
+ * Copyright (C) 2017 Red Hat
+ *
+ * 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 3 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/>.
+ *
+ * Adapted from mutter:
+ * - src/backends/x11/cm/meta-backend-x11-cm.h
+ */
+
+#ifndef GF_BACKEND_X11_CM_PRIVATE_H
+#define GF_BACKEND_X11_CM_PRIVATE_H
+
+#include "gf-backend-x11-private.h"
+
+G_BEGIN_DECLS
+
+#define GF_TYPE_BACKEND_X11_CM (gf_backend_x11_cm_get_type ())
+G_DECLARE_FINAL_TYPE (GfBackendX11Cm, gf_backend_x11_cm,
+ GF, BACKEND_X11_CM, GfBackendX11)
+
+G_END_DECLS
+
+#endif
diff --git a/backends/gf-backend-x11-cm.c b/backends/gf-backend-x11-cm.c
new file mode 100644
index 0000000..f5ff12a
--- /dev/null
+++ b/backends/gf-backend-x11-cm.c
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2017 Alberts Muktupāvels
+ * Copyright (C) 2017 Red Hat
+ *
+ * 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 3 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/>.
+ *
+ * Adapted from mutter:
+ * - src/backends/x11/cm/meta-backend-x11-cm.c
+ */
+
+#include "config.h"
+#include "gf-backend-x11-cm-private.h"
+
+struct _GfBackendX11Cm
+{
+ GfBackendX11 parent;
+};
+
+G_DEFINE_TYPE (GfBackendX11Cm, gf_backend_x11_cm, GF_TYPE_BACKEND_X11)
+
+static void
+gf_backend_x11_cm_class_init (GfBackendX11CmClass *x11_cm_class)
+{
+}
+
+static void
+gf_backend_x11_cm_init (GfBackendX11Cm *x11_cm)
+{
+}
diff --git a/backends/gf-backend-x11-nested-private.h b/backends/gf-backend-x11-nested-private.h
new file mode 100644
index 0000000..f9722ab
--- /dev/null
+++ b/backends/gf-backend-x11-nested-private.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2017 Alberts Muktupāvels
+ * Copyright (C) 2017 Red Hat
+ *
+ * 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 3 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/>.
+ *
+ * Adapted from mutter:
+ * - src/backends/x11/nested/meta-backend-x11-nested.h
+ */
+
+#ifndef GF_BACKEND_X11_NESTED_PRIVATE_H
+#define GF_BACKEND_X11_NESTED_PRIVATE_H
+
+#include "gf-backend-x11-private.h"
+
+G_BEGIN_DECLS
+
+#define GF_TYPE_BACKEND_X11_NESTED (gf_backend_x11_nested_get_type ())
+G_DECLARE_FINAL_TYPE (GfBackendX11Nested, gf_backend_x11_nested,
+ GF, BACKEND_X11_NESTED, GfBackendX11)
+
+G_END_DECLS
+
+#endif
diff --git a/backends/gf-backend-x11-nested.c b/backends/gf-backend-x11-nested.c
new file mode 100644
index 0000000..591eda0
--- /dev/null
+++ b/backends/gf-backend-x11-nested.c
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2017 Alberts Muktupāvels
+ * Copyright (C) 2017 Red Hat
+ *
+ * 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 3 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/>.
+ *
+ * Adapted from mutter:
+ * - src/backends/x11/nested/meta-backend-x11-nested.c
+ */
+
+#include "config.h"
+#include "gf-backend-x11-nested-private.h"
+
+struct _GfBackendX11Nested
+{
+ GfBackendX11 parent;
+};
+
+G_DEFINE_TYPE (GfBackendX11Nested, gf_backend_x11_nested, GF_TYPE_BACKEND_X11)
+
+static void
+gf_backend_x11_nested_class_init (GfBackendX11NestedClass *x11_nested_class)
+{
+}
+
+static void
+gf_backend_x11_nested_init (GfBackendX11Nested *x11_nested)
+{
+}
diff --git a/backends/gf-backend-x11-private.h b/backends/gf-backend-x11-private.h
new file mode 100644
index 0000000..22d9e6a
--- /dev/null
+++ b/backends/gf-backend-x11-private.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2014 Red Hat
+ * Copyright (C) 2017 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 3 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/>.
+ *
+ * Authors:
+ * Alberts Muktupāvels <alberts muktupavels gmail com>
+ * Jasper St. Pierre <jstpierre mecheye net>
+ *
+ * Adapted from mutter:
+ * - src/backends/x11/meta-backend-x11.h
+ */
+
+#ifndef GF_BACKEND_X11_PRIVATE_H
+#define GF_BACKEND_X11_PRIVATE_H
+
+#include "gf-backend-private.h"
+
+G_BEGIN_DECLS
+
+#define GF_TYPE_BACKEND_X11 (gf_backend_x11_get_type ())
+G_DECLARE_DERIVABLE_TYPE (GfBackendX11, gf_backend_x11,
+ GF, BACKEND_X11, GfBackend)
+
+struct _GfBackendX11Class
+{
+ GfBackendClass parent_class;
+};
+
+G_END_DECLS
+
+#endif
diff --git a/backends/gf-backend-x11.c b/backends/gf-backend-x11.c
new file mode 100644
index 0000000..5101690
--- /dev/null
+++ b/backends/gf-backend-x11.c
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2014 Red Hat
+ * Copyright (C) 2017 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 3 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/>.
+ *
+ * Authors:
+ * Alberts Muktupāvels <alberts muktupavels gmail com>
+ * Jasper St. Pierre <jstpierre mecheye net>
+ *
+ * Adapted from mutter:
+ * - src/backends/x11/meta-backend-x11.c
+ */
+
+#include "config.h"
+
+#include <gio/gio.h>
+
+#include "gf-backend-x11-private.h"
+
+static void
+initable_iface_init (GInitableIface *initable_iface);
+
+G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GfBackendX11, gf_backend_x11, GF_TYPE_BACKEND,
+ G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE,
+ initable_iface_init))
+
+static gboolean
+gf_backend_x11_initable_init (GInitable *initable,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GfBackendX11 *x11;
+ GInitableIface *parent_iface;
+
+ x11 = GF_BACKEND_X11 (initable);
+ parent_iface = g_type_interface_peek_parent (G_INITABLE_GET_IFACE (x11));
+
+ return parent_iface->init (initable, cancellable, error);
+}
+
+static void
+initable_iface_init (GInitableIface *initable_iface)
+{
+ initable_iface->init = gf_backend_x11_initable_init;
+}
+
+static void
+gf_backend_x11_class_init (GfBackendX11Class *x11_class)
+{
+}
+
+static void
+gf_backend_x11_init (GfBackendX11 *x11)
+{
+}
diff --git a/backends/gf-backend.c b/backends/gf-backend.c
new file mode 100644
index 0000000..9e6d5b3
--- /dev/null
+++ b/backends/gf-backend.c
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2014 Red Hat
+ * Copyright (C) 2017 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 3 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/>.
+ *
+ * Authors:
+ * Alberts Muktupāvels <alberts muktupavels gmail com>
+ * Jasper St. Pierre <jstpierre mecheye net>
+ *
+ * Adapted from mutter:
+ * - src/backends/meta-backend.c
+ */
+
+#include "config.h"
+
+#include <gio/gio.h>
+
+#include "gf-backend-native-private.h"
+#include "gf-backend-x11-cm-private.h"
+#include "gf-backend-x11-nested-private.h"
+
+static void
+initable_iface_init (GInitableIface *initable_iface);
+
+G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GfBackend, gf_backend, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE,
+ initable_iface_init))
+
+static gboolean
+gf_backend_initable_init (GInitable *initable,
+ GCancellable *cancellable,
+ GError **error)
+{
+ return TRUE;
+}
+
+static void
+initable_iface_init (GInitableIface *initable_iface)
+{
+ initable_iface->init = gf_backend_initable_init;
+}
+
+static void
+gf_backend_class_init (GfBackendClass *backend_class)
+{
+}
+
+static void
+gf_backend_init (GfBackend *backend)
+{
+}
+
+GfBackend *
+gf_backend_new (GfBackendType type)
+{
+ GType gtype;
+ GfBackend *backend;
+ GError *error;
+
+ switch (type)
+ {
+ case GF_BACKEND_TYPE_X11_CM:
+ gtype = GF_TYPE_BACKEND_X11_CM;
+ break;
+
+ case GF_BACKEND_TYPE_X11_NESTED:
+ gtype = GF_TYPE_BACKEND_X11_NESTED;
+ break;
+
+ case GF_BACKEND_TYPE_NATIVE:
+ gtype = GF_TYPE_BACKEND_NATIVE;
+ break;
+
+ default:
+ g_assert_not_reached ();
+ break;
+ }
+
+ backend = g_object_new (gtype, NULL);
+
+ error = NULL;
+ if (!g_initable_init (G_INITABLE (backend), NULL, &error))
+ {
+ g_warning ("Failed to create backend: %s", error->message);
+
+ g_object_unref (backend);
+ g_error_free (error);
+
+ return NULL;
+ }
+
+ return backend;
+}
diff --git a/backends/gf-backend.h b/backends/gf-backend.h
new file mode 100644
index 0000000..a4fda4f
--- /dev/null
+++ b/backends/gf-backend.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2014 Red Hat
+ * Copyright (C) 2017 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 3 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/>.
+ *
+ * Authors:
+ * Alberts Muktupāvels <alberts muktupavels gmail com>
+ * Jasper St. Pierre <jstpierre mecheye net>
+ *
+ * Adapted from mutter:
+ * - src/meta/meta-backend.h
+ */
+
+#ifndef GF_BACKEND_H
+#define GF_BACKEND_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define GF_TYPE_BACKEND (gf_backend_get_type ())
+G_DECLARE_DERIVABLE_TYPE (GfBackend, gf_backend, GF, BACKEND, GObject)
+
+typedef enum
+{
+ GF_BACKEND_TYPE_X11_CM,
+ GF_BACKEND_TYPE_X11_NESTED,
+ GF_BACKEND_TYPE_NATIVE
+} GfBackendType;
+
+GfBackend *gf_backend_new (GfBackendType type);
+
+G_END_DECLS
+
+#endif
diff --git a/configure.ac b/configure.ac
index 1478fe8..983e4af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -98,6 +98,12 @@ POLKIT_GOBJECT_REQUIRED=0.97
IBUS_REQUIRED=1.5.2
UPOWER_GLIB_REQUIRED=0.99.0
+PKG_CHECK_MODULES([BACKENDS], [
+ gio-2.0 >= $GLIB_REQUIRED
+ gio-unix-2.0 >= $GLIB_REQUIRED
+ glib-2.0 >= $GLIB_REQUIRED
+])
+
PKG_CHECK_MODULES([GNOME_FLASHBACK], [
gtk+-3.0 >= $GTK_REQUIRED
])
@@ -259,6 +265,8 @@ dnl **************************************************************************
AC_CONFIG_FILES([
Makefile
+ backends/Makefile
+
data/Makefile
data/applications/Makefile
data/autostart/Makefile
diff --git a/gnome-flashback/Makefile.am b/gnome-flashback/Makefile.am
index 14dfef5..27dad95 100644
--- a/gnome-flashback/Makefile.am
+++ b/gnome-flashback/Makefile.am
@@ -30,14 +30,16 @@ bin_PROGRAMS = \
gnome_flashback_CPPFLAGS = \
-DG_LOG_DOMAIN=\"gnome-flashback\" \
-DG_LOG_USE_STRUCTURED=1 \
+ -DLOCALE_DIR=\""$(localedir)"\" \
+ -I$(top_builddir)/gnome-flashback \
+ -I$(top_srcdir) \
+ $(AM_CPPFLAGS) \
$(NULL)
gnome_flashback_CFLAGS = \
$(GNOME_FLASHBACK_CFLAGS) \
$(WARN_CFLAGS) \
$(AM_CFLAGS) \
- -I$(top_builddir)/gnome-flashback \
- -DLOCALE_DIR=\""$(localedir)"\" \
$(NULL)
gnome_flashback_SOURCES = \
@@ -56,6 +58,7 @@ gnome_flashback_LDFLAGS = \
gnome_flashback_LDADD = \
$(GNOME_FLASHBACK_LIBS) \
+ $(top_builddir)/backends/libbackends.la \
$(top_builddir)/gnome-flashback/libaudio-device-selection/libaudio-device-selection.la \
$(top_builddir)/gnome-flashback/libautomount-manager/libautomount-manager.la \
$(top_builddir)/gnome-flashback/libbluetooth-applet/libbluetooth-applet.la \
diff --git a/gnome-flashback/gf-application.c b/gnome-flashback/gf-application.c
index ddda835..9c81a3e 100644
--- a/gnome-flashback/gf-application.c
+++ b/gnome-flashback/gf-application.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2014-2016 Alberts Muktupāvels
+ * Copyright (C) 2014-2017 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
@@ -21,6 +21,7 @@
#include <gtk/gtk.h>
#include "gf-application.h"
+#include "backends/gf-backend.h"
#include "libaudio-device-selection/gf-audio-device-selection.h"
#include "libautomount-manager/gsd-automount-manager.h"
#include "libbluetooth-applet/gf-bluetooth-applet.h"
@@ -45,6 +46,8 @@ struct _GfApplication
{
GObject parent;
+ GfBackend *backend;
+
gint bus_name;
GSettings *settings;
@@ -213,6 +216,8 @@ gf_application_dispose (GObject *object)
g_clear_object (&application->status_notifier_watcher);
g_clear_object (&application->workarounds);
+ g_clear_object (&application->backend);
+
G_OBJECT_CLASS (gf_application_parent_class)->dispose (object);
}
@@ -221,6 +226,8 @@ gf_application_init (GfApplication *application)
{
GtkSettings *settings;
+ application->backend = gf_backend_new (GF_BACKEND_TYPE_X11_CM);
+
application->settings = g_settings_new ("org.gnome.gnome-flashback");
settings = gtk_settings_get_default ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]