HOWTO: KWin Window Manager Decorations
KDE 3.x Window Decorations
Score 67%
Description:

Here is my HOWTO for making native KWin decorations. This tutorial covers creating a native KWin decoration using C++/Qt, as opposed to using a pixmap engine like the IceWM deco.

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!
Last changelog:

14 years ago

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.

motyR

13 years ago

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!

Report

C

Brandybuck

13 years ago

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...

Report

gurensan

13 years ago

This is missing both the configure script AND the admin directory. It cannot be built as is. At least, not by following the directions.

Report

gurensan

13 years ago

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!

Report

C

Brandybuck

13 years ago

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.

Report

somekool

13 years ago

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 ?

Report

C

Brandybuck

13 years ago

There's already a KWin 3.1 to 3.2 porting guide! In the kdebase sources, look at kwin/clients/PORTING.

Report

mobtek

13 years ago

thanks for this, I have been looking for some up to date documentation for this, good work.

Report

BigRedFish

14 years ago

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.

Report

WinterWolf

14 years ago

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?

Report

dbrownlees

14 years ago

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).

Report

trtmrt

14 years ago

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.

Report

saltwater

14 years ago

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!

Report

C

Brandybuck

14 years ago

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.

Report

manikchand

13 years ago

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

Report

reks

14 years ago

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.

Report

C

Brandybuck

14 years ago

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 :-)

Report

14 years ago

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.

product-maker 133 279

File (click to download) Version Description Filetype Packagetype License Downloads Date Filesize OCS-Install DL
Details
version
0.8
updated Jul 25 2004
added May 27 2003
downloads today
0
page views today 2