Changeset 47848 in vbox for trunk/src/VBox/Frontends/VBoxShell
- Timestamp:
- Aug 19, 2013 4:34:02 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxShell/vboxshell.py
r47804 r47848 312 312 def printKbdEvent(ctx, kev): 313 313 print "Kbd: ", ctx['global'].getArray(kev, 'scancodes') 314 315 def printMultiTouchEvent(ctx, mtev): 316 print "MultiTouch : contacts=%d time=%d" % (mtev.contactCount, mtev.scanTime) 317 xPositions = ctx['global'].getArray(mtev, 'xPositions') 318 yPositions = ctx['global'].getArray(mtev, 'yPositions') 319 contactIds = ctx['global'].getArray(mtev, 'contactIds') 320 contactFlags = ctx['global'].getArray(mtev, 'contactFlags') 321 322 for i in range(0, mtev.contactCount): 323 print " [%d] %d,%d %d %d" % (i, xPositions[i], yPositions[i], contactIds[i], contactFlags[i]) 314 324 315 325 def monitorSource(ctx, eventSource, active, dur): … … 341 351 if kev: 342 352 printKbdEvent(ctx, kev) 353 elif evtype == ctx['global'].constants.VBoxEventType_OnGuestMultiTouch: 354 mtev = ctx['global'].queryInterface(event, 'IGuestMultiTouchEvent') 355 if mtev: 356 printMultiTouchEvent(ctx, mtev) 343 357 344 358 class EventListener: … … 1561 1575 if (len(args) < 2): 1562 1576 print "usage: monitorGuestMouse name (duration)" 1577 return 0 1578 mach = argsToMach(ctx, args) 1579 if mach == None: 1580 return 0 1581 dur = 5 1582 if len(args) > 2: 1583 dur = float(args[2]) 1584 active = False 1585 cmdExistingVm(ctx, mach, 'guestlambda', [lambda ctx, mach, console, args: monitorSource(ctx, console.mouse.eventSource, active, dur)]) 1586 return 0 1587 1588 def monitorGuestMultiTouchCmd(ctx, args): 1589 if (len(args) < 2): 1590 print "usage: monitorGuestMultiTouch name (duration)" 1563 1591 return 0 1564 1592 mach = argsToMach(ctx, args) … … 3220 3248 'guest':['Execute command for guest: guest Win32 \'console.mouse.putMouseEvent(20, 20, 0, 0, 0)\'', guestCmd, 0], 3221 3249 'monitorGuest':['Monitor what happens with the guest for some time: monitorGuest Win32 10', monitorGuestCmd, 0], 3222 'monitorGuestKbd':['Monitor guest keyboardfor some time: monitorGuestKbd Win32 10', monitorGuestKbdCmd, 0], 3223 'monitorGuestMouse':['Monitor guest keyboardfor some time: monitorGuestMouse Win32 10', monitorGuestMouseCmd, 0], 3250 'monitorGuestKbd':['Monitor guest keyboard for some time: monitorGuestKbd Win32 10', monitorGuestKbdCmd, 0], 3251 'monitorGuestMouse':['Monitor guest mouse for some time: monitorGuestMouse Win32 10', monitorGuestMouseCmd, 0], 3252 'monitorGuestMultiTouch':['Monitor guest touch screen for some time: monitorGuestMultiTouch Win32 10', monitorGuestMultiTouchCmd, 0], 3224 3253 'monitorVBox':['Monitor what happens with Virtual Box for some time: monitorVBox 10', monitorVBoxCmd, 0], 3225 3254 'portForward':['Setup permanent port forwarding for a VM, takes adapter number host port and guest port: portForward Win32 0 8080 80', portForwardCmd, 0],
Note:
See TracChangeset
for help on using the changeset viewer.