Re: Search text in GtkHTML widget
| From: | Alan Knowles | Date: | Fri, 10 Oct 2003 09:00:29 +0000 |
| Subject: | Re: Search text in GtkHTML widget | ||
| References: | 1 2 3 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-3950@lists.php.net to get a copy of this message | ||
commmited to the HEAD and the PHP4 branch. - thanks .. - it's going to be a little while before I get to that in the GTK2 branch :)
Regards
Alan
Radko Sharkov wrote:
-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.comThank you Alan, I found few useful functions that allow me to make a search in GtkHTML widget. I found them in "/usr/include/gtkhtml/gtkhtml-search.h". I appended these defs in".../ext/gtkhtml/gtkhtml.defs" :;; search (method issearch (of-object HTML (Gtk)) (c-name gtk_html_isearch) (return-type none) (parameter (type-and-name gboolean forward)) )(method search (of-object HTML (Gtk)) (c-name gtk_html_engine_search) (return-type gboolean) (parameter (type-and-name const-gchar* text)) (parameter (type-and-name gboolean case_sensitive)) (parameter (type-and-name gboolean forward)) (parameter (type-and-name gboolean regular)) )(method search_set_forward (of-object HTML (Gtk)) (c-name gtk_html_engine_search_set_forward) (return-type none) (parameter (type-and-name gboolean forward)) )(method search_next (of-object HTML (Gtk)) (c-name gtk_html_engine_search_next) (return-type gboolean) )(method search_incremental (of-object HTML (Gtk)) (c-name gtk_html_engine_search_incremental) (return-type gboolean) (parameter (type-and-name const-gchar* text)) (parameter (type-and-name gboolean forward)) )and added new include directive in ".../ext/gtkhtml/gtkhtml.overrides"#include <gtkhtml/gtkhtml-search.h>(it works without this - i don't know why - but it works). After that I recompiled PHP-GTK module - and - VOILA - it works :))) My system is - RedHat 9, PHP 4.3.3, and gthkhtml 1.1.9 Thank You Again Regards, Radko Alan Knowles wrote:These may be gtkhtml2 widgets, have a look at /usr/include/gtkhtml/gtkhtml.h - it shows all the available methods in the current widget. Although they could be part of the semi-internal API (see gtkhtml/gtksearch.h) etc. and it may be possible to write a manual binding to them as I did with a few other methods. Regards Alan Radko Sharkov wrote:Hi All, I am trying to perform search in GtkHTML widget but... i don't know how. I am looking for a behavior such GtkText::select_region(). Somewhere I saw something like bunch of gtk_html_search... functions but when i tried them, I got a few diferent exception messages which explained me that such methods are not supported. Any ideas... Please help me.Regards, Radko