OK, I'll give it a try,..

I have a little problem getting into the code. I am new to the gtk
environment, the event handling and much of the gui stuff, so unfortunately
the learning curve is pretty steep. Anyhow, this is what I have found.

As far as I can see, the following line in gimpcontrollerinfo.c emits the
signal that initiates the scroll function

g_signal_emit (info, info_signals[EVENT_MAPPED], 0,
                     controller, event, action_name, &retval);

event contains the value, so I would be happy if I could pick up this value
later on, when the actual scrolling is performed.

The actual scrolling is performed by view_scroll_horizontal_cmd_callback in
view_commands.c. At this point I can't see how to actually access the value
of the event.

The initialization of the callback functions seemes to be done in

So the problem seemes to be that the scrolling functions as they are
implemented does not support any values. Are there any way I can access the
value of the event from the scrolling function.

Are there any actions that supports values that I could use as a template or
example to better understand what's going on?

Havard Torring

On Mon, Jun 15, 2009 at 10:39 PM, Simon Budig <si...@budig.de> wrote:

> Håvard Tørring (htoer...@gmail.com) wrote:
> > Hello,
> >
> > I have a 3dconnexion space navigator that I would love to be able to use
> to
> > pan and zoom the images in gimp.
> Yay, I have one of these as well. Please hack on that  :-)
> > The problem with this approach is that gimp ignores the value of the
> events,
> > making it unusable. Browsing around the source code, I have identified
> that
> > the events from the navigator are correctly identified in
> > controller_linux_input.c, but when mapped to actual events, such as
> panning,
> > the values from the controller are ignored, and the panning is performed
> > with a fixed pixelcount per event. So my questions are as follows:
> >
> > - Are there any ongoing work with this controller that I should be aware
> of?
> I am not aware of any current work in that area.
> > - Are there someone that could give me a brief description of how the
> events
> > from the input controller are communicated through the software? I have
> been
> > unable to identify where in the code the calls to the panning and zooming
> > functions are generated.
> The linux input controller module has a mapping, that maps events to
> so called "actions", which are the same thing that e.g. get attached to
> the menu. The mapping from event to action happens in
> app/widgets/gimpcontrollerinfo.c in gimp_controller_info_event, which -
> if it has a mapping - emits an "event-mapped" signal. This in turn gets
> handled in app/widgets/gimpcontrollers.c, there you also see the logic
> how events with values are handled. Basically the assigned action needs
> to be an GIMP_ENUM_ACTION for the reported value to have an effect.
> It is perfectly possible that the actions used to scroll the view are
> not ENUM_ACTIONs and need fixing for this to work as expected.
> I hope this helps,
>        Simon
> --
>              si...@budig.de              http://simon.budig.de/
> _______________________________________________
> Gimp-developer mailing list
> Gimp-developer@lists.XCF.Berkeley.EDU
> https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Gimp-developer mailing list

Reply via email to