norisatir / go-gtk3

go-gtk3 - GTK3 BINDINGS FOR GO
BSD 3-Clause "New" or "Revised" License
58 stars 19 forks source link

gtk_widget_get_pointer is deprecated #4

Open colemickens opened 12 years ago

colemickens commented 12 years ago
# github.com/norisatir/go-gtk3/gtk3
gtk3.go:1341:1: error: 'gtk_widget_get_pointer' is deprecated (declared at /usr/include/gtk-3.0/gtk/gtkwidget.h:747): Use 'gdk_window_get_device_position' instead [-Werror=deprecated-declarations]
cc1: all warnings being treated as errors

I get this error with libgtk-3-dev 3.4.0-0ubuntu3~oneiric1.

Replacing line 1066: C.gtk_widget_get_pointer(self.object, &cx, &cy)

with: C.gdk_window_get_device_position(C.gtk_widget_get_window(self.object), C.gtk_get_current_event_device(), &cx, &cy, nil)

seems to solve the issue.

norisatir commented 12 years ago

go-gtk3 is not yet updated for gtk3 version 3.4. It will be in a day or two.

tfmoraes commented 12 years ago

I think it's related:

$ go get github.com/norisatir/go-gtk3/gtk3

    gobject.go:39:1: error: 'g_value_get_char' is deprecated (declared at /usr/include/glib-2.0/gobject/gvaluetypes.h:184) [-Werror=deprecated-declarations]
    gobject.go:40:1: error: 'g_value_set_char' is deprecated (declared at /usr/include/glib-2.0/gobject/gvaluetypes.h:181) [-Werror=deprecated-declarations]
    cc1: all warnings being treated as errors

I'm using Ubuntu 12.04.

Thanks!

SiyaDlamini commented 11 years ago

I think this is also related. When trying to install or build I get:

github.com/norisatir/go-gtk3/gobject

gobject/go-gobject.c: In function ‘_g_clear_object’: gobject/go-gobject.c:23:1: error: size of array ‘_GStaticAssertCompileTimeAssertion_0’ is negative

On Ubuntu 12.04