Name
hw_MasterControl -- control various internal attributes (V5.0)
Synopsis
int c = hw_MasterControl(struct hwTagList *tags);
Function
This function can be used to set/get various internal attributes. You have to pass a pointer to a hwTagList to this function. hw_MasterControl() will iterate through this taglist and set/get all the individual tags in the list. It will return the number of tags successfully handled.

The following tags are currently recognized:

HWMCP_GETPOWERPCBASE:
In the WarpOS version of Hollywood, pData will be set to a pointer of PowerPCBase. In all other versions, NULL will be written to pData.

HWMCP_GETAPPTITLE:
This tag returns the application's title as specified in the @APPTITLE preprocessor command. You have to pass a pointer to a STRPTR in pData. Hollywood will set this STRPTR to the application's title then. Hollywood will never write NULL to the STRPTR but it may return an empty string. (V5.2)

HWMCP_GETAPPVERSION:
This tag returns the application's version as specified in the @APPVERSION preprocessor command. You have to pass a pointer to a STRPTR in pData. Hollywood will set this STRPTR to the application's version then. Hollywood will never write NULL to the STRPTR but it may return an empty string. (V5.2)

HWMCP_GETAPPCOPYRIGHT:
This tag returns the application's copyright text as specified in the @APPCOPYRIGHT preprocessor command. You have to pass a pointer to a STRPTR in pData. Hollywood will set this STRPTR to the application's copyright text then. Hollywood will never write NULL to the STRPTR but it may return an empty string. (V5.2)

HWMCP_GETAPPAUTHOR:
This tag returns the application's author as specified in the @APPAUTHOR preprocessor command. You have to pass a pointer to a STRPTR in pData. Hollywood will set this STRPTR to the application's author then. Hollywood will never write NULL to the STRPTR but it may return an empty string. (V5.2)

HWMCP_GETAPPDESCRIPTION:
This tag returns the application's description as specified in the @APPDESCRIPTION preprocessor command. You have to pass a pointer to a STRPTR in pData. Hollywood will set this STRPTR to the application's description then. Hollywood will never write NULL to the STRPTR but it may return an empty string. (V5.2)

HWMCP_GETAPPIDENTIFIER:
This tag returns the application's identifier as specified in the @APPIDENTIFIER preprocessor command. You have to pass a pointer to a STRPTR in pData. Hollywood will set this STRPTR to the application's identifier then. Hollywood will never write NULL to the STRPTR but it may return an empty string. (V6.1)

HWMCP_SETCALLBACKMODE:
This tag enables or disables callback mode according to the value passed in iData. You have to pass True to enable callback mode or False to disable it. Callback mode should be enabled whenever one of your plugin's Lua functions runs another Lua function by calling lua_pcall(). Please note that HWMCP_SETCALLBACKMODE contains a nesting count. Thus, every enable operation must be matched by a disable operation. (V6.0)

HWMCP_GETGTKREADY:
This tag returns a boolean value indicating whether GTK has been setup correctly on Linux. You have to set pData to a pointer to an int. Hollywood will then write either True or False to this int. This tag is only supported on Linux. (V6.0)

HWMCP_SETDISABLELINEHOOK:
This tag can be used to enable or disable Hollywood's Lua line hook. By default, the line hook is called after executing one line of Lua code. This leads to some overhead because the line hook will handle window events and update video frames among other things. To increase performance in certain situations, your plugin can temporarily disable this line hook by setting iData to True in this tag. However, make sure that you enable it again as soon as possible because several key features of Hollywood won't work while the line hook is disabled. This tag expects either True or False in iData. (V6.0)

HWMCP_GETFPSLIMIT:
This tag returns the FPS limit that has been set by a call to Hollywood's SetFPSLimit() command. You have to set pData to a pointer to an int. Hollywood will then write the FPS limit to this int. (V6.0)

HWMCP_GETDESIGNERVERSION:
This tag returns the version of Hollywood Designer if your plugin has been opened by Hollywood Designer. You have to set pData to a pointer to a ULONG. The upper 16-bits of the ULONG will then receive Designer's version number whereas the revision number will be written to the lower 16-bits. Obviously, this tag is only recognized by Hollywood Designer and not by Hollywood itself. Note that Designer 4.0 doesn't support this tag. If your plugin was opened by Designer and hw_MasterControl() fails to obtain this tag, you can be sure that Designer 4.0 is handling your plugin. (V6.0)

HWMCP_SETGLOBALQUIT:
This tag can be used to change the state of Hollywood's global quit flag. If the global quit flag is set to True, Hollywood will immediately shutdown. In contrast to posting HWEVT_QUIT using hw_PostEvent(), setting the global quit flag will cause an instant shut down of Hollywood. (V6.1)

HWMCP_SETLIGHTCHKEVT:
Set this tag to True to make Hollywood's CheckEvent() function only call into your display adapter's HandleEvents() function and do nothing else. Normally, Hollywood's CheckEvent() function will also run event callbacks if events have triggered. You can prohibit this behaviour by setting this flag to True. If HWMCP_SETLIGHTCHKEVT has been set to True, CheckEvent() will only call your display adapter's HandleEvents() function and do nothing else. (V6.1)

HWMCP_RESETERRORFLAG:
Whenever lua_pcall() exits with an error, Hollywood expects a program shutdown and sets several internal flags to prepare this complete shutdown. If you want to keep the program running even after lua_pcall() returned an error, you have to execute HWMCP_RESETERRORFLAG to reset all internal error flags. Then Hollywood can continue running without any issues. Note that this tag doesn't take any data. Both iData and pData elements are ignored. (V6.1)

HWMCP_SETAMIGASIGNALERROR:
This tag can be used from within an Amiga signal callback installed using hw_RegisterCallback(). It allows the Amiga signal callback to pass an error code back to Hollywood. This is a glue code feature which works around the design flaw that callbacks of type HWCB_AMIGASIGNAL can't pass an error code back to Hollywood. If you need to pass an error code back to Hollywood, use this tag and set the iData member of it to the error code that should be passed back to Hollywood. See hw_RegisterCallback for details. (V6.1)

HWMCP_SETDISABLERAISEONERROR:
This tag can be used to temporarily disable an error handling function installed by Hollywood's RaiseOnError() function. Pass True in iData to disable the error handling function, False to enable it again. Normally it is not necessary to mess with error handlers installed by RaiseOnError() but in plugins doing really advanced things it might be convenient to have control over the error handler. Also see the hw_RaiseOnError() function made available by SysBase. See hw_RaiseOnError for details. (V7.0)

HWMCP_GETEXITONERROR:
This tag returns a boolean value indicating the state of Hollywood's ExitOnError() function. You have to set pData to a pointer to a ULONG. Hollywood will then write either True or False to this ULONG depending on whether ExitOnError() is currently set to True or False. (V7.1)

HWMCP_GETLUASTATE:
This tag copies a pointer to the current lua_State used by Hollywood to the pData item accompanying this tag. (V7.1)

HWMCP_GETDENSITY:
This tag copies the density setting for the main monitor to the pData member item in the tag. The pData member must be set to a pointer to a double. Note that this will only retrieve the density setting for the main monitor. Additional monitors might use different density settings. (V8.0)

HWMCP_GETAMIGASIGNALS:
This tag copies the Amiga signal mask returned by the last call to exec.library's Wait() function to the pData member item in the tag. The pData member must be set to a pointer to a ULONG. (V9.0)

HWMCP_SETFORBIDMODAL:
This tag can be used to force Hollywood to disable all library functions which start a modal event loop, e.g. WaitLeftMouse(), WaitSampleEnd(), InKeyStr(), and so on. The iData member must be set to True or False, depending on whether modal loops shall be blocked or not. Note that Wait() isn't affected by HWMCP_SETFORBIDMODAL. You can control the behaviour of Wait() by implementing your own Sleep() function using HWSDAFLAGS_SLEEP. See hw_SetDisplayAdapter for details. (V9.0)

Designer compatibility
Supported since Designer 4.

Inputs
tags
pointer to a struct hwTagList containing various tags (see above)
Results
c
the number of tags successfully handled

Show TOC