https://www.qubes-os.org/doc/gui/
see qubes-gui-common/include/qubes-gui-protocol.h
val const_QUBES_MAIN_WINDOW : int32
type gui_protocol_version = {
version : int32;
}
val sizeof_gui_protocol_version : int
type msg_map_info = {
override_redirect : int32;
transient_for : int32;
}
val get_msg_map_info_override_redirect : string -> int32
val get_msg_map_info_transient_for : string -> int32
val sizeof_msg_map_info : int
val sizeof_msg_clipboard_req : int
Dom0 -> VM, dom0 wants us to reply with a MSG_CLIPBOARD_DATA
type msg_clipboard_data = {
window_id : int32;
len : int32;
}
Dom0 -> VM, VM -> Dom0: MSG_CLIPBOARD_DATA: a normal header, followed by a uint8 array of size len
val get_msg_clipboard_data_window_id : string -> int32
val get_msg_clipboard_data_len : string -> int32
val sizeof_msg_clipboard_data : int
type msg_create = {
x : int32;
y : int32;
width : int32;
height : int32;
parent : int32;
override_redirect : int32;
}
val get_msg_create_x : string -> int32
val get_msg_create_y : string -> int32
val get_msg_create_width : string -> int32
val get_msg_create_height : string -> int32
val get_msg_create_parent : string -> int32
val get_msg_create_override_redirect : string -> int32
val sizeof_msg_create : int
type msg_keypress_t = {
ty : int32;
x : int32;
y : int32;
state : int32;
keycode : int32;
}
val get_msg_keypress_ty : string -> int32
val get_msg_keypress_x : string -> int32
val get_msg_keypress_y : string -> int32
val get_msg_keypress_state : string -> int32
val get_msg_keypress_keycode : string -> int32
val sizeof_msg_keypress : int
type msg_motion_t = {
x : int;
y : int;
state : int32;
is_hint : int;
}
val get_msg_motion_x : string -> int32
val get_msg_motion_y : string -> int32
val get_msg_motion_state : string -> int32
val get_msg_motion_is_hint : string -> int32
val sizeof_msg_motion : int
type msg_crossing_t = {
ty : int32;
x : int32;
y : int32;
state : int32;
mode : int32;
detail : int32;
focus : int32;
}
val get_msg_crossing_ty : string -> int32
val get_msg_crossing_x : string -> int32
val get_msg_crossing_y : string -> int32
val get_msg_crossing_state : string -> int32
val get_msg_crossing_mode : string -> int32
val get_msg_crossing_detail : string -> int32
val get_msg_crossing_focus : string -> int32
val sizeof_msg_crossing : int
VM -> Dom0, Dom0 -> VM, note that when you send this you must read the "corrected" MSG_CONFIGURE you get back and use those values instead of your own
type msg_shmimage = {
x : int32;
y : int32;
width : int32;
height : int32;
}
val get_msg_shmimage_x : string -> int32
val get_msg_shmimage_y : string -> int32
val get_msg_shmimage_width : string -> int32
val get_msg_shmimage_height : string -> int32
val sizeof_msg_shmimage : int
type msg_focus_t = {
mode : int32;
detail : int32;
}
type msg_focus = {
ty : int32;
mode : int32;
detail : int32;
}
val get_msg_focus_ty : string -> int32
val get_msg_focus_mode : string -> int32
val get_msg_focus_detail : string -> int32
val sizeof_msg_focus : int
type msg_execute = {
cmd : string;
}
val sizeof_msg_execute : int
type xconf = {
w : int32;
h : int32;
depth : int32;
mem : int32;
}
val get_xconf_w : string -> int32
val get_xconf_h : string -> int32
val get_xconf_depth : string -> int32
val get_xconf_mem : string -> int32
type msg_wmname = {
data : string;
}
val sizeof_msg_wmname : int
type msg_keymap_notify = {
keys : string;
}
val sizeof_msg_keymap_notify : int
type msg_window_hints = {
flags : int32;
min_width : int32;
min_height : int32;
max_width : int32;
max_height : int32;
width_inc : int32;
height_inc : int32;
base_width : int32;
base_height : int32;
}
val sizeof_msg_window_hints : int
type msg_window_flags = {
flags_set : int32;
flags_unset : int32;
}
val sizeof_msg_window_flags : int
type shm_cmd = {
shmid : int32;
width : int32;
height : int32;
bpp : int32;
off : int32;
num_mfn : int32;
domid : int32;
}
type msg_wmclass = {
res_class : string;
res_name : string;
}
val sizeof_msg_wmclass : int
type msg_type =
| MSG_KEYPRESS
| MSG_BUTTON
| MSG_MOTION
| MSG_CROSSING
| MSG_FOCUS
| MSG_CREATE
| MSG_DESTROY
| MSG_MAP
| MSG_UNMAP
| MSG_CONFIGURE
| MSG_MFNDUMP
| MSG_SHMIMAGE
| MSG_CLOSE
| MSG_EXECUTE
| MSG_CLIPBOARD_REQ
| MSG_CLIPBOARD_DATA
| MSG_WMNAME
| MSG_KEYMAP_NOTIFY
| MSG_DOCK
| MSG_WINDOW_HINTS
| MSG_WINDOW_FLAGS
| MSG_WMCLASS
val msg_type_size : msg_type -> int option
val int_to_msg_type : int32 -> msg_type option
"MFN: machine frame number - actual hw addresses" http://ccrc.web.nthu.edu.tw/ezfiles/16/1016/img/598/v14n_xen.pdf
val make_msg_mfndump :
window:int32 ->
width:int32 ->
height:int32 ->
mfns:'a list ->
string
val make_msg_shmimage :
window:int32 ->
x:int32 ->
y:int32 ->
width:int32 ->
height:int32 ->
string
val make_msg_create :
window:int32 ->
width:int32 ->
height:int32 ->
x:int32 ->
y:int32 ->
override_redirect:int32 ->
parent:int32 ->
string
val make_msg_map_info :
window:int32 ->
override_redirect:int32 ->
transient_for:int32 ->
string
val make_msg_wmname : window:int32 -> wmname:string -> string
val make_msg_window_hints :
window:int32 ->
width:int32 ->
height:int32 ->
string