Ticket #1159 (closed enhancement: wontfix)

Opened 8 years ago

Last modified 8 years ago

Aditional data in EventM

Reported by: guest Owned by: axel
Priority: minor Milestone: 0.11.0
Component: general (Gtk+, Glib) Version: 0.9.13
Keywords: Cc:


There's an 'eventCoordinates' available inside an EventM that returns a point as (Double,Double). Using points as (Double,Double) is also a convention in Cairo. When answering to expose events, as well as mouse events, we usually have to ask 'widgetGetSize', which returns (Int,Int), and the conversion to (Double,Double) usually make nice code look dirty. What if we had an 'eventWindowSize' with a (Double,Double) return?

Change History

Changed 8 years ago by pgavin

  • owner changed from somebody to axel

Do you mean you want an 'eventWindowSize' that returns (Int, Int)?

Changed 8 years ago by pgavin

  • milestone set to 0.11.0

Changed 8 years ago by axel

  • status changed from new to closed
  • resolution set to wontfix

No, I think the report want an additional method that returns the same as 'widgetGetSize' but using (Double, Double) as the return type.

Well, we could obviously add this, but I hesitate to do so since the types reflect the types of Gtk+. The window size is always integral. The event coordinates, on the other hand, may be fractional since a graphics table can generate events that have sub-pixel information, i.e. the events are more precise than a single pixel. I don't think any mouse driver does this.

So I think I'd like to close this. If there's enough functions of this type, we can think about creating a little convenience library that can be loaded in addition.

Note: See TracTickets for help on using tickets.