LwOutput

LwOutput — Onscreen output area

Functions

Properties

guint height Read / Write / Construct Only
guint id Read
guint width Read / Write / Construct Only
guint x Read / Write / Construct Only
guint y Read / Write / Construct Only

Types and Values

struct LwOutput
struct LwOutputClass

Object Hierarchy

    GObject
    ╰── LwOutput

Description

The LwOutput object specifies the position and the size of an onscreen output area. Usually one LwOutput will be created for each physical monitor.

Functions

lw_output_get_aspect_ratio ()

gdouble
lw_output_get_aspect_ratio (LwOutput *self);

Returns the quotient of width and height if both are > 0 and 0 otherwise.

Parameters

self

A LwOutput

 

Returns

width / height


lw_output_get_height ()

guint
lw_output_get_height (LwOutput *self);

Parameters

self

A LwOutput

 

Returns

The height of the output


lw_output_get_id ()

guint
lw_output_get_id (LwOutput *self);

Since LiveWallpaper 0.5 the size and position of an output cannot change. You can use the ID to identify exactly this output.

Parameters

self

A LwOutput

 

Returns

The ID of the output


lw_output_get_longest_side ()

guint
lw_output_get_longest_side (LwOutput *self);

Returns the width if width > height, otherwise the height.

Parameters

self

A LwOutput

 

Returns

The longest side in pixels

Since: 0.5


lw_output_get_shortest_side ()

guint
lw_output_get_shortest_side (LwOutput *self);

Returns the width, if width < height, otherwise the height.

Parameters

self

A LwOutput

 

Returns

The shortest side in pixels

Since: 0.5


lw_output_get_width ()

guint
lw_output_get_width (LwOutput *self);

Parameters

self

A LwOutput

 

Returns

The width of the output


lw_output_get_x ()

guint
lw_output_get_x (LwOutput *self);

Parameters

self

A LwOutput

 

Returns

The position of the output in x direction


lw_output_get_y ()

guint
lw_output_get_y (LwOutput *self);

Parameters

self

A LwOutput

 

Returns

The position of the output in y direction


lw_output_make_current ()

void
lw_output_make_current (LwOutput *self);

Adjusts the OpenGL viewport to fit to the output. It also restricts the drawing operations to the viewport using glScissor. LiveWallpaper will call this for you so you don't have to do this again in lw_wallpaper_adjust_viewport().

Parameters

self

A LwOutput

 

Since: 0.5

Types and Values

struct LwOutput

struct LwOutput;

Represents an output area. One LwOutput will be created for each physical monitor.

If LiveWallpaper recognizes a new screen or if the screen resolution changes, all outputs will be destroyed and LiveWallpaper will create new outputs. Just keep this in mind if you associate data with a specific output, because the output can be destroyed and you don't recognize it.

LiveWallpaper will never destroy an output without calling lw_wallpaper_restore_viewport().


struct LwOutputClass

struct LwOutputClass {
};

Property Details

The “height” property

  “height”                   guint

The height of the output

Flags: Read / Write / Construct Only

Default value: 0


The “id” property

  “id”                       guint

ID of the output

Flags: Read

Default value: 0


The “width” property

  “width”                    guint

The width of the output

Flags: Read / Write / Construct Only

Default value: 0


The “x” property

  “x”                        guint

The X coordinate of the output

Flags: Read / Write / Construct Only

Default value: 0


The “y” property

  “y”                        guint

The Y coordinate of the output

Flags: Read / Write / Construct Only

Default value: 0