kdecore Library API Documentation

KIPC Class Reference

This class implements a very simple IPC mechanism for KDE. More...

#include <kipc.h>

List of all members.

Public Types

enum  Message { , UserMessage = 32 }
 A identifier for messages. More...


Static Public Methods

void sendMessage (Message msg, WId w, int data=0)
 Send a message to a specific application.

void sendMessageAll (Message msg, int data=0)
 Send a message to all KDE application on the current display.


Detailed Description

This class implements a very simple IPC mechanism for KDE.

You can send a message of a predefined type to either a specific application, or to all KDE application on the current display. The message can carry one integer of data.

KIPC is mainly used in KDE for sending "Change Messages", i.e. a message to all KDE apps that a certain setting (the font, for example) has changed. For anything more complex it is recommended to use DCOP -- the Desktop Communications Protocol.

Messages with id code < 32 are called "System Messages". These are directly handled by KApplication. Examples are: PaletteChanged and StyleChanged. Messages with id code >= 32 are user messages. KApplication emits the signal kipcMessage(id,arg) for each user message it receives.

KIPC is implemented using X11 ClientMessage events.

See also:
KApplication::kipcMessage()
Author:
Geert Jansen <jansen@kde.org>
Version:
Id:
kipc.h,v 1.15 2002/10/10 19:10:54 tjansen Exp

Definition at line 47 of file kipc.h.


Member Enumeration Documentation

enum KIPC::Message
 

A identifier for messages.

Messages below UserMessage are system messages, messages above can be defined by the user.

Enumeration values:
UserMessage 
Since:
3.1

Definition at line 54 of file kipc.h.


Member Function Documentation

void KIPC::sendMessage Message    msg,
WId    w,
int    data = 0
[static]
 

Send a message to a specific application.

Parameters:
msg  The message to send.
w  The window id of a toplevel window of the target application.
data  An optional integer of data.

Definition at line 62 of file kipc.cpp.

Referenced by sendMessageAll().

void KIPC::sendMessageAll Message    msg,
int    data = 0
[static]
 

Send a message to all KDE application on the current display.

Parameters:
msg  The message to send.
data  An optional integer of data.

Definition at line 89 of file kipc.cpp.

References sendMessage().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.0.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Oct 8 12:20:45 2003 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2001