Namespace

Gm – 0

Mobile friendly helpers

Version0.0.5-dev
AuthorsPurism SPC
LicenseLGPL-2.1-or-later
Websitehttps://gitlab.gnome.org/World/Phosh/gmobile
Sourcehttps://gitlab.gnome.org/World/Phosh/gmobile/

Build

C headersgmobile.h
pkg-config filesgmobile-0

Dependencies

Additional documentation

Classes

Cutout

A display cutout or notch.

since: 0.0.2

DeviceInfo

Get device dependent information.

since: 0.0.1

DisplayPanel

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

since: 0.0.1

Structs

Rect

A rectangle.

Error Domains

Error

Error codes returned by gmobile functions.

Functions

device_tree_get_compatibles

Read compatible machine types from sysfs_root/firmware/devicetree/base/compatible on Linux. If the path doesn’t exist or host is not Linux return NULL.

error_quark

Gets the GM Error Quark.

get_resource

init

Call this function to initialize the library explicitly. This makes the embedded device information available.

register_resource

svg_path_get_bounding_box

Returns the bounding box of an SVG path. As this is meant for display cutouts we operate on integer (whole pixel) values. When parsing fails, FALSE is returned and error contains the error information.

timeout_add_seconds_once

Sets a function to be called after a timeout with the default priority, G_PRIORITY_DEFAULT. Correctly calculates the timeout even when the system is suspended in between.

timeout_add_seconds_once_full

Sets a function to be called after a timeout with priority priority. Correctly calculates the timeout even when the system is suspended in between.

unregister_resource

Function Macros

str_is_null_or_empty

Convenience macro to check if a given string is NULL or empty. Evaluates to a truth value if x is NULL or x is the empty string otherwise FALSE.

since: 0.0.5

strv_is_null_or_empty

Convenience macro to check if a given GStrv is NULL or empty. Evaluates to a truth value if x is NULL or x has no elements otherwise FALSE.

since: 0.0.5