Table Of Contents
Core Abstraction¶
This module defines the abstraction layers for our core providers and their implementations. For further information, please refer to Architectural Overview and the Core Providers and Input Providers section of the documentation.
In most cases, you shouldn’t directly use a library that’s already covered by the core abstraction. Always try to use our providers first. In case we are missing a feature or method, please let us know by opening a new Bug report instead of relying on your library.
Warning
These are not widgets! These are just abstractions of the respective
functionality. For example, you cannot add a core image to your window.
You have to use the image widget class instead. If you’re really
looking for widgets, please refer to kivy.uix instead.
- exception kivy.core.CoreCriticalException¶
Bases:
Exception
- kivy.core.get_all_categories()¶
Get list of all provider categories.
- Returns:
list: List of all provider category names
New in version 3.0.0.
- kivy.core.get_provider_modules(category)¶
Get dict mapping provider names to module names.
- Parameters:
- category: str
The provider category (e.g., ‘window’, ‘text’, ‘image’)
- Returns:
dict: Dictionary mapping provider_name to module_name
New in version 3.0.0.
- kivy.core.get_provider_options(category)¶
Get tuple of provider names in priority order for kivy_options.
- Parameters:
- category: str
The provider category (e.g., ‘window’, ‘text’, ‘image’)
- Returns:
tuple: Tuple of provider names in priority order
New in version 3.0.0.
- kivy.core.make_provider_tuple(provider_name, all_providers, class_name=None)¶
Create a provider tuple for core_register_libs or core_select_lib.
Helper function to construct provider tuples, eliminating duplication where the provider name appears both as a string and as a dict key.
- Parameters:
- provider_name: str
The provider name (e.g., ‘sdl3’, ‘pil’, ‘android’)
- all_providers: dict
Dictionary returned by get_provider_modules()
- class_name: str, optional
Class name for 3-tuple format (used by core_select_lib)
- Returns:
- tuple: Either (provider_name, module_name) for core_register_libs,
or (provider_name, module_name, class_name) for core_select_lib
- Example:
>>> all_providers = get_provider_modules('audio_output') >>> # 2-tuple format for core_register_libs >>> make_provider_tuple('sdl3', all_providers) ('sdl3', 'audio_sdl3') >>> # 3-tuple format for core_select_lib >>> make_provider_tuple('android', all_providers, 'CameraAndroid') ('android', 'camera_android', 'CameraAndroid')
New in version 3.0.0.
- Audio Output
- Camera
- Clipboard
- OpenGL
- Image
- Spelling
- Text
- Font Context Manager
- Text Provider Selection
LabelBaseLabelBase.available_providers()LabelBase.content_heightLabelBase.content_sizeLabelBase.content_widthLabelBase.find_base_direction()LabelBase.fontidLabelBase.get_cached_extents()LabelBase.get_extents()LabelBase.get_provider_class()LabelBase.get_system_fonts_dir()LabelBase.labelLabelBase.refresh()LabelBase.register()LabelBase.register_provider()LabelBase.render()LabelBase.shorten()LabelBase.textLabelBase.text_sizeLabelBase.usersize
- Text layout
- Text Markup
- Video
- Window
KeyboardWindowBaseWindowBase.add_widget()WindowBase.clear()WindowBase.close()WindowBase.create_window()WindowBase.flip()WindowBase.get_gl_backend_name()WindowBase.get_system_theme()WindowBase.grab_mouse()WindowBase.hide()WindowBase.mainloop()WindowBase.maximize()WindowBase.minimize()WindowBase.on_close()WindowBase.on_cursor_enter()WindowBase.on_cursor_leave()WindowBase.on_drop_begin()WindowBase.on_drop_end()WindowBase.on_drop_file()WindowBase.on_drop_text()WindowBase.on_flip()WindowBase.on_hide()WindowBase.on_joy_axis()WindowBase.on_joy_ball()WindowBase.on_joy_button_down()WindowBase.on_joy_button_up()WindowBase.on_joy_hat()WindowBase.on_key_down()WindowBase.on_key_up()WindowBase.on_keyboard()WindowBase.on_maximize()WindowBase.on_memorywarning()WindowBase.on_minimize()WindowBase.on_motion()WindowBase.on_mouse_down()WindowBase.on_mouse_move()WindowBase.on_mouse_up()WindowBase.on_request_close()WindowBase.on_resize()WindowBase.on_restore()WindowBase.on_rotate()WindowBase.on_show()WindowBase.on_textedit()WindowBase.on_textinput()WindowBase.on_touch_down()WindowBase.on_touch_move()WindowBase.on_touch_up()WindowBase.raise_window()WindowBase.register_event_manager()WindowBase.release_all_keyboards()WindowBase.release_keyboard()WindowBase.remove_widget()WindowBase.request_keyboard()WindowBase.restore()WindowBase.screenshot()WindowBase.set_custom_titlebar()WindowBase.set_icon()WindowBase.set_system_cursor()WindowBase.set_title()WindowBase.set_vkeyboard_class()WindowBase.show()WindowBase.to_normalized_pos()WindowBase.transform_motion_event_2d()WindowBase.ungrab_mouse()WindowBase.unregister_event_manager()