UI Framework-1: Aura Overview

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.

转载于:https://www.cnblogs.com/huangguanyuan/p/10072716.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值