blog

Delphi LLMozLib Wrapper    Jun 04, 2007 10:17

I've been hacking together a Delphi wrapper for LLMozLib. LLMozLib is a static C++ library that lets a developer embed the Mozilla browser in their application. It has been graciously released under the Mozilla Tri-License by the kind Second Life folks at Linden Lab.

So why would you want to use it? Imagine the fully capable Firefox browser in your application without the use of ActiveX/COM. There is a pretty hefty set of runtime files/folders (~15mb) that must be installed within the application directory, but we're talking about a full fledged browser, with javascript support, etc.

I'm developing an application that needs to be able to run off a USB drive and it needs to run in a controlled manner (i.e. cache and history stored on the usb drive and cleared when desired). This might be a bit of an unusual requirement, but its the one I'm imposing. eek

Anyway, it's starting to take shape. I'm using the excellent Graphics32 library to render the Browser display within a Delphi form. It's not perfect, but I've been able to support some nice things like the mouse wheel (sort of..lol). In typing this blog entry though, I've noticed I still have work to do with capturing some of the ctrl key combinations (at least ctrl-c and ctrl-v works!). confused

The main downside that I can see is that at this time LLMozLib is pretty CPU intensive since it relies on full view rendering. IOW, there is no optimization of sections for the display. There is talk on the uBrowser Google Group about reworking this.

Also, in order to display fancy Web 2.0 Javascript or Flash animations, there are no "Invalidate" type events, thus on pages that require that, I use a timer to constantly repaint the page. It's not bad visually, Graphics32 doesn't flicker one bit, but it does chew up CPU cycles. I'm hovering at about 7-15% for one of my CPU cores as I write this using 200ms refreshes. Hey what else are you going to use your additional cores and fancy graphics cards for? biggrin

If you're interested in a somewhat polished component and some simple documentation on how to use it in your Delphi apps, comment here or send me an email. If there's interest, I'll see if I can free up enough time to make it consumable for the greater Delphi community beyond what the MPL requires.

Write a comment

  • Required fields are marked with *.

If you have trouble reading the code, click on the code itself to generate a new random code.
Security Code:
 
Jean-Francois Guay
Posts: 7
Comment
LLMozLib
Reply #5 on : Sun December 14, 2008, 00:31:08
Hello,

is your LLMozLib wrapper for Delphi available somewhere? I could try to make it work with Lazarus/FreePascal, multi-platform!

From your point of view, any chances it would be possible?

best regards,

jf
Eugene
Posts: 7
Comment
Delphi LLMozLib Component
Reply #4 on : Mon November 24, 2008, 02:28:32
I am interested in a component or simple documentation on how to use it in my Delphi apps.
Thanks!
Basheer
Posts: 7
Comment
Your interesting project
Reply #3 on : Sun June 15, 2008, 03:40:09
Hello there,

I am really interested by your this blog on using LLMozLib in Delphi; I am an intermediate programmer primarily focussing on Delphi. I have a project for a public education/awareness on wildlife where I will really wish to use llmozlib from delphi, however, I have no idea how to start using llmozlib.

Would you mind to help me by providing some hints and probably some guidelines and samples how to integrate/work with the llmozlib with delpi? It is not commercial project; just for educating the public on the importance of protecting biological diversity.

I have tried to build up a sample with David Baldwin's excellent html components, however, the lack of support of javascript really limiting the presentation ability.

Many thanks in advance
Pierangelo Dal Ben
Posts: 7
Comment
Delphi LLMozLib Wrapper
Reply #2 on : Wed April 09, 2008, 02:56:59
Hi

I Would like to try the LLMozLib Wrapper to integrate a Firefox browser into my application without usiing any activex.

Can you send me the wrapper and documentation/example?

Thanks in advance for your kind reply
Sincerly

Pierangelo Dal Ben
Jose
Posts: 7
Comment
Delphi LLMozLib Wrapper
Reply #1 on : Tue March 25, 2008, 19:31:04
I am quite interested in your wrapper of LLMozLib and how you are using Gr32 for rendering, would appreciate if you could share more info (code?) on this subject.

Not for any particular project, just for fun.