Added initial support for BView::SetMouseEventMask(). Buttons appear to be working well.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12789 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
24a075f4e4
commit
89d4bfbf2a
@ -1747,7 +1747,34 @@ void RootLayer::KeyboardEventHandler(int32 code, BPortLink& msg)
|
||||
}
|
||||
}
|
||||
|
||||
void RootLayer::SetDragMessage(BMessage* msg)
|
||||
bool
|
||||
RootLayer::SetEventMaskLayer(Layer *lay, uint32 mask, uint32 options)
|
||||
{
|
||||
if (!lay)
|
||||
return false;
|
||||
|
||||
bool returnValue = true;
|
||||
|
||||
Lock();
|
||||
|
||||
if (fEventMaskLayer && fEventMaskLayer != lay)
|
||||
{
|
||||
fprintf(stderr, "WARNING: fEventMaskLayer already set and different than the required one!\n");
|
||||
returnValue = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
fEventMaskLayer = lay;
|
||||
// TODO: use this mask and options!
|
||||
}
|
||||
|
||||
Unlock();
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
void
|
||||
RootLayer::SetDragMessage(BMessage* msg)
|
||||
{
|
||||
if (fDragMessage)
|
||||
{
|
||||
|
@ -107,6 +107,8 @@ public:
|
||||
void SetDragMessage(BMessage *msg);
|
||||
BMessage* DragMessage(void) const;
|
||||
|
||||
bool SetEventMaskLayer(Layer *lay, uint32 mask, uint32 options);
|
||||
|
||||
static int32 WorkingThread(void *data);
|
||||
|
||||
CursorManager& GetCursorManager() { return fCursorManager; }
|
||||
|
@ -600,6 +600,20 @@ void ServerWindow::DispatchMessage(int32 code, LinkMsgReader &link)
|
||||
|
||||
break;
|
||||
}
|
||||
case AS_LAYER_SET_MOUSE_EVENT_MASK:
|
||||
{
|
||||
STRACE(("ServerWindow %s: Message AS_LAYER_SET_MOUSE_EVENT_MASK: Layer name: %s\n", fName, cl->fName->String()));
|
||||
|
||||
uint32 mask;
|
||||
uint32 options;
|
||||
|
||||
link.Read<uint32>(&mask);
|
||||
link.Read<uint32>(&options);
|
||||
|
||||
myRootLayer->SetEventMaskLayer(cl, mask, options);
|
||||
|
||||
break;
|
||||
}
|
||||
case AS_LAYER_MOVETO:
|
||||
{
|
||||
STRACE(("ServerWindow %s: Message AS_LAYER_MOVETO: Layer name: %s\n", fName, cl->fName->String()));
|
||||
|
Loading…
Reference in New Issue
Block a user