Re: Support for SpaceNavigator

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

 



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 foundin gimpcontrollers.c. Here the event is translated into the activationof a GtkAction. As you can see the event's value is multiplied by 1000and passed with the action. Later this value is then passed toaction_select_value() where it is divided by 1000 again and interpretedas an absolute value normalized to the scroll-bar range. This is all arather bad hack. To some extent it works for controllers that sendabsolute events. The device you are trying to use there sends relativeevents values though and all the assumptions that this code relies onbreak badly. This will need a clever redesign.

Sven

_______________________________________________Gimp-developer mailing listGimp-developer@xxxxxxxxxxxxxxxxxxxxxxxxxxx://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