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. android 退出系统

    /** * */ package com.szkingdom.android.phone.utils; import java.io.BufferedReader; import java.io.IO ...

  2. bzoj5157: [Tjoi2014]上升子序列(树状数组LIS)

    5157: [Tjoi2014]上升子序列 题目:传送门 题解: 学一下nlogn的树状数组求最长上生子序列就ok(%爆大佬) 离散化之后,用一个数组记录一下,直接树状数组做 吐槽:妈耶...一开始不 ...

  3. JAVA设计模式之【代理模式】

    代理模式 通过代理对象间接访问 代购 客户端不想或者不能直接访问一个对象,可以通过一个称为代理的第三者来实现间接访问,该方案称为代理模式 角色 抽象主题角色Subject 声明真实主题类与代理类的公共 ...

  4. systemd服务管理--systemctl常用命令

    转自 :https://m635674608.iteye.com/blog/2359480 1. #systemctl enable crond.service //让某个服务开机启动(.servic ...

  5. 90.bower解决js的依赖管理

    转自:https://blog.csdn.net/u011537073/article/details/52951122 前言一个新的web项目开始,我们总是很自然地去下载需要用到的js类库文件,比如 ...

  6. ing在写作中到底怎么用

    改关静留的作业中我还得改英文摘要.于是有个地方用了ing.顺便查了一下. http://www.yygrammar.com/Article/201408/3677.html -ing分词用作状语时有九 ...

  7. 4月17日 (PS:由于时间问题,现在才发,望老师见谅)疯狂猜成语-----第三次站立会议 参会人员:杨霏,袁雪,胡潇丹,郭林林,尹亚男,赵静娜

    疯狂猜成语-----第三次站立会议 参会人员:杨霏,袁雪,胡潇丹,郭林林,尹亚男,赵静娜 会议内容: 组员依次汇报自己的工作进度,并且提出自己在进行任务的过程中遇到的问题,是否解决以及解决办法. 以下 ...

  8. Angualr+asp.net core webapi+efcore系列

    想着学习一门前端框架,WTF,看了又看,卧槽对于.Net程序员来说,还有什么比面向对象更香的呢,所以果断的选择了Angular.正好看各路大神以及官方文档想学习一下asp.net core,那就搞起吧 ...

  9. vue的表格加单选框

    https://www.cnblogs.com/calamus/p/8569196.html

  10. 计算 List 数据的属性值的总和

    List<PostRushPretreatmentMember> taskMember = pre.getTaskMember();///成员分配情况 Integer taskOrderN ...