41
Introduction to Introduction to Tablet PC Tablet PC Development Development Gaurav Khanna Gaurav Khanna [email protected] [email protected] Developer Evangelist Developer Evangelist Microsoft India Microsoft India

Introduction to Tablet PC Development Gaurav Khanna [email protected] Developer Evangelist Microsoft India

Embed Size (px)

Citation preview

Page 1: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Introduction to Tablet PC Introduction to Tablet PC DevelopmentDevelopment

Gaurav KhannaGaurav [email protected]@microsoft.comDeveloper EvangelistDeveloper EvangelistMicrosoft IndiaMicrosoft India

Page 2: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

AgendaAgenda

Tablet PC platform overviewTablet PC platform overview

Description of the object modelDescription of the object modelOverview of key objectsOverview of key objects

DemosDemos

Other features of the SDKOther features of the SDK

Tablet PC development environment Tablet PC development environment

Questions and answersQuestions and answers

Page 3: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Microsoft Mobility PlatformMicrosoft Mobility Platform

Increased FunctionalityIncreased Functionality

• Complex document Complex document authoring, editing authoring, editing and readingand reading

• Keyboard centric at Keyboard centric at the deskthe desk

• Keyboard and Keyboard and mouse input mouse input methodsmethods

• Full .NET Full .NET Framework Framework availableavailable

Windows Windows CE+CE+

Windows Windows XPXP

• Complex document Complex document authoring, editing and authoring, editing and active readingactive reading

• Note taking and ink Note taking and ink annotating annotating

• Keyboard centric at the Keyboard centric at the desk, pen & keyboard desk, pen & keyboard away from the deskaway from the desk

• Keyboard, mouse plus Keyboard, mouse plus pen, ink, and speech pen, ink, and speech input methodsinput methods

• Full .NET Framework Full .NET Framework preinstalledpreinstalled

• Pen, ink, handwriting Pen, ink, handwriting and speech recognition and speech recognition APIsAPIs

• Integrated PDA Integrated PDA with phonewith phone

• View and some View and some data entrydata entry

• Interoperability Interoperability with Office, with Office, Exchange and Exchange and SQL ServerSQL Server

• .NET Compact .NET Compact FrameworkFramework

• Integrated phone Integrated phone with PDAwith PDA

• Data viewingData viewing

• Interoperability Interoperability with Exchangewith Exchange

• .NET Compact .NET Compact FrameworkFramework

• One-way One-way networknetwork

• Information Information consumptionconsumption

Smart Smart Personal Personal ObjectsObjects

SmartphoneSmartphone

Pocket PC Pocket PC PhonePhone Notebook PCNotebook PC

Tablet PCTablet PC

Page 4: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Tablet PC Platform OverviewTablet PC Platform Overview

Ink collectionInk collection

Ink data and managementInk data and management

Ink recognitionInk recognition

Page 5: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Ink Collection (Input)Ink Collection (Input)

Digitizer basicsDigitizer basicsVery high resolutionVery high resolution

Very high throughputVery high throughput

Packet propertiesPacket propertiesX, YX, Y

Pressure, angle, rotation, etc …Pressure, angle, rotation, etc …

Using the API to collect inkUsing the API to collect inkInkCollectorInkCollector

InkOverlayInkOverlay

RealTimeStylus (SDK version 1.7)RealTimeStylus (SDK version 1.7)

Page 6: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Ink Data and ManagementInk Data and Management

Ink is a data typeInk is a data type

Ink looks goodInk looks goodBezier smoothedBezier smoothed

Anti-aliasedAnti-aliased

Rich, extensible API Rich, extensible API

Copy to/paste from the clipboardCopy to/paste from the clipboard

Multiple persistence formatsMultiple persistence formats

Page 7: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Ink RecognitionInk Recognition

10 language recognizers available10 language recognizers available

Provides a full set of recognition Provides a full set of recognition resultsresults

Extensibility architecture allows for Extensibility architecture allows for custom application recognizers tocustom application recognizers tobe builtbe built

Page 8: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Tablet PC Platform SDKTablet PC Platform SDK

2 full APIs:2 full APIs:COM automation compliant APICOM automation compliant API

.NET API.NET API

Set of controlsSet of controlsProvides common functionalityProvides common functionality

Set of componentsSet of componentsProvides building blocks for platform Provides building blocks for platform extensionextension

Documentation and samplesDocumentation and samples

Page 9: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Object Model OverviewObject Model Overview

InkCollector InkCollector InkOverlayInkOverlay

InkInk

StrokesStrokes

RendererRenderer

TabletTablet

StrokeStroke

RecognizersRecognizers

RecognizerRecognizer

DrawingAttributesDrawingAttributes

RecognizerContextRecognizerContext

Page 10: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Hello Ink WorldHello Ink World

Page 11: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Ink Collection ObjectsInk Collection Objects

Page 12: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

InkCollectorInkCollector

Top level object for collecting ink Top level object for collecting ink

Attaches to an HWNDAttaches to an HWND

Handles input from all attached digitizersHandles input from all attached digitizersand cursors (pens)and cursors (pens)

Intercepts pen/mouse movements and can Intercepts pen/mouse movements and can draw Ink dynamicallydraw Ink dynamically

Three ink collection modes:Three ink collection modes:Ink OnlyInk Only

Gesture OnlyGesture Only

Ink and GestureInk and Gesture

Fires eventsFires events

Page 13: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

InkOverlayInkOverlay

Superset of InkCollectorSuperset of InkCollector

Adds editing modesAdds editing modesInk – “Real-time” inking modeInk – “Real-time” inking mode

Select – Selection modeSelect – Selection mode

Delete – Eraser mode (point or stroke)Delete – Eraser mode (point or stroke)

Page 14: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Ink Collection EventsInk Collection Events

CursorInRange/CursorOutOfRangeCursorInRange/CursorOutOfRange

NewInAirPacketsNewInAirPackets

CursorDownCursorDown

NewPacketsNewPackets

StrokeStroke

GestureGesture

SystemGestureSystemGesture

Mouse EventsMouse Events

Page 15: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

ToDo - Ink NotepadToDo - Ink Notepad

Page 16: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Ink Data ObjectsInk Data Objects

Page 17: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Ink ObjectInk Object

Container of stroke dataContainer of stroke data

Controls all means of persistenceControls all means of persistenceBinary streamBinary stream

ClipboardClipboard

Can be extended using the Can be extended using the ExtendedProperties propertyExtendedProperties property

Page 18: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Stroke ObjectStroke Object

Represents a single ink strokeRepresents a single ink stroke

Set of data captured in a single pen down, Set of data captured in a single pen down, move and pen up sequencemove and pen up sequence

ExtendedProperties – allows application to ExtendedProperties – allows application to store any data on the strokestore any data on the stroke

DrawingAttributes – controls the renderingDrawingAttributes – controls the renderingof the strokeof the stroke

Rich API Rich API Points, Bezier Points, BoundingBox, PacketDataPoints, Bezier Points, BoundingBox, PacketData

Page 19: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Strokes CollectionStrokes Collection

Represents a collection of referencesRepresents a collection of referencesto stroke objectsto stroke objects

Useful for grouping related strokes Useful for grouping related strokes together:together:

By metadata – for filteringBy metadata – for filtering

For recognition – RecognizerContext For recognition – RecognizerContext takes strokes collection for recognitiontakes strokes collection for recognition

Page 20: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

DrawingAttributesDrawingAttributes

Controls the appearance of inkControls the appearance of inkColor, width, transparency, smoothing,Color, width, transparency, smoothing,anti-aliasinganti-aliasing

PenTip – round, rectangular, height, widthPenTip – round, rectangular, height, width

Can be scaled automatically using Can be scaled automatically using Renderer.ScaleRenderer.Scale

Each InkCollector/InkOverlay has a Each InkCollector/InkOverlay has a DefaultDrawingAttributes property that DefaultDrawingAttributes property that specifies the drawing attributes for all specifies the drawing attributes for all cursorscursors

Can be applied to a single stroke, to a Can be applied to a single stroke, to a strokes collection, or to a cursor (pen)strokes collection, or to a cursor (pen)

Page 21: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

RendererRenderer

Two coordinate systems on a Tablet PCTwo coordinate systems on a Tablet PCScreen coordinates Screen coordinates

Digitizer coordinatesDigitizer coordinates

Renderer object enables:Renderer object enables:Mapping between digitizer and screenMapping between digitizer and screen

Drawing Ink to a device contextDrawing Ink to a device context

Manipulating Ink renderingManipulating Ink renderingObject and View transforms supportedObject and View transforms supported

Helper methods: Scale, Move, RotateHelper methods: Scale, Move, Rotate

Page 22: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Clipboard SupportClipboard Support

Use the Ink APIs to cut or copy multiple Use the Ink APIs to cut or copy multiple formats to the clipboardformats to the clipboard

ISF – Ink serialized formatISF – Ink serialized format

BitmapBitmap

Metafile Metafile

Applications interacting with the Applications interacting with the clipboard can then choose the best clipboard can then choose the best formatformat

Page 23: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

ToDo - Ink Data Manipulation Demo

Page 24: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Ink Recognition ObjectsInk Recognition Objects

Page 25: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

RecognizerContextRecognizerContext

Is the instantiation of a given Is the instantiation of a given recognizerrecognizer

Allows recognition of a collectionAllows recognition of a collectionof strokesof strokes

Synchronous recognition Synchronous recognition

Asynchronous recognition Asynchronous recognition

Page 26: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Enumerating Recognizers installed

Page 27: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

RecognitionResultRecognitionResult

Has lattice structure with rich Has lattice structure with rich recognition resultsrecognition results

Provides access to paths through the Provides access to paths through the RecognitionAlternatesRecognitionAlternates

Can be stored on the strokes that Can be stored on the strokes that created itcreated it

Page 28: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

ToDo – Recognizing Ink

Page 29: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Additional Features in the Additional Features in the Tablet SDK Version 1.7Tablet SDK Version 1.7

Page 30: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

ContextContext

What is Context?What is Context?Context is the ability to constrain the set of information Context is the ability to constrain the set of information used for recognitionused for recognition

Context can greatly improve recognition accuracy Context can greatly improve recognition accuracy

Context can be applied in many waysContext can be applied in many waysLists of wordsLists of words

Types of expected text Types of expected text URL, E-mail Address, Number, etc.URL, E-mail Address, Number, etc.

Where do you see Context?Where do you see Context?Microsoft Internet Explorer Address barMicrosoft Internet Explorer Address bar

Any other application that enables contextAny other application that enables contextMicrosoft Office Outlook 2003 To: lineMicrosoft Office Outlook 2003 To: line

Page 31: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Enabling ContextEnabling Context

New applications New applications InputScope API (New Win32 API)InputScope API (New Win32 API)

See Tablet PC developer center See Tablet PC developer center whitepaper for .NET supportwhitepaper for .NET support

Existing applicationsExisting applicationsContext Tagging tool Context Tagging tool

Page 32: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Context Tagging DemoContext Tagging Demo

Page 33: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Tablet TriviaTablet Trivia

What is Context?What is Context?Why use it?Why use it?

Context is the ability to constrain theContext is the ability to constrain theset of information used for recognitionset of information used for recognition

Context can greatly improve recognition Context can greatly improve recognition accuracyaccuracy

Page 34: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Web SupportWeb Support

Support for Windows Forms controls Support for Windows Forms controls hosted in HTMLhosted in HTML

Allows you to ink in a control on aAllows you to ink in a control on aweb pageweb page

Support for Single Click DeploymentSupport for Single Click Deployment.NET application hosted in the .NET application hosted in the Internet Explorer application domainInternet Explorer application domain

Page 35: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Real Time Input FeaturesReal Time Input Features

RealTimeStylus RealTimeStylus Object Model that provides direct access Object Model that provides direct access to stylus input even before it is renderedto stylus input even before it is rendered

Allows for the creation of new Real Time Allows for the creation of new Real Time componentscomponents

Custom dynamic rendering, gesture Custom dynamic rendering, gesture recognition, disabled regions, etc.recognition, disabled regions, etc.

Allows for the creation new Ink Collection Allows for the creation new Ink Collection componentscomponents

Build your own InkOverlay or InkCollectorBuild your own InkOverlay or InkCollector

Page 36: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Development EnvironmentDevelopment Environment

The SDK can be installed on Tablet or The SDK can be installed on Tablet or Non-Tablet devicesNon-Tablet devices

Windows 2000 SP4 and aboveWindows 2000 SP4 and above

External HID compatible digitizer or External HID compatible digitizer or mouse can simulate tablet digitizermouse can simulate tablet digitizer

Tablet OS available through MSDN Tablet OS available through MSDN Install on a desktop or laptop for Install on a desktop or laptop for development purposesdevelopment purposes

The Recognizer Pack can be used for The Recognizer Pack can be used for development purposes as welldevelopment purposes as well

Page 37: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Distributing Tablet Applications Distributing Tablet Applications

Redistributable Merge Module Redistributable Merge Module MSM files for all parts of the tablet MSM files for all parts of the tablet platform except recognitionplatform except recognition

Application deployment considerationsApplication deployment considerationsRecognition may be used only on the Recognition may be used only on the Tablet OSTablet OS

Controls are designed to collect ink only Controls are designed to collect ink only on the Tablet OSon the Tablet OS

Input Panel usage will only work only on Input Panel usage will only work only on the Tablet OSthe Tablet OS

No support for the Win9x PlatformNo support for the Win9x Platform

Page 38: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Tablet TriviaTablet Trivia

Must you have a TabletPC to write Must you have a TabletPC to write tablet apps?tablet apps?

No!No!

Page 39: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Tablet & Mobile PC Developer CenterTablet & Mobile PC Developer Center

http://http://msdn.microsoft.com/mobilepcmsdn.microsoft.com/mobilepc

Page 40: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

Q & A: We want your feedback!Q & A: We want your feedback!

Email: [email protected]: [email protected]: Blog:

http://blogs.msdn.com/gkhannahttp://blogs.msdn.com/gkhanna//

WWW: WWW: http://www.wintoolzone.com/http://www.wintoolzone.com/

Page 41: Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft.com Developer Evangelist Microsoft India

© 2003-2004 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.