[PATCH v3 5/9] widget: make gl-scanout and update-monitor-area privately exported

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

 



The following changes will call these functions from spice-widget-egl.c

Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxx>
Acked-by: Pavel Grunt <pgrunt@xxxxxxxxxx>
---
 src/spice-widget-priv.h |  3 +++
 src/spice-widget.c      | 17 +++++++++++------
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/spice-widget-priv.h b/src/spice-widget-priv.h
index bafeb7d..95bca8a 100644
--- a/src/spice-widget-priv.h
+++ b/src/spice-widget-priv.h
@@ -163,6 +163,9 @@ gboolean spice_egl_update_scanout            (SpiceDisplay *display,
                                               GError **err);
 void     spice_egl_cursor_set                (SpiceDisplay *display);
 
+void     spice_display_widget_gl_scanout     (SpiceDisplay *display);
+void     spice_display_widget_update_monitor_area(SpiceDisplay *display);
+
 G_END_DECLS
 
 #endif
diff --git a/src/spice-widget.c b/src/spice-widget.c
index a820ed2..b75bcd7 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -262,7 +262,8 @@ static void set_monitor_ready(SpiceDisplay *self, gboolean ready)
     update_ready(self);
 }
 
-static void update_monitor_area(SpiceDisplay *display)
+G_GNUC_INTERNAL
+void spice_display_widget_update_monitor_area(SpiceDisplay *display)
 {
     SpiceDisplayPrivate *d = display->priv;
     SpiceDisplayMonitorConfig *cfg, *c = NULL;
@@ -337,7 +338,7 @@ static void spice_display_set_property(GObject      *object,
     case PROP_MONITOR_ID:
         d->monitor_id = g_value_get_int(value);
         if (d->display) /* if constructed */
-            update_monitor_area(display);
+            spice_display_widget_update_monitor_area(display);
         break;
     case PROP_KEYBOARD_GRAB:
         d->keyboard_grab_enable = g_value_get_boolean(value);
@@ -2228,7 +2229,7 @@ static void primary_create(SpiceChannel *channel, gint format,
     d->height = height;
     d->data_origin = d->data = imgdata;
 
-    update_monitor_area(display);
+    spice_display_widget_update_monitor_area(display);
 }
 
 static void primary_destroy(SpiceChannel *channel, gpointer data)
@@ -2494,7 +2495,8 @@ static void cursor_reset(SpiceCursorChannel *channel, gpointer data)
 }
 
 #ifndef G_OS_WIN32
-static void gl_scanout(SpiceDisplay *display)
+G_GNUC_INTERNAL
+void spice_display_widget_gl_scanout(SpiceDisplay *display)
 {
     SpiceDisplayPrivate *d = display->priv;
     const SpiceGlScanout *scanout;
@@ -2570,15 +2572,18 @@ static void channel_new(SpiceSession *s, SpiceChannel *channel, gpointer data)
         spice_g_signal_connect_object(channel, "display-mark",
                                       G_CALLBACK(mark), display, G_CONNECT_AFTER | G_CONNECT_SWAPPED);
         spice_g_signal_connect_object(channel, "notify::monitors",
-                                      G_CALLBACK(update_monitor_area), display, G_CONNECT_AFTER | G_CONNECT_SWAPPED);
+                                      G_CALLBACK(spice_display_widget_update_monitor_area),
+                                      display, G_CONNECT_AFTER | G_CONNECT_SWAPPED);
         if (spice_display_get_primary(channel, 0, &primary)) {
             primary_create(channel, primary.format, primary.width, primary.height,
                            primary.stride, primary.shmid, primary.data, display);
             mark(display, primary.marked);
         }
+
 #ifndef G_OS_WIN32
         spice_g_signal_connect_object(channel, "notify::gl-scanout",
-                                      G_CALLBACK(gl_scanout), display, G_CONNECT_SWAPPED);
+                                      G_CALLBACK(spice_display_widget_gl_scanout),
+                                      display, G_CONNECT_SWAPPED);
         spice_g_signal_connect_object(channel, "gl-draw",
                                       G_CALLBACK(gl_draw), display, G_CONNECT_SWAPPED);
 #endif
-- 
2.5.5

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]