From 2ccab064cb0f8c037e8cde152d23dfa17f705495 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Mon, 2 Jun 2008 15:53:45 +0000 Subject: [PATCH] export more symbols in order to build all plugins git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1046 0778d3d1-df1d-0410-868b-ea421aaaa00d --- include/automation_pattern.h | 2 +- include/bb_track.h | 2 +- include/bb_track_container.h | 2 +- include/caption_menu.h | 7 ++-- include/config_mgr.h | 2 +- include/effect.h | 2 +- include/effect_control_dialog.h | 2 +- include/embed.h | 2 +- include/engine.h | 2 +- include/envelope_and_lfo_parameters.h | 2 +- include/export.h | 50 +++++++++++++++++++++++++++ include/graph.h | 10 +++--- include/import_filter.h | 4 +-- include/journalling_object.h | 1 + include/ladspa_2_lmms.h | 4 +-- include/ladspa_control.h | 2 +- include/ladspa_control_view.h | 2 +- include/ladspa_manager.h | 5 +-- include/lcd_spinbox.h | 2 +- include/led_checkbox.h | 4 +-- include/mmp.h | 1 + include/mv_base.h | 2 +- include/pattern.h | 2 +- include/project_notes.h | 7 ++-- include/string_pair_drag.h | 2 +- include/tab_bar.h | 6 ++-- include/tool.h | 4 +-- include/tooltip.h | 2 +- include/track_container.h | 2 +- include/types.h | 21 ----------- src/3rdparty/samplerate/samplerate.h | 10 +++--- 31 files changed, 102 insertions(+), 66 deletions(-) create mode 100644 include/export.h diff --git a/include/automation_pattern.h b/include/automation_pattern.h index 36d4fa47b..965dc0518 100644 --- a/include/automation_pattern.h +++ b/include/automation_pattern.h @@ -38,7 +38,7 @@ class track; -class automationPattern : public QObject, public journallingObject +class EXPORT automationPattern : public QObject, public journallingObject { Q_OBJECT public: diff --git a/include/bb_track.h b/include/bb_track.h index ab078e600..f2edd67b5 100644 --- a/include/bb_track.h +++ b/include/bb_track.h @@ -103,7 +103,7 @@ private: -class bbTrack : public track +class EXPORT bbTrack : public track { Q_OBJECT public: diff --git a/include/bb_track_container.h b/include/bb_track_container.h index 323c53da3..8f61c024a 100644 --- a/include/bb_track_container.h +++ b/include/bb_track_container.h @@ -30,7 +30,7 @@ #include "combobox.h" -class bbTrackContainer : public trackContainer +class EXPORT bbTrackContainer : public trackContainer { Q_OBJECT mapPropertyFromModel(int,currentBB,setCurrentBB,m_bbComboBoxModel); diff --git a/include/caption_menu.h b/include/caption_menu.h index 83fb0f7f9..e6bce5f43 100644 --- a/include/caption_menu.h +++ b/include/caption_menu.h @@ -1,7 +1,7 @@ /* * caption_menu.h - context menu with a caption * - * Copyright (c) 2007 Javier Serrano Polo + * Copyright (c) 2007-2008 Javier Serrano Polo * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -26,11 +26,12 @@ #ifndef _CAPTION_MENU_H #define _CAPTION_MENU_H - #include +#include "export.h" -class captionMenu : public QMenu + +class EXPORT captionMenu : public QMenu { Q_OBJECT public: diff --git a/include/config_mgr.h b/include/config_mgr.h index 4a63a3cf4..fde55fbaf 100644 --- a/include/config_mgr.h +++ b/include/config_mgr.h @@ -35,7 +35,7 @@ #include #include -#include "types.h" +#include "export.h" class engine; diff --git a/include/effect.h b/include/effect.h index 4599d57c5..784658367 100644 --- a/include/effect.h +++ b/include/effect.h @@ -45,7 +45,7 @@ class effectControls; class track; -class effect : public plugin +class EXPORT effect : public plugin { public: effect( const plugin::descriptor * _desc, diff --git a/include/effect_control_dialog.h b/include/effect_control_dialog.h index 82fb3866b..ffeacb08b 100644 --- a/include/effect_control_dialog.h +++ b/include/effect_control_dialog.h @@ -34,7 +34,7 @@ class effectControls; -class effectControlDialog : public QWidget, public modelView +class EXPORT effectControlDialog : public QWidget, public modelView { Q_OBJECT public: diff --git a/include/embed.h b/include/embed.h index 91100b6b3..acd67057a 100644 --- a/include/embed.h +++ b/include/embed.h @@ -30,7 +30,7 @@ #include -#include "types.h" +#include "export.h" #define STRINGIFY_PLUGIN_NAME(s) STR(s) diff --git a/include/engine.h b/include/engine.h index d262c2c60..fc45f704e 100644 --- a/include/engine.h +++ b/include/engine.h @@ -32,7 +32,7 @@ #include -#include "types.h" +#include "export.h" class automationEditor; class bbEditor; diff --git a/include/envelope_and_lfo_parameters.h b/include/envelope_and_lfo_parameters.h index 358768965..b18a6d030 100644 --- a/include/envelope_and_lfo_parameters.h +++ b/include/envelope_and_lfo_parameters.h @@ -39,7 +39,7 @@ class track; -class envelopeAndLFOParameters : public model, public journallingObject +class EXPORT envelopeAndLFOParameters : public model, public journallingObject { Q_OBJECT public: diff --git a/include/export.h b/include/export.h new file mode 100644 index 000000000..3e395c1c3 --- /dev/null +++ b/include/export.h @@ -0,0 +1,50 @@ +/* + * export.h - macros for export-declarations + * + * Copyright (c) 2008 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * + * 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 (see COPYING); if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + */ + + +#ifndef _EXPORT_H +#define _EXPORT_H + +#ifdef HAVE_CONFIG_H +#include +#endif + + +#ifdef BUILD_WIN32 + +#ifdef PLUGIN_NAME +#define EXPORT __declspec(dllimport) +#define PLUGIN_EXPORT __declspec(dllexport) +#else +#define EXPORT __declspec(dllexport) +#endif + +#else + +#define EXPORT +#define PLUGIN_EXPORT + +#endif + +#endif diff --git a/include/graph.h b/include/graph.h index 1ca997d82..8f0544a03 100644 --- a/include/graph.h +++ b/include/graph.h @@ -37,7 +37,7 @@ class graphModel; class track; -class graph : public QWidget, public modelView +class EXPORT graph : public QWidget, public modelView { Q_OBJECT public: @@ -45,9 +45,9 @@ public: virtual ~graph(); void setForeground( const QPixmap & _pixmap ); -// void loadSampleFromFile( const QString & _filename ); - virtual inline graphModel * model( void ) { + inline graphModel * model( void ) + { return castModel(); } @@ -62,7 +62,7 @@ protected: protected slots: void updateGraph( Uint32 _startPos, Uint32 _endPos ); - void updateGraph( void ); + void updateGraph( void ); private: virtual void modelChanged( void ); @@ -80,7 +80,7 @@ private: } ; -class graphModel : public model +class EXPORT graphModel : public model { Q_OBJECT public: diff --git a/include/import_filter.h b/include/import_filter.h index 0e7718b37..cd53b3507 100644 --- a/include/import_filter.h +++ b/include/import_filter.h @@ -2,7 +2,7 @@ * import_filter.h - declaration of class importFilter, the base-class for all * file import filters * - * Copyright (c) 2006-2007 Tobias Doerffel + * Copyright (c) 2006-2008 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -36,7 +36,7 @@ class trackContainer; -class importFilter : public plugin +class EXPORT importFilter : public plugin { public: importFilter( const QString & _file_name, diff --git a/include/journalling_object.h b/include/journalling_object.h index 18676f37a..d3cbc4585 100644 --- a/include/journalling_object.h +++ b/include/journalling_object.h @@ -31,6 +31,7 @@ #endif #include "types.h" +#include "export.h" #include #include diff --git a/include/ladspa_2_lmms.h b/include/ladspa_2_lmms.h index 15fbbe933..a7b2640a0 100644 --- a/include/ladspa_2_lmms.h +++ b/include/ladspa_2_lmms.h @@ -2,7 +2,7 @@ * ladspa_2_lmms.h - class that identifies and instantiates LADSPA effects * for use with LMMS * - * Copyright (c) 2005-2007 Danny McRae + * Copyright (c) 2005-2008 Danny McRae * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -30,7 +30,7 @@ #include "ladspa_manager.h" -class ladspa2LMMS: public ladspaManager +class EXPORT ladspa2LMMS: public ladspaManager { public: diff --git a/include/ladspa_control.h b/include/ladspa_control.h index dc83a1ae2..103f8833e 100644 --- a/include/ladspa_control.h +++ b/include/ladspa_control.h @@ -47,7 +47,7 @@ class track; typedef struct portDescription port_desc_t; -class ladspaControl : public model, public journallingObject +class EXPORT ladspaControl : public model, public journallingObject { Q_OBJECT public: diff --git a/include/ladspa_control_view.h b/include/ladspa_control_view.h index 302a6c812..47f62874e 100644 --- a/include/ladspa_control_view.h +++ b/include/ladspa_control_view.h @@ -33,7 +33,7 @@ class ladspaControl; -class ladspaControlView : public QWidget, public modelView +class EXPORT ladspaControlView : public QWidget, public modelView { Q_OBJECT public: diff --git a/include/ladspa_manager.h b/include/ladspa_manager.h index 29baf27f8..1dd000f33 100644 --- a/include/ladspa_manager.h +++ b/include/ladspa_manager.h @@ -3,7 +3,7 @@ * a class to manage loading and instantiation * of ladspa plugins * - * Copyright (c) 2005-2007 Danny McRae + * Copyright (c) 2005-2008 Danny McRae * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -45,6 +45,7 @@ #include +#include "export.h" #include "types.h" @@ -88,7 +89,7 @@ typedef struct ladspaManagerStorage } ladspaManagerDescription; -class ladspaManager +class EXPORT ladspaManager { public: diff --git a/include/lcd_spinbox.h b/include/lcd_spinbox.h index 774445202..7303ea1c3 100644 --- a/include/lcd_spinbox.h +++ b/include/lcd_spinbox.h @@ -35,7 +35,7 @@ class QLabel; -class lcdSpinBox : public QWidget, public intModelView +class EXPORT lcdSpinBox : public QWidget, public intModelView { Q_OBJECT public: diff --git a/include/led_checkbox.h b/include/led_checkbox.h index 6f0958117..80dd19eb4 100644 --- a/include/led_checkbox.h +++ b/include/led_checkbox.h @@ -1,7 +1,7 @@ /* * led_checkbox.h - class ledCheckBox, an improved QCheckBox * - * Copyright (c) 2005-2007 Tobias Doerffel + * Copyright (c) 2005-2008 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -32,7 +32,7 @@ class QPixmap; -class ledCheckBox : public automatableButton +class EXPORT ledCheckBox : public automatableButton { Q_OBJECT public: diff --git a/include/mmp.h b/include/mmp.h index 6674a0d4d..1e840376e 100644 --- a/include/mmp.h +++ b/include/mmp.h @@ -28,6 +28,7 @@ #include +#include "export.h" #include "types.h" diff --git a/include/mv_base.h b/include/mv_base.h index 7c05fa2d1..2e3098567 100644 --- a/include/mv_base.h +++ b/include/mv_base.h @@ -28,7 +28,7 @@ #include -#include "types.h" +#include "export.h" class modelView; diff --git a/include/pattern.h b/include/pattern.h index 96d64be7e..6ff0507a8 100644 --- a/include/pattern.h +++ b/include/pattern.h @@ -50,7 +50,7 @@ class sampleBuffer; -class pattern : public trackContentObject +class EXPORT pattern : public trackContentObject { Q_OBJECT public: diff --git a/include/project_notes.h b/include/project_notes.h index d0a4f9de5..1ade30c5f 100644 --- a/include/project_notes.h +++ b/include/project_notes.h @@ -37,7 +37,7 @@ class QTextCharFormat; class QTextEdit; -class projectNotes : public QMainWindow, public journallingObject +class EXPORT projectNotes : public QMainWindow, public journallingObject { Q_OBJECT public: @@ -47,9 +47,8 @@ public: void clear( void ); void setText( const QString & _text ); - virtual void FASTCALL saveSettings( QDomDocument & _doc, - QDomElement & _parent ); - virtual void FASTCALL loadSettings( const QDomElement & _this ); + virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); + virtual void loadSettings( const QDomElement & _this ); inline virtual QString nodeName( void ) const { return( "projectnotes" ); diff --git a/include/string_pair_drag.h b/include/string_pair_drag.h index d4bdb54b8..5a3316e6e 100644 --- a/include/string_pair_drag.h +++ b/include/string_pair_drag.h @@ -30,7 +30,7 @@ #include #include -#include "types.h" +#include "export.h" class QPixmap; diff --git a/include/tab_bar.h b/include/tab_bar.h index 0525db9fc..ae5ff7c9a 100644 --- a/include/tab_bar.h +++ b/include/tab_bar.h @@ -1,7 +1,7 @@ /* * tab_bar.h - class tabBar * - * Copyright (c) 2004-2007 Tobias Doerffel + * Copyright (c) 2004-2008 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -30,6 +30,8 @@ #include #endif +#include "export.h" + #include #include #include @@ -38,7 +40,7 @@ class tabButton; -class tabBar : public QWidget +class EXPORT tabBar : public QWidget { Q_OBJECT public: diff --git a/include/tool.h b/include/tool.h index 350994d12..6b25686b2 100644 --- a/include/tool.h +++ b/include/tool.h @@ -31,7 +31,7 @@ #include "plugin_view.h" -class tool : public plugin +class EXPORT tool : public plugin { public: tool( const descriptor * _descriptor, model * _parent ); @@ -46,7 +46,7 @@ public: -class toolView : public pluginView +class EXPORT toolView : public pluginView { public: toolView( tool * _tool ); diff --git a/include/tooltip.h b/include/tooltip.h index 91a52c136..b88938196 100644 --- a/include/tooltip.h +++ b/include/tooltip.h @@ -28,7 +28,7 @@ #include -#include "types.h" +#include "export.h" class QWidget; diff --git a/include/track_container.h b/include/track_container.h index c6f91ac79..6eb3c597c 100644 --- a/include/track_container.h +++ b/include/track_container.h @@ -35,7 +35,7 @@ class trackContainerView; class instrumentTrack; -class trackContainer : public model, public journallingObject +class EXPORT trackContainer : public model, public journallingObject { Q_OBJECT public: diff --git a/include/types.h b/include/types.h index 6ac512bec..ef816e8b8 100644 --- a/include/types.h +++ b/include/types.h @@ -74,25 +74,4 @@ struct valueRanges } ; -#ifdef HAVE_CONFIG_H -#include -#endif - - -#ifdef BUILD_WIN32 - -#ifdef PLUGIN_NAME -#define EXPORT __declspec(dllimport) -#define PLUGIN_EXPORT __declspec(dllexport) -#else -#define EXPORT __declspec(dllexport) -#endif - -#else - -#define EXPORT -#define PLUGIN_EXPORT - -#endif - #endif diff --git a/src/3rdparty/samplerate/samplerate.h b/src/3rdparty/samplerate/samplerate.h index 9651e6357..160b8bd59 100644 --- a/src/3rdparty/samplerate/samplerate.h +++ b/src/3rdparty/samplerate/samplerate.h @@ -30,6 +30,8 @@ #ifndef SAMPLERATE_H #define SAMPLERATE_H +#include "export.h" + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -73,7 +75,7 @@ typedef long (*src_callback_t) (void *cb_data, float **data) ; ** Error returned in *error. */ -SRC_STATE* src_new (int converter_type, int channels, int *error) ; +SRC_STATE* EXPORT src_new (int converter_type, int channels, int *error) ; /* ** Initilisation for callback based API : return an anonymous pointer to the @@ -91,14 +93,14 @@ SRC_STATE* src_callback_new (src_callback_t func, int converter_type, int channe ** Always returns NULL. */ -SRC_STATE* src_delete (SRC_STATE *state) ; +SRC_STATE* EXPORT src_delete (SRC_STATE *state) ; /* ** Standard processing function. ** Returns non zero on error. */ -int src_process (SRC_STATE *state, SRC_DATA *data) ; +int EXPORT src_process (SRC_STATE *state, SRC_DATA *data) ; /* ** Callback based processing function. Read up to frames worth of data from @@ -161,7 +163,7 @@ int src_error (SRC_STATE *state) ; /* ** Convert the error number into a string. */ -const char* src_strerror (int error) ; +const char* EXPORT src_strerror (int error) ; /* ** The following enums can be used to set the interpolator type