### Namespace

# Gm – 0

Functions and Objects useful in mobile related, glib based projects

Version | 0.7.3
Authors | The Phosh Developers
License | LGPL-2.1-or-later
Website | https://gitlab.gnome.org/World/Phosh/gmobile
Source | https://gitlab.gnome.org/World/Phosh/gmobile/

#### Build

C headers | `gmobile.h`
pkg-config files | `gmobile`

#### Dependencies

GLib—2.0 | The base type system library
| Browse documentation
Gio—2.0 | GObject Interfaces and Objects, Networking, IPC, and I/O
| Browse documentation

#### Additional documentation

- Compiling with gmobile
- Classes Hierarchy

#### 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. since: 0.0.1

#### Enumerations

CornerPosition |

#### Error Domains

Error | Error codes returned by gmobile functions. since: 0.0.1

#### 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`. since: 0.0.1
error_quark | Gets the GM Error Quark. since: 0.0.1
init | Call this function to initialize the library explicitly. This makes the embedded device information available. since: 0.0.1
list_devices | List device tree names of known devices. since: 0.2.2
mcc_to_iso | Get the ISO 3316-1 country code based on a given mobile country code (MCC). It’s sufficient for the given string to have the MCC as prefix. In other words it is o.k. to pass an IMSI. since: 0.4.0
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. since: 0.0.1
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. since: 0.0.1
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. since: 0.0.1
wakeup_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. It will wake up the system when needed. since: 0.3.0
wakeup_timeout_add_seconds_once_full | 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. It will wake up the system when needed. since: 0.3.0

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