firebreath

Loading an image from a resource embedded in a dll

为君一笑 提交于 2019-12-12 02:52:38
问题 I'm developing a browser plugin (npapi) using FireBreath, and in it I'm trying to embed images which I need to load at runtime. I've been search, reading and experimenting for two days now but I can't seem to make it work. This is the code I ended up with: HMODULE hModule; LPCWSTR path = L"nptest.dll"; GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, path, &hModule); LPTSTR resourceName = MAKEINTRESOURCE(106); HBITMAP bitmap = (HBITMAP) LoadImage(hModule, resourceName, IMAGE

Npapi plugin crash in firefox

让人想犯罪 __ 提交于 2019-12-12 01:53:19
问题 I'm writing a npapi plugin can sign pdf document, my plugin worked in chrome, ie but in firefox when my plugin export a dialog as image i can't input anything then my plugin is crashed. Can you tell me why i can't input anything when my plugin call a dialog of windows? 回答1: From the response to the same question you asked on the firebreath-dev group: You must never block the main (UI) thread in a plugin. Run your dialog on another thread and it'll probably work. 来源: https://stackoverflow.com

Adding a user interface to an image viewer plugin

荒凉一梦 提交于 2019-12-12 00:21:20
问题 I have a general question on how to develop an image viewer plugin with Firebreath. For that, I would like to incorporate a GUI framework, like wxwidget or Qt. The GUI would be used to to fire up some dialogs, adding a toolbar on top, or to open context menus with right clicking an image. As far as I understand I have a hwnd handle and so I can draw onto a window. I also understand that I have various events I can react on, like mouse button clicks or keyboard strokes. But it fails me how I

How to fire events when plugin is loaded

女生的网名这么多〃 提交于 2019-12-11 19:33:42
问题 In my plugin I need to be able to fire event(s) once the plugin was loaded. I don't want to use the built in mechanism (adding it in the object params) since I need to be able to control the parameters which are sent along with the event firing. The problem is that when I try to fire the event in onPluginReady it just doesn't fire.. While debugging I noticed that the m_proxies is empty (in JSAPIImpl::FireEvent ), but if I try the same code for firing the event in the onMouseDown method then

Use boost locale together with Firebreath

女生的网名这么多〃 提交于 2019-12-11 19:16:57
问题 I create a chrome extension using Firebreath: http://slimtext.org And I meet a problem: the extension does not support Chinese characters very well on Windows. After a lot of research I found this: http://www.boost.org/doc/libs/1_50_0/libs/locale/doc/html/default_encoding_under_windows.html I think the solution is to use boost/locale. But the https://github.com/firebreath/firebreath-boost project does not seem to contain boost/locale. The 1.50.0 branch contains newer boost than the master

Is it possible to change the mouse cursor reliably in a Windowless Plugin running inside Chrome

人走茶凉 提交于 2019-12-11 11:25:49
问题 Our windowless plugin wants to set different mouse cursors, but it doesn't seem to get WM_SETCURSOR messages (this doesn't really surprise me for a windowless plugin that is doing composing). The browser seems to be trying to revert the cursor back to the default arrow cursor. Thus we have a hack in our plugin code to call ::SetCursor(...) after every mouse move. This works but on Chrome you get very significant flicker. This is all when we haven't captured the mouse. If we've captured it

Deploying a Firebreath plugin on a webpage without manual installation

爱⌒轻易说出口 提交于 2019-12-11 01:35:31
问题 Recently I have been experimenting with Firebreath and developed a plugin in order to showcase my c++ projects on my portfolio website. I would like to make it easy for users to look at the projects without downloading files if they are new on my website. The only issue I have at this point is that when users visit my page, they will receive a message indicating the plugin is missing. I would like to have an option for the users to automatically install my plugin without having to manually

How does a plugin resize it's window

▼魔方 西西 提交于 2019-12-10 16:51:42
问题 When I load a pdf with the following html the pdf plugin seems to resize it's windows to accommodate the complete length of the pdf file. I'm wondering how the plugin does that? <!DOCTYPE html> <html> <head> <title>Test html object tag</title> <style type = "text/css"> html { height: 100%; } body { margin: 0; padding: 0; height: 100%; } .my_style { width: 100%; min-height: 100%; } </style> </head> <body> <div class="my_style"> <object class = "my_style" data="data/test.pdf" type="application

How to fire c# COM events in c++?

[亡魂溺海] 提交于 2019-12-08 19:49:50
I have an Interface in c# in which i have declared event for example: [ComVisible(true)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [Guid("3839C631-AEDE-4535-9A28-15F4BFCA0C5A")] public Interface Isample { event OnAdd(Isample sample); } [ClassInterface(ClassInterfaceType.None)] [Guid("E81B32A2-B98C-48C0-A235-17771EE001D6")] [ComVisible(true)] public class Sample:Isample { //''''''''''''''''''''' } I want to fire this event in c# and listen it into javascript through firebreath. Thanks in advance. COM events are very different from C# events. They are much more generic, the event

boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::thread_resource_error> >

家住魔仙堡 提交于 2019-12-08 19:13:34
问题 I need some help with this exception, I am implementing a NPAPI plugin to be able to use local sockets from browser extensions, to do that I am using Firebreath framework. For socket and connectivity I am using Boost asio with async calls and a thread pool of 5 worker threads. Also I have a deadline per thread to implement a transmission timeout. My extension workflow with the plugin is as this: Open socket 1(this starts a async_receive and the deadline async_wait) Write in the socket 1 Get