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. Apache Ignite - 轉

    Ignite Docs Online: ignite-doc-cn https://dongwq.gitbooks.io/ignite-doc/content/index.html - Apache ...

  2. ORA-01658无法为表空间中的段创建INITIAL区

    导出空表设置时,提示错误是: ORA-01658无法为表空间中的段创建INITIAL区 查找解决方案为 表空间已满    设置表空间自动增长 即可 例:  alter database datafil ...

  3. pic中断特别说明

    在调试产品W660-MODBUS过程中发现,程序工作在偶然情况下会工作异常,经过将近一个礼拜的追踪,发现PIC中断有一下两个怪异特性: 在刚进入中断时就应该清除中断标志,如果在最后返回之前才清除标志, ...

  4. Linux rm删除大批量文件遇到 Argument list too long

    在使用rm删除大批量文件时,有可能会遭遇“参数列太长”(Argument list too long)的问题.如下所示   [oracle@DB-Server bdump]$ rm -v epps_q ...

  5. SPA SEO SSR三者有什么区别

    SPA通俗的说就是单页面应用(single page application) 优点 页面之间的切换非常快 一定程度减少了后端服务器的压力 后端程序只需要提供api,不需要客户端到底是web端还是手机 ...

  6. Linux下重启mysql数据库的方法

    原文地址:Linux下重启mysql数据库的方法作者:于士博的视频教程 方法一: 命令: [root@localhost /]# /etc/init.d/mysql   start|stop|rest ...

  7. Python3+Gurobi使用教程(一)

    Gurobi使用教程 1.Gurobi使用的一般框架 from gurobipy import * try: m=Model('modelname') except GurobiError: prin ...

  8. 最多包含2/k个不同字符的最长串

    看这里的解答: http://www.cnblogs.com/grandyang/p/5351347.html 通用解决了2和k的问题.

  9. Memcached 集群环境Java客户端

    Memcached 集群环境Java客户端 学习了: http://blog.csdn.net/zhouzhiwengang/article/details/53154112 http://guazi ...

  10. 【LeetCode】Longest Palindromic Substring 解题报告

    DP.KMP什么的都太高大上了.自己想了个朴素的遍历方法. [题目] Given a string S, find the longest palindromic substring in S. Yo ...