2

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?
smilingthax
  • 5,254
  • 1
  • 23
  • 19
  • I think you need to tag this with the language you're using. C++? – thirtydot Feb 09 '11 at 03:42
  • Well, I actually had thought about it, but I can only add one more tag -- and, as Gtk+/Cairo/libwebkit is C based, but has many language bindings, it does not really matter which language binding will be used in an answer. – smilingthax Feb 09 '11 at 05:18
  • possible duplicate of [Is it possible to render web content over a clear background using WebKit?](http://stackoverflow.com/questions/324923/is-it-possible-to-render-web-content-over-a-clear-background-using-webkit) – Anko - inactive in protest Dec 08 '13 at 14:15

1 Answers1

1

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

Community
  • 1
  • 1
smilingthax
  • 5,254
  • 1
  • 23
  • 19