PhoshHead

PhoshHead — An output head

Functions

Properties

char * name Read
gpointer wlr-head Read / Write / Construct Only

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── PhoshHead

Description

A output head (usually a monitor). Only enabled heads corresponds to a wl_output and PhoshMonitor. PhoshHead should be considered an implementation detail of PhoshMonitorManager and not be used outside of it.

Functions

phosh_head_new_from_wlr_head ()

PhoshHead *
phosh_head_new_from_wlr_head (gpointer wlr_head);

phosh_head_get_wlr_head ()

struct zwlr_output_head_v1 *
phosh_head_get_wlr_head (PhoshHead *self);

Get the heads wlr_head

Parameters

self

The PhoshHead

 

Returns

The wayland head.

[transfer none]


phosh_head_get_enabled ()

gboolean
phosh_head_get_enabled (PhoshHead *self);

phosh_head_set_pending_enabled ()

void
phosh_head_set_pending_enabled (PhoshHead *self,
                                gboolean enabled);

Sets a head to pending enabled. This will become active after the next call to phosh_monitor_manager_apply_monitor_config().

Parameters

self

A PhoshHead

 

enabled

TRUE if the head should be enabled, otherwise FALSE

 

phosh_head_get_preferred_mode ()

PhoshHeadMode *
phosh_head_get_preferred_mode (PhoshHead *self);

Get the preferred mode

Parameters

self

The PhoshHead

 

Returns

The preferred mode.

[transfer none]


phosh_head_is_builtin ()

gboolean
phosh_head_is_builtin (PhoshHead *self);

Parameters

self

A PhoshHead

 

Returns

TRUE if the head built in panel (e.g. laptop panel or phone LCD)


phosh_head_find_mode_by_name ()

PhoshHeadMode *
phosh_head_find_mode_by_name (PhoshHead *self,
                              const char *name);

Parameters

self

A PhoshHead

 

name

The name of a mode

 

Returns

The PhoshHeadMode if found, otherwise NULL


phosh_head_calculate_supported_mode_scales ()

float *
phosh_head_calculate_supported_mode_scales
                               (PhoshHead *head,
                                PhoshHeadMode *mode,
                                int *n,
                                gboolean fractional);

phosh_head_clear_pending ()

void
phosh_head_clear_pending (PhoshHead *self);

Clear all pending state. This can be used if e.g. pending state was set but the output configuration not submitted.

Parameters

self

A PhoshHead

 

phosh_head_set_pending_transform ()

void
phosh_head_set_pending_transform (PhoshHead *self,
                                  PhoshMonitorTransform transform,
                                  GPtrArray *heads);

Types and Values

PHOSH_TYPE_HEAD

#define PHOSH_TYPE_HEAD                 (phosh_head_get_type ())

PhoshHeadMode

typedef struct {
} PhoshHeadMode;

struct PhoshHead

struct PhoshHead;

Property Details

The “name” property

  “name”                     char *

The head's name.

Owner: PhoshHead

Flags: Read

Default value: ""


The “wlr-head” property

  “wlr-head”                 gpointer

The wlr head associated with this head.

Owner: PhoshHead

Flags: Read / Write / Construct Only

Signal Details

The “head-finished” signal

void
user_function (PhoshHead *phoshhead,
               gpointer   user_data)

Flags: Run Last