[−][src]Struct wlroots::backend::Session
Methods
impl<'session> Session<'session>
[src]
impl<'session> Session<'session>
pub fn session_signal(&self) -> wl_signal
[src]
pub fn session_signal(&self) -> wl_signal
Signal for when the session becomes active/inactive. It's called when we swap virtual terminal.
pub fn active(&self) -> bool
[src]
pub fn active(&self) -> bool
pub fn vtnr(&self) -> c_uint
[src]
pub fn vtnr(&self) -> c_uint
pub fn seat(&self) -> [c_char; 256]
[src]
pub fn seat(&self) -> [c_char; 256]
pub fn udev(&self) -> *mut udev
[src]
pub fn udev(&self) -> *mut udev
pub fn udev_monitor(&self) -> *mut udev_monitor
[src]
pub fn udev_monitor(&self) -> *mut udev_monitor
pub fn devices(&self) -> Vec<Device<'session>>
[src]
pub fn devices(&self) -> Vec<Device<'session>>
pub fn change_vt(&mut self, vt: c_uint) -> bool
[src]
pub fn change_vt(&mut self, vt: c_uint) -> bool
Changes the virtual terminal.
pub unsafe fn new(display: *mut wl_display) -> Option<Self>
[src]
pub unsafe fn new(display: *mut wl_display) -> Option<Self>
Opens a session, taking control of the current virtual terminal. This should not be called if another program is already in control of the terminal (Xorg, another Wayland compositor, etc.).
If logind support is not enabled, you must have CAP_SYS_ADMIN or be root. It is safe to drop privileges after this is called.
Returns None
on error.
pub unsafe fn destroy(self)
[src]
pub unsafe fn destroy(self)
Closes a previously opened session and restores the virtual terminal. You should call Session::close_file on each files you opened with Session::open_file before you call this.
pub unsafe fn open_file<P: AsRef<Path>>(&mut self, path: P) -> c_int
[src]
pub unsafe fn open_file<P: AsRef<Path>>(&mut self, path: P) -> c_int
Opens the file at path. This can only be used to open DRM or evdev (input) devices.
When the session becomes inactive:
- DRM files lose their DRM master status
- evdev files become invalid and should be closed
Returns -errno on error.
pub unsafe fn close_file<P: AsRef<Path>>(&mut self, fd: c_int)
[src]
pub unsafe fn close_file<P: AsRef<Path>>(&mut self, fd: c_int)
pub unsafe fn signal_add(&mut self, fd: c_int, listener: *mut wl_listener)
[src]
pub unsafe fn signal_add(&mut self, fd: c_int, listener: *mut wl_listener)
pub unsafe fn as_ptr(&self) -> *mut wlr_session
[src]
pub unsafe fn as_ptr(&self) -> *mut wlr_session
pub unsafe fn from_ptr(session: *mut wlr_session) -> Self
[src]
pub unsafe fn from_ptr(session: *mut wlr_session) -> Self
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more