Re: here's my problem



On Wed, 2007-02-21 at 18:43 -0500, Marcelo Yezzi wrote:
> Hello all
> 
> I'm trying to figure out what is the title text of the active window in
> my screen. I need that information to name a file that will be later
> used in another application.
> 
> As an example, if  I had to name a file right now it should be something
> like "here's_my_problem", since that's the tile of the currently active
> window in my system
> 
> So my questions are:
> 
> 1. How do I get information about the currently selected window? 
> 2. How do I get the title of that window? (I've been reading about
> Gtk::Window::get_title(), but I'm not sure)
> 
> I'm open to pretty much any programming language although I'd prefer
> either C or Perl.
> 
> Thanks in advance for any hint

You can use libwnck, which has a 
wnck_screen_get_active_window function. Once you get a WnckWindow object
you can query pretty much any window-manager-y aspect of it.

There is documentation from libwnck in the source tarball, and once it
is installed, you can look at it useing devhelp, for example.

HTH.

-- m


-- 
Mariano Su�z-Alvarez
http://www.gnome.org/~mariano





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]