Lisp HUG Maillist Archive

How to find a particular window?

I have been using a plotting package that creates a window and adds it to a list of plotting windows. Whenever one particular plotting window is desired for additional drawing, I call WSET with the designator (typically a symbol). That searches a list of plotting windows for that particular one, and moves it to the top of the list to become the "current plotting window".

But in a multitasking environment this is clearly unsafe, as the "current plotting window" could be switched between drawing commands to the "current plotting window". What is current depends on the thread's perspective.

Hence, I need to include the window pane as an argument to every plotting command. My former system did not require this, and that was very convenient when only a lone user was plotting information. 

In order to ease the transition, I would like to identify windows by a symbolic id, such as window 'SINC for some particular plotting session.

The existence of the LW Window Browser indicates that it must be possible to search a tree of visible windows on screen, and check for some kind of name or identifying characteristic. Does anyone know how that window browser works? Or is this an undocumented feature of LW?

David McClain
Chief Technical Officer
Refined Audiometrics Laboratory
4391 N. Camino Ferreo
Tucson, AZ  85750

email: dbm@refined-audiometrics.com
phone: 1.520.390.3995
web: http://www.refined-audiometrics.com
Skype: dbmcclain


Re: How to find a particular window?

Hello David,

| I have been using a plotting package that creates a window and adds it
| to a list of plotting windows. Whenever one particular plotting window
| is desired for additional drawing, I call WSET with the designator
| (typically a symbol). That searches a list of plotting windows for that
| particular one, and moves it to the top of the list to become the
| "current plotting window".
|
|
| But in a multitasking environment this is clearly unsafe, as the
| "current plotting window" could be switched between drawing commands to
| the "current plotting window". What is current depends on the thread's
| perspective.
|
| Hence, I need to include the window pane as an argument to every
| plotting command. My former system did not require this, and that was
| very convenient when only a lone user was plotting information.

I believe the drawing commands should be wrapped in
  (capi:execute-with-interface interface #'commands)
call.

I do not understand whether you are willing to run several windows within
the same process/thread or not.

| In order to ease the transition, I would like to identify windows by a
| symbolic id, such as window 'SINC for some particular plotting session.
|
| The existence of the LW Window Browser indicates that it must be
| possible to search a tree of visible windows on screen, and check for
| some kind of name or identifying characteristic. Does anyone know how
| that window browser works? Or is this an undocumented feature of LW?

What about capi:locate-interface? FWIW, you can pass the :process argument
among the initargs.
--
Sincerely,
Dmitriy Ivanov
lisp.ystok.ru


Updated at: 2020-12-10 08:45 UTC