DirectFB:Notes
来源:互联网 发布:js字符串过滤空格 编辑:程序博客网 时间:2024/06/05 00:07
DFBWindow Focus and Input Control
From DirectFBWiki
DBFWindows will get focus or keyboard input based on the window manager rerouting the input into the window, for example if the mouse moves over a window, it will receive the DWET_GOT_FOCUS
message, and when the cursor leaves the window it will receive the DWET_LOSTFOCUS
.
If you want to control this further, here are some things good to know.
You could tell a specific window to always receive the mouse events using the IDirectFBWindow::GrabPointer (http://www.directfb.org/docs/DirectFB_Reference/IDirectFBWindow_GrabPointer.html) interface. There's a corresponding IDirectFBWindow::UngrabPointer (http://www.directfb.org/docs/DirectFB_Reference/IDirectFBWindow_UngrabPointer.html) interface to release this relationship.
If you want to force all keyboard input to a specific window, use the IDirectFBWindow::GrabKeyboard (http://www.directfb.org/docs/DirectFB_Reference/IDirectFBWindow_GrabKeyboard.html) interface, and to release this relationship, use the IDirectFBWindow::UngrabKeyboard (http://www.directfb.org/docs/DirectFB_Reference/IDirectFBWindow_UngrabKeyboard.html) interface. If you want specific keys to trigger the focus to a specific window, use the IDirectFBWindow::GrabKey (http://www.directfb.org/docs/DirectFB_Reference/IDirectFBWindow_GrabKey.html) interface, and to release the key, the IDirectFBWindow::UngrabKey (http://www.directfb.org/docs/DirectFB_Reference/IDirectFBWindow_UngrabKey.html) interface.
You could force the specific focus to a window using the IDirectFBWindow::RequestsFocus (http://www.directfb.org/docs/DirectFB_Reference/IDirectFBWindow_RequestFocus.html) interface.
If you want to create a window that is totally transparent to focus and input control, in other words will never receive focus or input events, then set the DFBWindowOptions (http://www.directfb.org/docs/DirectFB_Reference/types.html#DFBWindowOptions) flag called DWOP_GHOST
using the IDirectFBWindow::SetOptions (http://www.directfb.org/docs/DirectFB_Reference/IDirectFBWindow_SetOptions.html) interface. For example the DFBCursor is using this technique.
- DirectFB:Notes
- DirectFB
- DirectFB
- DirectFB
- DirectFB
- DirectFB
- directfb
- Notes
- notes
- Notes
- notes
- notes
- notes
- notes
- Notes
- notes
- Notes
- notes
- C++ Design Patterns and Derivatives Pricing
- 同学主动打来电话
- Nessus Network Auditing, Second Edition
- Handbook on Information Technologies for Education and Training
- C++标准库和对应头文件
- DirectFB:Notes
- 自动IP 转换成静态IP
- 网格计算和集群计算的区别
- 由PRIVATE VIRTUAL想到的语意学(SEMANTIC )
- 在Catalyst 2950交换机、Catalyst 3550交换机和3940路由器上实现三层交换
- 正则表达式怎么匹配双引号
- 关于“未能加载文件或程序集“System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”或它的某一个依赖项。系统找不到指定的文件”
- 一个局域网联机小游戏
- OpenJWeb平台实现了弹出选择窗口生成器