Windows Vista Reaching Your Users When Their Machine

































- Slides: 33

Windows Vista: Reaching Your Users When Their Machine Is Off, Using Auxiliary Display Devices Sriram Viji, Program Manager Dan Polivy, Software Design Engineer Session PRS 308 Microsoft Corporation 1

Agenda Platform introduction Writing gadgets using C++ and COM Writing gadgets using C# Design considerations 2

Devices for Windows Side. Show Laptop in-lid displays Connected and online displays Remote or detachable devices 3

Gadget Platforms Windows Side. Show Extends data from the PC to devices COM and C++ APIs Windows Sidebar Shows information on the client DHTML scripting and libraries/WPF Start. com Web based with AJAX like architecture Integration with client platform 4

Platform Benefits Increase application reach and visibility Provide user value Easy to write gadgets 5

Windows Side. Show Prototype 6

Sample Scenarios Cached/Offline scenarios: Calendar, driving directions, e-mail, weather, traffic Make use of data that is cached on a device User can interact when the PC is on or off Live/Online scenarios: Media control, presentation control, instant messaging, notifications Data and events sent during user interaction User can interact when the PC is on 7

User Control User selects gadgets to view on device Installed Devices Installed Gadgets 8

Software Architecture Gadget Auxiliary Display API Inter-process communication Auxiliary Display Driver Transport Channel Display Device 9

Conference Scheduler 10

Gadget Installation Friendly name Icon Endpoint Icon Friendly Name Specifies data format between gadget and device [HKCUSOFTWAREMicrosoftAuxiliary. DisplayApplications{APPLICATION_ID }] HKCUSOFTWAREMicrosoftAuxiliary. DisplayApplications{APPLICATION_ID}] "Friendly. Name"=“ Application name” ; User friendly name Friendly. Name"=“Application “Icon”=myapplication. dll, 0 ; 16, 32, 48 px icons “Icon”=myapplication. dll, 0 "Online. Only"=dword: 0000 ; Is it “Live” or “Cached”? Online. Only"=dword: 0000 "Endpoints"=MULTI_SZ: Endpoint GUID(s) ; Data format(s) "Endpoints"=MULTI_SZ: Endpoint GUID(s) format(s) supported 11

Registering A Session Create an instance of the Registrar Register application ID and data format // // hr Create the Auxiliary. Display. Registrar object that enables us to talk to the platform. = : : Co. Create. Instance(CLSID_Auxiliary. Display. Registrar , NULL, : : Co. Create. Instance(CLSID_Auxiliary. Display. Registrar, CLSCTX_INPROC_SERVER, IID_IAuxiliary. Display. Registrar, (LPVOID*)&m_p. Registrar ); (LPVOID*)&m_p. Registrar); if (SUCCEEDED(hr )) (SUCCEEDED(hr)) { // Register application with the platform hr = m_p. Registrar-> Register(MY_APPLICATION_ID, , m_p. Registrar->Register( AUX_ENDPOINT_SIMPLE_CONTENT_FORMAT, &m_p. Content. Mgr ); &m_p. Content. Mgr); } 12

Us e wi r int (i. e th d era on. ge evic cts a s t de e es tai sio ls n) Pe (i. e riodi. u cu se pdat ss e “ es ion ne ”) xt ac Resp se tion ons ss (i. e ion e. to de sen tai d ls) Sta ini rtu tia p: l c se on nd ten t U (i. e ser. s int e e to lect ract att se ion en ssi d) on Up da te co nte nt Content Management Gadget Device 13

Creating Content Developer implements IAuxiliary. Display. Content Returns a content ID (unsigned 32 -bit value) Provides the content as an array of bytes (opaque) Allows developer to send different content to each device based on the device’s capabilities HRESULT get_Content. Id( PCONTENT_ID out_pcontent. Id ); HRESULT get_Differentiate. Content( BOOL * out_pf. Differentiate. Content ); HRESULT Get. Content( IAuxiliary. Display. Capabilities * in_p. ICapabilities, DWORD * out_pdw. Size, BYTE ** out_ppb. Data ); 14

Content Format Gadgets and devices need a common format to exchange data Simple Content Format New, Documented XML data format for which we are encouraging device support Provides simple layout and interaction for devices with varying capabilities Functions in both “PC on” (live/online) and “PC off” (cached) modes i. Calendar Allows transfer of appointments in a standard format Presentation is determined by the device; thus the calendar display and interaction can be richer than by using the Simple Content Format 15

Glance Content Glance or Overview Content id of 0 reserved for overview content Simple text string Easy to support on all devices, regardless of actual content format used Glance Content 16

Simple Content Format Menu Page Provides a list of items Selection causes navigation Can be used as a context menu on menu items and content pages <body> <menu id=“ 1” title="Image List"> <item target="2">Sunset</item> <item target="3">Winter</item> <item target="4">Water lilies</item> <item target="5">Blue hills</item> </menu> </body> 17

Simple Content Format Layout Page Provides flow layout Support for text and images Simple text formatting (emphasis, color, alignment) Button mapping to override default navigation action <body> <content id=“ 2”> <txt align="c">Sunset</txt> <txt>Driving on the coastal highway is fun</txt> <img ]"/> <img id=“ 10" alt="[sunset. jpg]"/> </content> </body> 18

Simple Content Format Dialog Page Provides simple dialog box with icon, title, message, buttons User input on a decision Icon available for visual clue <body> <dialog id="200" title="Image rotate"> <txt>Your image will lose some quality when rotated. Would you like to proceed? </txt> <btn target="201">Yes</btn> <btn target="202">No</btn> </dialog> </body> 19

Sending/Updating Content manager allows applications to Add/Update content on devices Remove content IAuxiliary. Display. Content* p. IContent; CMy. Content p. Content = new CMy. Content(1 /* CONTENT_ID */, “Content”); hr = p. Content-> Query. Interface(IID_IAuxiliary. Display. Content, , p. Content->Query. Interface(IID_IAuxiliary. Display. Content &p. IContent ); &p. IContent); // Add a content object that implements IAuxiliary. Display. Content hr = m_p. Content. Mgr-> Add(p. IContent); ); m_p. Content. Mgr->Add(p. IContent // Remove Content ID “ 1” from all devices hr = m_p. Content. Mgr->Remove(1); // Remove all content from devices hr = m_p. Content. Mgr-> Remove. All(); m_p. Content. Mgr->Remove. All 20

Platform Events ISV implements IAuxiliary. Display. Events interface Four events Content. Missing Occurs when the device requires a specific piece of content it does not have cached Application. Event Generated due to user interaction with the device, i. e. User selection on a list item Navigation to a specific page of content Device Added/Device Removed Includes both Pn. P events, as well as “permission change” events generated from enabling/disabling a gadget in the CPL 21

Simple Content Format Events propagated to PC gadget (when on) as user navigates content on device Navigation. Event Triggered upon any navigation starting on a content or dialog page Menu. Event Triggered upon selection of an item off a menu page Context. Menu. Event Triggered upon any navigation off of a context menu 22

Device Capabilities Developer can retrieve a collection of IAuxiliary. Display. Capabilities interfaces from the Content Manager Capabilities interface is external representation of a device Can query device properties, such as: Screen width/height Color depth Current language IHV extensible Interface also provided on some events to identify initiating device 23

Notifications IAuxiliary. Display. Notification. Manager interface mirrors the content manager Show/Revoke. All IAuxiliary. Display. Notification Co. Create’able by ISV Properties Title Message Icon Expiration time 24

Expedia. com 25

Managed Code Accessible through standard COM Interop Same functionality available Sample code provided for interop 26

Design Considerations Gadget lifetime management User expects device to be up to date Missing content needs to be provided Options Background process (as part of an existing system tray or any other process) Add on to an existing application 27

Design Considerations Device Support wide range of device capabilities Recommendations Provide useful glance content Ensure accurate data for text only displays If possible, differentiate content for displays Performance Mobile PCs are a big target – conserve battery Selectively update content 28

Summing Up New opportunities and new scenarios Value-add for existing applications Tools and samples to get started 29

Mobile PC and Tablet PC Breakout Sessions PRS 308 - Windows Vista: Reaching Your Users When Their Machine Is Off, Using Auxiliary Display Devices Wednesday, 1: 45 PM - 3: 00 PM PRS 315 - Windows Vista Tablet PC: Advances in Creating Tablet Enabled Applications Wednesday, 5: 00 PM - 6: 15 PM DAT 317 - Windows Vista: Centralizing Data Synchronization with the New Sync Center Thursday, 11: 30 AM - 12: 45 PM FUN 319 - Windows Vista: Developing Power-Aware Applications Thursday, 5: 15 PM - 6: 30 PM PNL 12 - Future Directions in Mobile Device Hardware Friday, 1: 00 PM- 2: 30 PM 30

Get involved with Mobile PC and Tablet PC at PDC! Hands-On-Labs Use the Tablet PCs located in the Presentation Track Section PRSHOL 26 - Mobile PC: Getting Started with Auxiliary Displays (C++ and C#) - Provide your users with instant access to data—even in powered-down states—with Auxiliary Display devices on Windows Vista. FUNHOL 09 - Mobile PC: Building Energy Smart Windows Vista Applications (C#) - Learn how to be compatible with Windows Vista’s new Sleep behavior and learn how to integrate with the power policy engine to build a more robust application. PRSHOL 31 & PRSHOL 32 - Tablet PC: Getting Started with the Tablet PC Platform (C# and Visual Basic. NET) - Create ink-enabled forms to empower your Tablet PC customers by using ink controls, the Ink. Picture object, and other APIs from the Windows XP Tablet PC Edition SDK 1. 7. PRSHOL 30 - Tablet PC: Advanced Development with Stylus Input APIs (C#) - Enhance performance and rendering by using the Tablet PC Stylus Input API to intercept and modify stylus data in real time. Get spotted with this button for a chance to win a Tablet PC! 31

Resources Windows Side. Show at PDC Hands on Lab: PRSHOL 26 Mobile PC: Getting started with Auxiliary Displays / Windows Side. Show Booth: Prototype device and other concepts PRS Track lounge: Wed 3 -5 pm Related: PRS 332 Developing Windows Sidebar Gadgets Thu 3: 45 pm – 5: 00 pm 402 AB After PDC Gadgets: http: //microsoftgadgets. com/sideshow. aspx Mobile PC and Tablet PC Forum under Windows Vista Development : http: //forums. microsoft. com/msdn/ Business Contact: mobaux@microsoft. com Windows Vista Beta and SDK: http: //msdn. microsoft. com/windowsvista/ 32

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