Giter Site home page Giter Site logo

Comments (2)

ottodobretsberger avatar ottodobretsberger commented on August 23, 2024

Hello! Thank you for your interest!
I am not entirely sure of a use case where Photino (a wrapper essentially for WebView2) would need to be wrapped again for various operating systems. I believe maybe extending the current implementation on a Photino Native level would align more with the goals you have set.
Additionally, Photino is written in a way where the window (and subsequent windows) are generated on a native OS level, which would make it very hard to keep it 'wrapped' within another technology.

I saw there exists the Eto.HtmlRenderer , which you could use to display your html content (Blazor?) in ETO without the need to embed Photino. Or maybe I am not understanding the full picture, and if that's the case, you could illustrate your undertaking with a few more details and we will see if we can help.

from photino.blazor.

somelinguist avatar somelinguist commented on August 23, 2024

Hello. Thanks so much for your reply and feedback.

Mostly I’m looking at trying to wrap BlazorWebView on more desktop platforms for an app that would still make use of native controls where it makes sense too.

The app I’m working on now only really needs a webview for one of the main controls. The control let’s a user edit multilingual interlinear-glossed texts. HTML seems to provide the best way to work with and layout such content.

But using wrapped native controls for other parts of the app seems to provide a more pleasant/easier to implement experience (native menus, split panels, toolbars, etc). Eto Forms provides a nice way to do that across desktop platforms. Looking at your goals, it seems some of those (like menus) might eventually come to Photino, but not all (understandably).

I initially started looking into BlazorWebView because it seemed it would provide the best way to communicate across web and native controls. Eto.Forms also provides a a that wraps WebView2 and WkWebkit, but communicating between it and other controls is a bit more indirect.

I’ve been able to successfully wrap BlazorWebView for WPF/WinForms and macOS targets in Eto.Forms (not WinUI or MacCatalyst as in MAUI).

I’ve looked into getting it to work for GTK targets in Eto as well, but it seems a lot more complicated. Part of it is just my unfamiliarity with GTK. :)

As far as I can tell, Photino is the only project to have successfully wired up BlazorWebView to the webview in GTK.

I’ve tried looking through your code to find all of the relevant parts, but still not sure I’ve found them all. I’ve already noticed that parts of it would first require wrapping more GTK function calls than Eto.Forms currently does, which shouldn’t be to much of an issue apart from making sure to get all the right ones.

I was asking about wrapping Photino mostly because you’ve already abstracted hooking BlazorWebView to the underlying webview. I was hoping it might be possible to wrap your abstracted webview in Eto. But now I see it looks like it goes through the Photino window to the webview rather than just the webview, which makes perfect sense for Photino’s goals. But wouldn’t be a good fit for wrapping in something like Eto.Forms.

For my own project, I’ve started looking at whether it would be simpler to communicate across controls just using Eto.Forms’ webview with JS and catching navigation events without using Blazor, or even just wrapping a lightweight server.

But I still find the prospect of having BlazorWebView wrapped and able to interact with native controls on more desktop platforms to be an interesting pursuit. :)

Thanks again for your help!

from photino.blazor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.