public class Application extends Object
org.gnome.gtk
] Application
class; see there for a full discussion.Modifier and Type | Class and Description |
---|---|
static interface |
Application.Activate
This signal is emitted on the primary instance when an
activation occurs (at startup or by calling the Application
activate() method. |
static interface |
Application.CommandLine
Connect to this signal to receive command line arguments from a
remote instance.
|
static interface |
Application.Startup
This signal is emitted on the primary instance immediately
after registration.
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
Emits the
Application.Activate signal. |
String |
getApplicationId()
Gets the unique identifier of the Application.
|
ApplicationFlags |
getFlags()
Returns the
flags of the Application. |
int |
getInactivityTimeout()
Returns the current inactivity timeout for the Application.
|
void |
hold()
Increases the use count of the Application.
|
boolean |
isRemote()
Checks if the Application is remote.
|
void |
quit()
Immediately quits the Application.
|
int |
run(String[] args)
Runs the Application.
|
void |
setApplicationId(String id)
Sets the unique identifier of the Application.
|
void |
setFlags(ApplicationFlags flags)
Sets the flags of the Application.
|
void |
setInactivityTimeout(int timeout)
Sets the current inactivity timeout (in milliseconds) for the
Application.
|
void |
unhold()
Decrease the use count of the Application.
|
public void activate()
Application.Activate
signal.public String getApplicationId()
public ApplicationFlags getFlags()
flags
of the Application.public int getInactivityTimeout()
unhold()
before the Application stops running.public void hold()
Use this function to indicate that the Application has a reason to
continue to run. This method is called by GTK+ when a top-level
Window
is on the screen.
To cancel the hold, call unhold()
.
public boolean isRemote()
Not sure what the point of this is; this method is not available
until after run()
has been called, and the signals raised
on this class all happen in the primary instance.
public void quit()
public int run(String[] args)
This is intended to be called from main()
. Its return
value is should be used as the exit value of the program.
You can pass null
if you don't have any command line
arguments.
public void setApplicationId(String id)
isValidId()
.public void setFlags(ApplicationFlags flags)
public void setInactivityTimeout(int timeout)
public void unhold()
When the use count reaches zero, the Application will stop running.
You should never call this function except to cancel the effect of a
previous call to hold()
.