home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
[Small Patch] Extended callback support in GUIWindowManager
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Sven" data-source="post: 189507" data-attributes="member: 29100"><p>Hi,</p><p></p><p>I'm currently experimenting with plugin development. In doing so, I noticed I'm missing a way to have my callback function called by the message processing thread.</p><p></p><p>Recent svn builds already have GUIWindowManager.SendThreadCallbackAndWait() but in my case the function should not wait. So I added the following method:</p><p></p><p>[code]static public int SendThreadCallback(Callback callback, int param1, int param2, object data, bool wait)[/code]</p><p></p><p></p><p>For backward compatibility, I left the old function and modified it to call the new method with <em>wait</em> set to true.</p><p></p><p>The updated file is attached. It's based on an up-to-date svn-version of GUIWindowManager.cs.</p><p></p><p>I hope this patch will be accepted since it offers more possibilities to plugin developers (in my case, I use this patch to open a dialog from a process plugin - otherwise the remote is blocked until the dialog is dismissed).</p><p>Since it's a minor change and the behaviour of existing code is not changed, it could maybe (in my opinion) be merged even before 0.2.3.0 release. This way one won't have to wait for the 0.2.4.0 (or whatever) release.</p><p></p><p></p><p>Any comments are welcome,</p><p>Sven</p></blockquote><p></p>
[QUOTE="Sven, post: 189507, member: 29100"] Hi, I'm currently experimenting with plugin development. In doing so, I noticed I'm missing a way to have my callback function called by the message processing thread. Recent svn builds already have GUIWindowManager.SendThreadCallbackAndWait() but in my case the function should not wait. So I added the following method: [code]static public int SendThreadCallback(Callback callback, int param1, int param2, object data, bool wait)[/code] For backward compatibility, I left the old function and modified it to call the new method with [I]wait[/I] set to true. The updated file is attached. It's based on an up-to-date svn-version of GUIWindowManager.cs. I hope this patch will be accepted since it offers more possibilities to plugin developers (in my case, I use this patch to open a dialog from a process plugin - otherwise the remote is blocked until the dialog is dismissed). Since it's a minor change and the behaviour of existing code is not changed, it could maybe (in my opinion) be merged even before 0.2.3.0 release. This way one won't have to wait for the 0.2.4.0 (or whatever) release. Any comments are welcome, Sven [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
[Small Patch] Extended callback support in GUIWindowManager
Contact us
RSS
Top
Bottom