PhoshShell

PhoshShell — The shell singleton

Functions

PhoshShell * phosh_shell_get_default ()
void phosh_shell_get_usable_area ()
void phosh_shell_get_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 ()
PhoshAppTracker * phosh_shell_get_app_tracker ()
PhoshBackgroundManager * phosh_shell_get_background_manager ()
PhoshCallsManager * phosh_shell_get_calls_manager ()
PhoshFeedbackManager * phosh_shell_get_feedback_manager ()
PhoshGtkMountManager * phosh_shell_get_gtk_mount_manager ()
PhoshLockscreenManager * phosh_shell_get_lockscreen_manager ()
PhoshModeManager * phosh_shell_get_mode_manager ()
PhoshMonitorManager * phosh_shell_get_monitor_manager ()
PhoshToplevelManager * phosh_shell_get_toplevel_manager ()
PhoshSessionManager * phosh_shell_get_session_manager ()
PhoshScreenSaverManager * phosh_shell_get_screen_saver_manager ()
PhoshBtManager * phosh_shell_get_bt_manager ()
PhoshDockedManager * phosh_shell_get_docked_manager ()
PhoshHksManager * phosh_shell_get_hks_manager ()
PhoshLocationManager * phosh_shell_get_location_manager ()
PhoshOskManager * phosh_shell_get_osk_manager ()
PhoshRotationManager * phosh_shell_get_rotation_manager ()
PhoshTorchManager * phosh_shell_get_torch_manager ()
PhoshVpnManager * phosh_shell_get_vpn_manager ()
PhoshWifiManager * phosh_shell_get_wifi_manager ()
PhoshWWan * phosh_shell_get_wwan ()
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 ()
PhoshShellDebugFlags phosh_shell_get_debug_flags ()
gboolean phosh_shell_get_show_splash ()
gboolean phosh_shell_get_docked ()

Properties

Signals

Types and Values

Object Hierarchy

    GFlags
    ├── PhoshShellDebugFlags
    ╰── PhoshShellStateFlags
    GObject
    ╰── PhoshShell

Description

PhoshShell is responsible for instantiating the GUI parts of the shellPhoshTopPanel, 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);

Gives the usable area in pixels usable by a client on the primary display.

Parameters

self

The shell

 

x

The x coordinate where client usable area starts.

[out][nullable]

y

The y coordinate where client usable area starts.

[out][nullable]

width

The width of the client usable area.

[out][nullable]

height

The height of the client usable area.

[out][nullable]

phosh_shell_get_area ()

void
phosh_shell_get_area (PhoshShell *self,
                      int *width,
                      int *height);

Gives the currently available screen area on the primary display.

Parameters

self

The shell singleton

 

width

The available width.

[nullable]

height

The available height.

[nullable]

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);

Parameters

self

The shell

 

Returns

the primary monitor or NULL if there currently are no outputs


phosh_shell_get_builtin_monitor ()

PhoshMonitor *
phosh_shell_get_builtin_monitor (PhoshShell *self);

phosh_shell_get_app_tracker ()

PhoshAppTracker *
phosh_shell_get_app_tracker (PhoshShell *self);

phosh_shell_get_background_manager ()

PhoshBackgroundManager *
phosh_shell_get_background_manager (PhoshShell *self);

phosh_shell_get_calls_manager ()

PhoshCallsManager *
phosh_shell_get_calls_manager (PhoshShell *self);

phosh_shell_get_feedback_manager ()

PhoshFeedbackManager *
phosh_shell_get_feedback_manager (PhoshShell *self);

phosh_shell_get_gtk_mount_manager ()

PhoshGtkMountManager *
phosh_shell_get_gtk_mount_manager (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_toplevel_manager ()

PhoshToplevelManager *
phosh_shell_get_toplevel_manager (PhoshShell *self);

phosh_shell_get_session_manager ()

PhoshSessionManager *
phosh_shell_get_session_manager (PhoshShell *self);

phosh_shell_get_screen_saver_manager ()

PhoshScreenSaverManager *
phosh_shell_get_screen_saver_manager (PhoshShell *self);

phosh_shell_get_bt_manager ()

PhoshBtManager *
phosh_shell_get_bt_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_osk_manager ()

PhoshOskManager *
phosh_shell_get_osk_manager (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_vpn_manager ()

PhoshVpnManager *
phosh_shell_get_vpn_manager (PhoshShell *self);

phosh_shell_get_wifi_manager ()

PhoshWifiManager *
phosh_shell_get_wifi_manager (PhoshShell *self);

phosh_shell_get_wwan ()

PhoshWWan *
phosh_shell_get_wwan (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,
                                GStrv action_names);

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

 

phosh_shell_get_debug_flags ()

PhoshShellDebugFlags
phosh_shell_get_debug_flags (PhoshShell *self);

phosh_shell_get_show_splash ()

gboolean
phosh_shell_get_show_splash (PhoshShell *self);

Whether splash screens should be used when apps start

Parameters

self

The PhoshShell singleton

 

Returns

TRUE when splash should be used, otherwise FALSE


phosh_shell_get_docked ()

gboolean
phosh_shell_get_docked (PhoshShell *self);

Parameters

self

The PhoshShell singleton

 

Returns

TRUE if the device is currently docked, otherwise FALSE.

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

 

enum PhoshShellDebugFlags

These flags are to enable/disable debugging features.

Members

PHOSH_SHELL_DEBUG_FLAG_NONE

No debug flags

 

PHOSH_SHELL_DEBUG_FLAG_ALWAYS_SPLASH

always use splash (even when docked)

 

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.

Owner: PhoshShell

Flags: Read


The “docked” property

  “docked”                   gboolean

Whether the device is currently docked. This mirrors the property from PhoshDockedManager for easier access.

Owner: PhoshShell

Flags: Read / Write

Default value: FALSE


The “locked” property

  “locked”                   gboolean

Whether the screen is currently locked. This mirrors the property from PhoshLockscreenManager for easier access.

Owner: PhoshShell

Flags: Read / Write

Default value: FALSE


The “primary-monitor” property

  “primary-monitor”          PhoshMonitor *

The primary monitor that has the panels, lock screen etc.

Owner: PhoshShell

Flags: Read / Write


The “shell-state” property

  “shell-state”              PhoshShellStateFlags

The state of the shell.

Owner: PhoshShell

Flags: Read

Signal Details

The “ready” signal

void
user_function (PhoshShell *phoshshell,
               gpointer    user_data)

Flags: Run Last