Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

feat: add support for filtering using excluding windows #46

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat: add support for getting window ids
  • Loading branch information
Pranav2612000 committed Sep 22, 2024
commit 417a8aabcae63b1b0a3cb03031fb0492f7d6237c
5 changes: 5 additions & 0 deletions src/capturable_content.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ unsafe impl Send for CapturableWindow {}
unsafe impl Sync for CapturableWindow {}

impl CapturableWindow {
/// Gets the id of the window
pub fn id(&self) -> u32 {
self.impl_capturable_window.id()
}

/// Gets the title of the window
pub fn title(&self) -> String {
self.impl_capturable_window.title()
Expand Down
4 changes: 4 additions & 0 deletions src/platform/macos/capturable_content.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ impl MacosCapturableWindow {
}
}

pub fn id(&self) -> u32 {
self.window.id().0
}

pub fn title(&self) -> String {
self.window.title()
}
Expand Down
5 changes: 5 additions & 0 deletions src/platform/windows/capturable_content.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ impl WindowsCapturableWindow {
Self(hwnd)
}

pub fn id(&self) -> u32 {
todo!("Getting ID not yet implemented for windows");
return 0;
}

pub fn title(&self) -> String {
unsafe {
let text_length = GetWindowTextLengthW(self.0);
Expand Down