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_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

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 given applies to all corners of the panel.

New in version 0.0.1.

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:

READABLE, WRITABLE

The border radius of the panel edges in device pixels If a single border radius isn’t enough use multiple [type`Cutout`].

New in version 0.0.1.

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.