Top |
This object wraps a GMenuTreeEntry, providing methods and signals primarily useful for running applications.
ClutterActor * cinnamon_app_create_icon_texture (CinnamonApp *app
,int size
);
Look up the icon for this application, and create a ClutterActor for it at the given size.
ClutterActor * cinnamon_app_create_icon_texture_for_window (CinnamonApp *app
,int size
,MetaWindow *for_window
);
Look up the icon for this application, and create a ClutterTexture for it at the given size. If for_window is NULL, it bases the icon off the most-recently-used window for the app, otherwise it attempts to use for_window for determining the icon.
gboolean
cinnamon_app_is_window_backed (CinnamonApp *app
);
A window backed application is one which represents just an open window, i.e. there's no .desktop file association, so we don't know how to launch it again.
void cinnamon_app_activate_window (CinnamonApp *app
,MetaWindow *window
,guint32 timestamp
);
Bring all windows for the given app to the foreground,
but ensure that window
is on top. If window
is NULL
,
the window with the most recent user time for the app
will be used.
This function has no effect if app
is not currently running.
void
cinnamon_app_activate (CinnamonApp *app
);
Like cinnamon_app_activate_full()
, but using the default workspace and
event timestamp.
void cinnamon_app_activate_full (CinnamonApp *app
,int workspace
,guint32 timestamp
);
Perform an appropriate default action for operating on this application, dependent on its current state. For example, if the application is not currently running, launch it. If it is running, activate the most recently used NORMAL window (or if that window has a transient, the most recently used transient for that window).
void cinnamon_app_open_new_window (CinnamonApp *app
,int workspace
);
Request that the application create a new window.
gboolean
cinnamon_app_can_open_new_window (CinnamonApp *app
);
Returns TRUE
if the app supports opening a new window through
cinnamon_app_open_new_window()
(ie, if calling that function will
result in actually opening a new window and not something else,
like presenting the most recently active one)
gboolean
cinnamon_app_request_quit (CinnamonApp *app
);
Initiate an asynchronous request to quit this application. The application may interact with the user, and the user might cancel the quit request from the application UI.
This operation may not be supported for all applications.
GSList *
cinnamon_app_get_windows (CinnamonApp *app
);
Get the toplevel, interesting windows which are associated with this application. The returned list will be sorted first by whether they're on the active workspace, then by whether they're visible, and finally by the time the user last interacted with them.
gboolean cinnamon_app_is_on_workspace (CinnamonApp *app
,MetaWorkspace *workspace
);
gboolean cinnamon_app_launch (CinnamonApp *app
,guint timestamp
,GList *uris
,int workspace
,char **startup_id
,GError **error
);
gboolean cinnamon_app_launch_offloaded (CinnamonApp *app
,guint timestamp
,GList *uris
,int workspace
,char **startup_id
,GError **error
);
Launch an application using the dedicated gpu (if available)
“state”
property“state” CinnamonAppState
The high-level state of the application, effectively whether it's running or not, or transitioning between those states.
Owner: CinnamonApp
Flags: Read
Default value: CINNAMON_APP_STATE_STOPPED
“windows-changed”
signalvoid user_function (CinnamonApp *cinnamonapp, gpointer user_data)
Flags: Run Last