Name
hw_MasterServer -- call into the master server (V6.0)
Synopsis
int error = hw_MasterServer(lua_State *L, ULONG flags,
                struct hwTagList *tags);
Function
This function allows you to call into Hollywood's master server. This is necessary when you install a display adapter and do your own event processing to give Hollywood a chance to manage its asynchronous operations. The flags parameter determines which sections of the master server you want to enter. The following flags are currently defined:

HWMSFLAGS_RUNCALLBACKS:
This will run all user callbacks for events that have triggered. It does the same as the Hollywood functions CheckEvent() and WaitEvent(). If for some reason your display adapter cannot delegate event handling to CheckEvent() or WaitEvent(), the HWMSFLAGS_RUNCALLBACKS flag allows you to manually force Hollywood to run user event callbacks when you need it. Use this flag with care. It's only needed under very special circumstances.

HWMSFLAGS_DRAWVIDEOS:
This flag will update all videos that are currently playing, if necessary. Your display adapter needs to call hw_MasterServer() with this flag set whenever it does some event processing. Hollywood's video server worker threads will wake up your event loop using ForceEventLoopIteration() whenever a video needs updating. That's why you should always call hw_MasterServer() with HWMSFLAGS_DRAWVIDEOS whenever you process your window events, preferably in your hw_HandleEvents() implementation.

Please note that this function should only be used by display adapter plugins. If Hollywood is using its default display adapter, it will take care of calling into the master server on its own.

Designer compatibility
Unsupported

Inputs
L
pointer to the lua_State
flags
flags indicating what to do (see above)
tags
currently unused; pass NULL

Show TOC