GObject.Object
Unique.App
Import line: | Unique = imports.gi.Unique; |
GIR File: | Unique-1.0.gir |
C documentation: | UniqueApp |
Class : | App |
Extends: | GObject.Object |
Show / Hide Inherited methods, properties and signals |
Properties | Defined By | |
---|---|---|
is_running : Boolean
read only
Whether another instance of the application is running.
Whether another instance of the application is running.
|
Unique.App | |
name : String
The unique name of the application.
The unique name of the application. It must be in form of a domain-like string, like
|
Unique.App | |
parent_instance : GObject.Object
read only
|
Unique.App | |
priv : Unique.AppPrivate
read only
|
Unique.App | |
screen : Gdk.Screen
The GdkScreen of the application.
The GdkScreen of the application.
|
Unique.App | |
startup_id : String
The startup notification id, needed to complete the startup notification sequence.
The startup notification id, needed to complete the startup notification sequence. If not set, a default id will be automatically given.
|
Unique.App |
Method / Constructor | Defined By | |
---|---|---|
new Unique.App
(Object properties)
Create a new Unique.App
Create a new Unique.App
|
||
Create a new Unique.App
Create a new Unique.App
|
||
Adds command_name as a custom command that can be used by app.
Adds command_name as a custom command that can be used by app. You must call unique_app_add_command() before unique_app_send_message() in order to use the newly added command. id in unique_app_send_message() and inside the UniqueApp::message-received signal.
|
Unique.App | |
is_running
()
:
Boolean
Checks whether another instance of app is running.
Checks whether another instance of app is running.
|
Unique.App | |
Sends command to a running instance of app.
Sends command to a running instance of app. If you need to pass data to the instance, you should create a UniqueMessageData object using unique_message_data_new() and then fill it with the data you intend to pass. The running application will receive a UniqueApp::message-received signal and will call the various signal handlers attach to it. If any handler returns a UniqueResponse different than UNIQUE_RESPONSE_OK, the emission will stop.
|
Unique.App | |
watch_window
(Window window)
:
none
Makes app "watch" a window.
Makes app "watch" a window. Every watched window will receive startup notification changes automatically.
|
Unique.App |
Event | Defined By | |
---|---|---|
message_received (App self, Number command, MessageData message_data, Number time_)
:
Unique.Response
The ::message-received signal is emitted each time a second instance of UniqueApp with the same name as app is launched and sends a message using unique_app_send_message().
The ::message-received signal is emitted each time a second instance of UniqueApp with the same name as app is launched and sends a message using unique_app_send_message(). The currently running instance should check command for the action to execute and message_data for eventual other parameters (see UniqueMessageData). The signal handler should return a UniqueResponse value depending on whether the command was successfully completed or not. If the UNIQUE_RESPONSE_PASSTHROUGH return value is used, the signal emission chain will continue until another handler will return another response code.
|
Unique.App |