anant Mon Apr 10 01:04:23 2006 UTC
Modified files:
/php-gtk/ext/scintilla scintilla.overrides
Log:
Override for GtkScintilla::get_text(). This makes basic code completion
possible.
http://cvs.php.net/viewcvs.cgi/php-gtk/ext/scintilla/scintilla.overrides?r1=1.9&r2=1.10&diff_format=u
Index: php-gtk/ext/scintilla/scintilla.overrides
diff -u php-gtk/ext/scintilla/scintilla.overrides:1.9
php-gtk/ext/scintilla/scintilla.overrides:1.10
--- php-gtk/ext/scintilla/scintilla.overrides:1.9 Fri Mar 3 14:49:06 2006
+++ php-gtk/ext/scintilla/scintilla.overrides Mon Apr 10 01:04:23 2006
@@ -7,3 +7,33 @@
%%
ignore-glob
*_get_type
+
+%%
+override gtk_scintilla_get_text
+PHP_METHOD
+{
+ int length, result;
+ char *text;
+ length = 0;
+
+ NOT_STATIC_METHOD();
+
+ if(!php_gtk_parse_args(ZEND_NUM_ARGS(), "|i", length)) {
+ return;
+ }
+
+ if(length==0) {
+ length =
gtk_scintilla_get_length(GTK_SCINTILLA(PHPG_GOBJECT(this_ptr)));
+ length++;
+ }
+
+ text = safe_emalloc(length, sizeof(char), 0);
+
+ result = gtk_scintilla_get_text(GTK_SCINTILLA(PHPG_GOBJECT(this_ptr)),
length, text);
+
+ if(result) {
+ RETURN_STRING(text, 1);
+ } else {
+ RETURN_EMPTY_STRING();
+ }
+}
--
PHP-GTK CVS Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
|