diff options
Diffstat (limited to 'solenv/bin/native-code.py')
-rwxr-xr-x | solenv/bin/native-code.py | 150 |
1 files changed, 150 insertions, 0 deletions
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py index 6cf298c20dc0..b7f397af4011 100755 --- a/solenv/bin/native-code.py +++ b/solenv/bin/native-code.py @@ -396,6 +396,138 @@ constructor_map = { 'writer' : writer_constructor_list, } +custom_widgets = [ + 'ArgEdit', + 'AutoCompleteMultiListBox', + 'AutoCorrEdit', + 'BookmarksBox', + 'CaptionComboBox', + 'CategoryListBox', + 'ClassificationEditView', + 'ColorConfigCtrl', + 'ColumnEdit', + 'CommandCategoryListBox', + 'ConditionEdit', + 'ContentListBox', + 'ContextVBox', + 'CuiCustomMultilineEdit', + 'CustomAnimationList', + 'CustomPropertiesControl', + 'DataTreeListBox', + 'DriverListControl', + 'DropdownBox', + 'EditBox', + 'EmojiView', + 'ExtBoxWithBtns', + 'ExtensionBox', + 'FEdit', + 'FontNameBox', + 'FontSizeBox', + 'FontStyleBox', + 'FormattedField', + 'FormulaListBox', + 'GalleryPreview', + 'IndexBox', + 'IndexBox', + 'IntellectualPropertyPartEdit', + 'LightButton', + 'LookUpComboBox', + 'MacroEventListBox', + 'ManagedMenuButton', + 'MultiLineEditSyntaxHighlight', + 'NumFormatListBox', + 'OFileURLControl', + 'OptionalBox', + 'PageNumberListBox', + 'PaperSizeListBox', + 'PriorityHBox', + 'PriorityMergedHBox', + 'PropertyControl', + 'RecentDocsView', + 'RefButton', + 'RefEdit', + 'ReplaceEdit', + 'ReturnActionEdit', + 'RowEdit', + 'RubyEdit', + 'RubyPreview', + 'RubyRadioButton', + 'SFTreeListBox', + 'SameContentListBox', + 'ScAutoFmtPreview', + 'ScCondFormatList', + 'ScCsvTableBox', + 'ScCursorRefEdit', + 'ScDPFunctionListBox', + 'ScDataTableView', + 'ScDoubleField', + 'ScEditWindow', + 'ScPivotLayoutTreeList', + 'ScPivotLayoutTreeListData', + 'ScPivotLayoutTreeListLabel', + 'ScRefButtonEx', + 'SdPageObjsTLB', + 'SearchBox', + 'SearchResultsBox', + 'SelectionListBox', + 'SentenceEditWindow', + 'SeriesListBox', + 'SfxAccCfgTabListBox', + 'SfxConfigFunctionListBox', + 'SfxConfigGroupListBox', + 'ShowNupOrderWindow', + 'ShowNupOrderWindow', + 'SidebarDialControl', + 'SidebarToolBox', + 'SmallButton', + 'SpacingListBox', + 'StatusBar', + 'StructListBox', + 'SuggestionDisplay', + 'SuggestionEdit', + 'SvSimpleTableContainer', + 'SvTabListBox', + 'SvTreeListBox', + 'SvtFileView', + 'SvtIconChoiceCtrl', + 'SvtURLBox', + 'Svx3DPreviewControl', + 'SvxCharViewControl', + 'SvxCheckListBox', + 'SvxColorListBox', + 'SvxColorValueSet', + 'SvxDictEdit', + 'SvxFillAttrBox', + 'SvxFillTypeBox', + 'SvxFontPrevWindow', + 'SvxHlmarkTreeLBox', + 'SvxHyperURLBox', + 'SvxLanguageBox', + 'SvxLanguageComboBox', + 'SvxLightCtl3D', + 'SvxNoSpaceEdit', + 'SvxPathControl', + 'SvxRelativeField', + 'SvxSwFrameExample', + 'SvxTextEncodingBox', + 'SvxTextEncodingBox', + 'SwAddressPreview', + 'SwCaptionPreview', + 'SwFieldRefTreeListBox', + 'SwGlTreeListBox', + 'SwGlossaryGroupTLB', + 'SwIdxTreeListBox', + 'SwMarkPreview', + 'SwNavHelpToolBox', + 'SwTokenWindow', + 'TableValueSet', + 'TemplateDefaultView', + 'TemplateLocalView', + 'TemplateSearchView', + 'ThesaurusAlternativesCtrl', + 'ValueSet', + ] + def get_constructor_guard(constructor): if type(full_constructor_map[constructor]) is bool: return None @@ -501,6 +633,24 @@ for constructor in sorted(full_constructor_map.keys()): if constructor_guard: print ('#endif') +print ('') +for entry in sorted(custom_widgets): + print ('void make' + entry + '();') +print ('static struct { const char *name; void(*func)(); } custom_widgets[] = {') +for entry in sorted(custom_widgets): + print (' { "make' + entry + '", make' + entry + ' },') +print ('};') +print ('') +print (""" +void (*lo_get_custom_widget_func(const char* name))() +{ + for (int i = 0; i < sizeof(custom_widgets) / sizeof(custom_widgets[0]); i++) + if (strcmp(name, custom_widgets[i].name) == 0) + return custom_widgets[i].func; + return nullptr; +} +""") + print (""" const lib_to_factory_mapping * lo_get_factory_map(void) |