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.

最新文章

  1. python学习道路(day10note)(线程,进程)
  2. ctags使用细节
  3. 多线程 - CyclicBarrier
  4. bzoj 3196/tyvj p1730 二逼平衡树
  5. Linux下mongodb安装
  6. 静态wenb开发,动态web开发
  7. 关于IE6的一些常见的CSS BUG处理
  8. ASP.NET Core 系列视频完结,新项目实战课程发布。
  9. vue引入css的两种方式
  10. springboot RestTemplate httpclient
  11. leecode第一百六十题(相交链表)
  12. python小demo-01: 线程池+多进程实现cpu密集型操作
  13. 在Winfrom 中,如何实现combox 的列表自动显示ToolTip提示 ?
  14. C# Encoding UTF-16 ,C#中的UTF16
  15. 【密码学】RSA公钥密码体制
  16. UNIX环境编程学习笔记(22)——进程管理之system 函数执行命令行字符串
  17. TCP/IP协议栈概述及各层包头分析
  18. 简单的UDP接受程序
  19. DOS文件操作命令
  20. ubuntu16.04 qt opencv3.4

热门文章

  1. bzoj4568: [Scoi2016]幸运数字(LCA+线性基)
  2. RBAC介绍
  3. Golang环境配置Centos
  4. 50个极好的bootstrap框架
  5. ActiveMQ学习笔记(8)----ActiveMQ的消息存储持久化
  6. CDR都特价了,你还用破解版?
  7. 马云谈AI:未来10-15年传统制造业的痛苦将远超今天的想象
  8. html5学习之第一步:认识标签,了解布局
  9. 使用Jmeter工具对http接口进行压力测试
  10. python基础5(文件操作,with语句)