[Webkit-unassigned] [Bug 47202] Adding C API for dealing with viewport meta info
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Oct 5 13:51:19 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=47202
--- Comment #1 from Kenneth Rohde Christiansen <kenneth at webkit.org> 2010-10-05 13:51:18 PST ---
Example API:
// Call to set the initial viewport (before first load) and every time the visible area changes in your app - ie. when you rotate your phone.
WK_EXPORT ViewportAttributesRef WKPageComputeViewportAttributes(WKPageRef page, int visibleWidth, int visibleHeight, int desktopWidth, int deviceWidth, int deviceHeight, int deviceDPI);
// Callback called every time the viewport attributes much be updated.
typedef void (*WKPageViewportAttributesInvalidatedCallback)(WKPageRef page, const void *clientInfo);
// Getter methods
WK_EXPORT int WKViewportArgumentsGetLayoutWidth(WKViewportAttributesRef viewportAttr);
WK_EXPORT int WKViewportArgumentsGetLayoutHeight(WKViewportAttributesRef viewportAttr);
WK_EXPORT float WKViewportArgumentsGetInitialScaleFactor(WKViewportAttributesRef viewportAttr);
WK_EXPORT float WKViewportArgumentsGetMinimumScaleFactor(WKViewportAttributesRef viewportAttr);
WK_EXPORT float WKViewportArgumentsGetMaximumScaleFactor(WKViewportAttributesRef viewportAttr);
WK_EXPORT float WKViewportArgumentsGetPixelRatio(WKViewportAttributesRef viewportAttr);
WK_EXPORT bool WKViewportArgumentsGetIsUserScalable(WKViewportAttributesRef viewportAttr);
I guess WKViewportAttributes should map to a new WebKit class or to WebCore::ViewportConfiguration which currently exists, and it being returned by WebCore::findConfigurationForViewportData(ViewportArguments...).
Comments welcome.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list