
HOWTO: KWin Window Manager Decorations
Source (link to git-repo or to original if based on someone elses unmodified work):
Includes tutorial and complete working source code for a plain but functional decoration. Assumes familiarity with C++ and Qt.
Now there's no more excuses for not writing that decoration you always wished someone else would do!
0.8 -
Add support for new buttons, KDE 3.3 API.
0.7 -
Fix minimum window size (78739)
0.6 -
Set the proper icons for window state when creating buttons, and document
0.5 -
Minor changes tracking the new 3.2 API
0.4 -
Minor changes from user feedback
0.3 -
Minor changes to 3.2 API
0.2 -
Updated and converted example decoration to KDE 3.2. The example code no longer builds or runs with KDE 3.1 or earlier.
Ratings & Comments
17 Comments
first off all i would like to say 10x alot about this wonderfull tutorial, i'am always surprized from the great variety of stuff to do with linux really amazing,and now i would like to ask what about kstyle themes tutorial r u going to write this one down or if u can point us all to agood tutorial this would be great. any way 10x alot man great stuff!!! peace!
I've thought I might someday write a KStyle tutorial, but it would be about ten times the work of the KWin tutorial, because there's about ten times the stuff to cover. There's also other projects I need to work on. Ah, if only I had one extra hand, two extra brains, and three extra hours per day...
This is missing both the configure script AND the admin directory. It cannot be built as is. At least, not by following the directions.
You need to copy an existing admin directory from any kde source package. The INSTALL file doesn't say this, but should. That's how I missed it!
This is a HOWTO and tutorial. Evertyhing besides the actual HOWTO document is considered to be a sample or example. Including the INSTALL file. I am sorry for the confusion.
great that you port your example to 3.2... but what about an howto that will explain how to port ours ? what do I have to change on mine to make it work in 3.2 ?
There's already a KWin 3.1 to 3.2 porting guide! In the kdebase sources, look at kwin/clients/PORTING.
thanks for this, I have been looking for some up to date documentation for this, good work.
Excellent as usual. Thanks for both the tutorial, and for writing clear readable code to begin with. You really help lower the learning curve. After your tutorial folks should have a framework within which to start playing with masking and bitmaps and other cool stuff. Bravo.
thanks a lot, this was really needed, and it was great. maybe you can get it on KDE.org. Also are there any theme or/and tehme engine creation tutuorials which aren't obsolete for KDE?
The QT docs do a pretty good job of explaining styles under QT3 (and also KDE3, KStyle now being only a relatively thin wrapper over QStyle). The Style Overview (in the qt docs) gives a brief tutorial, and the QStyle reference details pretty much everything else (except dealing with KDE oddities, like kde toolbar widgets - other styles are a good place to look for how to deal with them).
I haven't looked at your manual yet but was glad to see it posted. Just the other day I was looking for something like this and wasn't able to find it anywhere on the web. Google or kde's site were not helpful. Thanks for speding the time to do this.
I'd like to learn more about KDE programming in general, not just window borders. Is there a good tutorial or a book? How did you learn all of this? Thanks!
How did I learn all this? First learn C++. There's a million ways to do this, but you need to actually start writing programs before it sinks in. Then you need to learn Qt. That's easy. Qt has some excellent documentation, and it's quite straightforward. As for KDE, think of it as "Qt++". Checkout http://developer.kde.org for lots of info.
Many good books on KDE programming do exist and the best of all are from SuSE. However they are in German. try- http://www.susepress.de/de/katalog/index.html However some basic documentation styled books are too available but they are too old. try- http://www.kde.org/stuff/books.php
seem to be concise and crisp. Something of this sort was indeed missing. But I still don't know C++. So, I won't create "that" theme and I continue to wish that someone else would do :-) Alright, jokes apart.. thanks for the write-up. It is really a useful thing to have.
Not knowing C++ is no excuse! Go grab the excellent and free "Thinking in C++" by Bruce Eckel at http://mindview.net/Books/TICPP/ThinkingInCPP2e.html That theme in your head wants to get out :-)