cvs: php-gtk / NEWS TODO /ext/gtk+ Makefile.in config.m4 php_gdk.c php_gtk+.c
[email protected] ("Andrei Zmievski")
| Newsgroups | php.gtk |
|---|---|
| Message-ID | <cvsandrei996696103@cvsserver> |
andrei Wed Aug 1 16:01:43 2001 EDT
Added files:
/php-gtk/ext/gtk+ php_gdk.c
Modified files:
/php-gtk NEWS TODO
/php-gtk/ext/gtk+ Makefile.in config.m4 php_gtk+.c
Log:
Added GDK keysyms constants.
Index: php-gtk/NEWS
diff -u php-gtk/NEWS:1.34 php-gtk/NEWS:1.35
--- php-gtk/NEWS:1.34 Tue Jul 31 17:32:38 2001
+++ php-gtk/NEWS Wed Aug 1 16:01:41 2001
@@ -1,3 +1,4 @@
+ - added GDK keysyms constants. (Andrei)
- fixed bug with GtkStyle::copy() that was not returning the result
properly. (Andrei)
- implemented support for struct based classes (GdkRectangle, GtkAllocation,
Index: php-gtk/TODO
diff -u php-gtk/TODO:1.37 php-gtk/TODO:1.38
--- php-gtk/TODO:1.37 Tue Jul 10 14:27:44 2001
+++ php-gtk/TODO Wed Aug 1 16:01:41 2001
@@ -7,7 +7,6 @@
* Add missing field defs to gtk.defs.
* Document limitation of not being able to assign color components directly in
cascaded overloads, i.e. $style->base[GTK_STATE_NORMAL]->red = 55555.
-* Make <gdk/gdkkeysyms.h> available as constants and document them.
* Have a separate _init() function for each module(). Also have .ini setting
that automatically inits modules.
Index: php-gtk/ext/gtk+/Makefile.in
diff -u php-gtk/ext/gtk+/Makefile.in:1.3 php-gtk/ext/gtk+/Makefile.in:1.4
--- php-gtk/ext/gtk+/Makefile.in:1.3 Tue Jul 31 01:27:00 2001
+++ php-gtk/ext/gtk+/Makefile.in Wed Aug 1 16:01:42 2001
@@ -1,5 +1,5 @@
LTLIBRARY_NAME = libgtk+.la
-LTLIBRARY_SOURCES = php_gtk+.c php_gtk+_types.c gen_gtk.c gen_gdk.c
+LTLIBRARY_SOURCES = php_gtk+.c php_gdk.c php_gtk+_types.c gen_gtk.c gen_gdk.c
LTLIBRARY_LIBADD = $(GTK_PLUS_SHARED_LIBADD)
LTLIBRARY_SHARED_NAME = gtk+.la
LTLIBRARY_SHARED_LIBADD = $(GTK_PLUS_SHARED_LIBADD)
@@ -7,6 +7,7 @@
include $(top_srcdir)/build/dynlib.mk
php_gtk+.o php_gtk+.lo php_gtk+.slo: gen_gtk.h
+php_gdk.c: gen_keysyms.c
gen_gtk.c: gtk.defs gtk-extrafuncs.defs gtk.overrides
php -q $(top_srcdir)/generator/generator.php -o ext/gtk%2b/gtk.overrides -p gtk ext/gtk%2b/gtk.defs > gen_gtk.c
@@ -17,3 +18,6 @@
gen_gtk.h: gen_gtk.c gen_gdk.c
grep -h "^PHP_GTK_EXPORT_CE" gen_gtk.c gen_gdk.c | sed -e "s!^!extern !" > gen_gtk.h
grep -h "PHP_GTK_EXPORT_FUNC" gen_gtk.c gen_gdk.c | sed -e 's!$$!;!' >> gen_gtk.h
+
+gen_keysyms.c: $(GDK_KEYSYMS)
+ sed -n 's/#define \(GDK_[^ ]*\).*$$/ REGISTER_LONG_CONSTANT("\1", \1, CONST_CS | CONST_PERSISTENT);/p' < $(GDK_KEYSYMS) > gen_keysyms.c
Index: php-gtk/ext/gtk+/config.m4
diff -u php-gtk/ext/gtk+/config.m4:1.2 php-gtk/ext/gtk+/config.m4:1.3
--- php-gtk/ext/gtk+/config.m4:1.2 Tue Jul 10 14:27:47 2001
+++ php-gtk/ext/gtk+/config.m4 Wed Aug 1 16:01:42 2001
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.2 2001/07/10 18:27:47 andrei Exp $
+dnl $Id: config.m4,v 1.3 2001/08/01 20:01:42 andrei Exp $
dnl config.m4 for gtk+ module
dnl PHP_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
@@ -198,4 +198,6 @@
PHP_EVAL_LIBLINE($GTK_LIBS, GTK_PLUS_SHARED_LIBADD)
PHP_SUBST(GTK_PLUS_SHARED_LIBADD)
PHP_SUBST(GTK_PLUS_GEN_SOURCES)
+GDK_KEYSYMS=`$GTK_CONFIG --prefix`/include/gdk/gdkkeysyms.h
+PHP_SUBST(GDK_KEYSYMS)
PHP_GTK_EXTENSION(gtk+)
Index: php-gtk/ext/gtk+/php_gtk+.c
diff -u php-gtk/ext/gtk+/php_gtk+.c:1.6 php-gtk/ext/gtk+/php_gtk+.c:1.7
--- php-gtk/ext/gtk+/php_gtk+.c:1.6 Mon Jul 30 15:13:13 2001
+++ php-gtk/ext/gtk+/php_gtk+.c Wed Aug 1 16:01:42 2001
@@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: php_gtk+.c,v 1.6 2001/07/30 19:13:13 andrei Exp $: */
+/* $Id: php_gtk+.c,v 1.7 2001/08/01 20:01:42 andrei Exp $: */
#include "php_gtk.h"
#include "SAPI.h"
@@ -29,6 +29,9 @@
int le_gtk_object;
+/* defined in php_gdk.c */
+void php_gdk_register_keysyms(int module_number TSRMLS_DC);
+
static void init_gtk(void)
{
HashTable *symbol_table;
@@ -147,6 +150,7 @@
init_gtk();
php_gtk_register_constants(module_number TSRMLS_CC);
php_gdk_register_constants(module_number TSRMLS_CC);
+ php_gdk_register_keysyms(module_number TSRMLS_CC);
php_gtk_register_classes();
php_gdk_register_classes();
php_gtk_plus_register_types(module_number);
Index: php-gtk/ext/gtk+/php_gdk.c
+++ php-gtk/ext/gtk+/php_gdk.c
/*
* PHP-GTK - The PHP language bindings for GTK+
*
* Copyright (C) 2001 Andrei Zmievski <[email protected]>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* $Id: php_gdk.c,v 1.1 2001/08/01 20:01:42 andrei Exp $: */
#include "php_gtk.h"
#if HAVE_PHP_GTK
#include "php_gtk+.h"
#include <gdk/gdkkeysyms.h>
void php_gdk_register_keysyms(int module_number TSRMLS_DC)
{
#include "gen_keysyms.c"
}
#endif /* HAVE_PHP_GTK */