PhoshShell

PhoshShell — The shell singleton

Functions

PhoshShell * phosh_shell_get_default ()
void phosh_shell_get_usable_area ()
void phosh_shell_set_locked ()
gboolean phosh_shell_get_locked ()
void phosh_shell_lock ()
void phosh_shell_unlock ()
void phosh_shell_set_primary_monitor ()
PhoshMonitor * phosh_shell_get_primary_monitor ()
PhoshMonitor * phosh_shell_get_builtin_monitor ()
PhoshLockscreenManager * phosh_shell_get_lockscreen_manager ()
PhoshModeManager * phosh_shell_get_mode_manager ()
PhoshMonitorManager * phosh_shell_get_monitor_manager ()
PhoshOskManager * phosh_shell_get_osk_manager ()
PhoshToplevelManager * phosh_shell_get_toplevel_manager ()
PhoshWifiManager * phosh_shell_get_wifi_manager ()
PhoshFeedbackManager * phosh_shell_get_feedback_manager ()
PhoshBtManager * phosh_shell_get_bt_manager ()
PhoshWWan * phosh_shell_get_wwan ()
PhoshRotationManager * phosh_shell_get_rotation_manager ()
PhoshTorchManager * phosh_shell_get_torch_manager ()
PhoshDockedManager * phosh_shell_get_docked_manager ()
PhoshHksManager * phosh_shell_get_hks_manager ()
PhoshLocationManager * phosh_shell_get_location_manager ()
PhoshSessionManager * phosh_shell_get_session_manager ()
void phosh_shell_fade_out ()
void phosh_shell_enable_power_save ()
gboolean phosh_shell_started_by_display_manager ()
gboolean phosh_shell_is_startup_finished ()
void phosh_shell_add_global_keyboard_action_entries ()
void phosh_shell_remove_global_keyboard_action_entries ()
gboolean phosh_shell_is_session_active ()
GdkAppLaunchContext * phosh_shell_get_app_launch_context ()
PhoshShellStateFlags phosh_shell_get_state ()
void phosh_shell_set_state ()

Properties

Types and Values

Object Hierarchy

    GFlags
    ╰── PhoshShellStateFlags
    GObject
    ╰── PhoshShell

Description

PhoshShell is responsible for instantiating the GUI parts of the shellPhoshPanel, PhoshHome,… and the managers that interface with DBus PhoshMonitorManager, PhoshFeedbackManager, … and coordinates between them.

Functions

phosh_shell_get_default ()

PhoshShell *
phosh_shell_get_default (void);

phosh_shell_get_usable_area ()

void
phosh_shell_get_usable_area (PhoshShell *self,
                             int *x,
                             int *y,
                             int *width,
                             int *height);

phosh_shell_set_locked ()

void
phosh_shell_set_locked (PhoshShell *self,
                        gboolean locked);

Lock the shell. We proxy to lockscreen-manager to avoid that other parts of the shell need to care about this abstraction.

Parameters

self

The PhoshShell singleton

 

locked

TRUE to lock the shell

 

phosh_shell_get_locked ()

gboolean
phosh_shell_get_locked (PhoshShell *self);

Parameters

self

The PhoshShell singleton

 

Returns

TRUE if the shell is currently locked, otherwise FALSE.


phosh_shell_lock ()

void
phosh_shell_lock (PhoshShell *self);

phosh_shell_unlock ()

void
phosh_shell_unlock (PhoshShell *self);

phosh_shell_set_primary_monitor ()

void
phosh_shell_set_primary_monitor (PhoshShell *self,
                                 PhoshMonitor *monitor);

phosh_shell_get_primary_monitor ()

PhoshMonitor *
phosh_shell_get_primary_monitor (PhoshShell *self);

phosh_shell_get_builtin_monitor ()

PhoshMonitor *
phosh_shell_get_builtin_monitor (PhoshShell *self);

phosh_shell_get_lockscreen_manager ()

PhoshLockscreenManager *
phosh_shell_get_lockscreen_manager (PhoshShell *self);

phosh_shell_get_mode_manager ()

PhoshModeManager *
phosh_shell_get_mode_manager (PhoshShell *self);

phosh_shell_get_monitor_manager ()

PhoshMonitorManager *
phosh_shell_get_monitor_manager (PhoshShell *self);

phosh_shell_get_osk_manager ()

PhoshOskManager *
phosh_shell_get_osk_manager (PhoshShell *self);

phosh_shell_get_toplevel_manager ()

PhoshToplevelManager *
phosh_shell_get_toplevel_manager (PhoshShell *self);

phosh_shell_get_wifi_manager ()

PhoshWifiManager *
phosh_shell_get_wifi_manager (PhoshShell *self);

phosh_shell_get_feedback_manager ()

PhoshFeedbackManager *
phosh_shell_get_feedback_manager (PhoshShell *self);

phosh_shell_get_bt_manager ()

PhoshBtManager *
phosh_shell_get_bt_manager (PhoshShell *self);

phosh_shell_get_wwan ()

PhoshWWan *
phosh_shell_get_wwan (PhoshShell *self);

phosh_shell_get_rotation_manager ()

PhoshRotationManager *
phosh_shell_get_rotation_manager (PhoshShell *self);

phosh_shell_get_torch_manager ()

PhoshTorchManager *
phosh_shell_get_torch_manager (PhoshShell *self);

phosh_shell_get_docked_manager ()

PhoshDockedManager *
phosh_shell_get_docked_manager (PhoshShell *self);

phosh_shell_get_hks_manager ()

PhoshHksManager *
phosh_shell_get_hks_manager (PhoshShell *self);

phosh_shell_get_location_manager ()

PhoshLocationManager *
phosh_shell_get_location_manager (PhoshShell *self);

phosh_shell_get_session_manager ()

PhoshSessionManager *
phosh_shell_get_session_manager (PhoshShell *self);

phosh_shell_fade_out ()

void
phosh_shell_fade_out (PhoshShell *self,
                      guint timeout);

phosh_shell_enable_power_save ()

void
phosh_shell_enable_power_save (PhoshShell *self,
                               gboolean enable);

phosh_shell_started_by_display_manager ()

gboolean
phosh_shell_started_by_display_manager
                               (PhoshShell *self);

Parameters

self

The shell

 

Returns

TRUE if we were started from a display manager. FALSE otherwise.


phosh_shell_is_startup_finished ()

gboolean
phosh_shell_is_startup_finished (PhoshShell *self);

Parameters

self

The shell

 

Returns

TRUE if the shell finished startup. FALSE otherwise.


phosh_shell_add_global_keyboard_action_entries ()

void
phosh_shell_add_global_keyboard_action_entries
                               (PhoshShell *self,
                                const GActionEntry *actions,
                                gint n_entries,
                                gpointer user_data);

phosh_shell_remove_global_keyboard_action_entries ()

void
phosh_shell_remove_global_keyboard_action_entries
                               (PhoshShell *self,
                                const GActionEntry *actions,
                                gint n_entries);

phosh_shell_is_session_active ()

gboolean
phosh_shell_is_session_active (PhoshShell *self);

Whether this shell is part of the active session

Parameters

self

The shell

 

phosh_shell_get_app_launch_context ()

GdkAppLaunchContext *
phosh_shell_get_app_launch_context (PhoshShell *self);

phosh_shell_get_state ()

PhoshShellStateFlags
phosh_shell_get_state (PhoshShell *self);

Parameters

self

The shell

 

Returns

The current PhoshShellStateFlags


phosh_shell_set_state ()

void
phosh_shell_set_state (PhoshShell *self,
                       PhoshShellStateFlags state,
                       gboolean enabled);

Set the shells state.

Parameters

self

The shell

 

state

The PhoshShellStateFlags to set

 

enabled

TRUE to set a shell state, FALSE to reset

 

Types and Values

enum PhoshShellStateFlags

These flags are used to keep track of the state the PhoshShell is in.

Members

PHOSH_STATE_NONE

No other state

 

PHOSH_STATE_MODAL_SYSTEM_PROMPT

any modal prompt shown

 

PHOSH_STATE_BLANKED

built-in display off

 

PHOSH_STATE_LOCKED

displays locked

 

PHOSH_STATE_SETTINGS

settings menu unfolded from top bar

 

PHOSH_STATE_OVERVIEW

overview unfolded from bottom bar

 

PHOSH_APP_ID

#define PHOSH_APP_ID "sm.puri.Phosh"

PHOSH_TYPE_SHELL

#define PHOSH_TYPE_SHELL phosh_shell_get_type()

PhoshShell

typedef struct _PhoshShell PhoshShell;

Property Details

The “builtin-monitor” property

  “builtin-monitor”          PhoshMonitor *

The built in monitor. This is a hardware property and hence can only be read. It can be NULL when not present or disabled.

Flags: Read


The “locked” property

  “locked”                   gboolean

Whether the screen is locked.

Flags: Read / Write

Default value: FALSE


The “primary-monitor” property

  “primary-monitor”          PhoshMonitor *

The primary monitor that has the panels, lock screen etc. This can't be NULL.

Flags: Read / Write


The “shell-state” property

  “shell-state”              PhoshShellStateFlags

The state of the shell.

Flags: Read