Giter Site home page Giter Site logo

go-gtk3's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-gtk3's Issues

gdk threads compile error

gdk3.go: In function '_gdk_threads_init':
gdk3.go:7:2: error: 'gdk_threads_init' is deprecated (declared at /usr/include/gtk-3.0/gdk/gdkthreads.h:43) [-Werror=deprecated-declarations]
gdk3.go: At top level:
gdk3.go:37:1: error: 'gdk_threads_leave' is deprecated (declared at /usr/include/gtk-3.0/gdk/gdkthreads.h:47) [-Werror=deprecated-declarations]
gdk3.go:69:1: error: 'gdk_threads_enter' is deprecated (declared at /usr/include/gtk-3.0/gdk/gdkthreads.h:45) [-Werror=deprecated-declarations]
cc1: all warnings being treated as errors

License

Although you already state the the license in the README, would you please consider adding a LICENSE and/or COPYING file? This will keep the legal guys of my distro happier as I package this for our repos.

Thanks for the package!

compile error

src/github.com/norisatir/go-gtk3/gobject/go-gobject.c:23:2: error: cannot convert to a pointer type

gtk_widget_get_pointer is deprecated

# 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.

Trying to install go-gtk3 yields; gobject-2.0 appears to be missing???

Executing the following Go Get command:
$ go get github.com/norisatir/go-gtk3/gtk3

The following diagnostic text shows up on my console:
pkg-config --cflags gobject-2.0
Package gobject-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gobject-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gobject-2.0' found
pkg-config: exit status 1

What am I missing here?
Any help to get this resolved would be greatly appreciated.

-P.

go-gtk3 stopped working

Something in my system must have been updated so that go-gtk3 does not work anymore. When starting the freshly compiled go-gtk3 demo on the current go weekly i get the following error:

$ ./demo 
panic: runtime error: assignment to entry in nil map

goroutine 1 [running]:
github.com/norisatir/go-gtk3/gobject.RegisterGoType(0x40, 0x42856b, 0x42ccea, 0x4f6e6a)
        go/src/pkg/github.com/norisatir/go-gtk3/gobject/_obj/closure.cgo1.go:722 +0x43
github.com/norisatir/go-gtk3/gobject.init·2()
        go/src/pkg/github.com/norisatir/go-gtk3/gobject/_obj/closure.cgo1.go:37 +0x2d
github.com/norisatir/go-gtk3/gobject.init()
        go/src/pkg/github.com/norisatir/go-gtk3/gobject/_obj/closure.cgo1.go:1164 +0x5e
github.com/norisatir/go-gtk3/pango.init()
        go/src/pkg/github.com/norisatir/go-gtk3/pango/_obj/pango.cgo1.go:3 +0x45
main.init()
       go/src/pkg/github.com/norisatir/go-gtk3/demo/demo.go:0 +0x3b

I was able to compile the same program on the 4th of January. I looked at my distributions update log (archlinux) but could not find an update to gtk3 or similar.

error: 'g_type_init' is deprecated

Hi,

When trying to:

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

It fails, saying that:

# github.com/norisatir/go-gtk3/gobject
gobject.go:91:1: error: 'g_type_init' is deprecated (declared at /usr/include/glib-2.0/gobject/gtype.h:669) [-Werror=deprecated-declarations]
   val, err := ConvertToGo(gv.GetPtr(), gv.gtype)
 ^
cc1: all warnings being treated as errors

When disabling the deprecation warning/error, I get the following errors instead:

# github.com/norisatir/go-gtk3/gobject
gobject.go: In function ‘_cgo_37d2f2f5c597_Cfunc_g_type_init’:
gobject.go:274:2: warning: ‘g_type_init’ is deprecated (declared at /usr/include/glib-2.0/gobject/gtype.h:669) [-Wdeprecated-declarations]
 }
  ^
# github.com/norisatir/go-gtk3/gobject
In file included from /usr/lib/glib-2.0/include/glibconfig.h:9:0,
                 from /usr/include/glib-2.0/glib/gtypes.h:34,
                 from /usr/include/glib-2.0/glib/galloca.h:34,
                 from /usr/include/glib-2.0/glib.h:32,
                 from ./go-gobject.h:6,
                 from ./go-gobject.c:1:
./go-gobject.c: In function ‘_g_clear_object’:
/usr/include/glib-2.0/glib/gmacros.h:181:53: error: size of array ‘_GStaticAssertCompileTimeAssertion_0’ is negative
 #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
                                                     ^
/usr/include/glib-2.0/glib/gmacros.h:178:47: note: in definition of macro ‘G_PASTE_ARGS’
 #define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
                                               ^
/usr/include/glib-2.0/glib/gmacros.h:181:44: note: in expansion of macro ‘G_PASTE’
 #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
                                            ^
/usr/include/glib-2.0/glib/gmem.h:115:5: note: in expansion of macro ‘G_STATIC_ASSERT’
     G_STATIC_ASSERT (sizeof *(pp) == sizeof (gpointer));                       \
     ^
/usr/include/glib-2.0/gobject/gobject.h:650:36: note: in expansion of macro ‘g_clear_pointer’
 #define g_clear_object(object_ptr) g_clear_pointer ((object_ptr), g_object_unref)
                                    ^
./go-gobject.c:23:2: note: in expansion of macro ‘g_clear_object’
  g_clear_object(o);
  ^
./go-gobject.c:23:2: error: cannot convert to a pointer type

I'm currently on 32-bit Arch Linux with gtk 3.10.2, go 1.1.2 and gcc 4.8.2.

Thanks for looking into this.

Best regards,
Alexander Rødseth

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.