[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Anmerkungen zu "The KDE System Tray Docking Protocol"
From:       Mathias Hasselmann <mathias.hasselmann () gmx ! de>
Date:       2001-10-14 15:19:10
[Download RAW message or body]

Hi Matthias,

	Attached there are some annotations to KDE's System Tray Docking
Protocol I made whilest implementing it for the IceWM window manager.


Ciao,
Mathias
-- 
WWW:           http://www.informatik.hu-berlin.de/~hasselma/
PGP/GnuPG:     1024-Bit DSA: ID 55E572F3, 1024-Bit RSA: ID EAAF7CF1

["protocols-docking.html" (TEXT/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="Author" content="Matthias Ettrich">
   <title>KDE 2.0 Architecture Overview - System Tray Docking Protocol</title>
</head>
<body text="#000000" bgcolor="#FFFFFF" link="#0000EE" vlink="#551A8B" \
alink="#FF0000">

<h1> The KDE System Tray Docking Protocol </h1>
<h2> Overview </h2>

<p> A tray window is a small window (typically 24x24 pixel) that docks
into the system tray in the desktop panel. It usually displays an icon
or an animated icon there. The icon serves as representative for the
application, similar to a taskbar button, but consumes less screen
space.


<p> This page contains just the raw protocol description. More
information on the system tray itself and how to use it with KDE
applications can be found in the section <a
href="components-docking.html"> Components/SystemTrayDocking </a> of this
architecture overview.

<h2> From the application's point of view </h2>

<p> For the application, a tray window is just another toplevel window
with one special property defined. The property is called
<tt>_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR</tt><!-- Corrected on 14/10/01, tbf -->
and is of type <tt>XA_WINDOW</tt>, format 32.

<p> The pure existence of this property indicates that the window
manager should treat this window as a tray window. The property value
may further define the tray window's main window, i.e. the window
the tray window is representing.

<!-- added 14/10/01 -->
<h3> [ Guesses be reading the source</h3>

<p> It's valid for windows carrying the property
<tt>_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR</tt> before mapping to change the
value of this property on runtime to point on another main window. If the
property has a value of <tt>None</tt> the root window is assumed as main
window [whatever this means]. A tray window can not have more than one
mainwindow.

<span align=right> <small> <em>
Mathias Hasselmann <a \
href="mailto:mathias.hasselmann@gmx.de">mathias.hasselmann@gmx.de</a> \
</em></small></span> ]

<p> The following code can be used to declare a window a tray window:
<p>
<table width=100%><tr><TD BGCOLOR="#F0F0FF">
<p>
<pre>
    /** Prototypes:
	Display dpy;
	Window trayWin, forWin;
    */
    Atom kde_net_wm_system_tray_window_for = XInternAtom( dpy, \
"_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", False);  XChangeProperty( dpy, trayWin, \
kde_net_wm_system_tray_window_for, XA_WINDOW, 32,  PropModeReplace, (unsigned char \
*)&forWin, 1); </pre>
</td></tr></table>
<p> When the application maps the window with <tt>XMapWindow()</tt>,
the window will dock into a system tray  if possible. Undocking is done with either
 <tt>XUnmapWindow()</tt> or <tt>XDestroyWindow()</tt>.

<h2> From the windowmanager's  point of view </h2>

<p> TODO (once it is done)

<!-- added 14/10/01 -->
<h3> [ Guesses be reading the source</h3>

<p> The windowmanager has to maintain a list of the window ids of
all tray windows known to it. This list is propagated to the public by a 
root property called <tt>_KDE_NET_SYSTEM_TRAY_WINDOWS</tt>. The property is 
of type <tt>XA_WINDOW</tt>, format 32.

<span align=right> <small> <em>
Mathias Hasselmann <a \
href="mailto:mathias.hasselmann@gmx.de">mathias.hasselmann@gmx.de</a> \
</em></small></span> ]

<h2> From the docking-container's  point of view  </h2>

<p> TODO (once it is done)

<hr>
<p align=right> <small> <em>
Matthias Ettrich <a href="mailto:ettrich@kde.org">ettrich@kde.org</a>
</em></small></p>
</body>
</html>


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic