Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How events get propagated?
How events get propagated? [message #450362] Thu, 10 February 2005 20:20 Go to next message
Eclipse UserFriend
Originally posted by: makmingchi.yahoo.com

I am studying the SWT code and try to understand how the event get
propagted on SWT/GTK layers.

There is a sendEvent(int) in Widget which is called by different classes,
like Shell, Control to ack listeners when a event happen. However, who
actually call these methods and pass the event to SWT:
Control.event(int), Shell.ShellEvent(), Display.sendEvent() ??

thanks

Stephen
Re: How events get propagated? [message #450364 is a reply to message #450362] Thu, 10 February 2005 20:42 Go to previous messageGo to next message
Charlie Surface is currently offline Charlie SurfaceFriend
Messages: 40
Registered: July 2009
Member
Check out the "Open Call Hierarchy" feature to trace these calls back to
their source. Once you find a method with "gtk_" at the front, you
have found the native callback which is made to send the event from GTK
to Java.

Charlie


Stephen Mak wrote:

> I am studying the SWT code and try to understand how the event get
> propagted on SWT/GTK layers.
> There is a sendEvent(int) in Widget which is called by different
> classes, like Shell, Control to ack listeners when a event happen.
> However, who actually call these methods and pass the event to SWT:
> Control.event(int), Shell.ShellEvent(), Display.sendEvent() ??
>
> thanks
>
> Stephen
>
Re: How events get propagated? [message #450367 is a reply to message #450364] Thu, 10 February 2005 21:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: makmingchi.yahoo.com

I tried and nothing shows up with gtk_

thanks

Stephen
Charlie Surface wrote:

> Check out the "Open Call Hierarchy" feature to trace these calls back to
> their source. Once you find a method with "gtk_" at the front, you
> have found the native callback which is made to send the event from GTK
> to Java.

> Charlie


> Stephen Mak wrote:

>> I am studying the SWT code and try to understand how the event get
>> propagted on SWT/GTK layers.
>> There is a sendEvent(int) in Widget which is called by different
>> classes, like Shell, Control to ack listeners when a event happen.
>> However, who actually call these methods and pass the event to SWT:
>> Control.event(int), Shell.ShellEvent(), Display.sendEvent() ??
>>
>> thanks
>>
>> Stephen
>>
Re: How events get propagated? [message #450370 is a reply to message #450367] Thu, 10 February 2005 21:51 Go to previous messageGo to next message
Charlie Surface is currently offline Charlie SurfaceFriend
Messages: 40
Registered: July 2009
Member
Are you using the .classpath_gtk in your org.eclipse.swt project?

Charlie


Stephen Mak wrote:

> I tried and nothing shows up with gtk_
>
> thanks
>
> Stephen
> Charlie Surface wrote:
>
>> Check out the "Open Call Hierarchy" feature to trace these calls back
>> to their source. Once you find a method with "gtk_" at the front,
>> you have found the native callback which is made to send the event
>> from GTK to Java.
>
>
>> Charlie
>
>
>
>> Stephen Mak wrote:
>
>
>>> I am studying the SWT code and try to understand how the event get
>>> propagted on SWT/GTK layers.
>>> There is a sendEvent(int) in Widget which is called by different
>>> classes, like Shell, Control to ack listeners when a event happen.
>>> However, who actually call these methods and pass the event to SWT:
>>> Control.event(int), Shell.ShellEvent(), Display.sendEvent() ??
>>>
>>> thanks
>>>
>>> Stephen
>>>
>
>
Re: How events get propagated? [message #450371 is a reply to message #450367] Thu, 10 February 2005 21:52 Go to previous messageGo to next message
Charlie Surface is currently offline Charlie SurfaceFriend
Messages: 40
Registered: July 2009
Member
Actually, I was slightly wrong in my first post. The gtk_ methods are
actually being called from windowProcs. But the idea is that they each
map to a specific GTK callback.

Charlie


Stephen Mak wrote:

> I tried and nothing shows up with gtk_
>
> thanks
>
> Stephen
> Charlie Surface wrote:
>
>> Check out the "Open Call Hierarchy" feature to trace these calls back
>> to their source. Once you find a method with "gtk_" at the front,
>> you have found the native callback which is made to send the event
>> from GTK to Java.
>
>
>> Charlie
>
>
>
>> Stephen Mak wrote:
>
>
>>> I am studying the SWT code and try to understand how the event get
>>> propagted on SWT/GTK layers.
>>> There is a sendEvent(int) in Widget which is called by different
>>> classes, like Shell, Control to ack listeners when a event happen.
>>> However, who actually call these methods and pass the event to SWT:
>>> Control.event(int), Shell.ShellEvent(), Display.sendEvent() ??
>>>
>>> thanks
>>>
>>> Stephen
>>>
>
>
Re: How events get propagated? [message #451011 is a reply to message #450367] Mon, 21 February 2005 12:43 Go to previous message
Ivan Markov is currently offline Ivan MarkovFriend
Messages: 61
Registered: July 2009
Member
Could it be that the specific event you are looking at is "deferred"?
Sometimes almost all ports of SWT use this technique, for various reasons.
The idea is to delay the processing of the event by the *user* SWT code
until *after* the GTK event is finished. This is done by Widget.postEvent().

"Stephen Mak" <makmingchi@yahoo.com> wrote in message
news:cugj1c$gap$1@www.eclipse.org...
> I tried and nothing shows up with gtk_
>
> thanks
>
> Stephen
> Charlie Surface wrote:
>
> > Check out the "Open Call Hierarchy" feature to trace these calls back to
> > their source. Once you find a method with "gtk_" at the front, you
> > have found the native callback which is made to send the event from GTK
> > to Java.
>
> > Charlie
>
>
> > Stephen Mak wrote:
>
> >> I am studying the SWT code and try to understand how the event get
> >> propagted on SWT/GTK layers.
> >> There is a sendEvent(int) in Widget which is called by different
> >> classes, like Shell, Control to ack listeners when a event happen.
> >> However, who actually call these methods and pass the event to SWT:
> >> Control.event(int), Shell.ShellEvent(), Display.sendEvent() ??
> >>
> >> thanks
> >>
> >> Stephen
> >>
>
>
Previous Topic:Couldn't find per display information in Solaris
Next Topic:How to rotate a low res image?...
Goto Forum:
  


Current Time: Fri Apr 26 05:29:54 GMT 2024

Powered by FUDForum. Page generated in 0.04041 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top