[gtkmm/use-dllexport: 7/10] gtk/gtkmm/*.h: Mark classes and APIs with GTKMM_API



commit 7981612ba7730f332d575f138df3f9f122310176
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Jun 5 16:38:13 2020 +0800

    gtk/gtkmm/*.h: Mark classes and APIs with GTKMM_API
    
    This will enable us to use compiler directives, where needed, to export symbols
    from the built shared gtkmm library without extra tools, such as gendef.exe on
    Visual Studio builds.

 gtk/gtkmm/accelerator.h             | 7 +++++++
 gtk/gtkmm/accelkey.h                | 4 +++-
 gtk/gtkmm/cellrenderer_generation.h | 6 +++---
 gtk/gtkmm/listviewtext.h            | 4 ++--
 gtk/gtkmm/object.h                  | 2 +-
 gtk/gtkmm/radiobuttongroup.h        | 6 ++++--
 gtk/gtkmm/treemodelcolumn.h         | 6 +++---
 gtk/gtkmm/treeview_private.h        | 4 ++++
 gtk/gtkmm/wrap_init.h               | 4 +++-
 9 files changed, 30 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtkmm/accelerator.h b/gtk/gtkmm/accelerator.h
index df9d2ef0..6cd1afca 100644
--- a/gtk/gtkmm/accelerator.h
+++ b/gtk/gtkmm/accelerator.h
@@ -17,6 +17,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <gtkmmconfig.h>
+
 #include <glibmm/ustring.h>
 #include <gdkmm/types.h>
 
@@ -45,6 +47,7 @@ namespace Accelerator
    *
    * @return <tt>true</tt> if the accelerator is valid.
    */
+  GTKMM_API
   bool valid(guint keyval, Gdk::ModifierType modifiers);
 
   /** Parses a string representing an accelerator.
@@ -65,6 +68,7 @@ namespace Accelerator
    * @param[out] accelerator_mods Accelerator modifier mask.
    * @return <tt>true</tt> if parsing succeeded.
    */
+  GTKMM_API
   bool parse(const Glib::ustring& accelerator, guint& accelerator_key,
     Gdk::ModifierType& accelerator_mods);
 
@@ -80,6 +84,7 @@ namespace Accelerator
    * @param accelerator_mods Accelerator modifier mask.
    * @return The accelerator name.
    */
+  GTKMM_API
   Glib::ustring name(guint accelerator_key, Gdk::ModifierType accelerator_mods);
   
   /** Converts an accelerator keyval and modifier mask into a string
@@ -89,6 +94,7 @@ namespace Accelerator
    * @param accelerator_mods Accelerator modifier mask.
    * @return A string representing the accelerator.
    */
+  GTKMM_API
   Glib::ustring get_label(guint accelerator_key, Gdk::ModifierType accelerator_mods);
 
   /** Gets the modifier mask.
@@ -99,6 +105,7 @@ namespace Accelerator
    *
    * @return The modifier mask for accelerators
    */
+  GTKMM_API
   Gdk::ModifierType get_default_mod_mask();
 
 } // namespace Accelerator
diff --git a/gtk/gtkmm/accelkey.h b/gtk/gtkmm/accelkey.h
index d3c575b5..95a14225 100644
--- a/gtk/gtkmm/accelkey.h
+++ b/gtk/gtkmm/accelkey.h
@@ -18,6 +18,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <gtkmmconfig.h>
+
 #include <gdk/gdkkeysyms.h>
 #include <gdkmm/types.h>
 
@@ -34,7 +36,7 @@ namespace Gtk
  * @see Gtk::AccelMap
  * @ingroup Menus
  */
-class AccelKey
+class GTKMM_API AccelKey
 {
 public:
   AccelKey();
diff --git a/gtk/gtkmm/cellrenderer_generation.h b/gtk/gtkmm/cellrenderer_generation.h
index fbe00482..a6c80261 100644
--- a/gtk/gtkmm/cellrenderer_generation.h
+++ b/gtk/gtkmm/cellrenderer_generation.h
@@ -48,13 +48,13 @@ CellRenderer* generate_cellrenderer(bool editable = false)
 // gcc 2.95.x fails in TreeView::append_column_editable if the
 // following specializations are declared in the header.
 template<>
-CellRenderer* generate_cellrenderer<bool>(bool editable);
+GTKMM_API CellRenderer* generate_cellrenderer<bool>(bool editable);
 
 template<>
-CellRenderer* generate_cellrenderer< Glib::RefPtr<Gdk::Pixbuf> >(bool editable);
+GTKMM_API CellRenderer* generate_cellrenderer< Glib::RefPtr<Gdk::Pixbuf> >(bool editable);
 
 template<>
-CellRenderer* generate_cellrenderer<AccelKey>(bool editable);
+GTKMM_API CellRenderer* generate_cellrenderer<AccelKey>(bool editable);
 
 #endif
 
diff --git a/gtk/gtkmm/listviewtext.h b/gtk/gtkmm/listviewtext.h
index 6980f45e..172811d7 100644
--- a/gtk/gtkmm/listviewtext.h
+++ b/gtk/gtkmm/listviewtext.h
@@ -38,7 +38,7 @@ namespace Gtk
  *
  * @newin{2,10}
  */
-class ListViewText : public Gtk::TreeView
+class GTKMM_API ListViewText : public Gtk::TreeView
 {
 public:
 
@@ -112,7 +112,7 @@ public:
 
 protected:
 
- class TextModelColumns : public Gtk::TreeModel::ColumnRecord
+ class GTKMM_API TextModelColumns : public Gtk::TreeModel::ColumnRecord
   {
   public:
     TextModelColumns(guint columns_count);
diff --git a/gtk/gtkmm/object.h b/gtk/gtkmm/object.h
index b7653dd3..07571666 100644
--- a/gtk/gtkmm/object.h
+++ b/gtk/gtkmm/object.h
@@ -26,7 +26,7 @@
 namespace Gtk
 {
 
-class Object;
+class GTKMM_API Object;
 
 /** Mark a Gtk::Object as owned by its parent container widget, so you don't need to delete it manually.
  * For instance,
diff --git a/gtk/gtkmm/radiobuttongroup.h b/gtk/gtkmm/radiobuttongroup.h
index af0b3910..2c75079a 100644
--- a/gtk/gtkmm/radiobuttongroup.h
+++ b/gtk/gtkmm/radiobuttongroup.h
@@ -19,6 +19,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <gtkmmconfig.h>
+
 #include <glibmm/object.h> //For Glib::RefPtr<> and std::size_t
 
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -31,7 +33,7 @@ extern "C"
 namespace Gtk
 {
 
-class RadioButton;
+class GTKMM_API RadioButton;
 
 /** RadioButtonGroup, identifier for RadioButtons.
  * To set up this RadioButtonGroup, construct a RadioButtonGroup and then pass it
@@ -39,7 +41,7 @@ class RadioButton;
  * to keep the RadioButtonGroup beyond the initial construction.
  * It should not be instantiated with new, and it will be invalid after the RadioButtons have been deleted.
  */
-class RadioButtonGroup
+class GTKMM_API RadioButtonGroup
 {
 public:
   RadioButtonGroup();
diff --git a/gtk/gtkmm/treemodelcolumn.h b/gtk/gtkmm/treemodelcolumn.h
index e81fc2d0..956aa0af 100644
--- a/gtk/gtkmm/treemodelcolumn.h
+++ b/gtk/gtkmm/treemodelcolumn.h
@@ -26,7 +26,7 @@
 namespace Gtk
 {
 
-class TreeModelColumnBase;
+class GTKMM_API TreeModelColumnBase;
 
 
 /** Typedefed as TreeModel::ColumnRecord.
@@ -67,7 +67,7 @@ class TreeModelColumnBase;
  * sure it's instantiated after Gtk::Main), even when creating multiple models
  * from it.
  */
-class TreeModelColumnRecord
+class GTKMM_API TreeModelColumnRecord
 {
 public:
   TreeModelColumnRecord();
@@ -95,7 +95,7 @@ private:
 /** Base class of TreeModelColumn templates.
  * @ingroup TreeView
  */
-class TreeModelColumnBase
+class GTKMM_API TreeModelColumnBase
 {
 public:
   GType type()  const { return type_;  }
diff --git a/gtk/gtkmm/treeview_private.h b/gtk/gtkmm/treeview_private.h
index 7c2ac637..83e55be3 100644
--- a/gtk/gtkmm/treeview_private.h
+++ b/gtk/gtkmm/treeview_private.h
@@ -32,11 +32,15 @@ namespace Gtk
 namespace TreeView_Private
 {
 
+GTKMM_API
 void SignalProxy_CellData_gtk_callback(GtkTreeViewColumn*, GtkCellRenderer* cell,
                            GtkTreeModel* model, GtkTreeIter* iter, void* data);
+GTKMM_API
 void SignalProxy_CellData_gtk_callback_destroy(void* data);
 
+GTKMM_API
 gboolean SignalProxy_RowSeparator_gtk_callback(GtkTreeModel* model, GtkTreeIter* iter, void* data);
+GTKMM_API
 void SignalProxy_RowSeparator_gtk_callback_destroy(void* data);
 
 
diff --git a/gtk/gtkmm/wrap_init.h b/gtk/gtkmm/wrap_init.h
index a2f66c72..b46427c7 100644
--- a/gtk/gtkmm/wrap_init.h
+++ b/gtk/gtkmm/wrap_init.h
@@ -1,6 +1,8 @@
 #ifndef _GTKMM_WRAP_INIT_H
 #define _GTKMM_WRAP_INIT_H
 
+#include <gtkmmconfig.h>
+
 /* wrap_init.h
  *
  * Copyright (C) 1998-2002 The gtkmm Development Team
@@ -31,7 +33,7 @@ namespace Gtk
 // their .h files have not been moved to the gtk+/gtk/deprecated directory.
 #define GDK_DISABLE_DEPRECATION_WARNINGS 1
 
-void wrap_init();
+GTKMM_API void wrap_init();
 
 } /* namespace Gtk */
 


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