Event Handling

A diagram of the architecture of this system:
 
 
HWNDMessageHandler owns the WNDPROC, and is code that is shared with the non-Aura windows build. This code is in production and "should work."
On this diagram, the new classes are DesktopRootWindowHostWin(**) and DesktopNativeWidgetAura. DesktopNativeWidgetAura is a new views::NativeWidgetPrivate implementation that wraps an aura::Window* hosted in a special RootWindow/Host, which is implemented by DesktopRootWindowHost[Win|Linux].
 
DesktopNativeWidgetAura is cross platform code, DesktopRootWindowHostWin|Linux is platform-specific.
 
Basically there are a bunch of functions on these two new classes that need to be connected together.
 
I've made a list of these functions here:
 
 
.. along with some notes I quickly made about what I thought would be a resolution for that method.
 
A couple of notes about event handling:
 
  • Events from the system progress through the diagram above left to right, i.e. received at the HWND/XWindow and are processed, maybe eventually making it to the Widget (and hence the View hierarchy) on the right.
  • Input events in aura must be dispatched by the RootWindow's dispatcher for correct behavior, so rather than sending them directly from the DesktopRootWindowHostWin to the DesktopNativeWidgetAura, we send them into the DRWHW's RootWindow. They'll wind up being received by the DNWA's aura::Window via its WindowDelegate.
  • Other types of events can perhaps be sent directly from the DRWHW to the DNWA.
 
  • On the other side, the NativeWidgetPrivate interface provides the API that views::Widget expects the native widget to perform, and this direction goes right-to-left on the diagram above. The typical flow here is through DNWA (which implements NWP) and through a DesktopRootWindowHost interface (we can add new methods to this as needed) which DRWHWin|Linux implements.
  • Sometimes there is a conflict on a method name between one on aura::RootWindowHost, which DRWHW|L also implements. In this case you can manual RTTI the DRWH to RWH.
  • Some methods in DRWHW are never sent back to the DNWA, e.g. those that are windows-specific and are for example completely implemented by NativeWidgetWin. I tend to look at NativeWidgetWin for inspiration when figuring out this kind of thing.

UI Framework-1: Aura Event Handling的更多相关文章

  1. Console Event Handling

    http://www.codeproject.com/Articles/2357/Console-Event-Handling Console Event Handling Kumar Gaurav ...

  2. Event Handling Guide for iOS--(三)---Event Delivery: The Responder Chain

    Event Delivery: The Responder Chain 事件传递:响应链 When you design your app, it’s likely that you want to ...

  3. Event Handling Guide for iOS--(二)---Gesture Recognizers

    Gesture Recognizers 手势识别器 Gesture recognizers convert low-level event handling code into higher-leve ...

  4. Event Handling Guide for iOS--(一)--About Events in iOS

    About Events in iOS Users manipulate their iOS devices in a number of ways, such as touching the scr ...

  5. Event Handling on Mac

    Keyboard/Mouse Event + Cocoa AppleEvent + Cocoa AppleEvent + CommandLine App(w/o UI) + CoreFoundatio ...

  6. Event Handling in Spring

    Spring内置的event有 1.ContextRefreshedEvent This event is published when the ApplicationContext is eithe ...

  7. Hybrid UI framework shootout: Ionic vs. Famo.us vs. F7 vs. OnsenUI

    1 Introduction In the past 2 years I’ve been working intensively on mobile applications, mostly hybr ...

  8. [转]Getting started with SSIS - Part 10: Event Handling and Logging

    本文转自:http://beyondrelational.com/modules/12/tutorials/24/tutorials/9686/getting-started-with-ssis-pa ...

  9. 理解iOS Event Handling

    写在前面 最近的一个iOS App项目中遇到了这么问题:通过App访问服务器的大多数资源不需要登录,但是访问某些资源是需要用户提供验证的,一般来说,通常App的做法(譬如美团App)将这些资源放在“我 ...

随机推荐

  1. linux操作系统下完全删除oracle数据库

    1.关掉oracle server 和 background processes ps -ef | grep ora 关掉数据库 shutdown immediate 2.关掉监听 lsnrctl  ...

  2. 安卓-活动Activity

    Android有4大组件,活动 Activity,服务 Service ,广播接收器 Brostcast receiver,内容提供器 Content Provider 安卓活动的生命周期有7种, o ...

  3. HTML5与CSS3权威指南之CSS3学习记录

    title: HTML5与CSS3权威指南之CSS3学习记录 toc: true date: 2018-10-14 00:06:09 学习资料--<HTML5与CSS3权威指南>(第3版) ...

  4. ksh简介

    -- Start 什么是 Shell 如果把 Linux 比作一个蛋,那么 Shell 就是蛋壳,我们需要通过 Shell 来使用系统. Shell 的种类 最早的 Shell 是 Bourne Sh ...

  5. C# WindowsAPI

    Windows是一个强大的操作系统,也会向开发者提供海量的系统API来帮助开发者来完成Windows系统软件的开发工作. 整理的部分Windows API,C#可以直接调用. 1.获取.exe应用程序 ...

  6. C++之指针与引用,函数和数组

    ]={,,}; //ptr是指针,该指针类型是int[3] ]=&arr; cout << **ptr << endl;//第一次解指针时得到数组地址,第二次解指针取数 ...

  7. checkbox控制显示隐藏

    显示文本框<input type = "checkbox" id="checkbox" onclick="on_hide();"/&g ...

  8. 洛谷 P3203 [HNOI2010]弹飞绵羊 分块

    我们只需将序列分成 n\sqrt{n}n​ 块,对于每一个点维护一个 val[i]val[i]val[i],to[i]to[i]to[i],分别代表该点跳到下一个块所需要的代价以及会跳到的节点编号.在 ...

  9. Mint-UI 没有样式?

    如果用mint-ui组件,如toast没有样式,是因为没有映入全局样式和导入MintUI 方法如下: 1.安装 npm install mint-ui -S -S表示 --save 2.在main.j ...

  10. luogu P3674 小清新人渣的本愿(莫队+bitset)

    这题是莫队维护bitset. 然而我并不会bitset以前讲过认为不考就没学 我真的太菜了. 首先维护一个权值的bitset--s. 操作3比较简单,我们可以\(\sqrt{x}\)枚举约数然后判断就 ...