Supporting Multiple Pointing Devices in Microsoft Windows

Slides:



Advertisements
Similar presentations
CIMCO Integration Software Products
Advertisements

Operating System Structures
Operating Systems Manage system resources –CPU scheduling –Process management –Memory management –Input/Output device management –Storage device management.
Computer Hardware & Systems
EEE 435 Principles of Operating Systems Operating System Concepts (Modern Operating Systems 1.5)
Linux vs. Windows. Linux  Linux was originally built by Linus Torvalds at the University of Helsinki in  Linux is a Unix-like, Kernal-based, fully.
Computer Systems/Operating Systems - Class 8
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
Supporting Multiple Pointing Devices in Microsoft WindowsSummer Research Workshop /22 September 10, 2002 Supporting Multiple Pointing Devices in.
Chapter 2 Introduction to Systems Architecture. Chapter goals Discuss the development of automated computing Describe the general capabilities of a computer.
Final presentation- Part A Avi Urman, Kobi Maltinsky Supervisor: Inna Rivkin Linux on SOPC – Embedded System Implementation.
Working with Drivers and Printers Lesson 6. Skills Matrix Technology SkillObjective DomainObjective # Understanding Drivers and Devices Install and configure.
So what makes me so smart about GPS? Lifelong fascination with maps & navigation Extensive experience with navigation in aviation, marine and vehicular.
Ceng Operating Systems
This presentation has been done by : Kareem Marwan Hamida..
Eric Keller, Evan Green Princeton University PRESTO /22/08 Virtualizing the Data Plane Through Source Code Merging.
Lecture 5: Interaction 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 711,  ex 2271 
April 2000Dr Milan Simic1 Network Operating Systems Windows NT.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 12 - Graphical User Interface Concepts: Part.
Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 17 Microsoft’s Approach 1 –.NET Mobile Framework Rob Pooley.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
Digital Electronics and Computer Interfacing Tim Mewes 4. LabVIEW - Advanced.
Chapter 2 Introduction to Systems Architecture. Chapter goals Discuss the development of automated computing Describe the general capabilities of a computer.
1 Threads, SMP, and Microkernels Chapter Multithreading Operating system supports multiple threads of execution within a single process MS-DOS.
Department of Computer Science and Software Engineering
Customer and Partner Connections Design and Develop Assess and Certify.
Events. Slide 2©SoftMoore Consulting Events Events are generated when a user interacts with the view objects of an application. Examples –button clicked–
OPERATING SYSTEMS (OS) By the end of this lesson you will be able to explain: 1. What an OS is 2. The relationship between the OS & application programs.
A+ Guide to Managing and Maintaining Your PC, 7e Chapter 2 Introducing Operating Systems.
Tgt: Framework Target Drivers FUJITA Tomonori NTT Cyber Solutions Laboratories Mike Christie Red Hat, Inc Ottawa Linux.
Chapter 3: Operating-System Structures
Events and Event Handling
Modularity Most useful abstractions an OS wants to offer can’t be directly realized by hardware Modularity is one technique the OS uses to provide better.
Module 3: Operating-System Structures
Chapter 2: The Visual Studio .NET Development Environment
Chapter Objectives In this chapter, you will learn:
EE 200 Design Tools Laboratory 14
Scratch for Interactivity
Customizing custom.
Credits: 3 CIE: 50 Marks SEE:100 Marks Lab: Embedded and IOT Lab
Introduction to Event-Driven Programming
Lecture 4: Operating System Structures
SUPPORTING DISPLAY DEVICES, I/O DEVICES, AND ACPI
Lesson 1: Buttons and Events – 12/18
CSCI/CMPE 3334 Systems Programming
Chapter 3: Windows7 Part 1.
Module 1: Getting Started
Toll-Free: Article Source-
Event Driven Programming
EE 422C Java FX.
CSCI 315 Operating Systems Design
Introduction to Computing Using Java
MODULE 7 Microsoft Access 2010
Chapter 2: System Structures
I/O Systems I/O Hardware Application I/O Interface
Miscellaneous Thoughts Nothing on the APIs
Basic Concepts Protection: Security:
Tonya Easterwood HRMS Trainer
Lecture 4- Threads, SMP, and Microkernels
Threads Chapter 4.
Chapter 2: Operating-System Structures
Introduction to Operating Systems
Outline Chapter 2 (cont) OS Design OS structure
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Implementing Processes, Threads, and Resources
Outline Operating System Organization Operating System Examples
Chapter 2: Operating-System Structures
Windows Development Dynadata Copyright, 2014 © DynaData S.A. 1/29.
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

Supporting Multiple Pointing Devices in Microsoft Windows Michael Westergaard Department of Computer Science University of Aarhus Denmark September 10, 2002

Outline Why multiple pointing devices? Requirements Architecture Framework High-level API Low-level API Device driver Example September 10, 2002

Why Multiple Pointing Devices Demonstration September 10, 2002

Why Multiple Pointing Devices (2) Advanced interaction techniques Different mice for different tasks Multiple hand interactions Two-handed resize + move/zoom + move Two handed move of 3D objects Three handed zoom + move + rotate of 3D objects Floating palettes Tool glasses Move work from one hand to another  reduce risk of cumulative trauma disorders Cooperative work (for example on a wall PC) September 10, 2002

Requirements Earlier: External application directly polling hardware. This requires exclusive access to the (serial) port Support arbitrarily many mice Treat USB, serial, and PS/2 mice alike Wish to use mouse in “old” Windows applications Generic solution not tied to a specific application or framework September 10, 2002

Architecture CPN Tools Hardware dependent driver Device driver Low-level API High-level API Framework Windows mouse subsystem Application Octopus Main topic of article September 10, 2002

Architecture Framework Hardware dependent driver Device driver Low-level API High-level API Framework Windows mouse subsystem Application September 10, 2002

Framework Provide widget-like interface (for example one can override the OnMouseDown event of a Button ) Must also provide information about what mouse was clicked (this can be obtained by adding a Mouse property to the MouseEventArgs along with information about all mice on the system ) Must also provide information about other mice working with an element (just another property of MouseEventArgs ) in order to allow exclusive access to an element and to allow multiple hand actions Give mouse back to Windows when it leaves application window (only when no native support is available, of course) September 10, 2002

Architecture Device Driver Hardware dependent driver Device driver Low-level API High-level API Framework Windows mouse subsystem Application September 10, 2002

Device Driver Windows does not distinguish between different mice Install filter between hardware dependent driver and Windows Mouse subsystem We do not have to deal with hardware differences We can select whether to send a mouse event to Windows Keep driver as simple as possible to avoid bugs in kernel-mode code Use callback to send data to user-mode Communicate by creating files in the drivers namespace September 10, 2002

Device Driver (2) Interface A finite state machine is implemented Name Description Get Hook up a mouse for use by an application, register a callback, stop sending Windows mouse events UnGet Release a mouse, drop the callback and start sending Windows events again Suspend Temporarily suspend a mouse, keep the callback but start sending Windows events UnSuspend Stop sending Windows events September 10, 2002

Device Driver (3) September 10, 2002

Architecture Low-level API Hardware dependent driver Device driver Low-level API High-level API Framework Windows mouse subsystem Application September 10, 2002

Low-level API Hide operating system specific support (for multiple mice) from higher levels Simple C interface rather than operating system specific calls to communicate with device driver If generic Windows support is developed only the low-level API needs to be changed Simplify identification of mice Add simple error handling Calls are not thread-safe Designed to be statically linked to a specific application September 10, 2002

Low-level API (2) Interface The provided callback does not have to be thread-safe Name Description RegisterCallback Register a callback GetMice Hook up a specified number of mice HasMouse Query if we have hooked a mouse with a specified number UnGetMouse Release a specified mouse SuspendMouse Passed to the device driver UnSuspendMouse UnRegisterCallback Drop a previously registered callback UnGetAllMice Release all hooked mice September 10, 2002

Architecture High-level API Hardware dependent driver Device driver Low-level API High-level API Framework Windows mouse subsystem Application September 10, 2002

High-level API Hide the underlying operating system from the framework Build on top of low-level API Spawn a thread to listen for callbacks from the low-level API Send “mouse events” to application Calls are thread-safe Draw mouse cursors Accelerate mouse Offer polling interface Like low-level API designed to be statically linked to an application September 10, 2002

High-level API (2) Interface Name Description Initialise Start up the listener thread and do some other initialising Cleanup Kill the listener thread and cleanup other allocated resources SuspendMouse Thread-safe version of corresponding low-level functions UnsuspendMouse GetRelativePosition Get mouse movement since last call GetAbsolutePosition Get the position of the mouse SetAbsolutePosition Set the position of the mouse SetCursor Set the cursor for a specified mouse LockCanvas Used for drawing cursors UpdateCursors September 10, 2002

Architecture Example -- Startup Application Framework H-API L-API Driver User Start Start Initialise GetMice Get n times n spawn n ok September 10, 2002

Architecture Example -- Suspend Application Framework H-API L-API Driver User Move mouse Mouse moved callback Mouse moved callback Mouse moved event Mouse is moved out of window Suspend Suspend Suspend September 10, 2002

Future Work More control of what mice are hooked by GetMice function (by number, name, position on bus, or capabilities) Be able to handle multiple applications sharing mice Higher-level API: DLL/System service Port the needed layers to also support Windows 9x/ME/NT, Unix, and Mac September 10, 2002

Conclusions During this talk we have… seen how multiple mice can be useful (advanced interaction techniques, cooperative work) seen requirements for an architecture supporting multiple mice (work with any kind of mouse, backwards compatibility, not tied to an application) seen requirements for a framework supporting multiple mice seen a device driver and two supporting APIs that can satisfy the needs of a framework supporting multiple mice September 10, 2002

Framework Widgets With Events public class MyButton: Button { protected override void OnMouseDown(MouseEventArgs e) { base.OnMouseDown(e); if (e.Button == left) { MessageBox.Show(“Left button pressed", ""); } } } September 10, 2002

Framework Knowledge of Active Mouse public class MyButton: Button { protected override void OnMouseDown(MyMouseEventArgs e) { base.OnMouseDown(e); if (e.Mouse == Mice[1]) { MessageBox.Show("Mouse 1 pressed", ""); } } } September 10, 2002

Framework Knowledge of Other Mice public class MyButton: Button { protected override void OnMouseDown(MyMouseEventArgs e) { base.OnMouseDown(e); if (e.OtherMice.Length == 0) { MessageBox.Show("Only one mouse pressed the button", ""); } } } September 10, 2002