Commit 1205319f authored by Guido Gunther's avatar Guido Gunther

shell: Add PhoshHksManager

RFKILL code heavily borowed from g-s-d
Signed-off-by: Guido Gunther's avatarGuido Günther <guido.gunther@puri.sm>
parent 0deb5d76
......@@ -116,6 +116,7 @@ typedef struct
PhoshTorchManager *torch_manager;
PhoshModeManager *mode_manager;
PhoshDockedManager *docked_manager;
PhoshHksManager *hks_manager;
PhoshKeyboardEvents *keyboard_events;
PhoshGnomeShellManager *gnome_shell_manager;
......@@ -340,6 +341,7 @@ phosh_shell_dispose (GObject *object)
g_clear_object (&priv->keyboard_events);
/* dispose managers in opposite order of declaration */
g_clear_object (&priv->hks_manager);
g_clear_object (&priv->docked_manager);
g_clear_object (&priv->mode_manager);
g_clear_object (&priv->torch_manager);
......@@ -1004,6 +1006,22 @@ phosh_shell_get_docked_manager (PhoshShell *self)
}
PhoshHksManager *
phosh_shell_get_hks_manager (PhoshShell *self)
{
PhoshShellPrivate *priv;
g_return_val_if_fail (PHOSH_IS_SHELL (self), NULL);
priv = phosh_shell_get_instance_private (self);
if (!priv->hks_manager)
priv->hks_manager = phosh_hks_manager_new ();
g_return_val_if_fail (PHOSH_IS_HKS_MANAGER (priv->hks_manager), NULL);
return priv->hks_manager;
}
PhoshSessionManager *
phosh_shell_get_session_manager (PhoshShell *self)
{
......
......@@ -11,6 +11,7 @@
#include "bt-manager.h"
#include "docked-manager.h"
#include "feedback-manager.h"
#include "hks-manager.h"
#include "lockscreen-manager.h"
#include "monitor-manager.h"
#include "monitor/monitor.h"
......@@ -58,6 +59,7 @@ PhoshBtManager *phosh_shell_get_bt_manager (PhoshShell *self);
PhoshWWan *phosh_shell_get_wwan (PhoshShell *self);
PhoshTorchManager *phosh_shell_get_torch_manager (PhoshShell *self);
PhoshDockedManager *phosh_shell_get_docked_manager (PhoshShell *self);
PhoshHksManager * phosh_shell_get_hks_manager (PhoshShell *self);
PhoshSessionManager *phosh_shell_get_session_manager (PhoshShell *self);
void phosh_shell_fade_out (PhoshShell *self, guint timeout);
void phosh_shell_enable_power_save (PhoshShell *self, gboolean enable);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment