//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 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 <jansen@kde.org>
 
		@short    This class implements a very simple IPC mechanism for KDE.
		@see KApplication#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();
}
