endif()
add_subdirectory( clients )
-add_subdirectory( effects )
add_subdirectory( tabbox )
+# Install the KWin/Effect service type
+install(FILES effects/kwineffect.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR})
+
+# Create initial variables
+set(kwin4_effect_builtins_sources)
+set(kwin4_effect_builtins_config_sources effects/configs_builtins.cpp)
+set(kwin4_effect_include_directories)
+
+include( effects/kscreen/CMakeLists.txt )
+include( effects/presentwindows/CMakeLists.txt )
+include( effects/screenedge/CMakeLists.txt )
+include( effects/slidingpopups/CMakeLists.txt )
+include( effects/taskbarthumbnail/CMakeLists.txt )
+include( effects/dashboard/CMakeLists.txt )
+include( effects/diminactive/CMakeLists.txt )
+include( effects/dimscreen/CMakeLists.txt )
+include( effects/highlightwindow/CMakeLists.txt )
+include( effects/minimizeanimation/CMakeLists.txt )
+include( effects/resize/CMakeLists.txt )
+include( effects/showfps/CMakeLists.txt )
+include( effects/showpaint/CMakeLists.txt )
+include( effects/slide/CMakeLists.txt )
+include( effects/slideback/CMakeLists.txt )
+include( effects/thumbnailaside/CMakeLists.txt )
+include( effects/windowgeometry/CMakeLists.txt )
+include( effects/zoom/CMakeLists.txt )
+include( effects/logout/CMakeLists.txt )
+include( effects/magnifier/CMakeLists.txt )
+include( effects/mousemark/CMakeLists.txt )
+include( effects/snaphelper/CMakeLists.txt )
+include( effects/trackmouse/CMakeLists.txt )
+
+kde4_add_plugin(kcm_kwin4_effect_builtins ${kwin4_effect_builtins_config_sources})
+target_link_libraries(kcm_kwin4_effect_builtins kwineffects ${KDE4_KIO_LIBS} ${KDE4_KDEUI_LIBS})
+install(TARGETS kcm_kwin4_effect_builtins DESTINATION ${PLUGIN_INSTALL_DIR})
+
########### next target ###############
set(kwin_SRCS
add_definitions(-DKWIN_NO_XF86VM)
endif()
-add_executable(kwin ${kwin_SRCS})
+add_executable(kwin ${kwin_SRCS} ${kwin4_effect_builtins_sources})
target_link_libraries(kwin
${KDE4_KDEUI_LIBS}
// dbus generated
#include "screenlocker_interface.h"
+#include "effects/dashboard/dashboard.h"
+#include "effects/diminactive/diminactive.h"
+#include "effects/dimscreen/dimscreen.h"
+#include "effects/highlightwindow/highlightwindow.h"
+#include "effects/kscreen/kscreen.h"
+#include "effects/logout/logout.h"
+#include "effects/magnifier/magnifier.h"
+#include "effects/minimizeanimation/minimizeanimation.h"
+#include "effects/mousemark/mousemark.h"
+#include "effects/presentwindows/presentwindows.h"
+#include "effects/resize/resize.h"
+#include "effects/screenedge/screenedgeeffect.h"
+#include "effects/showfps/showfps.h"
+#include "effects/showpaint/showpaint.h"
+#include "effects/slide/slide.h"
+#include "effects/slideback/slideback.h"
+#include "effects/slidingpopups/slidingpopups.h"
+#include "effects/snaphelper/snaphelper.h"
+#include "effects/taskbarthumbnail/taskbarthumbnail.h"
+#include "effects/thumbnailaside/thumbnailaside.h"
+#include "effects/trackmouse/trackmouse.h"
+#include "effects/windowgeometry/windowgeometry.h"
+#include "effects/zoom/zoom.h"
namespace KWin
{
}
KService::Ptr service = offers.first();
- QLibrary* library = findEffectLibrary(service.data());
- if (!library) {
- return false;
- }
+ Effect* effect = 0;
+ QLibrary* library = 0;
+ // builtins first
+ if (internalname == "kwin4_effect_kscreen") {
+ effect = new KscreenEffect();
+ } else if (internalname == "kwin4_effect_presentwindows") {
+ effect = new PresentWindowsEffect();
+ } else if (internalname == "kwin4_effect_screenedge") {
+ effect = new ScreenEdgeEffect();
+ } else if (internalname == "kwin4_effect_slidingpopups") {
+ effect = new SlidingPopupsEffect();
+ } else if (internalname == "kwin4_effect_taskbarthumbnail") {
+ effect = new TaskbarThumbnailEffect();
+ } else if (internalname == "kwin4_effect_dashboard") {
+ effect = new DashboardEffect();
+ } else if (internalname == "kwin4_effect_diminactive") {
+ effect = new DimInactiveEffect();
+ } else if (internalname == "kwin4_effect_dimscreen") {
+ effect = new DimScreenEffect();
+ } else if (internalname == "kwin4_effect_highlightwindow") {
+ effect = new HighlightWindowEffect();
+ } else if (internalname == "kwin4_effect_minimizeanimation") {
+ effect = new MinimizeAnimationEffect();
+ } else if (internalname == "kwin4_effect_resize") {
+ effect = new ResizeEffect();
+ } else if (internalname == "kwin4_effect_showfps") {
+ effect = new ShowFpsEffect();
+ } else if (internalname == "kwin4_effect_showpaint") {
+ effect = new ShowPaintEffect();
+ } else if (internalname == "kwin4_effect_slide") {
+ effect = new SlideEffect();
+ } else if (internalname == "kwin4_effect_slideback") {
+ effect = new SlideBackEffect();
+ } else if (internalname == "kwin4_effect_thumbnailaside") {
+ effect = new ThumbnailAsideEffect();
+ } else if (internalname == "kwin4_effect_windowgeometry") {
+ effect = new WindowGeometryEffect();
+ } else if (internalname == "kwin4_effect_zoom") {
+ effect = new ZoomEffect();
+ } else if (internalname == "kwin4_effect_logout") {
+ effect = new LogoutEffect();
+ } else if (internalname == "kwin4_effect_magnifier") {
+ effect = new MagnifierEffect();
+ } else if (internalname == "kwin4_effect_mousemark") {
+ effect = new MouseMarkEffect();
+ } else if (internalname == "kwin4_effect_snaphelper") {
+ effect = new SnapHelperEffect();
+ } else if (internalname == "kwin4_effect_trackmouse") {
+ effect = new TrackMouseEffect();
+ }
+
+ if (effect) {
+ kDebug(1212) << "Effect is internal" << name;
+ bool enabledByDefault = service->property("X-KDE-PluginInfo-EnabledByDefault").toBool();
+ if (checkDefault && !enabledByDefault) {
+ delete effect;
+ return false;
+ }
+ // external second
+ } else {
+ kDebug(1212) << "Effect is external" << name;
+ library = findEffectLibrary(service.data());
+ if (!library) {
+ return false;
+ }
- QString version_symbol = "effect_version_" + name;
- void *version_func = library->resolve(version_symbol.toAscii());
- if (version_func == NULL) {
- kWarning(1212) << "Effect " << name << " does not provide required API version, ignoring.";
- delete library;
- return false;
- }
- typedef int (*t_versionfunc)();
- int version = reinterpret_cast< t_versionfunc >(version_func)(); // call it
- // Version must be the same or less, but major must be the same.
- // With major 0 minor must match exactly.
- if (version > KWIN_EFFECT_API_VERSION
- || (version >> 8) != KWIN_EFFECT_API_VERSION_MAJOR
- || (KWIN_EFFECT_API_VERSION_MAJOR == 0 && version != KWIN_EFFECT_API_VERSION)) {
- kWarning(1212) << "Effect " << name << " requires unsupported API version " << version;
- delete library;
- return false;
- }
+ QString version_symbol = "effect_version_" + name;
+ void *version_func = library->resolve(version_symbol.toAscii());
+ if (version_func == NULL) {
+ kWarning(1212) << "Effect " << name << " does not provide required API version, ignoring.";
+ delete library;
+ return false;
+ }
+ typedef int (*t_versionfunc)();
+ int version = reinterpret_cast< t_versionfunc >(version_func)(); // call it
+ // Version must be the same or less, but major must be the same.
+ // With major 0 minor must match exactly.
+ if (version > KWIN_EFFECT_API_VERSION
+ || (version >> 8) != KWIN_EFFECT_API_VERSION_MAJOR
+ || (KWIN_EFFECT_API_VERSION_MAJOR == 0 && version != KWIN_EFFECT_API_VERSION)) {
+ kWarning(1212) << "Effect " << name << " requires unsupported API version " << version;
+ delete library;
+ return false;
+ }
- const QString enabledByDefault_symbol = "effect_enabledbydefault_" + name;
- void *enabledByDefault_func = library->resolve(enabledByDefault_symbol.toAscii().data());
+ const QString enabledByDefault_symbol = "effect_enabledbydefault_" + name;
+ void *enabledByDefault_func = library->resolve(enabledByDefault_symbol.toAscii().data());
- const QString supported_symbol = "effect_supported_" + name;
- void *supported_func = library->resolve(supported_symbol.toAscii().data());
+ const QString supported_symbol = "effect_supported_" + name;
+ void *supported_func = library->resolve(supported_symbol.toAscii().data());
- const QString create_symbol = "effect_create_" + name;
- void *create_func = library->resolve(create_symbol.toAscii().data());
+ const QString create_symbol = "effect_create_" + name;
+ void *create_func = library->resolve(create_symbol.toAscii().data());
- if (supported_func) {
- typedef bool (*t_supportedfunc)();
- t_supportedfunc supported = reinterpret_cast<t_supportedfunc>(supported_func);
- if (!supported()) {
- kWarning(1212) << "EffectsHandler::loadEffect : Effect " << name << " is not supported" ;
- library->unload();
- return false;
+ if (supported_func) {
+ typedef bool (*t_supportedfunc)();
+ t_supportedfunc supported = reinterpret_cast<t_supportedfunc>(supported_func);
+ if (!supported()) {
+ kWarning(1212) << "EffectsHandler::loadEffect : Effect " << name << " is not supported" ;
+ library->unload();
+ return false;
+ }
}
- }
- if (checkDefault && enabledByDefault_func) {
- typedef bool (*t_enabledByDefaultfunc)();
- t_enabledByDefaultfunc enabledByDefault = reinterpret_cast<t_enabledByDefaultfunc>(enabledByDefault_func);
+ if (checkDefault && enabledByDefault_func) {
+ typedef bool (*t_enabledByDefaultfunc)();
+ t_enabledByDefaultfunc enabledByDefault = reinterpret_cast<t_enabledByDefaultfunc>(enabledByDefault_func);
- if (!enabledByDefault()) {
+ if (!enabledByDefault()) {
+ library->unload();
+ return false;
+ }
+ }
+
+ if (!create_func) {
+ kError(1212) << "EffectsHandler::loadEffect : effect_create function not found" << endl;
library->unload();
return false;
}
- }
- if (!create_func) {
- kError(1212) << "EffectsHandler::loadEffect : effect_create function not found" << endl;
- library->unload();
- return false;
- }
+ typedef Effect*(*t_createfunc)();
+ t_createfunc create = reinterpret_cast<t_createfunc>(create_func);
- typedef Effect*(*t_createfunc)();
- t_createfunc create = reinterpret_cast<t_createfunc>(create_func);
-
- // Make sure all depenedencies have been loaded
- // TODO: detect circular deps
- KPluginInfo plugininfo(service);
- QStringList dependencies = plugininfo.dependencies();
- foreach (const QString & depName, dependencies) {
- if (!loadEffect(depName)) {
- kError(1212) << "EffectsHandler::loadEffect : Couldn't load dependencies for effect " << name << endl;
- library->unload();
- return false;
+ // Make sure all depenedencies have been loaded
+ // TODO: detect circular deps
+ KPluginInfo plugininfo(service);
+ QStringList dependencies = plugininfo.dependencies();
+ foreach (const QString & depName, dependencies) {
+ if (!loadEffect(depName)) {
+ kError(1212) << "EffectsHandler::loadEffect : Couldn't load dependencies for effect " << name << endl;
+ library->unload();
+ return false;
+ }
}
- }
- Effect* e = create();
+ effect = create();
+ }
- effect_order.insert(service->property("X-KDE-Ordering").toInt(), EffectPair(name, e));
+ effect_order.insert(service->property("X-KDE-Ordering").toInt(), EffectPair(name, effect));
effectsChanged();
- effect_libraries[ name ] = library;
+ if (effect) {
+ kDebug(1212) << "Internal effect has been loaded" << name;
+ effect_factories[ name ] = effect;
+ } else if (library) {
+ kDebug(1212) << "External effect has been loaded" << name;
+ effect_libraries[ name ] = library;
+ }
return true;
}
delete it.value().second;
effect_order.remove(it.key());
effectsChanged();
- if (effect_libraries.contains(name)) {
+ if (effect_factories.contains(name)) {
+ delete effect_libraries[ name ];
+ } else if (effect_libraries.contains(name)) {
effect_libraries[ name ]->unload();
}
return;
+++ /dev/null
-set(kwin_effect_OWN_LIBS
- kwineffects
-)
-
-set(kwin_effect_KDE_LIBS
- ${KDE4_KDEUI_LIBS}
- ${KDE4_PLASMA_LIBS}
- ${KDE4_KDECLARATIVE_LIBS}
-)
-
-set(kwin_effect_QT_LIBS
- ${QT_QTDECLARATIVE_LIBRARY}
-)
-
-set(kwin_effect_XLIB_LIBS
- ${X11_X11_LIB}
- ${X11_Xcursor_LIB}
-)
-
-set(kwin_effect_XCB_LIBS
- ${XCB_XCB_LIBRARIES}
- ${X11_XCB_LIBRARIES}
- ${XCB_IMAGE_LIBRARIES}
- ${XCB_XFIXES_LIBRARIES}
-)
-
-if(KWIN_BUILD_COMPOSITE )
- set(kwin_effect_XCB_LIBS ${kwin_effect_XCB_LIBS} ${XCB_RENDER_LIBRARIES})
-endif()
-
-macro(KWIN4_ADD_EFFECT_BACKEND name)
- kde4_add_plugin(${name} ${ARGN})
- target_link_libraries(${name}
- ${kwin_effect_OWN_LIBS} ${kwin_effect_KDE_LIBS}
- ${kwin_effect_QT_LIBS} ${kwin_effect_XLIB_LIBS}
- ${kwin_effect_XCB_LIBS}
- )
-endmacro()
-
-# Adds effect plugin with given name. Sources are given after the name
-macro( KWIN4_ADD_EFFECT name )
- KWIN4_ADD_EFFECT_BACKEND(kwin4_effect_${name} ${ARGN})
- install( TARGETS kwin4_effect_${name} DESTINATION ${PLUGIN_INSTALL_DIR})
-endmacro()
-
-macro( KWIN4_ADD_EFFECT_CONFIG name )
- kde4_add_plugin(kcm_kwin4_effect_${name} ${ARGN})
- target_link_libraries(kcm_kwin4_effect_${name} kwineffects ${KDE4_KIO_LIBS} ${KDE4_KDEUI_LIBS})
- install(TARGETS kcm_kwin4_effect_${name} DESTINATION ${PLUGIN_INSTALL_DIR})
-endmacro()
-
-# Install the KWin/Effect service type
-install(FILES kwineffect.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR})
-
-# Create initial variables
-set(kwin4_effect_builtins_sources)
-set(kwin4_effect_builtins_config_sources configs_builtins.cpp)
-set(kwin4_effect_include_directories)
-
-###############################################################################
-# Built-in effects go here
-
-# Common effects
-include( kscreen/CMakeLists.txt )
-include( presentwindows/CMakeLists.txt )
-include( screenedge/CMakeLists.txt )
-include( slidingpopups/CMakeLists.txt )
-include( taskbarthumbnail/CMakeLists.txt )
-
-# Common effects only relevant to desktop
-include( dashboard/CMakeLists.txt )
-include( diminactive/CMakeLists.txt )
-include( dimscreen/CMakeLists.txt )
-include( highlightwindow/CMakeLists.txt )
-include( minimizeanimation/CMakeLists.txt )
-include( resize/CMakeLists.txt )
-include( showfps/CMakeLists.txt )
-include( showpaint/CMakeLists.txt )
-include( slide/CMakeLists.txt )
-include( slideback/CMakeLists.txt )
-include( thumbnailaside/CMakeLists.txt )
-include( windowgeometry/CMakeLists.txt )
-include( zoom/CMakeLists.txt )
-include( logout/CMakeLists.txt )
-include( magnifier/CMakeLists.txt )
-include( mousemark/CMakeLists.txt )
-include( snaphelper/CMakeLists.txt )
-include( trackmouse/CMakeLists.txt )
-
-###############################################################################
-
-# Add the builtins plugin
-KWIN4_ADD_EFFECT( builtins ${kwin4_effect_builtins_sources} )
-KWIN4_ADD_EFFECT_CONFIG( builtins ${kwin4_effect_builtins_config_sources} )
# Effect
# Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
- dashboard/dashboard.cpp
- dashboard/dashboard.cpp )
+set(kwin4_effect_builtins_sources
+ ${kwin4_effect_builtins_sources}
+ effects/dashboard/dashboard.cpp
+ effects/dashboard/dashboard.cpp
+)
-kde4_add_kcfg_files(kwin4_effect_builtins_sources dashboard/dashboardconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/dashboard/dashboardconfig.kcfgc)
# .desktop files
-install( FILES
- dashboard/dashboard.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/dashboard/dashboard.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
#######################################
# Config
# Source files
-set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
- dashboard/dashboard_config.cpp
- dashboard/dashboard_config.ui )
+set(kwin4_effect_builtins_config_sources
+ ${kwin4_effect_builtins_config_sources}
+ effects/dashboard/dashboard_config.cpp
+)
-kde4_add_kcfg_files(kwin4_effect_builtins_config_sources dashboard/dashboardconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_config_sources effects/dashboard/dashboardconfig.kcfgc)
-install( FILES
- dashboard/dashboard_config.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/dashboard/dashboard_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
-X-KDE-Library=kwin4_effect_builtins
X-KDE-Ordering=85
# Effect
# Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
- diminactive/diminactive.cpp
- )
+set(kwin4_effect_builtins_sources
+ ${kwin4_effect_builtins_sources}
+ effects/diminactive/diminactive.cpp
+)
-kde4_add_kcfg_files(kwin4_effect_builtins_sources diminactive/diminactiveconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/diminactive/diminactiveconfig.kcfgc)
# .desktop files
-install( FILES
- diminactive/diminactive.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/diminactive/diminactive.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
#######################################
# Config
# Source files
-set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
- diminactive/diminactive_config.cpp
- diminactive/diminactive_config.ui
- )
+set(kwin4_effect_builtins_config_sources
+ ${kwin4_effect_builtins_config_sources}
+ effects/diminactive/diminactive_config.cpp
+)
-kde4_add_kcfg_files(kwin4_effect_builtins_config_sources diminactive/diminactiveconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_config_sources effects/diminactive/diminactiveconfig.kcfgc)
# .desktop files
-install( FILES
- diminactive/diminactive_config.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/diminactive/diminactive_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=false
-X-KDE-Library=kwin4_effect_builtins
X-KDE-Ordering=50
# Effect
# Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
- dimscreen/dimscreen.cpp
- )
+set(kwin4_effect_builtins_sources
+ ${kwin4_effect_builtins_sources}
+ effects/dimscreen/dimscreen.cpp
+)
# .desktop files
-install( FILES
- dimscreen/dimscreen.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/dimscreen/dimscreen.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=false
-X-KDE-Library=kwin4_effect_builtins
X-Ordering=50
# Effect
# Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
- highlightwindow/highlightwindow.cpp
- )
+set(kwin4_effect_builtins_sources
+ ${kwin4_effect_builtins_sources}
+ effects/highlightwindow/highlightwindow.cpp
+)
# .desktop files
-install( FILES
- highlightwindow/highlightwindow.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/highlightwindow/highlightwindow.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
X-KDE-Ordering=70
-X-KDE-Library=kwin4_effect_builtins
# Effect
# Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
- kscreen/kscreen.cpp
+set(kwin4_effect_builtins_sources
+ ${kwin4_effect_builtins_sources}
+ effects/kscreen/kscreen.cpp
)
-kde4_add_kcfg_files(kwin4_effect_builtins_sources kscreen/kscreenconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/kscreen/kscreenconfig.kcfgc)
# .desktop files
-install( FILES
- kscreen/kscreen.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/kscreen/kscreen.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
-X-KDE-Library=kwin4_effect_builtins
X-KDE-Ordering=99
X-KWin-Requires-Shaders=false
# Effect
# Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
- logout/logout.cpp
+set(kwin4_effect_builtins_sources
+ ${kwin4_effect_builtins_sources}
+ effects/logout/logout.cpp
)
-kde4_add_kcfg_files(kwin4_effect_builtins_sources logout/logoutconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/logout/logoutconfig.kcfgc)
# .desktop files
-install( FILES
- logout/logout.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin
-)
+install(FILES effects/logout/logout.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
-X-KDE-Library=kwin4_effect_builtins
X-KDE-Ordering=85
# Effect
# Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
- magnifier/magnifier.cpp
- )
+set(kwin4_effect_builtins_sources
+ ${kwin4_effect_builtins_sources}
+ effects/magnifier/magnifier.cpp
+)
-kde4_add_kcfg_files(kwin4_effect_builtins_sources magnifier/magnifierconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/magnifier/magnifierconfig.kcfgc)
# .desktop files
-install( FILES
- magnifier/magnifier.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/magnifier/magnifier.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
#######################################
# Config
# Source files
-set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
- magnifier/magnifier_config.cpp
- magnifier/magnifier_config.ui
- )
-kde4_add_kcfg_files(kwin4_effect_builtins_config_sources magnifier/magnifierconfig.kcfgc)
+set(kwin4_effect_builtins_config_sources
+ ${kwin4_effect_builtins_config_sources}
+ effects/magnifier/magnifier_config.cpp
+)
+kde4_add_kcfg_files(kwin4_effect_builtins_config_sources effects/magnifier/magnifierconfig.kcfgc)
# .desktop files
-install( FILES
- magnifier/magnifier_config.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/magnifier/magnifier_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
{
KWIN_EFFECT(magnifier, MagnifierEffect)
-KWIN_EFFECT_SUPPORTED(magnifier, MagnifierEffect::supported())
const int FRAME_WIDTH = 5;
#endif
}
-bool MagnifierEffect::supported()
-{
- return effects->compositingType() == XRenderCompositing;
-}
-
void MagnifierEffect::reconfigure(ReconfigureFlags)
{
MagnifierConfig::self()->readConfig();
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=false
-X-KDE-Library=kwin4_effect_builtins
virtual void paintScreen(int mask, QRegion region, ScreenPaintData& data);
virtual void postPaintScreen();
virtual bool isActive() const;
- static bool supported();
// for properties
QSize magnifierSize() const {
# Effect
# Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
- minimizeanimation/minimizeanimation.cpp
- )
+set(kwin4_effect_builtins_sources
+ ${kwin4_effect_builtins_sources}
+ effects/minimizeanimation/minimizeanimation.cpp
+)
# .desktop files
-install( FILES
- minimizeanimation/minimizeanimation.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/minimizeanimation/minimizeanimation.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
-X-KDE-Library=kwin4_effect_builtins
X-KDE-Ordering=50
# Effect
# Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
- mousemark/mousemark.cpp
- )
+set(kwin4_effect_builtins_sources
+ ${kwin4_effect_builtins_sources}
+ effects/mousemark/mousemark.cpp
+)
-kde4_add_kcfg_files(kwin4_effect_builtins_sources mousemark/mousemarkconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/mousemark/mousemarkconfig.kcfgc)
# .desktop files
-install( FILES
- mousemark/mousemark.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/mousemark/mousemark.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
#######################################
# Config
# Source files
-set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
- mousemark/mousemark_config.cpp
- mousemark/mousemark_config.ui
- )
+set(kwin4_effect_builtins_config_sources
+ ${kwin4_effect_builtins_config_sources}
+ effects/mousemark/mousemark_config.cpp
+)
-kde4_add_kcfg_files(kwin4_effect_builtins_config_sources mousemark/mousemarkconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_config_sources effects/mousemark/mousemarkconfig.kcfgc)
# .desktop files
-install( FILES
- mousemark/mousemark_config.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/mousemark/mousemark_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=false
-X-KDE-Library=kwin4_effect_builtins
# Effect
# Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
- presentwindows/presentwindows.cpp
- presentwindows/presentwindows_proxy.cpp
- )
+set(kwin4_effect_builtins_sources
+ ${kwin4_effect_builtins_sources}
+ effects/presentwindows/presentwindows.cpp
+ effects/presentwindows/presentwindows_proxy.cpp
+)
-kde4_add_kcfg_files(kwin4_effect_builtins_sources presentwindows/presentwindowsconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/presentwindows/presentwindowsconfig.kcfgc)
# .desktop files
-install( FILES
- presentwindows/presentwindows.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
-install( FILES
- presentwindows/main.qml
- DESTINATION ${DATA_INSTALL_DIR}/kwin/effects/presentwindows/
-)
+install(FILES effects/presentwindows/presentwindows.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
+install(FILES effects/presentwindows/main.qml DESTINATION ${DATA_INSTALL_DIR}/kwin/effects/presentwindows)
#######################################
# Config
# Source files
-set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
- presentwindows/presentwindows_config.cpp
- presentwindows/presentwindows_config.ui
- )
+set(kwin4_effect_builtins_config_sources
+ ${kwin4_effect_builtins_config_sources}
+ effects/presentwindows/presentwindows_config.cpp
+)
-kde4_add_kcfg_files(kwin4_effect_builtins_config_sources presentwindows/presentwindowsconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_config_sources effects/presentwindows/presentwindowsconfig.kcfgc)
# .desktop files
-install( FILES
- presentwindows/presentwindows_config.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/presentwindows/presentwindows_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
-X-KDE-Library=kwin4_effect_builtins
X-KDE-Ordering=70
# Effect
# Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
- resize/resize.cpp
- )
+set(kwin4_effect_builtins_sources
+ ${kwin4_effect_builtins_sources}
+ effects/resize/resize.cpp
+)
-kde4_add_kcfg_files(kwin4_effect_builtins_sources resize/resizeconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/resize/resizeconfig.kcfgc)
# .desktop files
-install( FILES
- resize/resize.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/resize/resize.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
#######################################
# Config
# Source files
-set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
- resize/resize_config.cpp
- resize/resize_config.ui
- )
-kde4_add_kcfg_files(kwin4_effect_builtins_config_sources resize/resizeconfig.kcfgc)
+set(kwin4_effect_builtins_config_sources
+ ${kwin4_effect_builtins_config_sources}
+ effects/resize/resize_config.cpp
+)
+kde4_add_kcfg_files(kwin4_effect_builtins_config_sources effects/resize/resizeconfig.kcfgc)
# .desktop files
-install( FILES
- resize/resize_config.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/resize/resize_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=false
-X-KDE-Library=kwin4_effect_builtins
X-KDE-Ordering=60
# Effect
# Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
- screenedge/screenedgeeffect.cpp
- )
+set(kwin4_effect_builtins_sources
+ ${kwin4_effect_builtins_sources}
+ effects/screenedge/screenedgeeffect.cpp
+)
# .desktop files
-install( FILES
- screenedge/screenedgeeffect.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/screenedge/screenedgeeffect.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
-X-KDE-Library=kwin4_effect_builtins
X-KDE-Ordering=90
# Effect
# Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
- showfps/showfps.cpp
- )
+set(kwin4_effect_builtins_sources
+ ${kwin4_effect_builtins_sources}
+ effects/showfps/showfps.cpp
+)
-kde4_add_kcfg_files(kwin4_effect_builtins_sources showfps/showfpsconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/showfps/showfpsconfig.kcfgc)
# .desktop files
-install( FILES
- showfps/showfps.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/showfps/showfps.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
#######################################
# Config
# Source files
-set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
- showfps/showfps_config.cpp
- showfps/showfps_config.ui
- )
+set(kwin4_effect_builtins_config_sources
+ ${kwin4_effect_builtins_config_sources}
+ effects/showfps/showfps_config.cpp
+)
-kde4_add_kcfg_files(kwin4_effect_builtins_config_sources showfps/showfpsconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_config_sources effects/showfps/showfpsconfig.kcfgc)
# .desktop files
-install( FILES
- showfps/showfps_config.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/showfps/showfps_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=false
-X-KDE-Library=kwin4_effect_builtins
# Effect
# Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
- showpaint/showpaint.cpp
- )
+set(kwin4_effect_builtins_sources
+ ${kwin4_effect_builtins_sources}
+ effects/showpaint/showpaint.cpp
+)
# .desktop files
-install( FILES
- showpaint/showpaint.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/showpaint/showpaint.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=false
-X-KDE-Library=kwin4_effect_builtins
# Effect
# Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
- slide/slide.cpp
- )
+set(kwin4_effect_builtins_sources
+ ${kwin4_effect_builtins_sources}
+ effects/slide/slide.cpp
+)
# .desktop files
-install( FILES
- slide/slide.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/slide/slide.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
-X-KDE-Library=kwin4_effect_builtins
X-KDE-Ordering=50
# Effect
# Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
- slideback/slideback.cpp
- )
+set(kwin4_effect_builtins_sources
+ ${kwin4_effect_builtins_sources}
+ effects/slideback/slideback.cpp
+)
# .desktop files
-install( FILES
- slideback/slideback.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/slideback/slideback.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=false
-X-KDE-Library=kwin4_effect_builtins
X-KDE-Ordering=50
# Effect
# Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
- slidingpopups/slidingpopups.cpp
- )
+set(kwin4_effect_builtins_sources
+ ${kwin4_effect_builtins_sources}
+ effects/slidingpopups/slidingpopups.cpp
+)
# .desktop files
-install( FILES
- slidingpopups/slidingpopups.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/slidingpopups/slidingpopups.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
-X-KDE-Library=kwin4_effect_builtins
X-KDE-Ordering=40
# Effect
# Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
- snaphelper/snaphelper.cpp
- )
+set(kwin4_effect_builtins_sources
+ ${kwin4_effect_builtins_sources}
+ effects/snaphelper/snaphelper.cpp
+)
# .desktop files
-install( FILES
- snaphelper/snaphelper.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/snaphelper/snaphelper.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=false
-X-KDE-Library=kwin4_effect_builtins
# Effect
# Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
- taskbarthumbnail/taskbarthumbnail.cpp
- )
+set(kwin4_effect_builtins_sources
+ ${kwin4_effect_builtins_sources}
+ effects/taskbarthumbnail/taskbarthumbnail.cpp
+)
# .desktop files
-install( FILES
- taskbarthumbnail/taskbarthumbnail.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/taskbarthumbnail/taskbarthumbnail.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
\ No newline at end of file
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
X-KDE-Ordering=70
-X-KDE-Library=kwin4_effect_builtins
# Effect
# Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
- thumbnailaside/thumbnailaside.cpp
- )
+set(kwin4_effect_builtins_sources
+ ${kwin4_effect_builtins_sources}
+ effects/thumbnailaside/thumbnailaside.cpp
+)
-kde4_add_kcfg_files(kwin4_effect_builtins_sources thumbnailaside/thumbnailasideconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/thumbnailaside/thumbnailasideconfig.kcfgc)
# .desktop files
-install( FILES
- thumbnailaside/thumbnailaside.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/thumbnailaside/thumbnailaside.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
#######################################
# Config
# Source files
-set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
- thumbnailaside/thumbnailaside_config.cpp
- thumbnailaside/thumbnailaside_config.ui
- )
+set(kwin4_effect_builtins_config_sources
+ ${kwin4_effect_builtins_config_sources}
+ effects/thumbnailaside/thumbnailaside_config.cpp
+)
-kde4_add_kcfg_files(kwin4_effect_builtins_config_sources thumbnailaside/thumbnailasideconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_config_sources effects/thumbnailaside/thumbnailasideconfig.kcfgc)
# .desktop files
-install( FILES
- thumbnailaside/thumbnailaside_config.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/thumbnailaside/thumbnailaside_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=false
-X-KDE-Library=kwin4_effect_builtins
# Effect
# Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
- trackmouse/trackmouse.cpp
- )
+set(kwin4_effect_builtins_sources
+ ${kwin4_effect_builtins_sources}
+ effects/trackmouse/trackmouse.cpp
+)
-kde4_add_kcfg_files(kwin4_effect_builtins_sources trackmouse/trackmouseconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/trackmouse/trackmouseconfig.kcfgc)
# .desktop files
-install( FILES
- trackmouse/trackmouse.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/trackmouse/trackmouse.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
# Data files
-install( FILES
- trackmouse/data/tm_inner.png
- trackmouse/data/tm_outer.png
- DESTINATION ${DATA_INSTALL_DIR}/kwin )
+install(FILES
+ effects/trackmouse/data/tm_inner.png
+ effects/trackmouse/data/tm_outer.png
+ DESTINATION ${DATA_INSTALL_DIR}/kwin
+)
#######################################
# Config
# Source files
-set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
- trackmouse/trackmouse_config.cpp
- trackmouse/trackmouse_config.ui
- )
+set(kwin4_effect_builtins_config_sources
+ ${kwin4_effect_builtins_config_sources}
+ effects/trackmouse/trackmouse_config.cpp
+)
-kde4_add_kcfg_files(kwin4_effect_builtins_config_sources trackmouse/trackmouseconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_config_sources effects/trackmouse/trackmouseconfig.kcfgc)
# .desktop files
-install( FILES
- trackmouse/trackmouse_config.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/trackmouse/trackmouse_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=false
-X-KDE-Library=kwin4_effect_builtins
# Effect
# Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
- windowgeometry/windowgeometry.cpp
- )
+set(kwin4_effect_builtins_sources
+ ${kwin4_effect_builtins_sources}
+ effects/windowgeometry/windowgeometry.cpp
+)
-kde4_add_kcfg_files(kwin4_effect_builtins_sources windowgeometry/windowgeometryconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/windowgeometry/windowgeometryconfig.kcfgc)
# .desktop files
-install( FILES
- windowgeometry/windowgeometry.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/windowgeometry/windowgeometry.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
#######################################
# Config
# Source files
-set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
- windowgeometry/windowgeometry_config.cpp
- windowgeometry/windowgeometry_config.ui
- )
+set(kwin4_effect_builtins_config_sources
+ ${kwin4_effect_builtins_config_sources}
+ effects/windowgeometry/windowgeometry_config.cpp
+)
-kde4_add_kcfg_files(kwin4_effect_builtins_config_sources windowgeometry/windowgeometryconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_config_sources effects/windowgeometry/windowgeometryconfig.kcfgc)
# .desktop files
-install( FILES
- windowgeometry/windowgeometry_config.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/windowgeometry/windowgeometry_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
using namespace KWin;
-KWIN_EFFECT(windowgeometry, WindowGeometry)
+KWIN_EFFECT(windowgeometry, WindowGeometryEffect)
-WindowGeometry::WindowGeometry()
+WindowGeometryEffect::WindowGeometryEffect()
{
iAmActivated = true;
iAmActive = false;
connect(effects, SIGNAL(windowStepUserMovedResized(KWin::EffectWindow*,QRect)), this, SLOT(slotWindowStepUserMovedResized(KWin::EffectWindow*,QRect)));
}
-WindowGeometry::~WindowGeometry()
+WindowGeometryEffect::~WindowGeometryEffect()
{
for (int i = 0; i < 3; ++i)
delete myMeasure[i];
}
-void WindowGeometry::reconfigure(ReconfigureFlags)
+void WindowGeometryEffect::reconfigure(ReconfigureFlags)
{
WindowGeometryConfiguration::self()->readConfig();
iHandleMoves = WindowGeometryConfiguration::move();
iHandleResizes = WindowGeometryConfiguration::resize();
}
-void WindowGeometry::paintScreen(int mask, QRegion region, ScreenPaintData &data)
+void WindowGeometryEffect::paintScreen(int mask, QRegion region, ScreenPaintData &data)
{
effects->paintScreen(mask, region, data);
if (iAmActivated && iAmActive) {
}
}
-void WindowGeometry::toggle()
+void WindowGeometryEffect::toggle()
{
iAmActivated = !iAmActivated;
}
-void WindowGeometry::slotWindowStartUserMovedResized(EffectWindow *w)
+void WindowGeometryEffect::slotWindowStartUserMovedResized(EffectWindow *w)
{
if (!iAmActivated)
return;
slotWindowStepUserMovedResized(w, w->geometry());
}
-void WindowGeometry::slotWindowFinishUserMovedResized(EffectWindow *w)
+void WindowGeometryEffect::slotWindowFinishUserMovedResized(EffectWindow *w)
{
if (iAmActive && w == myResizeWindow) {
iAmActive = false;
}
-void WindowGeometry::slotWindowStepUserMovedResized(EffectWindow *w, const QRect &geometry)
+void WindowGeometryEffect::slotWindowStepUserMovedResized(EffectWindow *w, const QRect &geometry)
{
if (iAmActivated && iAmActive && w == myResizeWindow) {
if (myExtraDirtyArea.isValid())
}
}
-bool WindowGeometry::isActive() const
+bool WindowGeometryEffect::isActive() const
{
return iAmActive;
}
# Whether this effect should be enabled by default
X-KDE-PluginInfo-EnabledByDefault=false
# The plugin (library) which contains the effect. One library may contain more effects.
-X-KDE-Library=kwin4_effect_builtins
# The order in which this effect is loaded. Lower numbers are loaded first.
X-KDE-Ordering=90
namespace KWin
{
-class WindowGeometry : public Effect
+class WindowGeometryEffect : public Effect
{
Q_OBJECT
Q_PROPERTY(bool handlesMoves READ isHandlesMoves)
Q_PROPERTY(bool handlesResizes READ isHandlesResizes)
public:
- WindowGeometry();
- ~WindowGeometry();
+ WindowGeometryEffect();
+ ~WindowGeometryEffect();
inline bool provides(Effect::Feature ef) {
return ef == Effect::GeometryTip;
# Effect
# Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
- zoom/zoom.cpp
- )
+set(kwin4_effect_builtins_sources
+ ${kwin4_effect_builtins_sources}
+ effects/zoom/zoom.cpp
+)
-kde4_add_kcfg_files(kwin4_effect_builtins_sources zoom/zoomconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/zoom/zoomconfig.kcfgc)
# .desktop files
-install( FILES
- zoom/zoom.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/zoom/zoom.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
#######################################
# Config
# Source files
-set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
- zoom/zoom_config.cpp
- zoom/zoom_config.ui
- )
-kde4_add_kcfg_files(kwin4_effect_builtins_config_sources zoom/zoomconfig.kcfgc)
+set(kwin4_effect_builtins_config_sources
+ ${kwin4_effect_builtins_config_sources}
+ effects/zoom/zoom_config.cpp
+)
+kde4_add_kcfg_files(kwin4_effect_builtins_config_sources effects/zoom/zoomconfig.kcfgc)
# .desktop files
-install( FILES
- zoom/zoom_config.desktop
- DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/zoom/zoom_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
-X-KDE-Library=kwin4_effect_builtins
protected:
QVector< EffectPair > loaded_effects;
QHash< QString, QLibrary* > effect_libraries;
- //QHash< QString, EffectFactory* > effect_factories;
+ QHash< QString, Effect* > effect_factories;
CompositingType compositing_type;
};