diff --git a/effects/blur.cpp b/effects/blur.cpp index 5075452df8..1ca7a940bc 100644 --- a/effects/blur.cpp +++ b/effects/blur.cpp @@ -22,8 +22,8 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( Blur, BlurEffect ) -KWIN_EFFECT_SUPPORTED( Blur, BlurEffect::supported() ) +KWIN_EFFECT( blur, BlurEffect ) +KWIN_EFFECT_SUPPORTED( blur, BlurEffect::supported() ) BlurEffect::BlurEffect() : Effect() diff --git a/effects/boxswitch.cpp b/effects/boxswitch.cpp index 6a66aaeee5..b7520ea3b4 100644 --- a/effects/boxswitch.cpp +++ b/effects/boxswitch.cpp @@ -25,7 +25,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( BoxSwitch, BoxSwitchEffect ) +KWIN_EFFECT( boxswitch, BoxSwitchEffect ) BoxSwitchEffect::BoxSwitchEffect() : mActivated( 0 ) diff --git a/effects/demo_liquid.cpp b/effects/demo_liquid.cpp index 997f3f36f6..334896ac1c 100644 --- a/effects/demo_liquid.cpp +++ b/effects/demo_liquid.cpp @@ -23,8 +23,8 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( Demo_Liquid, LiquidEffect ) -KWIN_EFFECT_SUPPORTED( Demo_Liquid, LiquidEffect::supported() ) +KWIN_EFFECT( demo_liquid, LiquidEffect ) +KWIN_EFFECT_SUPPORTED( demo_liquid, LiquidEffect::supported() ) LiquidEffect::LiquidEffect() : Effect() diff --git a/effects/demo_shiftworkspaceup.cpp b/effects/demo_shiftworkspaceup.cpp index 1363d6dfe9..bba1046d6a 100644 --- a/effects/demo_shiftworkspaceup.cpp +++ b/effects/demo_shiftworkspaceup.cpp @@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( Demo_ShiftWorkspaceUp, ShiftWorkspaceUpEffect ) +KWIN_EFFECT( demo_shiftworkspaceup, ShiftWorkspaceUpEffect ) ShiftWorkspaceUpEffect::ShiftWorkspaceUpEffect() : up( false ) diff --git a/effects/demo_showpicture.cpp b/effects/demo_showpicture.cpp index 7a5f83dca9..d20e21d50d 100644 --- a/effects/demo_showpicture.cpp +++ b/effects/demo_showpicture.cpp @@ -16,7 +16,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( Demo_ShowPicture, ShowPictureEffect ) +KWIN_EFFECT( demo_showpicture, ShowPictureEffect ) ShowPictureEffect::ShowPictureEffect() : init( true ) diff --git a/effects/demo_taskbarthumbnail.cpp b/effects/demo_taskbarthumbnail.cpp index c933220d5d..953da8345e 100644 --- a/effects/demo_taskbarthumbnail.cpp +++ b/effects/demo_taskbarthumbnail.cpp @@ -16,7 +16,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( Demo_TaskbarThumbnail, TaskbarThumbnailEffect ) +KWIN_EFFECT( demo_taskbarthumbnail, TaskbarThumbnailEffect ) TaskbarThumbnailEffect::TaskbarThumbnailEffect() { diff --git a/effects/desktopgrid.cpp b/effects/desktopgrid.cpp index bcbf53da7f..bcb90abcb4 100644 --- a/effects/desktopgrid.cpp +++ b/effects/desktopgrid.cpp @@ -21,7 +21,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( DesktopGrid, DesktopGridEffect ) +KWIN_EFFECT( desktopgrid, DesktopGridEffect ) const int PROGRESS_TIME = 500; // ms diff --git a/effects/dialogparent.cpp b/effects/dialogparent.cpp index e6d919dacf..8195eacd76 100644 --- a/effects/dialogparent.cpp +++ b/effects/dialogparent.cpp @@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( DialogParent, DialogParentEffect ) +KWIN_EFFECT( dialogparent, DialogParentEffect ) void DialogParentEffect::prePaintWindow( EffectWindow* w, int* mask, QRegion* paint, QRegion* clip, int time ) { diff --git a/effects/diminactive.cpp b/effects/diminactive.cpp index 1e76964112..974b580379 100644 --- a/effects/diminactive.cpp +++ b/effects/diminactive.cpp @@ -14,7 +14,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( DimInactive, DimInactiveEffect ) +KWIN_EFFECT( diminactive, DimInactiveEffect ) DimInactiveEffect::DimInactiveEffect() { diff --git a/effects/drunken.cpp b/effects/drunken.cpp index 3133444fd9..4bb1c408e2 100644 --- a/effects/drunken.cpp +++ b/effects/drunken.cpp @@ -15,7 +15,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( Drunken, DrunkenEffect ) +KWIN_EFFECT( drunken, DrunkenEffect ) void DrunkenEffect::prePaintScreen( int* mask, QRegion* region, int time ) { diff --git a/effects/explosioneffect.cpp b/effects/explosioneffect.cpp index bec883f35a..bcdd85891e 100644 --- a/effects/explosioneffect.cpp +++ b/effects/explosioneffect.cpp @@ -23,8 +23,8 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( Explosion, ExplosionEffect ) -KWIN_EFFECT_SUPPORTED( Explosion, ExplosionEffect::supported() ) +KWIN_EFFECT( explosion, ExplosionEffect ) +KWIN_EFFECT_SUPPORTED( explosion, ExplosionEffect::supported() ) ExplosionEffect::ExplosionEffect() : Effect() { diff --git a/effects/fade.cpp b/effects/fade.cpp index fd9f7cbb5c..5e2062ebe3 100644 --- a/effects/fade.cpp +++ b/effects/fade.cpp @@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( Fade, FadeEffect ) +KWIN_EFFECT( fade, FadeEffect ) FadeEffect::FadeEffect() : fade_in_speed( 20 ) diff --git a/effects/fallapart.cpp b/effects/fallapart.cpp index 94030ae11e..46a62e398c 100644 --- a/effects/fallapart.cpp +++ b/effects/fallapart.cpp @@ -16,7 +16,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( FallApart, FallApartEffect ) +KWIN_EFFECT( fallapart, FallApartEffect ) void FallApartEffect::prePaintScreen( int* mask, QRegion* region, int time ) { diff --git a/effects/flame.cpp b/effects/flame.cpp index 1b7a0f6557..e02b5184a1 100644 --- a/effects/flame.cpp +++ b/effects/flame.cpp @@ -15,7 +15,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( Flame, FlameEffect ) +KWIN_EFFECT( flame, FlameEffect ) void FlameEffect::prePaintScreen( int* mask, QRegion* region, int time ) { diff --git a/effects/howto.cpp b/effects/howto.cpp index 4e17ae5ca7..b05cdcc0e1 100644 --- a/effects/howto.cpp +++ b/effects/howto.cpp @@ -24,7 +24,7 @@ namespace KWin { // This macro creates entry function for the plugin. First argument is name, second is class name. -KWIN_EFFECT( Howto, HowtoEffect ) +KWIN_EFFECT( howto, HowtoEffect ) // A pre-paint function that tells the compositing code how this effect will affect // the painting. During every painting pass this function is called first, before diff --git a/effects/magnifier.cpp b/effects/magnifier.cpp index aea5493063..c1547ac7a2 100644 --- a/effects/magnifier.cpp +++ b/effects/magnifier.cpp @@ -23,7 +23,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( Magnifier, MagnifierEffect ) +KWIN_EFFECT( magnifier, MagnifierEffect ) const int FRAME_WIDTH = 5; diff --git a/effects/maketransparent.cpp b/effects/maketransparent.cpp index 76a2e5bafe..51748c1e59 100644 --- a/effects/maketransparent.cpp +++ b/effects/maketransparent.cpp @@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( MakeTransparent, MakeTransparentEffect ) +KWIN_EFFECT( maketransparent, MakeTransparentEffect ) void MakeTransparentEffect::prePaintWindow( EffectWindow* w, int* mask, QRegion* paint, QRegion* clip, int time ) { diff --git a/effects/minimizeanimation.cpp b/effects/minimizeanimation.cpp index 9c7b05814f..8b63564f46 100644 --- a/effects/minimizeanimation.cpp +++ b/effects/minimizeanimation.cpp @@ -14,7 +14,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( MinimizeAnimation, MinimizeAnimationEffect ) +KWIN_EFFECT( minimizeanimation, MinimizeAnimationEffect ) MinimizeAnimationEffect::MinimizeAnimationEffect() { diff --git a/effects/mousemark.cpp b/effects/mousemark.cpp index 7accee00ef..65de6fd707 100644 --- a/effects/mousemark.cpp +++ b/effects/mousemark.cpp @@ -29,7 +29,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( MouseMark, MouseMarkEffect ) +KWIN_EFFECT( mousemark, MouseMarkEffect ) MouseMarkEffect::MouseMarkEffect() { diff --git a/effects/presentwindows.cpp b/effects/presentwindows.cpp index dbbe0bf28e..be42c2f245 100644 --- a/effects/presentwindows.cpp +++ b/effects/presentwindows.cpp @@ -25,7 +25,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( PresentWindows, PresentWindowsEffect ) +KWIN_EFFECT( presentwindows, PresentWindowsEffect ) PresentWindowsEffect::PresentWindowsEffect() : mShowWindowsFromAllDesktops ( false ) diff --git a/effects/scalein.cpp b/effects/scalein.cpp index 98b3964525..8535d1ed92 100644 --- a/effects/scalein.cpp +++ b/effects/scalein.cpp @@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( ScaleIn, ScaleInEffect ) +KWIN_EFFECT( scalein, ScaleInEffect ) void ScaleInEffect::prePaintScreen( int* mask, QRegion* region, int time ) { diff --git a/effects/shadow.cpp b/effects/shadow.cpp index 13adf82a4a..97d550b919 100644 --- a/effects/shadow.cpp +++ b/effects/shadow.cpp @@ -15,7 +15,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( Shadow, ShadowEffect ) +KWIN_EFFECT( shadow, ShadowEffect ) ShadowEffect::ShadowEffect() : shadowXOffset( 10 ) diff --git a/effects/shakymove.cpp b/effects/shakymove.cpp index 985ee97ef5..fd6d102d79 100644 --- a/effects/shakymove.cpp +++ b/effects/shakymove.cpp @@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( ShakyMove, ShakyMoveEffect ) +KWIN_EFFECT( shakymove, ShakyMoveEffect ) ShakyMoveEffect::ShakyMoveEffect() { diff --git a/effects/showfps.cpp b/effects/showfps.cpp index ff32c62de5..262af3b0b3 100644 --- a/effects/showfps.cpp +++ b/effects/showfps.cpp @@ -26,7 +26,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( ShowFps, ShowFpsEffect ) +KWIN_EFFECT( showfps, ShowFpsEffect ) const int FPS_WIDTH = 10; const int MAX_TIME = 100; diff --git a/effects/test_fbo.cpp b/effects/test_fbo.cpp index 68b446cb76..d3c40be41e 100644 --- a/effects/test_fbo.cpp +++ b/effects/test_fbo.cpp @@ -18,8 +18,8 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( Test_FBO, TestFBOEffect ) -KWIN_EFFECT_SUPPORTED( Test_FBO, TestFBOEffect::supported() ) +KWIN_EFFECT( test_fbo, TestFBOEffect ) +KWIN_EFFECT_SUPPORTED( test_fbo, TestFBOEffect::supported() ) TestFBOEffect::TestFBOEffect() : Effect() diff --git a/effects/test_input.cpp b/effects/test_input.cpp index ae11a42f88..9bfe38edeb 100644 --- a/effects/test_input.cpp +++ b/effects/test_input.cpp @@ -29,7 +29,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( Test_Input, TestInputEffect ) +KWIN_EFFECT( test_input, TestInputEffect ) TestInputEffect::TestInputEffect() { diff --git a/effects/test_thumbnail.cpp b/effects/test_thumbnail.cpp index 32a5a09751..2a8836890d 100644 --- a/effects/test_thumbnail.cpp +++ b/effects/test_thumbnail.cpp @@ -20,7 +20,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( Test_Thumbnail, TestThumbnailEffect ) +KWIN_EFFECT( test_thumbnail, TestThumbnailEffect ) TestThumbnailEffect::TestThumbnailEffect() : active_window( NULL ) diff --git a/effects/thumbnailaside.cpp b/effects/thumbnailaside.cpp index aefbb1f9be..87625d3258 100644 --- a/effects/thumbnailaside.cpp +++ b/effects/thumbnailaside.cpp @@ -17,7 +17,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( ThumbnailAside, ThumbnailAsideEffect ) +KWIN_EFFECT( thumbnailaside, ThumbnailAsideEffect ) ThumbnailAsideEffect::ThumbnailAsideEffect() { diff --git a/effects/trackmouse.cpp b/effects/trackmouse.cpp index 1b097b6340..e5ed016f92 100644 --- a/effects/trackmouse.cpp +++ b/effects/trackmouse.cpp @@ -26,7 +26,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( TrackMouse, TrackMouseEffect ) +KWIN_EFFECT( trackmouse, TrackMouseEffect ) const int STARS = 5; const int DIST = 50; diff --git a/effects/videorecord.cpp b/effects/videorecord.cpp index 44d09aee46..4aed9f20ef 100644 --- a/effects/videorecord.cpp +++ b/effects/videorecord.cpp @@ -42,7 +42,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( VideoRecord, VideoRecordEffect ) +KWIN_EFFECT( videorecord, VideoRecordEffect ) VideoRecordEffect::VideoRecordEffect() : client( NULL ) diff --git a/effects/wavywindows.cpp b/effects/wavywindows.cpp index 54dd627413..7de55dcb0d 100644 --- a/effects/wavywindows.cpp +++ b/effects/wavywindows.cpp @@ -17,7 +17,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( WavyWindows, WavyWindowsEffect ) +KWIN_EFFECT( wavywindows, WavyWindowsEffect ) WavyWindowsEffect::WavyWindowsEffect() { diff --git a/effects/zoom.cpp b/effects/zoom.cpp index a94625fa48..16998a4855 100644 --- a/effects/zoom.cpp +++ b/effects/zoom.cpp @@ -17,7 +17,7 @@ License. See the file "COPYING" for the exact licensing terms. namespace KWin { -KWIN_EFFECT( Zoom, ZoomEffect ) +KWIN_EFFECT( zoom, ZoomEffect ) ZoomEffect::ZoomEffect() : zoom( 1 ) diff --git a/lib/kwineffects.h b/lib/kwineffects.h index ce3c60e4c2..4874cdbf73 100644 --- a/lib/kwineffects.h +++ b/lib/kwineffects.h @@ -127,31 +127,34 @@ class KWIN_EXPORT Effect /** - * Defines the class to be used for effect with given name - * E.g. KWIN_EFFECT( Flames, MyFlameEffect ) + * Defines the class to be used for effect with given name. + * The name must be same as effect's X-KDE-PluginInfo-Name values in .desktop + * file, but without the "kwin4_effect_" prefix. + * E.g. KWIN_EFFECT( flames, MyFlameEffect ) * In this case object of MyFlameEffect class would be created when effect - * "Flames" is loaded. + * "flames" (which has X-KDE-PluginInfo-Name=kwin4_effect_flames in .desktop + * file) is loaded. **/ #define KWIN_EFFECT( name, classname ) \ extern "C" { \ - KWIN_EXPORT Effect* effect_create_##name() { return new classname; } \ + KWIN_EXPORT Effect* effect_create_kwin4_effect_##name() { return new classname; } \ } /** * Defines the function used to check whether an effect is supported - * E.g. KWIN_EFFECT_SUPPORTED( Flames, MyFlameEffect::supported() ) + * E.g. KWIN_EFFECT_SUPPORTED( flames, MyFlameEffect::supported() ) **/ #define KWIN_EFFECT_SUPPORTED( name, function ) \ extern "C" { \ - KWIN_EXPORT bool effect_supported_##name() { return function; } \ + KWIN_EXPORT bool effect_supported_kwin4_effect_##name() { return function; } \ } /** * Defines the function used to retrieve an effect's config widget - * E.g. KWIN_EFFECT_CONFIG( Flames, MyFlameEffect::configWidget() ) + * E.g. KWIN_EFFECT_CONFIG( flames, MyFlameEffectConfig ) **/ -#define KWIN_EFFECT_CONFIG( name, function ) \ - extern "C" { \ - KWIN_EXPORT Effect* effect_config_##name() { return function; } \ - } +#define KWIN_EFFECT_CONFIG( name, classname ) \ + K_EXPORT_COMPONENT_FACTORY( \ + kcm_kwineffect_##name, \ + KGenericFactory( "kcm_kwineffect_" #name ) ) class KWIN_EXPORT EffectsHandler