Struct rustwlc::handle::WlcOutput [] [src]

#[repr(C)]
pub struct WlcOutput(pub uintptr_t);

Represents a handle to a wlc output.

Methods

impl WlcOutput
[src]

[src]

Compatability/debugging function.

wlc internally stores views and outputs under the same type. If for some reason a conversion between the two was required, this function could be called. If this is the case please submit a bug report.

[src]

Determines if this is a null a output (invalid).

[src]

Create a dummy WlcOutput for testing purposes.

Unsafety

The following operations on a dummy WlcOutput will cause crashes:

  • WlcOutput::focused when wlc is not running
  • WlcOutput::list when wlc is not running
  • WlcOutput::set_resolution on a dummy output

In addition, WlcOutput::set_views will return an error.

All other methods can be used on dummy outputs.

Example

unsafe {
    let output = WlcOutput::dummy(0u32);
    let output2 = WlcOutput::dummy(1u32);
    assert!(output < output2);
    assert!(output != output2);
}

[src]

Gets user-specified data.

Unsafety

The wlc implementation of this method uses void* pointers for raw C data. This function will internaly do a conversion between the input T and a libc::c_void.

This is a highly unsafe conversion with no guarantees. As such, usage of these functions requires an understanding of what data they will have. Please review wlc's usage of these functions before attempting to use them yourself.

[src]

Sets user-specified data.

Unsafety

The wlc implementation of this method uses void* pointers for raw C data. This function will internaly do a conversion between the input T and a libc::c_void.

This is a highly unsafe conversion with no guarantees. As such, usage of these functions requires an understanding of what data they will have. Please review wlc's usage of these functions before attempting to use them yourself.

[src]

Schedules output for rendering next frame.

If the output was already scheduled, this is a no-op; if output is currently rendering, it will render immediately after.

[src]

Gets a list of the current outputs.

Safety

This function will crash the program if run when wlc is not running.

[src]

Gets the currently focused output.

Safety

This function will crash the program if run when wlc is not running.

[src]

Gets the name of the WlcOutput.

Names are usually assigned in the format WLC-n, where the first output is WLC-1.

[src]

Gets the sleep status of the output.

Returns true if the monitor is sleeping, such as having been set with set_sleep.

[src]

Sets the sleep status of the output.

[src]

Gets the output's real resolution. Do not use for coordinate boundary.

[src]

Get the virtual resolution. Helpful for getting resolution on high dpi displays. Use this to calculate coordinate boundary.

[src]

Sets the resolution of the output.

Safety

This method will crash the program if use when wlc is not running.

[src]

Get the scaling for the output.

[src]

Get views in stack order.

This is mainly useful for wm's who need another view stack for inplace sorting. For example tiling wms, may want to use this to keep their tiling order separated from floating order. This handles wlc_output_get_views and wlc_output_get_mutable_views.

[src]

Gets the mask of this output

[src]

Sets the mask for this output

[src]

Deprecated since 0.5.3

: please use get_views

Deprecated

This function is equivalent to simply calling get_views

[src]

Attempts to set the views of a given output.

Returns success if operation succeeded. An error will be returned if something went wrong or if wlc isn't running.

[src]

Focuses compositor on a specific output.

Pass in Option::None for no focus.

[src]

Gets the renderer in use for this WlcOutput

Trait Implementations

impl Copy for WlcOutput
[src]

impl Clone for WlcOutput
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for WlcOutput
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for WlcOutput
[src]

impl PartialOrd for WlcOutput
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for WlcOutput
[src]

[src]

This method returns an Ordering between self and other. Read more

1.22.0
[src]

Compares and returns the maximum of two values. Read more

1.22.0
[src]

Compares and returns the minimum of two values. Read more

impl Hash for WlcOutput
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for WlcOutput
[src]

[src]

Formats the value using the given formatter.

impl Display for WlcOutput
[src]

[src]

Formats the value using the given formatter. Read more

impl From<WlcView> for WlcOutput
[src]

[src]

Performs the conversion.