Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

webview functionality for embedded fltk windows

License

NotificationsYou must be signed in to change notification settings

fltk-rs/fltk-webview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This provides webview functionality for embedded fltk windows.

Usage

Add fltk-webview to your fltk application's Cargo.toml file:

[dependencies]fltk ="1"fltk-webview ="0.4"

Then you can embed a webview using fltk_webview::Webview::create:

use fltk::{app, prelude::*, window};use fltk_webview::*;fnmain(){let app = app::App::default();letmut win = window::Window::default().with_size(800,600).with_label("Webview");letmut wv_win = window::Window::default().with_size(790,590).center_of_parent();    win.end();    win.make_resizable(true);    win.show();letmut wv =Webview::create(false,&mut wv_win);    wv.navigate("https://google.com");        app.run().unwrap();}

Dependencies

  • fltk-rs's dependencies, which can be foundhere.
  • On Windows: No other dependencies.
  • On MacOS: No other dependencies.
  • On X11/wayland platforms, webkit2gtk:
    • Debian-based distros:sudo apt-get install libwebkit2gtk-4.1-dev.
    • RHEL-based distros:sudo dnf install webkit2gtk3-devel.

Known Issues

The situation on linux is quite bad. It depends on whether you're running X11 or wayland. On wayland, this will use xwayland. On X11, I can't get embedding to work on Gnome's mutter window manager, which keeps fighting for ownership of the webview window, causing flickering or a blank screen!D=x11 environment variable for webkit2gtk to work properly.

alt_test

alt_test

About

webview functionality for embedded fltk windows

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp