[gtk/wip.win32.fixes: 12/12] demos: Mark non-static signal handler symbols for export




commit bc61506f3e06a604dc9bb846c9a96c618cddef60
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Thu May 6 17:21:46 2021 +0800

    demos: Mark non-static signal handler symbols for export
    
    The symbols in the .ui files for the signal handlers and functions must be
    exported so that the system can pick them up during execution.
    
    Fixes #3918.

 demos/gtk-demo/font_features.c        | 10 +++++-----
 demos/gtk-demo/listview_filebrowser.c | 13 +++++++------
 demos/gtk-demo/shortcuts.c            | 14 +++++++-------
 demos/gtk-demo/spinbutton.c           | 12 ++++++------
 4 files changed, 25 insertions(+), 24 deletions(-)
---
diff --git a/demos/gtk-demo/font_features.c b/demos/gtk-demo/font_features.c
index c8f9ebf62a..4c3af558e7 100644
--- a/demos/gtk-demo/font_features.c
+++ b/demos/gtk-demo/font_features.c
@@ -1136,7 +1136,7 @@ done:
   g_free (design_coords);
 }
 
-void
+G_MODULE_EXPORT void
 font_features_font_changed (void)
 {
   update_script_combo ();
@@ -1144,14 +1144,14 @@ font_features_font_changed (void)
   update_font_variations ();
 }
 
-void
+G_MODULE_EXPORT void
 font_features_script_changed (void)
 {
   update_features ();
   update_display ();
 }
 
-void
+G_MODULE_EXPORT void
 font_features_reset_features (void)
 {
   GList *l;
@@ -1197,7 +1197,7 @@ switch_to_label (void)
   update_display ();
 }
 
-void
+G_MODULE_EXPORT void
 font_features_toggle_edit (void)
 {
   if (strcmp (gtk_stack_get_visible_child_name (GTK_STACK (stack)), "label") == 0)
@@ -1206,7 +1206,7 @@ font_features_toggle_edit (void)
     switch_to_label ();
 }
 
-void
+G_MODULE_EXPORT void
 font_features_stop_edit (void)
 {
   g_signal_emit_by_name (edit_toggle, "clicked");
diff --git a/demos/gtk-demo/listview_filebrowser.c b/demos/gtk-demo/listview_filebrowser.c
index a840950ee8..e73ad41a0d 100644
--- a/demos/gtk-demo/listview_filebrowser.c
+++ b/demos/gtk-demo/listview_filebrowser.c
@@ -34,6 +34,7 @@ enum {
 };
 
 #define FILE_BROWSER_TYPE_VIEW (file_browser_view_get_type ())
+G_MODULE_EXPORT
 G_DECLARE_FINAL_TYPE (FileBrowserView, file_browser_view, FILE_BROWSER, VIEW, GObject);
 
 G_DEFINE_TYPE (FileBrowserView, file_browser_view, G_TYPE_OBJECT);
@@ -159,7 +160,7 @@ static void file_browser_view_init (FileBrowserView *self)
 {
 }
 
-char *
+G_MODULE_EXPORT char *
 filebrowser_get_display_name (GObject *object,
                               GFileInfo *info)
 {
@@ -169,7 +170,7 @@ filebrowser_get_display_name (GObject *object,
   return g_strdup (g_file_info_get_attribute_string (info, "standard::display-name"));
 }
 
-char *
+G_MODULE_EXPORT char *
 filebrowser_get_content_type (GObject *object,
                               GFileInfo *info)
 {
@@ -179,7 +180,7 @@ filebrowser_get_content_type (GObject *object,
   return g_strdup (g_file_info_get_attribute_string (info, "standard::content-type"));
 }
 
-char *
+G_MODULE_EXPORT char *
 filebrowser_get_size (GObject *object,
                       GFileInfo *info)
 {
@@ -189,7 +190,7 @@ filebrowser_get_size (GObject *object,
   return g_format_size (g_file_info_get_attribute_uint64 (info, "standard::size"));
 }
 
-GIcon *
+G_MODULE_EXPORT GIcon *
 filebrowser_get_icon (GObject *object,
                       GFileInfo *info)
 {
@@ -206,7 +207,7 @@ filebrowser_get_icon (GObject *object,
   return icon;
 }
 
-void
+G_MODULE_EXPORT void
 filebrowser_up_clicked_cb (GtkButton        *button,
                            GtkDirectoryList *list)
 {
@@ -219,7 +220,7 @@ filebrowser_up_clicked_cb (GtkButton        *button,
   gtk_directory_list_set_file (list, file);
 }
 
-void
+G_MODULE_EXPORT void
 filebrowser_view_activated_cb (GtkGridView      *view,
                                guint             pos,
                                GtkDirectoryList *list)
diff --git a/demos/gtk-demo/shortcuts.c b/demos/gtk-demo/shortcuts.c
index 7dcfe8fd42..172ef61f43 100644
--- a/demos/gtk-demo/shortcuts.c
+++ b/demos/gtk-demo/shortcuts.c
@@ -25,43 +25,43 @@ show_shortcuts (GtkWidget   *window,
   g_object_unref (builder);
 }
 
-void
+G_MODULE_EXPORT void
 shortcuts_builder_shortcuts (GtkWidget *window)
 {
   show_shortcuts (window, "shortcuts-builder", NULL);
 }
 
-void
+G_MODULE_EXPORT void
 shortcuts_gedit_shortcuts (GtkWidget *window)
 {
   show_shortcuts (window, "shortcuts-gedit", NULL);
 }
 
-void
+G_MODULE_EXPORT void
 shortcuts_clocks_shortcuts (GtkWidget *window)
 {
   show_shortcuts (window, "shortcuts-clocks", NULL);
 }
 
-void
+G_MODULE_EXPORT void
 shortcuts_clocks_shortcuts_stopwatch (GtkWidget *window)
 {
   show_shortcuts (window, "shortcuts-clocks", "stopwatch");
 }
 
-void
+G_MODULE_EXPORT void
 shortcuts_boxes_shortcuts (GtkWidget *window)
 {
   show_shortcuts (window, "shortcuts-boxes", NULL);
 }
 
-void
+G_MODULE_EXPORT void
 shortcuts_boxes_shortcuts_wizard (GtkWidget *window)
 {
   show_shortcuts (window, "shortcuts-boxes", "wizard");
 }
 
-void
+G_MODULE_EXPORT void
 shortcuts_boxes_shortcuts_display (GtkWidget *window)
 {
   show_shortcuts (window, "shortcuts-boxes", "display");
diff --git a/demos/gtk-demo/spinbutton.c b/demos/gtk-demo/spinbutton.c
index fda257af17..44f0cfe880 100644
--- a/demos/gtk-demo/spinbutton.c
+++ b/demos/gtk-demo/spinbutton.c
@@ -12,7 +12,7 @@
 #include <math.h>
 #include <stdlib.h>
 
-int
+G_MODULE_EXPORT int
 spinbutton_hex_spin_input (GtkSpinButton *spin_button,
                            double        *new_val)
 {
@@ -29,7 +29,7 @@ spinbutton_hex_spin_input (GtkSpinButton *spin_button,
     return TRUE;
 }
 
-int
+G_MODULE_EXPORT int
 spinbutton_hex_spin_output (GtkSpinButton *spin_button)
 {
   GtkAdjustment *adjustment;
@@ -49,7 +49,7 @@ spinbutton_hex_spin_output (GtkSpinButton *spin_button)
   return TRUE;
 }
 
-int
+G_MODULE_EXPORT int
 spinbutton_time_spin_input (GtkSpinButton *spin_button,
                             double        *new_val)
 {
@@ -88,7 +88,7 @@ spinbutton_time_spin_input (GtkSpinButton *spin_button,
   return TRUE;
 }
 
-int
+G_MODULE_EXPORT int
 spinbutton_time_spin_output (GtkSpinButton *spin_button)
 {
   GtkAdjustment *adjustment;
@@ -122,7 +122,7 @@ static const char *month[12] = {
   "December"
 };
 
-int
+G_MODULE_EXPORT int
 spinbutton_month_spin_input (GtkSpinButton *spin_button,
                              double        *new_val)
 {
@@ -151,7 +151,7 @@ spinbutton_month_spin_input (GtkSpinButton *spin_button,
   return TRUE;
 }
 
-int
+G_MODULE_EXPORT int
 spinbutton_month_spin_output (GtkSpinButton *spin_button)
 {
   GtkAdjustment *adjustment;


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