org.gnu.gnome
public class Client extends GObject
Constructor Summary | |
---|---|
Client()
Create a new session management client and try to connect to a session
manager. |
Method Summary | |
---|---|
void | addListener(ClientListener listener)
Register an object to handle Client events.
|
void | connect()
Try to connect to a session manager. |
void | disconnect()
Disconnect from the session manager. |
void | flush()
Flush the underlying connection to the connection manager. |
String | getConfigPrefix()
Get the config prefix for a client. |
String | getDesktopID() |
Class | getEventListenerClass(String signal) |
EventType | getEventType(String signal) |
ClientFlags | getFlags()
Returns some flags, that give additional information about this client. |
String | getGlobalConfigPrefix()
Get the config prefix for clients which have NOT been restarted or
cloned. |
String | getID() |
String | getPreviousID() |
static Type | getType()
Retrieve the runtime type used by the GLib library. |
void | removeListener(ClientListener listener)
Removes a listener
|
void | requestPhase2() |
void | requestSave(SaveStyle saveStyle, boolean shutdown, InteractStyle interactStyle, boolean fast, boolean global)
Request the session manager to save the session in some way. |
void | saveAnyDialog(Dialog dialog) |
void | saveErrorDialog(Dialog dialog) |
void | setCloneCommand(String[] args) |
void | setCurrentDirectory(String dir)
Sets the directory where all commands are executed. |
void | setDiscardCommand(String[] args) |
void | setEnvironment(String name, String value) |
void | setGlobalConfigPrefix(String prefix)
Set the value used for the global config prefix. |
void | setID(String id) |
void | setPriority(int priority)
The gnome-session manager includes an extension to the protocol which
allows the order in which clients are started up to be organized into a
number of run levels. |
void | setProcessID(int id) |
void | setProgram(String program) |
void | setResignCommand(String[] args) |
void | setRestartCommand(String[] args)
Provide the command that should be used to restart this application. |
void | setRestartStyle(RestartStyle style)
The session manager usually only restarts clients which are running when
the session was last saved. |
void | setShutdownCommand(String[] args) |
void | setUserID(String id) |
See Also: ClientListener
You may also use this prefix as a place to store and retrieve config details that you wish to apply to ALL instances of the app. However, this practice limits user's freedom to configure each instance in a different way so it should be used with caution.
See Also: addListener
The global config prefix defaults to a name based on the name of the executable. This function allows you to set it to a different value. It should be called BEFORE retrieving the config prefix for the first time.