[libkdecorations] Generate an export header

REVIEW: 114247
This commit is contained in:
Jacob Logan 2013-12-04 20:31:52 +11:00 committed by Martin Gräßlin
parent a4169ae35f
commit 199ed87c61
7 changed files with 18 additions and 13 deletions

View file

@ -78,6 +78,7 @@ configure_file(config-kwin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwin.h )
########### global ###############
include_directories(BEFORE
${CMAKE_CURRENT_BINARY_DIR}/libkdecorations
${CMAKE_CURRENT_BINARY_DIR}/libkwineffects
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/libkwineffects

View file

@ -564,10 +564,10 @@ void AuroraeClient::render(QPaintDevice *device, const QRegion &sourceRegion)
extern "C"
{
KDE_EXPORT KDecorationFactory *create_factory() {
KDECORATIONS_EXPORT KDecorationFactory *create_factory() {
return Aurorae::AuroraeFactory::instance();
}
KWIN_EXPORT int decoration_version() {
KDECORATIONS_EXPORT int decoration_version() {
return KWIN_DECORATION_API_VERSION;
}
}

View file

@ -8,7 +8,7 @@ set(kdecorations_LIB_SRCS
kcommondecoration_p.cpp )
add_library(kdecorations SHARED ${kdecorations_LIB_SRCS})
generate_export_header(kdecorations EXPORT_FILE_NAME kdecorations_export.h)
target_link_libraries(kdecorations
Qt5::Widgets
Qt5::X11Extras
@ -30,4 +30,5 @@ install( FILES
kdecoration.h
kdecorationfactory.h
kcommondecoration.h
${CMAKE_CURRENT_BINARY_DIR}/kdecorations_export.h
DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel )

View file

@ -27,6 +27,7 @@
#include <QAbstractButton>
#include "kdecoration.h"
#include <kdecorations_export.h>
/** @addtogroup kdecoration */
/** @{ */
@ -65,7 +66,7 @@ class KCommonDecorationWrapper;
* use the decoration() function.
* See KDecoration documentation for all the wrapped functions.
*/
class KWIN_EXPORT KCommonDecoration : public QObject, public KDecorationDefines
class KDECORATIONS_EXPORT KCommonDecoration : public QObject, public KDecorationDefines
{
Q_OBJECT
@ -424,7 +425,7 @@ private:
/**
* Title bar buttons of KCommonDecoration need to inherit this class.
*/
class KWIN_EXPORT KCommonDecorationButton : public QAbstractButton
class KDECORATIONS_EXPORT KCommonDecorationButton : public QAbstractButton
{
Q_OBJECT

View file

@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE.
#ifndef KDECORATION_H
#define KDECORATION_H
#include <kwinglobals.h>
#include <kdecorations_export.h>
#include <QtGui/QColor>
#include <QtGui/QFont>
@ -43,8 +43,8 @@ DEALINGS IN THE SOFTWARE.
**/
#define KWIN_DECORATION( classname ) \
extern "C" { \
KWIN_EXPORT KDecorationFactory* create_factory() { return new classname(); } \
KWIN_EXPORT int decoration_version() { return KWIN_DECORATION_API_VERSION; } \
KDECORATIONS_EXPORT KDecorationFactory* create_factory() { return new classname(); } \
KDECORATIONS_EXPORT int decoration_version() { return KWIN_DECORATION_API_VERSION; } \
}
#define KWIN_DECORATION_BRIDGE_API_VERSION 1
@ -69,7 +69,7 @@ class KDecorationFactory;
* This class provides a namespace for all decoration related classes.
* All shared types are defined here.
*/
class KWIN_EXPORT KDecorationDefines
class KDECORATIONS_EXPORT KDecorationDefines
{
public:
/**
@ -285,7 +285,7 @@ public:
* It is accessible from the decorations either as KDecoration::options()
* or KDecorationFactory::options().
*/
class KWIN_EXPORT KDecorationOptions : public QObject, public KDecorationDefines
class KDECORATIONS_EXPORT KDecorationOptions : public QObject, public KDecorationDefines
{
Q_OBJECT
public:
@ -520,7 +520,7 @@ private:
* provides pure virtual functions for controlling the decoration that
* every decoration should implement.
*/
class KWIN_EXPORT KDecoration
class KDECORATIONS_EXPORT KDecoration
: public QObject, public KDecorationDefines
{
Q_OBJECT

View file

@ -36,13 +36,14 @@ DEALINGS IN THE SOFTWARE.
#include <ksharedconfig.h>
#include "kdecoration.h"
#include <kdecorations_export.h>
class KLibrary;
class KDecoration;
class KDecorationBridge;
class KDecorationFactory;
class KWIN_EXPORT KDecorationPlugins
class KDECORATIONS_EXPORT KDecorationPlugins
: public KDecorationProvides
{
public:

View file

@ -26,6 +26,7 @@ DEALINGS IN THE SOFTWARE.
#define KDECORATIONFACTORY_H
#include "kdecoration.h"
#include <kdecorations_export.h>
/** @addtogroup kdecoration */
/** @{ */
@ -34,7 +35,7 @@ class KDecoration;
class KDecorationBridge;
class KDecorationFactoryPrivate;
class KWIN_EXPORT KDecorationFactory
class KDECORATIONS_EXPORT KDecorationFactory
: public QObject, public KDecorationDefines
{
Q_OBJECT