Giter Club home page Giter Club logo

go-gtk's Introduction

go-gtk

Build Status Codecov

WHATS

Go bindings for GTK

SCREENSHOT

Go GTK!

INSTALL

You can experiment with go-gtk by running the various example programs:

git clone https://github.com/mattn/go-gtk
cd go-gtk
go get ...
make example
./example/demo/demo

Or

go get github.com/mattn/go-gtk/gtk

Don't forget, that you need the GTK-Development-Packages.

If you use linux, you should install libgtk+-2.0 and packages that depend on gtk.

On Debian and Debian derived distributions you can run (as root):

apt-get install libgtk2.0-dev libglib2.0-dev libgtksourceview2.0-dev

If you use windows, find gtk binary packages from here:

EMBEDDING

It is possible to embed a pixbuf image with:

$ go run tools/make_inline_pixbuf/make_inline_pixbuf.go logoPNG data/go-gtk-logo.png > logo.gen.go

And then load it with:

  pb := gdkpixbuf.NewPixbufFromData(logoPNG)

LICENSE

The library is available under the same terms and conditions as the Go, the BSD style license, and the LGPL (GNU Lesser General Public License). The idea is that if you can use Go (and Gtk) in a project, you should also be able to use go-gtk.

AUTHOR

  • Yasuhiro Matsumoto

CONTRIBUTE AUTHORS

  • David Roundy
  • Mark Andrew Gerads
  • Tobias Kortkamp
  • Mikhail Trushnikov
  • Federico Sogaro
  • Crazy2be
  • Daniël de Kok
  • Erik Lissel
  • Jeffrey Bolle
  • Leonhard Küper
  • Matt Joiner
  • SQP
  • Steven T
  • Taru Karttunen
  • Utkan Güngördü
  • matiaslina
  • Dag Robøle
  • Denis Dyakov
  • Giuseppe Mazzotta

GOAL

Hopefully support following widgets and methods enough to run general application.

(output of tools/gogtkinfo)

Main Loop and Events          :  30% (  8/ 26)
GtkAccelGroup                 :  15% (  3/ 19)
GtkAccelMap                   :   0% (  0/ 14)
GtkClipboard                  :  29% (  9/ 31)
Drag and Drop                 :  11% (  4/ 35)
GtkIconTheme                  :   9% (  3/ 33)
GtkStockItem                  :  66% (  4/  6)
Themeable Stock Images        :   2% (  1/ 42)
Resource Files                :  14% (  4/ 28)
GtkSettings                   :  40% (  6/ 15)
GtkBinding                    :   0% (  0/ 14)
Graphics Contexts             :   0% (  0/  2)
GtkStyle                      :   9% (  6/ 64)
Selections                    :   8% (  4/ 47)
Version Information           :   0% (  0/  6)
Testing                       :   0% (  0/ 16)
Filesystem Utilities          :   0% (  0/  7)
GtkDialog                     :  63% ( 12/ 19)
GtkMessageDialog              :  62% (  5/  8)
GtkWindow                     :  53% ( 55/102)
GtkWindowGroup                :   0% (  0/  5)
GtkAboutDialog                :  90% ( 29/ 32)
GtkAssistant                  :  91% ( 21/ 23)
GtkOffscreenWindow            :   0% (  0/  3)
GtkAccelLabel                 :  83% (  5/  6)
GtkImage                      :  32% ( 10/ 31)
GtkLabel                      :  86% ( 39/ 45)
GtkProgressBar                : 100% ( 12/ 12)
GtkStatusbar                  :  77% (  7/  9)
GtkInfoBar                    : 100% ( 12/ 12)
GtkStatusIcon                 :  68% ( 26/ 38)
GtkSpinner                    : 100% (  3/  3)
GtkButton                     : 100% ( 28/ 28)
GtkCheckButton                : 100% (  3/  3)
GtkRadioButton                : 100% (  8/  8)
GtkToggleButton               : 100% (  9/  9)
GtkLinkButton                 :  75% (  6/  8)
GtkScaleButton                : 100% (  9/  9)
GtkVolumeButton               : 100% (  1/  1)
GtkEntry                      :  44% ( 28/ 63)
GtkEntryBuffer                :  72% (  8/ 11)
GtkEntryCompletion            :  96% ( 25/ 26)
GtkHScale                     : 100% (  2/  2)
GtkVScale                     : 100% (  2/  2)
GtkSpinButton                 : 100% ( 30/ 30)
GtkEditable                   : 100% ( 13/ 13)
GtkTextIter                   :  25% ( 23/ 91)
GtkTextMark                   :   0% (  0/  7)
GtkTextBuffer                 :  67% ( 52/ 77)
GtkTextTag                    :  83% (  5/  6)
GtkTextAttributes             : 100% (  5/  5)
GtkTextTagTable               :  83% (  5/  6)
GtkTextView                   :  29% ( 19/ 64)
GtkTreePath                   :  90% ( 18/ 20)
GtkTreeRowReference           :  60% (  6/ 10)
GtkTreeIter                   : 100% (  2/  2)
GtkTreeModel                  :  57% ( 15/ 26)
GtkTreeSelection              :  78% ( 18/ 23)
GtkTreeViewColumn             :  61% ( 34/ 55)
GtkTreeView                   :  19% ( 19/ 98)
GtkTreeView drag-and-drop     :   0% (  0/  7)
GtkCellView                   :   0% (  0/ 11)
GtkIconView                   :  17% ( 11/ 62)
GtkTreeSortable               :  87% (  7/  8)
GtkTreeModelSort              :   0% (  0/  9)
GtkTreeModelFilter            :   0% (  0/ 11)
GtkCellLayout                 :   0% (  0/  9)
GtkCellRenderer               : 100% (  2/  2)
GtkCellEditable               :   0% (  0/  3)
GtkCellRendererAccel          : 100% (  1/  1)
GtkCellRendererCombo          : 100% (  1/  1)
GtkCellRendererPixbuf         : 100% (  1/  1)
GtkCellRendererProgress       : 100% (  1/  1)
GtkCellRendererSpin           : 100% (  1/  1)
GtkCellRendererText           : 100% (  2/  2)
GtkCellRendererToggle         : 100% (  7/  7)
GtkCellRendererSpinner        : 100% (  1/  1)
GtkListStore                  :  84% ( 16/ 19)
GtkTreeStore                  :  80% ( 17/ 21)
GtkComboBox                   :  78% ( 30/ 38)
GtkComboBoxText               : 100% (  7/  7)
GtkComboBoxEntry              :  80% (  4/  5)
GtkMenu                       :  48% ( 13/ 27)
GtkMenuBar                    : 100% (  5/  5)
GtkMenuItem                   :  90% ( 18/ 20)
GtkImageMenuItem              :  54% (  6/ 11)
GtkRadioMenuItem              :  44% (  4/  9)
GtkCheckMenuItem              : 100% ( 10/ 10)
GtkSeparatorMenuItem          : 100% (  1/  1)
GtkTearoffMenuItem            : 100% (  1/  1)
GtkToolShell                  :   0% (  0/  9)
GtkToolbar                    :  63% ( 24/ 38)
GtkToolItem                   :  76% ( 19/ 25)
GtkToolPalette                :  59% ( 13/ 22)
GtkToolItemGroup              :  47% (  8/ 17)
GtkSeparatorToolItem          : 100% (  3/  3)
GtkToolButton                 : 100% ( 15/ 15)
GtkMenuToolButton             :  85% (  6/  7)
GtkToggleToolButton           : 100% (  5/  5)
GtkRadioToolButton            :  33% (  2/  6)
GtkUIManager                  :  29% (  5/ 17)
GtkActionGroup                :  55% ( 11/ 20)
GtkAction                     :  93% ( 44/ 47)
GtkToggleAction               : 100% (  6/  6)
GtkRadioAction                : 100% (  5/  5)
GtkRecentAction               :  75% (  3/  4)
GtkActivatable                :  66% (  4/  6)
GtkColorButton                : 100% ( 10/ 10)
GtkColorSelectionDialog       :   0% (  0/  2)
GtkColorSelection             :   0% (  0/ 21)
GtkHSV                        :   0% (  0/  8)
GtkFileChooser                :  27% ( 16/ 58)
GtkFileChooserButton          :  18% (  2/ 11)
GtkFileChooserDialog          : 100% (  1/  1)
GtkFileChooserWidget          :  50% (  1/  2)
GtkFileFilter                 :  55% (  5/  9)
GtkFontButton                 : 100% ( 14/ 14)
GtkFontSelection              :  28% (  4/ 14)
GtkFontSelectionDialog        : 100% (  8/  8)
GtkInputDialog                :   0% (  0/  1)
GtkAlignment                  : 100% (  4/  4)
GtkAspectFrame                :   0% (  0/  2)
GtkHBox                       : 100% (  1/  1)
GtkVBox                       : 100% (  1/  1)
GtkHButtonBox                 :   0% (  0/  5)
GtkVButtonBox                 :   0% (  0/  5)
GtkFixed                      : 100% (  5/  5)
GtkHPaned                     : 100% (  1/  1)
GtkVPaned                     : 100% (  1/  1)
GtkLayout                     : 100% ( 12/ 12)
GtkNotebook                   :  90% ( 50/ 55)
GtkTable                      :  93% ( 14/ 15)
GtkExpander                   :  87% ( 14/ 16)
GtkOrientable                 :   0% (  0/  2)
GtkFrame                      : 100% (  9/  9)
GtkHSeparator                 : 100% (  1/  1)
GtkVSeparator                 : 100% (  1/  1)
GtkScrollbar                  : 100% (  0/  0)
GtkHScrollbar                 : 100% (  1/  1)
GtkVScrollbar                 : 100% (  1/  1)
GtkScrolledWindow             :  86% ( 13/ 15)
GtkPrintOperation             :  13% (  5/ 36)
GtkPrintContext               :  18% (  2/ 11)
GtkPrintSettings              :   0% (  0/ 74)
GtkPageSetup                  :   0% (  0/ 25)
GtkPaperSize                  :   0% (  0/ 21)
GtkPrinter                    :   0% (  0/ 23)
GtkPrintJob                   :   0% (  0/ 10)
GtkPrintUnixDialog            :   0% (  0/ 18)
GtkPageSetupUnixDialog        :   0% (  0/  5)
GtkAdjustment                 :  83% ( 15/ 18)
GtkArrow                      : 100% (  2/  2)
GtkCalendar                   :   0% (  0/ 17)
GtkDrawingArea                : 100% (  2/  2)
GtkEventBox                   :  20% (  1/  5)
GtkHandleBox                  :   0% (  0/  8)
GtkIMContextSimple            :   0% (  0/  2)
GtkIMMulticontext             :   0% (  0/  4)
GtkSizeGroup                  : 100% (  8/  8)
GtkTooltip                    :  60% (  6/ 10)
GtkViewport                   : 100% (  9/  9)
GtkAccessible                 : 100% (  3/  3)
GtkBin                        : 100% (  1/  1)
GtkBox                        : 100% ( 11/ 11)
GtkButtonBox                  :   0% (  0/ 10)
GtkContainer                  :  48% ( 16/ 33)
GtkItem                       : 100% (  3/  3)
GtkMenuShell                  :  27% (  3/ 11)
GtkMisc                       : 100% (  4/  4)
GtkObject                     : 100% (  2/  2)
GtkPaned                      :  88% (  8/  9)
GtkRange                      :  53% ( 16/ 30)
GtkScale                      :  90% (  9/ 10)
GtkSeparator                  : 100% (  0/  0)
GtkWidget                     :  54% (101/187)
GtkIMContext                  :   0% (  0/ 11)
GtkPlug                       :   0% (  0/  7)
GtkSocket                     :   0% (  0/  5)
GtkRecentManager              :   0% (  0/ 37)
GtkRecentChooser              :   0% (  0/ 33)
GtkRecentChooserDialog        :   0% (  0/  2)
GtkRecentChooserMenu          :   0% (  0/  4)
GtkRecentChooserWidget        :   0% (  0/  2)
GtkRecentFilter               :   0% (  0/ 12)
GtkBuildable                  :   0% (  0/ 10)

Total progress :                 48% (1539/3177)

go-gtk's People

Contributors

866 avatar anacrolix avatar andreastt avatar anmitsu avatar boutros avatar chdorner avatar dairyisscary avatar djadala avatar doloopwhile avatar droundy avatar fedesog avatar francesco149 avatar gdm85 avatar hauke96 avatar johnbartholomew avatar lidaobing avatar matiaslina avatar mattn avatar nazgand avatar pebbe avatar pindamonhangaba avatar pztrn avatar salviati avatar sg3des avatar solusipse avatar sqp avatar taruti avatar thesyncim avatar tsu-root avatar tsudoko avatar

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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-gtk's Issues

cannot run example.

Hello, I'm trying to run the example over a Dell netbook i386 with Ubuntu 10.10 and 8g version 6980... when I try to run the Makefile on the demo directory, I get the following error:

root@lgmore-netbook:/home/lgmore/go/pkg/linux_386/mattn-go-gtk-b359f30/example/demo# make
8l -o demo go.8
/home/lgmore/go/pkg/linux_386/gtk.a(gtk.cgo2.o): malformed elf file: reloc of invalid sym shndx=5 type=3
gtk._Cfunc__gtk_text_buffer_delete_selection: _cgo_4306624cfd1b_Cfunc__gtk_text_buffer_delete_selection: not defined
gtk._Cfunc_to_GtkTreeModelFromListStore: _cgo_4306624cfd1b_Cfunc_to_GtkTreeModelFromListStore: not defined
gtk._Cfunc_gtk_list_store_remove: _cgo_4306624cfd1b_Cfunc_gtk_list_store_remove: not defined
gtk._Cfunc_gtk_font_button_set_title: _cgo_4306624cfd1b_Cfunc_gtk_font_button_set_title: not defined
gtk._Cfunc_gtk_font_button_set_use_size: _cgo_4306624cfd1b_Cfunc_gtk_font_button_set_use_size: not defined
gtk._Cfunc_gtk_text_iter_forward_search: _cgo_4306624cfd1b_Cfunc_gtk_text_iter_forward_search: not defined
gtk._Cfunc_gtk_about_dialog_set_authors: _cgo_4306624cfd1b_Cfunc_gtk_about_dialog_set_authors: not defined
gtk._Cfunc_gtk_label_set_justify: _cgo_4306624cfd1b_Cfunc_gtk_label_set_justify: not defined
gtk._Cfunc_gtk_widget_hide_on_delete: _cgo_4306624cfd1b_Cfunc_gtk_widget_hide_on_delete: not defined
gtk._Cfunc_to_GtkScale: _cgo_4306624cfd1b_Cfunc_to_GtkScale: not defined
gtk._Cfunc_gtk_box_set_homogeneous: _cgo_4306624cfd1b_Cfunc_gtk_box_set_homogeneous: not defined
gtk._Cfunc__gtk_text_buffer_get_bounds: _cgo_4306624cfd1b_Cfunc__gtk_text_buffer_get_bounds: not defined
gtk._Cfunc_gtk_about_dialog_new: _cgo_4306624cfd1b_Cfunc_gtk_about_dialog_new: not defined
gtk._Cfunc_gtk_toggle_button_get_active: _cgo_4306624cfd1b_Cfunc_gtk_toggle_button_get_active: not defined
gtk._Cfunc_gtk_statusbar_set_has_resize_grip: _cgo_4306624cfd1b_Cfunc_gtk_statusbar_set_has_resize_grip: not defined
gtk._Cfunc_to_GtkPaned: _cgo_4306624cfd1b_Cfunc_to_GtkPaned: not defined
gtk._Cfunc_to_GtkTextView: _cgo_4306624cfd1b_Cfunc_to_GtkTextView: not defined
gtk._Cfunc_gtk_text_view_get_overwrite: _cgo_4306624cfd1b_Cfunc_gtk_text_view_get_overwrite: not defined
gtk._Cfunc_gtk_menu_new: _cgo_4306624cfd1b_Cfunc_gtk_menu_new: not defined
gtk._Cfunc_gtk_label_get_justify: _cgo_4306624cfd1b_Cfunc_gtk_label_get_justify: not defined
too many errors
make: *** [demo] Error 1
root@lgmore-netbook:/home/lgmore/go/pkg/linux_386/mattn-go-gtk-b359f30/example/demo#

I've been searching around to solve this but I just can't find the error nowhere... Can anybody please help me to solve this??. Thanks in advance.

lg_more

won't compile on amd64

I'm unable to compile go-gtk on ArchLinux amd64 with gtk+ 2.20 and latest go. I get the following error:

CGOPKGPATH= /home/luka/bin/cgo pkg-config --cflags gtk+-2.0 -Duintptr="unsigned int*" gtk.go
gcc failed:
cc1: warnings being treated as errors

:41:12: error: '_callback' used but never defined

go-gtk documentation

Hi,
this is not really an issue. I'd like to add comments, mostly cut&paste from gtk documentation, to gtk.go so I can read how functions work from godoc documentation. Before starting I was wondering if it is better to break gtk.go into smaller files before doing that or just adding to gtk.go even if it will become a huge file.
What do you think?

'make' fails

$ make
cd glib && make
make[1]: Entering directory /home/scott/go/go-gtk/glib' CGOPKGPATH= /usr/local/bin/cgopkg-config --cflags glib-2.0 gobject-2.0glib.go flag provided but not defined: -pthread usage: cgo [compiler options] file.go ... make[1]: *** [_cgo_defun.c] Error 2 make[1]: Leaving directory/home/scott/go/go-gtk/glib'
make: *** [all] Error 2
$ uname -a
Linux jagadai 2.6.32-23-generic #37-Ubuntu SMP Fri Jun 11 08:03:28 UTC 2010 x86_64 GNU/Linux
$ cat /etc/issue
Ubuntu 10.04 LTS \n \l

Example builder fails to compile on Linux 64bits

I installed go-gtk with goinstall today and it failed to build builder example:

make -f Make.cgo
make[1]: Entering directory `/usr/lib/go/src/pkg/github.com/mattn/go-gtk/example/builder'
make[1]: Leaving directory `/usr/lib/go/src/pkg/github.com/mattn/go-gtk/example/builder'
make -f Make.cgo installlocal
make[1]: Entering directory `/usr/lib/go/src/pkg/github.com/mattn/go-gtk/example/builder'
mkdir -p pkg/linux_amd64
cp callback.so pkg/linux_amd64/.
cp _obj/callback.a pkg/linux_amd64/.
make[1]: Leaving directory `/usr/lib/go/src/pkg/github.com/mattn/go-gtk/example/builder'
make -f Make.cmd
make[1]: Entering directory `/usr/lib/go/src/pkg/github.com/mattn/go-gtk/example/builder'
6l -Lpkg/linux_amd64  -o builder _go_.6
6l: _go_.6: not package main (package callback)
runtime.mainstart: undefined: main.main
make[1]: *** [builder] Error 1
make[1]: Leaving directory `/usr/lib/go/src/pkg/github.com/mattn/go-gtk/example/builder'
make: *** [all] Error 2

can't go install on Mac OsX 10.7

I have had go-gtk running in the past using the make file, but know I get an error. What has changed?

The following is the output of: goinstall github.com/mattn/go-gtk/gtk

/bin/bash: === cd /Users/Jim/go/src/pkg/github.com/mattn/go-gtk/glib; bash gomake -f- install
CGOPKGPATH=github.com/mattn/go-gtk cgo --  glib.go 
touch _obj/_cgo_run
6g  -I "/Users/Jim/go/pkg/darwin_amd64"  -p github.com/mattn/go-gtk/glib -o _go_.6  _obj/glib.cgo1.go _obj/_cgo_gotypes.go
open github.com/mattn/go-gtk/glib: No such file or directory
make: *** [_go_.6] Error 1
--- exit status 2
goinstall: github.com/mattn/go-gtk/glib: install: running bash: exit status 2

Got error when making install: No rule to make target "/home/davidhhuan/Go/src/Make.inc"

Hi, after downloaded your code and try to install it:

make install

I got this error: No rule to make target "/home/davidhhuan/Go/src/Make.inc"

My platform is: Ubuntu 10.10-i386

I try to modify your the first line of these files: go-gtk/Makefile, go-gtk/glib/Makefile, go-gtk/gtk/Makefile, go-gtk/gdkpixbuf/Makefile, go-gtk/gdk/Makefile,
From:
include $(GOROOT)/src/Make.inc
To:
include $(GOROOT)/src/Make.386
And then make install, it works!

It is an issue or something else in my platform?

How to retrieve event details in a callback?

Is it possible to get details of an event? I'd like to get the pressed key from a "key-press-event". I see that I can get "something" calling myCallbackContext.Args(n int) but I cannot use it properly.
Thanks

can't make example

I enter "make example" and it gives me the following:

cd glib && gomake install
make[1]: Nothing to be done for install'. cd gdk && gomake install make[1]: Nothing to be done forinstall'.
cd gdkpixbuf && gomake install
make[1]: Nothing to be done for `install'.
cd gtk && gomake install
cd example && gomake
cd demo && gomake
6l -o demo go.6
too many loads
make[2]: *** [demo] Error 1
make[1]: *** [all] Error 2
make: *** [example] Error 2

Will not compile on Snow Leopard Mac

It seems that there are a few places where "uint" was used, and while this seems to work on Linux, Snow Leopard does not find that type. However, these cases are cases where guint is an ideal substitute. The patch below should make it work correctly:

diff --git a/gtk/gtk.go b/gtk/gtk.go
index 738ea28..4d7f323 100644
--- a/gtk/gtk.go
+++ b/gtk/gtk.go
@@ -474,11 +474,11 @@ static GtkTreeViewColumn* _gtk_tree_view_column_new_with_attributes(gchar* title
}

static void _gtk_list_store_set_ptr(GtkListStore* list_store, GtkTreeIter* iter, gint column, void* data) {

  • gtk_list_store_set(list_store, iter, column, (uint*)data, -1);
  • gtk_list_store_set(list_store, iter, column, (guint*)data, -1);
    }

static void _gtk_tree_store_set_ptr(GtkTreeStore* tree_store, GtkTreeIter* iter, gint column, void* data) {

  • gtk_tree_store_set(tree_store, iter, column, (uint*)data, -1);
  • gtk_tree_store_set(tree_store, iter, column, (guint*)data, -1);
    }

static inline GType* make_gtypes(int count) {
@@ -554,7 +554,7 @@ static GtkScale* to_GtkScale(GtkWidget* w) { return GTK_SCALE(w); }
static GtkRange* to_GtkRange(GtkWidget* w) { return GTK_RANGE(w); }
static GtkTreeModel* to_GtkTreeModelFromListStore(GtkListStore* w) { return GTK_TREE_MODEL(w); }
static GtkTreeModel* to_GtkTreeModelFromTreeStore(GtkTreeStore* w) { return GTK_TREE_MODEL(w); }
-//static GType to_GType(uint type) { return (GType)type; }
+//static GType to_GType(guint type) { return (GType)type; }
static GtkImage* to_GtkImage(GtkWidget* w) { return GTK_IMAGE(w); }
static GtkNotebook* to_GtkNotebook(GtkWidget* w) { return GTK_NOTEBOOK(w); }
static GtkTable* to_GtkTable(GtkWidget* w) { return GTK_TABLE(w); }

after go update go-GTk won't install

I updated go and know Go-GTK gives the following errors:

jchristoffs-iMac:go-gtk jim$ make install
cd pango && gomake install
CGOPKGPATH= cgo -- pkg-config --cflags pango pango.go
touch _obj/_cgo_run
6g -o go.6 _obj/pango.cgo1.go _obj/_cgo_gotypes.go
6c -FVw -I/Users/jim/go/pkg/darwin_amd64 -I . -o "_cgo_defun.6" _obj/_cgo_defun.c
gcc -m64 -I . -g -fPIC -O2 -o _cgo_main.o -c pkg-config --cflags pango _obj/_cgo_main.c
gcc -m64 -I . -g -fPIC -O2 -o pango.cgo2.o -c pkg-config --cflags pango _obj/pango.cgo2.c
gcc -m64 -I . -g -fPIC -O2 -o _cgo_export.o -c pkg-config --cflags pango _obj/_cgo_export.c
gcc -m64 -g -fPIC -O2 -o cgo1.o _cgo_main.o pango.cgo2.o _cgo_export.o -lpthread pkg-config --libs pango
ld: warning: in /sw/lib/libpango-1.0.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /sw/lib/libgobject-2.0.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /sw/lib/libgmodule-2.0.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /sw/lib/libglib-2.0.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /sw/lib/libintl.dylib, file was built for i386 which is not the architecture being linked (x86_64)
cgo -dynimport cgo1.o >_obj/cgo_import.c && mv -f _obj/cgo_import.c _obj/_cgo_import.c
6c -FVw -I . -o "_cgo_import.6" _obj/_cgo_import.c
rm -f _obj/pango.a
gopack grc _obj/pango.a go.6 _cgo_defun.6 _cgo_import.6 pango.cgo2.o _cgo_export.o
cp _obj/pango.a "/Users/jim/go/pkg/darwin_amd64/pango.a"
cd glib && gomake install
CGOPKGPATH= cgo -- pkg-config --cflags glib-2.0 gobject-2.0 glib.go
touch _obj/_cgo_run
6g -o go.6 _obj/glib.cgo1.go _obj/_cgo_gotypes.go
6c -FVw -I/Users/jim/go/pkg/darwin_amd64 -I . -o "_cgo_defun.6" _obj/_cgo_defun.c
gcc -m64 -I . -g -fPIC -O2 -o _cgo_main.o -c pkg-config --cflags glib-2.0 gobject-2.0 _obj/_cgo_main.c
gcc -m64 -I . -g -fPIC -O2 -o glib.cgo2.o -c pkg-config --cflags glib-2.0 gobject-2.0 _obj/glib.cgo2.c
gcc -m64 -I . -g -fPIC -O2 -o _cgo_export.o -c pkg-config --cflags glib-2.0 gobject-2.0 _obj/_cgo_export.c
gcc -m64 -g -fPIC -O2 -o cgo1.o _cgo_main.o glib.cgo2.o _cgo_export.o pkg-config --libs glib-2.0 gobject-2.0
ld: warning: in /sw/lib/libgobject-2.0.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /sw/lib/libglib-2.0.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /sw/lib/libintl.dylib, file was built for i386 which is not the architecture being linked (x86_64)
Undefined symbols:
"_g_slist_copy", referenced from:
__cgo_437809274e4f_Cfunc_g_slist_copy in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_slist_copy)
"_g_slist_find", referenced from:
__cgo_437809274e4f_Cfunc_g_slist_find in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_slist_find)
"_g_list_alloc", referenced from:
__cgo_437809274e4f_Cfunc_g_list_alloc in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_list_alloc)
"_g_list_nth", referenced from:
__cgo_437809274e4f_Cfunc_g_list_nth in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_list_nth_prev, __cgo_437809274e4f_Cfunc_g_list_nth_data , __cgo_437809274e4f_Cfunc_g_list_nth )
"_g_value_set_string", referenced from:
__cgo_437809274e4f_Cfunc_init_gvalue_string in glib.cgo2.o
"_g_list_index", referenced from:
__cgo_437809274e4f_Cfunc_g_list_index in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_list_index)
"_g_slist_prepend", referenced from:
__cgo_437809274e4f_Cfunc_g_slist_prepend in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_slist_prepend)
"_g_list_nth_data", referenced from:
__cgo_437809274e4f_Cfunc_g_list_nth_data in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_list_nth_data)
"_g_slist_last", referenced from:
__cgo_437809274e4f_Cfunc_g_slist_last in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_slist_last)
"_g_value_set_uchar", referenced from:
__cgo_437809274e4f_Cfunc_init_gvalue_byte in glib.cgo2.o
"_g_list_free", referenced from:
__cgo_437809274e4f_Cfunc_g_list_free in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_list_free_1, __cgo_437809274e4f_Cfunc_g_list_free )
"_g_slist_insert_before", referenced from:
__cgo_437809274e4f_Cfunc_g_slist_insert_before in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_slist_insert_before)
"_g_list_append", referenced from:
__cgo_437809274e4f_Cfunc_g_list_append in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_list_append)
"_g_value_set_uint", referenced from:
__cgo_437809274e4f_Cfunc_init_gvalue_uint in glib.cgo2.o
"_g_list_copy", referenced from:
__cgo_437809274e4f_Cfunc_g_list_copy in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_list_copy)
"_g_utf8_validate", referenced from:
__cgo_437809274e4f_Cfunc__g_utf8_validate in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc__g_utf8_validate)
"_g_list_find", referenced from:
__cgo_437809274e4f_Cfunc_g_list_find in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_list_find)
"_g_list_insert_before", referenced from:
__cgo_437809274e4f_Cfunc_g_list_insert_before in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_list_insert_before)
"_g_value_get_string", referenced from:
__cgo_437809274e4f_Cfunc_g_value_get_string in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_value_get_string)
"_g_list_last", referenced from:
__cgo_437809274e4f_Cfunc_g_list_last in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_list_last)
"_g_slist_reverse", referenced from:
__cgo_437809274e4f_Cfunc_g_slist_reverse in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_slist_reverse)
"_g_list_first", referenced from:
__cgo_437809274e4f_Cfunc_g_list_first in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_list_first)
"_g_slist_position", referenced from:
__cgo_437809274e4f_Cfunc_g_slist_position in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_slist_position)
"_g_slist_length", referenced from:
__cgo_437809274e4f_Cfunc_g_slist_length in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_slist_length)
"_g_slist_free_1", referenced from:
__cgo_437809274e4f_Cfunc_g_slist_free1 in glib.cgo2.o
"_g_malloc0", referenced from:
__cgo_437809274e4f_Cfunc_init_gvalue_uint in glib.cgo2.o
__cgo_437809274e4f_Cfunc_init_gvalue_string in glib.cgo2.o
__cgo_437809274e4f_Cfunc_init_gvalue_byte in glib.cgo2.o
__cgo_437809274e4f_Cfunc_init_gvalue_bool in glib.cgo2.o
__cgo_437809274e4f_Cfunc_init_gvalue_int in glib.cgo2.o
__cgo_437809274e4f_Cfunc_init_gvalue_double in glib.cgo2.o
"_g_list_insert", referenced from:
__cgo_437809274e4f_Cfunc_g_list_insert in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_list_insert_before, __cgo_437809274e4f_Cfunc_g_list_insert )
"_g_slist_alloc", referenced from:
__cgo_437809274e4f_Cfunc_g_slist_alloc in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_slist_alloc)
"_g_list_remove", referenced from:
__cgo_437809274e4f_Cfunc_g_list_remove in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_list_remove_link, __cgo_437809274e4f_Cfunc_g_list_remove_all , __cgo_437809274e4f_Cfunc_g_list_remove )
"_g_slist_index", referenced from:
__cgo_437809274e4f_Cfunc_g_slist_index in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_slist_index)
"_g_slist_delete_link", referenced from:
__cgo_437809274e4f_Cfunc_g_slist_delete_link in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_slist_delete_link)
"_g_value_set_boolean", referenced from:
__cgo_437809274e4f_Cfunc_init_gvalue_bool in glib.cgo2.o
"_g_value_get_int", referenced from:
__cgo_437809274e4f_Cfunc_g_value_get_int in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_value_get_int)
"_g_list_concat", referenced from:
__cgo_437809274e4f_Cfunc_g_list_concat in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_list_concat)
"_g_list_prepend", referenced from:
__cgo_437809274e4f_Cfunc_g_list_prepend in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_list_prepend)
"_g_object_set_property", referenced from:
__cgo_437809274e4f_Cfunc_g_object_set_property in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_object_set_property)
"_g_slist_nth_data", referenced from:
__cgo_437809274e4f_Cfunc_g_slist_nth_data in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_slist_nth_data)
"_g_object_ref", referenced from:
__cgo_437809274e4f_Cfunc_g_object_ref in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_object_ref)
"_g_slist_append", referenced from:
__cgo_437809274e4f_Cfunc_g_slist_append in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_slist_append)
"_g_list_position", referenced from:
__cgo_437809274e4f_Cfunc_g_list_position in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_list_position)
"_g_list_reverse", referenced from:
__cgo_437809274e4f_Cfunc_g_list_reverse in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_list_reverse)
"_g_list_remove_all", referenced from:
__cgo_437809274e4f_Cfunc_g_list_remove_all in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_list_remove_all)
"_g_list_nth_prev", referenced from:
__cgo_437809274e4f_Cfunc_g_list_nth_prev in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_list_nth_prev)
"_g_list_delete_link", referenced from:
__cgo_437809274e4f_Cfunc_g_list_delete_link in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_list_delete_link)
"_g_list_length", referenced from:
__cgo_437809274e4f_Cfunc_g_list_length in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_list_length)
"_g_type_check_instance_cast", referenced from:
__cgo_437809274e4f_Cfunc_to_GObject in glib.cgo2.o
"_g_slist_nth", referenced from:
__cgo_437809274e4f_Cfunc_g_slist_nth in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_slist_nth, __cgo_437809274e4f_Cfunc_g_slist_nth_data )
"_g_list_free_1", referenced from:
__cgo_437809274e4f_Cfunc_g_list_free_1 in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_list_free_1)
"_g_object_unref", referenced from:
__cgo_437809274e4f_Cfunc_g_object_unref in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_object_unref)
"_g_object_set", referenced from:
__cgo_437809274e4f_Cfunc__g_object_set in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_object_set_property, __cgo_437809274e4f_Cfunc__g_object_set )
"_g_slist_remove_all", referenced from:
__cgo_437809274e4f_Cfunc_g_slist_remove_all in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_slist_remove_all)
"_g_value_init", referenced from:
__cgo_437809274e4f_Cfunc_g_value_init_string in glib.cgo2.o
__cgo_437809274e4f_Cfunc_g_value_init_int in glib.cgo2.o
__cgo_437809274e4f_Cfunc_init_gvalue_uint in glib.cgo2.o
__cgo_437809274e4f_Cfunc_init_gvalue_string in glib.cgo2.o
__cgo_437809274e4f_Cfunc_init_gvalue_byte in glib.cgo2.o
__cgo_437809274e4f_Cfunc_init_gvalue_bool in glib.cgo2.o
__cgo_437809274e4f_Cfunc_init_gvalue_int in glib.cgo2.o
__cgo_437809274e4f_Cfunc_init_gvalue_double in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_value_init_int, __cgo_437809274e4f_Cfunc_g_value_init_string )
"_g_slist_remove", referenced from:
__cgo_437809274e4f_Cfunc_g_slist_remove in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_slist_remove, __cgo_437809274e4f_Cfunc_g_slist_remove_all )
"_g_list_remove_link", referenced from:
__cgo_437809274e4f_Cfunc_g_list_remove_link in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_list_remove_link)
"_g_value_set_int", referenced from:
__cgo_437809274e4f_Cfunc_init_gvalue_int in glib.cgo2.o
"_g_value_set_double", referenced from:
__cgo_437809274e4f_Cfunc_init_gvalue_double in glib.cgo2.o
"_g_slist_free", referenced from:
__cgo_437809274e4f_Cfunc_g_slist_free in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_slist_free1, __cgo_437809274e4f_Cfunc_g_slist_free )
"_g_locale_from_utf8", referenced from:
__cgo_437809274e4f_Cfunc__g_locale_from_utf8 in glib.cgo2.o
__cgo_437809274e4f_Cfunc__g_locale_to_utf8 in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc__g_locale_from_utf8)
"_g_slist_concat", referenced from:
__cgo_437809274e4f_Cfunc_g_slist_concat in glib.cgo2.o
(maybe you meant: __cgo_437809274e4f_Cfunc_g_slist_concat)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [cgo1.o] Error 1
make: *** [install] Error 2

Panic: Runtime Error when running Examples

Hi,

I can't run the examples (demo or twitter). I get the following (from the demo app)...

panic: runtime error: invalid memory address or nil pointer dereference

panic PC=0x99777a64
runtime.panic+0x97 /home/dave/Go/gosource/src/pkg/runtime/proc.c:1011
runtime.panic(0x0, 0x80c1f94)
panicstring+0x5e /home/dave/Go/gosource/src/pkg/runtime/runtime.c:83
panicstring(0x80c1f94, 0x9976d5d0)
sigpanic+0x8f /home/dave/Go/gosource/src/pkg/runtime/linux/thread.c:285
sigpanic()
gtk.pollEvents+0x4a /home/dave/Go/go-gtk/gtk/gtk.cgo1.go:3079
gtk.pollEvents()
gtk.Main+0x3a /home/dave/Go/go-gtk/gtk/gtk.cgo1.go:3119
gtk.Main()
main.main+0x1474 /home/dave/Go/go-gtk/example/demo/demo.go:226
main.main()
mainstart+0xf /home/dave/Go/gosource/src/pkg/runtime/386/asm.s:83
mainstart()
goexit /home/dave/Go/gosource/src/pkg/runtime/proc.c:145
goexit()

I haven't got a clue where to start with this issue. Any ideas?

Many thanks,
Dave

Example/thread strange error.

It's difficult to produce the error.
it happened when I maximum the window then close it.
It only happen occasionally.
One case is:
I'm in the example folder //I can reproduce error in this folder. but can't in the parent folder.
I first run ./demo/demo.exe then close it.
then run ./thread/thread.exe the maximum it then close it.
It'll display infinity errors like this.

$ ./thread/threads.exe

(threads.exe:4880): GLib-GObject-WARNING **: invalid uninstantiatable type <invalid>' in cast toGtkLabel'

(threads.exe:4880): Gtk-CRITICAL **: gtk_label_set_text: assertion `GTK_IS_LABEL (label)' failed

(threads.exe:4880): GLib-GObject-WARNING **: invalid uninstantiatable type <invalid>' in cast toGtkLabel'

(threads.exe:4880): Gtk-CRITICAL **: gtk_label_set_text: assertion `GTK_IS_LABEL (label)' failed

(threads.exe:4880): GLib-GObject-WARNING **: invalid uninstantiatable type <invalid>' in cast toGtkLabel'

(threads.exe:4880): Gtk-CRITICAL **: gtk_label_set_text: assertion `GTK_IS_LABEL (label)' failed

(threads.exe:4880): GLib-GObject-WARNING **: invalid uninstantiatable type <invalid>' in cast toGtkLabel'

(threads.exe:4880): Gtk-CRITICAL **: gtk_label_set_text: assertion `GTK_IS_LABEL (label)' failed

(threads.exe:4880): GLib-GObject-WARNING **: invalid uninstantiatable type <invalid>' in cast toGtkLabel'

(threads.exe:4880): Gtk-CRITICAL **: gtk_label_set_text: assertion `GTK_IS_LABEL (label)' failed


platform:
win7
8g version weekly.2011-06-16 8787
go-gtk commit 566d966
gtk+-2.22.1
Thanks.

Can't make example

I tried rev.

commit 570c18e
Author: Mark Andrew Gerads [email protected]
Date: Thu Dec 16 04:34:05 2010 -0600

most of GList

I did make example and got this:

make[3]: Entering directory /media/joker/dev/work/golang/go-gtk/example/builder' CGOPKGPATH= cgo -- callback.go 8g -o _go_.8 callback.cgo1.go _cgo_gotypes.go 8c -FVw -I/media/joker/dev/work/golang/go/go/pkg/linux_386 -I"/media/joker/dev/work/golang/go/go/src/pkg/runtime" _cgo_defun.c gcc -m32 -g -fPIC -O2 -o _cgo_main.o -c _cgo_main.c gcc -m32 -g -fPIC -O2 -o callback.cgo2.o -c callback.cgo2.c gcc -m32 -g -fPIC -O2 -o _cgo_export.o -c _cgo_export.c gcc -m32 -g -fPIC -O2 -o _cgo1_.o _cgo_main.o callback.cgo2.o _cgo_export.o _cgo_export.o -Wl,-Rpwd _cgo_export.o: In functionon_imagemenuitem1_activate':
/media/joker/dev/work/golang/go-gtk/example/builder/_cgo_export.c:6: multiple definition of on_imagemenuitem1_activate' _cgo_export.o:/media/joker/dev/work/golang/go-gtk/example/builder/_cgo_export.c:6: first defined here collect2: ld returned 1 exit status make[3]: **\* [_cgo1_.o] Error 1 make[3]: Leaving directory /media/joker/dev/work/golang/go-gtk/example/builder'
make[2]: *** [all] Error 2
make[2]: Leaving directory/media/joker/dev/work/golang/go-gtk/example/builder' make[1]: **\* [all] Error 2 make[1]: Leaving directory /media/joker/dev/work/golang/go-gtk/example'
make: *** [example] Error 2

Regards

example 'twitter' don't do asynchronous.

report from krutcha:

Window hangs until all updates are complete, then refreshes (under ubuntu, this caused the window to go dark for a moment). Previously it updated as messages came in.

won't install

I used the read.md instructions and gomake install yields the following message:

James-Christoffs-iMac:~ Jim$ cd go-gtk
James-Christoffs-iMac:go-gtk Jim$ gomake install
cd pango && gomake install
CGOPKGPATH=github.com/mattn/go-gtk cgo -- pango.go
touch _obj/_cgo_run
6g -o go.6 _obj/pango.cgo1.go _obj/_cgo_gotypes.go
6c -FVw -I/Users/Jim/go/pkg/darwin_amd64 -I . -o "_cgo_defun.6" _obj/_cgo_defun.c
gcc -m64 -I . -g -fPIC -O2 -o _cgo_main.o -c -D_REENTRANT -I/opt/local/include/pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include _obj/_cgo_main.c
gcc -m64 -I . -g -fPIC -O2 -o pango.cgo2.o -c -D_REENTRANT -I/opt/local/include/pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include _obj/pango.cgo2.c
gcc -m64 -I . -g -fPIC -O2 -o _cgo_export.o -c -D_REENTRANT -I/opt/local/include/pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include _obj/_cgo_export.c
gcc -m64 -g -fPIC -O2 -o cgo1.o _cgo_main.o pango.cgo2.o _cgo_export.o -L/opt/local/lib -lpango-1.0 -lm -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lintl
cgo -dynimport cgo1.o >_obj/cgo_import.c && mv -f _obj/cgo_import.c _obj/_cgo_import.c
6c -FVw -I . -o "_cgo_import.6" _obj/_cgo_import.c
rm -f _obj/github.com/mattn/go-gtk/pango.a
gopack grc _obj/github.com/mattn/go-gtk/pango.a go.6 _cgo_defun.6 _cgo_import.6 pango.cgo2.o _cgo_export.o
cp _obj/github.com/mattn/go-gtk/pango.a "/Users/Jim/go/pkg/darwin_amd64/github.com/mattn/go-gtk/pango.a"
cd glib && gomake install
CGOPKGPATH=github.com/mattn/go-gtk cgo -- glib.go
touch _obj/_cgo_run
6g -o go.6 _obj/glib.cgo1.go _obj/_cgo_gotypes.go
6c -FVw -I/Users/Jim/go/pkg/darwin_amd64 -I . -o "_cgo_defun.6" _obj/_cgo_defun.c
gcc -m64 -I . -g -fPIC -O2 -o _cgo_main.o -c -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include _obj/_cgo_main.c
gcc -m64 -I . -g -fPIC -O2 -o glib.cgo2.o -c -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include _obj/glib.cgo2.c
gcc -m64 -I . -g -fPIC -O2 -o _cgo_export.o -c -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include _obj/_cgo_export.c
gcc -m64 -g -fPIC -O2 -o cgo1.o _cgo_main.o glib.cgo2.o _cgo_export.o -L/opt/local/lib -lgobject-2.0 -lgthread-2.0 -lglib-2.0 -lintl
cgo -dynimport cgo1.o >_obj/cgo_import.c && mv -f _obj/cgo_import.c _obj/_cgo_import.c
6c -FVw -I . -o "_cgo_import.6" _obj/_cgo_import.c
rm -f _obj/github.com/mattn/go-gtk/glib.a
gopack grc _obj/github.com/mattn/go-gtk/glib.a go.6 _cgo_defun.6 _cgo_import.6 glib.cgo2.o _cgo_export.o
cp _obj/github.com/mattn/go-gtk/glib.a "/Users/Jim/go/pkg/darwin_amd64/github.com/mattn/go-gtk/glib.a"
cd gdk && gomake install
CGOPKGPATH=github.com/mattn/go-gtk cgo -- gdk.go
Package gdk-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gdk-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gdk-2.0' found
gdk.go: bad #cgo option pkg-config: pkg-config failed
make[1]: *** [_obj/_cgo_run] Error 2
make: *** [install] Error 2

I am have aImac OSX 10.7

Building does not work as described

The building process does not work as gomake is currently not supported and there is no %(GOROOT)/src/Make.inc cannot be found (is not present).

I was using the standard go package from archlinux version 1.

Please update the documentation and make scripts.

Alignment

I am unable to use something similar to gtk_alignment_new. Am I simply misunderstanding something?

make install fails

Hallo.

I've got the follwoing problem:

$ mogoh@annalee:~/daten/sourcecode/go-gtk$ make install
cd glib && gomake install
make[1]: Entering directory /mnt/sda6/daten/sourcecode/go-gtk/glib' /home/mogoh/daten/sourcecode/go/src/Make.pkg:123: _cgo_flags: No such file or directory 8g -o _go_.8 glib.cgo1.go _cgo_gotypes.go open glib.cgo1.go: No such file or directory make[1]: *** [_go_.8] Error 1 make[1]: Leaving directory/mnt/sda6/daten/sourcecode/go-gtk/glib'
make: *** [install] Fehler 2

I'm using latest releases and I'm not sure if it's a bug or if I'm doing somthing wrong.

`make example` fails

cd gtk && gomake install
make[1]: Entering directory /home/ruslan/go-gtk/gtk' /home/ruslan/go/src/Make.pkg:123: _cgo_flags: No such file or directory 8g -I ../glib/_obj -I ../gdk/_obj -I ../gdkpixbuf/_obj -o _go_.8 gtk.cgo1.go _cgo_gotypes.go open gtk.cgo1.go: No such file or directory make[1]: *** [_go_.8] Error 1 make[1]: Leaving directory/home/ruslan/go-gtk/gtk'
make: *** [install] Error 2

and I did hg pull&&hg update for go, so it's not release

Build instructions for go-gtk on windows?

I have MinGW environment located at C:\MinGW.
I have go freshly pulled (but at Rev 7300) located at C:\MinGW\go (in MSYS /C/MinGW/go).
I can build go without problems and make small go sample programs with no problem.
I pulled a fresh copy of go-gtk into: C:\MinGW\go-gtk.
I downloaded and unziped gtk+ 2.22 from gtk.org (the bundled one) and put it at: C:\MinGW\gtk+. I put C:\MinGW\gtk+\bin into my PATH (I have tried this in the usual place in System Properties and also from the batch file that starts MSYS).

In MSYS I enter pkg-config --cflags gtk+-2.0 and I get:
$ pkg-config --cflags gtk+-2.0
-mms-bitfields -Ic:/mingw/gtk+/include/gtk-2.0 -Ic:/mingw/gtk+/lib/gtk-2.0/inclu
de -Ic:/mingw/gtk+/include/atk-1.0 -Ic:/mingw/gtk+/include/cairo -Ic:/mingw/gtk+
/include/gdk-pixbuf-2.0 -Ic:/mingw/gtk+/include/pango-1.0 -Ic:/mingw/gtk+/includ
e/glib-2.0 -Ic:/mingw/gtk+/lib/glib-2.0/include -Ic:/mingw/gtk+/include -Ic:/min
gw/gtk+/include/freetype2 -Ic:/mingw/gtk+/include/libpng14

$ cd /C/MinGW/go-gtk

$ mingw32-make
cd glib && gomake
make[1]: Entering directory /mingw/go-gtk/glib' CGOPKGPATH= cgo --pkg-config --cflags glib-2.0 gobject-2.0glib.go wait: The parameter is incorrect. make[1]: *** [_cgo_defun.c] Error 2 make[1]: Leaving directory/mingw/go-gtk/glib'
mingw32-make: *** [all] Error 2

Can you see any reason that this is not working? I'm not very familiar with mingw/msys but I have reviewed my steps several times and do not see what I could have missed.

GtkScale in the demo Example cause error in Windows.

whenever drag the bar,It'll exit, the output is:

$ ./example/demo/demo.exe

(demo.exe:3556): Pango-WARNING **: couldn't load font "DejaVu Serif Not-Rotated
15", falling back to "Sans Not-Rotated 15", expect ugly output.
scale: unexpected fault address 0x3ff00000
throw: fault

[signal 0xc0000005 code=0x0 addr=0x3ff00000 pc=0x3ff00000]

runtime.throw+0x42 /MinGW/msys/1.0/extra/go/src/pkg/runtime/runtime.c:102
runtime.throw(0x5b6994, 0x3ff00000)
runtime.sigpanic+0xb8 /MinGW/msys/1.0/extra/go/src/pkg/runtime/windows/thread.c:
277
runtime.sigpanic()
----- goroutine created by -----
_rt0_386+0xbf 386/asm.s:80

-----env-----------------------------------------------------
8g version weekly.2011-06-16 8787
win7
gtk+-bundle_2.22.1-20101227_win32
go-gtk: commit 9e93752
Thanks~

crash using glib.GValue

If I read values in a GtkTreeModel in a loop reusing the same GValue the application crashes.
Workaround: use a new GValue each time

Here is the code

package main

import (
"os"
"gtk"
"strconv"
"glib"
"fmt"
)

var store *gtk.GtkTreeStore

func main() {
gtk.Init(&os.Args)
window := gtk.Window(gtk.GTK_WINDOW_TOPLEVEL)
window.SetTitle("GTK Folder View")
window.Connect("destroy", func() {
    gtk.MainQuit()
},
    nil)

swin := gtk.ScrolledWindow(nil, nil)

store = gtk.TreeStore(gtk.TYPE_STRING)
treeview := gtk.TreeView()
swin.Add(treeview)

treeview.SetModel(store.ToTreeModel())
treeview.AppendColumn(gtk.TreeViewColumnWithAttributes("string", gtk.CellRendererText(), "text", 0))    
//populate tree
var iter1, iter2 gtk.GtkTreeIter
store.Append(&iter1, nil)
store.Set(&iter1, "testing")
for i := 0; i < 10; i ++ {
    store.Append(&iter2, &iter1)
    store.Set(&iter2, "testing"+strconv.Itoa(i))
}

//print tree
var iter3, iter4 gtk.GtkTreeIter
var value glib.GValue //CRASH RELATED
store.ToTreeModel().GetIterFirst(&iter3)
store.ToTreeModel().IterChildren(&iter4, &iter3)
for {
    //var value glib.GValue // With a new GValue each time there is no crash
    store.ToTreeModel().GetValue(&iter4, 0, &value)
    fmt.Println(value.GetString())
    if !store.ToTreeModel().IterNext(&iter4) { //finito e non trovato
        break
    }
}

window.Add(swin)
window.SetSizeRequest(400, 200)
window.ShowAll()

gtk.Main()
}

and here is the crash log

(treeview2:19600): GLib-GObject-WARNING **: /build/buildd/glib2.0-2.26.0/gobject/gvalue.c:184: cannot initialize GValue with type `gchararray', the value has already been initialized as `gchararray'
*** glibc detected *** ./treeview2: double free or corruption (fasttop): 0x00000000027d2bd0 ***
======= Backtrace: =========
/lib/libc.so.6(+0x774b6)[0x7fbaa1e664b6]
/lib/libc.so.6(cfree+0x73)[0x7fbaa1e6cc83]
./treeview2[0x40207e]
======= Memory map: ========
00400000-0059d000 r-xp 00000000 08:01 4587845                            /home/sgh/dev/golide/gtk-examples/treeview2
"many more similar lines"

goroutine 1 [3]:
runtime.entersyscall+0x28 /home/sgh/bin/go/src/pkg/runtime/proc.c:577
runtime.entersyscall()
runtime.cgocall+0xb1 /home/sgh/bin/go/src/pkg/runtime/cgocall.c:41
runtime.cgocall(0x42b463, 0xf840005f80, 0xf840017720, 0x42ab43)
glib._Cfunc_free_string+0x2f /home/sgh/dev/go-gtk/go-gtk/glib/_cgo_defun.c:-423
glib._Cfunc_free_string(0x27d2bd0, 0x0)
glib.*GValue·GetString+0x95 /home/sgh/dev/go-gtk/go-gtk/glib/glib.cgo1.go:-313
glib.*GValue·GetString(0xf840044f20, 0x0, 0xf800000000, 0xf840044f20)
main.readtree+0x124 /home/sgh/dev/golide/gtk-examples/treeview2.go:59
main.readtree()
main.main+0x2b6 /home/sgh/dev/golide/gtk-examples/treeview2.go:33
main.main()
runtime.mainstart+0xf /home/sgh/bin/go/src/pkg/runtime/amd64/asm.s:77
runtime.mainstart()
runtime.goexit /home/sgh/bin/go/src/pkg/runtime/proc.c:149
runtime.goexit()
rax     0x0
rbx     0x400
rcx     0xffffffffffffffff
rdx     0x6
rdi     0x4c90
rsi     0x4c90
rbp     0x7ffff2202920
rsp     0x7ffff2201ed8
r8      0x7fbaa1f2ffe0
r9      0x7fbaa560b168
r10     0x8
r11     0x206
r12     0x7
r13     0x7ffff2202200
r14     0x60
r15     0x7
rip     0x7fbaa1e22ba5
rflags  0x206
cs      0x33
fs      0x0
gs      0x0
Trace/breakpoint trap'

Cannot compile examples.

Hi,

I tried to compile examples on release.r57.1, but it could not.
I got a error message as follows.

$ cd $GOROOT/src/pkg/github.com/mattn/go-gtk/example/
$ cd demo && gomake
6g  -o _go_.6 demo.go 
6l  -o demo _go_.6
MACHORESERVE too small: 3608 > 3072
make[1]: *** [demo] Error 1
make: *** [all] Error 2

My environment is as follows.

$ 6g -V
6g version release.r57.1 8294
$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.6.7
BuildVersion:   10J869

twitter example panicking

When running the twitter example, I see random panics occur.


chad@chad-macbookpro:~/go-gtk/example/twitter$ ./twitter

(twitter:3570): Pango-WARNING *: Invalid UTF-8 string passed to pango_layout_set_text()
*
* glibc detected *** ./twitter: corrupted double-linked list: 0x095e9538 ***
======= Backtrace: =========
/lib/libc.so.6(+0x6c501)[0xb74c7501]
/lib/libc.so.6(+0x6c95a)[0xb74c795a]
/lib/libc.so.6(+0x6ea85)[0xb74c9a85]
/lib/libc.so.6(__libc_calloc+0xb2)[0xb74cb682]
/lib/libglib-2.0.so.0(g_malloc0+0x3c)[0xb763e5fc]
/usr/lib/libpango-1.0.so.0(pango_coverage_new+0x38)[0xb6d3ca68]
/usr/lib/libpangoft2-1.0.so.0(+0x71b9)[0xb6e6d1b9]
/usr/lib/libpangoft2-1.0.so.0(+0x7437)[0xb6e6d437]
/usr/lib/libpangoft2-1.0.so.0(+0x60fb)[0xb6e6c0fb]
/usr/lib/libpango-1.0.so.0(pango_font_get_coverage+0x28)[0xb6d32b78]
/usr/lib/libpango-1.0.so.0(+0x1756c)[0xb6d3d56c]
/usr/lib/libpango-1.0.so.0(+0x17533)[0xb6d3d533]
/usr/lib/libpango-1.0.so.0(+0x14883)[0xb6d3a883]
/usr/lib/libpangoft2-1.0.so.0(+0x9531)[0xb6e6f531]
/usr/lib/libpango-1.0.so.0(pango_fontset_foreach+0x93)[0xb6d3e1e3]
/usr/lib/libpango-1.0.so.0(+0x149d2)[0xb6d3a9d2]
/usr/lib/libpango-1.0.so.0(+0x1507e)[0xb6d3b07e]
/usr/lib/libpango-1.0.so.0(pango_itemize_with_base_dir+0xa7)[0xb6d3b6d7]
/usr/lib/libpango-1.0.so.0(+0x1e3ad)[0xb6d443ad]
/usr/lib/libpango-1.0.so.0(+0x1fa0d)[0xb6d45a0d]
/usr/lib/libgtk-x11-2.0.so.0(gtk_text_layout_get_line_display+0x663)[0xb7216573]
/usr/lib/libgtk-x11-2.0.so.0(+0x1ef4a2)[0xb721a4a2]
/usr/lib/libgtk-x11-2.0.so.0(gtk_text_layout_wrap+0x1f)[0xb72148df]
/usr/lib/libgtk-x11-2.0.so.0(+0x1cc698)[0xb71f7698]
/usr/lib/libgtk-x11-2.0.so.0(gtk_text_layout_validate_yrange+0x239)[0xb7219119]
/usr/lib/libgtk-x11-2.0.so.0(+0x1fabf9)[0xb7225bf9]
/usr/lib/libgtk-x11-2.0.so.0(+0x1fc3ab)[0xb72273ab]
/usr/lib/libgtk-x11-2.0.so.0(+0x1fc3fe)[0xb72273fe]
/usr/lib/libgdk-x11-2.0.so.0(+0x14998)[0xb6fa8998]
/lib/libglib-2.0.so.0(+0x3b841)[0xb7633841]
/lib/libglib-2.0.so.0(g_main_context_dispatch+0x1d5)[0xb7635855]
/lib/libglib-2.0.so.0(+0x41668)[0xb7639668]
/lib/libglib-2.0.so.0(g_main_context_iteration+0x68)[0xb7639848]
/usr/lib/libgtk-x11-2.0.so.0(gtk_main_iteration_do+0x33)[0xb7159fc3]
/home/chad/go/pkg/linux_386/cgo_gtk.so(_cgo_Cfunc_gtk_main_iteration_do+0x24)[0xb774f354]
./twitter[0x804a38b]
======= Memory map: ========
08048000-082ef000 r-xp 00000000 08:03 397228 /home/chad/go-gtk/example/twitter/twitter
082ef000-082f1000 rw-p 002a7000 08:03 397228 /home/chad/go-gtk/example/twitter/twitter
082f1000-08304000 rw-p 00000000 00:00 0
09486000-0960a000 rw-p 00000000 00:00 0 [heap]
b4600000-b4621000 rw-p 00000000 00:00 0
b4621000-b4700000 ---p 00000000 00:00 0
b473f000-b4759000 r-xp 00000000 08:03 1310799 /lib/libgcc_s.so.1
b4759000-b475a000 r--p 00019000 08:03 1310799 /lib/libgcc_s.so.1
b475a000-b475b000 rw-p 0001a000 08:03 1310799 /lib/libgcc_s.so.1
b476f000-b498b000 r--p 00000000 08:03 1574855 /usr/share/fonts/truetype/unfonts/UnDotum.ttf
b498b000-b4f7e000 r--p 00000000 08:03 1317836 /usr/share/fonts/truetype/takao/TakaoPGothic.ttf
b4f7e000-b4fde000 rw-s 00000000 00:04 9469968 /SYSV00000000 (deleted)
b4fde000-b4ffd000 r-xp 00000000 08:03 789826 /usr/lib/libjpeg.so.62.0.0
b4ffd000-b4ffe000 r--p 0001e000 08:03 789826 /usr/lib/libjpeg.so.62.0.0
b4ffe000-b4fff000 rw-p 0001f000 08:03 789826 /usr/lib/libjpeg.so.62.0.0
b500c000-b5010000 r-xp 00000000 08:03 792832 /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so
b5010000-b5011000 r--p 00003000 08:03 792832 /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so
b5011000-b5012000 rw-p 00004000 08:03 792832 /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so
b5012000-b5013000 r--p 00000000 08:03 1322910 /usr/share/locale-langpack/en_CA/LC_MESSAGES/gdk-pixbuf.mo
b5013000-b5114000 rwxp 00000000 00:00 0
b5114000-b5115000 ---p 00000000 00:00 0
b5115000-b59e5000 rwxp 00000000 00:00 0
b59e5000-b59e6000 ---p 00000000 00:00 0
b59e6000-b61e6000 rwxp 00000000 00:00 0
b61e6000-b61e8000 r-xp 00000000 08:03 1313955 /lib/libutil-2.12.1.so
b61e8000-b61e9000 r--p 00001000 08:03 1313955 /lib/libutil-2.12.1.so
b61e9000-b61ea000 rw-p 00002000 08:03 1313955 /lib/libutil-2.12.1.so
b61ea000-b61f4000 r-xp 00000000 08:03 1312552 /lib/libudev.so.0.9.1
b61f4000-b61f5000 r--p 00009000 08:03 1312552 /lib/libudev.so.0.9.1
b61f5000-b61f6000 rw-p 0000a000 08:03 1312552 /lib/libudev.so.0.9.1
b61f6000-b6209000 r-xp 00000000 08:03 788567 /usr/lib/libgvfscommon.so.0.0.0
b6209000-b620a000 r--p 00012000 08:03 788567 /usr/lib/libgvfscommon.so.0.0.0
b620a000-b620b000 rw-p 00013000 08:03 788567 /usr/lib/libgvfscommon.so.0.0.0
b620b000-b622e000 r-xp 00000000 08:03 788592 /usr/lib/gio/modules/libgvfsdbus.so
b622e000-b622f000 r--p 00022000 08:03 788592 /usr/lib/gio/modules/libgvfsdbus.so
b622f000-b6230000 rw-p 00023000 08:03 788592 /usr/lib/gio/modules/libgvfsdbus.so
b6230000-b626a000 r-xp 00000000 08:03 788104 /usr/lib/libibus.so.2.0.0
b626a000-b626b000 r--p 00039000 08:03 788104 /usr/lib/libibus.so.2.0.0
b626b000-b626c000 rw-p 0003a000 08:03 788104 /usr/lib/libibus.so.2.0.0
b626c000-b62a6000 r-xp 00000000 08:03 1310777 /lib/libdbus-1.so.3.5.2
b62a6000-b62a7000 r--p 00039000 08:03 1310777 /lib/libdbus-1.so.3.5.2
b62a7000-b62a8000 rw-p 0003a000 08:03 1310777 /lib/libdbus-1.so.3.5.2
b62ad000-b62b1000 r-xp 00000000 08:03 792830 /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jpeg.so
b62b1000-b62b2000 r--p 00003000 08:03 792830 /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jpeg.so
b62b2000-b62b3000 rw-p 00004000 08:03 792830 /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jpeg.so
b62b3000-b62bc000 rwxp 00000000 00:00 0
b62bc000-b62c0000 r-xp 00000000 08:03 786988 /usr/lib/gtk-2.0/2.10.0/immodules/im-ibus.so
b62c0000-b62c1000 r--p 00003000 08:03 786988 /usr/lib/gtk-2.0/2.10.0/immodules/im-ibus.so
b62c1000-b62c2000 rw-p 00004000 08:03 786988 /usr/lib/gtk-2.0/2.10.0/immodules/im-ibus.so
b62c2000-b62c4000 r-xp 00000000 08:03 808326 /usr/lib/pango/1.6.0/modules/pango-basic-fc.so
b62c4000-b62c5000 r--p 00001000 08:03 808326 /usr/lib/pango/1.6.0/modules/pango-basic-fc.so
b62c5000-b62c6000 rw-p 00002000 08:03 808326 /usr/lib/pango/1.6.0/modules/pango-basic-fc.so
b62c6000-b62c7000 r--p 00000000 08:03 1322923 /usr/share/locale-langpack/en_CA/LC_MESSAGES/glib20.mo
b62c7000-b6315000 r--p 00000000 08:03 1574852 /usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf
b6315000-b6316000 r--s 00000000 08:03 137336 /var/cache/fontconfig/c05880de57d1f5e948fdfacc138775d9-le32d4.cache-3
b6316000-b631c000 r--s 00000000 08:03 137333 /var/cache/fontconfig/945677eb7aeaf62f1d50efc3fb3ec7d8-le32d4.cache-3
b631c000-b631e000 r--s 00000000 08:03 137334 /var/cache/fontconfig/99e8ed0e538f840c565b6ed5dad60d56-le32d4.cache-3
b631e000-b6321000 r--s 00000000 08:03 137343 /var/cache/fontconfig/e383d7ea5fbe662a33d9b44caf393297-le32d4.cache-3
b6321000-b6323000 r--s 00000000 08:03 137322 /var/cache/fontconfig/2cd17615ca594fa2959ae173292e504c-le32d4.cache-3
b6323000-b6324000 r--s 00000000 08:03 137344 /var/cache/fontconfig/e7071f4a29fa870f4323321c154eba04-le32d4.cache-3
b6324000-b6327000 r--s 00000000 08:03 137330 /var/cache/fontconfig/6eb3985aa4124903f6ff08ba781cd364-le32d4.cache-3
b6327000-b6328000 r--s 00000000 08:03 137326 /var/cache/fontconfig/4c73fe0c47614734b17d736dbde7580a-le32d4.cache-3
b6328000-b6329000 r--s 00000000 08:03 137319 /var/cache/fontconfig/0d8c3b2ac0904cb8a57a757ad11a4a08-le32d4.cache-3
b6329000-b632a000 r--s 00000000 08:03 137328 /var/cache/fontconfig/6a53c69dea097a2d716e069445527da8-le32d4.cache-3
b632a000-b632e000 r--s 00000000 08:03 137335 /var/cache/fontconfig/a755afe4a08bf5b97852ceb7400b47bc-le32d4.cache-3
b632e000-b6335000 r--s 00000000 08:03 144913 /var/cache/fontconfig/6d41288fd70b0be22e8c3a91e032eec0-le32d4.cache-3
b6335000-b6340000 r--s 00000000 08:03 137320 /var/cache/fontconfig/0f34bcd4b6ee430af32735b75db7f02b-le32d4.cache-3
b6340000-b6343000 r--s 00000000 08:03 137340 /var/cache/fontconfig/d60319d88cac85ba9e1a07bd06cfbb8c-le32d4.cache-3
b6343000-b6344000 r--s 00000000 08:03 137324 /var/cache/fontconfig/4794a0821666d79190d59a36cb4f44b5-le32d4.cache-3
b6344000-b6366000 r--s 00000000 08:03 144863 /var/cache/fontconfig/365b55f210c0a22e9a19e35191240f32-le32d4.cache-3
b6366000-b636e000 r--s 00000000 08:03 137339 /var/cache/fontconfig/d52a8644073d54c13679302ca1180695-le32d4.cache-3
b636e000-b639b000 r-xp 00000000 08:03 793382 /usr/lib/gtk-2.0/2.10.0/engines/libmurrine.so
b639b000-b639c000 r--p 0002c000 08:03 793382 /usr/lib/gtk-2.0/2.10.0/engines/libmurrine.so
b639c000-b639d000 rw-p 0002d000 08:03 793382 /usr/lib/gtk-2.0/2.10.0/engines/libmurrine.soSIGABRT: abort
PC=0xb7760424

goroutine 4 [4]:
runtime.gosched+0x75 /home/chad/go/src/pkg/runtime/proc.c:548
runtime.gosched()
runfinq+0x4e /home/chad/go/src/pkg/runtime/mgc0.c:429
runfinq()
runtime.goexit /home/chad/go/src/pkg/runtime/proc.c:146
runtime.goexit()

goroutine 3 [3]:
runtime.entersyscall+0x25 /home/chad/go/src/pkg/runtime/proc.c:567
runtime.entersyscall()
syscall.Syscall6+0x5 /home/chad/go/src/pkg/syscall/asm_linux_386.s:39
syscall.Syscall6()
syscall.EpollWait+0x74 /home/chad/go/src/pkg/syscall/zsyscall_linux_386.go:188
syscall.EpollWait(0xb, 0xb507ea10, 0x1, 0x1, 0xce6, ...)
net._pollster·WaitFD+0x134 /home/chad/go/src/pkg/net/fd_linux.go:116
net._pollster·WaitFD(0xb678da38, 0xc4c419d0, 0x0, 0x64, 0x0, ...)
net._pollServer·Run+0xcb /home/chad/go/src/pkg/net/fd.go:207
net._pollServer·Run(0xb67b8b80, 0x0)
runtime.goexit /home/chad/go/src/pkg/runtime/proc.c:146
runtime.goexit()

goroutine 2 [4]:
runtime.gosched+0x75 /home/chad/go/src/pkg/runtime/proc.c:548
runtime.gosched()
runtime.chanrecv+0x165 /home/chad/go/src/pkg/runtime/chan.c:364
runtime.chanrecv(0xb67abb40, 0xb504ff54, 0x0, 0x7d0)
runtime.chanrecv1+0x37 /home/chad/go/src/pkg/runtime/chan.c:444
runtime.chanrecv1(0xb67abb40, 0xb506e280)
net._pollServer·WaitRead+0x50 /home/chad/go/src/pkg/net/fd.go:247
net._pollServer·WaitRead(0xb67b8b80, 0xb506e280, 0x7d0)
net._netFD·Read+0x1c1 /home/chad/go/src/pkg/net/fd.go:354
net._netFD·Read(0xb506e280, 0xb507b000, 0x7d0, 0x7d0, 0x0, ...)
net._UDPConn·Read+0x6f /home/chad/go/src/pkg/net/udpsock.go:90
net._UDPConn·Read(0xb507d730, 0xb507b000, 0x7d0, 0x7d0, 0x0, ...)
net.exchange+0x348 /home/chad/go/src/pkg/net/dnsclient.go:75
net.exchange(0xb680be70, 0xb67abc80, 0xb507d730, 0xb507e750, 0xc, ...)
net.tryOneName+0x1ec /home/chad/go/src/pkg/net/dnsclient.go:165
net.tryOneName(0xb680be70, 0xb507e750, 0xc, 0x80f0001, 0x0, ...)
net.lookup+0x459 /home/chad/go/src/pkg/net/dnsclient.go:262
net.lookup(0xb507c760, 0xb, 0x1, 0x0, 0x0, ...)
net.LookupHost+0xe7 /home/chad/go/src/pkg/net/dnsclient.go:314
net.LookupHost(0xb507c760, 0xb, 0x0, 0x0, 0x0, ...)
net.hostPortToIP+0x116 /home/chad/go/src/pkg/net/ipsock.go:206
net.hostPortToIP(0x80f7ff8, 0x3, 0xb507c760, 0x10, 0x0, ...)
net.ResolveTCPAddr+0x39 /home/chad/go/src/pkg/net/tcpsock.go:66
net.ResolveTCPAddr(0xb507c760, 0x10, 0x80f7ff8, 0x3)
net.Dial+0x477 /home/chad/go/src/pkg/net/dial.go:36
net.Dial(0x80f7ff8, 0x3, 0x80f7a34, 0x0, 0xb507c760, ...)
http.send+0x326 /home/chad/go/src/pkg/http/client.go:61
http.send(0xb67a0ee0, 0xb5067690, 0x0, 0x0)
http.Get+0x177 /home/chad/go/src/pkg/http/client.go:134
http.Get(0xb5067690, 0x43, 0x0, 0x0, 0x0, ...)
main.HttpGet+0x18e /home/chad/go-gtk/example/twitter/twitter.go:26
main.HttpGet(0xb681ea00, 0x43, 0x2d9, 0x80518f5)
main.url2pixbuf+0x36 /home/chad/go-gtk/example/twitter/twitter.go:32
main.url2pixbuf(0xb681ea00, 0x43, 0xb67a2750, 0xb681ea00)
main._func_003+0x29b /home/chad/go-gtk/example/twitter/twitter.go:88
main._func_003(0xb678d830, 0xb678d900, 0xb678d910, 0x8053440)
runtime.goexit /home/chad/go/src/pkg/runtime/proc.c:146
runtime.goexit()
eax 0x0
ebx 0xdf2
ecx 0xdf2
edx 0x6
edi 0xb75b3ff4
esi 0x400
ebp 0xbfdf2ad0
esp 0xbfdf2ab8
eip 0xb7760424
eflags 0x200202
cs 0x73
fs 0x0
gs 0x33
Trace/breakpoint trap


(twitter:3631): Gtk-CRITICAL *: IA__gtk_text_buffer_insert_pixbuf: assertion `GDK_IS_PIXBUF (pixbuf)' failed
*

Gtk:ERROR:/build/buildd/gtk+2.0-2.22.0/gtk/gtktextview.c:3570:gtk_text_view_validate_onscreen: assertion failed: (text_view->onscreen_validated)
SIGABRT: abort
PC=0xb779a424

goroutine 4 [4]:
runtime.gosched+0x75 /home/chad/go/src/pkg/runtime/proc.c:548
runtime.gosched()
runfinq+0x4e /home/chad/go/src/pkg/runtime/mgc0.c:429
runfinq()
runtime.goexit /home/chad/go/src/pkg/runtime/proc.c:146
runtime.goexit()

goroutine 3 [3]:
runtime.entersyscall+0x25 /home/chad/go/src/pkg/runtime/proc.c:567
runtime.entersyscall()
syscall.Syscall6+0x5 /home/chad/go/src/pkg/syscall/asm_linux_386.s:39
syscall.Syscall6()
syscall.EpollWait+0x74 /home/chad/go/src/pkg/syscall/zsyscall_linux_386.go:188
syscall.EpollWait(0xb, 0xb4f312a0, 0x1, 0x1, 0xf78, ...)
net._pollster·WaitFD+0x134 /home/chad/go/src/pkg/net/fd_linux.go:116
net._pollster·WaitFD(0xb67c7a38, 0xec060af8, 0x0, 0x64, 0x0, ...)
net._pollServer·Run+0xcb /home/chad/go/src/pkg/net/fd.go:207
net._pollServer·Run(0xb67f2b80, 0x0)
runtime.goexit /home/chad/go/src/pkg/runtime/proc.c:146
runtime.goexit()

goroutine 2 [4]:
runtime.gosched+0x75 /home/chad/go/src/pkg/runtime/proc.c:548
runtime.gosched()
runtime.chanrecv+0x165 /home/chad/go/src/pkg/runtime/chan.c:364
runtime.chanrecv(0xb686d2c0, 0xb4f2df54, 0x0, 0x7d0)
runtime.chanrecv1+0x37 /home/chad/go/src/pkg/runtime/chan.c:444
runtime.chanrecv1(0xb686d2c0, 0xb6809680)
net._pollServer·WaitRead+0x50 /home/chad/go/src/pkg/net/fd.go:247
net._pollServer·WaitRead(0xb67f2b80, 0xb6809680, 0x7d0)
net._netFD·Read+0x1c1 /home/chad/go/src/pkg/net/fd.go:354
net._netFD·Read(0xb6809680, 0xb4f2c000, 0x7d0, 0x7d0, 0x0, ...)
net._UDPConn·Read+0x6f /home/chad/go/src/pkg/net/udpsock.go:90
net._UDPConn·Read(0xb4f32148, 0xb4f2c000, 0x7d0, 0x7d0, 0x0, ...)
net.exchange+0x348 /home/chad/go/src/pkg/net/dnsclient.go:75
net.exchange(0xb6849e70, 0xb67e5c80, 0xb4f32148, 0xb4f31b30, 0xd, ...)
net.tryOneName+0x1ec /home/chad/go/src/pkg/net/dnsclient.go:165
net.tryOneName(0xb6849e70, 0xb4f31b30, 0xd, 0x80f0001, 0x0, ...)
net.lookup+0x459 /home/chad/go/src/pkg/net/dnsclient.go:262
net.lookup(0xb4f27d40, 0xc, 0x1, 0x0, 0x0, ...)
net.LookupHost+0xe7 /home/chad/go/src/pkg/net/dnsclient.go:314
net.LookupHost(0xb4f27d40, 0xc, 0x0, 0x0, 0x0, ...)
net.hostPortToIP+0x116 /home/chad/go/src/pkg/net/ipsock.go:206
net.hostPortToIP(0x80f7ff8, 0x3, 0xb4f27d40, 0x11, 0x0, ...)
net.ResolveTCPAddr+0x39 /home/chad/go/src/pkg/net/tcpsock.go:66
net.ResolveTCPAddr(0xb4f27d40, 0x11, 0x80f7ff8, 0x3)
net.Dial+0x477 /home/chad/go/src/pkg/net/dial.go:36
net.Dial(0x80f7ff8, 0x3, 0x80f7a34, 0x0, 0xb4f27d40, ...)
http.send+0x326 /home/chad/go/src/pkg/http/client.go:61
http.send(0xb67f7150, 0xb4f135f0, 0x0, 0x0)
http.Get+0x177 /home/chad/go/src/pkg/http/client.go:134
http.Get(0xb4f135f0, 0x40, 0x0, 0x0, 0x0, ...)
main.HttpGet+0x18e /home/chad/go-gtk/example/twitter/twitter.go:26
main.HttpGet(0xb685c4b0, 0x40, 0x2da, 0x80518f5)
main.url2pixbuf+0x36 /home/chad/go-gtk/example/twitter/twitter.go:32
main.url2pixbuf(0xb685c4b0, 0x40, 0xb68906b0, 0xb685c4b0)
main._func_003+0x29b /home/chad/go-gtk/example/twitter/twitter.go:88
main._func_003(0xb67c7830, 0xb67c7900, 0xb67c7910, 0x8053440)
runtime.goexit /home/chad/go/src/pkg/runtime/proc.c:146
runtime.goexit()
eax 0x0
ebx 0xe2f
ecx 0xe2f
edx 0x6
edi 0xb75edff4
esi 0xb50009b8
ebp 0xbfe1ebc0
esp 0xbfe1eba8
eip 0xb779a424
eflags 0x200202
cs 0x73
fs 0x0
gs 0x33
Trace/breakpoint trap

How do you input text or numbers

I have a working demo of go-gtk, but I'm having difficulty producing code that receives text from a dialog box. I want to be able to input text or number data and use as input data. Nothing fancy, just print the request and except the input.

Can you send me a simple example.

gtk is currently broken (ubuntu 11.10)

(gdk gdkpixbuf glib gtksourceview pango compiles fine)

installed dev libs:
sudo apt-get install libgtk2.0-dev

git show
commit 6f965c8

go version weekly.2012-02-07 +21

cd src/github.com/mattn/go-gtk/gtk
go build -x
WORK=/tmp/go-build761601610
mkdir -p $WORK/github.com/mattn/go-gtk/gtk/_obj/
cd .../src/github.com/mattn/go-gtk/gtk
pkg-config --cflags gtk+-2.0
pkg-config --libs gtk+-2.0
$GOBIN/tool/cgo -objdir $WORK/github.com/mattn/go-gtk/gtk/_obj/ -- -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I $WORK/github.com/mattn/go-gtk/gtk/_obj/ gtk.go
$GOBIN/tool/6c -FVw -I $WORK/github.com/mattn/go-gtk/gtk/_obj/ -I $GOROOT/pkg/linux_amd64 -o $WORK/github.com/mattn/go-gtk/gtk/_obj/_cgo_defun.6 -DGOOS_linux -DGOARCH_amd64 $WORK/github.com/mattn/go-gtk/gtk/_obj/_cgo_defun.c
gcc -I . -g -O2 -fPIC -m64 -pthread -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I $WORK/github.com/mattn/go-gtk/gtk/_obj/ -o $WORK/github.com/mattn/go-gtk/gtk/_obj/_cgo_main.o -c $WORK/github.com/mattn/go-gtk/gtk/_obj/_cgo_main.c
gcc -I . -g -O2 -fPIC -m64 -pthread -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I $WORK/github.com/mattn/go-gtk/gtk/_obj/ -o $WORK/github.com/mattn/go-gtk/gtk/_obj/_cgo_export.o -c $WORK/github.com/mattn/go-gtk/gtk/_obj/_cgo_export.c
gcc -I . -g -O2 -fPIC -m64 -pthread -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I $WORK/github.com/mattn/go-gtk/gtk/_obj/ -o $WORK/github.com/mattn/go-gtk/gtk/_obj/gtk.cgo2.o -c $WORK/github.com/mattn/go-gtk/gtk/_obj/gtk.cgo2.c
# github.com/mattn/go-gtk/gtk
gtk.go: In function ‘_cgo_1a037e14cf9d_Cfunc_gtk_about_dialog_set_documenters’:
gtk.go:1993:2: warning: passing argument 2 of ‘gtk_about_dialog_set_documenters’ from incompatible pointer type [enabled by default]
/usr/include/gtk-2.0/gtk/gtkaboutdialog.h:114:24: note: expected ‘const gchar **’ but argument is of type ‘gchar **’
gtk.go: In function ‘_cgo_1a037e14cf9d_Cfunc_gtk_about_dialog_set_authors’:
gtk.go:6516:2: warning: passing argument 2 of ‘gtk_about_dialog_set_authors’ from incompatible pointer type [enabled by default]
/usr/include/gtk-2.0/gtk/gtkaboutdialog.h:111:24: note: expected ‘const gchar **’ but argument is of type ‘gchar **’
gtk.go: In function ‘_cgo_1a037e14cf9d_Cfunc_gtk_about_dialog_set_artists’:
gtk.go:8207:2: warning: passing argument 2 of ‘gtk_about_dialog_set_artists’ from incompatible pointer type [enabled by default]
/usr/include/gtk-2.0/gtk/gtkaboutdialog.h:117:24: note: expected ‘const gchar **’ but argument is of type ‘gchar **’
gcc -I . -g -O2 -fPIC -m64 -pthread -o $WORK/github.com/mattn/go-gtk/gtk/_obj/_cgo_.o $WORK/github.com/mattn/go-gtk/gtk/_obj/_cgo_main.o $WORK/github.com/mattn/go-gtk/gtk/_obj/_cgo_export.o $WORK/github.com/mattn/go-gtk/gtk/_obj/gtk.cgo2.o -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0
$GOBIN/tool/cgo -objdir $WORK/github.com/mattn/go-gtk/gtk/_obj/ -dynimport $WORK/github.com/mattn/go-gtk/gtk/_obj/_cgo_.o -dynout $WORK/github.com/mattn/go-gtk/gtk/_obj/_cgo_import.c
$GOBIN/tool/6c -FVw -I $WORK/github.com/mattn/go-gtk/gtk/_obj/ -I $GOROOT/pkg/linux_amd64 -o $WORK/github.com/mattn/go-gtk/gtk/_obj/_cgo_import.6 -DGOOS_linux -DGOARCH_amd64 $WORK/github.com/mattn/go-gtk/gtk/_obj/_cgo_import.c
$GOBIN/tool/6g -o $WORK/github.com/mattn/go-gtk/gtk/_obj/_go_.6 -p github.com/mattn/go-gtk/gtk -I $WORK -I /home/mc/server/05/00-work/go-js-tutorial/pkg/linux_amd64 $WORK/github.com/mattn/go-gtk/gtk/_obj/_cgo_gotypes.go $WORK/github.com/mattn/go-gtk/gtk/_obj/gtk.cgo1.go
# github.com/mattn/go-gtk/gtk
/tmp/go-build761601610/github.com/mattn/go-gtk/gtk/_obj/_cgo_gotypes.go:1: ambiguous selector *_Ctype_GtkProgressBar._
/tmp/go-build761601610/github.com/mattn/go-gtk/gtk/_obj/_cgo_gotypes.go:1: ambiguous selector _Ctype_GtkProgressBar._
/tmp/go-build761601610/github.com/mattn/go-gtk/gtk/_obj/_cgo_gotypes.go:1: cannot use &p._ (type *[4]byte) as type *[8]byte in function argument
/tmp/go-build761601610/github.com/mattn/go-gtk/gtk/_obj/_cgo_gotypes.go:1: ambiguous selector *_Ctype_GtkProgressBar._
/tmp/go-build761601610/github.com/mattn/go-gtk/gtk/_obj/_cgo_gotypes.go:1: ambiguous selector _Ctype_GtkProgressBar._
/tmp/go-build761601610/github.com/mattn/go-gtk/gtk/_obj/_cgo_gotypes.go:1: ambiguous selector *_Ctype_GtkProgressBar._
/tmp/go-build761601610/github.com/mattn/go-gtk/gtk/_obj/_cgo_gotypes.go:1: ambiguous selector _Ctype_GtkProgressBar._
/tmp/go-build761601610/github.com/mattn/go-gtk/gtk/_obj/_cgo_gotypes.go:1: ambiguous selector *_Ctype_GtkFrame._
/tmp/go-build761601610/github.com/mattn/go-gtk/gtk/_obj/_cgo_gotypes.go:1: ambiguous selector _Ctype_GtkFrame._
/tmp/go-build761601610/github.com/mattn/go-gtk/gtk/_obj/_cgo_gotypes.go:1: ambiguous selector *_Ctype_GtkFrame._
/tmp/go-build761601610/github.com/mattn/go-gtk/gtk/_obj/_cgo_gotypes.go:1: too many errors

glib.go compile failure

when compiling on debian i386 I'm getting these errors

glib.go:35[_obj/glib.cgo1.go:38]: undefined: error
glib.go:53[_obj/glib.cgo1.go:56]: undefined: error

How to properly handle signal arguments?

I hava a little sample program which uses a GtkEntry with a connected "insert-text" signal. The "insert-text" signal has 3 arguments: Arg(1) is an int which I can convert just fine, but Arg(0) is a char*.

How do I convert it to a real Go string?

mynewtext := string(ctx.Args(0)) does only produce a weird rune. I guess I would have to work with C.GoString() and C.to_charptr() as you did in GtkEntry.GetText(), but I can't seem to import "C" without converting my program to a cgo project.

Do you have a plan for handling signals more go-like? Or do you know of a way to convert the string correctly?

crashes allegedly caused by Connect

Hi, I'm having some problem with go-gtk crashing, this is an example of a crash caused by calling back a function connected to a SourceBuffer: buffer.Connect("modified-changed", callback)
The problem appears in many other cases involving Connect, commenting out the call to Connect removes the problem so I guess the problem could be there. There was no problem before commits about event queue (I wouldn't know which one, I pulled all changes together only recently)

 SIGTRAP: trace trap
 PC=0x412493

runtime.morestack+0x10 /home/sgh/bin/go/src/pkg/runtime/amd64/asm.s:178
runtime.morestack()
 _cgoexp_e970e0a51d0f__go_glib_callback+0x13 /home/sgh/dev/go-gtk/go-gtk/glib/_obj/_cgo_defun.c:601
_cgoexp_e970e0a51d0f__go_glib_callback(0x47b4d00, 0x1, 0x7fffd81a0ba0, 0x0)

goroutine 1 [3]:
return /home/sgh/bin/go/src/pkg/runtime/amd64/asm.s:384
return()
runtime.cgocall+0x108 /home/sgh/bin/go/src/pkg/runtime/cgocall.c:136
runtime.cgocall(0x43e905, 0x7faa9a087e88, 0x4255fb, 0x432840)
github%2ecom/mattn/go-gtk/gtk._Cfunc_gtk_main+0x2f /home/sgh/dev/go-gtk/go-gtk/gtk/_obj/_cgo_defun.c:6699
github%2ecom/mattn/go-gtk/gtk._Cfunc_gtk_main(0x401d78, 0xf8400001e8)
github%2ecom/mattn/go-gtk/gtk.Main+0x18 /home/sgh/dev/go-gtk/go-gtk/gtk/_obj/gtk.cgo1.go:-2228
github%2ecom/mattn/go-gtk/gtk.Main()
main.initGui+0xf20 /home/sgh/dev/golide/golide.go:192
main.initGui()
main.main+0x3f /home/sgh/dev/golide/golide.go:51
main.main()
runtime.mainstart+0xf /home/sgh/bin/go/src/pkg/runtime/amd64/asm.s:77
runtime.mainstart()
runtime.goexit /home/sgh/bin/go/src/pkg/runtime/proc.c:178
runtime.goexit()
----- goroutine created by -----
_rt0_amd64+0x8e /home/sgh/bin/go/src/pkg/runtime/amd64/asm.s:64

I wrote a simple example that shows the problem when connecting some gtk.Paned to a callback function
it seems the problem appears only if I connect different gtk.Paned to the same function. Although menus don't seem to suffer the same effect.
Here is the example:


package main

import (
    "github.com/mattn/go-gtk/gdk"
    "github.com/mattn/go-gtk/gtk"
)

func main() {
    gtk.Init(nil)
    initGui()
}

func initGui() {
    window := gtk.Window(gtk.GTK_WINDOW_TOPLEVEL)
    window.Connect("destroy", tryquit, nil)

    vbox := gtk.VBox(false, 1) //menubar / main window

    //----------------------------------------------
    // Menubar
    //----------------------------------------------
    menubar := gtk.MenuBar()
    vbox.PackStart(menubar, false, false, 0)

    accelgroup := gtk.AccelGroup()
    window.AddAccelGroup(accelgroup)

    cascademenu := gtk.MenuItemWithMnemonic("_File")
    menubar.Append(cascademenu)
    submenu := gtk.Menu()
    cascademenu.SetSubmenu(submenu)

    menuitem := gtk.MenuItemWithMnemonic("_Open File")
    menuitem.Connect("activate", openFile, nil)
    submenu.Append(menuitem)

    menuitem = gtk.MenuItemWithMnemonic("_Open Dir")
    menuitem.Connect("activate", openDir, nil)
    submenu.Append(menuitem)

    menuitem = gtk.MenuItemWithMnemonic("_Save")
    //menuitem.AddAccelerator("activate", accelgroup, gdk.GDK_KEY_s, gdk.GDK_CONTROL_MASK, gtk.GTK_ACCEL_VISIBLE)
    menuitem.AddAccelerator("activate", accelgroup, gdk.GDK_KEY_s, 4, gtk.GTK_ACCEL_VISIBLE)
    menuitem.Connect("activate", save, nil)
    submenu.Append(menuitem)

    menuitem = gtk.MenuItemWithMnemonic("_Quit")
    menuitem.Connect("activate", func(){window.Hide()}, nil)
    submenu.Append(menuitem)

    cascademenu = gtk.MenuItemWithMnemonic("_Help")
    menubar.Append(cascademenu)
    submenu = gtk.Menu()
    cascademenu.SetSubmenu(submenu)

    menuitem = gtk.MenuItemWithMnemonic("_About")
    menuitem.Connect("activate", showAbout, nil)
    submenu.Append(menuitem)


    //----------------------------------------------
    // Sections layout
    //----------------------------------------------
    panedTM := gtk.HPaned() // text | misc
    panedTM.Pack1(frame(), true, false)
    panedTM.Pack2(frame(), true, false)
    panedTM.SetPosition(500)
    //panedTM.Connect("size_request", func(){savePanedLayout(DTM, panedTM.GetPosition())})
    //panedTM.Connect("size_request", func(){openFile()})
    panedTM.Connect("size_request", openFile)

    panedFF := gtk.VPaned() // file tree / file property
    panedFF.Pack1(frame(), true, false)
    panedFF.Pack2(frame(), true, false)
    panedFF.SetPosition(400)
    //panedFF.Connect("size_request", func(){savePanedLayout(DFF, panedFF.GetPosition())})
    panedFF.Connect("size_request", openFile)

    panedFP := gtk.HPaned() // file tree | package tree
    panedFP.Pack1(panedFF, true, false)
    panedFP.Pack2(frame(), true, false)
    panedFP.SetPosition(100)
    //panedFP.Connect("size_request", func(){savePanedLayout(DFP, panedFP.GetPosition())})
    panedFP.Connect("size_request", openFile)

    panedTT := gtk.HPaned() // trees | text+misc
    panedTT.Pack1(panedFP, true, false)
    panedTT.Pack2(panedTM, true, false)
    panedTT.SetPosition(200)

    vbox.PackStart(panedTT, true, true, 0)

    //----------------------------------------------
    // Window
    //----------------------------------------------
    window.Add(vbox)
    window.SetSizeRequest(1024, 600)
    window.Connect("configure-event", saveWindowLayout, nil)
    window.ShowAll()
    gtk.Main()
 }
    func frame() gtk.WidgetLike {
    return gtk.Frame("frame")
}
func tryquit() {
    gtk.MainQuit()
}
func openFile() {
    println("callback1")
}
func openDir() {
    println("callback2")
}
func save() {
    println("callback3")
}
func showAbout() {
    println("callback4")
}
func savePanedLayout(string, int) {
    println("callback5")
}
func saveWindowLayout() {
    println("callback6")
}

p.s.: using go tip, just updated go-gtk with goinstall and environment is linux amd64

statusicon

# github.com/mattn/go-gtk/example/statusicon
src/github.com/mattn/go-gtk/example/statusicon/statusicon.go:23: si.SetTitle undefined (type *gtk.GtkStatusIcon has no field or method SetTitle)

But everything other seems to compile!!

$ go install -v github.com/mattn/go-gtk/example...
github.com/mattn/go-gtk/gdk
github.com/mattn/go-gtk/glib
github.com/mattn/go-gtk/gdkpixbuf
github.com/mattn/go-gtk/pango
github.com/garyburd/go-oauth
github.com/mattn/go-gtk/gtk
github.com/garyburd/go-twitterstream
github.com/mattn/go-gtk/example/alignment
github.com/mattn/go-gtk/example/builder/callback
github.com/mattn/go-gtk/example/builder
github.com/mattn/go-gtk/example/clipboard
github.com/mattn/go-gtk/example/demo
github.com/mattn/go-gtk/example/dnd
github.com/mattn/go-gtk/example/drawable
github.com/mattn/go-gtk/example/event
github.com/mattn/go-gtk/example/expander
github.com/mattn/go-gtk/example/listview
github.com/mattn/go-gtk/example/locale
github.com/mattn/go-gtk/example/notebook
github.com/mattn/go-gtk/gtksourceview
github.com/mattn/go-gtk/example/statusicon
# github.com/mattn/go-gtk/example/statusicon
src/github.com/mattn/go-gtk/example/statusicon/statusicon.go:23: si.SetTitle undefined (type *gtk.GtkStatusIcon has no field or method SetTitle)
github.com/mattn/go-gtk/example/table
github.com/mattn/go-gtk/example/thread
github.com/mattn/go-gtk/example/treeview
github.com/mattn/go-gtk/example/sourceview
github.com/mattn/go-gtk/example/twitter
github.com/mattn/go-gtk/example/twitterstream

tree pkg

pkg
└── linux_amd64
    └── github.com
        ├── garyburd
        │   ├── go-oauth.a
        │   └── go-twitterstream.a
        └── mattn
            └── go-gtk
                ├── example
                │   └── builder
                │       └── callback.a
                ├── gdk.a
                ├── gdkpixbuf.a
                ├── glib.a
                ├── gtk.a
                ├── gtksourceview.a
                └── pango.a

ls bin

alignment  clipboard  dnd       event     listview  notebook    table   treeview
twitterstream builder    demo       drawable  expander  locale    sourceview
thread  twitter

gtk.Init(nil) crashes

This is just an annoyance, I'd expect it to behave like (in C)

gtk_init(NULL, NULL);

which is the same as no arguments.

test

ghexsel@vic-ghexsel-desktop:~/Development/code/go/calc$ rm -rf go-gtk/
ghexsel@vic-ghexsel-desktop:~/Development/code/go/calc$ git clone http://github.com/mattn/go-gtk.git
Initialized empty Git repository in /home/ghexsel/Development/code/go/calc/go-gtk/.git/
remote: Counting objects: 502, done.
remote: Compressing objects: 100% (348/348), done.
remote: Total 502 (delta 234), reused 303 (delta 148)
Receiving objects: 100% (502/502), 292.45 KiB | 219 KiB/s, done.
Resolving deltas: 100% (234/234), done.
ghexsel@vic-ghexsel-desktop:~/Development/code/go/calc$ cd go-gtk/
ghexsel@vic-ghexsel-desktop:~/Development/code/go/calc/go-gtk$ make install
cd glib && make install
make[1]: Entering directory `/home/ghexsel/Development/code/go/calc/go-gtk/glib'
CGOPKGPATH= /home/ghexsel/Development/software/golang/bin/cgo `pkg-config --cflags glib-2.0` glib.go
/home/ghexsel/Development/software/golang/bin/6g -o _go_.6 glib.cgo1.go _cgo_gotypes.go
/home/ghexsel/Development/software/golang/bin/6c -FVw -I"/home/ghexsel/Development/software/golang/src/pkg/runtime" -D_64BIT _cgo_defun.c
rm -f _obj/glib.a
/home/ghexsel/Development/software/golang/bin/gopack grc _obj/glib.a _go_.6 _cgo_defun.6
cp _obj/glib.a "/home/ghexsel/Development/software/golang/pkg/linux_amd64/glib.a"
gcc -m64 -fPIC -O2 -o glib.cgo2.o -c `pkg-config --cflags glib-2.0` glib.cgo2.c
gcc -m64 -o _cgo_.so glib.cgo2.o `pkg-config --libs glib-2.0`  -shared -lpthread -lm
cp _cgo_.so "/home/ghexsel/Development/software/golang/pkg/linux_amd64/glib.so"
rm glib.cgo2.c
make[1]: Leaving directory `/home/ghexsel/Development/code/go/calc/go-gtk/glib'
cd gdk && make install
make[1]: Entering directory `/home/ghexsel/Development/code/go/calc/go-gtk/gdk'
CGOPKGPATH= /home/ghexsel/Development/software/golang/bin/cgo `pkg-config --cflags gdk-2.0` gdk.go
/home/ghexsel/Development/software/golang/bin/6g -o _go_.6 gdk.cgo1.go _cgo_gotypes.go
/home/ghexsel/Development/software/golang/bin/6c -FVw -I"/home/ghexsel/Development/software/golang/src/pkg/runtime" -D_64BIT _cgo_defun.c
rm -f _obj/gdk.a
/home/ghexsel/Development/software/golang/bin/gopack grc _obj/gdk.a _go_.6 _cgo_defun.6
cp _obj/gdk.a "/home/ghexsel/Development/software/golang/pkg/linux_amd64/gdk.a"
gcc -m64 -fPIC -O2 -o gdk.cgo2.o -c `pkg-config --cflags gdk-2.0` gdk.cgo2.c
gcc -m64 -o _cgo_.so gdk.cgo2.o `pkg-config --libs gdk-2.0`  -shared -lpthread -lm
cp _cgo_.so "/home/ghexsel/Development/software/golang/pkg/linux_amd64/gdk.so"
rm gdk.cgo2.c
make[1]: Leaving directory `/home/ghexsel/Development/code/go/calc/go-gtk/gdk'
cd gdkpixbuf && make install
make[1]: Entering directory `/home/ghexsel/Development/code/go/calc/go-gtk/gdkpixbuf'
CGOPKGPATH= /home/ghexsel/Development/software/golang/bin/cgo `pkg-config --cflags gdk-pixbuf-2.0` gdkpixbuf.go
/home/ghexsel/Development/software/golang/bin/6g -o _go_.6 gdkpixbuf.cgo1.go _cgo_gotypes.go
/home/ghexsel/Development/software/golang/bin/6c -FVw -I"/home/ghexsel/Development/software/golang/src/pkg/runtime" -D_64BIT _cgo_defun.c
rm -f _obj/gdkpixbuf.a
/home/ghexsel/Development/software/golang/bin/gopack grc _obj/gdkpixbuf.a _go_.6 _cgo_defun.6
cp _obj/gdkpixbuf.a "/home/ghexsel/Development/software/golang/pkg/linux_amd64/gdkpixbuf.a"
gcc -m64 -fPIC -O2 -o gdkpixbuf.cgo2.o -c `pkg-config --cflags gdk-pixbuf-2.0` gdkpixbuf.cgo2.c
gcc -m64 -o _cgo_.so gdkpixbuf.cgo2.o `pkg-config --libs gdk-pixbuf-2.0`  -shared -lpthread -lm
cp _cgo_.so "/home/ghexsel/Development/software/golang/pkg/linux_amd64/gdkpixbuf.so"
rm gdkpixbuf.cgo2.c
make[1]: Leaving directory `/home/ghexsel/Development/code/go/calc/go-gtk/gdkpixbuf'
cd gtk && make install
make[1]: Entering directory `/home/ghexsel/Development/code/go/calc/go-gtk/gtk'
CGOPKGPATH= /home/ghexsel/Development/software/golang/bin/cgo `pkg-config --cflags gtk+-2.0` -Duintptr="unsigned int*" gtk.go
/home/ghexsel/Development/software/golang/bin/6g -o _go_.6 gtk.cgo1.go _cgo_gotypes.go
_cgo_gotypes.go:26: invalid recursive type _C_GList
_cgo_gotypes.go:97: invalid recursive type _C_GtkWindow
make[1]: *** [_go_.6] Error 1
make[1]: Leaving directory `/home/ghexsel/Development/code/go/calc/go-gtk/gtk'
make: *** [install] Error 2
*ghexsel@vic-ghexsel-desktop:~/Development/code/go/calc/go-gtk$ make clean
cd glib && make clean
make[1]: Entering directory `/home/ghexsel/Development/code/go/calc/go-gtk/glib'
rm -rf *.o *.a *.[568vq] [568vq].out *.cgo1.go *.cgo2.c _cgo_defun.c _cgo_gotypes.go _cgo_export.* *.so _obj _test _testmain.go
make[1]: Leaving directory `/home/ghexsel/Development/code/go/calc/go-gtk/glib'
cd gdk && make clean
make[1]: Entering directory `/home/ghexsel/Development/code/go/calc/go-gtk/gdk'
rm -rf *.o *.a *.[568vq] [568vq].out *.cgo1.go *.cgo2.c _cgo_defun.c _cgo_gotypes.go _cgo_export.* *.so _obj _test _testmain.go
make[1]: Leaving directory `/home/ghexsel/Development/code/go/calc/go-gtk/gdk'
cd gdkpixbuf && make clean
make[1]: Entering directory `/home/ghexsel/Development/code/go/calc/go-gtk/gdkpixbuf'
rm -rf *.o *.a *.[568vq] [568vq].out *.cgo1.go *.cgo2.c _cgo_defun.c _cgo_gotypes.go _cgo_export.* *.so _obj _test _testmain.go
make[1]: Leaving directory `/home/ghexsel/Development/code/go/calc/go-gtk/gdkpixbuf'
cd gtk && make clean
make[1]: Entering directory `/home/ghexsel/Development/code/go/calc/go-gtk/gtk'
rm -rf *.o *.a *.[568vq] [568vq].out *.cgo1.go *.cgo2.c _cgo_defun.c _cgo_gotypes.go _cgo_export.* *.so _obj _test _testmain.go
make[1]: Leaving directory `/home/ghexsel/Development/code/go/calc/go-gtk/gtk'
cd example && make clean
make[1]: Entering directory `/home/ghexsel/Development/code/go/calc/go-gtk/example'
cd demo && make clean
make[2]: Entering directory `/home/ghexsel/Development/code/go/calc/go-gtk/example/demo'
rm -rf *.o *.a *.[568vq] [568vq].out demo
make[2]: Leaving directory `/home/ghexsel/Development/code/go/calc/go-gtk/example/demo'
cd twitter && make clean
make[2]: Entering directory `/home/ghexsel/Development/code/go/calc/go-gtk/example/twitter'
rm -rf *.o *.a *.[568vq] [568vq].out twitter
make[2]: Leaving directory `/home/ghexsel/Development/code/go/calc/go-gtk/example/twitter'
make[1]: Leaving directory `/home/ghexsel/Development/code/go/calc/go-gtk/example'
ghexsel@vic-ghexsel-desktop:~/Development/code/go/calc/go-gtk$ make install
cd glib && make install
make[1]: Entering directory `/home/ghexsel/Development/code/go/calc/go-gtk/glib'
CGOPKGPATH= /home/ghexsel/Development/software/golang/bin/cgo `pkg-config --cflags glib-2.0` glib.go
/home/ghexsel/Development/software/golang/bin/6g -o _go_.6 glib.cgo1.go _cgo_gotypes.go
/home/ghexsel/Development/software/golang/bin/6c -FVw -I"/home/ghexsel/Development/software/golang/src/pkg/runtime" -D_64BIT _cgo_defun.c
rm -f _obj/glib.a
/home/ghexsel/Development/software/golang/bin/gopack grc _obj/glib.a _go_.6 _cgo_defun.6
cp _obj/glib.a "/home/ghexsel/Development/software/golang/pkg/linux_amd64/glib.a"
gcc -m64 -fPIC -O2 -o glib.cgo2.o -c `pkg-config --cflags glib-2.0` glib.cgo2.c
gcc -m64 -o _cgo_.so glib.cgo2.o `pkg-config --libs glib-2.0`  -shared -lpthread -lm
cp _cgo_.so "/home/ghexsel/Development/software/golang/pkg/linux_amd64/glib.so"
rm glib.cgo2.c
make[1]: Leaving directory `/home/ghexsel/Development/code/go/calc/go-gtk/glib'
cd gdk && make install
make[1]: Entering directory `/home/ghexsel/Development/code/go/calc/go-gtk/gdk'
CGOPKGPATH= /home/ghexsel/Development/software/golang/bin/cgo `pkg-config --cflags gdk-2.0` gdk.go
/home/ghexsel/Development/software/golang/bin/6g -o _go_.6 gdk.cgo1.go _cgo_gotypes.go
/home/ghexsel/Development/software/golang/bin/6c -FVw -I"/home/ghexsel/Development/software/golang/src/pkg/runtime" -D_64BIT _cgo_defun.c
rm -f _obj/gdk.a
/home/ghexsel/Development/software/golang/bin/gopack grc _obj/gdk.a _go_.6 _cgo_defun.6
cp _obj/gdk.a "/home/ghexsel/Development/software/golang/pkg/linux_amd64/gdk.a"
gcc -m64 -fPIC -O2 -o gdk.cgo2.o -c `pkg-config --cflags gdk-2.0` gdk.cgo2.c
gcc -m64 -o _cgo_.so gdk.cgo2.o `pkg-config --libs gdk-2.0`  -shared -lpthread -lm
cp _cgo_.so "/home/ghexsel/Development/software/golang/pkg/linux_amd64/gdk.so"
rm gdk.cgo2.c
make[1]: Leaving directory `/home/ghexsel/Development/code/go/calc/go-gtk/gdk'
cd gdkpixbuf && make install
make[1]: Entering directory `/home/ghexsel/Development/code/go/calc/go-gtk/gdkpixbuf'
CGOPKGPATH= /home/ghexsel/Development/software/golang/bin/cgo `pkg-config --cflags gdk-pixbuf-2.0` gdkpixbuf.go
/home/ghexsel/Development/software/golang/bin/6g -o _go_.6 gdkpixbuf.cgo1.go _cgo_gotypes.go
/home/ghexsel/Development/software/golang/bin/6c -FVw -I"/home/ghexsel/Development/software/golang/src/pkg/runtime" -D_64BIT _cgo_defun.c
rm -f _obj/gdkpixbuf.a
/home/ghexsel/Development/software/golang/bin/gopack grc _obj/gdkpixbuf.a _go_.6 _cgo_defun.6
cp _obj/gdkpixbuf.a "/home/ghexsel/Development/software/golang/pkg/linux_amd64/gdkpixbuf.a"
gcc -m64 -fPIC -O2 -o gdkpixbuf.cgo2.o -c `pkg-config --cflags gdk-pixbuf-2.0` gdkpixbuf.cgo2.c
gcc -m64 -o _cgo_.so gdkpixbuf.cgo2.o `pkg-config --libs gdk-pixbuf-2.0`  -shared -lpthread -lm
cp _cgo_.so "/home/ghexsel/Development/software/golang/pkg/linux_amd64/gdkpixbuf.so"
rm gdkpixbuf.cgo2.c
make[1]: Leaving directory `/home/ghexsel/Development/code/go/calc/go-gtk/gdkpixbuf'
cd gtk && make install
make[1]: Entering directory `/home/ghexsel/Development/code/go/calc/go-gtk/gtk'
CGOPKGPATH= /home/ghexsel/Development/software/golang/bin/cgo `pkg-config --cflags gtk+-2.0` -Duintptr="unsigned int*" gtk.go
/home/ghexsel/Development/software/golang/bin/6g -o _go_.6 gtk.cgo1.go _cgo_gotypes.go
_cgo_gotypes.go:26: invalid recursive type _C_GList
_cgo_gotypes.go:97: invalid recursive type _C_GtkWindow
make[1]: *** [_go_.6] Error 1
make[1]: Leaving directory `/home/ghexsel/Development/code/go/calc/go-gtk/gtk'
make: *** [install] Error 2

How to implement gtk_menu_popup?

gtk.go

// TODO
// void gtk_menu_popup (GtkMenu *menu, GtkWidget *parent_menu_shell, GtkWidget *parent_menu_item, GtkMenuPositionFunc func, gpointer data, guint button, guint32 activate_time)

The main problem is how to pass a Go function go to C.

GtkMenuPositionFunc func

I can't find any similar code to do this besides the _go_glib_callback in glib.go

GetIter() is broken

Regarding this func in gtk.go:
func (v *GtkTreeModel) GetIter(iter *GtkTreeIter, path *GtkTreePath) bool

There is something wrong with it, as the path parameter is not passed to C._gtk_tree_model_get_iter(), the newly created path_ is passed instead, and this error is generated:
Gtk-CRITICAL **: IA__gtk_tree_model_get_iter: assertionpath->depth > 0' failed`

This fixes the error:

func (v *GtkTreeModel) GetIter(iter *GtkTreeIter, path *GtkTreePath) bool {
    ret := gboolean2bool(C._gtk_tree_model_get_iter(v.TreeModel, &iter.TreeIter, unsafe.Pointer(path)))
    return ret
}

However, when using GetValue() with the resulting iter like that:
treeModel.GetValue(&iter, 1, &value)
I get this:
Gtk-CRITICAL **: gtk_tree_store_get_value: assertionVALID_ITER (iter, tree_store)' failed`

Success building and running on Windows....(not really an issue but might help someone else)

Steps:

  1. pull tip (as of today).
  2. Add this patch: http://codereview.appspot.com/4133041/

works!!

More detailed instructions:

If anyone wants to set up a build environment on windows, you need:
MinGW and MSYS. An easy way (but 32 bit only and a bit 'non-standard'), is to
use this installer: http://sourceforge.net/projects/lunac/files

If you don't use this installer the paths you need to use will be different than the ones I use!

Get and unzip into the top level directory, bison, diffutils, ed from the Gnuwin32 project.
You need the binaries, the dev packages and the dependancies!

Use Tortoisehg or command line hg to pull the latest go source to C:\MinGW\go
Set the environment variables needed for go:
GOARCH set to: 386
GOBIN set to: C:/MinGW/go/bin
GOOS set to: windows
GOROOT set to: C:/MinGW/go

Add the patch at: http://codereview.appspot.com/4133041/
(I'll add the steps required to do this if anyone really cares) ;)

Build go by launching MSYS using C:\MinGW\msys.bat and cd to /go/src and entering the command ./all.bash

Get gtk+ from here:
http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+-bundle_2.22.1-20101227_win32.zip

You also need both the bin and dev files from here:
http://ftp.acc.umu.se/pub/gnome/binaries/win32/gtksourceview/2.10/
and from here:
http://ftp.acc.umu.se/pub/gnome/binaries/win32/dependencies/
you need the bin and dev files for the libxml2 library.

Unpack all of these into C:\MinGW\gtk+, then follow the directions in the gtk+-bundle_2.22.1-20101227_win32.README.txt to make pkg-configure happy.

Copy the msys.bat file at C:\MinGW to msysgo.bat and add set GOBIN=/go/bin
set GOROOT=/go near the top.

Pull the latest version of go-gtk using TortoiseGit or command line git to: C:\MinGW\go-gtk. Then start MSYS again using the msysgo.bat file...and cd /go-gtk and follow the directions in the README.md file to create go-gtk and the example programs.

I had to copy the zlib1.dll file from C:\MinGW\gtk+\bin into the examples before they would run.

I hope this helps! If it is too complex, just wait and I'm sure someone will get a pre-packaged windows installer going sometime soon...

gtk multithread

i tried a trivial function port to get multi thread gtk support working, without success.
In particular i exported from c glib.thread_init gdk.threads_init gdk.threads_enter gdk.threads_leave, but executing gdk.threads_enter(); gtk.mainQuit(); gdk.threads_leave(); from a different thread in which gtk.mainLoop() was not executed, simply block the app in gtk.mainQuit().
is there any plan to add this support?

Examples: SIGSEGV - Segment Violation

OS: Ubuntu 9.10
Compiler: Go 8G @ Revision adfa8819b2

Has any one else seen a segment violation while trying to run the examples (demo and twitter)?

When I try to run these examples, I get the following error:

  • SIGSEGV: segmentation violation
  • Faulting address: 0x0
  • PC=0x805e2a1
  • gtk.pollEvents+0x4a /home/tinman/Downloads/mattn-go-gtk-d187fcb/gtk/gtk.cgo1.go:2979
  • gtk.pollEvents()
    
  • gtk.Main+0x3a /home/tinman/Downloads/mattn-go-gtk-d187fcb/gtk/gtk.cgo1.go:3019
  • gtk.Main()
    
  • main.main+0x1474 /home/tinman/Downloads/mattn-go-gtk-d187fcb/example/demo/demo.go:226
  • main.main()
    
  • mainstart+0xf /usr/local/lib/go-lib/src/pkg/runtime/386/asm.s:83
  • mainstart()
  • goexit /usr/local/lib/go-lib/src/pkg/runtime/proc.c:140
  • goexit()
  • eax 0x0
  • ebx 0x0
  • ecx 0x0
  • edx 0x1
  • edi 0x46043b70
  • esi 0x80e43ec
  • ebp 0x9a848020
  • esp 0x46043abc
  • eip 0x805e2a1
  • eflags 0x10216
  • cs 0x73
  • fs 0x0
  • gs 0x33
  • Trace/breakpoint trap

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.