FLTK logo

[fltk.general] embedding a webview in an fltk app (some issues)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

embedding a webview in an fltk app (some issues) Mo_Al_ May 13, 2021  
  Hello

I've been experimenting with embedding a webview (https://github.com/webview/webview) in an fltk application.
This works by just passing an fl_xid of an Fl_Window to the webview_create function which accepts an opaque pointer to either a HWND, NSWindow or GtkWindow depending on the platform.

- On Windows, things work fine.

- On MacOS, any manipulation of the embedded window throws an objc exception (doesn't crash) of unrecognized selector "did_view_resolution_change" to WKWebView.
"did_view_resolution_change" is a method of FLView which inherits NSView (in fl_cocoa.mm). I'm not entirely sure why it's being automatically triggered here or if there's a way to override it or "swizzle" it (I'm not familiar with Objective-C).

- On linux, I'm getting the idea that trying to construct GtkWindow from an Fl_Window is quite complex. Apparently it's possible to construct a GdkWindow from an XID, however getting a GtkWindow from a GdkWindow is not possible. I'm not sure of any other way to do it. I would appreciate any insight on the feasibility of doing this.

Thank you

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/f572ec75-87eb-46a0-8427-90ef6b767b50n%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.