summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KIPC.java
blob: a292104cb31175ceaae5478836da3e45d5631677 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;

import org.kde.qt.Qt;
import 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 TDEApplication. Examples are: PaletteChanged and
 StyleChanged. Messages with id code >= 32 are user messages. TDEApplication
 emits the signal kipcMessage(id,arg) for each user message it receives.
 KIPC is implemented using X11 ClientMessage events.
		@author Geert Jansen <jansen@kde.org>
 
		@short    This class implements a very simple IPC mechanism for KDE.
		@see TDEApplication#kipcMessage

*/
public class KIPC implements QtSupport {
	private long _qt;
	private boolean _allocatedInJavaWorld = true;
	protected KIPC(Class dummy){}

	/**	
		 A identifier for messages. Messages below UserMessage are system
		 messages, messages above can be defined by the user.
		     		@short    A identifier for messages.
	*/
	public static final int PaletteChanged = 0;
	public static final int FontChanged = 1;
	public static final int StyleChanged = 2;
	public static final int BackgroundChanged = 3;
	public static final int SettingsChanged = 4;
	public static final int IconChanged = 5;
	public static final int ToolbarStyleChanged = 6;
	public static final int ClipboardConfigChanged = 7;
	public static final int BlockShortcuts = 8;
	public static final int UserMessage = 32;

	public KIPC() {
		newKIPC();
	}
	private native void newKIPC();
	/**	
		 Send a message to a specific application.
			@param msg The message to send.
			@param w The window id of a toplevel window of the target application.
			@param data An optional integer of data.
		     		@short    Send a message to a specific application.
	*/
	public static native void sendMessage(int msg, long w, int data);
	public static native void sendMessage(int msg, long w);
	/**	
		 Send a message to all KDE application on the current display.
			@param msg The message to send.
			@param data An optional integer of data.
		     		@short    Send a message to all KDE application on the current display.
	*/
	public static native void sendMessageAll(int msg, int data);
	public static native void sendMessageAll(int msg);
	/** Deletes the wrapped C++ instance */
	protected native void finalize() throws InternalError;
	/** Delete the wrapped C++ instance ahead of finalize() */
	public native void dispose();
	/** Has the wrapped C++ instance been deleted? */
	public native boolean isDisposed();
}