Marc Weustink wrote:

Michalis Kamburelis wrote:

Malcolm Poole wrote:


I have been trying to translate gtkmozembed.h, in the hope that I could produce FreePascal/Gtk programs incorporating an HTML browser. Has anyone else tried this or am I trying to do the impossible?


I have an URL [http://delphi.mozdev.org/] on my "list of interesting URLs that I should investigate when I'll have some time" :) I didn't investigate it yet, but maybe there's something useful for you.

I hadn't found this url before. They seem to be more interested in producing extensions for Mozilla using Delphi than integrating Mozilla into Delphi. But maybe I missed something.. Worth another visit.

function gtk_moz_embed_new:PGtkWidget;cdecl;external external_library name 'gtk_moz_embed_new';
Can anyone suggest what is wrong?

Your translation seems OK, so I would look for errors in other places.

Thanks

To Malcolm, how do you call this function ?

var
...
mozilla : PGtkWidget;

function create_main_window : PMainWindow;
begin
< create window>
<create gtk_hbox>
mozilla := gtk_moz_embed_new;
<add mozilla to container>
end;

I've tried declaring mozilla as PGtkMozEmbed and also casting the pointer returned from the function but it seems to be actually calling the function that causes the error. I also tried creating the widget by passing the result of gtk_moz_embed_get_type to gtk_widget_new but with exactly the same result. The widget should work as I have managed to create a very basic browser in C, but what seems to be exactly the same code in Pascal causes an exception unless the line containing gtk_moz_embed_new is commented out. I've tried all the compiler directives that seem remotely likely but with no success. I'm all out of ideas and really don't want to start writing seriuos programs in C : -(

Malcolm

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to