Sven Neumann wrote:
Hi,
Laszlo Kovacs <[EMAIL PROTECTED]> writes:
I am developing a performance benchmark for Gnome applications. One problem that has to be solved is identification of all widgets by their names in the scripts that drive the benchmark (simulate input, measure times etc). E.g. if I want to write a benchmark script that checks for the time certain widgets need to be displayed, I need to refer those widgets somehow in the script and I need a name for that.
A benchmarking application for Motif had a little app that walked down the widget tree of the benchmarked application, created a unique name from the widget path and wrote all the names in a file. This was easy to implement as in Motif/Xt there is only one root widget in an application, every widget has a parent and popups (dialogs, menus) are referred by their parents as well. In turn using a widget name generated this way it was easy to find the corresponding widget pointer.
you can get a list of all toplevel windows using gtk_window_list_toplevels(). It should be easy to traverse the widget hierachy for each window using gtk_container_get_children(). But I think I already pointed you to these functions when you asked on #gtk+.
Thanks. Would this work for dialogs/menus as well? Can I get to all the widgets like this?
Laszlo
_______________________________________________ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
