Struct dummy_rustwlc::handle::WlcOutput [] [src]

pub struct WlcOutput(_);

Represents a handle to a wlc output.

Methods

impl WlcOutput
[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.

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

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

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.

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.

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.

Gets a list of the current outputs.

Safety

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

Gets the currently focused output.

Safety

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

Gets the name of the WlcOutput.

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

Gets the sleep status of the output.

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

Sets the sleep status of the output.

Gets the output resolution in pixels.

Sets the resolution of the output.

Safety

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

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.

Gets the mask of this output

Sets the mask for this output

Deprecated

This function is equivalent to simply calling get_views

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.

Focuses compositor on a specific output.

Pass in Option::None for no focus.

Trait Implementations

impl Debug for WlcOutput
[src]

Formats the value using the given formatter.

impl Clone for WlcOutput
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for WlcOutput
[src]

impl PartialEq for WlcOutput
[src]

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

This method tests for !=.

impl Eq for WlcOutput
[src]

impl PartialOrd for WlcOutput
[src]

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

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

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

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

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]

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

impl Hash for WlcOutput
[src]

Feeds this value into the state given, updating the hasher as necessary.

Feeds a slice of this type into the state provided.

impl From<WlcView> for WlcOutput
[src]

Performs the conversion.