Skip to content

Commit

Permalink
chore: add reexport and based document
Browse files Browse the repository at this point in the history
  • Loading branch information
Decodetalkers committed Dec 19, 2023
1 parent f796b3f commit 44889dc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions libwaysip/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ use wayland_protocols::wp::cursor_shape::v1::client::{

use wayland_cursor::CursorImageBuffer;
use wayland_cursor::CursorTheme;

/// reexport wloutput
pub mod reexport {
pub use wayland_client::protocol::wl_output::{self, WlOutput};
}

#[derive(Debug)]
struct BaseState;

Expand Down Expand Up @@ -89,6 +95,8 @@ impl ZXdgOutputInfo {
}
}

/// tell the screen info, include description, size and the name. and include the current wloutput
/// binded by the screen
#[derive(Debug)]
pub struct ScreenInfo {
output: WlOutput,
Expand Down Expand Up @@ -123,6 +131,8 @@ struct LayerSurfaceInfo {
cairo_t: cairo::Context,
}

/// You are allow to choose three actions of waysip, include area selection, point selection, and
/// select sreen
#[derive(Debug, Clone, Copy, Default)]
pub enum WaySipKind {
#[default]
Expand Down Expand Up @@ -210,6 +220,7 @@ impl AreaInfo {
)
}

/// you can get the info of the choosed screen
pub fn selected_screen_info(&self) -> &ScreenInfo {
&self.screen_info
}
Expand Down

0 comments on commit 44889dc

Please sign in to comment.