Projects/Plasma/NewSystemTray: Difference between revisions

From KDE TechBase
(more on the host)
(more clarifications)
Line 11: Line 11:


Applications registering with the system tray provide one of those categories. An Instant Messaging application or an Email client will fall into 'Communications'. System services are for example software update notifications. Examples for Hardware are a battery monitor a mixer or a Network Management applet. Applications that use the system tray for freeing space in the taskbar use the Application Status category.
Applications registering with the system tray provide one of those categories. An Instant Messaging application or an Email client will fall into 'Communications'. System services are for example software update notifications. Examples for Hardware are a battery monitor a mixer or a Network Management applet. Applications that use the system tray for freeing space in the taskbar use the Application Status category.
The system tray implementation can choose to provide the information delivered by the client application in different ways.


== Properties ==
== Properties ==


A System Tray Icon will Have the following elements and properties.
A System Tray Item will Have the following elements and properties.


* Icon
* Icon
Line 37: Line 38:
== Interactions ==
== Interactions ==


The interactions can be considered in terms of the 'Client' ie the icon itself, and the 'Host' eg. the system tray.
The interactions can be considered in terms of the 'Client' i.e. the icon itself, and the 'Host' e.g. the system tray.


=== Client ===
=== Client ===
A client of the system tray is an application that registers with the system tray to display its information. The system tray (the host) reacts to signals it receives from the client. The host also can pass back an action to the client application, for example when the application has been activated. The host receives the signals in an asynchronous fashion from the client.
A client of the system tray is an application that registers with the system tray to display its information. The system tray (the host) reacts to signals it receives from the client. The host also can pass back an action to the client application, for example when the application has been activated. The host receives the signals in an asynchronous fashion from the client. The display of the message might happen delayed.


=== Host ===
=== Host ===
Line 46: Line 47:


==== Signals ====
==== Signals ====
The client can signal the following to the host in order to change appearance and status:
The application can signal the following to the system tray host in order to change appearance and status of the icon:
* i have a new pixmap
* A new pixmap is available
* i have a new status
* The status changed


==== Slots ====
==== Slots ====

Revision as of 01:24, 27 February 2009

New System Tray Design

Categories

System tray icons generally fall into four categories:

  • Indicators of application status
  • Communications
  • System services
  • Hardware

Applications registering with the system tray provide one of those categories. An Instant Messaging application or an Email client will fall into 'Communications'. System services are for example software update notifications. Examples for Hardware are a battery monitor a mixer or a Network Management applet. Applications that use the system tray for freeing space in the taskbar use the Application Status category. The system tray implementation can choose to provide the information delivered by the client application in different ways.

Properties

A System Tray Item will Have the following elements and properties.

  • Icon
    • name
    • pixmap (possible size variants)
  • Tooltip
    • Headline
    • Subtext
    • Pixmap
  • Status
    • Passive (normal)
    • Active
    • Needs Attention
  • Interaction
    • Context menu
    • Activate
    • Wheel up/down

Interactions

The interactions can be considered in terms of the 'Client' i.e. the icon itself, and the 'Host' e.g. the system tray.

Client

A client of the system tray is an application that registers with the system tray to display its information. The system tray (the host) reacts to signals it receives from the client. The host also can pass back an action to the client application, for example when the application has been activated. The host receives the signals in an asynchronous fashion from the client. The display of the message might happen delayed.

Host

The Host is the system tray itself. It offers an interface for applications to register in a standardized way, acts on signals sent by these clients, and can do callbacks to the client application (for example to activate a window when the icon has been clicked).

Signals

The application can signal the following to the system tray host in order to change appearance and status of the icon:

  • A new pixmap is available
  • The status changed

Slots

The Host (system tray) can call the following slots in the application:

  • activated

Properties

The Host queries the client for the following properties:

  • tooltip data
  • name
  • pixmap

Draft of the D-Bus xml service description

Websvn link