Gm.DisplayPanel

g GObject.Object GObject.Object Gm.DisplayPanel Gm.DisplayPanel GObject.Object->Gm.DisplayPanel

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

class

new_from_data (data)

class

new_from_resource (resource_name)

get_border_radius ()

get_corner_radii ()

get_cutouts ()

get_height ()

get_name ()

get_width ()

get_x_res ()

get_y_res ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

border-radius

int

d/r/w

deprecated

corner-radii

GLib.Array

r/w

cutouts

Gio.ListStore

r/w

height

int

r/w

name

str

r/w

width

int

r/w

x-res

int

r/w

y-res

int

r/w

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Gm.DisplayPanel(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Gm.DisplayPanelClass

Physical properties of a display panel like size, cutouts and rounded corners.

New in version 0.0.1.

classmethod new()
Returns:

The new display panel object

Return type:

Gm.DisplayPanel

Constructs a new display panel object.

New in version 0.0.1.

classmethod new_from_data(data)
Parameters:

data (str) – The panel’s data as JSON

Raises:

GLib.Error

Returns:

The new display panel object

Return type:

Gm.DisplayPanel

Constructs a new display panel based on the given data. If that fails NULL is returned and error describes the error that occurred.

New in version 0.0.1.

classmethod new_from_resource(resource_name)
Parameters:

resource_name (str) – A path to a gresource

Raises:

GLib.Error

Returns:

The new display panel object

Return type:

Gm.DisplayPanel

Constructs a new display panel by fetching the data from the given Gio.Resource. If that fails NULL is returned and error describes the error that occurred.

New in version 0.0.1.

get_border_radius()
Returns:

The panel’s border radius.

Return type:

int

Gets the panels border radius. 0 indicates rectangular corners. If top and bottom border radius are different then this matches the top border radius. given applies to all corners of the panel.

New in version 0.0.1.

Deprecated since version 0.6.0: Use [method`DisplayPanel`.get_corner_radii] instead

get_corner_radii()
Returns:

The panel’s border radii.

Return type:

[int]

Gets the panels border radii starting with the top-left corner clockwise.

New in version 0.6.0.

get_cutouts()
Returns:

The display cutouts

Return type:

Gio.ListModel

Get the display cutouts.

New in version 0.0.1.

get_height()
Returns:

The panel’s height.

Return type:

int

Gets the panels height in mm.

New in version 0.0.1.

get_name()
Returns:

The panel’s name

Return type:

str

Gets the panel’s name.

New in version 0.0.1.

get_width()
Returns:

The panel’s width.

Return type:

int

Gets the panels width in mm.

New in version 0.0.1.

get_x_res()
Returns:

The x resolution.

Return type:

int

Gets the panels resolution (in pixels) in the x direction

New in version 0.0.1.

get_y_res()
Returns:

The y resolution.

Return type:

int

Gets the panels resolution (in pixels) in the y direction.

New in version 0.0.1.

Property Details

Gm.DisplayPanel.props.border_radius
Name:

border-radius

Type:

int

Default Value:

0

Flags:

DEPRECATED, READABLE, WRITABLE

The corner radius of the panel edges in device pixels.

New in version 0.0.1.

Deprecated since version 0.6.0: Use [property`DisplayPanel`:corner-radii] instead

Gm.DisplayPanel.props.corner_radii
Name:

corner-radii

Type:

GLib.Array

Default Value:

None

Flags:

READABLE, WRITABLE

The radii of the panels corner starting top-left and going clockwise.

New in version 0.6.0.

Gm.DisplayPanel.props.cutouts
Name:

cutouts

Type:

Gio.ListStore

Default Value:

None

Flags:

READABLE, WRITABLE

The display cutouts as GListModel of [class`Cutout`].

New in version 0.0.1.

Gm.DisplayPanel.props.height
Name:

height

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The display height in millimeters

New in version 0.0.1.

Gm.DisplayPanel.props.name
Name:

name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The name of the display

New in version 0.0.1.

Gm.DisplayPanel.props.width
Name:

width

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The display width in millimeters

New in version 0.0.1.

Gm.DisplayPanel.props.x_res
Name:

x-res

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The panel resolution in pixels in the x direction

New in version 0.0.1.

Gm.DisplayPanel.props.y_res
Name:

y-res

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The panel resolution in pixels in the y direction

New in version 0.0.1.