static Janet janet_ui_editable_combobox_on_changed(int32_t argc, Janet *argv) { janet_fixarity(argc, 2); uiEditableCombobox *cbox = janet_getuitype(argv, 0, &editable_combobox_td); assert_callable(argv, 1); void *handle = janet_ui_to_handler_data(argv[1]); uiEditableComboboxOnChanged(cbox, editable_combobox_on_changed, handle); return argv[0]; }
uiEditableCombobox *uiNewEditableCombobox(void) { uiEditableCombobox *c; uiWindowsNewControl(uiEditableCombobox, c); c->hwnd = uiWindowsEnsureCreateControlHWND(WS_EX_CLIENTEDGE, L"combobox", L"", CBS_DROPDOWN | WS_TABSTOP, hInstance, NULL, TRUE); uiWindowsRegisterWM_COMMANDHandler(c->hwnd, onWM_COMMAND, uiControl(c)); uiEditableComboboxOnChanged(c, defaultOnChanged, NULL); return c; }