#include "config.h"
#include "ev-media-player-keys.h"
#include <string.h>
#include <glib.h>
#include <gio/gio.h>
Go to the source code of this file.
#define SD_INTERFACE "org.gnome.SettingsDaemon.MediaKeys" |
#define SD_NAME "org.gnome.SettingsDaemon" |
#define SD_OBJECT_PATH "/org/gnome/SettingsDaemon/MediaKeys" |
Definition at line 64 of file ev-media-player-keys.c.
66 GObjectClass *object_class = G_OBJECT_CLASS (klass);
71 g_signal_new (
"key_pressed",
76 g_cclosure_marshal_VOID__STRING,
static void ev_media_player_keys_finalize |
( |
GObject * |
object) | |
|
|
static |
Definition at line 214 of file ev-media-player-keys.c.
218 if (keys->
proxy != NULL) {
220 g_object_unref (keys->
proxy);
225 G_OBJECT_CLASS (ev_media_player_keys_parent_class)->finalize (
object);
Definition at line 97 of file ev-media-player-keys.c.
107 g_dbus_proxy_call (keys->
proxy,
108 "GrabMediaPlayerKeys",
109 g_variant_new (
"(su)",
"Evince", 1),
110 G_DBUS_CALL_FLAGS_NO_AUTO_START,
Definition at line 191 of file ev-media-player-keys.c.
193 g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION,
194 G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
Definition at line 116 of file ev-media-player-keys.c.
121 g_dbus_proxy_call (keys->
proxy,
122 "ReleaseMediaPlayerKeys",
123 g_variant_new (
"(s)",
"Evince"),
124 G_DBUS_CALL_FLAGS_NO_AUTO_START,
static void media_player_key_pressed_cb |
( |
GDBusProxy * |
proxy, |
|
|
gchar * |
sender_name, |
|
|
gchar * |
signal_name, |
|
|
GVariant * |
parameters, |
|
|
gpointer |
user_data |
|
) |
| |
|
static |
Definition at line 130 of file ev-media-player-keys.c.
136 const char *application, *key;
138 if (g_strcmp0 (sender_name,
SD_NAME) != 0)
141 if (g_strcmp0 (signal_name,
"MediaPlayerKeyPressed") != 0)
144 if (!g_variant_is_of_type (parameters, G_VARIANT_TYPE (
"(ss)")))
147 g_variant_get (parameters,
"(&s&s)", &application, &key);
149 if (strcmp (
"Evince", application) == 0) {
static void mediakeys_name_owner_changed |
( |
GObject * |
object, |
|
|
GParamSpec * |
pspec, |
|
|
gpointer |
user_data |
|
) |
| |
|
static |
static void mediakeys_service_appeared_cb |
( |
GObject * |
source_object, |
|
|
GAsyncResult * |
res, |
|
|
gpointer |
user_data |
|
) |
| |
|
static |
Definition at line 165 of file ev-media-player-keys.c.
172 proxy = g_dbus_proxy_new_for_bus_finish (res, NULL);
178 g_signal_connect (proxy,
"g-signal",
181 g_signal_connect (proxy,
"notify::g-name-owner",