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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 6 04:31:10 PDT 2010


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

           Summary: Adding C api for comboboxes
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit2
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: luiz at webkit.org


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;

typedef void (*WKPageShowComboboxPopupCallback)(WKPageRef page, WKComboboxRef combobox, const void *clientInfo);
typedef void (*WKPageHideComboboxPopupCallback)(WKPageRef page, WKComboboxRef combobox, const void *clientInfo);

struct WKPageComboboxClient {
    int                                                                 version;
    const void *                                                        clientInfo;
    WKPageShowComboboxPopupCallback                                     show;
    WKPageShowComboboxPopupCallback                                     hide;
};
typedef struct WKPageComboboxClient WKPageComboboxClient;

WK_EXPORT void WKComboboxSelectItem(WKComboboxRef combobox, int index, bool ctrl, bool shift);
WK_EXPORT void WKComboboxDidHide(WKComboboxRef combobox);

WK_EXPORT int WKComboboxGetItemCount(WKComboboxRef combobox);
WK_EXPORT bool WKComboboxGetIsMultiple(WKComboboxRef combobox);

enum {
    kWKComboboxItemTypeOption = 0,
    kWKComboboxItemTypeGroup = 1,
    kWKComboboxItemTypeSeparator = 2
};
typedef uint32_t WKComboboxItemType;

WK_EXPORT WKComboboxItemType WKComboboxGetItemItype(WKComboboxRef combobox, int index);
WK_EXPORT WKStringRef WKComboboxCopyItemText(WKComboboxRef combobox, int index);
WK_EXPORT WKStringRef WKComboboxCopyItemTooltip(WKComboboxRef combobox, int index);
WK_EXPORT bool WKComboboxGetItemIsEnabled(WKComboboxRef combobox, int index);
WK_EXPORT bool WKComboboxGetItemIsSelected(WKComboboxRef combobox, int index);

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