go-gtk3 - GTK3 BINDINGS FOR GO

Related tags

Images tools go-gtk3
Overview

go-gtk3 - GTK3 BINDINGS FOR GO

THIS IS:

Hopefully GTK3 Bindings using gobject binding for Go.

Goal is to have fairly complete gtk3 widgets
with pango, gdkpixbuf and cairo objects.

INSTALL:

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

For demo:

cd $GOPATH/src/github.com/norisatir/go-gtk3/demo
go build
./demo

(Demo apps are taken from gtk3 demo apps, translated to go)

LICENSE:

Under same terms and conditions as the Go language,
BSD style license

IMPLEMENTATION LIST:

Note:
"Gtk" has been stripped from the names.

GTK3 CORE:

  • AccelGroups
  • Clipboard

BASE OBJECT:

  • Widget
  • Container
  • Bin
  • Range

WINDOWS:

  • Window
  • Dialog
  • MessageDialog
  • Invisible
  • Assistant

DISPLAY WIDGETS:

  • Label
  • ProgressBar
  • Image
  • Statusbar
  • Spinner
  • InfoBar

BUTTONS AND TOGGLES:

  • Button
  • ToggleButton
  • CheckButton
  • RadioButton
  • LinkButton
  • Switch

NUMERIC/TEXT DATA ENTRY:

  • Entry
  • EntryBuffer
  • EntryCompletion
  • Scale
  • SpinButton

MULTILINE TEXT EDITOR:

  • TextTag
  • TextTagTable
  • TextIter
  • TextBuffer
  • TextChildAnchor
  • TextView

TREE, LIST AND ICON GRID WIDGETS:

  • TreePath
  • TreeRowReference
  • TreeIter
  • TreeModel
  • ListStore
  • TreeStore
  • CellArea
  • CellAreaContext
  • CellLayout
  • CellView
  • CellRenderer (and brothers)
  • TreeViewColumn
  • TreeSelection
  • TreeView

MENUS, COMBOBOX, TOOLBAR:

  • ComboBox
  • ComboBoxText
  • MenuShell
  • Menu
  • MenuBar
  • MenuItem (and brothers)

SELECTORS (COLOR,FILE,FONT):

  • ColorButton

ACTION-BASED MENUS AND TOOLBARS

  • Action

LAYOUT CONTAINERS:

  • Grid
  • Box
  • ButtonBox
  • Paned
  • Notebook

ORNAMENTS:

  • Frame
  • Separator

SCROLLING:

  • ScrollBar
  • ScrolledWindow

APP:

  • Application

AUTHOR

  • Matej Knific
Issues
  • go-gtk3 stopped working

    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.

    opened by dersebi 11
  • License

    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!

    opened by gnanderson 1
  • Trying to install go-gtk3 yields; gobject-2.0 appears to be missing???

    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.

    opened by peteArnt 0
  • error: 'g_type_init' is deprecated

    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

    opened by xyproto 3
  • gdk threads compile error

    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

    opened by hwch 0
  • gtk_widget_get_pointer is deprecated

    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.

    opened by colemickens 3
Owner
nori satir
nori satir
Go bindings for GLFW 3

GLFW 3.3 for Go Installation GLFW C library source is included and built automatically as part of the Go package. But you need to make sure you have d

OpenGL with Golang 1.3k Jul 3, 2022
Go bindings for OpenGL (generated via glow)

gl This repository holds Go bindings to various OpenGL versions. They are auto-generated using Glow. Features: Go functions that mirror the C specific

OpenGL with Golang 911 Jun 26, 2022
Go bindings to OpenGL Utility Library

GLU This package offers minimal bindings for GLU functions. Usage go get github.com/go-gl-legacy/glu License Copyright 2012 The go-gl Authors. All ri

go-gl legacy 21 Aug 18, 2018
Go bindings for audio capture and playback with ALSA and libasound

Go ALSA bindings These bindings allow capture and playback of audio via ALSA using the alsa-lib library. Installation go get github.com/cocoonlife/goa

null 35 Mar 21, 2022
naive go bindings to GnuPlot

go-gnuplot Simple-minded functions to work with gnuplot. go-gnuplot runs gnuplot as a subprocess and pushes commands via the STDIN of that subprocess.

Sebastien Binet 26 Nov 8, 2021
Experimental OpenAL bindings for Go.

Experimental OpenAL bindings for Go. ==================================== Everything is evolving quickly and nothing is totally done. If you want to

Peter H. Fröhlich 29 Apr 8, 2022
Go bindings for OpenCV / 2.x API in gocv / 1.x API in opencv

Go OpenCV binding A Golang binding for OpenCV. OpenCV 1.x C API bindings through CGO, and OpenCV 2+ C++ API (GoCV) through SWIG. Disclaimer This is a

go-opencv 1.3k Jun 28, 2022
Go bindings for GStreamer (retired: currently I don't use/develop this package)

Retired. I don't use/develop this package anymore. Go bindings for GStreamer at a very early stage of maturity. This package is based on GLib bindings

Michał Derkacz 164 May 31, 2022
Go bindings for libVLC and high-level media player interface

Go bindings for libVLC 2.X/3.X/4.X and high-level media player interface. The package can be useful for adding multimedia capabilities to applications

Adrian-George Bostan 306 Jun 16, 2022
Go bindings for OpenCV1.1 (Dev/Zero Dependencies).

Go语言QQ群: 102319854, 1055927514 凹语言(凹读音“Wa”)(The Wa Programming Language): https://github.com/wa-lang/wa Go bindings for OpenCV1.1 PkgDoc: http://godoc

chai2010 116 Dec 12, 2021
Cgo bindings to PulseAudio's Simple API, for easily playing or capturing raw audio.

pulse-simple Cgo bindings to PulseAudio's Simple API, for easily playing or capturing raw audio. The full Simple API is supported, including channel m

Tommy 20 Jun 17, 2022
Vulkan API bindings for Go programming language

Golang Bindings for Vulkan API Package vulkan provides Go bindings for Vulkan — a low-overhead, cross-platform 3D graphics and compute API. Updated Oc

null 632 Jun 28, 2022
Go cross-platform OpenGL bindings.

gl Package gl is a Go cross-platform binding for OpenGL, with an OpenGL ES 2-like API. It supports: macOS, Linux and Windows via OpenGL 2.1 backend, i

null 157 May 14, 2022
Go bindings for GTK3

gotk3 The gotk3 project provides Go bindings for GTK 3 and dependent projects. Each component is given its own subdirectory, which is used as the impo

gotk3 1.8k Jun 28, 2022
GTK3-based dock for sway

nwg-dock Fully configurable (w/ command line arguments and css) dock, written in Go, aimed exclusively at sway Wayland compositor. It features pinned

Piotr Miller 74 Jun 19, 2022
wsmgr-for-i3 is a Go GTK3 program to manage i3 workspaces.

wsmgr-for-i3 wsmgr-for-i3 (workspace manager for i3) is a Go GTK3 program to manage i3 workspaces. It allows you to re-order and re-name workspaces ea

Michael Stapelberg 25 Apr 8, 2022
A rewrite of DrPetter's sfxr in Go and GTK3

gosfxr This is a rewrite of DrPetter's sfxr in Go and GTK3 that only exists because I wanted to get my feet wet with UI development in Go. Please refe

null 0 Dec 27, 2021
libsox bindings for go

gosox "SoX − Sound eXchange, the Swiss Army knife of audio manipulation" Go bindings for the libsox sound library For more information and documentati

Kristoffer Grönlund 123 Apr 9, 2022
Go bindings for the PortAudio audio I/O library

portaudio This package provides an interface to the PortAudio audio I/O library. See the package documentation for details. To build this package you

Gordon Klaus 507 Jun 20, 2022
Go bindings for libportmidi

portmidi Want to output to an MIDI device or listen your MIDI device as an input? This package contains Go bindings for PortMidi. libportmidi (v. 217)

Jaana Dogan 267 Jun 28, 2022
Golang bindings for the Telegram Bot API

Golang bindings for the Telegram Bot API All methods are fairly self explanatory, and reading the godoc page should explain everything. If something i

null 3.8k Jun 29, 2022
OpenSSL bindings for Go

OpenSSL bindings for Go Please see http://godoc.org/github.com/spacemonkeygo/openssl for more info License Copyright (C) 2017. See AUTHORS. Licensed u

Space Monkey Go 436 Jun 1, 2022
Golang bindings for libxlsxwriter for writing XLSX files

goxlsxwriter provides Go bindings for the libxlsxwriter C library. Install goxlsxwriter requires the libxslxwriter library to be installe

Frank Terragna 18 Jun 27, 2022
Go bindings for ForestDB

goforestdb Go bindings for ForestDB Building Obtain and build forestdb: https://github.com/couchbaselabs/forestdb (run make install to install the lib

null 32 Apr 5, 2022
Go bindings for GLib type system.

Go bindings for GLib type system. This package is designed for building bindings to C libraries based on GLib type system (like GTK, GStreamer, and ot

Michał Derkacz 24 Aug 13, 2019
Source code editor written in Go using go-gtk bindings. It aims to handle navigation effectively among large number of files.

tabby Source code editor written in Go using go-gtk bindings. It aims to handle navigation effectively among large number of files. screenshot: depend

Mikhail Trushnikov 49 Dec 30, 2021
Duktape JavaScript engine bindings for Go

Duktape bindings for Go(Golang) Duktape is a thin, embeddable javascript engine. Most of the api is implemented. The exceptions are listed here. Usage

Oleg Lebedev 780 Jun 27, 2022
PHP bindings for the Go programming language (Golang)

PHP bindings for Go This package implements support for executing PHP scripts, exporting Go variables for use in PHP contexts, attaching Go method rec

Alex Palaistras 862 Jun 26, 2022
naive go bindings to the CPython C-API

go-python Naive go bindings towards the C-API of CPython-2. this package provides a go package named "python" under which most of the PyXYZ functions

Sebastien Binet 1.4k Jun 24, 2022