Also, and this may sound very simple, but being part of the HI
toolbox means that Webkit probably needs to be on a composite window
in order to function and receive mouse / redraw events correctly...
Cheers,
Tom
-------------------------------------------------------
Any intelligent fool can make things bigger and more complex... It
takes a touch of genius --- and a lot of courage to move in the
opposite direction.
--Albert Einstein
On 13/05/2005, at 1:52 AM, Alex Fischer wrote:
Hi Alfred:
Thanks for your quick answer. I will go through your code and
answer as soon as I have seen how it works.
Regards
Alex
On May 12, 2005, at 17:42 , Alfred Van Hoek wrote:
on 5/12/05 10:55 AM, Alex Fischer at alex at basasoft dot com wrote:
Tried to send it to the view with
"SendEventToEventTargetWithOptions" but this produces a crash. Seems
logic as it probably produces a infinite loop.
Any ideas?
Could be that SendEventToEventTargetWithOptions should not be
used, instead
try something like one or both of below functions, or adapt
SendEventToEventTargetWithOptions:
//used in the mousedown behavior function
static void _SendEventControlHitTest(REALcontrolInstance instance,
Point pt)
{
ControlData(MyDefinition, instance, MyData, me);
EventRef theEvent;
CreateEvent(NULL, kEventClassControl, kEventControlHitTest, 0, 0,
&theEvent);
SetEventParameter(theEvent, kEventParamDirectObject,
typeControlRef,
sizeof(ControlRef), &me->mHIViewRef);
SetEventParameter(theEvent, kEventParamMouseLocation,
typeQDPoint,
sizeof(pt), &pt);
SendEventToEventTarget(theEvent, GetControlEventTarget(me-
>mHIViewRef));
ReleaseEvent(theEvent);
}
//used in the mousedown behavior function
static void _SendEventControlTrack(REALcontrolInstance instance,
Point pt)
{
ControlData(MyDefinition, instance, MyData, me);
EventRef theEvent;
CreateEvent(NULL, kEventClassControl, kEventControlTrack, 0, 0,
&theEvent);
SetEventParameter(theEvent, kEventParamDirectObject,
typeControlRef,
sizeof(ControlRef), &me->mHIViewRef);
SetEventParameter(theEvent, kEventParamMouseLocation,
typeQDPoint,
sizeof(pt), &pt);
SendEventToEventTarget(theEvent, GetControlEventTarget(me-
>mHIViewRef));
ReleaseEvent(theEvent);
}
Alfred
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|