public inbox for guile-gtk@sourceware.org
 help / color / mirror / Atom feed
* build initcode
@ 2003-08-11  0:35 Kevin Ryde
  2003-08-28  0:44 ` gdk-pixbuf and gdk_rgb_init Kevin Ryde
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Ryde @ 2003-08-11  0:35 UTC (permalink / raw)
  To: guile-gtk

[-- Attachment #1: Type: text/plain, Size: 555 bytes --]

I think a little initcode option would be good on functions, to allow
a bit of code to be inserted at the start.

        * build-guile-gtk-1.2 (emit-funcs): Add "initcode" option to insert
        code at the start of a function.

For instance,

	(define-func gdk_pixbuf_render_threshold_alpha
	  none
	  ((GdkPixbuf pixbuf)
	   (GdkWindow bitmap)
	   (int src_x)
	   (int src_y)
	   (int dest_x)
	   (int dest_y)
	   (int width)
	   (int height)
	   (int alpha_threshold))
	  (initcode "gdk_rgb_init()"))

And similarly for the main gdkrgb functions.



[-- Attachment #2: build-guile-gtk-1.2.initcode.diff --]
[-- Type: text/plain, Size: 431 bytes --]

--- build-guile-gtk-1.2.~1.21.~	2003-08-11 10:31:21.000000000 +1000
+++ build-guile-gtk-1.2	2003-08-11 10:32:04.000000000 +1000
@@ -943,6 +943,11 @@
       (if deprecated?
 	  (@ "  sgtk_issue_deprecation_warning (~s);~%" deprecated?))
 
+      ;; initializer code, if any
+      (let ((initcode (get-opt-val opts 'initcode #f)))
+	(if initcode
+	    (@ "  ~a;~%" initcode)))
+
       (cond
        (n-hack
 	(for-each (lambda (p)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-08-28  0:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-11  0:35 build initcode Kevin Ryde
2003-08-28  0:44 ` gdk-pixbuf and gdk_rgb_init Kevin Ryde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).