All defined displays...

Feature requests for future versions of Hollywood can be voiced here
Post Reply
User avatar
Allanon
Posts: 732
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

All defined displays...

Post by Allanon »

It could be useful to have a parameter in GetAttribute() or a command that returns all defined Displays, this could be handy for external libraries and applets.
Example:
I make a library that open a display an do stuff, when finished in must close and free the resources, including closing & freeing its display.
What display should I restore before I free the library own display? So it could be really useful to have a complete dump of the defined displays, at least with the id, open/close state and active/inactive state.
:P
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: All defined displays...

Post by airsoftsoftwair »

Something like this might come in a future version because Hollywood 5.0 already keeps this information in handy places for the GetObjectData() and SetObjectData() functions. It should be quite an easy task to create a new function which returns all objects of a certain type (e.g. #BRUSH, #MUSIC, #DISPLAY) that are currently in memory... I'll take a note and check this again when I've time for it.
User avatar
Allanon
Posts: 732
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

Re: All defined displays...

Post by Allanon »

Great, thank you :)
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: All defined displays...

Post by airsoftsoftwair »

Code: Select all

- New: GetObjects() allows you to query Hollywood's object manager for all objects of the type specified
  in argument 1 (e.g. #BRUSH); it will then return a table containing the identifiers of all loaded objects
  of that type and the object count in the second return value (requested by Fabio Falcucci)
It's now implemented. Something like this was already planned for the 5.0 release to accompany the new object management but it seems I forgot about it.
User avatar
Allanon
Posts: 732
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

Re: All defined displays...

Post by Allanon »

great! :D
Post Reply