• This is the second of three Windows® 7 sessions that we have today. Through these session we show you how you can take advantage of the features in our newest Operating System – Windows 7. Our goal is to show you the value of Windows 7 and the power of the features to unlock new scenarios and enhance existing ones. • During the first session, you saw few examples of ways to optimize your Applications for Windows 7 and you saw what it takes to build great Windows 7 Applications. • In this session we talk about creating dynamic and adoptive UI using Windows® 7 Sensor and Location Platform as well as getting the most out of your graphics cards. • You will see how easy it is to take advantage of the new Sensor and Location Platform to provide a really valuable and productive user experience. • We’ll show you some cool Location demos. • Finally, we’ll explain how to harness the power if the GPU. The next and final session talks about creating modern Applications using Windows® Ribbon and enhancing interactions with Multitouch.
Let’s review what it takes to build a great Windows ® 7 Application. What do YOU need to do in order to be able to say “Yes my Application is a first-class Windows 7 citizen”? Is there a check list? You bet! You need to do three things to ensure a smooth transition: First, you need to make sure your Application is compatible with Windows 7. There is no escape from this; it is essential that you make sure that your Application runs well on Windows 7, whether you are a managed or native developer. There is nothing worse for an end User than to be excited about the new Windows 7 Operating System just to discover that their favorite Application doesn’t perform properly. A bad User experience hurts everyone - which is why you have to make sure your Application installs and runs on all Windows 7 editions and supports both 32- and 64-bit builds. Second, after verifying that your Application can install and run on Windows 7 without any problems, it is time to become a good Windows 7 Citizen by stepping up and optimizing your Application’s User experiences and performance to its best while running on Windows 7. Do this by taking advantage of the great new features offered with Windows 7. These include new User interface innovations like the Taskbar and Libraries, to more fundamental features like Trigger Start Services or the new Troubleshooting platform. By optimizing your Application for Windows 7, you can make sure that your end user's experiences when running your Application on Windows 7 surpasses their expectations. Users will expect Applications to work properly with the Taskbar (just one example); but if your Application is not optimized for the new Windows 7 Taskbar experience, end Users might just notice that. This first two steps are what Users will expect from your Application, that is to install and run “properly” on Windows 7. The last step is where you really have a chance to differentiate yourself from the competition. You can really differentiate your Application by creating new and exciting User experiences. Windows 7 enables developers to create distinctive and intuitive Applications that significantly enhance discoverability, usability, and sheer enjoyment. New methods of desktop integration put Application functionality right at the user’s fingertips. New Touch APIs enable natural interactions through Multitouch and finger-panning gestures. Rapid advances in hardware and software technology are also driving higher-fidelity User experiences. Windows 7 brings these advances under developer control with new and flexible APIs that take full advantage of the technology, while making it even easier to develop compelling Applications. Windows 7 includes many new features that can make your Application shine, raising it above the competition. When you think about creating new and exciting User experiences, consider using one or more of the following features: • Windows ® Sensor • Windows ® Ribbon • Multitouch, which we are going to focus today. There are more features that we will not have time to talk about today, but are certainly worth mentioning like: Media Platform with technologies like DirectShow that provide the bases media support in Windows Search Federation Device Stage™ Integration And many more great Windows 7 features…
Continues from Windows® Vista… • Windows® Media Center UI, Video Playback • Desktop Window Manager (DWM) • Windows® 7 DWM uses Direct3D10.1 API • Scales in performance all the way from low end integrated to high end GPUs • ‘ Shaders’ are used for blurs in the Glass • Windows 7 cuts memory consumption is cut by 50% per window by optimizing DWM • More animations and richer animations in the thumbnails Major areas of improvement: • High DPI • High Color
The idea is to continue the investment started in Windows® Vista that encourages use of the GPU instead of software rendering of graphics. The Windows®7 DWM uses Direct3D 10.1 that scales for low-end (integrated) and high-end GPUs alike Direct2D is built on top of Direct3D and offloads rendering to the GPU It’s still possible to use it with software rendering (e.g. for server scenarios) or with older DirectX® 9 cards (10Level9) Focused on 2D graphics, bitmaps and text Much better performance than GDI especially without anti-aliasing Interop with GDI – can create a Direct2D render target from an HDC and vice versa Can even map a Direct3D surface to a Direct2D render target DirectWrite – layered API for text output. Can work with the text layout API in DirectWrite for the most high-level abstraction or go down to the script processor and font rasterizer APIs for more control. Modern typography with OpenType features Works with GDI, Direct2D, Direct3D (independent of rendering technology) Hardware accelerated with Direct2D – ClearType filter and blend in hardware Lots and lots of font features Greater control over glyph positioning (sub-pixel) X and Y direction anti-aliasing It’s possible to get an HFONT from DirectWrite objects
See demo script
Windows® Sensor and Location Platform provides a uniform API for all kinds of external sensors, hardware and software (emulated, virtual). The primary advantage is that there’s no need to target specific APIs – all vendors should align such that applications won’t care whether they’re using Sensor data from one device or another as long as there is some Sensor device that provides it. There’s access control (per-user) and privacy built-in, so to access Sensor and Location data the User must be prompted (can be configured through GP). Show the S&L control panel (so that we don’t have to mention it later) – enabling a Sensor, disabling a Sensor, available Sensors and some properties Applications interact with the Sensor and Location API, which talks to a UMDF driver (through a Sensor driver class extension) for the specific Sensor device. Through the API abstractions, developers don’t care about the specific Sensor hardware.
A Sensor is defined by the following parameters, which can all be queried at runtime and are known at design time: Category What is being sensed, for example Location, temperature, altitude etc. Type How it’s being sensed, for example Location can be sensed by Wi-Fi triangulation, GPS, etc. Properties Read-only and read/write properties. Read-only are meant for informational purposes (model, make) and read/write are meant for configuration of the Sensor, e.g. the report interval at which it sends data reports. Data report This is the interesting part of the Sensor, it’s the data that it exposes. For some sensors the report will only contain a single property. The properties all have types and units that are predefined in the Sensor SDK (e.g. light is in lux, etc.). There are also some properties common to all reports such as the timestamp of the report (to disambiguate multiple reports coming in). It’s possible to register for an event and then get the report, or to poll a report every once in a while. (As always, poll is less recommended) Events There are some events (COM sinks) that the sensors can raise, e.g. when the Sensor is disabled or when new data arrives (a new report is available). State The state of the event can be checked at any time, e.g. if it’s enabled. To the best of our knowledge there’s no way to enumerate sensors that are not currently connected to the system, but were once installed and used. ( CHECK )
A specific example of a Sensor is the ambient light Sensor, present in many computers today (e.g. Dell TX2 select models, MacBook and others). Using ambient light information it’s possible to design NG UX, e.g.: Change the contrast, color scheme etc. so that the text is readable and the Application is usable in direct sunlight Change the same so that the Application doesn’t hurt the user’s eyes in a dark room (brightness) Note some of it is built into the system in Windows® 7 – it will tune the screen brightness itself based on the ambient light reading (If the presenter has a machine with an ambient light Sensor, and there are not too many people in the crowd, he/she can demo it by lifting the laptop in front of the audience and obstructing the ambient light Sensor to create a ‘dark room’ experience )
See demo script
See demo script
The Location platform builds on top of the Sensor platform, but there’s a different API to make it even easier to work with (e.g. ILocation COM interface instead of ISensor, and strongly typed reports for the built-in providers) The Location API is provider-independent, as before, and it provides two built-in report types – for providers that can give you precise lat-lon information (with an error radius) and for providers that can only give you a civic address location. The sources can be whatever we want them to, e.g. GPS, triangulation, by-IP or even going for the default location that the User can choose to specify in the Control Pane. Alternatively, there’s a utility called eDLP (enhanced Default Location Provider) that can be used to set the default location on a nice VirtualEarth map. This is directly propagated to applications that use the default Location provider. (An app can choose to do that e.g. if there is no other Location provider present) location.
Clear the default location first Trip playback gadget [NO Don’t show this!!!!]: Show the trip playback gadget with a custom route built for each launch event (this is a great opportunity to individualize, or perhaps we can have a single route covering all launch events e.g. in the US) Show the underlying gadget code (script) for changing the location on the map when the lat-lon changes, also mention the permissions issue (the script actually asks for permissions if necessary) Places gadget: [show this and the weather gadget and change location via eDLP] “ Install” the gadget + weather gadget, note the information There is an error because there is no location provider right now I am indoors so GPS will not help And I didn’t install a driver for IP or WiFi triangulation Launch eDLP – explain in one sentence what is it, and mentioned that we will come back to it later. Change the location either using EDLP Note the change of both Sensors (NO CODE) EDLP – ChooseLocationWPF: [already runs from previous step] Run the EDLP main app and set the location using both civic address and ZIP code Go to the default location control panel and show the change reflected there Show the code behind that sets the default location (SetReport of the default providers) Location Desktop Background : Configure the slide show XML in advance with images from a few interesting spots that it’s easy to reach on a map [already runs from previous step] Run the app in the background and use eDLP to change the default location between these spots Note the change of the desktop background according to the location change (Optional: Play with the light aware feature of the app, mark some images as night and some as day and then toggle between them using the virtual light sensor or a physical sensor – yes I like that very much !!!!) Show the code – Then registering to the data report change notification and passing the location data onward to the slideshow code (same for light awareness)
Modernize to Monetize
Beyond_Human_Interaction - Sensor and Location Platform
Beyond Human Interaction with Windows 7 Sensor & Location Platform
<ul><li>Multitouch </li></ul><ul><li>Windows Ribbon </li></ul><ul><li>Sensors </li></ul><ul><li>Windows Taskbar </li></ul><ul><li>Libraries </li></ul><ul><li>Fundamentals </li></ul><ul><li>Version Control </li></ul><ul><li>User Account Control </li></ul><ul><li>Removed Components </li></ul>Get Compatible Optimize Differentiate