diff options
Diffstat (limited to 'libs/gtkmm2ext')
51 files changed, 419 insertions, 273 deletions
diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc index d9e4c871a6..fc94657f6d 100644 --- a/libs/gtkmm2ext/gtk_ui.cc +++ b/libs/gtkmm2ext/gtk_ui.cc @@ -43,6 +43,7 @@ #include "gtkmm2ext/actions.h" #include "gtkmm2ext/activatable.h" #include "gtkmm2ext/actions.h" +#include "gtkmm2ext/gui_thread.h" #include "i18n.h" diff --git a/libs/gtkmm2ext/gtkmm2ext/actions.h b/libs/gtkmm2ext/gtkmm2ext/actions.h index 9101f8ea92..d92f85bb6e 100644 --- a/libs/gtkmm2ext/gtkmm2ext/actions.h +++ b/libs/gtkmm2ext/gtkmm2ext/actions.h @@ -28,67 +28,69 @@ #include <gtkmm/actiongroup.h> #include <gtkmm/accelkey.h> +#include "gtkmm2ext/visibility.h" + namespace Gtk { class UIManager; } namespace ActionManager { - extern std::string unbound_string; /* the key string returned if an action is not bound */ - extern Glib::RefPtr<Gtk::UIManager> ui_manager; + LIBGTKMM2EXT_API extern std::string unbound_string; /* the key string returned if an action is not bound */ + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::UIManager> ui_manager; - extern void set_sensitive (std::vector<Glib::RefPtr<Gtk::Action> >& actions, bool); - extern std::string get_key_representation (const std::string& accel_path, Gtk::AccelKey& key); + LIBGTKMM2EXT_API extern void set_sensitive (std::vector<Glib::RefPtr<Gtk::Action> >& actions, bool); + LIBGTKMM2EXT_API extern std::string get_key_representation (const std::string& accel_path, Gtk::AccelKey& key); - extern Gtk::Widget* get_widget (const char * name); - extern Glib::RefPtr<Gtk::Action> get_action (const char* group, const char* name); - extern Glib::RefPtr<Gtk::Action> get_action (const char* path); - extern Glib::RefPtr<Gtk::Action> get_action_from_name (const char* name); - extern void do_action (const char* group, const char* name); - extern void set_toggle_action (const char* group, const char* name, bool); + LIBGTKMM2EXT_API extern Gtk::Widget* get_widget (const char * name); + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> get_action (const char* group, const char* name); + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> get_action (const char* path); + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> get_action_from_name (const char* name); + LIBGTKMM2EXT_API extern void do_action (const char* group, const char* name); + LIBGTKMM2EXT_API extern void set_toggle_action (const char* group, const char* name, bool); - extern void add_action_group (Glib::RefPtr<Gtk::ActionGroup>); + LIBGTKMM2EXT_API extern void add_action_group (Glib::RefPtr<Gtk::ActionGroup>); - extern Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group, + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group, const char * name, const char * label); - extern Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group, + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group, const char * name, const char * label, sigc::slot<void> sl, guint key, Gdk::ModifierType mods); - extern Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group, + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group, const char * name, const char * label, sigc::slot<void> sl); - extern Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group&, + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group&, const char * name, const char * label, sigc::slot<void> sl, guint key, Gdk::ModifierType mods); - extern Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group&, + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group&, const char * name, const char * label, sigc::slot<void> sl); - extern Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group&, + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group&, std::string const &, std::string const &, std::string const &, sigc::slot<void> sl); - extern Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group, + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group, const char * name, const char * label, sigc::slot<void> sl, guint key, Gdk::ModifierType mods); - extern Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group, + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group, std::string const &, std::string const &, std::string const &, sigc::slot<void> sl); - extern Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group, + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group, const char * name, const char * label, sigc::slot<void> sl); - extern bool lookup_entry (const Glib::ustring accel_path, Gtk::AccelKey& key); + LIBGTKMM2EXT_API extern bool lookup_entry (const Glib::ustring accel_path, Gtk::AccelKey& key); - extern void get_all_actions (std::vector<std::string>& names, + LIBGTKMM2EXT_API extern void get_all_actions (std::vector<std::string>& names, std::vector<std::string>& paths, std::vector<std::string>& tooltips, std::vector<std::string>& keys, std::vector<Gtk::AccelKey>& bindings); - extern void get_all_actions (std::vector<std::string>& groups, + LIBGTKMM2EXT_API extern void get_all_actions (std::vector<std::string>& groups, std::vector<std::string>& paths, std::vector<std::string>& tooltips, std::vector<Gtk::AccelKey>& bindings); - extern void check_toggleaction (std::string); - extern void uncheck_toggleaction (std::string); - extern void set_toggleaction_state (std::string, bool); + LIBGTKMM2EXT_API extern void check_toggleaction (std::string); + LIBGTKMM2EXT_API extern void uncheck_toggleaction (std::string); + LIBGTKMM2EXT_API extern void set_toggleaction_state (std::string, bool); }; #endif /* __libgtkmm2ext_actions_h__ */ diff --git a/libs/gtkmm2ext/gtkmm2ext/activatable.h b/libs/gtkmm2ext/gtkmm2ext/activatable.h index f8e2b5dd38..b9828d36cf 100644 --- a/libs/gtkmm2ext/gtkmm2ext/activatable.h +++ b/libs/gtkmm2ext/gtkmm2ext/activatable.h @@ -23,6 +23,8 @@ #include <gtkmm/action.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { /** @@ -30,7 +32,7 @@ namespace Gtkmm2ext { Gtkmm itself has a class for this. I don't know why we don't use it. */ -class Activatable { +class LIBGTKMM2EXT_API Activatable { public: virtual ~Activatable() {} diff --git a/libs/gtkmm2ext/gtkmm2ext/application.h b/libs/gtkmm2ext/gtkmm2ext/application.h index 3fb107b783..f0d029d3e7 100644 --- a/libs/gtkmm2ext/gtkmm2ext/application.h +++ b/libs/gtkmm2ext/gtkmm2ext/application.h @@ -22,9 +22,11 @@ #ifndef __GTK_APPLICATION_MM_H__ #define __GTK_APPLICATION_MM_H__ -#include <gtkmm2ext/gtkapplication.h> // for GtkApplicationGroup typedef #include <sigc++/signal.h> +#include "gtkmm2ext/visibility.h" +#include "gtkmm2ext/gtkapplication.h" // for GtkApplicationGroup typedef + namespace Gtk { class MenuItem; class MenuShell; @@ -36,7 +38,7 @@ namespace Glib { namespace Gtkmm2ext { -class Application +class LIBGTKMM2EXT_API Application { public: static Application* instance(); diff --git a/libs/gtkmm2ext/gtkmm2ext/auto_spin.h b/libs/gtkmm2ext/gtkmm2ext/auto_spin.h index b692a7ccdc..28fae316f6 100644 --- a/libs/gtkmm2ext/gtkmm2ext/auto_spin.h +++ b/libs/gtkmm2ext/gtkmm2ext/auto_spin.h @@ -22,9 +22,11 @@ #include <gtkmm.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { -class AutoSpin +class LIBGTKMM2EXT_API AutoSpin { public: diff --git a/libs/gtkmm2ext/gtkmm2ext/barcontroller.h b/libs/gtkmm2ext/gtkmm2ext/barcontroller.h index 76dc8f2d49..094d4c67f4 100644 --- a/libs/gtkmm2ext/gtkmm2ext/barcontroller.h +++ b/libs/gtkmm2ext/gtkmm2ext/barcontroller.h @@ -21,13 +21,14 @@ #include <gtkmm/frame.h> #include <gtkmm/drawingarea.h> -#include <gtkmm2ext/binding_proxy.h> #include <cairo.h> +#include "gtkmm2ext/visibility.h" +#include "gtkmm2ext/binding_proxy.h" namespace Gtkmm2ext { -class BarController : public Gtk::Frame +class LIBGTKMM2EXT_API BarController : public Gtk::Frame { public: BarController (Gtk::Adjustment& adj, boost::shared_ptr<PBD::Controllable>); diff --git a/libs/gtkmm2ext/gtkmm2ext/bindable_button.h b/libs/gtkmm2ext/gtkmm2ext/bindable_button.h index 5ac81d8507..cf74d3aca0 100644 --- a/libs/gtkmm2ext/gtkmm2ext/bindable_button.h +++ b/libs/gtkmm2ext/gtkmm2ext/bindable_button.h @@ -23,14 +23,16 @@ #include <string> #include "pbd/signals.h" + +#include "gtkmm2ext/visibility.h" #include "gtkmm2ext/stateful_button.h" -#include "binding_proxy.h" +#include "gtkmm2ext/binding_proxy.h" namespace PBD { class Controllable; } -class BindableToggleButton : public Gtkmm2ext::StatefulToggleButton +class LIBGTKMM2EXT_API BindableToggleButton : public Gtkmm2ext::StatefulToggleButton { public: BindableToggleButton (const std::string &label) @@ -60,7 +62,7 @@ class BindableToggleButton : public Gtkmm2ext::StatefulToggleButton BindingProxy binding_proxy; }; -class BindableButton : public Gtkmm2ext::StatefulButton +class LIBGTKMM2EXT_API BindableButton : public Gtkmm2ext::StatefulButton { public: BindableButton (boost::shared_ptr<PBD::Controllable> c) : binding_proxy (c) {} diff --git a/libs/gtkmm2ext/gtkmm2ext/binding_proxy.h b/libs/gtkmm2ext/gtkmm2ext/binding_proxy.h index b541582f6f..d6e3140462 100644 --- a/libs/gtkmm2ext/gtkmm2ext/binding_proxy.h +++ b/libs/gtkmm2ext/gtkmm2ext/binding_proxy.h @@ -22,15 +22,18 @@ #define __binding_proxy__ #include <string> -#include <gtkmm2ext/popup.h> #include <boost/shared_ptr.hpp> + #include "pbd/signals.h" +#include "gtkmm2ext/visibility.h" +#include "gtkmm2ext/popup.h" + namespace PBD { class Controllable; } -class BindingProxy : public sigc::trackable +class LIBGTKMM2EXT_API BindingProxy : public sigc::trackable { public: BindingProxy (boost::shared_ptr<PBD::Controllable>); diff --git a/libs/gtkmm2ext/gtkmm2ext/bindings.h b/libs/gtkmm2ext/gtkmm2ext/bindings.h index 36da0b6075..31fea82a35 100644 --- a/libs/gtkmm2ext/gtkmm2ext/bindings.h +++ b/libs/gtkmm2ext/gtkmm2ext/bindings.h @@ -9,11 +9,13 @@ #include <gtkmm/radioaction.h> #include <gtkmm/toggleaction.h> +#include "gtkmm2ext/visibility.h" + class XMLNode; namespace Gtkmm2ext { -class KeyboardKey +class LIBGTKMM2EXT_API KeyboardKey { public: KeyboardKey () { @@ -40,7 +42,7 @@ class KeyboardKey uint64_t _val; }; -class MouseButton { +class LIBGTKMM2EXT_API MouseButton { public: MouseButton () { _val = ~0ULL; @@ -69,7 +71,7 @@ class MouseButton { static uint32_t _ignored_state; }; -class ActionMap { +class LIBGTKMM2EXT_API ActionMap { public: ActionMap() {} ~ActionMap() {} @@ -90,7 +92,7 @@ class ActionMap { _ActionMap actions; }; -class Bindings { +class LIBGTKMM2EXT_API Bindings { public: enum Operation { Press, diff --git a/libs/gtkmm2ext/gtkmm2ext/cairo_packer.h b/libs/gtkmm2ext/gtkmm2ext/cairo_packer.h index f38fe80eb5..519720dccf 100644 --- a/libs/gtkmm2ext/gtkmm2ext/cairo_packer.h +++ b/libs/gtkmm2ext/gtkmm2ext/cairo_packer.h @@ -3,7 +3,9 @@ #include <gtkmm/box.h> -class CairoPacker +#include "gtkmm2ext/visibility.h" + +class LIBGTKMM2EXT_API CairoPacker { public: CairoPacker () {} @@ -15,7 +17,7 @@ class CairoPacker virtual void draw_background (Gtk::Widget&, GdkEventExpose*); }; -class CairoHPacker : public CairoPacker, public Gtk::HBox +class LIBGTKMM2EXT_API CairoHPacker : public CairoPacker, public Gtk::HBox { public: CairoHPacker (); @@ -27,7 +29,7 @@ class CairoHPacker : public CairoPacker, public Gtk::HBox void on_realize (); }; -class CairoVPacker : public CairoPacker, public Gtk::VBox +class LIBGTKMM2EXT_API CairoVPacker : public CairoPacker, public Gtk::VBox { public: CairoVPacker (); diff --git a/libs/gtkmm2ext/gtkmm2ext/cairo_widget.h b/libs/gtkmm2ext/gtkmm2ext/cairo_widget.h index eb741b7e98..596b695da6 100644 --- a/libs/gtkmm2ext/gtkmm2ext/cairo_widget.h +++ b/libs/gtkmm2ext/gtkmm2ext/cairo_widget.h @@ -21,12 +21,14 @@ #define __gtk2_ardour_cairo_widget_h__ #include <gtkmm/eventbox.h> + +#include "gtkmm2ext/visibility.h" #include "gtkmm2ext/widget_state.h" /** A parent class for widgets that are rendered using Cairo. */ -class CairoWidget : public Gtk::EventBox +class LIBGTKMM2EXT_API CairoWidget : public Gtk::EventBox { public: CairoWidget (); diff --git a/libs/gtkmm2ext/gtkmm2ext/cairocell.h b/libs/gtkmm2ext/gtkmm2ext/cairocell.h index 2839d4266b..60a6f743d1 100644 --- a/libs/gtkmm2ext/gtkmm2ext/cairocell.h +++ b/libs/gtkmm2ext/gtkmm2ext/cairocell.h @@ -29,7 +29,9 @@ #include <cairomm/cairomm.h> #include <gtkmm/misc.h> -class CairoCell +#include "gtkmm2ext/visibility.h" + +class LIBGTKMM2EXT_API CairoCell { public: CairoCell(int32_t id); @@ -72,7 +74,7 @@ class CairoCell uint32_t _xpad; }; -class CairoFontDescription { +class LIBGTKMM2EXT_API CairoFontDescription { public: CairoFontDescription (const std::string& f, Cairo::FontSlant s, @@ -106,7 +108,7 @@ class CairoFontDescription { double _size; }; -class CairoTextCell : public CairoCell +class LIBGTKMM2EXT_API CairoTextCell : public CairoCell { public: CairoTextCell (int32_t id, double width_chars, boost::shared_ptr<CairoFontDescription> font = boost::shared_ptr<CairoFontDescription>()); @@ -139,7 +141,7 @@ class CairoTextCell : public CairoCell double x_offset; }; -class CairoCharCell : public CairoTextCell +class LIBGTKMM2EXT_API CairoCharCell : public CairoTextCell { public: CairoCharCell(int32_t id, char c); @@ -147,7 +149,7 @@ class CairoCharCell : public CairoTextCell void set_size (Cairo::RefPtr<Cairo::Context>& context); }; -class CairoEditableText : public Gtk::Misc +class LIBGTKMM2EXT_API CairoEditableText : public Gtk::Misc { public: CairoEditableText (boost::shared_ptr<CairoFontDescription> font = boost::shared_ptr<CairoFontDescription>()); diff --git a/libs/gtkmm2ext/gtkmm2ext/cell_renderer_color_selector.h b/libs/gtkmm2ext/gtkmm2ext/cell_renderer_color_selector.h index 16e2feca6a..1360da4c50 100644 --- a/libs/gtkmm2ext/gtkmm2ext/cell_renderer_color_selector.h +++ b/libs/gtkmm2ext/gtkmm2ext/cell_renderer_color_selector.h @@ -25,6 +25,8 @@ #include <gtkmm/cellrenderer.h> #include <gdkmm.h> +#include "gtkmm2ext/visibility.h" + using namespace Gtk; namespace Gtk { @@ -33,7 +35,7 @@ namespace Gtk { namespace Gtkmm2ext { -class CellRendererColorSelector : public Gtk::CellRenderer +class LIBGTKMM2EXT_API CellRendererColorSelector : public Gtk::CellRenderer { public: CellRendererColorSelector(); diff --git a/libs/gtkmm2ext/gtkmm2ext/cell_renderer_pixbuf_multi.h b/libs/gtkmm2ext/gtkmm2ext/cell_renderer_pixbuf_multi.h index c856414150..5e763edefd 100644 --- a/libs/gtkmm2ext/gtkmm2ext/cell_renderer_pixbuf_multi.h +++ b/libs/gtkmm2ext/gtkmm2ext/cell_renderer_pixbuf_multi.h @@ -29,11 +29,13 @@ #include <gtkmm/cellrenderer.h> #include <gdkmm.h> +#include "gtkmm2ext/visibility.h" + using namespace Gtk; namespace Gtkmm2ext { -class CellRendererPixbufMulti : public Gtk::CellRenderer +class LIBGTKMM2EXT_API CellRendererPixbufMulti : public Gtk::CellRenderer { public: diff --git a/libs/gtkmm2ext/gtkmm2ext/cell_renderer_pixbuf_toggle.h b/libs/gtkmm2ext/gtkmm2ext/cell_renderer_pixbuf_toggle.h index 7bc5d80685..e8ee448755 100644 --- a/libs/gtkmm2ext/gtkmm2ext/cell_renderer_pixbuf_toggle.h +++ b/libs/gtkmm2ext/gtkmm2ext/cell_renderer_pixbuf_toggle.h @@ -26,11 +26,13 @@ #include <gtkmm/cellrenderer.h> #include <gdkmm.h> +#include "gtkmm2ext/visibility.h" + using namespace Gtk; namespace Gtkmm2ext { -class CellRendererPixbufToggle : public Gtk::CellRenderer +class LIBGTKMM2EXT_API CellRendererPixbufToggle : public Gtk::CellRenderer { public: diff --git a/libs/gtkmm2ext/gtkmm2ext/choice.h b/libs/gtkmm2ext/gtkmm2ext/choice.h index 17e3b3192c..df6a90dd30 100644 --- a/libs/gtkmm2ext/gtkmm2ext/choice.h +++ b/libs/gtkmm2ext/gtkmm2ext/choice.h @@ -27,9 +27,11 @@ #include <string> #include <vector> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { -class Choice : public Gtk::Dialog +class LIBGTKMM2EXT_API Choice : public Gtk::Dialog { public: Choice (std::string title, std::string prompt, std::vector<std::string> choices, bool center = true); diff --git a/libs/gtkmm2ext/gtkmm2ext/click_box.h b/libs/gtkmm2ext/gtkmm2ext/click_box.h index 8f9655e2bf..8270f25778 100644 --- a/libs/gtkmm2ext/gtkmm2ext/click_box.h +++ b/libs/gtkmm2ext/gtkmm2ext/click_box.h @@ -23,11 +23,12 @@ #include <string> #include <gtkmm.h> -#include <gtkmm2ext/auto_spin.h> +#include "gtkmm2ext/visibility.h" +#include "gtkmm2ext/auto_spin.h" namespace Gtkmm2ext { -class ClickBox : public Gtk::DrawingArea, public AutoSpin +class LIBGTKMM2EXT_API ClickBox : public Gtk::DrawingArea, public AutoSpin { public: ClickBox (Gtk::Adjustment *adj, const std::string &name, bool round_to_steps = false); diff --git a/libs/gtkmm2ext/gtkmm2ext/debug.h b/libs/gtkmm2ext/gtkmm2ext/debug.h index e057b3c9bf..8012742e6c 100644 --- a/libs/gtkmm2ext/gtkmm2ext/debug.h +++ b/libs/gtkmm2ext/gtkmm2ext/debug.h @@ -20,12 +20,14 @@ #ifndef __libgtkmm2ext_debug_h__ #define __libgtkmm2ext_debug_h__ +#include "gtkmm2ext/visibility.h" + #include <stdint.h> namespace Gtkmm2ext { namespace DEBUG { - extern uint64_t Keyboard; - extern uint64_t Bindings; + LIBGTKMM2EXT_API extern uint64_t Keyboard; + LIBGTKMM2EXT_API extern uint64_t Bindings; } } diff --git a/libs/gtkmm2ext/gtkmm2ext/dndtreeview.h b/libs/gtkmm2ext/gtkmm2ext/dndtreeview.h index b5f18fa890..4a3eb7b5cf 100644 --- a/libs/gtkmm2ext/gtkmm2ext/dndtreeview.h +++ b/libs/gtkmm2ext/gtkmm2ext/dndtreeview.h @@ -26,17 +26,19 @@ #include <gtkmm/treeselection.h> #include <gtkmm/selectiondata.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { template<class DataType> -struct SerializedObjectPointers { +struct LIBGTKMM2EXT_API SerializedObjectPointers { uint32_t size; uint32_t cnt; char type[32]; DataType data[0]; }; -class DnDTreeViewBase : public Gtk::TreeView +class LIBGTKMM2EXT_API DnDTreeViewBase : public Gtk::TreeView { private: public: @@ -87,7 +89,7 @@ class DnDTreeViewBase : public Gtk::TreeView }; template<class DataType> -class DnDTreeView : public DnDTreeViewBase +class LIBGTKMM2EXT_API DnDTreeView : public DnDTreeViewBase { public: DnDTreeView() {} diff --git a/libs/gtkmm2ext/gtkmm2ext/dndvbox.h b/libs/gtkmm2ext/gtkmm2ext/dndvbox.h index bbfd183c7b..e41437fbcc 100644 --- a/libs/gtkmm2ext/gtkmm2ext/dndvbox.h +++ b/libs/gtkmm2ext/gtkmm2ext/dndvbox.h @@ -18,12 +18,14 @@ */ #include <gtkmm/box.h> + +#include "gtkmm2ext/visibility.h" #include "gtkmm2ext/widget_state.h" namespace Gtkmm2ext { /** Parent class for children of a DnDVBox */ -class DnDVBoxChild +class LIBGTKMM2EXT_API DnDVBoxChild { public: virtual ~DnDVBoxChild () {} @@ -43,7 +45,7 @@ public: /** A VBox whose contents can be dragged and dropped */ template <class T> -class DnDVBox : public Gtk::EventBox +class LIBGTKMM2EXT_API DnDVBox : public Gtk::EventBox { public: DnDVBox () : _active (0), _drag_icon (0), _expecting_unwanted_button_event (false), _placeholder (0) diff --git a/libs/gtkmm2ext/gtkmm2ext/doi.h b/libs/gtkmm2ext/gtkmm2ext/doi.h index 6ad1f7dd94..e24224701f 100644 --- a/libs/gtkmm2ext/gtkmm2ext/doi.h +++ b/libs/gtkmm2ext/gtkmm2ext/doi.h @@ -22,13 +22,15 @@ #include <gtkmm.h> +#include "gtkmm2ext/visibility.h" + /* XXX g++ 2.95 can't compile this as pair of member function templates */ -template<typename T> gint idle_delete (T *obj) { delete obj; return FALSE; } -template<typename T> void delete_when_idle (T *obj) { +template<typename T> LIBGTKMM2EXT_API gint idle_delete (T *obj) { delete obj; return FALSE; } +template<typename T> LIBGTKMM2EXT_API void delete_when_idle (T *obj) { Glib::signal_idle().connect (sigc::bind (sigc::ptr_fun (idle_delete<T>), obj)); } -template<typename T> gint delete_on_unmap (GdkEventAny *ignored, T *obj) { +template<typename T> LIBGTKMM2EXT_API gint delete_on_unmap (GdkEventAny *ignored, T *obj) { Glib::signal_idle().connect (sigc::bind (sigc::ptr_fun (idle_delete<T>), obj)); return FALSE; } diff --git a/libs/gtkmm2ext/gtkmm2ext/fastmeter.h b/libs/gtkmm2ext/gtkmm2ext/fastmeter.h index 8070748963..6802481777 100644 --- a/libs/gtkmm2ext/gtkmm2ext/fastmeter.h +++ b/libs/gtkmm2ext/gtkmm2ext/fastmeter.h @@ -27,9 +27,11 @@ #include <gtkmm/drawingarea.h> #include <gdkmm/pixbuf.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { -class FastMeter : public Gtk::DrawingArea { +class LIBGTKMM2EXT_API FastMeter : public Gtk::DrawingArea { public: enum Orientation { Horizontal, diff --git a/libs/gtkmm2ext/gtkmm2ext/focus_entry.h b/libs/gtkmm2ext/gtkmm2ext/focus_entry.h index 3fb57b433d..9cdbc5cc7a 100644 --- a/libs/gtkmm2ext/gtkmm2ext/focus_entry.h +++ b/libs/gtkmm2ext/gtkmm2ext/focus_entry.h @@ -22,9 +22,11 @@ #include <gtkmm/entry.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { -class FocusEntry : public Gtk::Entry +class LIBGTKMM2EXT_API FocusEntry : public Gtk::Entry { public: FocusEntry (); diff --git a/libs/gtkmm2ext/gtkmm2ext/grouped_buttons.h b/libs/gtkmm2ext/gtkmm2ext/grouped_buttons.h index 99d9f8ffc4..da4136be0e 100644 --- a/libs/gtkmm2ext/gtkmm2ext/grouped_buttons.h +++ b/libs/gtkmm2ext/gtkmm2ext/grouped_buttons.h @@ -25,11 +25,13 @@ #include <vector> #include <sigc++/signal.h> +#include "gtkmm2ext/visibility.h" + namespace Gtk { class ToggleButton; }; -class GroupedButtons : public sigc::trackable +class LIBGTKMM2EXT_API GroupedButtons : public sigc::trackable { public: GroupedButtons (uint32_t nbuttons, uint32_t first_active); diff --git a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h index 232e7682ed..b726eb89ac 100644 --- a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h +++ b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h @@ -37,12 +37,15 @@ #include <gtkmm/textbuffer.h> #include <gtkmm/main.h> #include <gdkmm/color.h> -#include <pbd/abstract_ui.h> -#include <pbd/ringbufferNPT.h> - -#include <pbd/pool.h> -#include <pbd/error.h> -#include <pbd/receiver.h> + +#define ABSTRACT_UI_EXPORTS +#include "pbd/abstract_ui.h" +#include "pbd/ringbufferNPT.h" +#include "pbd/pool.h" +#include "pbd/error.h" +#include "pbd/receiver.h" + +#include "gtkmm2ext/visibility.h" class Touchable; @@ -59,7 +62,7 @@ extern BaseUI::RequestType SetTip; extern BaseUI::RequestType AddIdle; extern BaseUI::RequestType AddTimeout; -struct UIRequest : public BaseUI::BaseRequestObject { +struct LIBGTKMM2EXT_API UIRequest : public BaseUI::BaseRequestObject { /* this once used anonymous unions to merge elements that are never part of the same request. that makes @@ -88,7 +91,7 @@ struct UIRequest : public BaseUI::BaseRequestObject { } }; -class UI : public AbstractUI<UIRequest> +class LIBGTKMM2EXT_API UI : public AbstractUI<UIRequest> { private: class MyReceiver : public Receiver { diff --git a/libs/gtkmm2ext/gtkmm2ext/gtkapplication.h b/libs/gtkmm2ext/gtkmm2ext/gtkapplication.h index d0d5b55557..83594fefbe 100644 --- a/libs/gtkmm2ext/gtkmm2ext/gtkapplication.h +++ b/libs/gtkmm2ext/gtkmm2ext/gtkapplication.h @@ -26,22 +26,24 @@ #include <gtk/gtk.h> +#include "gtkmm2ext/visibility.h" + G_BEGIN_DECLS typedef struct _GtkApplicationMenuGroup GtkApplicationMenuGroup; -int gtk_application_init (void); -void gtk_application_ready (void); -void gtk_application_cleanup (void); +LIBGTKMM2EXT_API int gtk_application_init (void); +LIBGTKMM2EXT_API void gtk_application_ready (void); +LIBGTKMM2EXT_API void gtk_application_cleanup (void); -void gtk_application_set_menu_bar (GtkMenuShell *menu_shell); -GtkApplicationMenuGroup * gtk_application_add_app_menu_group (void); -void gtk_application_add_app_menu_item (GtkApplicationMenuGroup *group, +LIBGTKMM2EXT_API void gtk_application_set_menu_bar (GtkMenuShell *menu_shell); +LIBGTKMM2EXT_API GtkApplicationMenuGroup * gtk_application_add_app_menu_group (void); +LIBGTKMM2EXT_API void gtk_application_add_app_menu_item (GtkApplicationMenuGroup *group, GtkMenuItem *menu_item); /* these are private but here until GtkApplication becomes a GtkObject with an interface */ -extern GList *_gtk_application_menu_groups; +LIBGTKMM2EXT_LOCAL extern GList *_gtk_application_menu_groups; G_END_DECLS diff --git a/libs/gtkmm2ext/gtkmm2ext/gtkutils.h b/libs/gtkmm2ext/gtkmm2ext/gtkutils.h index 832423f31d..48c166be29 100644 --- a/libs/gtkmm2ext/gtkmm2ext/gtkutils.h +++ b/libs/gtkmm2ext/gtkmm2ext/gtkutils.h @@ -22,12 +22,14 @@ #include <string> +#include "gtkmm2ext/visibility.h" + namespace Gtk { class Widget; } -void gtk_set_size_request_to_display_given_text (Gtk::Widget& w, - const std::string& text, - gint hpadding = 0, - gint vpadding = 0); +LIBGTKMM2EXT_API void gtk_set_size_request_to_display_given_text (Gtk::Widget& w, + const std::string& text, + gint hpadding = 0, + gint vpadding = 0); #endif /* __gtkutils_h__ */ diff --git a/libs/gtkmm2ext/gtkmm2ext/gui_thread.h b/libs/gtkmm2ext/gtkmm2ext/gui_thread.h index 1e98a32b7b..6935a8d0af 100644 --- a/libs/gtkmm2ext/gtkmm2ext/gui_thread.h +++ b/libs/gtkmm2ext/gtkmm2ext/gui_thread.h @@ -25,6 +25,8 @@ #include <boost/bind.hpp> #include <boost/bind/protect.hpp> +#include "gtkmm2ext/visibility.h" + namespace sigc { struct trackable; } @@ -34,7 +36,7 @@ namespace sigc { #define gui_context() Gtkmm2ext::UI::instance() /* a UICallback-derived object that specifies the event loop for GUI signal handling */ #define ui_bind(f, ...) boost::protect (boost::bind (f, __VA_ARGS__)) -extern PBD::EventLoop::InvalidationRecord* __invalidator (sigc::trackable& trackable, const char*, int); +LIBGTKMM2EXT_API extern PBD::EventLoop::InvalidationRecord* __invalidator (sigc::trackable& trackable, const char*, int); #define invalidator(x) __invalidator ((x), __FILE__, __LINE__) #endif /* __ardour_gtk_gui_thread_h__ */ diff --git a/libs/gtkmm2ext/gtkmm2ext/idle_adjustment.h b/libs/gtkmm2ext/gtkmm2ext/idle_adjustment.h index d8bda35cb5..58e2f8f5bd 100644 --- a/libs/gtkmm2ext/gtkmm2ext/idle_adjustment.h +++ b/libs/gtkmm2ext/gtkmm2ext/idle_adjustment.h @@ -23,9 +23,11 @@ #include <sys/time.h> #include <gtkmm/adjustment.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { -class IdleAdjustment : public sigc::trackable +class LIBGTKMM2EXT_API IdleAdjustment : public sigc::trackable { public: IdleAdjustment (Gtk::Adjustment& adj); diff --git a/libs/gtkmm2ext/gtkmm2ext/keyboard.h b/libs/gtkmm2ext/gtkmm2ext/keyboard.h index 2c6b026a42..2123e6ff69 100644 --- a/libs/gtkmm2ext/gtkmm2ext/keyboard.h +++ b/libs/gtkmm2ext/gtkmm2ext/keyboard.h @@ -30,13 +30,15 @@ #include "pbd/stateful.h" +#include "gtkmm2ext/visibility.h" + namespace Gtk { class Window; } namespace Gtkmm2ext { -class Keyboard : public sigc::trackable, PBD::Stateful +class LIBGTKMM2EXT_API Keyboard : public sigc::trackable, PBD::Stateful { public: Keyboard (); diff --git a/libs/gtkmm2ext/gtkmm2ext/motionfeedback.h b/libs/gtkmm2ext/gtkmm2ext/motionfeedback.h index b4bf2d9c02..9e051b04b8 100644 --- a/libs/gtkmm2ext/gtkmm2ext/motionfeedback.h +++ b/libs/gtkmm2ext/gtkmm2ext/motionfeedback.h @@ -27,6 +27,7 @@ #include <gtkmm/label.h> #include <gtkmm/eventbox.h> +#include "gtkmm2ext/visibility.h" #include "gtkmm2ext/binding_proxy.h" #include "gtkmm2ext/prolooks-helpers.h" @@ -37,7 +38,7 @@ namespace Gtk { namespace Gtkmm2ext { -class MotionFeedback : public Gtk::VBox +class LIBGTKMM2EXT_API MotionFeedback : public Gtk::VBox { public: enum Type { diff --git a/libs/gtkmm2ext/gtkmm2ext/persistent_tooltip.h b/libs/gtkmm2ext/gtkmm2ext/persistent_tooltip.h index edd1e199e4..840280f701 100644 --- a/libs/gtkmm2ext/gtkmm2ext/persistent_tooltip.h +++ b/libs/gtkmm2ext/gtkmm2ext/persistent_tooltip.h @@ -22,12 +22,14 @@ #include <sigc++/trackable.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { /** A class which offers a tooltip-like window which can be made to * stay open during a drag. */ -class PersistentTooltip : public sigc::trackable +class LIBGTKMM2EXT_API PersistentTooltip : public sigc::trackable { public: PersistentTooltip (Gtk::Widget *); diff --git a/libs/gtkmm2ext/gtkmm2ext/pixfader.h b/libs/gtkmm2ext/gtkmm2ext/pixfader.h index 2953cc6333..26942371d3 100644 --- a/libs/gtkmm2ext/gtkmm2ext/pixfader.h +++ b/libs/gtkmm2ext/gtkmm2ext/pixfader.h @@ -27,9 +27,11 @@ #include <gtkmm/adjustment.h> #include <gdkmm.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { -class PixFader : public Gtk::DrawingArea +class LIBGTKMM2EXT_API PixFader : public Gtk::DrawingArea { public: PixFader (Gtk::Adjustment& adjustment, int orientation, int span, int girth); diff --git a/libs/gtkmm2ext/gtkmm2ext/pixscroller.h b/libs/gtkmm2ext/gtkmm2ext/pixscroller.h index c87d1f130c..06d0ed2458 100644 --- a/libs/gtkmm2ext/gtkmm2ext/pixscroller.h +++ b/libs/gtkmm2ext/gtkmm2ext/pixscroller.h @@ -24,9 +24,11 @@ #include <gtkmm/adjustment.h> #include <gdkmm.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { -class PixScroller : public Gtk::DrawingArea +class LIBGTKMM2EXT_API PixScroller : public Gtk::DrawingArea { public: PixScroller(Gtk::Adjustment& adjustment, diff --git a/libs/gtkmm2ext/gtkmm2ext/popup.h b/libs/gtkmm2ext/gtkmm2ext/popup.h index 1db357341d..261e07b21c 100644 --- a/libs/gtkmm2ext/gtkmm2ext/popup.h +++ b/libs/gtkmm2ext/gtkmm2ext/popup.h @@ -25,9 +25,11 @@ #include <pbd/touchable.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { -class PopUp : public Gtk::Window, public Touchable +class LIBGTKMM2EXT_API PopUp : public Gtk::Window, public Touchable { public: PopUp (Gtk::WindowPosition pos, unsigned int show_for_msecs = 0, diff --git a/libs/gtkmm2ext/gtkmm2ext/prolooks-helpers.h b/libs/gtkmm2ext/gtkmm2ext/prolooks-helpers.h index a484dd2eab..1bdc0f8487 100644 --- a/libs/gtkmm2ext/gtkmm2ext/prolooks-helpers.h +++ b/libs/gtkmm2ext/gtkmm2ext/prolooks-helpers.h @@ -19,6 +19,8 @@ #include <gdk-pixbuf/gdk-pixdata.h> #include <gobject/gvaluecollector.h> +#include "gtkmm2ext/visibility.h" + #ifdef __cplusplus extern "C" { #endif @@ -141,107 +143,107 @@ struct _ProlooksParamSpecHSV { }; -gpointer cairo_color_ref (gpointer instance); -void cairo_color_unref (gpointer instance); -GParamSpec* cairo_param_spec_color (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void cairo_value_set_color (GValue* value, gpointer v_object); -void cairo_value_take_color (GValue* value, gpointer v_object); -gpointer cairo_value_get_color (const GValue* value); -GType cairo_color_get_type (void); +LIBGTKMM2EXT_API gpointer cairo_color_ref (gpointer instance); +LIBGTKMM2EXT_API void cairo_color_unref (gpointer instance); +LIBGTKMM2EXT_API GParamSpec* cairo_param_spec_color (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +LIBGTKMM2EXT_API void cairo_value_set_color (GValue* value, gpointer v_object); +LIBGTKMM2EXT_API void cairo_value_take_color (GValue* value, gpointer v_object); +LIBGTKMM2EXT_API gpointer cairo_value_get_color (const GValue* value); +LIBGTKMM2EXT_API GType cairo_color_get_type (void); #define CAIRO_COLOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CAIRO_TYPE_COLOR, CairoColorPrivate)) -enum { +enum LIBGTKMM2EXT_API { CAIRO_COLOR_DUMMY_PROPERTY }; -void cairo_color_set_red (CairoColor* self, double value); -void cairo_color_set_green (CairoColor* self, double value); -void cairo_color_set_blue (CairoColor* self, double value); -void cairo_color_set_alpha (CairoColor* self, double value); -CairoColor* cairo_color_new (double red, double green, double blue, double alpha); -CairoColor* cairo_color_construct (GType object_type, double red, double green, double blue, double alpha); -double cairo_color_get_red (CairoColor* self); -double cairo_color_get_green (CairoColor* self); -double cairo_color_get_blue (CairoColor* self); -double cairo_color_get_alpha (CairoColor* self); -CairoColor* cairo_color_copy (CairoColor* self); -void cairo_color_set_from_string (CairoColor* self, const char* webcolor); -CairoColor* cairo_color_new_from_string (const char* webcolor); -CairoColor* cairo_color_construct_from_string (GType object_type, const char* webcolor); -ProlooksHSL* prolooks_hsl_new (void); -ProlooksHSL* prolooks_hsl_construct (GType object_type); -gpointer prolooks_hsl_ref (gpointer instance); -void prolooks_hsl_unref (gpointer instance); -GParamSpec* prolooks_param_spec_hsl (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void prolooks_value_set_hsl (GValue* value, gpointer v_object); -void prolooks_value_take_hsl (GValue* value, gpointer v_object); -gpointer prolooks_value_get_hsl (const GValue* value); -GType prolooks_hsl_get_type (void); -void prolooks_hsl_from_cairo_color (ProlooksHSL* self, CairoColor* color); -double prolooks_hsl_get_lightness (ProlooksHSL* self); -void prolooks_hsl_set_lightness (ProlooksHSL* self, double value); -double prolooks_hsl_get_saturation (ProlooksHSL* self); -void prolooks_hsl_set_saturation (ProlooksHSL* self, double value); -CairoColor* prolooks_hsl_to_cairo_color (ProlooksHSL* self); -CairoColor* cairo_color_shade (CairoColor* self, double shade_factor); -void cairo_color_set_to (CairoColor* self, CairoColor* a_color); -void cairo_color_set_as_source_in (CairoColor* self, cairo_t* cr); -void cairo_color_add_color_stop_to (CairoColor* self, cairo_pattern_t* p, double offset); -CairoColor* prolooks_gdk_color_to_cairo (const GdkColor* color); -void prolooks_color_from_string (const char* webcolor, GdkColor* result); -GType prolooks_button_state_get_type (void); -GType prolooks_button_type_get_type (void); -void prolooks_set_line_width_from_device (cairo_t* cr); -char* prolooks_color_to_string (const GdkColor* color); -CairoColor* prolooks_cairo_color_from_string (const char* webcolor); -void prolooks_set_source_color (cairo_t* cr, const GdkColor* color, double alpha); -void prolooks_gdk_color_to_cairo_color (const GdkColor* color, double* red, double* green, double* blue); -void prolooks_cairo_color_to_gdk (CairoColor* cairo_color, GdkColor* result); -void prolooks_set_source_color_string (cairo_t* cr, const char* color, double alpha); -void prolooks_add_color_stop (cairo_pattern_t* p, double offset, const GdkColor* color, double alpha); -void prolooks_add_color_stop_str (cairo_pattern_t* p, double offset, const char* color, double alpha); -cairo_pattern_t* prolooks_create_gradient (double x1, double y1, double x2, double y2, const GdkColor* start, const GdkColor* stop, double alpha_start, double alpha_stop); -cairo_pattern_t* prolooks_create_gradient_str (double x1, double y1, double x2, double y2, const char* start, const char* stop, double alpha_start, double alpha_stop); -void prolooks_rounded_rect (cairo_t* cr, double x, double y, double w, double h, double radius_x, double radius_y); -void prolooks_background_gradient (cairo_t* cr, double w, double h); -double prolooks_modula (double number, double divisor); +LIBGTKMM2EXT_API void cairo_color_set_red (CairoColor* self, double value); +LIBGTKMM2EXT_API void cairo_color_set_green (CairoColor* self, double value); +LIBGTKMM2EXT_API void cairo_color_set_blue (CairoColor* self, double value); +LIBGTKMM2EXT_API void cairo_color_set_alpha (CairoColor* self, double value); +LIBGTKMM2EXT_API CairoColor* cairo_color_new (double red, double green, double blue, double alpha); +LIBGTKMM2EXT_API CairoColor* cairo_color_construct (GType object_type, double red, double green, double blue, double alpha); +LIBGTKMM2EXT_API double cairo_color_get_red (CairoColor* self); +LIBGTKMM2EXT_API double cairo_color_get_green (CairoColor* self); +LIBGTKMM2EXT_API double cairo_color_get_blue (CairoColor* self); +LIBGTKMM2EXT_API double cairo_color_get_alpha (CairoColor* self); +LIBGTKMM2EXT_API CairoColor* cairo_color_copy (CairoColor* self); +LIBGTKMM2EXT_API void cairo_color_set_from_string (CairoColor* self, const char* webcolor); +LIBGTKMM2EXT_API CairoColor* cairo_color_new_from_string (const char* webcolor); +LIBGTKMM2EXT_API CairoColor* cairo_color_construct_from_string (GType object_type, const char* webcolor); +LIBGTKMM2EXT_API ProlooksHSL* prolooks_hsl_new (void); +LIBGTKMM2EXT_API ProlooksHSL* prolooks_hsl_construct (GType object_type); +LIBGTKMM2EXT_API gpointer prolooks_hsl_ref (gpointer instance); +LIBGTKMM2EXT_API void prolooks_hsl_unref (gpointer instance); +LIBGTKMM2EXT_API GParamSpec* prolooks_param_spec_hsl (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +LIBGTKMM2EXT_API void prolooks_value_set_hsl (GValue* value, gpointer v_object); +LIBGTKMM2EXT_API void prolooks_value_take_hsl (GValue* value, gpointer v_object); +LIBGTKMM2EXT_API gpointer prolooks_value_get_hsl (const GValue* value); +LIBGTKMM2EXT_API GType prolooks_hsl_get_type (void); +LIBGTKMM2EXT_API void prolooks_hsl_from_cairo_color (ProlooksHSL* self, CairoColor* color); +LIBGTKMM2EXT_API double prolooks_hsl_get_lightness (ProlooksHSL* self); +LIBGTKMM2EXT_API void prolooks_hsl_set_lightness (ProlooksHSL* self, double value); +LIBGTKMM2EXT_API double prolooks_hsl_get_saturation (ProlooksHSL* self); +LIBGTKMM2EXT_API void prolooks_hsl_set_saturation (ProlooksHSL* self, double value); +LIBGTKMM2EXT_API CairoColor* prolooks_hsl_to_cairo_color (ProlooksHSL* self); +LIBGTKMM2EXT_API CairoColor* cairo_color_shade (CairoColor* self, double shade_factor); +LIBGTKMM2EXT_API void cairo_color_set_to (CairoColor* self, CairoColor* a_color); +LIBGTKMM2EXT_API void cairo_color_set_as_source_in (CairoColor* self, cairo_t* cr); +LIBGTKMM2EXT_API void cairo_color_add_color_stop_to (CairoColor* self, cairo_pattern_t* p, double offset); +LIBGTKMM2EXT_API CairoColor* prolooks_gdk_color_to_cairo (const GdkColor* color); +LIBGTKMM2EXT_API void prolooks_color_from_string (const char* webcolor, GdkColor* result); +LIBGTKMM2EXT_API GType prolooks_button_state_get_type (void); +LIBGTKMM2EXT_API GType prolooks_button_type_get_type (void); +LIBGTKMM2EXT_API void prolooks_set_line_width_from_device (cairo_t* cr); +LIBGTKMM2EXT_API char* prolooks_color_to_string (const GdkColor* color); +LIBGTKMM2EXT_API CairoColor* prolooks_cairo_color_from_string (const char* webcolor); +LIBGTKMM2EXT_API void prolooks_set_source_color (cairo_t* cr, const GdkColor* color, double alpha); +LIBGTKMM2EXT_API void prolooks_gdk_color_to_cairo_color (const GdkColor* color, double* red, double* green, double* blue); +LIBGTKMM2EXT_API void prolooks_cairo_color_to_gdk (CairoColor* cairo_color, GdkColor* result); +LIBGTKMM2EXT_API void prolooks_set_source_color_string (cairo_t* cr, const char* color, double alpha); +LIBGTKMM2EXT_API void prolooks_add_color_stop (cairo_pattern_t* p, double offset, const GdkColor* color, double alpha); +LIBGTKMM2EXT_API void prolooks_add_color_stop_str (cairo_pattern_t* p, double offset, const char* color, double alpha); +LIBGTKMM2EXT_API cairo_pattern_t* prolooks_create_gradient (double x1, double y1, double x2, double y2, const GdkColor* start, const GdkColor* stop, double alpha_start, double alpha_stop); +LIBGTKMM2EXT_API cairo_pattern_t* prolooks_create_gradient_str (double x1, double y1, double x2, double y2, const char* start, const char* stop, double alpha_start, double alpha_stop); +LIBGTKMM2EXT_API void prolooks_rounded_rect (cairo_t* cr, double x, double y, double w, double h, double radius_x, double radius_y); +LIBGTKMM2EXT_API void prolooks_background_gradient (cairo_t* cr, double w, double h); +LIBGTKMM2EXT_API double prolooks_modula (double number, double divisor); #define PROLOOKS_HSL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PROLOOKS_TYPE_HSL, ProlooksHSLPrivate)) -enum { +enum LIBGTKMM2EXT_API { PROLOOKS_HSL_DUMMY_PROPERTY }; -double prolooks_hsl_get_hue (ProlooksHSL* self); -char* prolooks_hsl_to_string (ProlooksHSL* self); -void prolooks_hsl_to_gdk_color (ProlooksHSL* self, GdkColor* result); -void prolooks_hsl_from_gdk_color (ProlooksHSL* self, const GdkColor* color); -void prolooks_hsl_set_hue (ProlooksHSL* self, double value); -gpointer prolooks_hsv_ref (gpointer instance); -void prolooks_hsv_unref (gpointer instance); -GParamSpec* prolooks_param_spec_hsv (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void prolooks_value_set_hsv (GValue* value, gpointer v_object); -void prolooks_value_take_hsv (GValue* value, gpointer v_object); -gpointer prolooks_value_get_hsv (const GValue* value); -GType prolooks_hsv_get_type (void); +LIBGTKMM2EXT_API double prolooks_hsl_get_hue (ProlooksHSL* self); +LIBGTKMM2EXT_API char* prolooks_hsl_to_string (ProlooksHSL* self); +LIBGTKMM2EXT_API void prolooks_hsl_to_gdk_color (ProlooksHSL* self, GdkColor* result); +LIBGTKMM2EXT_API void prolooks_hsl_from_gdk_color (ProlooksHSL* self, const GdkColor* color); +LIBGTKMM2EXT_API void prolooks_hsl_set_hue (ProlooksHSL* self, double value); +LIBGTKMM2EXT_API gpointer prolooks_hsv_ref (gpointer instance); +LIBGTKMM2EXT_API void prolooks_hsv_unref (gpointer instance); +LIBGTKMM2EXT_API GParamSpec* prolooks_param_spec_hsv (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +LIBGTKMM2EXT_API void prolooks_value_set_hsv (GValue* value, gpointer v_object); +LIBGTKMM2EXT_API void prolooks_value_take_hsv (GValue* value, gpointer v_object); +LIBGTKMM2EXT_API gpointer prolooks_value_get_hsv (const GValue* value); +LIBGTKMM2EXT_API GType prolooks_hsv_get_type (void); #define PROLOOKS_HSV_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PROLOOKS_TYPE_HSV, ProlooksHSVPrivate)) -enum { +enum LIBGTKMM2EXT_API { PROLOOKS_HSV_DUMMY_PROPERTY }; -double prolooks_hsv_get_hue (ProlooksHSV* self); -double prolooks_hsv_get_saturation (ProlooksHSV* self); -double prolooks_hsv_get_value (ProlooksHSV* self); -char* prolooks_hsv_to_string (ProlooksHSV* self); -void prolooks_hsv_from_gdk_color (ProlooksHSV* self, const GdkColor* color); -ProlooksHSV* prolooks_hsv_new_for_gdk_color (const GdkColor* color); -ProlooksHSV* prolooks_hsv_construct_for_gdk_color (GType object_type, const GdkColor* color); -void prolooks_hsv_from_cairo_color (ProlooksHSV* self, CairoColor* color); -ProlooksHSV* prolooks_hsv_new_for_cairo_color (CairoColor* color); -ProlooksHSV* prolooks_hsv_construct_for_cairo_color (GType object_type, CairoColor* color); -CairoColor* prolooks_hsv_to_cairo_color (ProlooksHSV* self); -void prolooks_hsv_to_gdk_color (ProlooksHSV* self, GdkColor* result); -void prolooks_hsv_set_value (ProlooksHSV* self, double value); -void prolooks_hsv_set_hue (ProlooksHSV* self, double value); -void prolooks_hsv_set_saturation (ProlooksHSV* self, double value); -ProlooksHSV* prolooks_hsv_new (void); -ProlooksHSV* prolooks_hsv_construct (GType object_type); -void prolooks_shade_color (const GdkColor* orig, double shade_ratio, GdkColor* result); -GdkPixbuf* prolooks_cairo_image_surface_to_pixbuf (cairo_surface_t* surface); +LIBGTKMM2EXT_API double prolooks_hsv_get_hue (ProlooksHSV* self); +LIBGTKMM2EXT_API double prolooks_hsv_get_saturation (ProlooksHSV* self); +LIBGTKMM2EXT_API double prolooks_hsv_get_value (ProlooksHSV* self); +LIBGTKMM2EXT_API char* prolooks_hsv_to_string (ProlooksHSV* self); +LIBGTKMM2EXT_API void prolooks_hsv_from_gdk_color (ProlooksHSV* self, const GdkColor* color); +LIBGTKMM2EXT_API ProlooksHSV* prolooks_hsv_new_for_gdk_color (const GdkColor* color); +LIBGTKMM2EXT_API ProlooksHSV* prolooks_hsv_construct_for_gdk_color (GType object_type, const GdkColor* color); +LIBGTKMM2EXT_API void prolooks_hsv_from_cairo_color (ProlooksHSV* self, CairoColor* color); +LIBGTKMM2EXT_API ProlooksHSV* prolooks_hsv_new_for_cairo_color (CairoColor* color); +LIBGTKMM2EXT_API ProlooksHSV* prolooks_hsv_construct_for_cairo_color (GType object_type, CairoColor* color); +LIBGTKMM2EXT_API CairoColor* prolooks_hsv_to_cairo_color (ProlooksHSV* self); +LIBGTKMM2EXT_API void prolooks_hsv_to_gdk_color (ProlooksHSV* self, GdkColor* result); +LIBGTKMM2EXT_API void prolooks_hsv_set_value (ProlooksHSV* self, double value); +LIBGTKMM2EXT_API void prolooks_hsv_set_hue (ProlooksHSV* self, double value); +LIBGTKMM2EXT_API void prolooks_hsv_set_saturation (ProlooksHSV* self, double value); +LIBGTKMM2EXT_API ProlooksHSV* prolooks_hsv_new (void); +LIBGTKMM2EXT_API ProlooksHSV* prolooks_hsv_construct (GType object_type); +LIBGTKMM2EXT_API void prolooks_shade_color (const GdkColor* orig, double shade_ratio, GdkColor* result); +LIBGTKMM2EXT_API GdkPixbuf* prolooks_cairo_image_surface_to_pixbuf (cairo_surface_t* surface); #ifdef __cplusplus } // extern "C" diff --git a/libs/gtkmm2ext/gtkmm2ext/prompter.h b/libs/gtkmm2ext/gtkmm2ext/prompter.h index 72d9f2149b..3499479073 100644 --- a/libs/gtkmm2ext/gtkmm2ext/prompter.h +++ b/libs/gtkmm2ext/gtkmm2ext/prompter.h @@ -27,13 +27,15 @@ #include <gtkmm/dialog.h> #include <sigc++/sigc++.h> +#include "gtkmm2ext/visibility.h" + namespace Gtk { class Window; } namespace Gtkmm2ext { -class Prompter : public Gtk::Dialog +class LIBGTKMM2EXT_API Prompter : public Gtk::Dialog { public: diff --git a/libs/gtkmm2ext/gtkmm2ext/scroomer.h b/libs/gtkmm2ext/gtkmm2ext/scroomer.h index a5b7f4a9ba..b5a84e9da6 100644 --- a/libs/gtkmm2ext/gtkmm2ext/scroomer.h +++ b/libs/gtkmm2ext/gtkmm2ext/scroomer.h @@ -24,9 +24,11 @@ #include <gtkmm/adjustment.h> #include <gdkmm.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { -class Scroomer : public Gtk::DrawingArea +class LIBGTKMM2EXT_API Scroomer : public Gtk::DrawingArea { public: enum Component { diff --git a/libs/gtkmm2ext/gtkmm2ext/selector.h b/libs/gtkmm2ext/gtkmm2ext/selector.h index 841742db03..f9fb428529 100644 --- a/libs/gtkmm2ext/gtkmm2ext/selector.h +++ b/libs/gtkmm2ext/gtkmm2ext/selector.h @@ -24,9 +24,11 @@ #include <gtkmm.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { -class TreeView_Selector : public Gtk::TreeView +class LIBGTKMM2EXT_API TreeView_Selector : public Gtk::TreeView { public: TreeView_Selector() {} @@ -38,7 +40,7 @@ protected: typedef void (SelectorRefillFunction)(Glib::RefPtr<Gtk::ListStore>, void *); -class Selector : public Gtk::VBox +class LIBGTKMM2EXT_API Selector : public Gtk::VBox { friend class Gtkmm2ext::TreeView_Selector; diff --git a/libs/gtkmm2ext/gtkmm2ext/slider_controller.h b/libs/gtkmm2ext/gtkmm2ext/slider_controller.h index 4c6a5cb41d..8a8cb04a71 100644 --- a/libs/gtkmm2ext/gtkmm2ext/slider_controller.h +++ b/libs/gtkmm2ext/gtkmm2ext/slider_controller.h @@ -26,6 +26,8 @@ #include <boost/shared_ptr.hpp> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { class Pix; } @@ -36,7 +38,7 @@ namespace PBD { namespace Gtkmm2ext { -class SliderController : public Gtkmm2ext::PixFader +class LIBGTKMM2EXT_API SliderController : public Gtkmm2ext::PixFader { public: SliderController (Gtk::Adjustment* adj, int orientation, int, int); @@ -60,13 +62,13 @@ class SliderController : public Gtkmm2ext::PixFader void init (); }; -class VSliderController : public SliderController +class LIBGTKMM2EXT_API VSliderController : public SliderController { public: VSliderController (Gtk::Adjustment *adj, int, int, bool with_numeric = true); }; -class HSliderController : public SliderController +class LIBGTKMM2EXT_API HSliderController : public SliderController { public: HSliderController (Gtk::Adjustment *adj, int, int, bool with_numeric = true); diff --git a/libs/gtkmm2ext/gtkmm2ext/stateful_button.h b/libs/gtkmm2ext/gtkmm2ext/stateful_button.h index 5954d4de45..eb3ae0d567 100644 --- a/libs/gtkmm2ext/gtkmm2ext/stateful_button.h +++ b/libs/gtkmm2ext/gtkmm2ext/stateful_button.h @@ -24,9 +24,11 @@ #include <gtkmm/togglebutton.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { -class StateButton +class LIBGTKMM2EXT_API StateButton { public: StateButton(); @@ -53,7 +55,7 @@ class StateButton }; -class StatefulToggleButton : public StateButton, public Gtk::ToggleButton +class LIBGTKMM2EXT_API StatefulToggleButton : public StateButton, public Gtk::ToggleButton { public: StatefulToggleButton(); @@ -71,7 +73,7 @@ class StatefulToggleButton : public StateButton, public Gtk::ToggleButton std::string get_widget_name() const { return get_name(); } }; -class StatefulButton : public StateButton, public Gtk::Button +class LIBGTKMM2EXT_API StatefulButton : public StateButton, public Gtk::Button { public: StatefulButton(); diff --git a/libs/gtkmm2ext/gtkmm2ext/sync-menu.h b/libs/gtkmm2ext/gtkmm2ext/sync-menu.h index 2be5e71d02..b1fb455858 100644 --- a/libs/gtkmm2ext/gtkmm2ext/sync-menu.h +++ b/libs/gtkmm2ext/gtkmm2ext/sync-menu.h @@ -27,17 +27,19 @@ #include <gtk/gtk.h> +#include "gtkmm2ext/visibility.h" + G_BEGIN_DECLS typedef struct _IgeMacMenuGroup IgeMacMenuGroup; -void ige_mac_menu_set_menu_bar (GtkMenuShell *menu_shell); -void ige_mac_menu_set_quit_menu_item (GtkMenuItem *menu_item); +LIBGTKMM2EXT_API void ige_mac_menu_set_menu_bar (GtkMenuShell *menu_shell); +LIBGTKMM2EXT_API void ige_mac_menu_set_quit_menu_item (GtkMenuItem *menu_item); -IgeMacMenuGroup * ige_mac_menu_add_app_menu_group (void); -void ige_mac_menu_add_app_menu_item (IgeMacMenuGroup *group, - GtkMenuItem *menu_item, - const gchar *label); +LIBGTKMM2EXT_API IgeMacMenuGroup * ige_mac_menu_add_app_menu_group (void); +LIBGTKMM2EXT_API void ige_mac_menu_add_app_menu_item (IgeMacMenuGroup *group, + GtkMenuItem *menu_item, + const gchar *label); G_END_DECLS diff --git a/libs/gtkmm2ext/gtkmm2ext/tearoff.h b/libs/gtkmm2ext/gtkmm2ext/tearoff.h index 7f4358c154..f6742ea5d6 100644 --- a/libs/gtkmm2ext/gtkmm2ext/tearoff.h +++ b/libs/gtkmm2ext/gtkmm2ext/tearoff.h @@ -25,11 +25,13 @@ #include <gtkmm/box.h> #include <gtkmm/eventbox.h> +#include "gtkmm2ext/visibility.h" + class XMLNode; namespace Gtkmm2ext { -class TearOff : public Gtk::HBox +class LIBGTKMM2EXT_API TearOff : public Gtk::HBox { public: TearOff (Gtk::Widget& contents, bool allow_resize = false); diff --git a/libs/gtkmm2ext/gtkmm2ext/textviewer.h b/libs/gtkmm2ext/gtkmm2ext/textviewer.h index 004e2d99db..c2ab1fffd5 100644 --- a/libs/gtkmm2ext/gtkmm2ext/textviewer.h +++ b/libs/gtkmm2ext/gtkmm2ext/textviewer.h @@ -22,11 +22,13 @@ #include <string> #include <gtkmm.h> -#include <pbd/transmitter.h> +#include "pbd/transmitter.h" + +#include "gtkmm2ext/visibility.h" namespace Gtkmm2ext { -class TextViewer : public Gtk::Window, public Transmitter +class LIBGTKMM2EXT_API TextViewer : public Gtk::Window, public Transmitter { Gtk::TextView etext; Gtk::VBox vbox1; diff --git a/libs/gtkmm2ext/gtkmm2ext/treeutils.h b/libs/gtkmm2ext/gtkmm2ext/treeutils.h index 4632fb0278..a094d1f082 100644 --- a/libs/gtkmm2ext/gtkmm2ext/treeutils.h +++ b/libs/gtkmm2ext/gtkmm2ext/treeutils.h @@ -26,12 +26,14 @@ #include <gtkmm/treepath.h> #include <gtkmm/treeiter.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { - void treeview_select_one (Glib::RefPtr<Gtk::TreeSelection> selection, Glib::RefPtr<Gtk::TreeModel> model, Gtk::TreeView& view, - Gtk::TreeIter iter, Gtk::TreePath path, Gtk::TreeViewColumn* col); - void treeview_select_previous (Gtk::TreeView& view, Glib::RefPtr<Gtk::TreeModel> model, Gtk::TreeViewColumn* col); - void treeview_select_next (Gtk::TreeView& view, Glib::RefPtr<Gtk::TreeModel> model, Gtk::TreeViewColumn* col); + LIBGTKMM2EXT_API void treeview_select_one (Glib::RefPtr<Gtk::TreeSelection> selection, Glib::RefPtr<Gtk::TreeModel> model, Gtk::TreeView& view, + Gtk::TreeIter iter, Gtk::TreePath path, Gtk::TreeViewColumn* col); + LIBGTKMM2EXT_API void treeview_select_previous (Gtk::TreeView& view, Glib::RefPtr<Gtk::TreeModel> model, Gtk::TreeViewColumn* col); + LIBGTKMM2EXT_API void treeview_select_next (Gtk::TreeView& view, Glib::RefPtr<Gtk::TreeModel> model, Gtk::TreeViewColumn* col); } #endif /* __libgtkmm2ext_treeutils_h__ */ diff --git a/libs/gtkmm2ext/gtkmm2ext/utils.h b/libs/gtkmm2ext/gtkmm2ext/utils.h index e7c36d19e0..c672afd75c 100644 --- a/libs/gtkmm2ext/gtkmm2ext/utils.h +++ b/libs/gtkmm2ext/gtkmm2ext/utils.h @@ -32,6 +32,8 @@ #include <gdkmm/window.h> /* for WMDecoration */ #include <gdkmm/pixbuf.h> +#include "gtkmm2ext/visibility.h" + namespace Cairo { class Context; } @@ -45,81 +47,81 @@ namespace Gtk { } namespace Gtkmm2ext { - void init (const char*); - - std::string fit_to_pixels (const std::string&, int pixel_width, Pango::FontDescription& font, int& actual_width, bool with_ellipses = false); - std::pair<std::string, double> fit_to_pixels (cairo_t *, std::string, double); - int pixel_width (const std::string& str, Pango::FontDescription& font); - - void get_ink_pixel_size (Glib::RefPtr<Pango::Layout>, - int& width, int& height); - - void set_size_request_to_display_given_text (Gtk::Widget &w, - const gchar *text, - gint hpadding, - gint vpadding); - - void set_size_request_to_display_given_text (Gtk::Widget &w, - const std::vector<std::string>&, - gint hpadding, - gint vpadding); + LIBGTKMM2EXT_API void init (const char*); - Glib::RefPtr<Gdk::Pixbuf> pixbuf_from_string (const std::string& name, - const Pango::FontDescription& font, - int clip_width, - int clip_height, - Gdk::Color fg); + LIBGTKMM2EXT_API std::string fit_to_pixels (const std::string&, int pixel_width, Pango::FontDescription& font, int& actual_width, bool with_ellipses = false); + LIBGTKMM2EXT_API std::pair<std::string, double> fit_to_pixels (cairo_t *, std::string, double); + LIBGTKMM2EXT_API int pixel_width (const std::string& str, Pango::FontDescription& font); - void set_popdown_strings (Gtk::ComboBoxText&, + LIBGTKMM2EXT_API void get_ink_pixel_size (Glib::RefPtr<Pango::Layout>, + int& width, int& height); + + LIBGTKMM2EXT_API void set_size_request_to_display_given_text (Gtk::Widget &w, + const gchar *text, + gint hpadding, + gint vpadding); + + LIBGTKMM2EXT_API void set_size_request_to_display_given_text (Gtk::Widget &w, + const std::vector<std::string>&, + gint hpadding, + gint vpadding); + + LIBGTKMM2EXT_API Glib::RefPtr<Gdk::Pixbuf> pixbuf_from_string (const std::string& name, + const Pango::FontDescription& font, + int clip_width, + int clip_height, + Gdk::Color fg); + + LIBGTKMM2EXT_API void set_popdown_strings (Gtk::ComboBoxText&, const std::vector<std::string>&); - - template<class T> void deferred_delete (void *ptr) { + + template<class T> LIBGTKMM2EXT_API void deferred_delete (void *ptr) { delete static_cast<T *> (ptr); } - GdkWindow* get_paned_handle (Gtk::Paned& paned); - void set_decoration (Gtk::Window* win, Gdk::WMDecoration decor); - void set_treeview_header_as_default_label(Gtk::TreeViewColumn *c); - Glib::RefPtr<Gdk::Drawable> get_bogus_drawable(); - void detach_menu (Gtk::Menu&); + LIBGTKMM2EXT_API GdkWindow* get_paned_handle (Gtk::Paned& paned); + LIBGTKMM2EXT_API void set_decoration (Gtk::Window* win, Gdk::WMDecoration decor); + LIBGTKMM2EXT_API void set_treeview_header_as_default_label(Gtk::TreeViewColumn *c); + LIBGTKMM2EXT_API Glib::RefPtr<Gdk::Drawable> get_bogus_drawable(); + LIBGTKMM2EXT_API void detach_menu (Gtk::Menu&); - Glib::RefPtr<Gdk::Window> window_to_draw_on (Gtk::Widget& w, Gtk::Widget** parent); + LIBGTKMM2EXT_API Glib::RefPtr<Gdk::Window> window_to_draw_on (Gtk::Widget& w, Gtk::Widget** parent); - bool possibly_translate_keyval_to_make_legal_accelerator (uint32_t& keyval); - uint32_t possibly_translate_legal_accelerator_to_real_key (uint32_t keyval); + LIBGTKMM2EXT_API bool possibly_translate_keyval_to_make_legal_accelerator (uint32_t& keyval); + LIBGTKMM2EXT_API uint32_t possibly_translate_legal_accelerator_to_real_key (uint32_t keyval); - int physical_screen_height (Glib::RefPtr<Gdk::Window>); - int physical_screen_width (Glib::RefPtr<Gdk::Window>); + LIBGTKMM2EXT_API int physical_screen_height (Glib::RefPtr<Gdk::Window>); + LIBGTKMM2EXT_API int physical_screen_width (Glib::RefPtr<Gdk::Window>); - void container_clear (Gtk::Container&); + LIBGTKMM2EXT_API void container_clear (Gtk::Container&); /* C++ API for rounded rectangles */ - void rounded_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10); - void rounded_top_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10); - void rounded_top_left_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10); - void rounded_top_right_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10); - void rounded_top_half_rectangle (Cairo::RefPtr<Cairo::Context>, double x, double y, double w, double h, double r=10); - void rounded_bottom_half_rectangle (Cairo::RefPtr<Cairo::Context>, double x, double y, double w, double h, double r=10); - void rounded_right_half_rectangle (Cairo::RefPtr<Cairo::Context>, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_top_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_top_left_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_top_right_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_top_half_rectangle (Cairo::RefPtr<Cairo::Context>, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_bottom_half_rectangle (Cairo::RefPtr<Cairo::Context>, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_right_half_rectangle (Cairo::RefPtr<Cairo::Context>, double x, double y, double w, double h, double r=10); /* C API for rounded rectangles */ - void rounded_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); - void rounded_top_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); - void rounded_top_left_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); - void rounded_top_right_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); - void rounded_top_half_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); - void rounded_bottom_half_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); - void rounded_right_half_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_top_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_top_left_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_top_right_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_top_half_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_bottom_half_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_right_half_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); - Gtk::Label* left_aligned_label (std::string const &); + LIBGTKMM2EXT_API Gtk::Label* left_aligned_label (std::string const &); - void set_no_tooltip_whatsoever (Gtk::Widget &); - void enable_tooltips (); - void disable_tooltips (); + LIBGTKMM2EXT_API void set_no_tooltip_whatsoever (Gtk::Widget &); + LIBGTKMM2EXT_API void enable_tooltips (); + LIBGTKMM2EXT_API void disable_tooltips (); - void convert_bgra_to_rgba (guint8 const *, guint8 * dst, int, int); + LIBGTKMM2EXT_API void convert_bgra_to_rgba (guint8 const *, guint8 * dst, int, int); }; #endif /* __gtkmm2ext_utils_h__ */ diff --git a/libs/gtkmm2ext/gtkmm2ext/visibility.h b/libs/gtkmm2ext/gtkmm2ext/visibility.h new file mode 100644 index 0000000000..902e94d779 --- /dev/null +++ b/libs/gtkmm2ext/gtkmm2ext/visibility.h @@ -0,0 +1,45 @@ +/* + Copyright (C) 2013 Paul Davis + + 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 2 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, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#ifndef __libgtkmm2ext_visibility_h__ +#define __libgtkmm2ext_visibility_h__ + +#if defined(COMPILER_MSVC) + #define LIBGTKMM2EXT_DLL_IMPORT __declspec(dllimport) + #define LIBGTKMM2EXT_DLL_EXPORT __declspec(dllexport) + #define LIBGTKMM2EXT_DLL_LOCAL +#else + #define LIBGTKMM2EXT_DLL_IMPORT __attribute__ ((visibility ("default"))) + #define LIBGTKMM2EXT_DLL_EXPORT __attribute__ ((visibility ("default"))) + #define LIBGTKMM2EXT_DLL_LOCAL __attribute__ ((visibility ("hidden"))) +#endif + +#ifdef LIBGTKMM2EXT_STATIC // libgtkmm2ext is a DLL + #define LIBGTKMM2EXT_API + #define LIBGTKMM2EXT_LOCAL +#else + #ifdef LIBGTKMM2EXT_DLL_EXPORTS // defined if we are building the libgtkmm2ext DLL (instead of using it) + #define LIBGTKMM2EXT_API LIBGTKMM2EXT_DLL_EXPORT + #else + #define LIBGTKMM2EXT_API LIBGTKMM2EXT_DLL_IMPORT + #endif + #define LIBGTKMM2EXT_LOCAL LIBGTKMM2EXT_DLL_LOCAL +#endif + +#endif /* __libgtkmm2ext_visibility_h__ */ diff --git a/libs/gtkmm2ext/gtkmm2ext/visibility_tracker.h b/libs/gtkmm2ext/gtkmm2ext/visibility_tracker.h index 1256448efd..596600cc8a 100644 --- a/libs/gtkmm2ext/gtkmm2ext/visibility_tracker.h +++ b/libs/gtkmm2ext/gtkmm2ext/visibility_tracker.h @@ -22,13 +22,15 @@ #include <gdk/gdkevents.h> +#include "gtkmm2ext/visibility.h" + namespace GTK { class Window; } namespace Gtkmm2ext { -class VisibilityTracker : public virtual sigc::trackable { +class LIBGTKMM2EXT_API VisibilityTracker : public virtual sigc::trackable { public: VisibilityTracker (Gtk::Window&); virtual ~VisibilityTracker() {} diff --git a/libs/gtkmm2ext/gtkmm2ext/widget_state.h b/libs/gtkmm2ext/gtkmm2ext/widget_state.h index 6067b0f2ce..2e405c453f 100644 --- a/libs/gtkmm2ext/gtkmm2ext/widget_state.h +++ b/libs/gtkmm2ext/gtkmm2ext/widget_state.h @@ -1,19 +1,21 @@ #ifndef __gtkmm2ext_widget_state_h__ #define __gtkmm2ext_widget_state_h__ +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { /* widget states: unlike GTK, visual states like "Selected" or "Prelight" are orthogonal to active states. */ - enum ActiveState { + enum LIBGTKMM2EXT_API ActiveState { Off, ExplicitActive, ImplicitActive, }; - enum VisualState { + enum LIBGTKMM2EXT_API VisualState { /* these can be OR-ed together */ NoVisualState = 0x0, Selected = 0x1, diff --git a/libs/gtkmm2ext/gtkmm2ext/window_title.h b/libs/gtkmm2ext/gtkmm2ext/window_title.h index 62a131c096..819839a7df 100644 --- a/libs/gtkmm2ext/gtkmm2ext/window_title.h +++ b/libs/gtkmm2ext/gtkmm2ext/window_title.h @@ -22,6 +22,8 @@ #include <string> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { /** @@ -31,7 +33,7 @@ namespace Gtkmm2ext { * Each string element that is added to the window title will * be separated by a hyphen. */ -class WindowTitle +class LIBGTKMM2EXT_API WindowTitle { public: diff --git a/libs/gtkmm2ext/wscript b/libs/gtkmm2ext/wscript index 494ec8b225..c87e1aa1d0 100644 --- a/libs/gtkmm2ext/wscript +++ b/libs/gtkmm2ext/wscript @@ -77,7 +77,7 @@ def options(opt): def configure(conf): conf.load('compiler_cxx') autowaf.build_version_files(path_prefix+'gtkmm2ext/version.h', path_prefix+'version.cc', - 'libgtkmm2ext', MAJOR, MINOR, MICRO) + 'libgtkmm2ext', MAJOR, MINOR, MICRO, 'LIBGTKMM2EXT_API', 'gtkmm2ext/visibility.h') autowaf.configure(conf) autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='GTKMM', atleast_version='2.8') autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK', atleast_version='2.12.1') @@ -86,9 +86,14 @@ def configure(conf): def build(bld): if bld.is_defined ('INTERNAL_SHARED_LIBS'): obj = bld.shlib(features = 'c cxx cshlib cxxshlib', source=gtkmm2ext_sources) + # defines for this library + obj.defines = [ 'LIBGTKMM2EXT_DLL_EXPORTS=1' ] + obj.cxxflags = [ '-fvisibility=hidden' ] + obj.cflags = [ '-fvisibility=hidden' ] else: obj = bld.stlib(features = 'c cxx cstlib cxxstlib', source=gtkmm2ext_sources) obj.cxxflags = [ '-fPIC' ] + obj.defines = [ ] obj.export_includes = ['.'] obj.includes = ['.'] @@ -98,7 +103,7 @@ def build(bld): obj.use = [ 'libpbd' ] obj.vnum = GTKMM2EXT_LIB_VERSION obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') - obj.defines = [ + obj.defines += [ 'PACKAGE="' + I18N_PACKAGE + '"', 'LOCALEDIR="' + os.path.join( os.path.normpath(bld.env['DATADIR']), 'locale') + '"'] |