[gnome-flashback] screencast: move D-Bus interface files to libdbus
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] screencast: move D-Bus interface files to libdbus
- Date: Tue, 17 Dec 2019 15:24:11 +0000 (UTC)
commit dce4ee64d543f12d35209d00cb1d42cf170b1975
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Tue Dec 17 14:15:55 2019 +0200
screencast: move D-Bus interface files to libdbus
dbus/Makefile.am | 9 +++++++
.../org.gnome.Shell.Screencast.xml | 14 ++++-------
gnome-flashback/libscreencast/Makefile.am | 28 +++-------------------
gnome-flashback/libscreencast/gf-screencast.c | 25 ++++++++++---------
4 files changed, 28 insertions(+), 48 deletions(-)
---
diff --git a/dbus/Makefile.am b/dbus/Makefile.am
index 8b13af9..b4ca2b6 100644
--- a/dbus/Makefile.am
+++ b/dbus/Makefile.am
@@ -75,6 +75,12 @@ gf-nautilus-gen.c: org.gnome.Nautilus.FileOperations.xml
--generate-c-code gf-nautilus-gen \
$(srcdir)/org.gnome.Nautilus.FileOperations.xml
+gf-screencast-gen.h:
+gf-screencast-gen.c: org.gnome.Shell.Screencast.xml
+ $(AM_V_GEN) $(GDBUS_CODEGEN) --c-namespace Gf \
+ --generate-c-code gf-screencast-gen \
+ $(srcdir)/org.gnome.Shell.Screencast.xml
+
gf-screensaver-gen.h:
gf-screensaver-gen.c: org.gnome.ScreenSaver.xml
$(AM_V_GEN) $(GDBUS_CODEGEN) --c-namespace Gf \
@@ -122,6 +128,8 @@ BUILT_SOURCES = \
gf-login-session-gen.h \
gf-nautilus-gen.c \
gf-nautilus-gen.h \
+ gf-screencast-gen.c \
+ gf-screencast-gen.h \
gf-screensaver-gen.c \
gf-screensaver-gen.h \
gf-screenshot-gen.c \
@@ -145,6 +153,7 @@ EXTRA_DIST = \
org.gnome.Nautilus.FileOperations.xml \
org.gnome.ScreenSaver.xml \
org.gnome.SessionManager.Presence.xml \
+ org.gnome.Shell.Screencast.xml \
org.gnome.Shell.Screenshot.xml \
org.gnome.Shell.xml \
org.kde.StatusNotifierWatcher.xml \
diff --git a/gnome-flashback/libscreencast/org.gnome.Shell.Screencast.xml
b/dbus/org.gnome.Shell.Screencast.xml
similarity index 93%
rename from gnome-flashback/libscreencast/org.gnome.Shell.Screencast.xml
rename to dbus/org.gnome.Shell.Screencast.xml
index f188cf7..38e5888 100644
--- a/gnome-flashback/libscreencast/org.gnome.Shell.Screencast.xml
+++ b/dbus/org.gnome.Shell.Screencast.xml
@@ -1,15 +1,9 @@
-<!DOCTYPE node PUBLIC
-'-//freedesktop//DTD D-BUS Object Introspection 1.0//EN'
-'http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd'>
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
-
- <!--
- org.gnome.Shell.Screencast:
- @short_description: Screencast interface
-
- The interface used to record screen contents.
- -->
<interface name="org.gnome.Shell.Screencast">
+ <annotation name="org.gtk.GDBus.C.Name" value="ScreencastGen" />
<!--
Screencast:
diff --git a/gnome-flashback/libscreencast/Makefile.am b/gnome-flashback/libscreencast/Makefile.am
index 132e778..5000a0b 100644
--- a/gnome-flashback/libscreencast/Makefile.am
+++ b/gnome-flashback/libscreencast/Makefile.am
@@ -7,19 +7,19 @@ noinst_LTLIBRARIES = \
libscreencast_la_CPPFLAGS = \
-DG_LOG_DOMAIN=\"screencast\" \
-DG_LOG_USE_STRUCTURED=1 \
+ -I$(top_srcdir) \
+ $(AM_CPPFLAGS) \
$(NULL)
libscreencast_la_CFLAGS = \
$(SCREENCAST_CFLAGS) \
$(WARN_CFLAGS) \
$(AM_CFLAGS) \
- -I$(top_builddir)/gnome-flashback/libscreencast \
$(NULL)
libscreencast_la_SOURCES = \
gf-screencast.c \
gf-screencast.h \
- $(BUILT_SOURCES)
$(NULL)
libscreencast_la_LDFLAGS = \
@@ -28,30 +28,8 @@ libscreencast_la_LDFLAGS = \
$(NULL)
libscreencast_la_LIBADD = \
+ $(top_builddir)/dbus/libdbus.la \
$(SCREENCAST_LIBS) \
$(NULL)
-gf-dbus-screencast.h:
-gf-dbus-screencast.c: org.gnome.Shell.Screencast.xml
- $(AM_V_GEN) gdbus-codegen \
- --interface-prefix org.gnome.Shell. \
- --c-namespace Gf \
- --generate-c-code gf-dbus-screencast \
- --annotate "org.gnome.Shell.Screencast" \
- "org.gtk.GDBus.C.Name" DBusScreencast \
- $(srcdir)/org.gnome.Shell.Screencast.xml
-
-BUILT_SOURCES = \
- gf-dbus-screencast.c \
- gf-dbus-screencast.h \
- $(NULL)
-
-EXTRA_DIST = \
- org.gnome.Shell.Screencast.xml \
- $(NULL)
-
-CLEANFILES = \
- $(BUILT_SOURCES) \
- $(NULL)
-
-include $(top_srcdir)/git.mk
diff --git a/gnome-flashback/libscreencast/gf-screencast.c b/gnome-flashback/libscreencast/gf-screencast.c
index 4d15f5f..94802ae 100644
--- a/gnome-flashback/libscreencast/gf-screencast.c
+++ b/gnome-flashback/libscreencast/gf-screencast.c
@@ -16,11 +16,11 @@
*/
#include "config.h"
+#include "gf-screencast.h"
#include <gtk/gtk.h>
-#include "gf-dbus-screencast.h"
-#include "gf-screencast.h"
+#include "dbus/gf-screencast-gen.h"
#define SCREENCAST_DBUS_NAME "org.gnome.Shell.Screencast"
#define SCREENCAST_DBUS_PATH "/org/gnome/Shell/Screencast"
@@ -36,21 +36,21 @@ struct _GfScreencast
G_DEFINE_TYPE (GfScreencast, gf_screencast, G_TYPE_OBJECT)
static gboolean
-handle_screencast (GfDBusScreencast *dbus_screencast,
+handle_screencast (GfScreencastGen *screencast_gen,
GDBusMethodInvocation *invocation,
const gchar *file_template,
GVariant *options,
gpointer user_data)
{
g_warning ("screencast: screencast");
- gf_dbus_screencast_complete_screencast (dbus_screencast, invocation,
- FALSE, "");
+ gf_screencast_gen_complete_screencast (screencast_gen, invocation,
+ FALSE, "");
return TRUE;
}
static gboolean
-handle_screencast_area (GfDBusScreencast *dbus_screencast,
+handle_screencast_area (GfScreencastGen *screencast_gen,
GDBusMethodInvocation *invocation,
gint x,
gint y,
@@ -61,20 +61,19 @@ handle_screencast_area (GfDBusScreencast *dbus_screencast,
gpointer user_data)
{
g_warning ("screencast: screencast-area");
- gf_dbus_screencast_complete_screencast_area (dbus_screencast, invocation,
- FALSE, "");
+ gf_screencast_gen_complete_screencast_area (screencast_gen, invocation,
+ FALSE, "");
return TRUE;
}
static gboolean
-handle_stop_screencast (GfDBusScreencast *dbus_screencast,
+handle_stop_screencast (GfScreencastGen *screencast_gen,
GDBusMethodInvocation *invocation,
gpointer user_data)
{
g_warning ("screencast: stop-screencast");
- gf_dbus_screencast_complete_stop_screencast (dbus_screencast, invocation,
- TRUE);
+ gf_screencast_gen_complete_stop_screencast (screencast_gen, invocation, TRUE);
return TRUE;
}
@@ -86,11 +85,11 @@ name_appeared_handler (GDBusConnection *connection,
gpointer user_data)
{
GfScreencast *screencast;
- GfDBusScreencast *skeleton;
+ GfScreencastGen *skeleton;
GError *error;
screencast = GF_SCREENCAST (user_data);
- skeleton = gf_dbus_screencast_skeleton_new ();
+ skeleton = gf_screencast_gen_skeleton_new ();
g_signal_connect (skeleton, "handle-screencast",
G_CALLBACK (handle_screencast), screencast);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]