Developing Multi Touch Applications

  • 10,629 views
Uploaded on

Presentation at Microsoft's Saint Louis Day of Dot Net.

Presentation at Microsoft's Saint Louis Day of Dot Net.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
10,629
On Slideshare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
247
Comments
0
Likes
3

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Developing Multi-touch Applications The future is here Brian Blanchard Chief Architect Essence Technology
  • 2. Agenda
    • Introduction
      • Past, Future, & Present
    • Touch scenarios, “Good, Better, Best” model, and developer roadmap
    • Platform details:
      • Native Win32 gesture and touch support
      • Manipulations and Inertia
      • WPF support
    • UX guidelines for touch applications
    • Where to get started - SDK, drivers, etc
    • Wrap up
  • 3. What is Multi-Touch?
    • Multi-touch * denotes a set of interaction techniques which allow computer users to control graphical applications with several fingers.
    • The concept of Multi-touch technology was created to incorporate collaboration into the computing experience.
    • * Wikipedia definition
  • 4. Multi-touch Past
    • 26 years in the making
    • Started in 82 by the university of Toronto
    • First commercial attempt in 84 by bell labs
    • Adopted by MS in 2001
  • 5. Multi-touch Future
    • LucidTouch: Transparent handheld inputs
    • Obscura Digital:
      • HP - D5: Multi-Touch wall
      • VisionAire: Holographic Multi-Touch
  • 6. Multi-touch Is Here!
    • Hardware
      • Multi-touch capable machines in market today, multi-touch appears in a broad set of form factors
      • Desktops: $1200 - $2000
      • Laptops: $1800 - $3000
    • Software
      • Windows 7, PDC partner demonstrations & Touch platform announcement, .Net 4.0
    • Consumers
      • New scenarios, next wave of user experience, high “WOW” factor
  • 7. Touch Scenarios And Windows 7
    • We’ve identified several key scenarios for multi-touch:
    • Navigating and consuming the web
    • Reading & sorting email
    • Viewing photos
    • Playing casual games
    • Consuming music and video
    • Navigating files & arranging windows
    • Using Office applications
    • All focused on consumption
    • That led to four areas of investment:
    • Developer Platform : At the root is the touch developer platform that exposes touch APIs for any application
    • UI Enhancements : Focusing on the core scenarios, many parts of the core UI have been optimized for touch experiences.
    • Gestures : Multi-touch gestures have been added to enable consistent panning and zooming in most applications.
    • Applications : A set of multi-touch focused applications that demonstrate the power of touch. These will ship separate from Win7.
  • 8. A Structured Approach To Adding Touch Support To Your Application
    • Which application scenarios get the biggest benefit from touch?
      • Content consumption, mobile, media and entertainment
    • Decide which tier of investment is appropriate:
      • Good – Free support, UX tweaks
      • Better – Gesture support, touch-friendly UX
      • Best – Touch-optimized experience
  • 9. Touch Development Roadmap Windows 7 Release NET 4.0 / Surface 2.0 Release Multi-Touch Controls Multi-Touch API Surface Multi-Touch Controls & API Multi-Touch API Multi-Touch API and Controls
  • 10. Touch Platform Overview Good Better Best APIs
    • For Free!
    • Panning/zoom gestures
    • Right click gesture
    • Gesture notifications
    • Pan/zoom/rotate/etc
    • Raw touch data
    • Manipulation and Inertia processors
    Native Win32
    • Controls with standard scrollbars
    • WM_GESTURE message
    • WM_TOUCH
    • COM based Manipulation and Inertia Processors
    WPF
    • WPF 4.0 pan support in ScrollViewer
    • Gesture events
    • Inertia configuration
    • Touch events
    • Manipulation and Inertia Processors
    WinForms
    • Controls with standard scrollbars
    • WM_GESTURE message
    • P/Invoke
    • Manipulation and Inertia Processors in Microsoft.Ink.DLL
    • Real-time Stylus or Ink Collector
  • 11. Windows 7 Gestures & WM_GESTURECOMMAND
    • Brian Blanchard
    • Chief Architect
    • Essence Technology
  • 12. WM_GESTURECOMMAND
    • WM_GESTURECOMMAND
      • Better : Good gesture support is key
      • Window message conveying gesture notifications and information to applications
      • Why use it? Richer than legacy notifications, smoother more responsive scrolling and zooming
    • Compound gestures
    • Coalescing
    • Message bubbling and capture
    • Legacy handling & SFP
  • 13. WM_GESTURECOMMAND
    • BOOL WINAPI GetGestureCommandInfo(
    • __in UINT uMsg ,
    • __in WPARAM wParam ,
    • __in LPARAM lParam ,
    • __in LPARAM lExtraInfo ,
    • __inout PGESTUREINFO pGestureInfo
    • );
    • typedef struct _GESTURECOMMANDINFO { UINT cbSize; DWORD dwFlags; DWORD dwCommand; DWORD dwArguments; POINTS ptsLocation;
    • } GESTURECOMMANDINFO, *PGESTURECOMMANDINFO;
  • 14. WM_GESTURECOMMAND
    • Interpreting gestures:
    dwCommand dwArguments ptsLocation Pan Distance between contacts Current center of gesture Zoom Distance between contacts Current center of gesture Rotate Absolute angle on rotate start, delta on updates Current center of gesture Two-finger tap NA Current center of gesture Right click gesture NA First finger down
  • 15. WM_GESTURE Future Windows 7 Build
    • Minor API surface changes:
      • Naming: WM_GESTURE, GESTUREINFO, GetGestureInfo(), etc
      • Additional fields in GESTUREINFO
    • Added gesture configuration support:
      • WM_GESTURENOTIFY
      • GESTURECONFIG struct
      • Set/GetGestureConfig()
  • 16. Single-finger Panning Future Windows 7 Build
    • Single-finger panning (SFP) provides an even easier way to pan where it is natural
    • How to control SFP in your application:
      • SetGestureConfig() for GC_PAN
      • Specify GC_PAN_WITH_SINGLE_FINGER_VERTICALLY and/or GC_PAN_WITH_SINGLE_FINGER_HORIZONTALLY
    • If you aren’t getting the SFP default:
      • Consider standard scrollbars
      • SBM_GETSCROLLINFO (remarks here are helpful)
      • Implement WM_GESTURE support
  • 17. WM_TOUCH
    • Brian Blanchard
    • Chief Architect
    • Essence Technology
  • 18. WM_TOUCH
    • WM_TOUCH* family of messages
      • Best: WM_TOUCH enables touch-optimized experiences
      • WM_TOUCHDOWN, WM_TOUCHMOVE, WM_TOUCHUP
      • Semantically similar to mouse messages
      • Conveys raw touch data to Win32 apps
      • Scenario examples:
        • Finger painting, custom gestures, feeding higher level controls, etc
    • Capture
    • Coalescing
  • 19. WM_TOUCH
    • BOOL WINAPI RegisterTouchWindow(
    • __in HWND hwnd,
    • __in ULONG ulFlags);
    • BOOL WINAPI GetTouchInputInfo(
    • __in HANDLE hTouchInput, // input event handle
    • __in UINT cInputs, // number of elts in the array
    • __out_ecount(cInputs) PTOUCHINPUT pInputs, // array of touch inputs
    • __in int cbSize); // sizeof(TOUCHINPUT)
    • typedef struct tagTOUCHINPUT {
    • LONG x;
    • LONG y;
    • HANDLE hSource;
    • DWORD dwID;
    • DWORD dwFlags;
    • DWORD dwMask;
    • DWORD dwTime;
    • ULONG_PTR dwExtraInfo;
    • DWORD cxContact;
    • DWORD cyContact;
    • } TOUCHINPUT, *PTOUCHINPUT;
    • typedef TOUCHINPUT const * PCTOUCHINPUT;
    • BOOL WINAPI CloseTouchInputHandle(
    • __in HANDLE hTouchInput); // input event handle
  • 20. WM_TOUCH Future Windows 7 Build
    • WM_TOUCH consolidated to a single message
  • 21. Manipulations
    • Best: Manipulations are a great foundation for touch-optimized experiences
    • Examples of higher level APIs/controls
    • Manipulations are:
      • 2D affine transformations (translate, scale, rotate)
      • Superset of supported gestures
      • Supports multiple concurrent manipulations
    • Need a source of raw data: WM_TOUCH or RTS
    • Similar to Surface APIs
    • Interfaces:
      • IManipulationProcessor
      • IManipulationEvents
  • 22. Inertia
    • Provides basic physics
    • Works hand in hand with Manipulations
    • Interfaces:
      • IInertiaProcessor
      • IManipulationEvents – Same event interface as Manipulations
  • 23. Multi-touch In .Net Framework
    • For WPF:
      • 3.5 update near Windows 7 launch
        • Multi-touch, gesture APIs
      • 4.0 release
        • Multi-touch specific new controls
    • For WinForms (Windows 7 launch):
      • Interop to native Win32 APIs – see sample
      • Use managed Manipulations/Inertia wrappers
  • 24. Multi-Touch In WPF
    • UIElement and UIElement3D changes
      • Gesture events (tracking)
      • Touch system gesture events (single)
      • Raw touch events
      • Touch and touch digitizer devices
    • Multi-touch support in controls:
      • ScrollViewer update to accept pan gestures
      • Base controls updated to be multi-touch aware
      • Multi-capture support
      • New multi-touch specific controls
    • Compatible with Surface SDK 2.0
  • 25. Gestures In WPF
    • Gesture events on UIElement & UIElement3D
      • TouchGestureStarted, TouchGestureChanged, TouchGestureEnded
      • NOT routed, to enable multi-capture scenarios
    • Gesture in WPF based on Manipulations
    • Enable Inertia at TouchGestureStarted
      • Inertial movements as TouchGestureChanged Events
    • Touch system gestures
  • 26. Touch Events In WPF
    • Touch Events on UIElement and UIElement3D
      • TouchDown, TouchMove, TouchUp
      • TouchEnter, TouchLeave
      • Preview variants
    • Promotion: Touch -> Stylus -> Mouse
    • Multi-Capture
      • CaptureTouchDevice(TouchDevice)
      • ReleaseTouchDeviceCapture(TouchDevice)
      • ReleaseAllTouchDeviceCaptures()
      • TouchDeviceCollection TouchDevicesCaptured { get; }
      • TouchDeviceCollection TouchDevicesCapturedWithin { get; }
      • IsAnyTouchDeviceCaptured();
      • IsAnyTouchDeviceCapturedWithin();
  • 27. Tablet Platform Extensions
    • Real-time Stylus (RTS)
      • RTS is an excellent raw touch data provider
      • IRealTimeStylus3::MultiTouchEnabled()
    • Getting multi-touch data via InkCollector is a little trickier. E.g.:
    ATOM m_atom = ::GlobalAddAtom(MICROSOFT_TABLETPENSERVICE_PROPERTY); m_dwProperty = TABLET_ENABLE_MULTITOUCHDATA ; ::SetProp(m_hwnd, (LPTSTR)m_atomPenService, (HANDLE)m_dwProperty);
  • 28. UX Considerations
  • 29.
    • ISVs are enthusiastic about multi-touch!
    • We are working with several ISVs today on multi-touch applications, including:
      • AutoDesk
      • Avoco Secure
      • Corel
      • Cyberlink
      • Fuel Industries
      • Identity Mine
      • Sonic
  • 30. Call To Action
    • Decide which application scenarios make sense for touch
    • Decide which tier of investment is appropriate
    • Build something amazing!
  • 31. Getting Started
    • What do you need to start coding?
      • Hardware:
        • Multi-touch beta drivers for in-market devices:
          • HP TouchSmart 2 Dell Latitude XT
      • Software:
        • Window 7 M3 build – On the drive
        • Touch Platform SDK and samples – On the PDC drive
        • The Multi-point touch drivers are not yet a part of any OS. Your choice in hardware will impact the software needed.
    • WPF Multi-touch
      • .NET 4.0 Preview Releases in 2009
      • .NET 3.5 update to be announced
  • 32.  
  • 33.
    • LucidTouch:
        • http://research.microsoft.com/users/baudisch/projects/lucidtouch/index.html
    • Obscura Digital:
      • HP - D5: Multi-Touch wall
        • http://channel9.msdn.com/forums/Coffeehouse/255503-Surface-Thats-not-a-multi-touch-screen-/
      • VisionAire: Holographic Multi-Touch
        • http://makeitv.blogspot.com/2008/08/minority-report-holo-display-is-now.html
  • 34.