[Webkit-unassigned] [Bug 16885] Official API for raw/GL embedders

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 8 08:47:56 PST 2008


iain at openedhand.com changed:

           What    |Removed                     |Added
                 CC|                            |iain at openedhand.com

------- Comment #13 from iain at openedhand.com  2008-02-08 08:47 PDT -------
>From looking at a proper clutter webkit implementation (rather than using the
gtk WebView as a surrogate loader) this is my concept of an API. I don't know
how this would be best implemented to fit in the WebKit system. I suppose there
would just be a backend class like the gtk backend which uses the cairo backend
to draw, then people could wrap their own frontend object/widget/actor around
it, implementing their own WebView to their needs?

/* methods */
void draw (cairo_t *cr, IntRect *clip_rect); /* Draws to the cairo context */
void set_size (int width, int height); /* Sets the width/height of the page */
void set_origin (int x, int y); /* Sets the origin of the page to x,y */

/* Synthesizes events from frontend to backend */
gboolean button_press_event (ButtonEvent *event);
gboolean button_release_event (ButtonEvent *event);
gboolean motion_event (MotionEvent *event);
gboolean key_press_event (KeyEvent *event);
gboolean key_release_event (KeyEvent *event);
gboolean scroll_event (ScrollEvent *event);

/* signals */
RegionInvalidated (IntRect *region); /* Notifies the front end that the page
has been invalidated and should be redrawn */
CursorChanged (Cursor cursor); /* Notifies the front end that the cursor should
be changed */


Some other thoughts:
 * In the API above there is the method getMediaData() which gets the specific
pixel data about the page. It is possible to get this data from a cairo surface
if required.

 * A GObject binding for accessing the DOM would be useful, as could the
ability to get an object at a specific co-ordinate (or can this be retreived
through the DOM?)

 * For popup menus could we pass an array of structures (similar to GtkAction)
that describes a popup menu for the host app to draw?

 * So that the backend does not need to depend on a specific toolkit like Gtk
for form elements, there might be a need for methods that the backend calls on
the frontend, passing a cairo_t on which the front end draws the UI element as
it desires.

 * I've not mentioned clipboard support or any of the other nicities that the
llmediabase.h file mentions because these things can be implemented as needed
as in the gtk WebView class.

Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list