[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 18:13:47 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=47202
--- Comment #5 from Kenneth Rohde Christiansen <kenneth at webkit.org> 2010-10-05 18:13:46 PST ---
(In reply to comment #4)
> (In reply to comment #1)
> > 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);
>
> ViewportAttributesRef should be prefixed with "WK": WKViewportAttributesRef.
Oh, that was a typo from my side.
> The WebKit2 C API currently follows CoreFoundation's conventions regarding ref-counted types:
> 1) Types ending in "Ref" are assumed to be ref-counted using WKRetain/WKRelease
> 2) Functions that return ref-counted types should either have "Get", "Create", or "Copy" in their name
>
> (2) is important so that the caller knows whether they need to call WKRelease on the returned pointer. You have to call WKRelease for Create- or Copy-style functions, but not for Get-style functions.
>
> I'll leave the other issues to Sam and Anders.
Got it! Thanks for the explanation.
What about?
WK_EXPORT WKViewportAttributesRef WKPageCreateComputedViewportAttributes(...)
or do you have any better idea?
--
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