Difference between revisions of "IC Python API:RLPy RIEventListener"

From Reallusion Wiki!
Jump to: navigation, search
(Created page with "{{TOC}} {{Parent|IC_Python_API:RL_Python_Modules|Modules}} ==Detailed Description== Event Listener. ==Member Functions== ===RegisterCallback=== <syntaxhighlight lang="Python">...")
 
m
Line 1: Line 1:
 
{{TOC}}
 
{{TOC}}
 
{{Parent|IC_Python_API:RL_Python_Modules|Modules}}
 
{{Parent|IC_Python_API:RL_Python_Modules|Modules}}
==Detailed Description==
+
{{last_modified}}
Event Listener.
+
 
==Member Functions==
+
== Description ==
===RegisterCallback===
+
 
<syntaxhighlight lang="Python">
+
This class is a byproduct of the [[IC_Python_API:RLPy_REventHandler|REventHandler]] class, originally intended to provide an interface for registering / unregistering application events.  However, this was later refactored as features under [[IC_Python_API:RLPy_REventHandler|REventHandler]] itself. Rather than creating an object entity every time an event is registered, this class is retained instead. Due to these changes, this class is not recommended for direct usage, and API documentation and details on its internal implementation withheld.
 +
 
 +
<!--
 +
 
 +
== Member Functions ==
 +
 
 +
=== Init ( self ) ===
 +
 
 +
Initialize this event listener.
 +
 
 +
<syntaxhighlight lang="python" line='line'>
 +
RLPy.RIEventListener.Init ( self )
 +
</syntaxhighlight>
 +
 
 +
=== RegisterCallback ( self, pCallback ) ===
 +
 
 +
Register a callback to this event listener.
 +
 
 +
==== Parameters ====
 +
:'''pCallback''' [IN] The event callback - [[IC_Python_API:RLPy_REventCallback|REventCallback]]
 +
 
 +
==== Returns ====
 +
:Callback id - integer
 +
 
 +
<syntaxhighlight lang="python" line='line'>
 
RLPy.RIEventListener.RegisterCallback ( self, pCallback )
 
RLPy.RIEventListener.RegisterCallback ( self, pCallback )
 
</syntaxhighlight>
 
</syntaxhighlight>
Register callback.
+
 
====Parameters====
+
=== UnregisterCallback ( self, uId ) ===
<div style="margin-left: 2em;">
+
 
'''pCallback''' [IN] REventCallback - RLPy.REventCallback
+
Remove a callback from this event listener by id.
</div>
+
 
====Returns====
+
==== Parameters ====
<div style="margin-left: 2em;">Callback id - int
+
:'''uId''' [IN] callback id - integer
</div>
+
 
-----
+
==== Returns ====
===UnregisterCallback===
+
:Success - RLPy.RStatus.Success
<syntaxhighlight lang="Python">
+
:Failure - RLPy.RStatus.Failure
 +
 
 +
<syntaxhighlight lang="python" line='line'>
 
RLPy.RIEventListener.UnregisterCallback ( self, uId )
 
RLPy.RIEventListener.UnregisterCallback ( self, uId )
 
</syntaxhighlight>
 
</syntaxhighlight>
Remove callback with id.
 
====Parameters====
 
<div style="margin-left: 2em;">
 
'''uId''' [IN] callback id - int
 
</div>
 
====Return Values====
 
<div style="margin-left: 2em;">
 
'''RLPy.RStatus.Success''' Success
 
  
'''RLPy.RStatus.Failure''' Fail
+
=== UnregisterCallbacks ( self, kIds ) ===
</div>
+
 
-----
+
Remove callbacks from this event listener by ids.
===UnregisterCallbacks===
+
 
<syntaxhighlight lang="Python">
+
==== Parameters ====
 +
:'''kIds''' [IN] callback ids - integer
 +
 
 +
==== Returns ====
 +
:Success - RLPy.RStatus.Success
 +
:Failure - RLPy.RStatus.Failure
 +
 
 +
<syntaxhighlight lang="python" line='line'>
 
RLPy.RIEventListener.UnregisterCallbacks ( self, kIds )
 
RLPy.RIEventListener.UnregisterCallbacks ( self, kIds )
 
</syntaxhighlight>
 
</syntaxhighlight>
remove callbacks with ids
 
====Parameters====
 
<div style="margin-left: 2em;">
 
'''kIds''' [IN] callback ids - int
 
</div>
 
====Return Values====
 
<div style="margin-left: 2em;">
 
'''RLPy.RStatus.Success''' Success
 
  
'''RLPy.RStatus.Failure''' Fail
+
-->
</div>
+
-----
+
===Init===
+
<syntaxhighlight lang="Python">
+
RLPy.RIEventListener.Init ( self )
+
</syntaxhighlight>
+
initialize
+

Revision as of 03:22, 28 April 2020

Contents

Main article: Modules.
Last modified: 04/28/2020

Description

This class is a byproduct of the REventHandler class, originally intended to provide an interface for registering / unregistering application events. However, this was later refactored as features under REventHandler itself. Rather than creating an object entity every time an event is registered, this class is retained instead. Due to these changes, this class is not recommended for direct usage, and API documentation and details on its internal implementation withheld.