[gnome-flashback] shell: add osd (not implemented yet)



commit cf894d6201bdc277e9f581f55e33a905db950226
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Fri Mar 27 07:16:57 2015 +0200

    shell: add osd (not implemented yet)

 gnome-flashback/libshell/Makefile.am       |    2 +
 gnome-flashback/libshell/flashback-osd.c   |   49 ++++++++++++++++++++++++++++
 gnome-flashback/libshell/flashback-osd.h   |   35 ++++++++++++++++++++
 gnome-flashback/libshell/flashback-shell.c |   14 +++++++-
 4 files changed, 99 insertions(+), 1 deletions(-)
---
diff --git a/gnome-flashback/libshell/Makefile.am b/gnome-flashback/libshell/Makefile.am
index ff4daf2..74449d4 100644
--- a/gnome-flashback/libshell/Makefile.am
+++ b/gnome-flashback/libshell/Makefile.am
@@ -12,6 +12,8 @@ libshell_la_SOURCES = \
        flashback-key-bindings.h \
        flashback-monitor-labeler.c \
        flashback-monitor-labeler.h \
+       flashback-osd.c \
+       flashback-osd.h \
        flashback-shell.c \
        flashback-shell.h
 
diff --git a/gnome-flashback/libshell/flashback-osd.c b/gnome-flashback/libshell/flashback-osd.c
new file mode 100644
index 0000000..bb2aedc
--- /dev/null
+++ b/gnome-flashback/libshell/flashback-osd.c
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2015 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/>.
+ */
+
+#include <config.h>
+#include "flashback-osd.h"
+
+struct _FlashbackOsd
+{
+  GObject parent;
+};
+
+G_DEFINE_TYPE (FlashbackOsd, flashback_osd, G_TYPE_OBJECT)
+
+static void
+flashback_osd_class_init (FlashbackOsdClass *osd_class)
+{
+}
+
+static void
+flashback_osd_init (FlashbackOsd *osd)
+{
+}
+
+FlashbackOsd *
+flashback_osd_new (void)
+{
+  return g_object_new (FLASHBACK_TYPE_OSD, NULL);
+}
+
+void
+flashback_osd_show (FlashbackOsd *osd,
+                    GVariant     *params)
+{
+  g_warning ("shell: show osd");
+}
diff --git a/gnome-flashback/libshell/flashback-osd.h b/gnome-flashback/libshell/flashback-osd.h
new file mode 100644
index 0000000..ffa3dba
--- /dev/null
+++ b/gnome-flashback/libshell/flashback-osd.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2015 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/>.
+ */
+
+#ifndef FLASHBACK_OSD_H
+#define FLASHBACK_OSD_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define FLASHBACK_TYPE_OSD flashback_osd_get_type ()
+G_DECLARE_FINAL_TYPE (FlashbackOsd, flashback_osd, FLASHBACK, OSD, GObject)
+
+FlashbackOsd *flashback_osd_new  (void);
+
+void          flashback_osd_show (FlashbackOsd *osd,
+                                  GVariant     *params);
+
+G_END_DECLS
+
+#endif
diff --git a/gnome-flashback/libshell/flashback-shell.c b/gnome-flashback/libshell/flashback-shell.c
index 21519cf..8106fa1 100644
--- a/gnome-flashback/libshell/flashback-shell.c
+++ b/gnome-flashback/libshell/flashback-shell.c
@@ -20,6 +20,7 @@
 #include "flashback-dbus-shell.h"
 #include "flashback-key-bindings.h"
 #include "flashback-monitor-labeler.h"
+#include "flashback-osd.h"
 #include "flashback-shell.h"
 
 #define SHELL_DBUS_NAME "org.gnome.Shell"
@@ -45,6 +46,9 @@ struct _FlashbackShell
 
   /* monitor labeler */
   FlashbackMonitorLabeler *labeler;
+
+  /* osd */
+  FlashbackOsd            *osd;
 };
 
 G_DEFINE_TYPE (FlashbackShell, flashback_shell, G_TYPE_OBJECT)
@@ -176,6 +180,12 @@ handle_show_osd (FlashbackDBusShell    *dbus_shell,
                  GVariant              *params,
                  gpointer               user_data)
 {
+  FlashbackShell *shell;
+
+  shell = FLASHBACK_SHELL (user_data);
+
+  flashback_osd_show (shell->osd, params);
+
   flashback_dbus_shell_complete_show_osd (dbus_shell, invocation);
 
   return TRUE;
@@ -193,7 +203,7 @@ handle_show_monitor_labels (FlashbackDBusShell    *dbus_shell,
   shell = FLASHBACK_SHELL (user_data);
   sender = g_dbus_method_invocation_get_sender (invocation);
 
-  flashback_monitor_labeler_show (shell->labeler, params, sender);
+  flashback_monitor_labeler_show (shell->labeler, sender, params);
 
   flashback_dbus_shell_complete_show_monitor_labels (dbus_shell, invocation);
 
@@ -405,6 +415,7 @@ flashback_shell_finalize (GObject *object)
 
   g_clear_object (&shell->bindings);
   g_clear_object (&shell->labeler);
+  g_clear_object (&shell->osd);
 
   G_OBJECT_CLASS (flashback_shell_parent_class)->finalize (object);
 }
@@ -430,6 +441,7 @@ flashback_shell_init (FlashbackShell *shell)
                     G_CALLBACK (binding_activated), shell);
 
   shell->labeler = flashback_monitor_labeler_new ();
+  shell->osd = flashback_osd_new ();
 
   shell->bus_name = g_bus_watch_name (G_BUS_TYPE_SESSION,
                                       SHELL_DBUS_NAME,


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