Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bhyve/console.c
Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | console_ptr_register(ptr_event_func_t event_cb, void *arg, int pri) | ||||
if (pri > console.ptr_priority) { | if (pri > console.ptr_priority) { | ||||
console.ptr_event_cb = event_cb; | console.ptr_event_cb = event_cb; | ||||
console.ptr_arg = arg; | console.ptr_arg = arg; | ||||
console.ptr_priority = pri; | console.ptr_priority = pri; | ||||
} | } | ||||
} | } | ||||
void | void | ||||
console_key_event(int down, uint32_t keysym) | console_key_event(int down, uint32_t keysym, uint32_t keycode) | ||||
{ | { | ||||
if (console.kbd_event_cb) | if (console.kbd_event_cb) | ||||
(*console.kbd_event_cb)(down, keysym, console.kbd_arg); | (*console.kbd_event_cb)(down, keysym, keycode, console.kbd_arg); | ||||
} | } | ||||
void | void | ||||
console_ptr_event(uint8_t button, int x, int y) | console_ptr_event(uint8_t button, int x, int y) | ||||
{ | { | ||||
if (console.ptr_event_cb) | if (console.ptr_event_cb) | ||||
(*console.ptr_event_cb)(button, x, y, console.ptr_arg); | (*console.ptr_event_cb)(button, x, y, console.ptr_arg); | ||||
} | } |