2

I have developed a plugin using NPAPI for calling Clutter Apis.

I used OpenGL+Plugin as reference while creating the plugin.

Standalone Native Clutter examples run with out any issue.

My Questions

  1. How can I create a Clutter Stage from the Plugin's WindowObject ?

  2. Also, I have read about the Clutter port of Webkit but do not know if it might be helpful for my purpose in any way ?

My platform and version info is: OS: Win-7 Clutter: 1.10

EDIT1 : I am using

ClutterStage *stage = clutter_win32_get_stage_from_window(plugin_hwnd);

but the plugin times out. Do i need to set anything else for this to work ?

Georg Fritzsche
  • 97,545
  • 26
  • 194
  • 236
  • You mean the plugin is killed by the browser for taking too long? Have you tried attaching a debugger and checking where your plugin hangs? – Georg Fritzsche Dec 03 '12 at 12:04
  • Yes. plugins hangs on clutter_main().. Havent tried a debugger yet. – user1871952 Dec 03 '12 at 12:06
  • I don't know Clutter, but `clutter_main()` start it's main loop. I.e. it doesn't return and instead runs a loop which processes events etc., which is something that plugins can't do (the browser is waiting for the plugin functions to return on the main thread). Either there is a way to run clutter on another thread or you find some way to periodically tell clutter to process events. – Georg Fritzsche Dec 03 '12 at 12:13
  • I'll try launching clutter_main() in a different thread. – user1871952 Dec 03 '12 at 12:28
  • I launched clutter_main (along with clutter_init) in a different thread, but still nothing is displayed in the browser window. Plugin no longer hangs now. – user1871952 Dec 03 '12 at 13:24
  • Now, when i launch the plugin based app, it opens one new window and displaying the content on that window.I am using clutter_stage_get_default (); My problem is to display the content on the same window in which it is launched. – user1871952 Dec 04 '12 at 08:17

0 Answers0