cvs: php-gtk /ext/scintilla scintilla.overrides /main php_gtk_util.c

From: Date: Tue, 14 Aug 2001 03:40:13 +0000
Subject: cvs: php-gtk /ext/scintilla scintilla.overrides /main php_gtk_util.c
Groups: php.gtk 
Request: Send a blank email to php-gtk+get-2836@lists.php.net to get a copy of this message
andrei Mon Aug 13 23:40:13 2001 EDT Modified files: /php-gtk/ext/scintilla scintilla.overrides /php-gtk/main php_gtk_util.c Log: - Add 'l' specifier to argument parsing routine. - Add the last non-generated method, find_text(). Index: php-gtk/ext/scintilla/scintilla.overrides diff -u php-gtk/ext/scintilla/scintilla.overrides:1.2 php-gtk/ext/scintilla/scintilla.overrides:1.3 --- php-gtk/ext/scintilla/scintilla.overrides:1.2 Mon Aug 13 00:52:48 2001 +++ php-gtk/ext/scintilla/scintilla.overrides Mon Aug 13 23:40:13 2001 @@ -156,3 +156,26 @@ RETURN_LONG(gtk_search_in_target(GTK_SCINTILLA(PHP_GTK_GET(this_ptr)), length, text)); } +%% +override gtk_scintilla_find_text +PHP_FUNCTION(gtk_scintilla_find_text) +{ + int flags; + char *text; + long pos, chrg_min = 0, chrg_max, + text_min, text_max; + GtkScintilla *scintilla = GTK_SCINTILLA(PHP_GTK_GET(this_ptr)); + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "is|ll", &flags, &text, &chrg_min, + &chrg_max)) + return; + + if (ZEND_NUM_ARGS() < 4) { + chrg_max = gtk_scintilla_get_line_end_position(scintilla, gtk_scintilla_get_line_count(scintilla)); + } + + RETURN_LONG(gtk_scintilla_find_text(scintilla, flags, text, chrg_min, + chrg_max, &text_min, &text_max)); +} Index: php-gtk/main/php_gtk_util.c diff -u php-gtk/main/php_gtk_util.c:1.21 php-gtk/main/php_gtk_util.c:1.22 --- php-gtk/main/php_gtk_util.c:1.21 Mon Aug 13 00:52:49 2001 +++ php-gtk/main/php_gtk_util.c Mon Aug 13 23:40:13 2001 @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: php_gtk_util.c,v 1.21 2001/08/13 04:52:49 andrei Exp $ */ +/* $Id: php_gtk_util.c,v 1.22 2001/08/14 03:40:13 andrei Exp $ */ #include "php_gtk.h" @@ -82,6 +82,16 @@ } break; + case 'l': + { + long *p = va_arg(*va, long *); + if (Z_TYPE_PP(arg) != IS_LONG && Z_TYPE_PP(arg) != IS_BOOL) + return "integer"; + else + *p = Z_LVAL_PP(arg); + } + break; + case 'c': { char *p = va_arg(*va, char *); @@ -265,7 +275,7 @@ min_argc = max_argc; break; - case 'i': case 'h': case 'c': + case 'i': case 'h': case 'l': case 'c': case 's': case 'd': case 'b': case 'a': case 'N': case 'r': case 'O': case 'o': case 'V':

« previous php.gtk (#2836) next »