Welcome, Guest. Please login or register.

Author Topic: get window list from current screen  (Read 2609 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline kas1eTopic starter

get window list from current screen
« on: December 25, 2004, 12:14:16 PM »
where the best and easy way for getting list of my windows from current screen ? (need name of fuctions, or source example).
thanks.
 

Offline kas1eTopic starter

Re: get window list from current screen
« Reply #1 on: December 26, 2004, 04:44:43 PM »
Thanks. LockIBase is very good for determine active screen/window too. But one more question, about messages/ports/gadgets. for example:

I found active window, and want to close it. Of course if I just use CloseWindow(); on non-gatgest/busy window I have a lot of bugs. Well, I need 'closewindow gadget' emulation, I think ? As I founded in docs, i can sending some kind of message to my active window port (window->UserPort). So, can i send message like "we press close gadget" ?

 

Offline kas1eTopic starter

Re: get window list from current screen
« Reply #2 on: December 26, 2004, 08:06:40 PM »
thanks agayn Piru :)
I am writing some minuts ago alt+f4 commoditie like a win32 hotkey. It's realy help in work now :) input.device rokz. thanks.

ps. closing opus4 by alt+f4 so unacusstomed :)
 

Offline kas1eTopic starter

Re: get window list from current screen
« Reply #3 on: December 26, 2004, 09:33:31 PM »
Mui is ok, but i am testing now my tool (by Piru way), and i can close: opus4, cli, jaberrwocky(is mui), ibrowse, amirc(all mui too), golded, yam, artm, songplayer,atc - in other worlds - all program which i use. If apps have 'close
gadget' (IDCMP CloseWindow) - this window will be close.

ps. of course opus4 (as example) said Quit/No requestor. Is
good too. Just like a win32 hotkey.


 

Offline kas1eTopic starter

Re: get window list from current screen
« Reply #4 on: December 28, 2004, 02:07:00 AM »
thomas, there is a little problem anyway :( for example i want to store in my array/list (how big/long it?) all addresses of my screens (but, i do not know how many screens was opening). So my problem is it: i need to know how many screen was opening in the system, and how i can create list of all addresses of my screens. (in next i want to cycle beetwen screens for example by my created list).

The same question and for window too. How i can to know how many window was openenig for on active screen,and where/how storage all address of windows. I think it will be like this for screens:

lock = LockIBase(0);
screen = IntuitionBase->FirstScreen; //first in list

while(screen!=0)
 {
   screen = screen->NextScreen;
   // ??? how to create list of addresses
   // here ? how much it will big/long ?
 };

UnlockIBase(lock);        


thanks in advance