summaryrefslogtreecommitdiff
path: root/sysdata_unix.go
diff options
context:
space:
mode:
Diffstat (limited to 'sysdata_unix.go')
-rw-r--r--sysdata_unix.go12
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