-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move desktopintegration into own file
- Loading branch information
1 parent
f0930e6
commit 0a1c0bd
Showing
3 changed files
with
43 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
[DBus (name = "org.pantheon.gala.DesktopIntegration")] | ||
public interface Gala.DesktopIntegration : Object { | ||
public struct RunningApplications { | ||
string app_id; | ||
HashTable<string, Variant> details; | ||
} | ||
|
||
public struct Window { | ||
uint64 uid; | ||
HashTable<string, Variant> details; | ||
} | ||
|
||
private const string NAME = "org.pantheon.gala"; | ||
private const string PATH = "/org/pantheon/gala/DesktopInterface"; | ||
|
||
public signal void running_applications_changed (); | ||
|
||
public abstract async RunningApplications[] get_running_applications () throws DBusError, IOError; | ||
public abstract async Window[] get_windows () throws DBusError, IOError; | ||
|
||
private static Gala.DesktopIntegration? instance; | ||
|
||
public static async Gala.DesktopIntegration? get_instance () { | ||
if (instance != null) { | ||
return instance; | ||
} | ||
|
||
try { | ||
instance = yield Bus.get_proxy (SESSION, NAME, PATH); | ||
} catch (Error e) { | ||
warning ("Cannot connect to compositor, portal working with reduced functionality."); | ||
} | ||
|
||
return instance; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters