public inbox for guile-gtk@sourceware.org
 help / color / mirror / Atom feed
* gtk version stuff
@ 2003-04-03 22:10 Kevin Ryde
  2003-05-11 23:29 ` Kevin Ryde
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Ryde @ 2003-04-03 22:10 UTC (permalink / raw)
  To: guile-gtk

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

A bit of filling in the gaps for the gtk version numbers.

I propose taking gtk-major-version and gtk-minor-version from the
global variables rather having values in gtk.scm.  Not that they'll be
anything except 1 and 2, but just to ensure guile-gtk exactly reflects
what libgtk says about itself.

        * gtk-support.c (sgtk_init_gtk_support): Add gtk_major_version,
        gtk_minor_version, gtk_micro_version, gtk_binary_age,
        gtk_interface_age.
        * gtk-1.2/gtk.scm (gtk-major-version, gtk-minor-version): Remove.
        * gtk-1.2.defs (gtk_check_version): New function.


[-- Attachment #2: gtk-support.c.versions.diff --]
[-- Type: text/plain, Size: 1083 bytes --]

CVS_RSH not defined
/usr/bin/cvs -d :pserver:anoncvs@subversions.gnu.org:/cvsroot/guile-gtk diff -r1.4 -u gtk-support.c
Index: gtk-support.c
===================================================================
RCS file: /cvsroot/guile-gtk/guile-gtk-1.2/gtk-support.c,v
retrieving revision 1.4
diff -u -u -r1.4 gtk-support.c
--- gtk-support.c	30 Mar 2003 13:46:01 -0000	1.4
+++ gtk-support.c	3 Apr 2003 22:03:24 -0000
@@ -743,4 +743,12 @@
 
   kw_type = scm_make_keyword_from_dash_symbol (sym_type);
   kw_flags = scm_make_keyword_from_dash_symbol (sym_flags);
+
+  /* Use the library variables so as to indicate what we're running with,
+     not GTK_MAJOR_VERSION etc which would be what we compiled against.  */
+  scm_c_define ("gtk-major-version", scm_ulong2num (gtk_major_version));
+  scm_c_define ("gtk-minor-version", scm_ulong2num (gtk_minor_version));
+  scm_c_define ("gtk-micro-version", scm_ulong2num (gtk_micro_version));
+  scm_c_define ("gtk-binary-age",    scm_ulong2num (gtk_binary_age));
+  scm_c_define ("gtk-interface-age", scm_ulong2num (gtk_interface_age));
 }

[-- Attachment #3: gtk.scm.versions.diff --]
[-- Type: text/plain, Size: 357 bytes --]

--- gtk.scm.~1.2.~	2003-01-31 19:11:03.000000000 +1000
+++ gtk.scm	2003-04-03 15:26:43.000000000 +1000
@@ -2,9 +2,6 @@
   :use-module (gtk-1.2 dynlink)
   :use-module (gtk-1.2 gdk))
 
-(define-public gtk-major-version 1)
-(define-public gtk-minor-version 2)
-
 (merge-compiled-code "sgtk_init_gtk_gtk_glue" "libguilegtk-1.2")
 
 (define-public (gtk-update)

[-- Attachment #4: gtk-1.2.defs.versions.diff --]
[-- Type: text/plain, Size: 355 bytes --]

--- gtk-1.2.defs.~1.9.~	2003-04-04 08:04:22.000000000 +1000
+++ gtk-1.2.defs	2003-04-04 08:07:41.000000000 +1000
@@ -4,6 +4,12 @@
 
 (import "gdk-1.2.defs")
 
+(define-func gtk_check_version
+  static_string
+  ((uint major)
+   (uint minor)
+   (uint micro)))
+
 (define-enum GtkWindowType
   (toplevel GTK_WINDOW_TOPLEVEL)
   (dialog GTK_WINDOW_DIALOG)

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

end of thread, other threads:[~2003-05-11 23:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-03 22:10 gtk version stuff Kevin Ryde
2003-05-11 23:29 ` 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).