[cells-gtk-devel] Re: gtk-tutorial and border-width

Matthew Swank akopa.gmane.poster at gmail.com
Tue Jul 10 18:29:36 UTC 2007


Peter Denno <peter.denno <at> nist.gov> writes:

> 
> On Tuesday 10 July 2007 00:04, Matthew Swank wrote:
> > Is it possible to set the border width on a window as is done in:
> > http://gtk.org/tutorial/c39.html, Section 3.1.  I notice it is a
> > property of a GTKContainer, but cells-gtk doesn't wrap that class.
> 
> It probably wouldn't be too hard to write a def-widget for 
> GTKContainer and make Box, Notebook, Alignment etc. inherit from it.
> 

I see how to put a skeletal widget def in:
(def-widget container ()
  ()
  (border-width child resize-mode)
  (add check-resize remove set-focus-child))

I also see that gtk-ffi needs to know what methods to call for the props:
(added to (def-gtk-lib-functions :gtk ...) )

  (gtk-container-set-border-width :void
				  ((container :pointer)
				   (width :unsigned-int)))
  (gtk-container-get-border-width :unsigned-int
				  ((container :pointer)))
  ;; mode is actually an enum
  (gtk-container-set-resize-mode :void
				  ((container :pointer)
				   (mode :unsigned-int)))
  (gtk-container-get-resize-mode :unsigned-int
				  ((container :pointer)))

but how do I add proper infrastructure for the signals?

Also the child property is write-only, and the setter is a 
varargs function.  How do I set that up?

Thanks again,

Matt




More information about the cells-gtk-devel mailing list