Support non-rectangular input regions.

This enables the system bar to carve out a region through which
events will be sent to the IME behind it.

Bug: 3238092
Change-Id: I69b855a8d9b5b3ee525266c0861826e53e5b5028
This commit is contained in:
Jeff Brown
2011-01-16 14:06:57 -08:00
parent 115ad16551
commit fbf0977321
16 changed files with 270 additions and 191 deletions

View File

@ -23,6 +23,8 @@
#include <utils/Timers.h>
#include <utils/String8.h>
#include <SkRegion.h>
#include "InputApplication.h"
namespace android {
@ -129,14 +131,7 @@ struct InputWindow {
int32_t frameTop;
int32_t frameRight;
int32_t frameBottom;
int32_t visibleFrameLeft;
int32_t visibleFrameTop;
int32_t visibleFrameRight;
int32_t visibleFrameBottom;
int32_t touchableAreaLeft;
int32_t touchableAreaTop;
int32_t touchableAreaRight;
int32_t touchableAreaBottom;
SkRegion touchableRegion;
bool visible;
bool canReceiveKeys;
bool hasFocus;
@ -146,7 +141,7 @@ struct InputWindow {
int32_t ownerPid;
int32_t ownerUid;
bool touchableAreaContainsPoint(int32_t x, int32_t y) const;
bool touchableRegionContainsPoint(int32_t x, int32_t y) const;
bool frameContainsPoint(int32_t x, int32_t y) const;
/* Returns true if the window is of a trusted type that is allowed to silently