NxWM Threading Model Main Thread NX Server Thread CCallback Touchscreen Listener Thread NX Event Callback Messages Mouse Events Hardware Touchscreen Events.

Slides:



Advertisements
Similar presentations
Basic Computer Skills Windows & the Internet.
Advertisements

User Training. Step 1 Press Ctrl-I or choose File > Login, this will open the Login window. Figure 1-1 shows the Login window. Figure 1-1 Login Window.
1 Computer Graphics Chapter 2 Input Devices. RM[2]-2 Input Devices Logical Input Devices  Categorized based on functional characteristics.  Each device.
Input-output and Communication Prof. Sin-Min Lee Department of Computer Science.
1 The Five Parts of an Information System
Chapter 7 Improving the User Interface
SE-565 Software System Requirements More UML Diagrams.
Graphical User Interfaces A Quick Outlook. Interface Many methods to create and “interface” with the user 2 most common interface methods: – Console –
®® Microsoft Windows 7 Windows Tutorial 10 Improving Your Computer’s Performance.
Troubleshooting Computers in the FHC. Hardware Issues Computer will not turn on – Check power cable – Check power strip Computer is on, but screen is.
WORKING WITH MACROS CHAPTER 10 WORKING WITH MACROS.
Section 2.1 Identify hardware Describe processing components Compare and contrast input and output devices Compare and contrast storage devices Section.
WINDOWS SERVICES. Introduction You often need programs that run continuously in the background Examples: – servers –Print spooler You often need.
Software GCSE ICT.
CS 0004 –Lecture 1 Wednesday, Jan 5 th, 2011 Roxana Gheorghiu.
Are you as technology-literate as a 5 th grader?.
Introduction to VBA MGMI Aug What is VBA? VBA = Visual Basic for Application Excel’s powerful built-in programming language An event-driven.
Welcome to CIS 083 ! Events CIS 068.
WINDOWS Part 1 – Start Up Basics
Prepared by Fareeha Lecturer DCS IIUI 1 Windows API.
Communication. Unlimited. ECP 4.5 © 2003 Interwise The Participant Application SP2.
CompSci 230 S Software Construction Frameworks & GUI Programming.
1 Kyung Hee University Diagram Editor : Implementation View Spring 2001.
Basic Computer and Word Functions, part 1 Read the information and use to answer the questions in the Basic Computer and Word Functions Study Guide.
C H A P T E R T E N Event-Driven Programming Programming Languages – Principles and Paradigms by Allen Tucker, Robert Noonan.
CS350 – Windows Programming Formerly and more properly named: Event Driven Programming Dr. Randy Ribler.
1 The Five Parts of an Information System
Version How to Use Packet Tracer MarinaMD.
CSCE 121: Introduction to Program Design and Concepts, Honors Dr. J. Michael Moore Spring 2015 Set 15: GUIs 1.
Computer Quiz Beginners ICT Start. Created by Malcolm Fowler Select an input device from the list? Q1 1 Mouse 2 Speaker 3 Monitor 4 Hard drive Next question.
Basic Computer and Word Functions, part 1 Read the information and use to answer the questions in the Basic Computer and Word Functions Study Guide.
Concurrent Programming and Threads Threads Blocking a User Interface.
X-WindowsP.K.K.Thambi The X Window System Module 5.
What is Programming? Computer programming is about telling the computer what it is we want it to do We tell the computer what we want it to do by sending.
CITA 342 Section 2 Visual Programming. Allows the use of visual expressions (such as graphics, drawings, or animation) in the process of programming.
Chapter2: Drawing a Window. Review: Introducing MFC.
Program 2 due 02/01  Be sure to document your program  program level doc  your name  what the program does  each function  describe the arguments.
Field Trip #25 Creating a Client/Server By Keith Lynn.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Windows 2000 Unit A A1 – A24 and Ap1 – Ap3 (Formatting a Disk)
Main Computer Components
4 weeks to heaven.  Basic computer architecture  Power-up  Starting up Windows  Mousing  Keyboard  windows  Finding and starting programs  Working.
Cloning in Scratch Computer App Session 6. Cloning in Scratch Learning Objectives: I will clone sprites in Scratch to create copies of an existing sprite.
Web-based Access to ROOT at D-Zero Joel Snow Langston University/D0 Collaboration ROOT 2001 Displaying histograms generated by ROOT in a Web BrowserDisplaying.
HARDWARE DEVICES TOBY WILSON. HARDWARE DEVICES InputOutputStorage KeyboardMonitorsExternal Hard Disk MicePrintersFlash Drives Graphics TabletSpeakers.
Java Threads 1 1 Threading and Concurrent Programming in Java Threads and Swing D.W. Denbo.
Basic Computer Skills Windows & the Internet vfu.bg/en/e-Learning/
Office 2007 Overview Quick Launch ICONs How to add Microsoft Office 2007 ICONs to the Quick Launch Toolbar 1 Slide Version 2.5.
Event Loops and GUI Intro2CS – weeks
CompSci 230 S Software Construction
Computer Fundamentals 1
Introduction to Event-Driven Programming
Lesson Objectives Aims Key Words Interrupt, Buffer, Priority, Stack
Event-driven programming
An Introduction to Computers and Visual Basic
Computer- Basics UNF team.
An Introduction to Computers and Visual Basic
GNOME/GTK+ Introduction
Module 1.1 Introduction to computers
Event Driven Programming
Module 1: Getting Started with Windows 95
Introduction to Computing Using Java
C++ programming in Windows environment
Windowing Push-Pull Systems
WHAT IS WINDOWS MULTIPOINT SERVER 2012?
An Introduction to Computers and Visual Basic
Event Driven Programming Anatomy – Handle
Wings 2.0 Business Flow Reference
The Computer’s Hardware
Windows Operating System
Presentation transcript:

NxWM Threading Model Main Thread NX Server Thread CCallback Touchscreen Listener Thread NX Event Callback Messages Mouse Events Hardware Touchscreen Events Starts window manager, ConfiguresTouchscreen calibration, and exits. NuttX NX Graphics Interface Messag e Queue CWidgetControl CWindowEventHandler CWindowMessenger NX Listener Thread - Receive Messages - Record state data - Raise events - Send message Messag e Queue NX Drawing Interface Proxies Message Queue Note: Many Copies, one per window CWidgetControl Classes that derive from CNxWidget Events include - Mouse input - Keyboard input - Positional input - Redraw notifications Note: Many Copies, one per widget Main, start-up thread Touchscreen listener thread NX server thread NX listener thread Start window thread Touchscreen Device Driver Interface There may be application threads associated with each application (not shown) Keyboard Listener Thread Console Device Driver Interface Keyboard Events Mouse Events Console Input

Start Window Task The start window task drives all widgets. The function receives window events from the NX listener threads indirectly through this sequence: 1) NX listener thread receives a windows event. This may be a positional change notification, a redraw request, or mouse or keyboard input. 2) The NX listener thread performs the callback by calling a NXWidgets::CCallback method associated with the window. 3) NXWidgets::CCallback calls into NXWidgets::CWidgetControl to process the event. 4) NXWidgets::CWidgetControl records the new state data and raises a window event. 5) NXWidgets::CWindowEventHandlerList will give the event to NxWM::CWindowMessenger. 6) NxWM::CWindowMessenger will send the a message on a well-known message queue. 7) This CStartWindow::startWindow task will receive and process that message.

Window Events Specific application IApplication INxWindow CCallback CWindowMessenger Specific window CWidgetControl IWindowEventHandler Redraw, position change, keyboard or mouse input or blocked event received and a static CCallback method is called. 2. static CCallback method invokes a method in CWidgetControl. 3. CWidgetControl saves event related data and raises the associated event. 4. Most window events arecaught by CWindowMessenger that inherits from IWindowEventHandler. CWindowMessengeer sends message to the start window thread from further processing. What happens in the start window thread depends on the event. For most.events, a message is sent to the start window thread for additional processing. CWidgetEventHandler CImage Stop Widget

Window Destruction (Part 1 of 2) Specific application IApplication INxWindow CCallback CWindowsMessenger Specific window CWidgetControl IWindowEventHandler 1 Window Destruction is more complicated. Window destruction is initiated by pressed the STOP button on the toolbar. 1. Widget events are raised by the CWidgetEventHandlerList that is inherited by every widget and caught by the NxWM application's CWidgetWeventHandler methods. The CWidgetWeventHandler is really part of the application's toolbar (CToolbar, but that is not illustrated) 2. The stop icon touch event causes the application tool bar's event handler to invoke the CTaskbar::stopAppliation method in the task bar. 3. The task bar then invokes(1) the application's stop() method which stops any threads and cleans-up any active resources. Then the task bar calls the nxtk_block() which will stop all communications with the window and will flush the message queues. The application then waits for the message queues to be flushed in a deactivated/disabled state. CWidgetEventHandler 3 CImage Stop Widget 2 RaiseDestroyEvent() → handleDestroyEvent() CTaskbar::stopApplication IApplication::stop

Window Destruction (Part 2 of 2) Specific application IApplication INxWindow CCallback CWindowsMessenger Specific window CWidgetControl IWindowEventHandler 4 5 The call to nxtk_block() will block sending of messages to the window. nxtk_block() will send one final message that, when received, indicates both that the communications with the window are blocked and that there are no further queued messages for the window. 4. The blocked message is received and the static CCallback::windowBlocked() method is called. 5. The static CCallback::windowBlocked() method invokes the CWidgetControl::windowBlocked() method. 6. The method does nothing except to raise the blocked event. 7. CWindowMessenger::handleBlockedEvent catches the blocked event can then sends a message to the start window window thread. In the start window thread, the application can be safely deleted the application. CWidgetEventHandler CImage Stop Widget CCallback::windowBlocked() CWidgetControl::windowBlocked() 6 7