[Webkit-unassigned] [Bug 47256] Adding C api for comboboxes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 6 05:39:46 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=47256





--- Comment #6 from Luiz Agostini <luiz at webkit.org>  2010-10-06 05:39:45 PST ---
(In reply to comment #1)
> (In reply to comment #0)
> > Here goes a first proposal for the C api to be used for combobox handling in webkit2. Comments are very welcome.
> > 
> > 
> > typedef const struct OpaqueWKCombobox* WKComboboxRef;
> 
> What about WKSelectPopupRef. It is for dealing with select input and it is supposed to render on top of the web contents.

I agree.

> 
> > WK_EXPORT void WKComboboxDidHide(WKComboboxRef combobox);
> 
> Is this like a "inform did hide"? I think we need a better name for that one.

I just dei not find a better option. Any suggestion?

> 
> > 
> > WK_EXPORT int WKComboboxGetItemCount(WKComboboxRef combobox);
> > WK_EXPORT bool WKComboboxGetIsMultiple(WKComboboxRef combobox);
> 
> SupportsMultiplySelections? I do not think it is clear what "IsMultiple" means.

ok.

Hera goes a new version of the proposal.

typedef const struct OpaqueWKSelectPopup* WKSelectPopupRef;

typedef void (*WKPageShowSelectPopupPopupCallback)(WKPageRef page, WKSelectPopupRef select, const void *clientInfo);
typedef void (*WKPageHideSelectPopupPopupCallback)(WKPageRef page, WKSelectPopupRef select, const void *clientInfo);

struct WKPageSelectPopupClient {
    int                                                                 version;
    const void *                                                        clientInfo;
    WKPageShowSelectPopupPopupCallback                                  show;
    WKPageShowSelectPopupPopupCallback                                  hide;
};
typedef struct WKPageSelectPopupClient WKPageSelectPopupClient;

WK_EXPORT void WKSelectPopupSelectItem(WKSelectPopupRef select, int index, bool ctrl, bool shift);
WK_EXPORT void WKSelectPopupDidHide(WKSelectPopupRef select);

WK_EXPORT int WKSelectPopupGetItemCount(WKSelectPopupRef select);
WK_EXPORT bool WKSelectPopupGetAllowMultiplySelections(WKSelectPopupRef select);

enum {
    kWKSelectPopupItemTypeOption = 0,
    kWKSelectPopupItemTypeGroup = 1,
    kWKSelectPopupItemTypeSeparator = 2
};
typedef uint32_t WKSelectPopupItemType;

WK_EXPORT WKSelectPopupItemType WKSelectPopupGetItemItype(WKSelectPopupRef select, int index);
WK_EXPORT WKStringRef WKSelectPopupCopyItemText(WKSelectPopupRef select, int index);
WK_EXPORT WKStringRef WKSelectPopupCopyItemTooltip(WKSelectPopupRef select, int index);
WK_EXPORT bool WKSelectPopupGetItemIsEnabled(WKSelectPopupRef select, int index);
WK_EXPORT bool WKSelectPopupGetItemIsSelected(WKSelectPopupRef select, int index);
WK_EXPORT bool WKSelectPopupGetItemIsInGroup(WKSelectPopupRef select, int index);

This last function was not in previous proposal. It would be used to know if a certain item is part of a previous group. Without it it is not possible to identify the end of a group.

-- 
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