DirectX control in browser plugin

I need to insert a directx control in a browser firebreath plugin. Can someone send a sample how to do this? I have no knowledge in plugins ...

10x

0
source share
1 answer

I have no example that I can give you, but I can tell you what you need to do.

Read the following first: http://colonelpanic.net/2010/11/firebreath-tips-drawing-on-windows/

This will give you an overview of how drawing works in FireBreath.

First, you configure everything when handling AttachedEvent.

  • Create a new stream for processing the drawing (your DirectX drawing should not be in the main stream)
  • HWND PluginWindowWin ( FB:: PluginWindow * FB:: PluginWindowWin getHWND())
  • DirectX HWND. - , .
  • RefreshEvent ( WM_PAINT), - , , .
  • , DetachedEvent .

, DirectX . , ( ), Firefox - , .

, , .

. boost::, , , .

boost::thread t(&MyClass::someFunction, this, theHWND);

. , , - , - , , DetachedEvent. , , FB:: SafeQueue, , FireBreath. , ; ( , ).

// Inside MyClass
void someFunction(HWND theHWND) {
    ...
}
+2

All Articles