1#!/usr/bin/env python3 2# -*- coding: utf-8 -*- 3# 4# LVGL documentation build configuration file, created by 5# sphinx-quickstart on Wed Jun 12 16:38:40 2019. 6# 7# This file is execfile()d with the current directory set to its 8# containing dir. 9# 10# Note that not all possible configuration values are present in this 11# autogenerated file. 12# 13# All configuration values have a default; values that are commented out 14# serve to show the default. 15 16# If extensions (or modules to document with autodoc) are in another directory, 17# add these directories to sys.path here. If the directory is relative to the 18# documentation root, use os.path.abspath to make it absolute, like shown here. 19# 20import os 21import sys 22 23sys.path.insert(0, os.path.abspath('./_ext')) 24 25from sphinx.builders.html import StandaloneHTMLBuilder 26 27# -- General configuration ------------------------------------------------ 28 29# If your documentation needs a minimal Sphinx version, state it here. 30# 31# needs_sphinx = '1.0' 32 33# Add any Sphinx extension module names here, as strings. They can be 34# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 35# ones. 36extensions = [ 37 'sphinx_rtd_theme', 38 'sphinx.ext.autodoc', 39 'sphinx.ext.intersphinx', 40 'sphinx.ext.todo', 41 'breathe', 42 'sphinx_sitemap', 43 'lv_example', 44 'sphinx_design', 45 'sphinx_rtd_dark_mode', 46 'link_roles', 47 'sphinxcontrib.mermaid', 48 'sphinx_reredirects' 49] 50 51default_dark_mode = False 52 53# Add any paths that contain templates here, relative to this directory. 54templates_path = ['_templates'] 55 56# The default language to highlight source code in. The default is 'python'. 57# The value should be a valid Pygments lexer name, see Showing code examples for more details. 58 59 60highlight_language = 'c' 61 62# The suffix(es) of source filenames. 63# You can specify multiple suffix as a list of string: 64# 65source_suffix = {'.rst': 'restructuredtext'} 66 67 68# The master toctree document. 69master_doc = 'index' 70 71# General information about the project. 72project = 'LVGL' 73copyright = '2024, LVGL Kft' 74author = 'LVGL community' 75 76 77# The version info for the project you're documenting, acts as replacement for 78# |version| and |release|, also used in various other places throughout the 79# built documents. 80# 81# The short X.Y version. 82# `version` is extracted from lv_version.h using a cross-platform compatible 83# Python function in build.py, and passed in on `sphinx-build` command line. 84 85version = '' 86 87# The language for content autogenerated by Sphinx. Refer to documentation 88# for a list of supported languages. 89# 90# This is also used if you do content translation via gettext catalogs. 91# Usually you set "language" from the command line for these cases. 92language = 'en' 93 94# List of patterns, relative to source directory, that match files and 95# directories to ignore when looking for source files. 96# This patterns also effect to html_static_path and html_extra_path 97exclude_patterns = ['_build', 'doxygen_html', 'Thumbs.db', '.DS_Store', 98 'README.md', 'README_*', 'lv_examples', 'out_html', 'env', '_ext', 'examples'] 99 100# The name of the Pygments (syntax highlighting) style to use. 101pygments_style = 'sphinx' 102 103# If true, `todo` and `todoList` produce output, else they produce nothing. 104todo_include_todos = True 105 106 107# -- Options for HTML output ---------------------------------------------- 108 109# The theme to use for HTML and HTML Help pages. See the documentation for 110# a list of builtin themes. 111# 112html_theme = 'sphinx_rtd_theme' 113 114# Theme options are theme-specific and customize the look and feel of a theme 115# further. For a list of options available for each theme, see the 116# documentation. 117# 118 119# Note: 'display_version' option is now obsolete in the current (08-Oct-2024) 120# version of sphinx-rtd-theme (upgraded for Sphinx v8.x). The removed line is 121# preserved by commenting it out in case it is ever needed again. 122 123html_theme_options = { 124 # 'display_version': True, 125 'prev_next_buttons_location': 'both', 126 'style_external_links': False, 127 # 'vcs_pageview_mode': '', 128 # 'style_nav_header_background': 'white', 129 # Toc options 130 'sticky_navigation': True, 131 'navigation_depth': 4, 132 'includehidden': True, 133 'titles_only': False, 134 135 'collapse_navigation': False, 136 'logo_only': True, 137} 138 139 140# For site map generation 141if "LVGL_URLPATH" not in os.environ: 142 os.environ['LVGL_URLPATH'] = 'master' 143 144_branch = os.getenv('LVGL_URLPATH') 145html_baseurl = f"https://docs.lvgl.io/{_branch}/" 146 147 148sitemap_url_scheme = "{link}" 149 150#lvgl_github_url = f"https://github.com/lvgl/lvgl/blob/{os.environ['LVGL_GITCOMMIT']}/docs" 151 152#extlinks = {'github_link_base': (github_url + '%s', github_url)} 153 154if "LVGL_GITCOMMIT" not in os.environ: 155 os.environ['LVGL_GITCOMMIT'] = 'master' 156 157_git_commit_ref = os.getenv('LVGL_GITCOMMIT') 158 159html_context = { 160 'github_version': _git_commit_ref, 161 'github_user': 'lvgl', 162 'github_repo': 'lvgl', 163 'display_github': True, 164 'conf_py_path': '/docs/' 165} 166 167 168# Add any paths that contain custom static files (such as style sheets) here, 169# relative to this directory. They are copied after the builtin static files, 170# so a file named "default.css" will overwrite the builtin "default.css". 171html_static_path = ['_static'] 172 173# Custom sidebar templates, must be a dictionary that maps document names 174# to template names. 175# 176# This is required for the alabaster theme 177# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars 178html_sidebars = { 179 '**': [ 180 'relations.html', # needs 'show_related': True theme option to display 181 'searchbox.html', 182 ] 183} 184 185html_js_files = [ 186 'js/custom.js', 187 'js/include_html.js' 188] 189 190html_favicon = 'favicon.png' 191html_logo = 'logo_lvgl.png' 192 193# -- Options for HTMLHelp output ------------------------------------------ 194 195# Output file base name for HTML help builder. 196htmlhelp_basename = 'LVGLdoc' 197 198html_last_updated_fmt = '' 199 200# -- Options for LaTeX output --------------------------------------------- 201 202latex_engine = 'xelatex' 203latex_use_xindy = False 204latex_elements = { 205 # The paper size ('letterpaper' or 'a4paper'). 206 # 207 # 'papersize': 'letterpaper', 208 209 # The font size ('10pt', '11pt' or '12pt'). 210 # 211 # 'pointsize': '10pt', 212 213 # Additional stuff for the LaTeX preamble. 214 # 215 # 'preamble': '', 216 217 # Latex figure (float) alignment 218 # 219 # 'figure_align': 'htbp', 220 221 'inputenc': '', 222 'utf8extra': '', 223 'classoptions': ',openany,oneside', 224 'babel': '\\usepackage{babel}', 225 'passoptionstopackages': r''' 226\PassOptionsToPackage{bookmarksdepth=5}{hyperref}% depth of pdf bookmarks 227''', 228 'preamble': r''' 229\usepackage{fontspec} 230\setmonofont{DejaVu Sans Mono} 231\usepackage{silence} 232\WarningsOff* 233''', 234} 235 236# Grouping the document tree into LaTeX files. List of tuples 237# (source start file, target name, title, 238# author, documentclass [howto, manual, or own class]). 239latex_documents = [ 240 (master_doc, 'LVGL.tex', 'LVGL Documentation ' + version, 241 'LVGL community', 'manual'), 242] 243 244 245# -- Options for manual page output --------------------------------------- 246 247# One entry per manual page. List of tuples 248# (source start file, name, description, authors, manual section). 249man_pages = [ 250 (master_doc, 'lvgl', 'LVGL Documentation ' + version, 251 [author], 1) 252] 253 254 255# -- Options for Texinfo output ------------------------------------------- 256 257# Grouping the document tree into Texinfo files. List of tuples 258# (source start file, target name, title, author, 259# dir menu entry, description, category) 260texinfo_documents = [ 261 (master_doc, 'LVGL', 'LVGL Documentation ' + version, 262 author, 'Contributors of LVGL', 'One line description of project.', 263 'Miscellaneous'), 264] 265 266 267breathe_projects = { 268 "lvgl":"xml/", 269} 270 271StandaloneHTMLBuilder.supported_image_types = [ 272 'image/svg+xml', 273 'image/gif', #prefer gif over png 274 'image/png', 275 'image/jpeg' 276] 277 278 279# Enabling smart quotes action to convert -- to en dashes and --- to em dashes. 280# Converting quotation marks and ellipses is NOT done because the default 281# `smartquotes_action` 'qDe' is changed to just 'D' below, which accomplishes 282# the dash conversions as desired. 283# 284# For list of all possible smartquotes_action values, see: 285# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-smartquotes_action 286smartquotes = True 287smartquotes_action = 'D' 288 289repo_commit_hash = _git_commit_ref 290 291# -- Options for sphinx_reredirects --------------------------------------- 292 293# The below generates .HTML page redirects for pages that have been moved. 294# Browsers are redirected via `<meta http-equiv="refresh" content="0; url=new_url">`. 295redirects = { 296 "get-started/index": "../intro/basics.html" , 297 "get-started/quick-overview": "../intro/basics.html" , 298 "integration/bindings/api_json": "../../details/integration/bindings/api_json.html" , 299 "integration/bindings/cpp": "../../details/integration/bindings/cpp.html" , 300 "integration/bindings/index": "../../details/integration/bindings/index.html" , 301 "integration/bindings/javascript": "../../details/integration/bindings/javascript.html" , 302 "integration/bindings/micropython": "../../details/integration/bindings/micropython.html" , 303 "integration/bindings/pikascript": "../../details/integration/bindings/pikascript.html" , 304 "integration/building/cmake": "../../details/integration/building/cmake.html" , 305 "integration/building/index": "../../details/integration/building/index.html" , 306 "integration/building/make": "../../details/integration/building/make.html" , 307 "integration/chip/arm": "../../details/integration/chip/arm.html" , 308 "integration/chip/espressif": "../../details/integration/chip/espressif.html" , 309 "integration/chip/index": "../../details/integration/chip/index.html" , 310 "integration/chip/nxp": "../../details/integration/chip/nxp.html" , 311 "integration/chip/renesas": "../../details/integration/chip/renesas.html" , 312 "integration/chip/stm32": "../../details/integration/chip/stm32.html" , 313 "integration/driver/X11": "../../details/integration/driver/X11.html" , 314 "integration/driver/display/fbdev": "../../../details/integration/driver/display/fbdev.html" , 315 "integration/driver/display/gen_mipi": "../../../details/integration/driver/display/gen_mipi.html" , 316 "integration/driver/display/ili9341": "../../../details/integration/driver/display/ili9341.html" , 317 "integration/driver/display/index": "../../../details/integration/driver/display/index.html" , 318 "integration/driver/display/lcd_stm32_guide": "../../../details/integration/driver/display/lcd_stm32_guide.html", 319 "integration/driver/display/renesas_glcdc": "../../../details/integration/driver/display/renesas_glcdc.html" , 320 "integration/driver/display/st7735": "../../../details/integration/driver/display/st7735.html" , 321 "integration/driver/display/st7789": "../../../details/integration/driver/display/st7789.html" , 322 "integration/driver/display/st7796": "../../../details/integration/driver/display/st7796.html" , 323 "integration/driver/display/st_ltdc": "../../../details/integration/driver/display/st_ltdc.html" , 324 "integration/driver/index": "../../details/integration/driver/index.html" , 325 "integration/driver/libinput": "../../details/integration/driver/libinput.html" , 326 "integration/driver/opengles": "../../details/integration/driver/opengles.html" , 327 "integration/driver/touchpad/evdev": "../../../details/integration/driver/touchpad/evdev.html" , 328 "integration/driver/touchpad/ft6x36": "../../../details/integration/driver/touchpad/ft6x36.html" , 329 "integration/driver/touchpad/index": "../../../details/integration/driver/touchpad/index.html" , 330 "integration/driver/wayland": "../../details/integration/driver/wayland.html" , 331 "integration/driver/windows": "../../details/integration/driver/windows.html" , 332 "integration/framework/arduino": "../../details/integration/framework/arduino.html" , 333 "integration/framework/index": "../../details/integration/framework/index.html" , 334 "integration/framework/platformio": "../../details/integration/framework/platformio.html" , 335 "integration/framework/tasmota-berry": "../../details/integration/framework/tasmota-berry.html" , 336 "integration/ide/index": "../../details/integration/ide/index.html" , 337 "integration/ide/mdk": "../../details/integration/ide/mdk.html" , 338 "integration/ide/pc-simulator": "../../details/integration/ide/pc-simulator.html" , 339 "integration/index": "../details/integration/index.html" , 340 "integration/os/freertos": "../../details/integration/os/freertos.html" , 341 "integration/os/index": "../../details/integration/os/index.html" , 342 "integration/os/mqx": "../../details/integration/os/mqx.html" , 343 "integration/os/nuttx": "../../details/integration/os/nuttx.html" , 344 "integration/os/px5": "../../details/integration/os/px5.html" , 345 "integration/os/qnx": "../../details/integration/os/qnx.html" , 346 "integration/os/rt-thread": "../../details/integration/os/rt-thread.html" , 347 "integration/os/yocto/core_components": "../../../details/integration/os/yocto/core_components.html" , 348 "integration/os/yocto/index": "../../../details/integration/os/yocto/index.html" , 349 "integration/os/yocto/lvgl_recipe": "../../../details/integration/os/yocto/lvgl_recipe.html" , 350 "integration/os/yocto/terms_and_variables": "../../../details/integration/os/yocto/terms_and_variables.html" , 351 "integration/os/zephyr": "../../details/integration/os/zephyr.html" , 352 "layouts/flex": "../details/base-widget/layouts/flex.html" , 353 "layouts/grid": "../details/base-widget/layouts/grid.html" , 354 "layouts/index": "../details/base-widget/layouts/index.html" , 355 "libs/arduino_esp_littlefs": "../details/libs/arduino_esp_littlefs.html" , 356 "libs/arduino_sd": "../details/libs/arduino_sd.html" , 357 "libs/barcode": "../details/libs/barcode.html" , 358 "libs/bmp": "../details/libs/bmp.html" , 359 "libs/ffmpeg": "../details/libs/ffmpeg.html" , 360 "libs/freetype": "../details/libs/freetype.html" , 361 "libs/fs": "../details/libs/fs.html" , 362 "libs/gif": "../details/libs/gif.html" , 363 "libs/index": "../details/libs/index.html" , 364 "libs/lfs": "../details/libs/lfs.html" , 365 "libs/libjpeg_turbo": "../details/libs/libjpeg_turbo.html" , 366 "libs/libpng": "../details/libs/libpng.html" , 367 "libs/lodepng": "../details/libs/lodepng.html" , 368 "libs/qrcode": "../details/libs/qrcode.html" , 369 "libs/rle": "../details/libs/rle.html" , 370 "libs/rlottie": "../details/libs/rlottie.html" , 371 "libs/svg": "../details/libs/svg.html" , 372 "libs/tiny_ttf": "../details/libs/tiny_ttf.html" , 373 "libs/tjpgd": "../details/libs/tjpgd.html" , 374 "others/file_explorer": "../details/other-components/file_explorer.html" , 375 "others/font_manager": "../details/other-components/font_manager.html" , 376 "others/fragment": "../details/other-components/fragment.html" , 377 "others/gridnav": "../details/other-components/gridnav.html" , 378 "others/ime_pinyin": "../details/other-components/ime_pinyin.html" , 379 "others/imgfont": "../details/other-components/imgfont.html" , 380 "others/index": "../details/other-components/index.html" , 381 "others/monkey": "../details/other-components/monkey.html" , 382 "others/obj_id": "../details/other-components/obj_id.html" , 383 "others/obj_property": "../details/other-components/obj_property.html" , 384 "others/observer": "../details/other-components/observer.html" , 385 "others/snapshot": "../details/other-components/snapshot.html" , 386 "overview/animations": "../details/main-components/animation.html" , 387 "overview/color": "../details/main-components/color.html" , 388 "overview/coord": "../details/base-widget/coord.html" , 389 "overview/debugging/gdb_plugin": "../../details/debugging/gdb_plugin.html" , 390 "overview/debugging/index": "../../details/debugging/index.html" , 391 "overview/debugging/log": "../../details/debugging/log.html" , 392 "overview/debugging/profiler": "../../details/debugging/profiler.html" , 393 "overview/debugging/vg_lite_tvg": "../../details/debugging/vg_lite_tvg.html" , 394 "overview/display": "../details/main-components/display.html" , 395 "overview/event": "../details/base-widget/event.html" , 396 "overview/font": "../details/main-components/font.html" , 397 "overview/fs": "../details/main-components/fs.html" , 398 "overview/image": "../details/main-components/image.html" , 399 "overview/indev": "../details/main-components/indev.html" , 400 "overview/index": "../details/main-components/index.html" , 401 "overview/layer": "../details/base-widget/layer.html" , 402 "overview/new_widget": "../details/widgets/new_widget.html" , 403 "overview/obj": "../details/base-widget/obj.html" , 404 "overview/renderers/arm2d": "../../details/integration/renderers/arm2d.html" , 405 "overview/renderers/index": "../../details/integration/renderers/index.html" , 406 "overview/renderers/nema_gfx": "../../details/integration/renderers/nema_gfx.html" , 407 "overview/renderers/pxp": "../../details/integration/renderers/nxp_pxp.html" , 408 "overview/renderers/sdl": "../../details/integration/renderers/sdl.html" , 409 "overview/renderers/stm32_dma2d": "../../details/integration/renderers/stm32_dma2d.html" , 410 "overview/renderers/sw": "../../details/integration/renderers/sw.html" , 411 "overview/renderers/vg_lite": "../../details/integration/renderers/vg_lite.html" , 412 "overview/renderers/vglite": "../../details/integration/renderers/nxp_vglite_gpu.html" , 413 "overview/scroll": "../details/base-widget/scroll.html" , 414 "overview/style": "../details/base-widget/styles/style.html" , 415 "overview/style-props": "../details/base-widget/styles/style-properties.html" , 416 "overview/timer": "../details/main-components/timer.html" , 417 "porting/display": "../details/main-components/display.html" , 418 "porting/draw": "../details/main-components/draw.html" , 419 "porting/indev": "../details/main-components/indev.html" , 420 "porting/index": "../intro/add-lvgl-to-your-project/index.html" , 421 "porting/os": "../intro/add-lvgl-to-your-project/threading.html" , 422 "porting/project": "../intro/add-lvgl-to-your-project/connecting_lvgl.html" , 423 "porting/sleep": "../intro/add-lvgl-to-your-project/threading.html" , 424 "porting/tick": "../intro/add-lvgl-to-your-project/connecting_lvgl.html" , 425 "porting/timer_handler": "../intro/add-lvgl-to-your-project/timer_handler.html" , 426 "widgets/animimg": "../details/widgets/animimg.html" , 427 "widgets/arc": "../details/widgets/arc.html" , 428 "widgets/bar": "../details/widgets/bar.html" , 429 "widgets/button": "../details/widgets/button.html" , 430 "widgets/buttonmatrix": "../details/widgets/buttonmatrix.html" , 431 "widgets/calendar": "../details/widgets/calendar.html" , 432 "widgets/canvas": "../details/widgets/canvas.html" , 433 "widgets/chart": "../details/widgets/chart.html" , 434 "widgets/checkbox": "../details/widgets/checkbox.html" , 435 "widgets/dropdown": "../details/widgets/dropdown.html" , 436 "widgets/image": "../details/widgets/image.html" , 437 "widgets/imagebutton": "../details/widgets/imagebutton.html" , 438 "widgets/index": "../details/widgets/index.html" , 439 "widgets/keyboard": "../details/widgets/keyboard.html" , 440 "widgets/label": "../details/widgets/label.html" , 441 "widgets/led": "../details/widgets/led.html" , 442 "widgets/line": "../details/widgets/line.html" , 443 "widgets/list": "../details/widgets/list.html" , 444 "widgets/lottie": "../details/widgets/lottie.html" , 445 "widgets/menu": "../details/widgets/menu.html" , 446 "widgets/msgbox": "../details/widgets/msgbox.html" , 447 "widgets/obj": "../details/base-widget/obj.html" , 448 "widgets/roller": "../details/widgets/roller.html" , 449 "widgets/scale": "../details/widgets/scale.html" , 450 "widgets/slider": "../details/widgets/slider.html" , 451 "widgets/span": "../details/widgets/spangroup.html" , 452 "widgets/spinbox": "../details/widgets/spinbox.html" , 453 "widgets/spinner": "../details/widgets/spinner.html" , 454 "widgets/switch": "../details/widgets/switch.html" , 455 "widgets/table": "../details/widgets/table.html" , 456 "widgets/tabview": "../details/widgets/tabview.html" , 457 "widgets/textarea": "../details/widgets/textarea.html" , 458 "widgets/tileview": "../details/widgets/tileview.html" , 459 "widgets/win": "../details/widgets/win.html" , 460 "details/widgets/span": "../../details/widgets/spangroup.html" , 461} 462 463# Example configuration for intersphinx: refer to the Python standard library. 464 465def setup(app): 466 # app.add_config_value('recommonmark_config', { 467 # 'enable_eval_rst': True, 468 # 'enable_auto_toc_tree': 'True', 469 # }, True) 470 # app.add_transform(AutoStructify) 471 app.add_css_file('css/custom.css') 472 app.add_css_file('css/fontawesome.min.css') 473 474 475