[gnome-flashback] shell: rename FlashbackOsdWindow to GfOsdWindow
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] shell: rename FlashbackOsdWindow to GfOsdWindow
- Date: Tue, 19 Jan 2016 13:19:44 +0000 (UTC)
commit 2795c3c448b0d4cf3ff3f930d40cec10fe008404
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Tue Jan 19 14:37:59 2016 +0200
shell: rename FlashbackOsdWindow to GfOsdWindow
gnome-flashback/libshell/Makefile.am | 8 +-
gnome-flashback/libshell/flashback-osd-window.h | 43 --------------
gnome-flashback/libshell/flashback-osd.c | 30 +++++-----
.../{flashback-osd-window.c => gf-osd-window.c} | 60 ++++++++++----------
gnome-flashback/libshell/gf-osd-window.h | 43 ++++++++++++++
5 files changed, 92 insertions(+), 92 deletions(-)
---
diff --git a/gnome-flashback/libshell/Makefile.am b/gnome-flashback/libshell/Makefile.am
index fefc534..dfaa8be 100644
--- a/gnome-flashback/libshell/Makefile.am
+++ b/gnome-flashback/libshell/Makefile.am
@@ -17,16 +17,16 @@ libshell_la_CFLAGS = \
libshell_la_SOURCES = \
flashback-dbus-shell.c \
flashback-dbus-shell.h \
- gf-label-window.c \
- gf-label-window.h \
flashback-monitor-labeler.c \
flashback-monitor-labeler.h \
flashback-osd.c \
flashback-osd.h \
- flashback-osd-window.c \
- flashback-osd-window.h \
flashback-shell.c \
flashback-shell.h \
+ gf-label-window.c \
+ gf-label-window.h \
+ gf-osd-window.c \
+ gf-osd-window.h \
$(NULL)
libshell_la_LDFLAGS = \
diff --git a/gnome-flashback/libshell/flashback-osd.c b/gnome-flashback/libshell/flashback-osd.c
index e60a12b..086be08 100644
--- a/gnome-flashback/libshell/flashback-osd.c
+++ b/gnome-flashback/libshell/flashback-osd.c
@@ -17,14 +17,14 @@
#include <config.h>
#include "flashback-osd.h"
-#include "flashback-osd-window.h"
+#include "gf-osd-window.h"
struct _FlashbackOsd
{
- GObject parent;
+ GObject parent;
- FlashbackOsdWindow **windows;
- gint n_monitors;
+ GfOsdWindow **windows;
+ gint n_monitors;
};
G_DEFINE_TYPE (FlashbackOsd, flashback_osd, G_TYPE_OBJECT)
@@ -47,10 +47,10 @@ monitors_changed (GdkScreen *screen,
g_free (osd->windows);
}
- osd->windows = g_new0 (FlashbackOsdWindow *, n_monitors);
+ osd->windows = g_new0 (GfOsdWindow *, n_monitors);
for (i = 0; i < n_monitors; i++)
- osd->windows[i] = flashback_osd_window_new (i);
+ osd->windows[i] = gf_osd_window_new (i);
osd->n_monitors = n_monitors;
}
@@ -134,14 +134,14 @@ flashback_osd_show (FlashbackOsd *osd,
{
if (i == monitor)
{
- flashback_osd_window_set_icon (osd->windows[i], icon);
- flashback_osd_window_set_label (osd->windows[i], label);
- flashback_osd_window_set_level (osd->windows[i], level);
- flashback_osd_window_show (osd->windows[i]);
+ gf_osd_window_set_icon (osd->windows[i], icon);
+ gf_osd_window_set_label (osd->windows[i], label);
+ gf_osd_window_set_level (osd->windows[i], level);
+ gf_osd_window_show (osd->windows[i]);
}
else
{
- flashback_osd_window_hide (osd->windows[i]);
+ gf_osd_window_hide (osd->windows[i]);
}
}
}
@@ -149,10 +149,10 @@ flashback_osd_show (FlashbackOsd *osd,
{
for (i = 0; i < osd->n_monitors; i++)
{
- flashback_osd_window_set_icon (osd->windows[i], icon);
- flashback_osd_window_set_label (osd->windows[i], label);
- flashback_osd_window_set_level (osd->windows[i], level);
- flashback_osd_window_show (osd->windows[i]);
+ gf_osd_window_set_icon (osd->windows[i], icon);
+ gf_osd_window_set_label (osd->windows[i], label);
+ gf_osd_window_set_level (osd->windows[i], level);
+ gf_osd_window_show (osd->windows[i]);
}
}
diff --git a/gnome-flashback/libshell/flashback-osd-window.c b/gnome-flashback/libshell/gf-osd-window.c
similarity index 75%
rename from gnome-flashback/libshell/flashback-osd-window.c
rename to gnome-flashback/libshell/gf-osd-window.c
index 2965baa..40f8179 100644
--- a/gnome-flashback/libshell/flashback-osd-window.c
+++ b/gnome-flashback/libshell/gf-osd-window.c
@@ -18,11 +18,11 @@
#include <config.h>
#include <math.h>
#include <gdk/gdk.h>
-#include "flashback-osd-window.h"
+#include "gf-osd-window.h"
#define HIDE_TIMEOUT 1500
-struct _FlashbackOsdWindow
+struct _GfOsdWindow
{
GfPopupWindow parent;
@@ -38,20 +38,20 @@ struct _FlashbackOsdWindow
GtkWidget *level;
};
-G_DEFINE_TYPE (FlashbackOsdWindow, flashback_osd_window, GF_TYPE_POPUP_WINDOW)
+G_DEFINE_TYPE (GfOsdWindow, gf_osd_window, GF_TYPE_POPUP_WINDOW)
static void
fade_finished_cb (GfPopupWindow *window)
{
- flashback_osd_window_hide (FLASHBACK_OSD_WINDOW (window));
+ gf_osd_window_hide (GF_OSD_WINDOW (window));
}
static gboolean
hide_timeout_cb (gpointer user_data)
{
- FlashbackOsdWindow *window;
+ GfOsdWindow *window;
- window = FLASHBACK_OSD_WINDOW (user_data);
+ window = GF_OSD_WINDOW (user_data);
gf_popup_window_fade_start (GF_POPUP_WINDOW (window));
@@ -61,7 +61,7 @@ hide_timeout_cb (gpointer user_data)
}
static void
-add_hide_timeout (FlashbackOsdWindow *window)
+add_hide_timeout (GfOsdWindow *window)
{
window->hide_timeout_id = g_timeout_add (HIDE_TIMEOUT,
(GSourceFunc) hide_timeout_cb,
@@ -69,7 +69,7 @@ add_hide_timeout (FlashbackOsdWindow *window)
}
static void
-remove_hide_timeout (FlashbackOsdWindow *window)
+remove_hide_timeout (GfOsdWindow *window)
{
if (window->hide_timeout_id > 0)
{
@@ -81,23 +81,23 @@ remove_hide_timeout (FlashbackOsdWindow *window)
}
static void
-flashback_osd_window_finalize (GObject *object)
+gf_osd_window_finalize (GObject *object)
{
- FlashbackOsdWindow *window;
+ GfOsdWindow *window;
- window = FLASHBACK_OSD_WINDOW (object);
+ window = GF_OSD_WINDOW (object);
remove_hide_timeout (window);
- G_OBJECT_CLASS (flashback_osd_window_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gf_osd_window_parent_class)->finalize (object);
}
static void
-flashback_osd_window_realize (GtkWidget *widget)
+gf_osd_window_realize (GtkWidget *widget)
{
cairo_region_t *region;
- GTK_WIDGET_CLASS (flashback_osd_window_parent_class)->realize (widget);
+ GTK_WIDGET_CLASS (gf_osd_window_parent_class)->realize (widget);
region = cairo_region_create ();
gtk_widget_input_shape_combine_region (widget, region);
@@ -105,7 +105,7 @@ flashback_osd_window_realize (GtkWidget *widget)
}
static void
-flashback_osd_window_class_init (FlashbackOsdWindowClass *window_class)
+gf_osd_window_class_init (GfOsdWindowClass *window_class)
{
GObjectClass *object_class;
GtkWidgetClass *widget_class;
@@ -113,13 +113,13 @@ flashback_osd_window_class_init (FlashbackOsdWindowClass *window_class)
object_class = G_OBJECT_CLASS (window_class);
widget_class = GTK_WIDGET_CLASS (window_class);
- object_class->finalize = flashback_osd_window_finalize;
+ object_class->finalize = gf_osd_window_finalize;
- widget_class->realize = flashback_osd_window_realize;
+ widget_class->realize = gf_osd_window_realize;
}
static void
-flashback_osd_window_init (FlashbackOsdWindow *window)
+gf_osd_window_init (GfOsdWindow *window)
{
GtkWidget *box;
@@ -145,17 +145,17 @@ flashback_osd_window_init (FlashbackOsdWindow *window)
G_CALLBACK (fade_finished_cb), NULL);
}
-FlashbackOsdWindow *
-flashback_osd_window_new (gint monitor)
+GfOsdWindow *
+gf_osd_window_new (gint monitor)
{
- FlashbackOsdWindow *window;
+ GfOsdWindow *window;
GdkScreen *screen;
gint width;
gint height;
gint size;
screen = gdk_screen_get_default ();
- window = g_object_new (FLASHBACK_TYPE_OSD_WINDOW,
+ window = g_object_new (GF_TYPE_OSD_WINDOW,
"type", GTK_WINDOW_POPUP,
NULL);
@@ -173,8 +173,8 @@ flashback_osd_window_new (gint monitor)
}
void
-flashback_osd_window_set_icon (FlashbackOsdWindow *window,
- GIcon *icon)
+gf_osd_window_set_icon (GfOsdWindow *window,
+ GIcon *icon)
{
if (icon == NULL)
{
@@ -190,8 +190,8 @@ flashback_osd_window_set_icon (FlashbackOsdWindow *window,
}
void
-flashback_osd_window_set_label (FlashbackOsdWindow *window,
- const gchar *label)
+gf_osd_window_set_label (GfOsdWindow *window,
+ const gchar *label)
{
if (label == NULL)
{
@@ -204,8 +204,8 @@ flashback_osd_window_set_label (FlashbackOsdWindow *window,
}
void
-flashback_osd_window_set_level (FlashbackOsdWindow *window,
- gint level)
+gf_osd_window_set_level (GfOsdWindow *window,
+ gint level)
{
if (level == -1)
{
@@ -219,7 +219,7 @@ flashback_osd_window_set_level (FlashbackOsdWindow *window,
}
void
-flashback_osd_window_show (FlashbackOsdWindow *window)
+gf_osd_window_show (GfOsdWindow *window)
{
gint width;
gint height;
@@ -240,7 +240,7 @@ flashback_osd_window_show (FlashbackOsdWindow *window)
}
void
-flashback_osd_window_hide (FlashbackOsdWindow *window)
+gf_osd_window_hide (GfOsdWindow *window)
{
gtk_widget_hide (GTK_WIDGET (window));
remove_hide_timeout (window);
diff --git a/gnome-flashback/libshell/gf-osd-window.h b/gnome-flashback/libshell/gf-osd-window.h
new file mode 100644
index 0000000..1443d74
--- /dev/null
+++ b/gnome-flashback/libshell/gf-osd-window.h
@@ -0,0 +1,43 @@
+/*
+ * 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 GF_OSD_WINDOW_H
+#define GF_OSD_WINDOW_H
+
+#include <libcommon/gf-popup-window.h>
+
+G_BEGIN_DECLS
+
+#define GF_TYPE_OSD_WINDOW gf_osd_window_get_type ()
+G_DECLARE_FINAL_TYPE (GfOsdWindow, gf_osd_window,
+ GF, OSD_WINDOW, GfPopupWindow)
+
+GfOsdWindow *gf_osd_window_new (gint monitor);
+
+void gf_osd_window_set_icon (GfOsdWindow *window,
+ GIcon *icon);
+void gf_osd_window_set_label (GfOsdWindow *window,
+ const gchar *label);
+void gf_osd_window_set_level (GfOsdWindow *window,
+ gint level);
+
+void gf_osd_window_show (GfOsdWindow *window);
+void gf_osd_window_hide (GfOsdWindow *window);
+
+G_END_DECLS
+
+#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]