Lines Matching refs:msg

203 static gboolean readcmd(InputBarrier *ib, struct barrierMsg *msg)  in readcmd()  argument
246 msg->cmd = cmd; in readcmd()
250 read_short(msg->version.major, p, len); in readcmd()
251 read_short(msg->version.minor, p, len); in readcmd()
254 read_int(msg->set.nb, p, len); in readcmd()
255 msg->set.nb /= 2; in readcmd()
256 if (msg->set.nb > BARRIER_MAX_OPTIONS) { in readcmd()
257 msg->set.nb = BARRIER_MAX_OPTIONS; in readcmd()
260 while (len && i < msg->set.nb) { in readcmd()
261 read_int(msg->set.option[i].id, p, len); in readcmd()
263 msg->set.option[i].id = htonl(msg->set.option[i].id); in readcmd()
264 msg->set.option[i].nul = 0; in readcmd()
265 read_int(msg->set.option[i].value, p, len); in readcmd()
275 read_short(msg->mousepos.x, p, len); in readcmd()
276 read_short(msg->mousepos.y, p, len); in readcmd()
280 read_char(msg->mousebutton.buttonid, p, len); in readcmd()
283 read_short(msg->mousepos.y, p, len); in readcmd()
284 msg->mousepos.x = 0; in readcmd()
286 msg->mousepos.x = msg->mousepos.y; in readcmd()
287 read_short(msg->mousepos.y, p, len); in readcmd()
294 read_short(msg->key.keyid, p, len); in readcmd()
295 read_short(msg->key.modifier, p, len); in readcmd()
296 msg->key.button = 0; in readcmd()
298 read_short(msg->key.button, p, len); in readcmd()
302 read_short(msg->repeat.keyid, p, len); in readcmd()
303 read_short(msg->repeat.modifier, p, len); in readcmd()
304 read_short(msg->repeat.repeat, p, len); in readcmd()
305 msg->repeat.button = 0; in readcmd()
307 read_short(msg->repeat.button, p, len); in readcmd()
327 read_short(msg->version.major, p, len); in readcmd()
328 read_short(msg->version.minor, p, len); in readcmd()
341 static gboolean writecmd(InputBarrier *ib, struct barrierMsg *msg) in writecmd() argument
354 switch (msg->cmd) { in writecmd()
356 if (msg->version.major < BARRIER_VERSION_MAJOR || in writecmd()
357 (msg->version.major == BARRIER_VERSION_MAJOR && in writecmd()
358 msg->version.minor < BARRIER_VERSION_MINOR)) { in writecmd()
400 qemu_input_queue_abs(NULL, INPUT_AXIS_X, msg->mousepos.x, in writecmd()
402 qemu_input_queue_abs(NULL, INPUT_AXIS_Y, msg->mousepos.y, in writecmd()
407 qemu_input_queue_rel(NULL, INPUT_AXIS_X, msg->mousepos.x); in writecmd()
408 qemu_input_queue_rel(NULL, INPUT_AXIS_Y, msg->mousepos.y); in writecmd()
413 input_barrier_to_mouse(msg->mousebutton.buttonid), in writecmd()
419 input_barrier_to_mouse(msg->mousebutton.buttonid), in writecmd()
424 qemu_input_queue_btn(NULL, (msg->mousepos.y > 0) ? INPUT_BUTTON_WHEEL_UP in writecmd()
427 qemu_input_queue_btn(NULL, (msg->mousepos.y > 0) ? INPUT_BUTTON_WHEEL_UP in writecmd()
435 input_barrier_to_qcode(msg->key.keyid, msg->key.button), in writecmd()
439 for (i = 0; i < msg->repeat.repeat; i++) { in writecmd()
441 input_barrier_to_qcode(msg->repeat.keyid, msg->repeat.button), in writecmd()
444 input_barrier_to_qcode(msg->repeat.keyid, msg->repeat.button), in writecmd()
450 input_barrier_to_qcode(msg->key.keyid, msg->key.button), in writecmd()
479 struct barrierMsg msg; in input_barrier_event() local
481 ret = readcmd(ib, &msg); in input_barrier_event()
487 return writecmd(ib, &msg); in input_barrier_event()