Re: Support for SpaceNavigator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am testing this with panning by mapping events from 3dconnexion to view-scroll-up/down/left/
right. In the mentioned function, the if test fails on GIMP_ENUM_ACTION (action)->value_variable returning 0. I assume this means that the view-scroll actions does not take any value. Is this correct? Are there any panning actions I could use that accepts value?

Havard Torring


On Sun, Jun 28, 2009 at 11:49 PM, Håvard Tørring <htoerrin@xxxxxxxxx> wrote:
I am testing this with panning by mapping events from 3dconnexion to view-scroll-up/down/left/right. In the mentioned function, the if test fails on GIMP_ENUM_ACTION (action)->value_variable returning 0. I assume this means that the view-scroll actions does not take any value. Is this correct? Are there any panning actions I could use that accepts value?

Havard Torring


On Mon, Jun 22, 2009 at 11:27 PM, Sven Neumann <sven@xxxxxxxx> wrote:
On Mon, 2009-06-22 at 21:41 +0200, Håvard Tørring wrote:
> 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.

This signal is then handled in gimp_controllers_event_mapped() as found
in gimpcontrollers.c. Here the event is translated into the activation
of a GtkAction. As you can see the event's value is multiplied by 1000
and passed with the action. Later this value is then passed to
action_select_value() where it is divided by 1000 again and interpreted
as an absolute value normalized to the scroll-bar range. This is all a
rather bad hack. To some extent it works for controllers that send
absolute events. The device you are trying to use there sends relative
events values though and all the assumptions that this code relies on
break badly. This will need a clever redesign.


Sven




_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux