Struct rustwlc::handle::WlcView [] [src]

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

Represents a handle to a wlc view.

Methods

impl WlcView
[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]

Create a dummy WlcView for testing purposes.

Unsafety

The following methods on views may crash the program:

  • WlcView::focus if wlc is not running
  • WlcView::send_to_back if wlc is not running
  • WlcView::send_below if wlc is not running
  • WlcView::bring_above if wlc is not running
  • WlcView::bring_to_font if wlc is not running

All other methods can be used on dummy views.

Note

WlcView::root() is equivalent to WlcView::dummy(0).

assert!(WlcView::root() == unsafe { WlcView::dummy(0) })

Example

unsafe {
    let view = WlcView::dummy(0u32);
    let view2 = WlcView::dummy(1u32);
    assert!(view < view2);
    assert!(view != view2);
}

[src]

Returns a reference to the root window (desktop background).

Example

let view = WlcView::root();
assert!(view.is_root());

[src]

Whether this view is the root window (desktop background).

Example

let view = WlcView::root();
assert!(view.is_root());

[src]

Whether this view is not the root window (desktop background).

Usage

A convenience method, the opposite of view.is_root().

Example

let view = WlcView::root();
assert!(view.is_root());
assert!(!view.is_window());

[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]

Closes this view.

For the main windows of most programs, this should close the program where applicable.

Behavior

This function will not do anything if view.is_root().

[src]

Gets the WlcOutput this view is currently part of.

[src]

Sets the output that the view renders on.

This may not be supported by wlc at this time.

[src]

Brings this view to focus.

Can be called on WlcView::root() to lose all focus.

[src]

Sends the view to the back of the compositor

[src]

Sends this view underneath another.

[src]

Brings this view above another.

[src]

Brings this view to the front of the stack within its WlcOutput.

[src]

Gets the current visibilty bitmask for the view.

[src]

Sets the visibilty bitmask for the view.

[src]

Gets the geometry of the view.

[src]

Gets the geometry of the view (that wlc displays).

[src]

Sets the geometry of the view.

Set edges if geometry is caused by interactive resize.

[src]

Gets the type bitfield of the curent view

[src]

Set flag in the type field. Toggle indicates whether it is set.

[src]

Get the current ViewState bitfield.

[src]

Set ViewState bit. Toggle indicates whether it is set or not.

[src]

Gets parent view, returns WlcView::root() if this view has no parent.

[src]

Set the parent of this view.

Call with WlcView::root() to make its parent the root window.

[src]

Get the title of the view

[src]

Get class (shell surface only).

[src]

Get app id (xdg-surface only).

[src]

Get the pid associated with this WlcView.

Trait Implementations

impl Copy for WlcView
[src]

impl Clone for WlcView
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for WlcView
[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 WlcView
[src]

impl PartialOrd for WlcView
[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 WlcView
[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 WlcView
[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 WlcView
[src]

[src]

Formats the value using the given formatter.

impl Display for WlcView
[src]

[src]

Formats the value using the given formatter. Read more

impl From<WlcOutput> for WlcView
[src]

[src]

Performs the conversion.