org.kde.koala
Class KIPC

java.lang.Object
  extended by org.kde.koala.KIPC
All Implemented Interfaces:
org.kde.qt.QtSupport

public class KIPC
extends java.lang.Object
implements org.kde.qt.QtSupport

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.

Author:
Geert Jansen
See Also:
KApplication#kipcMessage

Field Summary
static int BackgroundChanged
           
static int BlockShortcuts
           
static int ClipboardConfigChanged
           
static int FontChanged
           
static int IconChanged
           
static int PaletteChanged
          A identifier for messages.
static int SettingsChanged
           
static int StyleChanged
           
static int ToolbarStyleChanged
           
static int UserMessage
           
 
Constructor Summary
  KIPC()
           
protected KIPC(java.lang.Class dummy)
           
 
Method Summary
 void dispose()
          Delete the wrapped C++ instance ahead of finalize()
protected  void finalize()
          Deletes the wrapped C++ instance
 boolean isDisposed()
          Has the wrapped C++ instance been deleted?
static void sendMessage(int msg, long w)
           
static void sendMessage(int msg, long w, int data)
          Send a message to a specific application.
static void sendMessageAll(int msg)
           
static void sendMessageAll(int msg, int data)
          Send a message to all KDE application on the current display.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PaletteChanged

public static final int PaletteChanged
A identifier for messages. Messages below UserMessage are system messages, messages above can be defined by the user.

See Also:
Constant Field Values

FontChanged

public static final int FontChanged
See Also:
Constant Field Values

StyleChanged

public static final int StyleChanged
See Also:
Constant Field Values

BackgroundChanged

public static final int BackgroundChanged
See Also:
Constant Field Values

SettingsChanged

public static final int SettingsChanged
See Also:
Constant Field Values

IconChanged

public static final int IconChanged
See Also:
Constant Field Values

ToolbarStyleChanged

public static final int ToolbarStyleChanged
See Also:
Constant Field Values

ClipboardConfigChanged

public static final int ClipboardConfigChanged
See Also:
Constant Field Values

BlockShortcuts

public static final int BlockShortcuts
See Also:
Constant Field Values

UserMessage

public static final int UserMessage
See Also:
Constant Field Values
Constructor Detail

KIPC

protected KIPC(java.lang.Class dummy)

KIPC

public KIPC()
Method Detail

sendMessage

public static void sendMessage(int msg,
                               long w,
                               int data)
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.

sendMessage

public static void sendMessage(int msg,
                               long w)

sendMessageAll

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

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

sendMessageAll

public static void sendMessageAll(int msg)

finalize

protected void finalize()
                 throws java.lang.InternalError
Deletes the wrapped C++ instance

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.InternalError

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()


isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?