Developer

API Reference

ITRIGPLAYEREX_Split()

deprecated
Items marked as deprecated have been replaced by a more powerful, alternative feature. Deprecated interfaces include a reference to the replacement interface, which should be used for all new application development. Deprecated features are still supported for backward compatibility, but should be avoided when developing new applications.
Brew Release
Brew MP 1.0.2
See Also
ITRIGPLAYEREX_SetName() ITRIGPLAYEREX_GetName()
Description
Creates and returns a new TrigPlayer widget.
THE BEHAVIOR OF THIS METHOD WILL CHANGE IN A FUTURE RELEASE. See below for further information.
Parameters
  • po
    []:
    A pointer to an ITrigplayerEx object.
  • newPlayerName
    []:
    The name of the new TrigPlayer in /players (see below). This must not be NULL, must not be the string "default", and must be unique among all TrigPlayers that are Split() from the same original player.
  • ppNewTrigplayer
    []:
    The address of a pointer that will be filled in with the address of the new TrigPlayer widget.

Interface
ITRIGPLAYEREX
Prototype
   int ITRIGPLAYEREX_Split(ITrigplayerEx* po, const AECHAR* newPlayerName, ITrigplayerEx** ppNewTrigplayer);
Return
   A BREW error code (either SUCCESS or ENOMEMORY).
Side Effect
None
Comment
This method creates and returns a new TrigPlayer widget. The TrigML document owned by the new widget is initially empty. The caller should load content into the new TrigPlayer and insert it into a widget container as they would do normally, and when they are finished with it, they should Release() it.
Split TrigPlayers can communicate with each other by sending events to /players/, where is the newPlayerName parameter passed to the Split() method. A TrigPlayer that is created by calling ISHELL_CreateInstance() has the player name "default", but the applet can change this by calling ITRIGPLAYEREX_SetName(). It must do this BEFORE loading any content into the TrigPlayer's Trig and before otherwise observing /players or /players/default.
The lifetimes of the split TrigPlayers are completely independent. Neither owns the other, and each can be Split() again if desired.
THE IMPLEMENTATION OF THIS METHOD IN UIONE SDK 2.0 IS A STUB. Its behaviour will change in a future release. In uiOne SDK 2.0, calling this method is almost equivalent to calling ISHELL_CreateInstance(AEECLSID_TRIGPLAYER). The new TrigPlayer widget shares no state with the original. Because /trig is not shared, the new TrigPlayer's Trig model must therefore be initialized as per usual prior to loading content. /players is not shared either, which means that although the newPlayerName parameter to this method is honoured, it is not useful, because the split players cannot communicate with each other.
In a future release, the behaviour of this method will change so that the new TrigPlayer widget shares the bulk of its state with the original. All state that is independent of the content tree (such as /trig, /var, /actor, /players and the Lua virtual machine state) will be shared between the split TrigPlayers. Only the TrigML document and other data directly associated with the content tree will not be shared.
  • Follow