[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] Re: Access Mozilla browser....

See:
http://www.mozilla.org/projects/embedding/

Mozilla has an embedded control that you can wrapper and add to an SWT
application.

For how to wrap controls for use in SWT see:
http://www.eclipse.org/articles/Article-Writing%20Your%20Own%20Widget/Writin
g%20Your%20Own%20Widget.htm

For example on GTK:

public class Browser extends Composite {
    int mozEmbed;
    public Browser(Composite parent, int style) {
        super(parent, style);
        mozEmbed = MOZ.gtk_moz_embed_new();
        MOZ.gtk_container_add(handle, mozEmbed);
        MOZ.gtk_widget_show(mozEmbed);
        this.addListener(SWT.Resize, new Listener(){
           public void handleEvent(Event e){
                   Rectangle rect = getClientArea();
                   MOZ.gtk_widget_set_size_request(mozEmbed,rect.width,
rect.height);
           }
        });
        .
}

"Ivan" <ivanooi@xxxxxxxxxxxx> wrote in message
news:3EA52C12.5060505@xxxxxxxxxxxxxxx
> Hi,
>
>    Is there anyway to embed the Mozilla Browser into SWT ? because
> Mozilla support more platform than IE~ but...of cause...not as good as
IE...
>
>    and...is there ayway to embed Macromedia Flash into SWT for other
> platforms ?
>
> Thanks
>