[gnome-flashback] screenshot: rename FlashbackSelectArea to GfSelectArea



commit b93c30b430edd3298625caf3e87dde23e35287c0
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Sep 10 11:53:25 2015 +0300

    screenshot: rename FlashbackSelectArea to GfSelectArea

 gnome-flashback/libscreenshot/Makefile.am          |    4 +-
 gnome-flashback/libscreenshot/gf-screenshot.c      |    8 ++--
 .../{flashback-select-area.c => gf-select-area.c}  |   54 ++++++++++----------
 .../{flashback-select-area.h => gf-select-area.h}  |   21 ++++----
 4 files changed, 43 insertions(+), 44 deletions(-)
---
diff --git a/gnome-flashback/libscreenshot/Makefile.am b/gnome-flashback/libscreenshot/Makefile.am
index abe651d..150fed2 100644
--- a/gnome-flashback/libscreenshot/Makefile.am
+++ b/gnome-flashback/libscreenshot/Makefile.am
@@ -16,8 +16,8 @@ libscreenshot_la_SOURCES = \
        flashback-dbus-screenshot.h \
        gf-screenshot.c \
        gf-screenshot.h \
-       flashback-select-area.c \
-       flashback-select-area.h \
+       gf-select-area.c \
+       gf-select-area.h \
        $(NULL)
 
 libscreenshot_la_LDFLAGS = \
diff --git a/gnome-flashback/libscreenshot/gf-screenshot.c b/gnome-flashback/libscreenshot/gf-screenshot.c
index 49d064c..1acb0b1 100644
--- a/gnome-flashback/libscreenshot/gf-screenshot.c
+++ b/gnome-flashback/libscreenshot/gf-screenshot.c
@@ -21,7 +21,7 @@
 
 #include "flashback-dbus-screenshot.h"
 #include "gf-screenshot.h"
-#include "flashback-select-area.h"
+#include "gf-select-area.h"
 
 #define SCREENSHOT_DBUS_NAME "org.gnome.Shell.Screenshot"
 #define SCREENSHOT_DBUS_PATH "/org/gnome/Shell/Screenshot"
@@ -105,16 +105,16 @@ handle_select_area (FlashbackDBusScreenshot *dbus_screenshot,
                     GDBusMethodInvocation   *invocation,
                     gpointer                 user_data)
 {
-  FlashbackSelectArea *select_area;
+  GfSelectArea *select_area;
   gint x;
   gint y;
   gint width;
   gint height;
 
-  select_area = flashback_select_area_new ();
+  select_area = gf_select_area_new ();
   x = y = width = height = 0;
 
-  if (flashback_select_area_select (select_area, &x, &y, &width, &height))
+  if (gf_select_area_select (select_area, &x, &y, &width, &height))
     {
       flashback_dbus_screenshot_complete_select_area (dbus_screenshot,
                                                       invocation,
diff --git a/gnome-flashback/libscreenshot/flashback-select-area.c 
b/gnome-flashback/libscreenshot/gf-select-area.c
similarity index 85%
rename from gnome-flashback/libscreenshot/flashback-select-area.c
rename to gnome-flashback/libscreenshot/gf-select-area.c
index dc7bb1e..c3152ca 100644
--- a/gnome-flashback/libscreenshot/flashback-select-area.c
+++ b/gnome-flashback/libscreenshot/gf-select-area.c
@@ -23,9 +23,9 @@
 
 #include <gtk/gtk.h>
 
-#include "flashback-select-area.h"
+#include "gf-select-area.h"
 
-struct _FlashbackSelectArea
+struct _GfSelectArea
 {
   GObject    parent;
 
@@ -41,19 +41,19 @@ struct _FlashbackSelectArea
   gint       height;
 };
 
-G_DEFINE_TYPE (FlashbackSelectArea, flashback_select_area, G_TYPE_OBJECT)
+G_DEFINE_TYPE (GfSelectArea, gf_select_area, G_TYPE_OBJECT)
 
 static gboolean
 draw_cb (GtkWidget *widget,
          cairo_t   *cr,
          gpointer   user_data)
 {
-  FlashbackSelectArea *select_area;
+  GfSelectArea *select_area;
   GtkStyleContext *context;
   gint width;
   gint height;
 
-  select_area = FLASHBACK_SELECT_AREA (user_data);
+  select_area = GF_SELECT_AREA (user_data);
 
   if (select_area->composited == FALSE)
     return TRUE;
@@ -93,9 +93,9 @@ button_press_event_cb (GtkWidget      *widget,
                        GdkEventButton *event,
                        gpointer        user_data)
 {
-  FlashbackSelectArea *select_area;
+  GfSelectArea *select_area;
 
-  select_area = FLASHBACK_SELECT_AREA (user_data);
+  select_area = GF_SELECT_AREA (user_data);
 
   if (select_area->selecting)
     return TRUE;
@@ -112,9 +112,9 @@ button_release_event_cb (GtkWidget      *widget,
                          GdkEventButton *event,
                          gpointer        user_data)
 {
-  FlashbackSelectArea *select_area;
+  GfSelectArea *select_area;
 
-  select_area = FLASHBACK_SELECT_AREA (user_data);
+  select_area = GF_SELECT_AREA (user_data);
 
   select_area->width = ABS (select_area->x - event->x_root);
   select_area->height = ABS (select_area->y - event->y_root);
@@ -134,14 +134,14 @@ motion_notify_event_cb (GtkWidget      *widget,
                         GdkEventMotion *event,
                         gpointer        user_data)
 {
-  FlashbackSelectArea *select_area;
+  GfSelectArea *select_area;
   gint x;
   gint y;
   gint width;
   gint height;
   GtkWindow *window;
 
-  select_area = FLASHBACK_SELECT_AREA (user_data);
+  select_area = GF_SELECT_AREA (user_data);
 
   if (select_area->selecting == FALSE)
     return TRUE;
@@ -202,7 +202,7 @@ motion_notify_event_cb (GtkWidget      *widget,
 }
 
 static void
-setup_window (FlashbackSelectArea *select_area)
+setup_window (GfSelectArea *select_area)
 {
   GdkScreen *screen;
   GdkVisual *visual;
@@ -236,11 +236,11 @@ setup_window (FlashbackSelectArea *select_area)
 }
 
 static void
-flashback_select_area_dispose (GObject *object)
+gf_select_area_dispose (GObject *object)
 {
-  FlashbackSelectArea *select_area;
+  GfSelectArea *select_area;
 
-  select_area = FLASHBACK_SELECT_AREA (object);
+  select_area = GF_SELECT_AREA (object);
 
   if (select_area->window != NULL)
     {
@@ -248,37 +248,37 @@ flashback_select_area_dispose (GObject *object)
       select_area->window = NULL;
     }
 
-  G_OBJECT_CLASS (flashback_select_area_parent_class)->dispose (object);
+  G_OBJECT_CLASS (gf_select_area_parent_class)->dispose (object);
 }
 
 static void
-flashback_select_area_class_init (FlashbackSelectAreaClass *select_area_class)
+gf_select_area_class_init (GfSelectAreaClass *select_area_class)
 {
   GObjectClass *object_class;
 
   object_class = G_OBJECT_CLASS (select_area_class);
 
-  object_class->dispose = flashback_select_area_dispose;
+  object_class->dispose = gf_select_area_dispose;
 }
 
 static void
-flashback_select_area_init (FlashbackSelectArea *select_area)
+gf_select_area_init (GfSelectArea *select_area)
 {
   select_area->window = gtk_window_new (GTK_WINDOW_POPUP);
 }
 
-FlashbackSelectArea *
-flashback_select_area_new (void)
+GfSelectArea *
+gf_select_area_new (void)
 {
-  return g_object_new (FLASHBACK_TYPE_SELECT_AREA, NULL);
+  return g_object_new (GF_TYPE_SELECT_AREA, NULL);
 }
 
 gboolean
-flashback_select_area_select (FlashbackSelectArea *select_area,
-                              gint                *x,
-                              gint                *y,
-                              gint                *width,
-                              gint                *height)
+gf_select_area_select (GfSelectArea *select_area,
+                       gint         *x,
+                       gint         *y,
+                       gint         *width,
+                       gint         *height)
 {
   GdkDisplay *display;
   GdkCursor *cursor;
diff --git a/gnome-flashback/libscreenshot/flashback-select-area.h 
b/gnome-flashback/libscreenshot/gf-select-area.h
similarity index 51%
rename from gnome-flashback/libscreenshot/flashback-select-area.h
rename to gnome-flashback/libscreenshot/gf-select-area.h
index 40669a2..7bf3005 100644
--- a/gnome-flashback/libscreenshot/flashback-select-area.h
+++ b/gnome-flashback/libscreenshot/gf-select-area.h
@@ -15,24 +15,23 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef FLASHBACK_SELECT_AREA_H
-#define FLASHBACK_SELECT_AREA_H
+#ifndef GF_SELECT_AREA_H
+#define GF_SELECT_AREA_H
 
 #include <glib-object.h>
 
 G_BEGIN_DECLS
 
-#define FLASHBACK_TYPE_SELECT_AREA flashback_select_area_get_type ()
-G_DECLARE_FINAL_TYPE (FlashbackSelectArea, flashback_select_area,
-                      FLASHBACK, SELECT_AREA, GObject)
+#define GF_TYPE_SELECT_AREA gf_select_area_get_type ()
+G_DECLARE_FINAL_TYPE (GfSelectArea, gf_select_area, GF, SELECT_AREA, GObject)
 
-FlashbackSelectArea *flashback_select_area_new    (void);
+GfSelectArea *gf_select_area_new    (void);
 
-gboolean             flashback_select_area_select (FlashbackSelectArea *select_area,
-                                                   gint                *x,
-                                                   gint                *y,
-                                                   gint                *width,
-                                                   gint                *height);
+gboolean      gf_select_area_select (GfSelectArea *select_area,
+                                     gint         *x,
+                                     gint         *y,
+                                     gint         *width,
+                                     gint         *height);
 
 G_END_DECLS
 


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