开发者

Possibly transparent WebKit-Overlay in Gtk/Cairo?

开发者 https://www.devze.com 2023-02-09 16:04 出处:网络
I\'m building an application, which is cross-platform (Linux, Win, OS X), and especially does graphics stuff via Cairo(mm), supported by a little bit of GTK+ scaffolding (i.e. DrawingArea). I now need

I'm building an application, which is cross-platform (Linux, Win, OS X), and especially does graphics stuff via Cairo(mm), supported by a little bit of GTK+ scaffolding (i.e. DrawingArea). I now need some UI elements, which require a certain custom look. Ideally they should also be displayed as transparent overlay (i.e. different opacities for different parts of the UI).

As GTK+ is hard to customize (e.g. I want an edit-field with the suggestion-list above it), and me basically exactly knowing how I'd achieve this with HTML/CSS, the question popped up: Why not just let libwebkit handle the UI stuff?

I don't have much experience with WebKit, so what I need to know is:

  1. Does my above reasoning make sense开发者_运维问答 to anybody else?
  2. CSS has opacity, can I interface WebKit in such way that it renders onto an RGBA-offscreen surface, with alpha-values inherited from the layout-processing of the CSS styles?
  3. Even if 2. would not work, has anybody used libwebkit on an offscreen surface, which AFAIK requires redirection of keyboard and mouse interactions, probably via GTK+s provisions?


Is it possible to render web content over a clear background using WebKit? is probably as good as it gets.

0

精彩评论

暂无评论...
验证码 换一张
取 消