diff options
| author | Pietro Gagliardi <[email protected]> | 2014-03-14 23:15:24 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-03-14 23:15:24 -0400 |
| commit | 6cdda6ebec7338ea019403d26dfc48db93180995 (patch) | |
| tree | a32667b2d20c9b767b327b109e9af99072243259 /sysdata_unix.go | |
| parent | a61b43f50c3968afcf5da0a91ec39d1ad669bbf8 (diff) | |
Provided a way to connect child widget signals in the GTK+ sysData and connected Area to draw. I think I'm getting the wrong child widget, though...
Diffstat (limited to 'sysdata_unix.go')
| -rw-r--r-- | sysdata_unix.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sysdata_unix.go b/sysdata_unix.go index 7a14ae9..8d753da 100644 --- a/sysdata_unix.go +++ b/sysdata_unix.go @@ -30,6 +30,8 @@ type classData struct { len func(widget *gtkWidget) int // ... signals callbackMap + child func(widget *gtkWidget) *gtkWidget + childsigs callbackMap } var classTypes = [nctypes]*classData{ @@ -94,6 +96,10 @@ var classTypes = [nctypes]*classData{ }, c_area: &classData{ make: gtkAreaNew, + child: gtkAreaGetControl, + childsigs: callbackMap{ + "draw": area_draw_callback, + }, }, } @@ -127,6 +133,12 @@ func (s *sysData) make(initText string, window *sysData) error { for signame, sigfunc := range ct.signals { g_signal_connect(s.widget, signame, sigfunc, s) } + if ct.child != nil { + child := ct.child(s.widget) + for signame, sigfunc := range ct.childsigs { + g_signal_connect(child, signame, sigfunc, s) + } + } ret <- nil } <-ret |
