blip
0.1
|
A native window. More...
#include <Window.hpp>
Public Types | |
enum | Format { Format_Unknown = -1, Format_RGBA_8888 = 1, Format_RGBX_8888 = 2, Format_RGB_565 = 4 } |
Window formats. More... | |
enum | Flags { Flag_AllowLockWhileScreenOn = (1 << 0), Flag_DimBehind = (1 << 1), Flag_BlurBehind = (1 << 2), Flag_NotFocusable = (1 << 3), Flag_NotTouchable = (1 << 4), Flag_NotTouchModal = (1 << 5), Flag_TouchableWhenWaking = (1 << 6), Flag_KeepScreenOn = (1 << 7), Flag_LayoutInScreen = (1 << 8), Flag_LayoutNoLimits = (1 << 9), Flag_FullScreen = (1 << 10), Flag_ForceNotFullScreen = (1 << 11), Flag_Dither = (1 << 12), Flag_Secure = (1 << 13), Flag_Scaled = (1 << 14), Flag_IgnoreCheekPresses = (1 << 15), Flag_LayoutInsertDecor = (1 << 16), Flag_AltFocusableIM = (1 << 17), Flag_WatchOutsideTouch = (1 << 18), Flag_ShowWhenLocked = (1 << 19), Flag_ShowWallpaper = (1 << 20), Flag_TurnScreenOn = (1 << 21), Flag_DismissKeyGuard = (1 << 22) } |
Window flags. More... | |
Public Member Functions | |
~Window () | |
Destructor. More... | |
int | getWidth () const |
Get the width of the native window. More... | |
int | getHeight () const |
Get the height of the native window. More... | |
Format | getFormat () const |
Get the window format. More... | |
void | setFormat (Format format) |
Set the window format. More... | |
void | setFlags (uint32_t addFlags, uint32_t removeFlags) |
Set and clear window flags. More... | |
bool | setBuffersGeometry (uint_t width, uint_t height, Format format) |
Change the format and size of hte window buffers. More... | |
A native window.
enum Flags |
Window flags.
Enumerator | |
---|---|
Flag_AllowLockWhileScreenOn | Allow the screen lock to activate when this window is visible. |
Flag_DimBehind | Dim everything behind the window. |
Flag_BlurBehind | Blur everything behind the window. |
Flag_NotFocusable | Disable key input focus for the window. |
Flag_NotTouchable | Disable touch events for the window. |
Flag_NotTouchModal | Even when the window is focusable (Window::Flag_NotFocusable is not set), allow any pointer events outside of the window to be sent to the windows behind it. |
Flag_TouchableWhenWaking | If the device is asleep when the screen is pressed, send that touch event to the application. |
Flag_KeepScreenOn | Keep the device screen turned on and bright as long as the window is visible. |
Flag_LayoutInScreen | Place the window within the entire screen, ignoring border decorations such as the status bar. |
Flag_LayoutNoLimits | Allow the window to extend outside of the bounds of the screen. |
Flag_FullScreen | Hide all screen decorations (such as the status bar) while the window is visible. |
Flag_ForceNotFullScreen | Force the screen decorations (such as the status bar) to be shown while the window is visible. Overrides Window::Flag_FullScreen. |
Flag_Dither | Enable dithering when compositing the window to the screen. |
Flag_Secure | Do not allow screen shots to be taken while the window is visible. |
Flag_Scaled | Enable scaling when compisiting the window to the screen. |
Flag_IgnoreCheekPresses | Intended for windows that will often be used when the user is holding the screen against their face, it will aggressively filter the event stream to prevent unintended presses in this situation that may not be desired for a particular window, when such an event stream is detected, the application will receive a CANCEL motion event to indicate this so applications can handle this accordingly by taking no action on the event until the finger is released. |
Flag_LayoutInsertDecor | Used in conjunction with Window::Flag_LayoutInScreen. Causes the window manager to report the inset rectangle needed to ensure that the window's content is not covered by screen decurations such as the status bar. |
Flag_AltFocusableIM | Inverts the state of Window::Flag_NotFocusable with respect to how the window interacts with the current input method. |
Flag_WatchOutsideTouch | If Window::Flag_NotTouchModal is not set, allow the application to receive a single special MotionEvent with action MotionEvent::Action_Outside for touches that occur outside of the window. |
Flag_ShowWhenLocked | Display the window even if the device is locked. |
Flag_ShowWallpaper | Display the system wallpaper behind the window. The window must be translucent for this to have any visible effect. |
Flag_TurnScreenOn | When the window is made visibile, turn the screen on if the device is asleep. |
Flag_DismissKeyGuard | Dismiss non-secure keyguards. |
enum Format |
Window formats.
Enumerator | |
---|---|
Format_Unknown | |
Format_RGBA_8888 | |
Format_RGBX_8888 | |
Format_RGB_565 |
~Window | ( | ) |
Destructor.
Window::Format getFormat | ( | ) | const |
Get the window format.
int getHeight | ( | ) | const |
Get the height of the native window.
int getWidth | ( | ) | const |
Get the width of the native window.
bool setBuffersGeometry | ( | uint_t | width, |
uint_t | height, | ||
Format | format | ||
) |
Change the format and size of hte window buffers.
The width and height control the number of pixels in the buffers, not the dimensions of the window on screen. If these are different than the window's physical size, then the buffer will be scaled to match that size when compositing it to the screen.
width | The new width, in pixels. |
height | The new height, in pixels. |
format | The new window format. |
void setFlags | ( | uint32_t | addFlags, |
uint32_t | removeFlags | ||
) |
Set and clear window flags.
addFlags | A mask indicating which flags should be turned off. |
removeFlags | A mask indicating which flags should be turned off. |
void setFormat | ( | Format | format | ) |
Set the window format.