码迷,mamicode.com
首页 > 其他好文 > 详细

UI Framework-1: Aura Overview

时间:2018-12-05 20:38:27      阅读:128      评论:0      收藏:0      [点我收藏+]

标签:hand   lsp   for   customize   each   return   column   pow   doc   

Aura Overview

技术分享图片
 
From the perspective of the user, Aura provides Window and Event types, as well as a set of interfaces to customize their behavior.
 
The root of a Window hierarchy is the RootWindow. This type is responsible for event dispatch.
 
An Aura window hierarchy is embedded within a native window provided by the underlying platform (XWindow, HWND). This native window is encapsulated in a RootWindowHost implementation for that specific platform. This host receives native events from the underlying system, cracks them into aura::Event subclasses and sends them to the RootWindow for dispatch.
 
In many ways the Aura architecture mimics that of Views, though it is a little simpler.
 

Event Flow

技术分享图片
This diagram shows the flow of events through each stage of the Aura system.
 
  1. The RootWindowHost receives a base::NativeEvent (MSG/XEvent*) from the underlying platform.
  2. The RootWindowHost cracks this message to an aura::Event* type and forwards it to the RootWindow for further processing and dispatch.
  3. Depending on the event type, a target window for event dispatch is determined for the event. See notes on dispatch below.
  4. Every registered aura::EventFilter* from the target window up to and including the RootWindow is given an opportunity to pre-handle the event. An EventFilter implementation will return true if it wants to consume the event and stop further processing. EventFilter is a powerful API to intercept events before the target Window gets a chance to handle them. It can be used by a client to implement features like window movement, modality, and so on.
  5. Finally if no EventFilter intercepts the event, it is passed directly to the target window‘s delegate. The Window itself never sees the event directly, since window customization in Aura is done entirely through delegate interfaces like EventFilter, WindowDelegate, etc.

UI Framework-1: Aura Overview

标签:hand   lsp   for   customize   each   return   column   pow   doc   

原文地址:https://www.cnblogs.com/huangguanyuan/p/10072716.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!