//Auto-generated by kalyptus. DO NOT EDIT. package org.trinitydesktop.koala; import org.trinitydesktop.qt.Qt; import org.trinitydesktop.qt.QtSupport; /** This namespace provides a method for issuing events to a KNotifyServer call KNotifyClient.event("eventname"); to issue it. On installation, there should be a file called $TDEDIR/share/apps/appname/eventsrc which contains the events. The file looks like this:
[!Global!] IconName=Filename (e.g. kdesktop, without any extension) Comment=FriendlyNameOfApp [eventname] Name=FriendlyNameOfEvent Comment=Description Of Event default_sound=filetoplay.wav default_logfile=logfile.txt default_commandline=command default_presentation=1 ...default_presentation contains these ORed events: None=0, Sound=1, Messagebox=2, Logfile=4, Stderr=8, PassivePopup=16, Execute=32, Taskbar=64 KNotify will search for sound files given with a relative path first in the application's sound directory (share/apps/Application Name/sounds), then in the KDE global sound directory (share/sounds). You can also use the "nopresentation" key, with any the presentations ORed. Those that are in that field will not appear in the kcontrol module. This was intended for software like KWin to not allow a window-opening that opens a window (e.g., allowing to disable KMessageBoxes from appearing) If the user edits the eventsrc file manually, it will appear. This only affects the KcmNotify. You can also use the following events, which are system controlled and do not need to be placed in your eventsrc:
present
@param file The log file to append the message to if selected with present
@return a value > 0, unique for this event if successful, 0 otherwise
@short Will fire an event that's not registered.
*/
public static native int userEvent(int winId, String text, int present, int level, String sound, String file);
public static native int userEvent(int winId, String text, int present, int level, String sound);
public static native int userEvent(int winId, String text, int present, int level);
public static native int userEvent(int winId, String text, int present);
public static native int userEvent(int winId, String text);
public static native int userEvent(int winId);
/**
This is a simple substitution for TQApplication.beep().
It simply calls
KNotifyClient.event( KNotifyClient.notification, reason );@param reason the reason, can be null. @short This is a simple substitution for TQApplication.beep(). */ public static native void beep(String reason); public static native void beep(); /** Gets the presentation associated with a certain event name Remeber that they may be ORed:
if (present & KNotifyClient.Sound) { [Yes, sound is a default] }@param eventname the event name to check @return the presentation methods @short Gets the presentation associated with a certain event name Remeber that they may be ORed:
if (present & KNotifyClient.Sound) { [Yes, sound is a default] }*/ public static native int getPresentation(String eventname); /** Gets the default file associated with a certain event name The control panel module will list all the event names This has the potential for being slow. @param eventname the name of the event @param present the presentation method @return the associated file. Can be null if not found. @short Gets the default file associated with a certain event name The control panel module will list all the event names This has the potential for being slow. */ public static native String getFile(String eventname, int present); /** Gets the default presentation for the event of this program. Remember that the Presentation may be ORed. Try this:
if (present & KNotifyClient.Sound) { [Yes, sound is a default] }@return the presentation methods @short Gets the default presentation for the event of this program. */ public static native int getDefaultPresentation(String eventname); /** Gets the default File for the event of this program. It gets it in relation to present. Some events don't apply to this function ("Message Box") Some do (Sound) @param eventname the name of the event @param present the presentation method @return the default file. Can be null if not found. @short Gets the default File for the event of this program. */ public static native String getDefaultFile(String eventname, int present); /** Shortcut to KNotifyClient.Instance.current() :) @return the current TDEInstance. @short Shortcut to KNotifyClient.Instance.current() :) */ public static native TDEInstanceInterface instance(); }