2 Commits

6 changed files with 61 additions and 18 deletions

View File

@@ -75,24 +75,24 @@ struct WAppIcon {
Window main_window;
struct WDock *dock; /* In which dock is docked. */
struct _AppSettingsPanel *panel; /* Settings Panel */
unsigned int docked:1;
unsigned int omnipresent:1; /* If omnipresent when
unsigned int docked;
unsigned int omnipresent; /* If omnipresent when
* docked in clip */
unsigned int attracted:1; /* If it was attracted by the clip */
unsigned int launching:1;
unsigned int running:1; /* application is already running */
unsigned int relaunching:1; /* launching 2nd instance */
unsigned int forced_dock:1;
unsigned int auto_launch:1; /* launch app on startup */
unsigned int remote_start:1;
unsigned int updated:1;
unsigned int editing:1; /* editing docked icon */
unsigned int drop_launch:1; /* launching from drop action */
unsigned int paste_launch:1; /* launching from paste action */
unsigned int destroyed:1; /* appicon was destroyed */
unsigned int buggy_app:1; /* do not make dock rely on hints
unsigned int attracted; /* If it was attracted by the clip */
unsigned int launching;
unsigned int running; /* application is already running */
unsigned int relaunching; /* launching 2nd instance */
unsigned int forced_dock;
unsigned int auto_launch; /* launch app on startup */
unsigned int remote_start;
unsigned int updated;
unsigned int editing; /* editing docked icon */
unsigned int drop_launch; /* launching from drop action */
unsigned int paste_launch; /* launching from paste action */
unsigned int destroyed; /* appicon was destroyed */
unsigned int buggy_app; /* do not make dock rely on hints
* set by app */
unsigned int lock:1; /* do not allow to be destroyed */
unsigned int lock; /* do not allow to be destroyed */
};
/******** Accessors/mutators ********/

View File

@@ -7,4 +7,5 @@ edition = "2024"
crate-type = ["staticlib"]
[dependencies]
libc = "0.2"
x11 = "2.21.0"

View File

@@ -1,6 +1,40 @@
use std::ffi::c_void;
use std::ffi::{c_char, c_int, c_short};
pub type AppIcon = c_void;
#[repr(C)]
pub struct AppIcon {
xindex: c_short,
yindex: c_short,
next: *mut AppIcon,
prev: *mut AppIcon,
icon: *mut crate::icon::Icon,
x_pos: c_int,
y_pos: c_int,
command: *mut c_char,
dnd_command: *mut c_char,
paste_command: *mut c_char,
wm_class: *mut c_char,
wm_instance: *mut c_char,
pid: libc::pid_t,
main_window: x11::xlib::Window,
dock: *mut crate::dock::Dock,
panel: *mut crate::app_settings_panel::AppSettingsPanel,
docked: c_int,
omnipresent: c_int,
attracted: c_int,
launched: c_int,
running: c_int,
relaunching: c_int,
forced_dock: c_int,
auto_launch: c_int,
remote_start: c_int,
updated: c_int,
editing: c_int,
drop_launch: c_int,
paste_launch: c_int,
destroyed: c_int,
buggy_app: c_int,
lock: c_int,
}
pub mod ffi {
use super::AppIcon;

View File

@@ -0,0 +1,3 @@
use std::ffi::c_void;
pub type AppSettingsPanel = c_void;

View File

@@ -1,3 +1,7 @@
use std::ffi::c_void;
pub type Dock = c_void;
pub mod ffi {
unsafe extern "C" {
pub fn wDockFinishLaunch(app_icon: *mut crate::app_icon::AppIcon);

View File

@@ -1,6 +1,7 @@
pub mod application;
pub mod app_icon;
pub mod app_menu;
pub mod app_settings_panel;
pub mod defaults;
pub mod dock;
pub mod global;