CinnamonBgMonitorInfo

CinnamonBgMonitorInfo — One connected monitor

Functions

Types and Values

Object Hierarchy

    GBoxed
    ╰── CinnamonBgMonitorInfo

Description

One currently connected monitor, as reported by the window manager. Obtained from cinnamon_bg_list_get_monitor_infos().

The model is matched to stored entries on connector and index ; x is the position in the layout, already sorted left-to-right. display_name is for labelling in a UI.

Functions

cinnamon_bg_monitor_info_copy ()

CinnamonBgMonitorInfo *
cinnamon_bg_monitor_info_copy (CinnamonBgMonitorInfo *self);

[skip]

Parameters

Returns

a copy of self .

[transfer full]


cinnamon_bg_monitor_info_free ()

void
cinnamon_bg_monitor_info_free (CinnamonBgMonitorInfo *self);

[skip]

Parameters

Types and Values

CinnamonBgMonitorInfo

typedef struct {
    char *connector;
    char *display_name;
    int x;
    int y;
    int width;
    int height;
    int index;
    gboolean primary;
} CinnamonBgMonitorInfo;

Members

char *connector;

the monitor's connector, for example eDP-1. The primary key a monitor is matched to a stored entry on.

 

char *display_name;

a human-readable name for the monitor: its own name where it has one, else its model, else connector . Never empty, so a consumer labelling a UI needs no fallback of its own.

 

int x;

the monitor's x position in the layout.

 

int y;

the monitor's y position in the layout.

 

int width;

the monitor's width in the layout, with its scale and rotation already applied.

 

int height;

the monitor's height in the layout.

 

int index;

the window manager's logical-monitor index.

 

gboolean primary;

whether this is the primary monitor.

 

See Also

CinnamonBgList, CinnamonBgItem