Re: [php-gtk-cvs] generator changes - fixes
| From: | Alan Knowles | Date: | Thu, 29 Nov 2001 22:02:26 +0000 |
| Subject: | Re: [php-gtk-cvs] generator changes - fixes | ||
| References: | 1 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-214@lists.php.net to get a copy of this message | ||
Mmh looks like this broke the most of the old extensions.. :)
libglade, gtkhtml, scintilla, sqpane...
-- below is a band aid patch.. -
The changes needed where consitent on all modules.
= defs files needed the constructor-of removed from functions.
- Makefile.in needs the -c GtkSQPane-
* this appears to have limitations where there are constructors for
more that one object in one def file..
- the define line needs adding to all modules - was this accidental or
deliberate ?
#define PHP_GTK_SQPANE_GET(w) GTK_SQPANE(PHP_GTK__GET(w))
Index: gtkhtml/gtkhtml.defs
===================================================================
RCS file: /repository/php-gtk/ext/gtkhtml/gtkhtml.defs,v
retrieving revision 1.1
diff -u -r1.1 gtkhtml.defs
--- gtkhtml/gtkhtml.defs 28 Nov 2001 01:28:33 -0000 1.1
+++ gtkhtml/gtkhtml.defs 30 Nov 2001 10:08:27 -0000
@@ -718,20 +718,20 @@
;; GtkHTMLEmbedded
(object HTMLEmbedded
(in-module Gtk)
- (parent Bin (Gtk))
+; (parent Bin (Gtk))
(c-name GtkHTMLEmbedded)
)
(function gtk_html_embedded_new
(c-name gtk_html_embedded_new)
- (is-constructor-of GtkHTMLEmbedded)
- (return-type GtkBin*)
- (parameter (type-and-name string classid))
- (parameter (type-and-name string name))
- (parameter (type-and-name string type))
- (parameter (type-and-name string data))
- (parameter (type-and-name int width))
- (parameter (type-and-name int height))
+; (is-constructor-of GtkHTMLEmbedded)
+ (return-type GtkHTMLEmbedded*)
+ (parameter (type-and-name string classid))
+ (parameter (type-and-name string name))
+ (parameter (type-and-name string type))
+ (parameter (type-and-name string data))
+ (parameter (type-and-name int width))
+ (parameter (type-and-name int height))
)
Index: gtkhtml/php_gtkhtml.h
===================================================================
RCS file: /repository/php-gtk/ext/gtkhtml/php_gtkhtml.h,v
retrieving revision 1.2
diff -u -r1.2 php_gtkhtml.h
--- gtkhtml/php_gtkhtml.h 29 Nov 2001 16:05:12 -0000 1.2
+++ gtkhtml/php_gtkhtml.h 30 Nov 2001 10:08:28 -0000
@@ -42,6 +42,8 @@
long id;
} php_gtkhtmlstream_s;
+#define PHP_GTK_HTML_GET(w) GTK_HTML(PHP_GTK_GET(w))
+
#else
Index: libglade/Makefile.in
===================================================================
RCS file: /repository/php-gtk/ext/libglade/Makefile.in,v
retrieving revision 1.4
diff -u -r1.4 Makefile.in
--- libglade/Makefile.in 21 Nov 2001 21:05:08 -0000 1.4
+++ libglade/Makefile.in 30 Nov 2001 10:08:28 -0000
@@ -9,7 +9,7 @@
php_libglade.o php_libglade.lo php_libglade.slo: gen_ce_libglade.h
gen_libglade.c: libglade.defs libglade.overrides
- $(PHP) -q $(top_srcdir)/generator/generator.php -o
$(srcdir)/libglade.overrides -p libglade -r
$(top_srcdir)/ext/gtk%2b/gtk.defs $(srcdir)/libglade.defs >
gen_libglade.c
+ $(PHP) -q $(top_srcdir)/generator/generator.php -o
$(srcdir)/libglade.overrides -p libglade -c GladeXML -r
$(top_srcdir)/ext/gtk%2b/gtk.defs $(srcdir)/libglade.defs >
gen_libglade.c
gen_ce_libglade.h: gen_libglade.c
grep -h "^PHP_GTK_EXPORT_CE" gen_libglade.c | sed -e "s!^!extern !" >
gen_ce_libglade.h
Index: libglade/libglade.defs
===================================================================
RCS file: /repository/php-gtk/ext/libglade/libglade.defs,v
retrieving revision 1.2
diff -u -r1.2 libglade.defs
--- libglade/libglade.defs 10 Jul 2001 18:27:51 -0000 1.2
+++ libglade/libglade.defs 30 Nov 2001 10:08:28 -0000
@@ -2,10 +2,10 @@
; object definitions ...
(object XML
(in-module Glade)
- (parent Data (Gtk))
(c-name GladeXML)
)
+
;; Enumerations and flags ...
@@ -25,7 +25,6 @@
(function glade_xml_new_with_domain
(c-name glade_xml_new_with_domain)
- (is-constructor-of GladeXML)
(return-type GladeXML*)
(parameter (type-and-name const-char* fname))
(parameter (type-and-name const-char* root) (null-ok) (default
"NULL"))
Index: libglade/php_libglade.h
===================================================================
RCS file: /repository/php-gtk/ext/libglade/php_libglade.h,v
retrieving revision 1.3
diff -u -r1.3 php_libglade.h
--- libglade/php_libglade.h 12 Oct 2001 05:56:34 -0000 1.3
+++ libglade/php_libglade.h 30 Nov 2001 10:08:28 -0000
@@ -35,6 +35,9 @@
void php_libglade_register_constants(int module_number TSRMLS_DC);
void php_libglade_register_classes();
+#define PHP_GLADE_XML_GET(w) GLADE_XML(PHP_GTK_GET(w))
+
+
#else
#define libglade_ext_ptr NULL
Index: scintilla/Makefile.in
===================================================================
RCS file: /repository/php-gtk/ext/scintilla/Makefile.in,v
retrieving revision 1.2
diff -u -r1.2 Makefile.in
--- scintilla/Makefile.in 20 Nov 2001 20:36:31 -0000 1.2
+++ scintilla/Makefile.in 30 Nov 2001 10:08:28 -0000
@@ -9,7 +9,7 @@
php_scintilla.o php_scintilla.lo php_scintilla.slo: gen_ce_scintilla.h
gen_scintilla.c: scintilla.defs scintilla.overrides
- php -q $(top_srcdir)/generator/generator.php -o
$(srcdir)/scintilla.overrides -p Scintilla -r
$(top_srcdir)/ext/gtk%2b/gtk.defs $(srcdir)/scintilla.defs >
gen_scintilla.c
+ php -q $(top_srcdir)/generator/generator.php -o
$(srcdir)/scintilla.overrides -p Scintilla -c GtkScintilla -r
$(top_srcdir)/ext/gtk%2b/gtk.defs $(srcdir)/scintilla.defs >
gen_scintilla.c
gen_ce_scintilla.h: gen_scintilla.c
grep -h "^PHP_GTK_EXPORT_CE" gen_scintilla.c | sed -e "s!^!extern !" >
gen_ce_scintilla.h
Index: scintilla/php_scintilla.h
===================================================================
RCS file: /repository/php-gtk/ext/scintilla/php_scintilla.h,v
retrieving revision 1.1
diff -u -r1.1 php_scintilla.h
--- scintilla/php_scintilla.h 11 Aug 2001 05:42:40 -0000 1.1
+++ scintilla/php_scintilla.h 30 Nov 2001 10:08:29 -0000
@@ -30,6 +30,9 @@
extern php_gtk_ext_entry scintilla_ext_entry;
#define scintilla_ext_ptr &scintilla_ext_entry
+#define PHP_GTK_SCINTILLA_GET(w) GTK_SCINTILLA(PHP_GTK_GET(w))
+
+
#else
#define scintilla_ext_ptr NULL
Index: scintilla/scintilla.defs
===================================================================
RCS file: /repository/php-gtk/ext/scintilla/scintilla.defs,v
retrieving revision 1.1
diff -u -r1.1 scintilla.defs
--- scintilla/scintilla.defs 11 Aug 2001 05:42:40 -0000 1.1
+++ scintilla/scintilla.defs 30 Nov 2001 10:08:29 -0000
@@ -2,7 +2,7 @@
; object definitions ...
(object Scintilla
(in-module Gtk)
- (parent Frame (Gtk))
+; (parent Frame (Gtk))
(c-name GtkScintilla)
)
@@ -18,7 +18,7 @@
(function gtk_scintilla_new
(c-name gtk_scintilla_new)
- (is-constructor-of GtkScintilla)
+; (is-constructor-of GtkScintilla)
(return-type GtkWidget*)
)
Index: scintilla/scintilla.overrides
===================================================================
RCS file: /repository/php-gtk/ext/scintilla/scintilla.overrides,v
retrieving revision 1.4
diff -u -r1.4 scintilla.overrides
--- scintilla/scintilla.overrides 15 Aug 2001 03:24:24 -0000 1.4
+++ scintilla/scintilla.overrides 30 Nov 2001 10:08:30 -0000
@@ -3,6 +3,7 @@
headers
#include <gtkscintilla.h>
#include "ext/gtk+/php_gtk+.h"
+#include "ext/scintilla/php_scintilla.h"
%%
constants
REGISTER_LONG_CONSTANT("SCINTILLA_INVALID_POSITION", INVALID_POSITION,
CONST_CS | CONST_PERSISTENT);
Index: sqpane/Makefile.in
===================================================================
RCS file: /repository/php-gtk/ext/sqpane/Makefile.in,v
retrieving revision 1.3
diff -u -r1.3 Makefile.in
--- sqpane/Makefile.in 21 Nov 2001 21:05:09 -0000 1.3
+++ sqpane/Makefile.in 30 Nov 2001 10:08:32 -0000
@@ -9,7 +9,7 @@
php_sqpane.o php_sqpane.lo php_sqpane.slo: gen_ce_sqpane.h
gen_sqpane.c: sqpane.defs sqpane.overrides
- $(PHP) -q $(top_srcdir)/generator/generator.php -o
$(srcdir)/sqpane.overrides -p SQPane -r
$(top_srcdir)/ext/gtk%2b/gtk.defs $(srcdir)/sqpane.defs > gen_sqpane.c
+ $(PHP) -q $(top_srcdir)/generator/generator.php -o
$(srcdir)/sqpane.overrides -p SQPane -c GtkSQPane -r
$(top_srcdir)/ext/gtk%2b/gtk.defs $(srcdir)/sqpane.defs > gen_sqpane.c
gen_ce_sqpane.h: gen_sqpane.c
grep -h "^PHP_GTK_EXPORT_CE" gen_sqpane.c | sed -e "s!^!extern !" >
gen_ce_sqpane.h
Index: sqpane/php_sqpane.h
===================================================================
RCS file: /repository/php-gtk/ext/sqpane/php_sqpane.h,v
retrieving revision 1.2
diff -u -r1.2 php_sqpane.h
--- sqpane/php_sqpane.h 14 Oct 2001 21:39:10 -0000 1.2
+++ sqpane/php_sqpane.h 30 Nov 2001 10:08:33 -0000
@@ -33,6 +33,9 @@
void php_sqpane_register_constants(int module_number TSRMLS_DC);
void php_sqpane_register_classes();
+
+#define PHP_GTK_SQPANE_GET(w) GTK_SQPANE(PHP_GTK__GET(w))
+
#else
#define sqpane_ext_ptr NULL
Index: sqpane/sqpane.defs
===================================================================
RCS file: /repository/php-gtk/ext/sqpane/sqpane.defs,v
retrieving revision 1.1
diff -u -r1.1 sqpane.defs
--- sqpane/sqpane.defs 14 Oct 2001 16:18:57 -0000 1.1
+++ sqpane/sqpane.defs 30 Nov 2001 10:08:33 -0000
@@ -2,7 +2,7 @@
; object definitions ...
(object SQPane
(in-module Gtk)
- (parent Container (Gtk))
+; (parent Container (Gtk))
(c-name GtkSQPane)
)
@@ -18,7 +18,7 @@
(function gtk_sqpane_new
(c-name gtk_sqpane_new)
- (is-constructor-of GtkSQPane)
+; (is-constructor-of GtkSQPane)
(return-type GtkWidget*)
)
Index: sqpane/sqpane.overrides
===================================================================
RCS file: /repository/php-gtk/ext/sqpane/sqpane.overrides,v
retrieving revision 1.1
diff -u -r1.1 sqpane.overrides
--- sqpane/sqpane.overrides 14 Oct 2001 16:18:57 -0000 1.1
+++ sqpane/sqpane.overrides 30 Nov 2001 10:08:33 -0000
@@ -3,6 +3,7 @@
headers
#include "gtksqpane.h"
#include "ext/gtk+/php_gtk+.h"
+#include "ext/sqpane/php_sqpane.h"
%%
constants
%%