Skip to content

Commit

Permalink
measure global element size
Browse files Browse the repository at this point in the history
  • Loading branch information
Rutik7066 committed Feb 28, 2025
1 parent dea391b commit 47cf041
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions screenpipe-vision/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ windows = { version = "0.58", features = [
"Media_Ocr",
"Storage",
"Storage_Streams",
"Win32_System_Com"
"Win32_UI_Accessibility",
"Win32_Foundation",
"Win32_UI_WindowsAndMessaging"
Expand Down
7 changes: 4 additions & 3 deletions screenpipe-vision/src/run_ui_monitoring_windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use anyhow::{Ok, Result};
use rusqlite::params;
use serde::{Deserialize, Serialize};
use windows::{
core::*, windows::Win32::System::Com::*, Win32::Foundation::HWND, Win32::UI::Accessibility::*,
core::*, Win32::Foundation::HWND, Win32::System::Com::*, Win32::UI::Accessibility::*,
Win32::UI::WindowsAndMessaging::*,
};

Expand Down Expand Up @@ -107,8 +107,9 @@ fn build_text_output(element: &[ElementAttributes]) -> String {
output
}



fn measure_global_element_value_size(windows_state: &HashMap<HWND, WindowState>) -> usize {
windows_state.iter().map(|(_, ws)| ws.elements.len().sum())
}

pub async fn run_ui() -> Result<()> {
Ok(())
Expand Down

0 comments on commit 47cf041

Please sign in to comment.