## PhoshModeManager

PhoshModeManager — Determines the device mode

## Functions

PhoshModeManager * | phosh_mode_manager_new ()
PhoshModeDeviceType | phosh_mode_manager_get_device_type ()
PhoshModeDeviceType | phosh_mode_manager_get_mimicry ()

## Properties

PhoshModeDeviceType | device-type | Read
PhoshModeHwFlags | hw-flags | Read
PhoshModeDeviceType | mimicry | Read

## Types and Values

enum | PhoshModeDeviceType
enum | PhoshModeHwFlags
#define | PHOSH_MODE_DOCKED_PHONE_MASK
#define | PHOSH_MODE_DOCKED_TABLET_MASK
#define | PHOSH_TYPE_MODE_MANAGER
| PhoshModeManager

## Object Hierarchy

        GEnum
        ╰── PhoshModeDeviceType
        GFlags
        ╰── PhoshModeHwFlags
        GObject
        ╰── PhoshManager
            ╰── PhoshModeManager

## Description

PhoshModeManager tracks the device mode and attached hardware.

## Functions

### phosh_mode_manager_new ()

    PhoshModeManager *
    phosh_mode_manager_new (void);

### phosh_mode_manager_get_device_type ()

    PhoshModeDeviceType
    phosh_mode_manager_get_device_type (PhoshModeManager *self);

### phosh_mode_manager_get_mimicry ()

    PhoshModeDeviceType
    phosh_mode_manager_get_mimicry (PhoshModeManager *self);

## Types and Values

### enum PhoshModeDeviceType

A type of device

#### Members

PHOSH_MODE_DEVICE_TYPE_UNKNOWN | unknown device type |
PHOSH_MODE_DEVICE_TYPE_PHONE | a phone/handset |
PHOSH_MODE_DEVICE_TYPE_LAPTOP | a laptop |
PHOSH_MODE_DEVICE_TYPE_DESKTOP | a desktop computer |
PHOSH_MODE_DEVICE_TYPE_TABLET | a tablet computer |
PHOSH_MODE_DEVICE_TYPE_CONVERTIBLE | a convertible |

### enum PhoshModeHwFlags

Attached external hardware

#### Members

PHOSH_MODE_HW_NONE | nothing |
PHOSH_MODE_HW_EXT_DISPLAY | external display |
PHOSH_MODE_HW_KEYBOARD | keyboard |
PHOSH_MODE_HW_POINTER | pointing device |

### PHOSH_MODE_DOCKED_PHONE_MASK

    #define             PHOSH_MODE_DOCKED_PHONE_MASK

### PHOSH_MODE_DOCKED_TABLET_MASK

    #define PHOSH_MODE_DOCKED_TABLET_MASK (PHOSH_MODE_HW_POINTER)

### PHOSH_TYPE_MODE_MANAGER

    #define PHOSH_TYPE_MODE_MANAGER (phosh_mode_manager_get_type ())

### PhoshModeManager

    typedef struct _PhoshModeManager PhoshModeManager;

## Property Details

### The `“device-type”` property

      “device-type”              PhoshModeDeviceType

The device type.

Owner: PhoshModeManager

Flags: Read

Default value: PHOSH_MODE_DEVICE_TYPE_PHONE

### The `“hw-flags”` property

      “hw-flags”                 PhoshModeHwFlags

Flags for available hardware.

Owner: PhoshModeManager

Flags: Read

### The `“mimicry”` property

      “mimicry”                  PhoshModeDeviceType

The device mimicry.

Owner: PhoshModeManager

Flags: Read

Default value: PHOSH_MODE_DEVICE_TYPE_PHONE