Re: [Java-gnome-developer] Question concerning pixel graphics (fw d)
Brought to you by:
afcowie
From: Markus F. <mar...@t-...> - 2001-11-07 18:35:55
|
> You can now implement inheritance with define-boxed types. > This should help you with GdkPixmap, GdkBitmap, etc. Thank you! > > Now I'm heading for a zoom function ;-) > Great. We have no example code in the bindings that demonstrate > the low-level drawing classes. If you would like to contribute > your example I would be happy to add it. Okay, I'll send it to you at the time the code is in a readable form, commented and fully functional (short: when it's no more embarrasing for me);-) As for the zoom method, I have another question: ----------------------------- ... // the EventMask is configured properly drwarea.signalConnect("button_press_event", "zoomStart", this); ... public boolean zoomStart(GdkEvent event) { if (event.getType().test(GdkEventType.BUTTON_PRESS)) { System.out.println("button_pressed_event caught"); } else { System.out.println("Something happend"); } return(false); } ... ----------------------------- prints "button_pressed_event caught". So far, so good. But if I try to cast ----------------------------- GdkEventButton e = (GdkButtonEvent) event; ----------------------------- nothing happens (the method seems to stop at the cast). When I try ----------------------------- public boolean zoomStart(GdkEventButton event) ----------------------------- I get the warning (and, as you would expect, the method isn't called :-)) ----------------------------- *** WARNING ***: Java-GNOME - cannot find callback method zoomEnd in the specified object with signature (Lgnu/gdk/GdkEvent;)Z ----------------------------- My fault? Lack of knowledge about gtk/gdk? Or feature? :-)) MfG Markus |