jokolink/lib.rs
1//! Jokolink is a crate to deal with Mumble Link data exposed by other games/apps on windows via shared memory
2
3//! Joko link is a windows only crate. designed to primarily get the MumbleLink or the window
4//! size of the GW2 window for Jokolay (an crossplatform overlay for Guild Wars 2). It can also
5//! expose the data through a server. can easily be modified to get data from other applications too.
6//! on windows, you can use it to get the pointer. and on linux, you can run jokolink in wine,
7//! so that you can easily request the data from a linux native application.
8//! It can multiple accessing data of multiple MumbleLinks, and allows multiple clients
9//! to request the data.
10
11use serde::{Deserialize, Serialize};
12
13pub mod mlink;
14pub mod mumble_file;
15
16/// The default mumble link name. can only be changed by passing the `-mumble` options to gw2 for multiboxing
17pub const DEFAULT_MUMBLELINK_NAME: &str = "MumbleLink";
18
19// pub struct Gw2Data {
20// pub window_handle: u32,
21// pub pid: u32,
22// pub dim: WindowDimensions,
23// pub monitor: u32,
24// pub workspace: u32,
25// pub link: MumbleLink,
26// }
27
28/// The Window dimensions struct used to represent the window position/sizes.
29/// has lots of derives, so we don't have to update this again when requiring something like Hash
30#[repr(C)]
31#[derive(
32 Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize, Clone, Copy,
33)]
34pub struct WindowDimensions {
35 pub x: i32,
36 pub y: i32,
37 pub width: u32,
38 pub height: u32,
39}