gnope php gtk gui gnope.org  

Strange scripting, any1 familiar with it?

 
Post new topic   Reply to topic    gnope.org Forum Index -> PHP GTK2 Beginners
View previous topic :: View next topic  
Author Message
shivaspace



Joined: 19 Jul 2006
Posts: 8

PostPosted: Wed Jul 19, 2006 4:40 pm    Post subject: Strange scripting, any1 familiar with it? Reply with quote

Could someone help me understand whats written between %% characters? it's used to override the get_filenames method for the gtkfilechooser class in php-gtk but I don't understand what language it's written into nor how I could use this to make it work in my app.
TIA



GtkFileChooser::get_filenames / get_uris override
by Christian Weiske

Hello all,
Here is the override for gtkfilechooser::get_filenames() and get_uris()

--------------
%% {{{ GtkFileChooser

%%
override gtk_file_chooser_get_filenames
PHP_METHOD
{
GSList *files;

NOT_STATIC_METHOD();

if (!php_gtk_parse_args(ZEND_NUM_ARGS(), ""))
return;

array_init(return_value);
for (files =
gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(PHPG_GOBJECT(this_ptr)));
files; files = files-> next) {
add_next_index_string(return_value, (char *) files-> data, 1);
g_free(files-> data);
}
g_slist_free(files);
}

%%
override gtk_file_chooser_get_uris
PHP_METHOD
{
GSList *files;

NOT_STATIC_METHOD();

if (!php_gtk_parse_args(ZEND_NUM_ARGS(), ""))
return;

array_init(return_value);
for (files =
gtk_file_chooser_get_uris(GTK_FILE_CHOOSER(PHPG_GOBJECT(this_ptr)));
files; files = files-> next) {
add_next_index_string(return_value, (char *) files-> data, 1);
g_free(files-> data);
}
g_slist_free(files);
}

%% }}}
--------------
Back to top
cweiske



Joined: 08 Dec 2005
Posts: 454
Location: Leipzig/Germany

PostPosted: Wed Jul 19, 2006 6:05 pm    Post subject: Reply with quote

That is C code, not php. don't mess with it unless you want to compile your own php-gtk.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    gnope.org Forum Index -> PHP GTK2 Beginners All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Templates enhanced by DigiWiki. Hosting by Tradebit.