Now kwinadaptor is autogenerated and adaptor is registred

now we can use dbus interface to change it.
CCMAIL: l.lunak@kde.org
(Lubos could you merge it with your branch please .Thanks)

svn path=/trunk/KDE/kdebase/workspace/; revision=614882
This commit is contained in:
Laurent Montel 2006-12-19 10:43:49 +00:00
parent ca449ecaee
commit c5efec7d9c
4 changed files with 9 additions and 243 deletions

View file

@ -8,18 +8,13 @@ add_subdirectory( pics )
add_subdirectory( clients )
add_subdirectory( data )
include_directories(
${CMAKE_CURRENT_BINARY_DIR}/lib
${CMAKE_CURRENT_SOURCE_DIR}/lib
${CMAKE_CURRENT_SOURCE_DIR}/effects
)
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/lib ${CMAKE_CURRENT_SOURCE_DIR}/lib )
########### next target ###############
set(kwin_KDEINIT_SRCS
kwinadaptor.cpp
workspace.cpp
client.cpp
placement.cpp
@ -42,100 +37,27 @@ set(kwin_KDEINIT_SRCS
activation.cpp
useractions.cpp
geometry.cpp
rules.cpp
composite.cpp
toplevel.cpp
unmanaged.cpp
scene.cpp
scene_basic.cpp
scene_xrender.cpp
scene_opengl.cpp
glutils.cpp
effects.cpp
effects/fadein.cpp
effects/maketransparent.cpp
effects/scalein.cpp
effects/shakymove.cpp
effects/shiftworkspaceup.cpp
effects/howto.cpp
effects/dialogparent.cpp
effects/showfps.cpp
effects/zoom.cpp
)
rules.cpp )
kde4_automoc(kwin ${kwin_KDEINIT_SRCS})
qt4_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.KWin.xml workspace.h KWinInternal::Workspace )
kde4_automoc(${kwin_KDEINIT_SRCS})
kde4_add_kdeinit_executable( kwin ${kwin_KDEINIT_SRCS})
target_link_libraries(kdeinit_kwin ${KDE4_KDEUI_LIBS} kdecorations ${X11_LIBRARIES} ${QT_QT3SUPPORT_LIBRARY} )
target_link_libraries(kdeinit_kwin -lGL)
# -ldl used by OpenGL code
target_link_libraries(kdeinit_kwin -ldl)
if (X11_Xrandr_FOUND)
target_link_libraries(kdeinit_kwin ${X11_Xrandr_LIB})
endif (X11_Xrandr_FOUND)
if (X11_Xcomposite_FOUND)
target_link_libraries(kdeinit_kwin ${X11_Xcomposite_LIB})
endif (X11_Xcomposite_FOUND)
if (X11_Xdamage_FOUND)
target_link_libraries(kdeinit_kwin ${X11_Xdamage_LIB})
endif (X11_Xdamage_FOUND)
if (X11_Xrender_FOUND)
target_link_libraries(kdeinit_kwin ${X11_Xrender_LIB})
endif (X11_Xrender_FOUND)
if (X11_Xfixes_FOUND)
target_link_libraries(kdeinit_kwin ${X11_Xfixes_LIB})
endif (X11_Xfixes_FOUND)
install(TARGETS kdeinit_kwin DESTINATION ${LIB_INSTALL_DIR} )
target_link_libraries( kwin kdeinit_kwin )
install(TARGETS kwin DESTINATION bin)
install(TARGETS kwin DESTINATION ${BIN_INSTALL_DIR})
########### install files ###############
install( FILES kwin.kcfg DESTINATION ${KCFG_INSTALL_DIR} )
install( FILES eventsrc DESTINATION ${DATA_INSTALL_DIR}/kwin )
kde4_install_icons( ${ICON_INSTALL_DIR} crystalsvg )
kde4_install_icons( ${ICON_INSTALL_DIR} )
#original Makefile.am contents follow:
#INCLUDES = -I$(srcdir)/lib $(all_includes)
#
#SUBDIRS = lib . killer kcmkwin pics clients oldheaders data
#
#bin_PROGRAMS =
#lib_LTLIBRARIES =
#kdeinit_LTLIBRARIES = kwin.la
#
#kwin_la_SOURCES = workspace.cpp client.cpp placement.cpp atoms.cpp \
# utils.cpp layers.cpp main.cpp popupinfo.cpp tabbox.cpp \
# options.cpp plugins.cpp events.cpp KWinInterface.skel \
# killwindow.cpp geometrytip.cpp sm.cpp group.cpp bridge.cpp \
# manage.cpp notifications.cpp activation.cpp useractions.cpp \
# geometry.cpp rules.cpp
#
#kwin_la_LIBADD = $(LIB_KDEUI) lib/libkdecorations.la
#kwin_la_LDFLAGS = $(all_libraries) -module -avoid-version
#
#include_HEADERS = KWinInterface.h
#
#KDE_ICON = kwin
#
#METASOURCES = AUTO
#
#messages: rc.cpp
# $(XGETTEXT) *.h *.cpp killer/*.cpp lib/*.cpp -o $(podir)/kwin.pot
#
#kwin_datadir = $(kde_datadir)/kwin
#
#kwin_data_DATA= eventsrc
#
#kde_kcfg_DATA = kwin.kcfg
#
#include ../../admin/Doxyfile.am

View file

@ -1,28 +0,0 @@
/*
* This file was generated by dbusxml2cpp version 0.6
* Command line was: dbusxml2cpp -c KWinAdaptor -m -p kwinadaptor -- org.kde.KWin.xml
*
* dbusxml2cpp is Copyright (C) 2006 Trolltech AS. All rights reserved.
*
* This is an auto-generated file.
* This file may have been hand-edited. Look for HAND-EDIT comments
* before re-generating it.
*/
#include "kwinadaptor.h"
/*
* Implementation of interface class KWinAdaptor
*/
KWinAdaptor::KWinAdaptor(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
: QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
{
}
KWinAdaptor::~KWinAdaptor()
{
}
#include "kwinadaptor.moc"

View file

@ -1,129 +0,0 @@
/*
* This file was generated by dbusxml2cpp version 0.6
* Command line was: dbusxml2cpp -c KWinAdaptor -m -p kwinadaptor -- org.kde.KWin.xml
*
* dbusxml2cpp is Copyright (C) 2006 Trolltech AS. All rights reserved.
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*/
#ifndef KWINADAPTOR_H_276481152054086
#define KWINADAPTOR_H_276481152054086
#include <QtCore/QObject>
#include <QtCore/QByteArray>
#include <QtCore/QList>
#include <QtCore/QMap>
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QtCore/QVariant>
#include <QtDBus/QtDBus>
/*
* Proxy class for interface org.kde.KWin
*/
class KWinAdaptor: public QDBusAbstractInterface
{
Q_OBJECT
public:
static inline const char *staticInterfaceName()
{ return "org.kde.KWin"; }
public:
KWinAdaptor(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
~KWinAdaptor();
public Q_SLOTS: // METHODS
inline Q_NOREPLY void cascadeDesktop()
{
QList<QVariant> argumentList;
callWithArgumentList(QDBus::NoBlock, QLatin1String("cascadeDesktop"), argumentList);
}
inline QDBusReply<void> circulateDesktopApplications()
{
QList<QVariant> argumentList;
return callWithArgumentList(QDBus::Block, QLatin1String("circulateDesktopApplications"), argumentList);
}
inline QDBusReply<int> currentDesktop()
{
QList<QVariant> argumentList;
return callWithArgumentList(QDBus::Block, QLatin1String("currentDesktop"), argumentList);
}
inline QDBusReply<void> doNotManage(const QString &name)
{
QList<QVariant> argumentList;
argumentList << qVariantFromValue(name);
return callWithArgumentList(QDBus::Block, QLatin1String("doNotManage"), argumentList);
}
inline Q_NOREPLY void killWindow()
{
QList<QVariant> argumentList;
callWithArgumentList(QDBus::NoBlock, QLatin1String("killWindow"), argumentList);
}
inline QDBusReply<void> nextDesktop()
{
QList<QVariant> argumentList;
return callWithArgumentList(QDBus::Block, QLatin1String("nextDesktop"), argumentList);
}
inline QDBusReply<void> previousDesktop()
{
QList<QVariant> argumentList;
return callWithArgumentList(QDBus::Block, QLatin1String("previousDesktop"), argumentList);
}
inline Q_NOREPLY void reconfigure()
{
QList<QVariant> argumentList;
callWithArgumentList(QDBus::NoBlock, QLatin1String("reconfigure"), argumentList);
}
inline QDBusReply<void> refresh()
{
QList<QVariant> argumentList;
return callWithArgumentList(QDBus::Block, QLatin1String("refresh"), argumentList);
}
inline QDBusReply<bool> setCurrentDesktop(int desktop)
{
QList<QVariant> argumentList;
argumentList << qVariantFromValue(desktop);
return callWithArgumentList(QDBus::Block, QLatin1String("setCurrentDesktop"), argumentList);
}
inline QDBusReply<void> setDesktopLayout(int orientation, int x, int y)
{
QList<QVariant> argumentList;
argumentList << qVariantFromValue(orientation) << qVariantFromValue(x) << qVariantFromValue(y);
return callWithArgumentList(QDBus::Block, QLatin1String("setDesktopLayout"), argumentList);
}
inline QDBusReply<void> showWindowMenuAt(qlonglong winId, int x, int y)
{
QList<QVariant> argumentList;
argumentList << qVariantFromValue(winId) << qVariantFromValue(x) << qVariantFromValue(y);
return callWithArgumentList(QDBus::Block, QLatin1String("showWindowMenuAt"), argumentList);
}
inline Q_NOREPLY void unclutterDesktop()
{
QList<QVariant> argumentList;
callWithArgumentList(QDBus::NoBlock, QLatin1String("unclutterDesktop"), argumentList);
}
Q_SIGNALS: // SIGNALS
};
namespace org {
namespace kde {
typedef ::KWinAdaptor KWin;
}
}
#endif

View file

@ -124,7 +124,8 @@ Workspace::Workspace( bool restore )
block_stacking_updates( 0 ),
forced_global_mouse_grab( false )
{
new KWinAdaptor( "org.kde.kwin", "/KWin", QDBusConnection::sessionBus(), this );
(void) new KWinAdaptor( this );
QDBusConnection::sessionBus().registerObject("/KWin", this);
_self = this;
mgr = new PluginMgr;