import re DOXYFILE = 'Doxyfile-mcss' STYLESHEETS = [ 'https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600&subset=latin-ext', '../css/m-dark+documentation.compiled.css' ] MAIN_PROJECT_URL = 'https://magnum.graphics/' LINKS_NAVBAR1 = [ (None, 'getting-started', [ (None, 'building'), (None, 'cmake'), (None, 'custom-buildsystems') ]), (None, 'pages', [ (None, 'features'), (None, 'platforms'), (None, 'example-index'), (None, 'tips'), (None, 'utilities') ]) ] LINKS_NAVBAR2 = [ (None, 'namespaces', []), (None, 'annotated', []), (None, 'files', []), ("Python API", []) ] FINE_PRINT = """

Magnum docs. Part of the Magnum project, copyright © Vladimír Vondruš and contributors, 2010–2023.
Generated by Doxygen {doxygen_version} and m.css. Contact the team via GitHub, Gitter, e-mail or Twitter.

""" SEARCH_HELP = """

Search for symbols, directories, files, pages, OpenGL, GLSL, Vulkan and OpenAL APIs. You can omit any prefix from the symbol or file path; adding a : or / suffix lists all members of given symbol or directory.

Use / to navigate through the list, Enter to go. Tab autocompletes common prefix, you can copy a link to the result using L while M produces a Markdown link.

""" FAVICON = 'favicon.ico' VERSION_LABELS = True _magnum_colors_src = re.compile(r"""0x(?P[0-9a-f]{6})(?P[0-9a-f]{2})?(?P_s?rgba?f?)""") _magnum_colors_dst = r"""0x\g\g\g""" # Code wrapped in DOXYGEN_ELLIPSIS() will get replaced by an (Unicode) ellipsis # in the output; code wrapped in DOXYGEN_IGNORE() will get replaced by nothing. # In order to make the same code compilable, add # # #define DOXYGEN_ELLIPSIS(...) __VA_ARGS__ # #define DOXYGEN_IGNORE(...) __VA_ARGS__ # # to the snippet code. def _doxygen_ignore(code: str): for macro, replace in [('DOXYGEN_ELLIPSIS(', '…'), ('DOXYGEN_IGNORE(', '')]: while macro in code: i = code.index(macro) depth = 1 for j in range(i + len(macro), len(code)): if code[j] == '(': depth += 1 elif code[j] == ')': depth -= 1 if depth == 0: break assert depth == 0, "unmatched %s) parentheses in %s" % (macro, code) code = code[:i] + replace + code[j+1:] return code M_CODE_FILTERS_PRE = { 'C++': _doxygen_ignore } M_CODE_FILTERS_POST = { 'C++': lambda str: _magnum_colors_src.sub(_magnum_colors_dst, str) }