#define MSP_GRAPHICS_BMPLOADER_H_
#include <msp/graphics/imageloader.h>
+#include "mspgui_api.h"
namespace Msp {
namespace Graphics {
-class BmpLoader: public ImageLoader
+class MSPGUI_API BmpLoader: public ImageLoader
{
private:
IO::Base &io;
#define MSP_GRAPHICS_DEVILLOADER_H_
#include <msp/graphics/imageloader.h>
+#include <msp/graphics/mspgui_api.h>
namespace Msp {
namespace Graphics {
-class DevilLoader: public ImageLoader
+class MSPGUI_API DevilLoader: public ImageLoader
{
private:
IO::Base &io;
#include <sigc++/signal.h>
#include "errordialog.h"
#include "monitor.h"
+#include "mspgui_api.h"
#include "videomode.h"
namespace Msp {
class Window;
-class Display
+class MSPGUI_API Display
{
public:
struct Private;
#define MSP_GRAPHICS_GLCONTEXT_H_
#include <stdexcept>
+#include "mspgui_api.h"
namespace Msp {
namespace Graphics {
};
-class unsupported_gl_mode: public std::runtime_error
+class MSPGUI_API unsupported_gl_mode: public std::runtime_error
{
public:
unsupported_gl_mode(const GLOptions &);
};
-class GLContext
+class MSPGUI_API GLContext
{
private:
struct Private;
#include <stdexcept>
#include <string>
#include <msp/io/seekable.h>
+#include "mspgui_api.h"
#include "pixelformat.h"
namespace Msp {
class ImageLoader;
-class Image
+class MSPGUI_API Image
{
public:
struct Data
#define MSP_GRAPHICS_IMAGELOADER_H_
#include "image.h"
+#include "mspgui_api.h"
namespace Msp {
namespace Graphics {
-class unsupported_image_format: public std::runtime_error
+class MSPGUI_API unsupported_image_format: public std::runtime_error
{
public:
unsupported_image_format(const std::string &w): std::runtime_error(w) { }
};
-class bad_image_data: public std::runtime_error
+class MSPGUI_API bad_image_data: public std::runtime_error
{
public:
bad_image_data(const std::string &w): std::runtime_error(w) { }
};
-class ImageLoader
+class MSPGUI_API ImageLoader
{
public:
enum State
#define MSP_GRAPHICS_JPEGLOADER_H_
#include <msp/graphics/imageloader.h>
+#include <msp/graphics/mspgui_api.h>
namespace Msp {
namespace Graphics {
-class JpegLoader: public ImageLoader
+class MSPGUI_API JpegLoader: public ImageLoader
{
private:
struct Private;
--- /dev/null
+#ifndef MSP_GUI_API_H_
+#define MSP_GUI_API_H_
+
+#if defined(_WIN32)
+#if defined(MSPGUI_BUILD)
+#define MSPGUI_API __declspec(dllexport)
+#elif defined(MSPGUI_IMPORT)
+#define MSPGUI_API __declspec(dllimport)
+#else
+#define MSPGUI_API
+#endif
+#elif defined(__GNUC__)
+#define MSPGUI_API __attribute__((visibility("default")))
+#else
+#define MSPGUI_API
+#endif
+
+#endif
#define MSP_GRAPHICS_PNGLOADER_H_
#include <msp/graphics/imageloader.h>
+#include <msp/graphics/mspgui_api.h>
namespace Msp {
namespace Graphics {
-class PngLoader: public ImageLoader
+class MSPGUI_API PngLoader: public ImageLoader
{
private:
struct Private;
#define MSP_GRAPHICS_QUARTZLOADER_H_
#include <msp/graphics/imageloader.h>
+#include <msp/graphics/mspgui_api.h>
namespace Msp {
namespace Graphics {
-class QuartzLoader: public ImageLoader
+class MSPGUI_API QuartzLoader: public ImageLoader
{
private:
struct Private;
#include "display.h"
#include "glcontext.h"
+#include "mspgui_api.h"
#include "window.h"
namespace Msp {
/**
Helper class for SimpleWindow.
*/
-class SimpleWindowBase
+class MSPGUI_API SimpleWindowBase
{
protected:
Display dpy;
/**
A simplified Window that encapsulates a Display.
*/
-class SimpleWindow: public SimpleWindowBase, public Window
+class MSPGUI_API SimpleWindow: public SimpleWindowBase, public Window
{
public:
SimpleWindow(unsigned, unsigned, bool =false);
/**
A SimpleWindow bundled with a GLContext.
*/
-class SimpleGLWindow: public SimpleWindow
+class MSPGUI_API SimpleGLWindow: public SimpleWindow
{
private:
GLContext gl_ctx;
#define MSP_GRAPHICS_VIDEOMODE_H_
#include <stdexcept>
+#include "mspgui_api.h"
namespace Msp {
namespace Graphics {
struct Monitor;
struct VideoMode;
-class unsupported_video_mode: public std::runtime_error
+class MSPGUI_API unsupported_video_mode: public std::runtime_error
{
public:
unsupported_video_mode(const VideoMode &);
ROTATE_INVERTED
};
-struct VideoMode
+struct MSPGUI_API VideoMode
{
unsigned index = 0;
const Monitor *monitor = nullptr;
#include <stdexcept>
#include <string>
+#include "mspgui_api.h"
namespace Msp {
namespace Graphics {
class Display;
class Window;
-class vulkan_error: public std::runtime_error
+class MSPGUI_API vulkan_error: public std::runtime_error
{
public:
vulkan_error(unsigned, const char *);
bool enable_tessellation_shader = false;
};
-class VulkanContext
+class MSPGUI_API VulkanContext
{
private:
struct Private;
#include <string>
#include <sigc++/signal.h>
+#include "mspgui_api.h"
namespace Msp {
namespace Graphics {
bool resizable = false;
};
-class Window
+class MSPGUI_API Window
{
public:
struct Private;
#ifndef MSP_INPUT_BINARYCONTROL_H_
#define MSP_INPUT_BINARYCONTROL_H_
+#include <msp/graphics/mspgui_api.h>
#include "control.h"
namespace Msp {
is considered to be active when its value is above a threshold (0.5 by
default).
*/
-class BinaryControl: public Control
+class MSPGUI_API BinaryControl: public Control
{
public:
sigc::signal<void> signal_press;
#define MSP_INPUT_BINDINGS_H_
#include <msp/datafile/objectloader.h>
+#include <msp/graphics/mspgui_api.h>
#include <msp/strings/lexicalcast.h>
#include "control.h"
#include "device.h"
class ControlScheme;
-class Bindings
+class MSPGUI_API Bindings
{
public:
- class Loader: public DataFile::ObjectLoader<Bindings>
+ class MSPGUI_API Loader: public DataFile::ObjectLoader<Bindings>
{
private:
static ActionMap shared_actions;
#include <string>
#include <sigc++/signal.h>
#include <sigc++/trackable.h>
+#include <msp/graphics/mspgui_api.h>
namespace Msp {
namespace Input {
Specifies the source of a control. This provides a way for setting sources for
different types of controls in a uniform way.
*/
-struct ControlSource
+struct MSPGUI_API ControlSource
{
Device *dev = nullptr;
ControlSrcType type = NO_SOURCE;
controls (when used on a BinaryControl) or click-and-drag functionality (when
used on a SmoothControl).
*/
-class Control: public sigc::trackable
+class MSPGUI_API Control: public sigc::trackable
{
public:
sigc::signal<void> signal_capture_complete;
#include <map>
#include <string>
+#include <msp/graphics/mspgui_api.h>
namespace Msp {
namespace Input {
class Control;
-class ControlScheme
+class MSPGUI_API ControlScheme
{
private:
std::map<std::string, Control *> controls;
#include <vector>
#include <stdexcept>
#include <sigc++/signal.h>
+#include <msp/graphics/mspgui_api.h>
#include <msp/strings/lexicalcast.h>
namespace Msp {
namespace Input {
-class device_not_available: public std::runtime_error
+class MSPGUI_API device_not_available: public std::runtime_error
{
public:
device_not_available(const std::string &w): std::runtime_error(w) { }
Event handlers return a boolean indicating whether the event is considered
processed. If a handler returns true, no further handlers are invoked.
*/
-class Device
+class MSPGUI_API Device
{
protected:
struct EventAccumulator
};
-void operator>>(const LexicalConverter &, DeviceType &);
-void operator<<(LexicalConverter &, DeviceType);
+MSPGUI_API void operator>>(const LexicalConverter &, DeviceType &);
+MSPGUI_API void operator<<(LexicalConverter &, DeviceType);
} // namespace Input
} // namespace Msp
#ifndef MSP_INPUT_GAMECONTROLLER_H_
#define MSP_INPUT_GAMECONTROLLER_H_
+#include <msp/graphics/mspgui_api.h>
#include <msp/io/eventdispatcher.h>
#include <msp/time/timedelta.h>
#include "device.h"
namespace Msp {
namespace Input {
-class GameController: public Device
+class MSPGUI_API GameController: public Device
{
private:
struct Private;
#ifndef MSP_INPUT_GESTUREDETECTOR_H_
#define MSP_INPUT_GESTUREDETECTOR_H_
+#include <msp/graphics/mspgui_api.h>
#include "device.h"
namespace Msp {
of the gesture; axes 2 and 3 track its progress. The progress axis may exhibit
absolute values greater than one.
*/
-class GestureDetector: public Device
+class MSPGUI_API GestureDetector: public Device
{
private:
static constexpr size_t MAX_POINTS = 3;
};
-unsigned gesture_points(Gesture);
+MSPGUI_API unsigned gesture_points(Gesture);
} // namespace Input
} // namespace Msp
#include <vector>
#include <sigc++/trackable.h>
+#include <msp/graphics/mspgui_api.h>
#include "device.h"
namespace Msp {
The Hub device collects events from multiple input devices and presents an
aggregate of them. Button and axis numbers are mapped to unique values.
*/
-class Hub: public Device, public sigc::trackable
+class MSPGUI_API Hub: public Device, public sigc::trackable
{
protected:
std::vector<Device *> devices;
#define MSP_INPUT_KEYBOARD_H_
#include <sigc++/trackable.h>
+#include <msp/graphics/mspgui_api.h>
#include <msp/graphics/window.h>
#include <msp/stringcodec/ustring.h>
#include "device.h"
Adapts key events from a window to the abstracted input framework. Key codes
are translated to platform-independent values. See keys.h for a list.
*/
-class Keyboard: public Device, public sigc::trackable
+class MSPGUI_API Keyboard: public Device, public sigc::trackable
{
public:
sigc::signal<bool, StringCodec::unichar>::accumulated<EventAccumulator> signal_character;
#ifndef MSP_INPUT_KEYS_H_
#define MSP_INPUT_KEYS_H_
+#include <msp/graphics/mspgui_api.h>
#include <msp/strings/lexicalcast.h>
namespace Msp {
MOUSE_WHEEL_DOWN
};
-void operator>>(const LexicalConverter &, Key &);
-void operator<<(LexicalConverter &, Key);
-void operator>>(const LexicalConverter &, MouseAxis &);
-void operator<<(LexicalConverter &, MouseAxis);
-void operator>>(const LexicalConverter &, MouseButton &);
-void operator<<(LexicalConverter &, MouseButton);
+MSPGUI_API void operator>>(const LexicalConverter &, Key &);
+MSPGUI_API void operator<<(LexicalConverter &, Key);
+MSPGUI_API void operator>>(const LexicalConverter &, MouseAxis &);
+MSPGUI_API void operator<<(LexicalConverter &, MouseAxis);
+MSPGUI_API void operator>>(const LexicalConverter &, MouseButton &);
+MSPGUI_API void operator<<(LexicalConverter &, MouseButton);
} // namespace Input
} // namespace Msp
#define MSP_INPUT_MOUSE_H_
#include <sigc++/trackable.h>
+#include <msp/graphics/mspgui_api.h>
#include <msp/graphics/window.h>
#include "device.h"
Note: Y axis grows upwards.
*/
-class Mouse: public Device, public sigc::trackable
+class MSPGUI_API Mouse: public Device, public sigc::trackable
{
private:
Graphics::Window &window;
#ifndef MSP_INPUT_SMOOTHCONTROL_H_
#define MSP_INPUT_SMOOTHCONTROL_H_
+#include <msp/graphics/mspgui_api.h>
#include "control.h"
namespace Msp {
the pair will cause negative motion on the other. This works best when the
controls are bound to the opposite sides of the same axis.
*/
-class SmoothControl: public Control
+class MSPGUI_API SmoothControl: public Control
{
public:
sigc::signal<void, float> signal_motion;
#define MSP_INPUT_TOUCHSCREEN_H_
#include <sigc++/trackable.h>
+#include <msp/graphics/mspgui_api.h>
#include <msp/graphics/window.h>
#include "device.h"
namespace Msp {
namespace Input {
-class Touchscreen: public Device, public sigc::trackable
+class MSPGUI_API Touchscreen: public Device, public sigc::trackable
{
private:
static constexpr unsigned UNUSED = static_cast<unsigned>(-1);