On Thu, Aug 04, 2005 at 20:18:05 +0300, Gábor Szabó wrote:
On 8/4/05, Jan Hudec <bulb ucw cz> wrote:I'll check the gtk-devel-list though right now it is more like general interest than actual need. It will become a need next week :-)I fear it's a bit more work than a week to do it properly. You can go with logging the X ids from the application for now.I don't know and I don't have the knowladge in this field but I think it would be important to realize that this seems to be a major issue for anyone who would like to do a black-box testing of the application.
I am not currently subscribed to the gtk devel list, so I don't intend to discuss the advanced solution now. The simple solution does not require any support though, though it is custom to the application tested. The idea is, that for each widget in the application that you need to manipulate from test suite, you add code like: $widget->signal_connect_after("realize", \&debug_realize, "widget-name") and then the hook would be along the lines of: sub debug_realize { my ($widget, $name) = @_; print STDERR $name . ':' . $widget->window->get_xid . "\n"; } Now the test driver would read stderr of the application to find which windows it should send the events to. You can only do it for widgets that actually accept events -- things like labels and images don't have their own windows. The get_xid method is for X. For Windows there should be some other similar method. ------------------------------------------------------------------------------- Jan 'Bulb' Hudec <bulb ucw cz>
Attachment:
signature.asc
Description: Digital signature