Warning, /plasma/kdecoration/README.md is written in an unsupported language. File is not indexed.
0001 # KDecoration2 0002 0003 Plugin based library to create window decorations. 0004 0005 ## Introduction 0006 0007 KDecoration2 is a library to create window decorations. These window decorations can be used by 0008 for example an X11 based window manager which re-parents a Client window to a window decoration 0009 frame. 0010 0011 The library consists of two parts: 0012 * Decoration API for implementing a Decoration theme 0013 * Private API to implement the backend part (e.g. from Window Manager side) 0014 0015 ## Providing a Decoration 0016 0017 To provide a custom decoration one needs to create a plugin and provide an own implementation 0018 of KDecoration2::Decoration. For a framework to load and find the plugin it needs to be compiled 0019 with the proper json metadata. An example for such metadata (deco.json): 0020 0021 { 0022 "KPlugin": { 0023 "Id": "org.kde.myAweseomeDecoration", 0024 "ServiceTypes": [ 0025 "org.kde.kdecoration2" 0026 ] 0027 }, 0028 "org.kde.kdecoration2": { 0029 "blur": false, /* blur behind not needed */ 0030 "kcmodule": true /* comes with a configuration module */ 0031 } 0032 } 0033 0034 To simplify one can use the KPluginFactory macro from the KCoreAddons framework: 0035 0036 K_PLUGIN_FACTORY_WITH_JSON( 0037 MyAwesomeDecorationFactory, 0038 "deco.json", 0039 registerPlugin<MyAwesomeDecoration::Decoration>(); 0040 ) 0041 0042 The plugin needs to get installed to `${KDE_INSTALL_PLUGINDIR}/org.kde.kdecoration2`.