x_win/common/x_win_struct/
process_info.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#![deny(unused_imports)]

/**
 * Struct to store process information of the window
 */
#[derive(Debug, Clone)]
#[repr(C)]
pub struct ProcessInfo {
  pub process_id: u32,
  pub path: String,
  pub name: String,
  pub exec_name: String,
}

impl ProcessInfo {
  pub fn new(process_id: u32, path: String, name: String, exec_name: String) -> Self {
    Self {
      process_id,
      path,
      name,
      exec_name,
    }
  }
}