update raylib to 4.5
This commit is contained in:
parent
cbcb0719a6
commit
42d6762fbe
60 changed files with 6581 additions and 18340 deletions
66
.github/workflows/build.yml
vendored
66
.github/workflows/build.yml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
|||
runs-on: macos-10.15
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11.0-alpha - 3.11.0', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9' ]
|
||||
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9' ]
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -164,7 +164,7 @@ jobs:
|
|||
# You can use PyPy versions in python-version.
|
||||
# For example, pypy2 and pypy3
|
||||
matrix:
|
||||
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11.0-alpha - 3.11.0', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9' ]
|
||||
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9' ]
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -208,36 +208,36 @@ jobs:
|
|||
path: dist/*
|
||||
|
||||
|
||||
build-rpi:
|
||||
runs-on: rpi
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Build raylib
|
||||
run: |
|
||||
cd raylib-c
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DBUILD_EXAMPLES=off -DINCLUDE_EVERYTHING=on -DSUPPORT_FILEFORMAT_JPG=on -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release -DOpenGL_GL_PREFERENCE=GLVND ..
|
||||
make -j2
|
||||
make install
|
||||
- name: Copy extras
|
||||
run: |
|
||||
cp physac/src/physac.h /usr/local/include/
|
||||
cp raygui/src/raygui.h /usr/local/include/
|
||||
|
||||
- name: Build raylib-python-cffi
|
||||
run: |
|
||||
python3 setup.py bdist_wheel
|
||||
|
||||
- name: Upload build Artifact wheel
|
||||
uses: actions/upload-artifact@v2.2.4
|
||||
with:
|
||||
name: wheel
|
||||
path: dist/*
|
||||
# build-rpi:
|
||||
# runs-on: rpi
|
||||
# steps:
|
||||
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
# - uses: actions/checkout@v2
|
||||
# with:
|
||||
# submodules: recursive
|
||||
#
|
||||
# - name: Build raylib
|
||||
# run: |
|
||||
# cd raylib-c
|
||||
# mkdir build
|
||||
# cd build
|
||||
# cmake -DBUILD_EXAMPLES=off -DINCLUDE_EVERYTHING=on -DSUPPORT_FILEFORMAT_JPG=on -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release -DOpenGL_GL_PREFERENCE=GLVND ..
|
||||
# make -j2
|
||||
# make install
|
||||
# - name: Copy extras
|
||||
# run: |
|
||||
# cp physac/src/physac.h /usr/local/include/
|
||||
# cp raygui/src/raygui.h /usr/local/include/
|
||||
#
|
||||
# - name: Build raylib-python-cffi
|
||||
# run: |
|
||||
# python3 setup.py bdist_wheel
|
||||
#
|
||||
# - name: Upload build Artifact wheel
|
||||
# uses: actions/upload-artifact@v2.2.4
|
||||
# with:
|
||||
# name: wheel
|
||||
# path: dist/*
|
||||
|
||||
build-windows:
|
||||
# The type of runner that the job will run on
|
||||
|
@ -246,7 +246,7 @@ jobs:
|
|||
# You can use PyPy versions in python-version.
|
||||
# For example, pypy2 and pypy3
|
||||
matrix:
|
||||
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11.0-alpha - 3.11.0', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9' ]
|
||||
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9' ]
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Python Bindings for Raylib 4.2
|
||||
# Python Bindings for Raylib 4.5
|
||||
|
||||
New CFFI API static bindings.
|
||||
* Automatically generated to be as close as possible to
|
||||
|
|
|
@ -15,10 +15,9 @@ Example program:
|
|||
SetTargetFPS(60)
|
||||
|
||||
camera = ffi.new("struct Camera3D *", [[18.0, 16.0, 18.0], [0.0, 0.0, 0.0], [0.0, 1.0, 0.0], 45.0, 0])
|
||||
SetCameraMode(camera[0], CAMERA_ORBITAL)
|
||||
|
||||
while not WindowShouldClose():
|
||||
UpdateCamera(camera)
|
||||
UpdateCamera(camera, CAMERA_ORBITAL)
|
||||
BeginDrawing()
|
||||
ClearBackground(RAYWHITE)
|
||||
BeginMode3D(camera[0])
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Sphinx build info version 1
|
||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: 999398ae0ca6fd9fb3a4ff0f644e1a93
|
||||
config: d3f6c06ab2f036ecf2386ff26e8dd625
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Building from source — Raylib Python documentation</title>
|
||||
|
@ -12,10 +12,11 @@
|
|||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<script src="_static/sphinx_highlight.js"></script>
|
||||
<script src="_static/js/theme.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
|
@ -28,11 +29,15 @@
|
|||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
<a href="index.html" class="icon icon-home"> Raylib Python
|
||||
|
||||
|
||||
|
||||
<a href="index.html" class="icon icon-home">
|
||||
Raylib Python
|
||||
</a>
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
|
@ -40,7 +45,7 @@
|
|||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.2</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.5</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
|
||||
|
@ -80,8 +85,8 @@
|
|||
<div class="rst-content">
|
||||
<div role="navigation" aria-label="Page navigation">
|
||||
<ul class="wy-breadcrumbs">
|
||||
<li><a href="index.html" class="icon icon-home"></a> »</li>
|
||||
<li>Building from source</li>
|
||||
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
|
||||
<li class="breadcrumb-item active">Building from source</li>
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
<a href="_sources/BUILDING.rst.txt" rel="nofollow"> View page source</a>
|
||||
</li>
|
||||
|
@ -92,9 +97,9 @@
|
|||
<div itemprop="articleBody">
|
||||
|
||||
<section id="building-from-source">
|
||||
<h1>Building from source<a class="headerlink" href="#building-from-source" title="Permalink to this headline"></a></h1>
|
||||
<h1>Building from source<a class="headerlink" href="#building-from-source" title="Permalink to this heading"></a></h1>
|
||||
<section id="have-pip-build-from-source">
|
||||
<h2>Have Pip build from source<a class="headerlink" href="#have-pip-build-from-source" title="Permalink to this headline"></a></h2>
|
||||
<h2>Have Pip build from source<a class="headerlink" href="#have-pip-build-from-source" title="Permalink to this heading"></a></h2>
|
||||
<p>This is useful if the binaries don’t work on your system, or you want to use a newer version of Raylib.</p>
|
||||
<p>First make sure Raylib is installed. On Linux/Mac it must include the pkg-config files. Best way to ensure this
|
||||
is to compile and install Raylib using CMake: <a class="reference external" href="https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux#build-raylib-using-cmake">https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux#build-raylib-using-cmake</a></p>
|
||||
|
@ -113,7 +118,7 @@ is to compile and install Raylib using CMake: <a class="reference external" href
|
|||
</div>
|
||||
</section>
|
||||
<section id="or-build-from-source-manually">
|
||||
<h2>Or, Build from source manually<a class="headerlink" href="#or-build-from-source-manually" title="Permalink to this headline"></a></h2>
|
||||
<h2>Or, Build from source manually<a class="headerlink" href="#or-build-from-source-manually" title="Permalink to this heading"></a></h2>
|
||||
<p>Useful if the Pip build doesn’t work and you want to debug it, or you want to contribute to the
|
||||
project.</p>
|
||||
<div class="admonition attention">
|
||||
|
@ -124,7 +129,7 @@ fixed it, a PR.)</p>
|
|||
<p>Manual instructions follow, but may be outdated, so see also how we actually build the wheels
|
||||
at <a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/blob/master/.github/workflows/build.yml">https://github.com/electronstudio/raylib-python-cffi/blob/master/.github/workflows/build.yml</a></p>
|
||||
<section id="windows-manual-build">
|
||||
<h3>Windows manual build<a class="headerlink" href="#windows-manual-build" title="Permalink to this headline"></a></h3>
|
||||
<h3>Windows manual build<a class="headerlink" href="#windows-manual-build" title="Permalink to this heading"></a></h3>
|
||||
<p>Clone this repo including submodules so you get correct version of
|
||||
Raylib.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="o">--</span><span class="n">recurse</span><span class="o">-</span><span class="n">submodules</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">electronstudio</span><span class="o">/</span><span class="n">raylib</span><span class="o">-</span><span class="n">python</span><span class="o">-</span><span class="n">cffi</span>
|
||||
|
@ -166,7 +171,7 @@ Would be useful if some Windows user could figure out how to auto detect this.</
|
|||
here.)</p>
|
||||
</section>
|
||||
<section id="linux-manual-build">
|
||||
<h3>Linux manual build<a class="headerlink" href="#linux-manual-build" title="Permalink to this headline"></a></h3>
|
||||
<h3>Linux manual build<a class="headerlink" href="#linux-manual-build" title="Permalink to this heading"></a></h3>
|
||||
<p>Clone this repo including submodules so you get correct version of
|
||||
Raylib.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="o">--</span><span class="n">recurse</span><span class="o">-</span><span class="n">submodules</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">electronstudio</span><span class="o">/</span><span class="n">raylib</span><span class="o">-</span><span class="n">python</span><span class="o">-</span><span class="n">cffi</span>
|
||||
|
@ -240,7 +245,7 @@ from the instructions for building the static module!</p>
|
|||
</div>
|
||||
</section>
|
||||
<section id="macos-manual-build">
|
||||
<h3>Macos manual build<a class="headerlink" href="#macos-manual-build" title="Permalink to this headline"></a></h3>
|
||||
<h3>Macos manual build<a class="headerlink" href="#macos-manual-build" title="Permalink to this heading"></a></h3>
|
||||
<p>These instructions have been tested on Macos 10.14.</p>
|
||||
<p>Clone this repo including submodules so you get correct version of
|
||||
Raylib.</p>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Python Bindings for Raylib 4.2 — Raylib Python documentation</title>
|
||||
<title>Python Bindings for Raylib 4.5 — Raylib Python documentation</title>
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
|
||||
|
@ -12,10 +12,11 @@
|
|||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<script src="_static/sphinx_highlight.js"></script>
|
||||
<script src="_static/js/theme.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
|
@ -28,11 +29,15 @@
|
|||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
<a href="index.html" class="icon icon-home"> Raylib Python
|
||||
|
||||
|
||||
|
||||
<a href="index.html" class="icon icon-home">
|
||||
Raylib Python
|
||||
</a>
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
|
@ -40,7 +45,7 @@
|
|||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Python Bindings for Raylib 4.2</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Python Bindings for Raylib 4.5</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="#quickstart">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="#installation">Installation</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#raspberry-pi">Raspberry Pi</a></li>
|
||||
|
@ -84,8 +89,8 @@
|
|||
<div class="rst-content">
|
||||
<div role="navigation" aria-label="Page navigation">
|
||||
<ul class="wy-breadcrumbs">
|
||||
<li><a href="index.html" class="icon icon-home"></a> »</li>
|
||||
<li>Python Bindings for Raylib 4.2</li>
|
||||
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
|
||||
<li class="breadcrumb-item active">Python Bindings for Raylib 4.5</li>
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
<a href="_sources/README.md.txt" rel="nofollow"> View page source</a>
|
||||
</li>
|
||||
|
@ -95,8 +100,8 @@
|
|||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<section id="python-bindings-for-raylib-4-2">
|
||||
<h1>Python Bindings for Raylib 4.2<a class="headerlink" href="#python-bindings-for-raylib-4-2" title="Permalink to this headline"></a></h1>
|
||||
<section id="python-bindings-for-raylib-4-5">
|
||||
<h1>Python Bindings for Raylib 4.5<a class="headerlink" href="#python-bindings-for-raylib-4-5" title="Permalink to this heading"></a></h1>
|
||||
<p>New CFFI API static bindings.</p>
|
||||
<ul class="simple">
|
||||
<li><p>Automatically generated to be as close as possible to
|
||||
|
@ -109,7 +114,7 @@ original Raylib.</p></li>
|
|||
<p><a class="reference external" href="http://electronstudio.github.io/raylib-python-cffi">Full documentation</a></p>
|
||||
</section>
|
||||
<section id="quickstart">
|
||||
<h1>Quickstart<a class="headerlink" href="#quickstart" title="Permalink to this headline"></a></h1>
|
||||
<h1>Quickstart<a class="headerlink" href="#quickstart" title="Permalink to this heading"></a></h1>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">pip3</span> <span class="pre">install</span> <span class="pre">raylib</span></code></p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>from pyray import *
|
||||
init_window(800, 450, "Hello")
|
||||
|
@ -123,7 +128,7 @@ close_window()
|
|||
</div>
|
||||
</section>
|
||||
<section id="installation">
|
||||
<h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline"></a></h1>
|
||||
<h1>Installation<a class="headerlink" href="#installation" title="Permalink to this heading"></a></h1>
|
||||
<p>First make sure you have the latest pip installed:</p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3 -m pip install --upgrade pip
|
||||
</pre></div>
|
||||
|
@ -136,11 +141,11 @@ close_window()
|
|||
<p>If yours isn’t available then pip will attempt to build from source, in which case you will need to have Raylib development libs installed, e.g.
|
||||
using homebrew, apt, etc.</p>
|
||||
<section id="raspberry-pi">
|
||||
<h2>Raspberry Pi<a class="headerlink" href="#raspberry-pi" title="Permalink to this headline"></a></h2>
|
||||
<p><a class="reference internal" href="RPI.html"><span class="doc std std-doc">Using on Rasperry Pi</span></a></p>
|
||||
<h2>Raspberry Pi<a class="headerlink" href="#raspberry-pi" title="Permalink to this heading"></a></h2>
|
||||
<p><a class="reference internal" href="RPI.html"><span class="std std-doc">Using on Rasperry Pi</span></a></p>
|
||||
</section>
|
||||
<section id="dynamic-binding-version">
|
||||
<h2>Dynamic binding version<a class="headerlink" href="#dynamic-binding-version" title="Permalink to this headline"></a></h2>
|
||||
<h2>Dynamic binding version<a class="headerlink" href="#dynamic-binding-version" title="Permalink to this heading"></a></h2>
|
||||
<p>There is now a separate dynamic version of this binding:</p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3 -m pip install raylib_dynamic
|
||||
</pre></div>
|
||||
|
@ -148,7 +153,7 @@ using homebrew, apt, etc.</p>
|
|||
<p>It works on some systems where the static version doesn’t, <a class="reference external" href="https://electronstudio.github.io/raylib-python-cffi/dynamic.html">but be sure to read these caveats before using it</a></p>
|
||||
</section>
|
||||
<section id="beta-testing">
|
||||
<h2>Beta testing<a class="headerlink" href="#beta-testing" title="Permalink to this headline"></a></h2>
|
||||
<h2>Beta testing<a class="headerlink" href="#beta-testing" title="Permalink to this heading"></a></h2>
|
||||
<p>If you find a bug, it may be fixed in the <a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/releases">latest dev release</a>.
|
||||
You can install an alpha or beta version by specifying the exact version number like this:</p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3 -m pip install raylib==4.2.0.0.dev4
|
||||
|
@ -156,57 +161,57 @@ You can install an alpha or beta version by specifying the exact version number
|
|||
</div>
|
||||
</section>
|
||||
<section id="problems">
|
||||
<h2>Problems?<a class="headerlink" href="#problems" title="Permalink to this headline"></a></h2>
|
||||
<p>If it doesn’t work, <a class="reference internal" href="BUILDING.html"><span class="doc std std-doc">try to build manually.</span></a>. If that works then <a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/issues">submit an issue</a>
|
||||
<h2>Problems?<a class="headerlink" href="#problems" title="Permalink to this heading"></a></h2>
|
||||
<p>If it doesn’t work, <a class="reference internal" href="BUILDING.html"><span class="std std-doc">try to build manually.</span></a>. If that works then <a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/issues">submit an issue</a>
|
||||
to let us know what you did.</p>
|
||||
<p>If you need help you can try asking <a class="reference external" href="https://discord.gg/raylib">on Discord</a>.</p>
|
||||
<p>If it still doesn’t work, <a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/issues">submit an issue</a>.</p>
|
||||
</section>
|
||||
</section>
|
||||
<section id="how-to-use">
|
||||
<h1>How to use<a class="headerlink" href="#how-to-use" title="Permalink to this headline"></a></h1>
|
||||
<h1>How to use<a class="headerlink" href="#how-to-use" title="Permalink to this heading"></a></h1>
|
||||
<p>There are two APIs, you can use either or both:</p>
|
||||
<section id="if-you-are-familiar-with-c-coding-and-the-raylib-c-library-and-you-want-to-use-an-exact-copy-of-the-c-api">
|
||||
<h2>If you are familiar with C coding and the Raylib C library and you want to use an exact copy of the C API<a class="headerlink" href="#if-you-are-familiar-with-c-coding-and-the-raylib-c-library-and-you-want-to-use-an-exact-copy-of-the-c-api" title="Permalink to this headline"></a></h2>
|
||||
<h2>If you are familiar with C coding and the Raylib C library and you want to use an exact copy of the C API<a class="headerlink" href="#if-you-are-familiar-with-c-coding-and-the-raylib-c-library-and-you-want-to-use-an-exact-copy-of-the-c-api" title="Permalink to this heading"></a></h2>
|
||||
<p>Use <a class="reference external" href="https://electronstudio.github.io/raylib-python-cffi/raylib.html">the C API</a>.</p>
|
||||
</section>
|
||||
<section id="if-you-prefer-a-slightly-more-pythonistic-api-and-don-t-mind-it-might-be-slightly-slower">
|
||||
<h2>If you prefer a slightly more Pythonistic API and don’t mind it might be slightly slower<a class="headerlink" href="#if-you-prefer-a-slightly-more-pythonistic-api-and-don-t-mind-it-might-be-slightly-slower" title="Permalink to this headline"></a></h2>
|
||||
<h2>If you prefer a slightly more Pythonistic API and don’t mind it might be slightly slower<a class="headerlink" href="#if-you-prefer-a-slightly-more-pythonistic-api-and-don-t-mind-it-might-be-slightly-slower" title="Permalink to this heading"></a></h2>
|
||||
<p>Use <a class="reference external" href="https://electronstudio.github.io/raylib-python-cffi/pyray.html">the Python API</a>.</p>
|
||||
</section>
|
||||
</section>
|
||||
<section id="app-showcase">
|
||||
<h1>App showcase<a class="headerlink" href="#app-showcase" title="Permalink to this headline"></a></h1>
|
||||
<h1>App showcase<a class="headerlink" href="#app-showcase" title="Permalink to this heading"></a></h1>
|
||||
<p><a class="reference external" href="https://github.com/pkulev/tanki">Tanki</a></p>
|
||||
<p><a class="reference external" href="https://pebaz.itch.io/alloy-bloxel-editor">Alloy Bloxel Editor</a></p>
|
||||
<p>Add your app here!</p>
|
||||
</section>
|
||||
<section id="rlzero">
|
||||
<h1>RLZero<a class="headerlink" href="#rlzero" title="Permalink to this headline"></a></h1>
|
||||
<h1>RLZero<a class="headerlink" href="#rlzero" title="Permalink to this heading"></a></h1>
|
||||
<p>A related library (that is a work in progress!):</p>
|
||||
<p><a class="reference external" href="https://github.com/electronstudio/rlzero">A simplified API for Raylib for use in education and to enable beginners to create 3d games</a></p>
|
||||
</section>
|
||||
<section id="help-wanted">
|
||||
<h1>Help wanted<a class="headerlink" href="#help-wanted" title="Permalink to this headline"></a></h1>
|
||||
<h1>Help wanted<a class="headerlink" href="#help-wanted" title="Permalink to this heading"></a></h1>
|
||||
<ul class="simple">
|
||||
<li><p>Converting more examples from C to Python</p></li>
|
||||
<li><p>Testing on more platforms</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="license-updated">
|
||||
<h1>License (updated)<a class="headerlink" href="#license-updated" title="Permalink to this headline"></a></h1>
|
||||
<h1>License (updated)<a class="headerlink" href="#license-updated" title="Permalink to this heading"></a></h1>
|
||||
<p>The bindings are now under the Eclipse Public License, so you are free to
|
||||
statically link and use in non-free / proprietary / commercial projects!</p>
|
||||
</section>
|
||||
<section id="performance">
|
||||
<h1>Performance<a class="headerlink" href="#performance" title="Permalink to this headline"></a></h1>
|
||||
<h1>Performance<a class="headerlink" href="#performance" title="Permalink to this heading"></a></h1>
|
||||
<p>For fastest performance use Pypy rather than standard Python.</p>
|
||||
<p>Every call to C is costly, so it’s slightly faster if you use Python data structures and functions when calculating
|
||||
in your update loop
|
||||
and then only convert them to C data structures when you have to call the C functions for drawing.</p>
|
||||
<section id="bunnymark">
|
||||
<h2>Bunnymark<a class="headerlink" href="#bunnymark" title="Permalink to this headline"></a></h2>
|
||||
<table class="colwidths-auto docutils align-default">
|
||||
<h2>Bunnymark<a class="headerlink" href="#bunnymark" title="Permalink to this heading"></a></h2>
|
||||
<table class="docutils align-default">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Library</p></th>
|
||||
<th class="head"><p>Implementation</p></th>
|
||||
|
@ -245,7 +250,7 @@ and then only convert them to C data structures when you have to call the C func
|
|||
</section>
|
||||
</section>
|
||||
<section id="packaging-your-app">
|
||||
<h1>Packaging your app<a class="headerlink" href="#packaging-your-app" title="Permalink to this headline"></a></h1>
|
||||
<h1>Packaging your app<a class="headerlink" href="#packaging-your-app" title="Permalink to this heading"></a></h1>
|
||||
<p>You can create a standalone binary using the Nuitka compiler. For example, here is how to package Bunnymark:</p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pip3 install nuitka
|
||||
cd examples/textures
|
||||
|
@ -254,7 +259,7 @@ python3 -m nuitka --onefile --linux-onefile-icon resources/wabbit_alpha.png text
|
|||
</div>
|
||||
</section>
|
||||
<section id="advert">
|
||||
<h1>Advert<a class="headerlink" href="#advert" title="Permalink to this headline"></a></h1>
|
||||
<h1>Advert<a class="headerlink" href="#advert" title="Permalink to this heading"></a></h1>
|
||||
<p><a class="reference external" href="https://store.steampowered.com/app/664240/RetroWar_8bit_Party_Battle/?git">RetroWar: 8-bit Party Battle</a> is out now. Defeat up to 15 of your friends in a tournament of 80s-inspired retro mini games.</p>
|
||||
<p><a class="reference external" href="https://github.com/electronstudio/pygame-zero-book">Coding Games With Pygame Zero & Python</a> is
|
||||
a book for Python beginners.</p>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Raspberry Pi — Raylib Python documentation</title>
|
||||
|
@ -12,10 +12,11 @@
|
|||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<script src="_static/sphinx_highlight.js"></script>
|
||||
<script src="_static/js/theme.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
|
@ -27,11 +28,15 @@
|
|||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
<a href="index.html" class="icon icon-home"> Raylib Python
|
||||
|
||||
|
||||
|
||||
<a href="index.html" class="icon icon-home">
|
||||
Raylib Python
|
||||
</a>
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
|
@ -39,7 +44,7 @@
|
|||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.2</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.5</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
|
||||
|
@ -70,8 +75,8 @@
|
|||
<div class="rst-content">
|
||||
<div role="navigation" aria-label="Page navigation">
|
||||
<ul class="wy-breadcrumbs">
|
||||
<li><a href="index.html" class="icon icon-home"></a> »</li>
|
||||
<li>Raspberry Pi</li>
|
||||
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
|
||||
<li class="breadcrumb-item active">Raspberry Pi</li>
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
<a href="_sources/RPI.rst.txt" rel="nofollow"> View page source</a>
|
||||
</li>
|
||||
|
@ -82,24 +87,28 @@
|
|||
<div itemprop="articleBody">
|
||||
|
||||
<section id="raspberry-pi">
|
||||
<h1>Raspberry Pi<a class="headerlink" href="#raspberry-pi" title="Permalink to this headline"></a></h1>
|
||||
<h1>Raspberry Pi<a class="headerlink" href="#raspberry-pi" title="Permalink to this heading"></a></h1>
|
||||
<p>Please use Raspberry Pi OS Bullseye. Older OSes are not tested.</p>
|
||||
<p>We have published a binary wheel using Raylib in X11 mode. This <em>should</em> install and work on Bullseye
|
||||
with</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python3</span> <span class="o">-</span><span class="n">m</span> <span class="n">pip</span> <span class="n">install</span> <span class="n">raylib</span><span class="o">==</span><span class="mf">4.2.0.0</span><span class="o">.</span><span class="n">dev1</span>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python3</span><span class="mf">.9</span> <span class="o">-</span><span class="n">m</span> <span class="n">pip</span> <span class="n">install</span> <span class="n">raylib</span><span class="o">==</span><span class="mf">4.2.1.2</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>If it doesn’t work, or we haven’t published a binary wheel for the latest version,
|
||||
or if you want to use Raylib in <code class="docutils literal notranslate"><span class="pre">PLATFORM_DRM</span></code> mode, you will need to compile your own raylib
|
||||
and have pip compile the wheel.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">raysan5</span><span class="o">/</span><span class="n">raylib</span><span class="o">.</span><span class="n">git</span>
|
||||
or if you want to use Raylib in <code class="docutils literal notranslate"><span class="pre">PLATFORM_DRM</span></code> mode, you will need to compile your own raylib.
|
||||
For full instructins on this, see <a class="reference external" href="https://github.com/raysan5/raylib/wiki/Working-on-Raspberry-Pi">https://github.com/raysan5/raylib/wiki/Working-on-Raspberry-Pi</a> . If you need help with this ask Raylib.</p>
|
||||
<p>This ‘worked for me’:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">raysan5</span><span class="o">/</span><span class="n">raylib</span><span class="o">.</span><span class="n">git</span> <span class="o">--</span><span class="n">branch</span> <span class="mf">4.2.0</span> <span class="o">--</span><span class="n">single</span><span class="o">-</span><span class="n">branch</span>
|
||||
<span class="n">cd</span> <span class="n">raylib</span>
|
||||
<span class="n">mkdir</span> <span class="n">build</span>
|
||||
<span class="n">cd</span> <span class="n">build</span>
|
||||
<span class="n">cmake</span> <span class="o">-</span><span class="n">DPLATFORM</span><span class="o">=</span><span class="s2">"DRM"</span> <span class="o">-</span><span class="n">DINCLUDE_EVERYTHING</span><span class="o">=</span><span class="n">on</span> <span class="o">-</span><span class="n">DSUPPORT_FILEFORMAT_JPG</span><span class="o">=</span><span class="n">on</span> <span class="o">-</span><span class="n">DWITH_PIC</span><span class="o">=</span><span class="n">on</span> <span class="o">-</span><span class="n">DCMAKE_BUILD_TYPE</span><span class="o">=</span><span class="n">Release</span> <span class="o">..</span>
|
||||
<span class="n">make</span>
|
||||
<span class="n">sudo</span> <span class="n">make</span> <span class="n">install</span>
|
||||
<span class="n">pip3</span> <span class="n">install</span> <span class="o">--</span><span class="n">no</span><span class="o">-</span><span class="n">binary</span> <span class="n">raylib</span> <span class="o">--</span><span class="n">upgrade</span> <span class="o">--</span><span class="n">force</span><span class="o">-</span><span class="n">reinstall</span> <span class="n">raylib</span><span class="o">==</span><span class="mf">4.2.0.0</span><span class="o">.</span><span class="n">dev2</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Then have pip compile the wheel:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip3</span> <span class="n">install</span> <span class="o">--</span><span class="n">no</span><span class="o">-</span><span class="n">binary</span> <span class="n">raylib</span> <span class="o">--</span><span class="n">upgrade</span> <span class="o">--</span><span class="n">force</span><span class="o">-</span><span class="n">reinstall</span> <span class="n">raylib</span><span class="o">==</span><span class="mf">4.2.1.2</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>(or newer version)</p>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Python Bindings for Raylib 4.2
|
||||
# Python Bindings for Raylib 4.5
|
||||
|
||||
New CFFI API static bindings.
|
||||
* Automatically generated to be as close as possible to
|
||||
|
|
|
@ -8,22 +8,29 @@ with
|
|||
|
||||
::
|
||||
|
||||
python3 -m pip install raylib==4.2.0.0.dev1
|
||||
python3.9 -m pip install raylib==4.2.1.2
|
||||
|
||||
If it doesn't work, or we haven't published a binary wheel for the latest version,
|
||||
or if you want to use Raylib in ``PLATFORM_DRM`` mode, you will need to compile your own raylib
|
||||
and have pip compile the wheel.
|
||||
or if you want to use Raylib in ``PLATFORM_DRM`` mode, you will need to compile your own raylib.
|
||||
For full instructins on this, see https://github.com/raysan5/raylib/wiki/Working-on-Raspberry-Pi . If you need help with this ask Raylib.
|
||||
|
||||
This 'worked for me':
|
||||
|
||||
::
|
||||
|
||||
git clone https://github.com/raysan5/raylib.git
|
||||
git clone https://github.com/raysan5/raylib.git --branch 4.2.0 --single-branch
|
||||
cd raylib
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DPLATFORM="DRM" -DINCLUDE_EVERYTHING=on -DSUPPORT_FILEFORMAT_JPG=on -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release ..
|
||||
make
|
||||
sudo make install
|
||||
pip3 install --no-binary raylib --upgrade --force-reinstall raylib==4.2.0.0.dev2
|
||||
|
||||
Then have pip compile the wheel:
|
||||
|
||||
::
|
||||
|
||||
pip3 install --no-binary raylib --upgrade --force-reinstall raylib==4.2.1.2
|
||||
|
||||
(or newer version)
|
||||
|
||||
|
|
|
@ -15,10 +15,9 @@ Example program:
|
|||
SetTargetFPS(60)
|
||||
|
||||
camera = ffi.new("struct Camera3D *", [[18.0, 16.0, 18.0], [0.0, 0.0, 0.0], [0.0, 1.0, 0.0], 45.0, 0])
|
||||
SetCameraMode(camera[0], CAMERA_ORBITAL)
|
||||
|
||||
while not WindowShouldClose():
|
||||
UpdateCamera(camera)
|
||||
UpdateCamera(camera, CAMERA_ORBITAL)
|
||||
BeginDrawing()
|
||||
ClearBackground(RAYWHITE)
|
||||
BeginMode3D(camera[0])
|
||||
|
|
123
docs/_static/_sphinx_javascript_frameworks_compat.js
vendored
Normal file
123
docs/_static/_sphinx_javascript_frameworks_compat.js
vendored
Normal file
|
@ -0,0 +1,123 @@
|
|||
/* Compatability shim for jQuery and underscores.js.
|
||||
*
|
||||
* Copyright Sphinx contributors
|
||||
* Released under the two clause BSD licence
|
||||
*/
|
||||
|
||||
/**
|
||||
* small helper function to urldecode strings
|
||||
*
|
||||
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
|
||||
*/
|
||||
jQuery.urldecode = function(x) {
|
||||
if (!x) {
|
||||
return x
|
||||
}
|
||||
return decodeURIComponent(x.replace(/\+/g, ' '));
|
||||
};
|
||||
|
||||
/**
|
||||
* small helper function to urlencode strings
|
||||
*/
|
||||
jQuery.urlencode = encodeURIComponent;
|
||||
|
||||
/**
|
||||
* This function returns the parsed url parameters of the
|
||||
* current request. Multiple values per key are supported,
|
||||
* it will always return arrays of strings for the value parts.
|
||||
*/
|
||||
jQuery.getQueryParameters = function(s) {
|
||||
if (typeof s === 'undefined')
|
||||
s = document.location.search;
|
||||
var parts = s.substr(s.indexOf('?') + 1).split('&');
|
||||
var result = {};
|
||||
for (var i = 0; i < parts.length; i++) {
|
||||
var tmp = parts[i].split('=', 2);
|
||||
var key = jQuery.urldecode(tmp[0]);
|
||||
var value = jQuery.urldecode(tmp[1]);
|
||||
if (key in result)
|
||||
result[key].push(value);
|
||||
else
|
||||
result[key] = [value];
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* highlight a given string on a jquery object by wrapping it in
|
||||
* span elements with the given class name.
|
||||
*/
|
||||
jQuery.fn.highlightText = function(text, className) {
|
||||
function highlight(node, addItems) {
|
||||
if (node.nodeType === 3) {
|
||||
var val = node.nodeValue;
|
||||
var pos = val.toLowerCase().indexOf(text);
|
||||
if (pos >= 0 &&
|
||||
!jQuery(node.parentNode).hasClass(className) &&
|
||||
!jQuery(node.parentNode).hasClass("nohighlight")) {
|
||||
var span;
|
||||
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
|
||||
if (isInSVG) {
|
||||
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
||||
} else {
|
||||
span = document.createElement("span");
|
||||
span.className = className;
|
||||
}
|
||||
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
|
||||
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
|
||||
document.createTextNode(val.substr(pos + text.length)),
|
||||
node.nextSibling));
|
||||
node.nodeValue = val.substr(0, pos);
|
||||
if (isInSVG) {
|
||||
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
||||
var bbox = node.parentElement.getBBox();
|
||||
rect.x.baseVal.value = bbox.x;
|
||||
rect.y.baseVal.value = bbox.y;
|
||||
rect.width.baseVal.value = bbox.width;
|
||||
rect.height.baseVal.value = bbox.height;
|
||||
rect.setAttribute('class', className);
|
||||
addItems.push({
|
||||
"parent": node.parentNode,
|
||||
"target": rect});
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!jQuery(node).is("button, select, textarea")) {
|
||||
jQuery.each(node.childNodes, function() {
|
||||
highlight(this, addItems);
|
||||
});
|
||||
}
|
||||
}
|
||||
var addItems = [];
|
||||
var result = this.each(function() {
|
||||
highlight(this, addItems);
|
||||
});
|
||||
for (var i = 0; i < addItems.length; ++i) {
|
||||
jQuery(addItems[i].parent).before(addItems[i].target);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/*
|
||||
* backward compatibility for jQuery.browser
|
||||
* This will be supported until firefox bug is fixed.
|
||||
*/
|
||||
if (!jQuery.browser) {
|
||||
jQuery.uaMatch = function(ua) {
|
||||
ua = ua.toLowerCase();
|
||||
|
||||
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(msie) ([\w.]+)/.exec(ua) ||
|
||||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
|
||||
[];
|
||||
|
||||
return {
|
||||
browser: match[ 1 ] || "",
|
||||
version: match[ 2 ] || "0"
|
||||
};
|
||||
};
|
||||
jQuery.browser = {};
|
||||
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
|
||||
}
|
55
docs/_static/basic.css
vendored
55
docs/_static/basic.css
vendored
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* Sphinx stylesheet -- basic theme.
|
||||
*
|
||||
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
|
||||
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
@ -222,7 +222,7 @@ table.modindextable td {
|
|||
/* -- general body styles --------------------------------------------------- */
|
||||
|
||||
div.body {
|
||||
min-width: 450px;
|
||||
min-width: 360px;
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
|
@ -237,16 +237,6 @@ a.headerlink {
|
|||
visibility: hidden;
|
||||
}
|
||||
|
||||
a.brackets:before,
|
||||
span.brackets > a:before{
|
||||
content: "[";
|
||||
}
|
||||
|
||||
a.brackets:after,
|
||||
span.brackets > a:after {
|
||||
content: "]";
|
||||
}
|
||||
|
||||
h1:hover > a.headerlink,
|
||||
h2:hover > a.headerlink,
|
||||
h3:hover > a.headerlink,
|
||||
|
@ -335,12 +325,16 @@ p.sidebar-title {
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
nav.contents,
|
||||
aside.topic,
|
||||
div.admonition, div.topic, blockquote {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
/* -- topics ---------------------------------------------------------------- */
|
||||
|
||||
nav.contents,
|
||||
aside.topic,
|
||||
div.topic {
|
||||
border: 1px solid #ccc;
|
||||
padding: 7px;
|
||||
|
@ -379,6 +373,8 @@ div.body p.centered {
|
|||
|
||||
div.sidebar > :last-child,
|
||||
aside.sidebar > :last-child,
|
||||
nav.contents > :last-child,
|
||||
aside.topic > :last-child,
|
||||
div.topic > :last-child,
|
||||
div.admonition > :last-child {
|
||||
margin-bottom: 0;
|
||||
|
@ -386,6 +382,8 @@ div.admonition > :last-child {
|
|||
|
||||
div.sidebar::after,
|
||||
aside.sidebar::after,
|
||||
nav.contents::after,
|
||||
aside.topic::after,
|
||||
div.topic::after,
|
||||
div.admonition::after,
|
||||
blockquote::after {
|
||||
|
@ -428,10 +426,6 @@ table.docutils td, table.docutils th {
|
|||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
|
||||
table.footnote td, table.footnote th {
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: left;
|
||||
padding-right: 5px;
|
||||
|
@ -615,19 +609,26 @@ ul.simple p {
|
|||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dl.footnote > dt,
|
||||
dl.citation > dt {
|
||||
aside.footnote > span,
|
||||
div.citation > span {
|
||||
float: left;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
dl.footnote > dd,
|
||||
dl.citation > dd {
|
||||
aside.footnote > span:last-of-type,
|
||||
div.citation > span:last-of-type {
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
aside.footnote > p {
|
||||
margin-left: 2em;
|
||||
}
|
||||
div.citation > p {
|
||||
margin-left: 4em;
|
||||
}
|
||||
aside.footnote > p:last-of-type,
|
||||
div.citation > p:last-of-type {
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
|
||||
dl.footnote > dd:after,
|
||||
dl.citation > dd:after {
|
||||
aside.footnote > p:last-of-type:after,
|
||||
div.citation > p:last-of-type:after {
|
||||
content: "";
|
||||
clear: both;
|
||||
}
|
||||
|
@ -644,10 +645,6 @@ dl.field-list > dt {
|
|||
padding-right: 5px;
|
||||
}
|
||||
|
||||
dl.field-list > dt:after {
|
||||
content: ":";
|
||||
}
|
||||
|
||||
dl.field-list > dd {
|
||||
padding-left: 0.5em;
|
||||
margin-top: 0em;
|
||||
|
|
2
docs/_static/css/badge_only.css
vendored
2
docs/_static/css/badge_only.css
vendored
|
@ -1 +1 @@
|
|||
.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}
|
||||
.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}
|
4
docs/_static/css/theme.css
vendored
4
docs/_static/css/theme.css
vendored
File diff suppressed because one or more lines are too long
386
docs/_static/doctools.js
vendored
386
docs/_static/doctools.js
vendored
|
@ -2,357 +2,155 @@
|
|||
* doctools.js
|
||||
* ~~~~~~~~~~~
|
||||
*
|
||||
* Sphinx JavaScript utilities for all documentation.
|
||||
* Base JavaScript utilities for all Sphinx HTML documentation.
|
||||
*
|
||||
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
|
||||
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* select a different prefix for underscore
|
||||
*/
|
||||
$u = _.noConflict();
|
||||
const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([
|
||||
"TEXTAREA",
|
||||
"INPUT",
|
||||
"SELECT",
|
||||
"BUTTON",
|
||||
]);
|
||||
|
||||
/**
|
||||
* make the code below compatible with browsers without
|
||||
* an installed firebug like debugger
|
||||
if (!window.console || !console.firebug) {
|
||||
var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
|
||||
"dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
|
||||
"profile", "profileEnd"];
|
||||
window.console = {};
|
||||
for (var i = 0; i < names.length; ++i)
|
||||
window.console[names[i]] = function() {};
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* small helper function to urldecode strings
|
||||
*
|
||||
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
|
||||
*/
|
||||
jQuery.urldecode = function(x) {
|
||||
if (!x) {
|
||||
return x
|
||||
}
|
||||
return decodeURIComponent(x.replace(/\+/g, ' '));
|
||||
};
|
||||
|
||||
/**
|
||||
* small helper function to urlencode strings
|
||||
*/
|
||||
jQuery.urlencode = encodeURIComponent;
|
||||
|
||||
/**
|
||||
* This function returns the parsed url parameters of the
|
||||
* current request. Multiple values per key are supported,
|
||||
* it will always return arrays of strings for the value parts.
|
||||
*/
|
||||
jQuery.getQueryParameters = function(s) {
|
||||
if (typeof s === 'undefined')
|
||||
s = document.location.search;
|
||||
var parts = s.substr(s.indexOf('?') + 1).split('&');
|
||||
var result = {};
|
||||
for (var i = 0; i < parts.length; i++) {
|
||||
var tmp = parts[i].split('=', 2);
|
||||
var key = jQuery.urldecode(tmp[0]);
|
||||
var value = jQuery.urldecode(tmp[1]);
|
||||
if (key in result)
|
||||
result[key].push(value);
|
||||
else
|
||||
result[key] = [value];
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* highlight a given string on a jquery object by wrapping it in
|
||||
* span elements with the given class name.
|
||||
*/
|
||||
jQuery.fn.highlightText = function(text, className) {
|
||||
function highlight(node, addItems) {
|
||||
if (node.nodeType === 3) {
|
||||
var val = node.nodeValue;
|
||||
var pos = val.toLowerCase().indexOf(text);
|
||||
if (pos >= 0 &&
|
||||
!jQuery(node.parentNode).hasClass(className) &&
|
||||
!jQuery(node.parentNode).hasClass("nohighlight")) {
|
||||
var span;
|
||||
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
|
||||
if (isInSVG) {
|
||||
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
||||
const _ready = (callback) => {
|
||||
if (document.readyState !== "loading") {
|
||||
callback();
|
||||
} else {
|
||||
span = document.createElement("span");
|
||||
span.className = className;
|
||||
document.addEventListener("DOMContentLoaded", callback);
|
||||
}
|
||||
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
|
||||
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
|
||||
document.createTextNode(val.substr(pos + text.length)),
|
||||
node.nextSibling));
|
||||
node.nodeValue = val.substr(0, pos);
|
||||
if (isInSVG) {
|
||||
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
||||
var bbox = node.parentElement.getBBox();
|
||||
rect.x.baseVal.value = bbox.x;
|
||||
rect.y.baseVal.value = bbox.y;
|
||||
rect.width.baseVal.value = bbox.width;
|
||||
rect.height.baseVal.value = bbox.height;
|
||||
rect.setAttribute('class', className);
|
||||
addItems.push({
|
||||
"parent": node.parentNode,
|
||||
"target": rect});
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!jQuery(node).is("button, select, textarea")) {
|
||||
jQuery.each(node.childNodes, function() {
|
||||
highlight(this, addItems);
|
||||
});
|
||||
}
|
||||
}
|
||||
var addItems = [];
|
||||
var result = this.each(function() {
|
||||
highlight(this, addItems);
|
||||
});
|
||||
for (var i = 0; i < addItems.length; ++i) {
|
||||
jQuery(addItems[i].parent).before(addItems[i].target);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/*
|
||||
* backward compatibility for jQuery.browser
|
||||
* This will be supported until firefox bug is fixed.
|
||||
*/
|
||||
if (!jQuery.browser) {
|
||||
jQuery.uaMatch = function(ua) {
|
||||
ua = ua.toLowerCase();
|
||||
|
||||
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(msie) ([\w.]+)/.exec(ua) ||
|
||||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
|
||||
[];
|
||||
|
||||
return {
|
||||
browser: match[ 1 ] || "",
|
||||
version: match[ 2 ] || "0"
|
||||
};
|
||||
};
|
||||
jQuery.browser = {};
|
||||
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Small JavaScript module for the documentation.
|
||||
*/
|
||||
var Documentation = {
|
||||
|
||||
init : function() {
|
||||
this.fixFirefoxAnchorBug();
|
||||
this.highlightSearchWords();
|
||||
this.initIndexTable();
|
||||
this.initOnKeyListeners();
|
||||
const Documentation = {
|
||||
init: () => {
|
||||
Documentation.initDomainIndexTable();
|
||||
Documentation.initOnKeyListeners();
|
||||
},
|
||||
|
||||
/**
|
||||
* i18n support
|
||||
*/
|
||||
TRANSLATIONS: {},
|
||||
PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; },
|
||||
LOCALE : 'unknown',
|
||||
PLURAL_EXPR: (n) => (n === 1 ? 0 : 1),
|
||||
LOCALE: "unknown",
|
||||
|
||||
// gettext and ngettext don't access this so that the functions
|
||||
// can safely bound to a different name (_ = Documentation.gettext)
|
||||
gettext : function(string) {
|
||||
var translated = Documentation.TRANSLATIONS[string];
|
||||
if (typeof translated === 'undefined')
|
||||
return string;
|
||||
return (typeof translated === 'string') ? translated : translated[0];
|
||||
},
|
||||
|
||||
ngettext : function(singular, plural, n) {
|
||||
var translated = Documentation.TRANSLATIONS[singular];
|
||||
if (typeof translated === 'undefined')
|
||||
return (n == 1) ? singular : plural;
|
||||
return translated[Documentation.PLURALEXPR(n)];
|
||||
},
|
||||
|
||||
addTranslations : function(catalog) {
|
||||
for (var key in catalog.messages)
|
||||
this.TRANSLATIONS[key] = catalog.messages[key];
|
||||
this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
|
||||
this.LOCALE = catalog.locale;
|
||||
},
|
||||
|
||||
/**
|
||||
* add context elements like header anchor links
|
||||
*/
|
||||
addContextElements : function() {
|
||||
$('div[id] > :header:first').each(function() {
|
||||
$('<a class="headerlink">\u00B6</a>').
|
||||
attr('href', '#' + this.id).
|
||||
attr('title', _('Permalink to this headline')).
|
||||
appendTo(this);
|
||||
});
|
||||
$('dt[id]').each(function() {
|
||||
$('<a class="headerlink">\u00B6</a>').
|
||||
attr('href', '#' + this.id).
|
||||
attr('title', _('Permalink to this definition')).
|
||||
appendTo(this);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* workaround a firefox stupidity
|
||||
* see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
|
||||
*/
|
||||
fixFirefoxAnchorBug : function() {
|
||||
if (document.location.hash && $.browser.mozilla)
|
||||
window.setTimeout(function() {
|
||||
document.location.href += '';
|
||||
}, 10);
|
||||
},
|
||||
|
||||
/**
|
||||
* highlight the search words provided in the url in the text
|
||||
*/
|
||||
highlightSearchWords : function() {
|
||||
var params = $.getQueryParameters();
|
||||
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
|
||||
if (terms.length) {
|
||||
var body = $('div.body');
|
||||
if (!body.length) {
|
||||
body = $('body');
|
||||
}
|
||||
window.setTimeout(function() {
|
||||
$.each(terms, function() {
|
||||
body.highlightText(this.toLowerCase(), 'highlighted');
|
||||
});
|
||||
}, 10);
|
||||
$('<p class="highlight-link"><a href="javascript:Documentation.' +
|
||||
'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
|
||||
.appendTo($('#searchbox'));
|
||||
gettext: (string) => {
|
||||
const translated = Documentation.TRANSLATIONS[string];
|
||||
switch (typeof translated) {
|
||||
case "undefined":
|
||||
return string; // no translation
|
||||
case "string":
|
||||
return translated; // translation exists
|
||||
default:
|
||||
return translated[0]; // (singular, plural) translation tuple exists
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* init the domain index toggle buttons
|
||||
*/
|
||||
initIndexTable : function() {
|
||||
var togglers = $('img.toggler').click(function() {
|
||||
var src = $(this).attr('src');
|
||||
var idnum = $(this).attr('id').substr(7);
|
||||
$('tr.cg-' + idnum).toggle();
|
||||
if (src.substr(-9) === 'minus.png')
|
||||
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
|
||||
else
|
||||
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
|
||||
}).css('display', '');
|
||||
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
|
||||
togglers.click();
|
||||
}
|
||||
ngettext: (singular, plural, n) => {
|
||||
const translated = Documentation.TRANSLATIONS[singular];
|
||||
if (typeof translated !== "undefined")
|
||||
return translated[Documentation.PLURAL_EXPR(n)];
|
||||
return n === 1 ? singular : plural;
|
||||
},
|
||||
|
||||
/**
|
||||
* helper function to hide the search marks again
|
||||
*/
|
||||
hideSearchWords : function() {
|
||||
$('#searchbox .highlight-link').fadeOut(300);
|
||||
$('span.highlighted').removeClass('highlighted');
|
||||
var url = new URL(window.location);
|
||||
url.searchParams.delete('highlight');
|
||||
window.history.replaceState({}, '', url);
|
||||
addTranslations: (catalog) => {
|
||||
Object.assign(Documentation.TRANSLATIONS, catalog.messages);
|
||||
Documentation.PLURAL_EXPR = new Function(
|
||||
"n",
|
||||
`return (${catalog.plural_expr})`
|
||||
);
|
||||
Documentation.LOCALE = catalog.locale;
|
||||
},
|
||||
|
||||
/**
|
||||
* helper function to focus on search bar
|
||||
*/
|
||||
focusSearchBar : function() {
|
||||
$('input[name=q]').first().focus();
|
||||
focusSearchBar: () => {
|
||||
document.querySelectorAll("input[name=q]")[0]?.focus();
|
||||
},
|
||||
|
||||
/**
|
||||
* make the url absolute
|
||||
* Initialise the domain index toggle buttons
|
||||
*/
|
||||
makeURL : function(relativeURL) {
|
||||
return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
|
||||
initDomainIndexTable: () => {
|
||||
const toggler = (el) => {
|
||||
const idNumber = el.id.substr(7);
|
||||
const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`);
|
||||
if (el.src.substr(-9) === "minus.png") {
|
||||
el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`;
|
||||
toggledRows.forEach((el) => (el.style.display = "none"));
|
||||
} else {
|
||||
el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`;
|
||||
toggledRows.forEach((el) => (el.style.display = ""));
|
||||
}
|
||||
};
|
||||
|
||||
const togglerElements = document.querySelectorAll("img.toggler");
|
||||
togglerElements.forEach((el) =>
|
||||
el.addEventListener("click", (event) => toggler(event.currentTarget))
|
||||
);
|
||||
togglerElements.forEach((el) => (el.style.display = ""));
|
||||
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler);
|
||||
},
|
||||
|
||||
/**
|
||||
* get the current relative url
|
||||
*/
|
||||
getCurrentURL : function() {
|
||||
var path = document.location.pathname;
|
||||
var parts = path.split(/\//);
|
||||
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
|
||||
if (this === '..')
|
||||
parts.pop();
|
||||
});
|
||||
var url = parts.join('/');
|
||||
return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
|
||||
},
|
||||
|
||||
initOnKeyListeners: function() {
|
||||
initOnKeyListeners: () => {
|
||||
// only install a listener if it is really needed
|
||||
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
|
||||
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)
|
||||
if (
|
||||
!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
|
||||
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
|
||||
)
|
||||
return;
|
||||
|
||||
$(document).keydown(function(event) {
|
||||
var activeElementType = document.activeElement.tagName;
|
||||
// don't navigate when in search box, textarea, dropdown or button
|
||||
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
|
||||
&& activeElementType !== 'BUTTON') {
|
||||
if (event.altKey || event.ctrlKey || event.metaKey)
|
||||
return;
|
||||
document.addEventListener("keydown", (event) => {
|
||||
// bail for input elements
|
||||
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
|
||||
// bail with special keys
|
||||
if (event.altKey || event.ctrlKey || event.metaKey) return;
|
||||
|
||||
if (!event.shiftKey) {
|
||||
switch (event.key) {
|
||||
case 'ArrowLeft':
|
||||
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS)
|
||||
break;
|
||||
var prevHref = $('link[rel="prev"]').prop('href');
|
||||
if (prevHref) {
|
||||
window.location.href = prevHref;
|
||||
return false;
|
||||
case "ArrowLeft":
|
||||
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
|
||||
|
||||
const prevLink = document.querySelector('link[rel="prev"]');
|
||||
if (prevLink && prevLink.href) {
|
||||
window.location.href = prevLink.href;
|
||||
event.preventDefault();
|
||||
}
|
||||
break;
|
||||
case 'ArrowRight':
|
||||
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS)
|
||||
break;
|
||||
var nextHref = $('link[rel="next"]').prop('href');
|
||||
if (nextHref) {
|
||||
window.location.href = nextHref;
|
||||
return false;
|
||||
case "ArrowRight":
|
||||
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
|
||||
|
||||
const nextLink = document.querySelector('link[rel="next"]');
|
||||
if (nextLink && nextLink.href) {
|
||||
window.location.href = nextLink.href;
|
||||
event.preventDefault();
|
||||
}
|
||||
break;
|
||||
case 'Escape':
|
||||
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)
|
||||
break;
|
||||
Documentation.hideSearchWords();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// some keyboard layouts may need Shift to get /
|
||||
switch (event.key) {
|
||||
case '/':
|
||||
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)
|
||||
break;
|
||||
case "/":
|
||||
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
|
||||
Documentation.focusSearchBar();
|
||||
return false;
|
||||
}
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
// quick alias for translations
|
||||
_ = Documentation.gettext;
|
||||
const _ = Documentation.gettext;
|
||||
|
||||
$(document).ready(function() {
|
||||
Documentation.init();
|
||||
});
|
||||
_ready(Documentation.init);
|
||||
|
|
2
docs/_static/documentation_options.js
vendored
2
docs/_static/documentation_options.js
vendored
|
@ -1,7 +1,7 @@
|
|||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
|
||||
VERSION: '',
|
||||
LANGUAGE: 'None',
|
||||
LANGUAGE: 'en',
|
||||
COLLAPSE_INDEX: false,
|
||||
BUILDER: 'html',
|
||||
FILE_SUFFIX: '.html',
|
||||
|
|
2
docs/_static/graphviz.css
vendored
2
docs/_static/graphviz.css
vendored
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* Sphinx stylesheet -- graphviz extension.
|
||||
*
|
||||
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
|
||||
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
|
10872
docs/_static/jquery-3.5.1.js
vendored
10872
docs/_static/jquery-3.5.1.js
vendored
File diff suppressed because it is too large
Load diff
4
docs/_static/jquery.js
vendored
4
docs/_static/jquery.js
vendored
File diff suppressed because one or more lines are too long
100
docs/_static/language_data.js
vendored
100
docs/_static/language_data.js
vendored
|
@ -5,7 +5,7 @@
|
|||
* This script contains the language-specific data used by searchtools.js,
|
||||
* namely the list of stopwords, stemmer, scorer and splitter.
|
||||
*
|
||||
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
|
||||
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
@ -197,101 +197,3 @@ var Stemmer = function() {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
var splitChars = (function() {
|
||||
var result = {};
|
||||
var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648,
|
||||
1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702,
|
||||
2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971,
|
||||
2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345,
|
||||
3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761,
|
||||
3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823,
|
||||
4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125,
|
||||
8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695,
|
||||
11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587,
|
||||
43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141];
|
||||
var i, j, start, end;
|
||||
for (i = 0; i < singles.length; i++) {
|
||||
result[singles[i]] = true;
|
||||
}
|
||||
var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709],
|
||||
[722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161],
|
||||
[1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568],
|
||||
[1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807],
|
||||
[1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047],
|
||||
[2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383],
|
||||
[2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450],
|
||||
[2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547],
|
||||
[2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673],
|
||||
[2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820],
|
||||
[2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946],
|
||||
[2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023],
|
||||
[3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173],
|
||||
[3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332],
|
||||
[3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481],
|
||||
[3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718],
|
||||
[3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791],
|
||||
[3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095],
|
||||
[4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205],
|
||||
[4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687],
|
||||
[4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968],
|
||||
[4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869],
|
||||
[5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102],
|
||||
[6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271],
|
||||
[6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592],
|
||||
[6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822],
|
||||
[6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167],
|
||||
[7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959],
|
||||
[7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143],
|
||||
[8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318],
|
||||
[8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483],
|
||||
[8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101],
|
||||
[10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567],
|
||||
[11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292],
|
||||
[12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444],
|
||||
[12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783],
|
||||
[12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311],
|
||||
[19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511],
|
||||
[42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774],
|
||||
[42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071],
|
||||
[43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263],
|
||||
[43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519],
|
||||
[43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647],
|
||||
[43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967],
|
||||
[44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295],
|
||||
[57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274],
|
||||
[64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007],
|
||||
[65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381],
|
||||
[65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]];
|
||||
for (i = 0; i < ranges.length; i++) {
|
||||
start = ranges[i][0];
|
||||
end = ranges[i][1];
|
||||
for (j = start; j <= end; j++) {
|
||||
result[j] = true;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
})();
|
||||
|
||||
function splitQuery(query) {
|
||||
var result = [];
|
||||
var start = -1;
|
||||
for (var i = 0; i < query.length; i++) {
|
||||
if (splitChars[query.charCodeAt(i)]) {
|
||||
if (start !== -1) {
|
||||
result.push(query.slice(start, i));
|
||||
start = -1;
|
||||
}
|
||||
} else if (start === -1) {
|
||||
start = i;
|
||||
}
|
||||
}
|
||||
if (start !== -1) {
|
||||
result.push(query.slice(start));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
|
771
docs/_static/searchtools.js
vendored
771
docs/_static/searchtools.js
vendored
|
@ -4,22 +4,24 @@
|
|||
*
|
||||
* Sphinx JavaScript utilities for the full-text search.
|
||||
*
|
||||
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
|
||||
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
"use strict";
|
||||
|
||||
if (!Scorer) {
|
||||
/**
|
||||
* Simple result scoring code.
|
||||
*/
|
||||
if (typeof Scorer === "undefined") {
|
||||
var Scorer = {
|
||||
// Implement the following function to further tweak the score for each result
|
||||
// The function takes a result array [filename, title, anchor, descr, score]
|
||||
// The function takes a result array [docname, title, anchor, descr, score, filename]
|
||||
// and returns the new score.
|
||||
/*
|
||||
score: function(result) {
|
||||
return result[4];
|
||||
score: result => {
|
||||
const [docname, title, anchor, descr, score, filename] = result
|
||||
return score
|
||||
},
|
||||
*/
|
||||
|
||||
|
@ -28,9 +30,11 @@ if (!Scorer) {
|
|||
// or matches in the last dotted part of the object name
|
||||
objPartialMatch: 6,
|
||||
// Additive scores depending on the priority of the object
|
||||
objPrio: {0: 15, // used to be importantResults
|
||||
objPrio: {
|
||||
0: 15, // used to be importantResults
|
||||
1: 5, // used to be objectResults
|
||||
2: -5}, // used to be unimportantResults
|
||||
2: -5, // used to be unimportantResults
|
||||
},
|
||||
// Used when the priority is not in the mapping.
|
||||
objPrioDefault: 0,
|
||||
|
||||
|
@ -39,452 +43,495 @@ if (!Scorer) {
|
|||
partialTitle: 7,
|
||||
// query found in terms
|
||||
term: 5,
|
||||
partialTerm: 2
|
||||
partialTerm: 2,
|
||||
};
|
||||
}
|
||||
|
||||
if (!splitQuery) {
|
||||
function splitQuery(query) {
|
||||
return query.split(/\s+/);
|
||||
const _removeChildren = (element) => {
|
||||
while (element && element.lastChild) element.removeChild(element.lastChild);
|
||||
};
|
||||
|
||||
/**
|
||||
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping
|
||||
*/
|
||||
const _escapeRegExp = (string) =>
|
||||
string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
|
||||
|
||||
const _displayItem = (item, searchTerms) => {
|
||||
const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
|
||||
const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT;
|
||||
const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
|
||||
const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
|
||||
const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
|
||||
|
||||
const [docName, title, anchor, descr, score, _filename] = item;
|
||||
|
||||
let listItem = document.createElement("li");
|
||||
let requestUrl;
|
||||
let linkUrl;
|
||||
if (docBuilder === "dirhtml") {
|
||||
// dirhtml builder
|
||||
let dirname = docName + "/";
|
||||
if (dirname.match(/\/index\/$/))
|
||||
dirname = dirname.substring(0, dirname.length - 6);
|
||||
else if (dirname === "index/") dirname = "";
|
||||
requestUrl = docUrlRoot + dirname;
|
||||
linkUrl = requestUrl;
|
||||
} else {
|
||||
// normal html builders
|
||||
requestUrl = docUrlRoot + docName + docFileSuffix;
|
||||
linkUrl = docName + docLinkSuffix;
|
||||
}
|
||||
let linkEl = listItem.appendChild(document.createElement("a"));
|
||||
linkEl.href = linkUrl + anchor;
|
||||
linkEl.dataset.score = score;
|
||||
linkEl.innerHTML = title;
|
||||
if (descr)
|
||||
listItem.appendChild(document.createElement("span")).innerHTML =
|
||||
" (" + descr + ")";
|
||||
else if (showSearchSummary)
|
||||
fetch(requestUrl)
|
||||
.then((responseData) => responseData.text())
|
||||
.then((data) => {
|
||||
if (data)
|
||||
listItem.appendChild(
|
||||
Search.makeSearchSummary(data, searchTerms)
|
||||
);
|
||||
});
|
||||
Search.output.appendChild(listItem);
|
||||
};
|
||||
const _finishSearch = (resultCount) => {
|
||||
Search.stopPulse();
|
||||
Search.title.innerText = _("Search Results");
|
||||
if (!resultCount)
|
||||
Search.status.innerText = Documentation.gettext(
|
||||
"Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories."
|
||||
);
|
||||
else
|
||||
Search.status.innerText = _(
|
||||
`Search finished, found ${resultCount} page(s) matching the search query.`
|
||||
);
|
||||
};
|
||||
const _displayNextItem = (
|
||||
results,
|
||||
resultCount,
|
||||
searchTerms
|
||||
) => {
|
||||
// results left, load the summary and display it
|
||||
// this is intended to be dynamic (don't sub resultsCount)
|
||||
if (results.length) {
|
||||
_displayItem(results.pop(), searchTerms);
|
||||
setTimeout(
|
||||
() => _displayNextItem(results, resultCount, searchTerms),
|
||||
5
|
||||
);
|
||||
}
|
||||
// search finished, update title and status message
|
||||
else _finishSearch(resultCount);
|
||||
};
|
||||
|
||||
/**
|
||||
* Default splitQuery function. Can be overridden in ``sphinx.search`` with a
|
||||
* custom function per language.
|
||||
*
|
||||
* The regular expression works by splitting the string on consecutive characters
|
||||
* that are not Unicode letters, numbers, underscores, or emoji characters.
|
||||
* This is the same as ``\W+`` in Python, preserving the surrogate pair area.
|
||||
*/
|
||||
if (typeof splitQuery === "undefined") {
|
||||
var splitQuery = (query) => query
|
||||
.split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu)
|
||||
.filter(term => term) // remove remaining empty strings
|
||||
}
|
||||
|
||||
/**
|
||||
* Search Module
|
||||
*/
|
||||
var Search = {
|
||||
|
||||
const Search = {
|
||||
_index: null,
|
||||
_queued_query: null,
|
||||
_pulse_status: -1,
|
||||
|
||||
htmlToText : function(htmlString) {
|
||||
var virtualDocument = document.implementation.createHTMLDocument('virtual');
|
||||
var htmlElement = $(htmlString, virtualDocument);
|
||||
htmlElement.find('.headerlink').remove();
|
||||
docContent = htmlElement.find('[role=main]')[0];
|
||||
if(docContent === undefined) {
|
||||
console.warn("Content block not found. Sphinx search tries to obtain it " +
|
||||
"via '[role=main]'. Could you check your theme or template.");
|
||||
htmlToText: (htmlString) => {
|
||||
const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
|
||||
htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() });
|
||||
const docContent = htmlElement.querySelector('[role="main"]');
|
||||
if (docContent !== undefined) return docContent.textContent;
|
||||
console.warn(
|
||||
"Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template."
|
||||
);
|
||||
return "";
|
||||
}
|
||||
return docContent.textContent || docContent.innerText;
|
||||
},
|
||||
|
||||
init : function() {
|
||||
var params = $.getQueryParameters();
|
||||
if (params.q) {
|
||||
var query = params.q[0];
|
||||
$('input[name="q"]')[0].value = query;
|
||||
this.performSearch(query);
|
||||
init: () => {
|
||||
const query = new URLSearchParams(window.location.search).get("q");
|
||||
document
|
||||
.querySelectorAll('input[name="q"]')
|
||||
.forEach((el) => (el.value = query));
|
||||
if (query) Search.performSearch(query);
|
||||
},
|
||||
|
||||
loadIndex: (url) =>
|
||||
(document.body.appendChild(document.createElement("script")).src = url),
|
||||
|
||||
setIndex: (index) => {
|
||||
Search._index = index;
|
||||
if (Search._queued_query !== null) {
|
||||
const query = Search._queued_query;
|
||||
Search._queued_query = null;
|
||||
Search.query(query);
|
||||
}
|
||||
},
|
||||
|
||||
loadIndex : function(url) {
|
||||
$.ajax({type: "GET", url: url, data: null,
|
||||
dataType: "script", cache: true,
|
||||
complete: function(jqxhr, textstatus) {
|
||||
if (textstatus != "success") {
|
||||
document.getElementById("searchindexloader").src = url;
|
||||
}
|
||||
}});
|
||||
},
|
||||
hasIndex: () => Search._index !== null,
|
||||
|
||||
setIndex : function(index) {
|
||||
var q;
|
||||
this._index = index;
|
||||
if ((q = this._queued_query) !== null) {
|
||||
this._queued_query = null;
|
||||
Search.query(q);
|
||||
}
|
||||
},
|
||||
deferQuery: (query) => (Search._queued_query = query),
|
||||
|
||||
hasIndex : function() {
|
||||
return this._index !== null;
|
||||
},
|
||||
stopPulse: () => (Search._pulse_status = -1),
|
||||
|
||||
deferQuery : function(query) {
|
||||
this._queued_query = query;
|
||||
},
|
||||
startPulse: () => {
|
||||
if (Search._pulse_status >= 0) return;
|
||||
|
||||
stopPulse : function() {
|
||||
this._pulse_status = 0;
|
||||
},
|
||||
|
||||
startPulse : function() {
|
||||
if (this._pulse_status >= 0)
|
||||
return;
|
||||
function pulse() {
|
||||
var i;
|
||||
const pulse = () => {
|
||||
Search._pulse_status = (Search._pulse_status + 1) % 4;
|
||||
var dotString = '';
|
||||
for (i = 0; i < Search._pulse_status; i++)
|
||||
dotString += '.';
|
||||
Search.dots.text(dotString);
|
||||
if (Search._pulse_status > -1)
|
||||
window.setTimeout(pulse, 500);
|
||||
}
|
||||
Search.dots.innerText = ".".repeat(Search._pulse_status);
|
||||
if (Search._pulse_status >= 0) window.setTimeout(pulse, 500);
|
||||
};
|
||||
pulse();
|
||||
},
|
||||
|
||||
/**
|
||||
* perform a search for something (or wait until index is loaded)
|
||||
*/
|
||||
performSearch : function(query) {
|
||||
performSearch: (query) => {
|
||||
// create the required interface elements
|
||||
this.out = $('#search-results');
|
||||
this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
|
||||
this.dots = $('<span></span>').appendTo(this.title);
|
||||
this.status = $('<p class="search-summary"> </p>').appendTo(this.out);
|
||||
this.output = $('<ul class="search"/>').appendTo(this.out);
|
||||
const searchText = document.createElement("h2");
|
||||
searchText.textContent = _("Searching");
|
||||
const searchSummary = document.createElement("p");
|
||||
searchSummary.classList.add("search-summary");
|
||||
searchSummary.innerText = "";
|
||||
const searchList = document.createElement("ul");
|
||||
searchList.classList.add("search");
|
||||
|
||||
$('#search-progress').text(_('Preparing search...'));
|
||||
this.startPulse();
|
||||
const out = document.getElementById("search-results");
|
||||
Search.title = out.appendChild(searchText);
|
||||
Search.dots = Search.title.appendChild(document.createElement("span"));
|
||||
Search.status = out.appendChild(searchSummary);
|
||||
Search.output = out.appendChild(searchList);
|
||||
|
||||
const searchProgress = document.getElementById("search-progress");
|
||||
// Some themes don't use the search progress node
|
||||
if (searchProgress) {
|
||||
searchProgress.innerText = _("Preparing search...");
|
||||
}
|
||||
Search.startPulse();
|
||||
|
||||
// index already loaded, the browser was quick!
|
||||
if (this.hasIndex())
|
||||
this.query(query);
|
||||
else
|
||||
this.deferQuery(query);
|
||||
if (Search.hasIndex()) Search.query(query);
|
||||
else Search.deferQuery(query);
|
||||
},
|
||||
|
||||
/**
|
||||
* execute search (requires search index to be loaded)
|
||||
*/
|
||||
query : function(query) {
|
||||
var i;
|
||||
query: (query) => {
|
||||
const filenames = Search._index.filenames;
|
||||
const docNames = Search._index.docnames;
|
||||
const titles = Search._index.titles;
|
||||
const allTitles = Search._index.alltitles;
|
||||
const indexEntries = Search._index.indexentries;
|
||||
|
||||
// stem the search terms and add them to the correct list
|
||||
var stemmer = new Stemmer();
|
||||
var searchterms = [];
|
||||
var excluded = [];
|
||||
var hlterms = [];
|
||||
var tmp = splitQuery(query);
|
||||
var objectterms = [];
|
||||
for (i = 0; i < tmp.length; i++) {
|
||||
if (tmp[i] !== "") {
|
||||
objectterms.push(tmp[i].toLowerCase());
|
||||
}
|
||||
const stemmer = new Stemmer();
|
||||
const searchTerms = new Set();
|
||||
const excludedTerms = new Set();
|
||||
const highlightTerms = new Set();
|
||||
const objectTerms = new Set(splitQuery(query.toLowerCase().trim()));
|
||||
splitQuery(query.trim()).forEach((queryTerm) => {
|
||||
const queryTermLower = queryTerm.toLowerCase();
|
||||
|
||||
// maybe skip this "word"
|
||||
// stopwords array is from language_data.js
|
||||
if (
|
||||
stopwords.indexOf(queryTermLower) !== -1 ||
|
||||
queryTerm.match(/^\d+$/)
|
||||
)
|
||||
return;
|
||||
|
||||
if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i] === "") {
|
||||
// skip this "word"
|
||||
continue;
|
||||
}
|
||||
// stem the word
|
||||
var word = stemmer.stemWord(tmp[i].toLowerCase());
|
||||
var toAppend;
|
||||
let word = stemmer.stemWord(queryTermLower);
|
||||
// select the correct list
|
||||
if (word[0] == '-') {
|
||||
toAppend = excluded;
|
||||
word = word.substr(1);
|
||||
}
|
||||
if (word[0] === "-") excludedTerms.add(word.substr(1));
|
||||
else {
|
||||
toAppend = searchterms;
|
||||
hlterms.push(tmp[i].toLowerCase());
|
||||
searchTerms.add(word);
|
||||
highlightTerms.add(queryTermLower);
|
||||
}
|
||||
// only add if not already in the list
|
||||
if (!$u.contains(toAppend, word))
|
||||
toAppend.push(word);
|
||||
});
|
||||
|
||||
if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js
|
||||
localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" "))
|
||||
}
|
||||
var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
|
||||
|
||||
// console.debug('SEARCH: searching for:');
|
||||
// console.info('required: ', searchterms);
|
||||
// console.info('excluded: ', excluded);
|
||||
// console.debug("SEARCH: searching for:");
|
||||
// console.info("required: ", [...searchTerms]);
|
||||
// console.info("excluded: ", [...excludedTerms]);
|
||||
|
||||
// prepare search
|
||||
var terms = this._index.terms;
|
||||
var titleterms = this._index.titleterms;
|
||||
// array of [docname, title, anchor, descr, score, filename]
|
||||
let results = [];
|
||||
_removeChildren(document.getElementById("search-progress"));
|
||||
|
||||
// array of [filename, title, anchor, descr, score]
|
||||
var results = [];
|
||||
$('#search-progress').empty();
|
||||
const queryLower = query.toLowerCase();
|
||||
for (const [title, foundTitles] of Object.entries(allTitles)) {
|
||||
if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) {
|
||||
for (const [file, id] of foundTitles) {
|
||||
let score = Math.round(100 * queryLower.length / title.length)
|
||||
results.push([
|
||||
docNames[file],
|
||||
titles[file] !== title ? `${titles[file]} > ${title}` : title,
|
||||
id !== null ? "#" + id : "",
|
||||
null,
|
||||
score,
|
||||
filenames[file],
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// search for explicit entries in index directives
|
||||
for (const [entry, foundEntries] of Object.entries(indexEntries)) {
|
||||
if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) {
|
||||
for (const [file, id] of foundEntries) {
|
||||
let score = Math.round(100 * queryLower.length / entry.length)
|
||||
results.push([
|
||||
docNames[file],
|
||||
titles[file],
|
||||
id ? "#" + id : "",
|
||||
null,
|
||||
score,
|
||||
filenames[file],
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// lookup as object
|
||||
for (i = 0; i < objectterms.length; i++) {
|
||||
var others = [].concat(objectterms.slice(0, i),
|
||||
objectterms.slice(i+1, objectterms.length));
|
||||
results = results.concat(this.performObjectSearch(objectterms[i], others));
|
||||
}
|
||||
objectTerms.forEach((term) =>
|
||||
results.push(...Search.performObjectSearch(term, objectTerms))
|
||||
);
|
||||
|
||||
// lookup as search terms in fulltext
|
||||
results = results.concat(this.performTermsSearch(searchterms, excluded, terms, titleterms));
|
||||
results.push(...Search.performTermsSearch(searchTerms, excludedTerms));
|
||||
|
||||
// let the scorer override scores with a custom scoring function
|
||||
if (Scorer.score) {
|
||||
for (i = 0; i < results.length; i++)
|
||||
results[i][4] = Scorer.score(results[i]);
|
||||
}
|
||||
if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item)));
|
||||
|
||||
// now sort the results by score (in opposite order of appearance, since the
|
||||
// display function below uses pop() to retrieve items) and then
|
||||
// alphabetically
|
||||
results.sort(function(a, b) {
|
||||
var left = a[4];
|
||||
var right = b[4];
|
||||
if (left > right) {
|
||||
return 1;
|
||||
} else if (left < right) {
|
||||
return -1;
|
||||
} else {
|
||||
results.sort((a, b) => {
|
||||
const leftScore = a[4];
|
||||
const rightScore = b[4];
|
||||
if (leftScore === rightScore) {
|
||||
// same score: sort alphabetically
|
||||
left = a[1].toLowerCase();
|
||||
right = b[1].toLowerCase();
|
||||
return (left > right) ? -1 : ((left < right) ? 1 : 0);
|
||||
const leftTitle = a[1].toLowerCase();
|
||||
const rightTitle = b[1].toLowerCase();
|
||||
if (leftTitle === rightTitle) return 0;
|
||||
return leftTitle > rightTitle ? -1 : 1; // inverted is intentional
|
||||
}
|
||||
return leftScore > rightScore ? 1 : -1;
|
||||
});
|
||||
|
||||
// remove duplicate search results
|
||||
// note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept
|
||||
let seen = new Set();
|
||||
results = results.reverse().reduce((acc, result) => {
|
||||
let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(',');
|
||||
if (!seen.has(resultStr)) {
|
||||
acc.push(result);
|
||||
seen.add(resultStr);
|
||||
}
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
results = results.reverse();
|
||||
|
||||
// for debugging
|
||||
//Search.lastresults = results.slice(); // a copy
|
||||
//console.info('search results:', Search.lastresults);
|
||||
// console.info("search results:", Search.lastresults);
|
||||
|
||||
// print the results
|
||||
var resultCount = results.length;
|
||||
function displayNextItem() {
|
||||
// results left, load the summary and display it
|
||||
if (results.length) {
|
||||
var item = results.pop();
|
||||
var listItem = $('<li></li>');
|
||||
var requestUrl = "";
|
||||
var linkUrl = "";
|
||||
if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') {
|
||||
// dirhtml builder
|
||||
var dirname = item[0] + '/';
|
||||
if (dirname.match(/\/index\/$/)) {
|
||||
dirname = dirname.substring(0, dirname.length-6);
|
||||
} else if (dirname == 'index/') {
|
||||
dirname = '';
|
||||
}
|
||||
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + dirname;
|
||||
linkUrl = requestUrl;
|
||||
|
||||
} else {
|
||||
// normal html builders
|
||||
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX;
|
||||
linkUrl = item[0] + DOCUMENTATION_OPTIONS.LINK_SUFFIX;
|
||||
}
|
||||
listItem.append($('<a/>').attr('href',
|
||||
linkUrl +
|
||||
highlightstring + item[2]).html(item[1]));
|
||||
if (item[3]) {
|
||||
listItem.append($('<span> (' + item[3] + ')</span>'));
|
||||
Search.output.append(listItem);
|
||||
setTimeout(function() {
|
||||
displayNextItem();
|
||||
}, 5);
|
||||
} else if (DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY) {
|
||||
$.ajax({url: requestUrl,
|
||||
dataType: "text",
|
||||
complete: function(jqxhr, textstatus) {
|
||||
var data = jqxhr.responseText;
|
||||
if (data !== '' && data !== undefined) {
|
||||
var summary = Search.makeSearchSummary(data, searchterms, hlterms);
|
||||
if (summary) {
|
||||
listItem.append(summary);
|
||||
}
|
||||
}
|
||||
Search.output.append(listItem);
|
||||
setTimeout(function() {
|
||||
displayNextItem();
|
||||
}, 5);
|
||||
}});
|
||||
} else {
|
||||
// just display title
|
||||
Search.output.append(listItem);
|
||||
setTimeout(function() {
|
||||
displayNextItem();
|
||||
}, 5);
|
||||
}
|
||||
}
|
||||
// search finished, update title and status message
|
||||
else {
|
||||
Search.stopPulse();
|
||||
Search.title.text(_('Search Results'));
|
||||
if (!resultCount)
|
||||
Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
|
||||
else
|
||||
Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
|
||||
Search.status.fadeIn(500);
|
||||
}
|
||||
}
|
||||
displayNextItem();
|
||||
_displayNextItem(results, results.length, searchTerms);
|
||||
},
|
||||
|
||||
/**
|
||||
* search for object names
|
||||
*/
|
||||
performObjectSearch : function(object, otherterms) {
|
||||
var filenames = this._index.filenames;
|
||||
var docnames = this._index.docnames;
|
||||
var objects = this._index.objects;
|
||||
var objnames = this._index.objnames;
|
||||
var titles = this._index.titles;
|
||||
performObjectSearch: (object, objectTerms) => {
|
||||
const filenames = Search._index.filenames;
|
||||
const docNames = Search._index.docnames;
|
||||
const objects = Search._index.objects;
|
||||
const objNames = Search._index.objnames;
|
||||
const titles = Search._index.titles;
|
||||
|
||||
var i;
|
||||
var results = [];
|
||||
const results = [];
|
||||
|
||||
const objectSearchCallback = (prefix, match) => {
|
||||
const name = match[4]
|
||||
const fullname = (prefix ? prefix + "." : "") + name;
|
||||
const fullnameLower = fullname.toLowerCase();
|
||||
if (fullnameLower.indexOf(object) < 0) return;
|
||||
|
||||
let score = 0;
|
||||
const parts = fullnameLower.split(".");
|
||||
|
||||
for (var prefix in objects) {
|
||||
for (var iMatch = 0; iMatch != objects[prefix].length; ++iMatch) {
|
||||
var match = objects[prefix][iMatch];
|
||||
var name = match[4];
|
||||
var fullname = (prefix ? prefix + '.' : '') + name;
|
||||
var fullnameLower = fullname.toLowerCase()
|
||||
if (fullnameLower.indexOf(object) > -1) {
|
||||
var score = 0;
|
||||
var parts = fullnameLower.split('.');
|
||||
// check for different match types: exact matches of full name or
|
||||
// "last name" (i.e. last dotted part)
|
||||
if (fullnameLower == object || parts[parts.length - 1] == object) {
|
||||
if (fullnameLower === object || parts.slice(-1)[0] === object)
|
||||
score += Scorer.objNameMatch;
|
||||
// matches in last name
|
||||
} else if (parts[parts.length - 1].indexOf(object) > -1) {
|
||||
score += Scorer.objPartialMatch;
|
||||
}
|
||||
var objname = objnames[match[1]][2];
|
||||
var title = titles[match[0]];
|
||||
else if (parts.slice(-1)[0].indexOf(object) > -1)
|
||||
score += Scorer.objPartialMatch; // matches in last name
|
||||
|
||||
const objName = objNames[match[1]][2];
|
||||
const title = titles[match[0]];
|
||||
|
||||
// If more than one term searched for, we require other words to be
|
||||
// found in the name/title/description
|
||||
if (otherterms.length > 0) {
|
||||
var haystack = (prefix + ' ' + name + ' ' +
|
||||
objname + ' ' + title).toLowerCase();
|
||||
var allfound = true;
|
||||
for (i = 0; i < otherterms.length; i++) {
|
||||
if (haystack.indexOf(otherterms[i]) == -1) {
|
||||
allfound = false;
|
||||
break;
|
||||
const otherTerms = new Set(objectTerms);
|
||||
otherTerms.delete(object);
|
||||
if (otherTerms.size > 0) {
|
||||
const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase();
|
||||
if (
|
||||
[...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0)
|
||||
)
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!allfound) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
var descr = objname + _(', in ') + title;
|
||||
|
||||
var anchor = match[3];
|
||||
if (anchor === '')
|
||||
anchor = fullname;
|
||||
else if (anchor == '-')
|
||||
anchor = objnames[match[1]][1] + '-' + fullname;
|
||||
let anchor = match[3];
|
||||
if (anchor === "") anchor = fullname;
|
||||
else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname;
|
||||
|
||||
const descr = objName + _(", in ") + title;
|
||||
|
||||
// add custom score for some objects according to scorer
|
||||
if (Scorer.objPrio.hasOwnProperty(match[2])) {
|
||||
if (Scorer.objPrio.hasOwnProperty(match[2]))
|
||||
score += Scorer.objPrio[match[2]];
|
||||
} else {
|
||||
score += Scorer.objPrioDefault;
|
||||
}
|
||||
results.push([docnames[match[0]], fullname, '#'+anchor, descr, score, filenames[match[0]]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else score += Scorer.objPrioDefault;
|
||||
|
||||
results.push([
|
||||
docNames[match[0]],
|
||||
fullname,
|
||||
"#" + anchor,
|
||||
descr,
|
||||
score,
|
||||
filenames[match[0]],
|
||||
]);
|
||||
};
|
||||
Object.keys(objects).forEach((prefix) =>
|
||||
objects[prefix].forEach((array) =>
|
||||
objectSearchCallback(prefix, array)
|
||||
)
|
||||
);
|
||||
return results;
|
||||
},
|
||||
|
||||
/**
|
||||
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
|
||||
*/
|
||||
escapeRegExp : function(string) {
|
||||
return string.replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
|
||||
},
|
||||
|
||||
/**
|
||||
* search for full-text terms in the index
|
||||
*/
|
||||
performTermsSearch : function(searchterms, excluded, terms, titleterms) {
|
||||
var docnames = this._index.docnames;
|
||||
var filenames = this._index.filenames;
|
||||
var titles = this._index.titles;
|
||||
performTermsSearch: (searchTerms, excludedTerms) => {
|
||||
// prepare search
|
||||
const terms = Search._index.terms;
|
||||
const titleTerms = Search._index.titleterms;
|
||||
const filenames = Search._index.filenames;
|
||||
const docNames = Search._index.docnames;
|
||||
const titles = Search._index.titles;
|
||||
|
||||
var i, j, file;
|
||||
var fileMap = {};
|
||||
var scoreMap = {};
|
||||
var results = [];
|
||||
const scoreMap = new Map();
|
||||
const fileMap = new Map();
|
||||
|
||||
// perform the search on the required terms
|
||||
for (i = 0; i < searchterms.length; i++) {
|
||||
var word = searchterms[i];
|
||||
var files = [];
|
||||
var _o = [
|
||||
searchTerms.forEach((word) => {
|
||||
const files = [];
|
||||
const arr = [
|
||||
{ files: terms[word], score: Scorer.term },
|
||||
{files: titleterms[word], score: Scorer.title}
|
||||
{ files: titleTerms[word], score: Scorer.title },
|
||||
];
|
||||
// add support for partial matches
|
||||
if (word.length > 2) {
|
||||
var word_regex = this.escapeRegExp(word);
|
||||
for (var w in terms) {
|
||||
if (w.match(word_regex) && !terms[word]) {
|
||||
_o.push({files: terms[w], score: Scorer.partialTerm})
|
||||
}
|
||||
}
|
||||
for (var w in titleterms) {
|
||||
if (w.match(word_regex) && !titleterms[word]) {
|
||||
_o.push({files: titleterms[w], score: Scorer.partialTitle})
|
||||
}
|
||||
}
|
||||
const escapedWord = _escapeRegExp(word);
|
||||
Object.keys(terms).forEach((term) => {
|
||||
if (term.match(escapedWord) && !terms[word])
|
||||
arr.push({ files: terms[term], score: Scorer.partialTerm });
|
||||
});
|
||||
Object.keys(titleTerms).forEach((term) => {
|
||||
if (term.match(escapedWord) && !titleTerms[word])
|
||||
arr.push({ files: titleTerms[word], score: Scorer.partialTitle });
|
||||
});
|
||||
}
|
||||
|
||||
// no match but word was a required one
|
||||
if ($u.every(_o, function(o){return o.files === undefined;})) {
|
||||
break;
|
||||
}
|
||||
if (arr.every((record) => record.files === undefined)) return;
|
||||
|
||||
// found search word in contents
|
||||
$u.each(_o, function(o) {
|
||||
var _files = o.files;
|
||||
if (_files === undefined)
|
||||
return
|
||||
arr.forEach((record) => {
|
||||
if (record.files === undefined) return;
|
||||
|
||||
if (_files.length === undefined)
|
||||
_files = [_files];
|
||||
files = files.concat(_files);
|
||||
let recordFiles = record.files;
|
||||
if (recordFiles.length === undefined) recordFiles = [recordFiles];
|
||||
files.push(...recordFiles);
|
||||
|
||||
// set score for the word in each file to Scorer.term
|
||||
for (j = 0; j < _files.length; j++) {
|
||||
file = _files[j];
|
||||
if (!(file in scoreMap))
|
||||
scoreMap[file] = {};
|
||||
scoreMap[file][word] = o.score;
|
||||
}
|
||||
// set score for the word in each file
|
||||
recordFiles.forEach((file) => {
|
||||
if (!scoreMap.has(file)) scoreMap.set(file, {});
|
||||
scoreMap.get(file)[word] = record.score;
|
||||
});
|
||||
});
|
||||
|
||||
// create the mapping
|
||||
for (j = 0; j < files.length; j++) {
|
||||
file = files[j];
|
||||
if (file in fileMap && fileMap[file].indexOf(word) === -1)
|
||||
fileMap[file].push(word);
|
||||
else
|
||||
fileMap[file] = [word];
|
||||
}
|
||||
}
|
||||
files.forEach((file) => {
|
||||
if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1)
|
||||
fileMap.get(file).push(word);
|
||||
else fileMap.set(file, [word]);
|
||||
});
|
||||
});
|
||||
|
||||
// now check if the files don't contain excluded terms
|
||||
for (file in fileMap) {
|
||||
var valid = true;
|
||||
|
||||
const results = [];
|
||||
for (const [file, wordList] of fileMap) {
|
||||
// check if all requirements are matched
|
||||
var filteredTermCount = // as search terms with length < 3 are discarded: ignore
|
||||
searchterms.filter(function(term){return term.length > 2}).length
|
||||
|
||||
// as search terms with length < 3 are discarded
|
||||
const filteredTermCount = [...searchTerms].filter(
|
||||
(term) => term.length > 2
|
||||
).length;
|
||||
if (
|
||||
fileMap[file].length != searchterms.length &&
|
||||
fileMap[file].length != filteredTermCount
|
||||
) continue;
|
||||
wordList.length !== searchTerms.size &&
|
||||
wordList.length !== filteredTermCount
|
||||
)
|
||||
continue;
|
||||
|
||||
// ensure that none of the excluded terms is in the search result
|
||||
for (i = 0; i < excluded.length; i++) {
|
||||
if (terms[excluded[i]] == file ||
|
||||
titleterms[excluded[i]] == file ||
|
||||
$u.contains(terms[excluded[i]] || [], file) ||
|
||||
$u.contains(titleterms[excluded[i]] || [], file)) {
|
||||
valid = false;
|
||||
if (
|
||||
[...excludedTerms].some(
|
||||
(term) =>
|
||||
terms[term] === file ||
|
||||
titleTerms[term] === file ||
|
||||
(terms[term] || []).includes(file) ||
|
||||
(titleTerms[term] || []).includes(file)
|
||||
)
|
||||
)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// if we have still a valid result we can add it to the result list
|
||||
if (valid) {
|
||||
// select one (max) score for the file.
|
||||
// for better ranking, we should calculate ranking by using words statistics like basic tf-idf...
|
||||
var score = $u.max($u.map(fileMap[file], function(w){return scoreMap[file][w]}));
|
||||
results.push([docnames[file], titles[file], '', null, score, filenames[file]]);
|
||||
}
|
||||
const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w]));
|
||||
// add result to the result list
|
||||
results.push([
|
||||
docNames[file],
|
||||
titles[file],
|
||||
"",
|
||||
null,
|
||||
score,
|
||||
filenames[file],
|
||||
]);
|
||||
}
|
||||
return results;
|
||||
},
|
||||
|
@ -492,34 +539,28 @@ var Search = {
|
|||
/**
|
||||
* helper function to return a node containing the
|
||||
* search summary for a given text. keywords is a list
|
||||
* of stemmed words, hlwords is the list of normal, unstemmed
|
||||
* words. the first one is used to find the occurrence, the
|
||||
* latter for highlighting it.
|
||||
* of stemmed words.
|
||||
*/
|
||||
makeSearchSummary : function(htmlText, keywords, hlwords) {
|
||||
var text = Search.htmlToText(htmlText);
|
||||
if (text == "") {
|
||||
return null;
|
||||
}
|
||||
var textLower = text.toLowerCase();
|
||||
var start = 0;
|
||||
$.each(keywords, function() {
|
||||
var i = textLower.indexOf(this.toLowerCase());
|
||||
if (i > -1)
|
||||
start = i;
|
||||
});
|
||||
start = Math.max(start - 120, 0);
|
||||
var excerpt = ((start > 0) ? '...' : '') +
|
||||
$.trim(text.substr(start, 240)) +
|
||||
((start + 240 - text.length) ? '...' : '');
|
||||
var rv = $('<p class="context"></p>').text(excerpt);
|
||||
$.each(hlwords, function() {
|
||||
rv = rv.highlightText(this, 'highlighted');
|
||||
});
|
||||
return rv;
|
||||
}
|
||||
makeSearchSummary: (htmlText, keywords) => {
|
||||
const text = Search.htmlToText(htmlText);
|
||||
if (text === "") return null;
|
||||
|
||||
const textLower = text.toLowerCase();
|
||||
const actualStartPosition = [...keywords]
|
||||
.map((k) => textLower.indexOf(k.toLowerCase()))
|
||||
.filter((i) => i > -1)
|
||||
.slice(-1)[0];
|
||||
const startWithContext = Math.max(actualStartPosition - 120, 0);
|
||||
|
||||
const top = startWithContext === 0 ? "" : "...";
|
||||
const tail = startWithContext + 240 < text.length ? "..." : "";
|
||||
|
||||
let summary = document.createElement("p");
|
||||
summary.classList.add("context");
|
||||
summary.textContent = top + text.substr(startWithContext, 240).trim() + tail;
|
||||
|
||||
return summary;
|
||||
},
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
Search.init();
|
||||
});
|
||||
_ready(Search.init);
|
||||
|
|
144
docs/_static/sphinx_highlight.js
vendored
Normal file
144
docs/_static/sphinx_highlight.js
vendored
Normal file
|
@ -0,0 +1,144 @@
|
|||
/* Highlighting utilities for Sphinx HTML documentation. */
|
||||
"use strict";
|
||||
|
||||
const SPHINX_HIGHLIGHT_ENABLED = true
|
||||
|
||||
/**
|
||||
* highlight a given string on a node by wrapping it in
|
||||
* span elements with the given class name.
|
||||
*/
|
||||
const _highlight = (node, addItems, text, className) => {
|
||||
if (node.nodeType === Node.TEXT_NODE) {
|
||||
const val = node.nodeValue;
|
||||
const parent = node.parentNode;
|
||||
const pos = val.toLowerCase().indexOf(text);
|
||||
if (
|
||||
pos >= 0 &&
|
||||
!parent.classList.contains(className) &&
|
||||
!parent.classList.contains("nohighlight")
|
||||
) {
|
||||
let span;
|
||||
|
||||
const closestNode = parent.closest("body, svg, foreignObject");
|
||||
const isInSVG = closestNode && closestNode.matches("svg");
|
||||
if (isInSVG) {
|
||||
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
||||
} else {
|
||||
span = document.createElement("span");
|
||||
span.classList.add(className);
|
||||
}
|
||||
|
||||
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
|
||||
parent.insertBefore(
|
||||
span,
|
||||
parent.insertBefore(
|
||||
document.createTextNode(val.substr(pos + text.length)),
|
||||
node.nextSibling
|
||||
)
|
||||
);
|
||||
node.nodeValue = val.substr(0, pos);
|
||||
|
||||
if (isInSVG) {
|
||||
const rect = document.createElementNS(
|
||||
"http://www.w3.org/2000/svg",
|
||||
"rect"
|
||||
);
|
||||
const bbox = parent.getBBox();
|
||||
rect.x.baseVal.value = bbox.x;
|
||||
rect.y.baseVal.value = bbox.y;
|
||||
rect.width.baseVal.value = bbox.width;
|
||||
rect.height.baseVal.value = bbox.height;
|
||||
rect.setAttribute("class", className);
|
||||
addItems.push({ parent: parent, target: rect });
|
||||
}
|
||||
}
|
||||
} else if (node.matches && !node.matches("button, select, textarea")) {
|
||||
node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
|
||||
}
|
||||
};
|
||||
const _highlightText = (thisNode, text, className) => {
|
||||
let addItems = [];
|
||||
_highlight(thisNode, addItems, text, className);
|
||||
addItems.forEach((obj) =>
|
||||
obj.parent.insertAdjacentElement("beforebegin", obj.target)
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Small JavaScript module for the documentation.
|
||||
*/
|
||||
const SphinxHighlight = {
|
||||
|
||||
/**
|
||||
* highlight the search words provided in localstorage in the text
|
||||
*/
|
||||
highlightSearchWords: () => {
|
||||
if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight
|
||||
|
||||
// get and clear terms from localstorage
|
||||
const url = new URL(window.location);
|
||||
const highlight =
|
||||
localStorage.getItem("sphinx_highlight_terms")
|
||||
|| url.searchParams.get("highlight")
|
||||
|| "";
|
||||
localStorage.removeItem("sphinx_highlight_terms")
|
||||
url.searchParams.delete("highlight");
|
||||
window.history.replaceState({}, "", url);
|
||||
|
||||
// get individual terms from highlight string
|
||||
const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
|
||||
if (terms.length === 0) return; // nothing to do
|
||||
|
||||
// There should never be more than one element matching "div.body"
|
||||
const divBody = document.querySelectorAll("div.body");
|
||||
const body = divBody.length ? divBody[0] : document.querySelector("body");
|
||||
window.setTimeout(() => {
|
||||
terms.forEach((term) => _highlightText(body, term, "highlighted"));
|
||||
}, 10);
|
||||
|
||||
const searchBox = document.getElementById("searchbox");
|
||||
if (searchBox === null) return;
|
||||
searchBox.appendChild(
|
||||
document
|
||||
.createRange()
|
||||
.createContextualFragment(
|
||||
'<p class="highlight-link">' +
|
||||
'<a href="javascript:SphinxHighlight.hideSearchWords()">' +
|
||||
_("Hide Search Matches") +
|
||||
"</a></p>"
|
||||
)
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* helper function to hide the search marks again
|
||||
*/
|
||||
hideSearchWords: () => {
|
||||
document
|
||||
.querySelectorAll("#searchbox .highlight-link")
|
||||
.forEach((el) => el.remove());
|
||||
document
|
||||
.querySelectorAll("span.highlighted")
|
||||
.forEach((el) => el.classList.remove("highlighted"));
|
||||
localStorage.removeItem("sphinx_highlight_terms")
|
||||
},
|
||||
|
||||
initEscapeListener: () => {
|
||||
// only install a listener if it is really needed
|
||||
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return;
|
||||
|
||||
document.addEventListener("keydown", (event) => {
|
||||
// bail for input elements
|
||||
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
|
||||
// bail with special keys
|
||||
if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;
|
||||
if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) {
|
||||
SphinxHighlight.hideSearchWords();
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
_ready(SphinxHighlight.highlightSearchWords);
|
||||
_ready(SphinxHighlight.initEscapeListener);
|
2042
docs/_static/underscore-1.13.1.js
vendored
2042
docs/_static/underscore-1.13.1.js
vendored
File diff suppressed because it is too large
Load diff
6
docs/_static/underscore.js
vendored
6
docs/_static/underscore.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Dynamic Bindings — Raylib Python documentation</title>
|
||||
|
@ -12,10 +12,11 @@
|
|||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<script src="_static/sphinx_highlight.js"></script>
|
||||
<script src="_static/js/theme.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
|
@ -28,11 +29,15 @@
|
|||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
<a href="index.html" class="icon icon-home"> Raylib Python
|
||||
|
||||
|
||||
|
||||
<a href="index.html" class="icon icon-home">
|
||||
Raylib Python
|
||||
</a>
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
|
@ -40,7 +45,7 @@
|
|||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.2</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.5</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
|
||||
|
@ -71,8 +76,8 @@
|
|||
<div class="rst-content">
|
||||
<div role="navigation" aria-label="Page navigation">
|
||||
<ul class="wy-breadcrumbs">
|
||||
<li><a href="index.html" class="icon icon-home"></a> »</li>
|
||||
<li>Dynamic Bindings</li>
|
||||
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
|
||||
<li class="breadcrumb-item active">Dynamic Bindings</li>
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
<a href="_sources/dynamic.rst.txt" rel="nofollow"> View page source</a>
|
||||
</li>
|
||||
|
@ -83,7 +88,7 @@
|
|||
<div itemprop="articleBody">
|
||||
|
||||
<section id="dynamic-bindings">
|
||||
<h1>Dynamic Bindings<a class="headerlink" href="#dynamic-bindings" title="Permalink to this headline"></a></h1>
|
||||
<h1>Dynamic Bindings<a class="headerlink" href="#dynamic-bindings" title="Permalink to this heading"></a></h1>
|
||||
<p>CFFI ABI dynamic bindings avoid the need to compile a C extension module. They now been moved to a separate module:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python3</span> <span class="o">-</span><span class="n">m</span> <span class="n">pip</span> <span class="n">install</span> <span class="n">raylib_dynamic</span>
|
||||
</pre></div>
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Raylib Python — Raylib Python documentation</title>
|
||||
|
@ -12,14 +12,15 @@
|
|||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<script src="_static/sphinx_highlight.js"></script>
|
||||
<script src="_static/js/theme.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="Python Bindings for Raylib 4.2" href="README.html" />
|
||||
<link rel="next" title="Python Bindings for Raylib 4.5" href="README.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
@ -27,11 +28,15 @@
|
|||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
<a href="#" class="icon icon-home"> Raylib Python
|
||||
|
||||
|
||||
|
||||
<a href="#" class="icon icon-home">
|
||||
Raylib Python
|
||||
</a>
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
|
@ -39,7 +44,7 @@
|
|||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.2</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.5</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
|
||||
|
@ -70,8 +75,8 @@
|
|||
<div class="rst-content">
|
||||
<div role="navigation" aria-label="Page navigation">
|
||||
<ul class="wy-breadcrumbs">
|
||||
<li><a href="#" class="icon icon-home"></a> »</li>
|
||||
<li>Raylib Python</li>
|
||||
<li><a href="#" class="icon icon-home" aria-label="Home"></a></li>
|
||||
<li class="breadcrumb-item active">Raylib Python</li>
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
<a href="_sources/index.rst.txt" rel="nofollow"> View page source</a>
|
||||
</li>
|
||||
|
@ -82,11 +87,11 @@
|
|||
<div itemprop="articleBody">
|
||||
|
||||
<section id="raylib-python">
|
||||
<h1>Raylib Python<a class="headerlink" href="#raylib-python" title="Permalink to this headline"></a></h1>
|
||||
<h1>Raylib Python<a class="headerlink" href="#raylib-python" title="Permalink to this heading"></a></h1>
|
||||
<div class="toctree-wrapper compound">
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.2</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.5</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
|
||||
|
@ -113,7 +118,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
||||
<a href="README.html" class="btn btn-neutral float-right" title="Python Bindings for Raylib 4.2" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="README.html" class="btn btn-neutral float-right" title="Python Bindings for Raylib 4.5" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
|
BIN
docs/objects.inv
BIN
docs/objects.inv
Binary file not shown.
|
@ -11,10 +11,11 @@
|
|||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<script src="_static/sphinx_highlight.js"></script>
|
||||
<script src="_static/js/theme.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
|
@ -32,11 +33,15 @@
|
|||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
<a href="index.html" class="icon icon-home"> Raylib Python
|
||||
|
||||
|
||||
|
||||
<a href="index.html" class="icon icon-home">
|
||||
Raylib Python
|
||||
</a>
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
|
@ -44,7 +49,7 @@
|
|||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.2</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.5</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
|
||||
|
@ -75,8 +80,8 @@
|
|||
<div class="rst-content">
|
||||
<div role="navigation" aria-label="Page navigation">
|
||||
<ul class="wy-breadcrumbs">
|
||||
<li><a href="index.html" class="icon icon-home"></a> »</li>
|
||||
<li>Python Module Index</li>
|
||||
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
|
||||
<li class="breadcrumb-item active">Python Module Index</li>
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
</li>
|
||||
</ul>
|
||||
|
|
3962
docs/pyray.html
3962
docs/pyray.html
File diff suppressed because it is too large
Load diff
4265
docs/raylib.html
4265
docs/raylib.html
File diff suppressed because it is too large
Load diff
|
@ -12,10 +12,11 @@
|
|||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<script src="_static/sphinx_highlight.js"></script>
|
||||
<script src="_static/js/theme.js"></script>
|
||||
<script src="_static/searchtools.js"></script>
|
||||
<script src="_static/language_data.js"></script>
|
||||
|
@ -28,11 +29,15 @@
|
|||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
<a href="index.html" class="icon icon-home"> Raylib Python
|
||||
|
||||
|
||||
|
||||
<a href="index.html" class="icon icon-home">
|
||||
Raylib Python
|
||||
</a>
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="#" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
|
@ -40,7 +45,7 @@
|
|||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.2</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.5</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
|
||||
|
@ -71,8 +76,8 @@
|
|||
<div class="rst-content">
|
||||
<div role="navigation" aria-label="Page navigation">
|
||||
<ul class="wy-breadcrumbs">
|
||||
<li><a href="index.html" class="icon icon-home"></a> »</li>
|
||||
<li>Search</li>
|
||||
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
|
||||
<li class="breadcrumb-item active">Search</li>
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
</li>
|
||||
</ul>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -305,6 +305,7 @@ class BlendMode(IntEnum):
|
|||
BLEND_SUBTRACT_COLORS = 4
|
||||
BLEND_ALPHA_PREMULTIPLY = 5
|
||||
BLEND_CUSTOM = 6
|
||||
BLEND_CUSTOM_SEPARATE = 7
|
||||
|
||||
class Gesture(IntEnum):
|
||||
GESTURE_NONE = 0
|
||||
|
@ -420,6 +421,9 @@ class GuiDropdownBoxProperty(IntEnum):
|
|||
class GuiTextBoxProperty(IntEnum):
|
||||
TEXT_INNER_PADDING = 16
|
||||
TEXT_LINES_SPACING = 17
|
||||
TEXT_ALIGNMENT_VERTICAL = 18
|
||||
TEXT_MULTILINE = 19
|
||||
TEXT_WRAP_MODE = 20
|
||||
|
||||
class GuiSpinnerProperty(IntEnum):
|
||||
SPIN_BUTTON_WIDTH = 16
|
||||
|
@ -645,19 +649,19 @@ class GuiIconName(IntEnum):
|
|||
ICON_FILE_NEW = 203
|
||||
ICON_FOLDER_ADD = 204
|
||||
ICON_ALARM = 205
|
||||
ICON_206 = 206
|
||||
ICON_207 = 207
|
||||
ICON_208 = 208
|
||||
ICON_209 = 209
|
||||
ICON_210 = 210
|
||||
ICON_211 = 211
|
||||
ICON_212 = 212
|
||||
ICON_213 = 213
|
||||
ICON_214 = 214
|
||||
ICON_215 = 215
|
||||
ICON_216 = 216
|
||||
ICON_217 = 217
|
||||
ICON_218 = 218
|
||||
ICON_CPU = 206
|
||||
ICON_ROM = 207
|
||||
ICON_STEP_OVER = 208
|
||||
ICON_STEP_INTO = 209
|
||||
ICON_STEP_OUT = 210
|
||||
ICON_RESTART = 211
|
||||
ICON_BREAKPOINT_ON = 212
|
||||
ICON_BREAKPOINT_OFF = 213
|
||||
ICON_BURGER_MENU = 214
|
||||
ICON_CASE_SENSITIVE = 215
|
||||
ICON_REG_EXP = 216
|
||||
ICON_FOLDER = 217
|
||||
ICON_FILE = 218
|
||||
ICON_219 = 219
|
||||
ICON_220 = 220
|
||||
ICON_221 = 221
|
||||
|
|
|
@ -17,10 +17,9 @@ print(model.materials) # SHOULD BE A pointer to a 'struct Material' but some is
|
|||
model.materials.maps[rl.MATERIAL_MAP_ALBEDO].texture = texture
|
||||
|
||||
rl.UnloadImage(image)
|
||||
rl.SetCameraMode(camera[0], rl.CAMERA_ORBITAL)
|
||||
|
||||
while not rl.WindowShouldClose():
|
||||
rl.UpdateCamera(camera)
|
||||
rl.UpdateCamera(camera, rl.CAMERA_ORBITAL)
|
||||
rl.BeginDrawing()
|
||||
rl.ClearBackground(colors.RAYWHITE)
|
||||
rl.BeginMode3D(camera[0])
|
||||
|
|
|
@ -19,14 +19,13 @@ model = pr.load_model_from_mesh(mesh)
|
|||
model.materials.maps[pr.MATERIAL_MAP_ALBEDO].texture = texture
|
||||
|
||||
pr.unload_image(image)
|
||||
pr.set_camera_mode(camera, pr.CAMERA_ORBITAL)
|
||||
|
||||
pos = pr.get_mouse_position()
|
||||
ray = pr.get_mouse_ray(pos, camera)
|
||||
|
||||
|
||||
while not pr.window_should_close():
|
||||
pr.update_camera(camera)
|
||||
pr.update_camera(camera, pr.CAMERA_ORBITAL)
|
||||
pr.begin_drawing()
|
||||
pr.clear_background(pr.RAYWHITE)
|
||||
pr.begin_mode_3d(camera)
|
||||
|
|
|
@ -31,13 +31,11 @@ for i in range(MAX_COLUMNS):
|
|||
colors[i] = pyray.Color(pyray.get_random_value(20, 255), pyray.get_random_value(10, 55), 30, 255)
|
||||
|
||||
|
||||
pyray.set_camera_mode(camera, pyray.CAMERA_FIRST_PERSON) # Set a first person camera mode
|
||||
|
||||
pyray.set_target_fps(60)
|
||||
|
||||
while not pyray.window_should_close():
|
||||
|
||||
pyray.update_camera(camera)
|
||||
pyray.update_camera(camera, pyray.CAMERA_FIRST_PERSON)
|
||||
|
||||
pyray.begin_drawing()
|
||||
|
||||
|
|
|
@ -26,8 +26,6 @@ count = ray.ffi.new("unsigned int *", 1)
|
|||
anims = ray.load_model_animations("resources/models/iqm/guyanim.iqm", count)
|
||||
anim_frame_counter = 0
|
||||
|
||||
ray.set_camera_mode(camera, ray.CAMERA_FREE) # Set free camera mode
|
||||
|
||||
ray.set_target_fps(60) # Set our game to run at 60 frames-per-second
|
||||
#--------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -35,7 +33,7 @@ ray.set_target_fps(60) # Set our game to run at 60 frames-per-
|
|||
while not ray.window_should_close(): # Detect window close button or ESC key
|
||||
# Update
|
||||
#----------------------------------------------------------------------------------
|
||||
ray.update_camera(camera)
|
||||
ray.update_camera(camera, ray.CAMERA_FREE)
|
||||
|
||||
# Play animation when spacebar is held down
|
||||
if ray.is_key_down(ray.KEY_SPACE):
|
||||
|
|
|
@ -33,8 +33,6 @@ camera.projection = CAMERA_PERSPECTIVE
|
|||
bill = LoadTexture(b"resources/billboard.png") # Our texture billboard
|
||||
billPosition = [ 0.0, 2.0, 0.0 ] # Position where draw billboard
|
||||
|
||||
SetCameraMode(camera, CAMERA_ORBITAL) # Set an orbital camera mode
|
||||
|
||||
SetTargetFPS(60) # Set our game to run at 60 frames-per-second
|
||||
#--------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -42,7 +40,7 @@ SetTargetFPS(60) # Set our game to run at 60 frames-per-se
|
|||
while not WindowShouldClose() : # Detect window close button or ESC key
|
||||
# Update
|
||||
#----------------------------------------------------------------------------------
|
||||
UpdateCamera(cameraPtr) # Update camera
|
||||
UpdateCamera(cameraPtr, CAMERA_ORBITAL) # Update camera
|
||||
#----------------------------------------------------------------------------------
|
||||
|
||||
# Draw
|
||||
|
|
|
@ -36,7 +36,6 @@ mapPosition = [ -16.0, 0.0, -8.0 ] # Set model position
|
|||
|
||||
UnloadImage(image) # Unload cubesmap image from RAM, already uploaded to VRAM
|
||||
|
||||
SetCameraMode(camera[0], CAMERA_ORBITAL) # Set an orbital camera mode
|
||||
|
||||
SetTargetFPS(60) # Set our game to run at 60 frames-per-second
|
||||
#--------------------------------------------------------------------------------------
|
||||
|
@ -46,7 +45,7 @@ while not WindowShouldClose(): # Detect window close button or ESC key
|
|||
|
||||
# Update
|
||||
#----------------------------------------------------------------------------------
|
||||
UpdateCamera(camera) # Update camera
|
||||
UpdateCamera(camera, CAMERA_ORBITAL) # Update camera
|
||||
#----------------------------------------------------------------------------------
|
||||
|
||||
# Draw
|
||||
|
|
|
@ -32,8 +32,6 @@ mapPosition = ( -8.0, 0.0, -8.0 ) # Define model position
|
|||
|
||||
UnloadImage(image) # Unload heightmap image from RAM, already uploaded to VRAM
|
||||
|
||||
SetCameraMode(camera[0], CAMERA_ORBITAL) # Set an orbital camera mode
|
||||
|
||||
SetTargetFPS(60) # Set our game to run at 60 frames-per-second
|
||||
#--------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -41,7 +39,7 @@ SetTargetFPS(60) # Set our game to run at 60 frames-per-se
|
|||
while not WindowShouldClose(): # Detect window close button or ESC key
|
||||
# Update
|
||||
#----------------------------------------------------------------------------------
|
||||
UpdateCamera(camera) # Update camera
|
||||
UpdateCamera(camera, CAMERA_ORBITAL) # Update camera
|
||||
#----------------------------------------------------------------------------------
|
||||
|
||||
# Draw
|
||||
|
|
|
@ -26,7 +26,6 @@ camera.up = [ 0.0, 1.0, 0.0 ] # Camera up vector (rotation towards targ
|
|||
camera.fovy = 45.0 # Camera field-of-view Y
|
||||
camera.projection = CAMERA_PERSPECTIVE # Camera mode type
|
||||
|
||||
rl.SetCameraMode(camera[0], rl.CAMERA_ORBITAL)
|
||||
|
||||
model = LoadModel(b"resources/models/house.obj") # Load OBJ model
|
||||
texture = LoadTexture(b"resources/models/house_diffuse.png") # Load model texture
|
||||
|
@ -42,7 +41,7 @@ while not WindowShouldClose(): # Detect window close button or ESC key
|
|||
#----------------------------------------------------------------------------------
|
||||
#...
|
||||
#----------------------------------------------------------------------------------
|
||||
rl.UpdateCamera(camera);
|
||||
rl.UpdateCamera(camera, rl.CAMERA_ORBITAL)
|
||||
# Draw
|
||||
#----------------------------------------------------------------------------------
|
||||
BeginDrawing()
|
||||
|
|
|
@ -42,12 +42,10 @@ skybox.materials[0].maps[rl.MAP_CUBEMAP].texture = rl.GenTextureCubemap(shdrCube
|
|||
rl.UnloadTexture(texHDR)
|
||||
rl.UnloadShader(shdrCubemap)
|
||||
|
||||
rl.SetCameraMode(camera[0], rl.CAMERA_FIRST_PERSON)
|
||||
|
||||
rl.SetTargetFPS(60)
|
||||
|
||||
while not rl.WindowShouldClose():
|
||||
rl.UpdateCamera(camera)
|
||||
rl.UpdateCamera(camera, rl.CAMERA_FIRST_PERSON)
|
||||
rl.BeginDrawing()
|
||||
rl.ClearBackground(RAYWHITE)
|
||||
rl.BeginMode3D(camera[0])
|
||||
|
|
|
@ -90,8 +90,6 @@ modelA.materials[0].shader = lightSystem.shader
|
|||
modelB.materials[0].shader = lightSystem.shader
|
||||
modelC.materials[0].shader = lightSystem.shader
|
||||
|
||||
rl.SetCameraMode(camera[0], rl.CAMERA_ORBITAL) # Set an orbital camera mode
|
||||
|
||||
rl.SetTargetFPS(60) # // Set our game to run at 60 frames-per-second
|
||||
# --------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -104,7 +102,7 @@ while not rl.WindowShouldClose(): # Detect window close button or ESC key
|
|||
if rl.IsKeyPressed(rl.KEY_G): lights2.enabled = not lights2.enabled
|
||||
if rl.IsKeyPressed(rl.KEY_B): lights3.enabled = not lights3.enabled
|
||||
|
||||
rl.UpdateCamera(camera) # Update camera
|
||||
rl.UpdateCamera(camera, rl.CAMERA_ORBITAL) # Update camera
|
||||
|
||||
# Make the lights do differing orbits
|
||||
angle -= 0.02
|
||||
|
|
|
@ -4,6 +4,9 @@ from typing import Any
|
|||
def pointer(struct):
|
||||
...
|
||||
|
||||
def attach_audio_mixed_processor(processor: Any,) -> None:
|
||||
"""Attach audio stream processor to the entire audio pipeline"""
|
||||
...
|
||||
def attach_audio_stream_processor(stream: AudioStream,processor: Any,) -> None:
|
||||
"""Attach audio stream processor to stream"""
|
||||
...
|
||||
|
@ -55,6 +58,9 @@ def check_collision_point_circle(point: Vector2,center: Vector2,radius: float,)
|
|||
def check_collision_point_line(point: Vector2,p1: Vector2,p2: Vector2,threshold: int,) -> bool:
|
||||
"""Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]"""
|
||||
...
|
||||
def check_collision_point_poly(point: Vector2,points: Any,pointCount: int,) -> bool:
|
||||
"""Check if point is within a polygon described by array of vertices"""
|
||||
...
|
||||
def check_collision_point_rec(point: Vector2,rec: Rectangle,) -> bool:
|
||||
"""Check if point is inside rectangle"""
|
||||
...
|
||||
|
@ -89,7 +95,7 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def close_window() -> None:
|
||||
"""Close window and unload OpenGL context"""
|
||||
...
|
||||
def codepoint_to_utf8(codepoint: int,byteSize: Any,) -> str:
|
||||
def codepoint_to_utf8(codepoint: int,utf8Size: Any,) -> str:
|
||||
"""Encode one codepoint into UTF-8 byte array (array length returned as parameter)"""
|
||||
...
|
||||
def color_alpha(color: Color,alpha: float,) -> Color:
|
||||
|
@ -98,6 +104,12 @@ def color_alpha(color: Color,alpha: float,) -> Color:
|
|||
def color_alpha_blend(dst: Color,src: Color,tint: Color,) -> Color:
|
||||
"""Get src alpha-blended into dst color with tint"""
|
||||
...
|
||||
def color_brightness(color: Color,factor: float,) -> Color:
|
||||
"""Get color with brightness correction, brightness factor goes from -1.0f to 1.0f"""
|
||||
...
|
||||
def color_contrast(color: Color,contrast: float,) -> Color:
|
||||
"""Get color with contrast correction, contrast values between -1.0f and 1.0f"""
|
||||
...
|
||||
def color_from_hsv(hue: float,saturation: float,value: float,) -> Color:
|
||||
"""Get a Color from HSV values, hue [0..360], saturation/value [0..1]"""
|
||||
...
|
||||
|
@ -107,6 +119,9 @@ def color_from_normalized(normalized: Vector4,) -> Color:
|
|||
def color_normalize(color: Color,) -> Vector4:
|
||||
"""Get Color normalized as float [0..1]"""
|
||||
...
|
||||
def color_tint(color: Color,tint: Color,) -> Color:
|
||||
"""Get color multiplied with another color"""
|
||||
...
|
||||
def color_to_hsv(color: Color,) -> Vector3:
|
||||
"""Get HSV values for a Color, hue [0..360], saturation/value [0..1]"""
|
||||
...
|
||||
|
@ -142,6 +157,9 @@ def destroy_physics_body(PhysicsBodyData_pointer_0: Any,) -> None:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def detach_audio_mixed_processor(processor: Any,) -> None:
|
||||
"""Detach audio stream processor from the entire audio pipeline"""
|
||||
...
|
||||
def detach_audio_stream_processor(stream: AudioStream,processor: Any,) -> None:
|
||||
"""Detach audio stream processor from stream"""
|
||||
...
|
||||
|
@ -166,6 +184,12 @@ def draw_billboard_rec(camera: Camera3D,texture: Texture,source: Rectangle,posit
|
|||
def draw_bounding_box(box: BoundingBox,color: Color,) -> None:
|
||||
"""Draw bounding box (wires)"""
|
||||
...
|
||||
def draw_capsule(startPos: Vector3,endPos: Vector3,radius: float,slices: int,rings: int,color: Color,) -> None:
|
||||
"""Draw a capsule with the center of its sphere caps at startPos and endPos"""
|
||||
...
|
||||
def draw_capsule_wires(startPos: Vector3,endPos: Vector3,radius: float,slices: int,rings: int,color: Color,) -> None:
|
||||
"""Draw capsule wireframe with the center of its sphere caps at startPos and endPos"""
|
||||
...
|
||||
def draw_circle(centerX: int,centerY: int,radius: float,color: Color,) -> None:
|
||||
"""Draw a color-filled circle"""
|
||||
...
|
||||
|
@ -190,12 +214,6 @@ def draw_circle_v(center: Vector2,radius: float,color: Color,) -> None:
|
|||
def draw_cube(position: Vector3,width: float,height: float,length: float,color: Color,) -> None:
|
||||
"""Draw cube"""
|
||||
...
|
||||
def draw_cube_texture(texture: Texture,position: Vector3,width: float,height: float,length: float,color: Color,) -> None:
|
||||
"""Draw cube textured"""
|
||||
...
|
||||
def draw_cube_texture_rec(texture: Texture,source: Rectangle,position: Vector3,width: float,height: float,length: float,color: Color,) -> None:
|
||||
"""Draw cube with a region of a texture"""
|
||||
...
|
||||
def draw_cube_v(position: Vector3,size: Vector3,color: Color,) -> None:
|
||||
"""Draw cube (Vector version)"""
|
||||
...
|
||||
|
@ -367,21 +385,12 @@ def draw_texture_ex(texture: Texture,position: Vector2,rotation: float,scale: fl
|
|||
def draw_texture_n_patch(texture: Texture,nPatchInfo: NPatchInfo,dest: Rectangle,origin: Vector2,rotation: float,tint: Color,) -> None:
|
||||
"""Draws a texture (or part of it) that stretches or shrinks nicely"""
|
||||
...
|
||||
def draw_texture_poly(texture: Texture,center: Vector2,points: Any,texcoords: Any,pointCount: int,tint: Color,) -> None:
|
||||
"""Draw a textured polygon"""
|
||||
...
|
||||
def draw_texture_pro(texture: Texture,source: Rectangle,dest: Rectangle,origin: Vector2,rotation: float,tint: Color,) -> None:
|
||||
"""Draw a part of a texture defined by a rectangle with 'pro' parameters"""
|
||||
...
|
||||
def draw_texture_quad(texture: Texture,tiling: Vector2,offset: Vector2,quad: Rectangle,tint: Color,) -> None:
|
||||
"""Draw texture quad with tiling and offset parameters"""
|
||||
...
|
||||
def draw_texture_rec(texture: Texture,source: Rectangle,position: Vector2,tint: Color,) -> None:
|
||||
"""Draw a part of a texture defined by a rectangle"""
|
||||
...
|
||||
def draw_texture_tiled(texture: Texture,source: Rectangle,dest: Rectangle,origin: Vector2,rotation: float,scale: float,tint: Color,) -> None:
|
||||
"""Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest."""
|
||||
...
|
||||
def draw_texture_v(texture: Texture,position: Vector2,tint: Color,) -> None:
|
||||
"""Draw a Texture2D with position defined as Vector2"""
|
||||
...
|
||||
|
@ -489,6 +498,12 @@ def gen_image_gradient_radial(width: int,height: int,density: float,inner: Color
|
|||
def gen_image_gradient_v(width: int,height: int,top: Color,bottom: Color,) -> Image:
|
||||
"""Generate image: vertical gradient"""
|
||||
...
|
||||
def gen_image_perlin_noise(width: int,height: int,offsetX: int,offsetY: int,scale: float,) -> Image:
|
||||
"""Generate image: perlin noise"""
|
||||
...
|
||||
def gen_image_text(width: int,height: int,text: str,) -> Image:
|
||||
"""Generate image: grayscale image from text data"""
|
||||
...
|
||||
def gen_image_white_noise(width: int,height: int,factor: float,) -> Image:
|
||||
"""Generate image: white noise"""
|
||||
...
|
||||
|
@ -546,12 +561,18 @@ def get_char_pressed() -> int:
|
|||
def get_clipboard_text() -> str:
|
||||
"""Get clipboard text content"""
|
||||
...
|
||||
def get_codepoint(text: str,bytesProcessed: Any,) -> int:
|
||||
def get_codepoint(text: str,codepointSize: Any,) -> int:
|
||||
"""Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure"""
|
||||
...
|
||||
def get_codepoint_count(text: str,) -> int:
|
||||
"""Get total number of codepoints in a UTF-8 encoded string"""
|
||||
...
|
||||
def get_codepoint_next(text: str,codepointSize: Any,) -> int:
|
||||
"""Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure"""
|
||||
...
|
||||
def get_codepoint_previous(text: str,codepointSize: Any,) -> int:
|
||||
"""Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure"""
|
||||
...
|
||||
def get_collision_rec(rec1: Rectangle,rec2: Rectangle,) -> Rectangle:
|
||||
"""Get collision rectangle for two rectangles collision"""
|
||||
...
|
||||
|
@ -766,9 +787,6 @@ def get_shader_location(shader: Shader,uniformName: str,) -> int:
|
|||
def get_shader_location_attrib(shader: Shader,attribName: str,) -> int:
|
||||
"""Get shader attribute location"""
|
||||
...
|
||||
def get_sounds_playing() -> int:
|
||||
"""Get number of sounds playing in the multichannel"""
|
||||
...
|
||||
def get_time() -> float:
|
||||
"""Get elapsed time in seconds since InitWindow()"""
|
||||
...
|
||||
|
@ -816,16 +834,6 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def gui_check_box(Rectangle_0: Rectangle,str_1: str,_Bool_2: bool,) -> bool:
|
||||
"""_Bool GuiCheckBox(struct Rectangle, char *, _Bool);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def gui_check_icon_pixel(int_0: int,int_1: int,int_2: int,) -> bool:
|
||||
"""_Bool GuiCheckIconPixel(int, int, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def gui_clear_icon_pixel(int_0: int,int_1: int,int_2: int,) -> None:
|
||||
"""void GuiClearIconPixel(int, int, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def gui_color_bar_alpha(Rectangle_0: Rectangle,str_1: str,float_2: float,) -> float:
|
||||
|
@ -856,6 +864,11 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def gui_disable() -> None:
|
||||
"""void GuiDisable();
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def gui_disable_tooltip() -> None:
|
||||
"""void GuiDisableTooltip();
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def gui_draw_icon(int_0: int,int_1: int,int_2: int,int_3: int,Color_4: Color,) -> None:
|
||||
|
@ -876,6 +889,11 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def gui_enable() -> None:
|
||||
"""void GuiEnable();
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def gui_enable_tooltip() -> None:
|
||||
"""void GuiEnableTooltip();
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def gui_fade(float_0: float,) -> None:
|
||||
|
@ -886,11 +904,6 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def gui_get_font() -> Font:
|
||||
"""struct Font GuiGetFont();
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def gui_get_icon_data(int_0: int,) -> Any:
|
||||
"""unsigned int *GuiGetIconData(int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def gui_get_icons() -> Any:
|
||||
|
@ -951,6 +964,11 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def gui_list_view_ex(Rectangle_0: Rectangle,str_pointer_1: str,int_2: int,int_pointer_3: Any,int_pointer_4: Any,int_5: int,) -> int:
|
||||
"""int GuiListViewEx(struct Rectangle, char * *, int, int *, int *, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def gui_load_icons(str_0: str,_Bool_1: bool,) -> str:
|
||||
"""char * *GuiLoadIcons(char *, _Bool);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def gui_load_style(str_0: str,) -> None:
|
||||
|
@ -993,18 +1011,8 @@ def gui_set_font(Font_0: Font,) -> None:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def gui_set_icon_data(int_0: int,unsignedint_pointer_1: Any,) -> None:
|
||||
"""void GuiSetIconData(int, unsigned int *);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def gui_set_icon_pixel(int_0: int,int_1: int,int_2: int,) -> None:
|
||||
"""void GuiSetIconPixel(int, int, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def gui_set_icon_scale(unsignedint_0: int,) -> None:
|
||||
"""void GuiSetIconScale(unsigned int);
|
||||
def gui_set_icon_scale(int_0: int,) -> None:
|
||||
"""void GuiSetIconScale(int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
|
@ -1016,6 +1024,11 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def gui_set_style(int_0: int,int_1: int,int_2: int,) -> None:
|
||||
"""void GuiSetStyle(int, int, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def gui_set_tooltip(str_0: str,) -> None:
|
||||
"""void GuiSetTooltip(char *);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def gui_slider(Rectangle_0: Rectangle,str_1: str,str_2: str,float_3: float,float_4: float,float_5: float,) -> float:
|
||||
|
@ -1038,13 +1051,13 @@ def gui_status_bar(Rectangle_0: Rectangle,str_1: str,) -> None:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def gui_text_box(Rectangle_0: Rectangle,str_1: str,int_2: int,_Bool_3: bool,) -> bool:
|
||||
"""_Bool GuiTextBox(struct Rectangle, char *, int, _Bool);
|
||||
def gui_tab_bar(Rectangle_0: Rectangle,str_pointer_1: str,int_2: int,int_pointer_3: Any,) -> int:
|
||||
"""int GuiTabBar(struct Rectangle, char * *, int, int *);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def gui_text_box_multi(Rectangle_0: Rectangle,str_1: str,int_2: int,_Bool_3: bool,) -> bool:
|
||||
"""_Bool GuiTextBoxMulti(struct Rectangle, char *, int, _Bool);
|
||||
def gui_text_box(Rectangle_0: Rectangle,str_1: str,int_2: int,_Bool_3: bool,) -> bool:
|
||||
"""_Bool GuiTextBox(struct Rectangle, char *, int, _Bool);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
|
@ -1093,6 +1106,9 @@ def image_alpha_mask(image: Any,alphaMask: Image,) -> None:
|
|||
def image_alpha_premultiply(image: Any,) -> None:
|
||||
"""Premultiply alpha channel"""
|
||||
...
|
||||
def image_blur_gaussian(image: Any,blurSize: int,) -> None:
|
||||
"""Apply Gaussian blur using a box blur approximation"""
|
||||
...
|
||||
def image_clear_background(dst: Any,color: Color,) -> None:
|
||||
"""Clear image background with given color"""
|
||||
...
|
||||
|
@ -1127,10 +1143,16 @@ def image_draw(dst: Any,src: Image,srcRec: Rectangle,dstRec: Rectangle,tint: Col
|
|||
"""Draw a source image within a destination image (tint applied to source)"""
|
||||
...
|
||||
def image_draw_circle(dst: Any,centerX: int,centerY: int,radius: int,color: Color,) -> None:
|
||||
"""Draw circle within an image"""
|
||||
"""Draw a filled circle within an image"""
|
||||
...
|
||||
def image_draw_circle_lines(dst: Any,centerX: int,centerY: int,radius: int,color: Color,) -> None:
|
||||
"""Draw circle outline within an image"""
|
||||
...
|
||||
def image_draw_circle_lines_v(dst: Any,center: Vector2,radius: int,color: Color,) -> None:
|
||||
"""Draw circle outline within an image (Vector version)"""
|
||||
...
|
||||
def image_draw_circle_v(dst: Any,center: Vector2,radius: int,color: Color,) -> None:
|
||||
"""Draw circle within an image (Vector version)"""
|
||||
"""Draw a filled circle within an image (Vector version)"""
|
||||
...
|
||||
def image_draw_line(dst: Any,startPosX: int,startPosY: int,endPosX: int,endPosY: int,color: Color,) -> None:
|
||||
"""Draw line within an image"""
|
||||
|
@ -1221,6 +1243,9 @@ def is_audio_stream_playing(stream: AudioStream,) -> bool:
|
|||
def is_audio_stream_processed(stream: AudioStream,) -> bool:
|
||||
"""Check if any audio stream buffers requires refill"""
|
||||
...
|
||||
def is_audio_stream_ready(stream: AudioStream,) -> bool:
|
||||
"""Checks if an audio stream is ready"""
|
||||
...
|
||||
def is_cursor_hidden() -> bool:
|
||||
"""Check if cursor is not visible"""
|
||||
...
|
||||
|
@ -1233,6 +1258,9 @@ def is_file_dropped() -> bool:
|
|||
def is_file_extension(fileName: str,ext: str,) -> bool:
|
||||
"""Check file extension (including point: .png, .wav)"""
|
||||
...
|
||||
def is_font_ready(font: Font,) -> bool:
|
||||
"""Check if a font is ready"""
|
||||
...
|
||||
def is_gamepad_available(gamepad: int,) -> bool:
|
||||
"""Check if a gamepad is available"""
|
||||
...
|
||||
|
@ -1251,6 +1279,9 @@ def is_gamepad_button_up(gamepad: int,button: int,) -> bool:
|
|||
def is_gesture_detected(gesture: int,) -> bool:
|
||||
"""Check if a gesture have been detected"""
|
||||
...
|
||||
def is_image_ready(image: Image,) -> bool:
|
||||
"""Check if an image is ready"""
|
||||
...
|
||||
def is_key_down(key: int,) -> bool:
|
||||
"""Check if a key is being pressed"""
|
||||
...
|
||||
|
@ -1263,9 +1294,15 @@ def is_key_released(key: int,) -> bool:
|
|||
def is_key_up(key: int,) -> bool:
|
||||
"""Check if a key is NOT being pressed"""
|
||||
...
|
||||
def is_material_ready(material: Material,) -> bool:
|
||||
"""Check if a material is ready"""
|
||||
...
|
||||
def is_model_animation_valid(model: Model,anim: ModelAnimation,) -> bool:
|
||||
"""Check model animation skeleton match"""
|
||||
...
|
||||
def is_model_ready(model: Model,) -> bool:
|
||||
"""Check if a model is ready"""
|
||||
...
|
||||
def is_mouse_button_down(button: int,) -> bool:
|
||||
"""Check if a mouse button is being pressed"""
|
||||
...
|
||||
|
@ -1278,15 +1315,33 @@ def is_mouse_button_released(button: int,) -> bool:
|
|||
def is_mouse_button_up(button: int,) -> bool:
|
||||
"""Check if a mouse button is NOT being pressed"""
|
||||
...
|
||||
def is_music_ready(music: Music,) -> bool:
|
||||
"""Checks if a music stream is ready"""
|
||||
...
|
||||
def is_music_stream_playing(music: Music,) -> bool:
|
||||
"""Check if music is playing"""
|
||||
...
|
||||
def is_path_file(path: str,) -> bool:
|
||||
"""Check if a given path is a file or a directory"""
|
||||
...
|
||||
def is_render_texture_ready(target: RenderTexture,) -> bool:
|
||||
"""Check if a render texture is ready"""
|
||||
...
|
||||
def is_shader_ready(shader: Shader,) -> bool:
|
||||
"""Check if a shader is ready"""
|
||||
...
|
||||
def is_sound_playing(sound: Sound,) -> bool:
|
||||
"""Check if a sound is currently playing"""
|
||||
...
|
||||
def is_sound_ready(sound: Sound,) -> bool:
|
||||
"""Checks if a sound is ready"""
|
||||
...
|
||||
def is_texture_ready(texture: Texture,) -> bool:
|
||||
"""Check if a texture is ready"""
|
||||
...
|
||||
def is_wave_ready(wave: Wave,) -> bool:
|
||||
"""Checks if wave data is ready"""
|
||||
...
|
||||
def is_window_focused() -> bool:
|
||||
"""Check if window is currently focused (only PLATFORM_DESKTOP)"""
|
||||
...
|
||||
|
@ -1421,6 +1476,9 @@ def load_texture_cubemap(image: Image,layout: int,) -> Texture:
|
|||
def load_texture_from_image(image: Image,) -> Texture:
|
||||
"""Load texture from image data"""
|
||||
...
|
||||
def load_utf8(codepoints: Any,length: int,) -> str:
|
||||
"""Load UTF-8 text encoded from codepoints array"""
|
||||
...
|
||||
def load_vr_stereo_config(device: VrDeviceInfo,) -> VrStereoConfig:
|
||||
"""Load VR stereo config for VR simulator device parameters"""
|
||||
...
|
||||
|
@ -1600,9 +1658,6 @@ def play_music_stream(music: Music,) -> None:
|
|||
def play_sound(sound: Sound,) -> None:
|
||||
"""Play a sound"""
|
||||
...
|
||||
def play_sound_multi(sound: Sound,) -> None:
|
||||
"""Play a sound (using multichannel buffer pool)"""
|
||||
...
|
||||
def poll_input_events() -> None:
|
||||
"""Register all input events"""
|
||||
...
|
||||
|
@ -1767,21 +1822,6 @@ def set_audio_stream_pitch(stream: AudioStream,pitch: float,) -> None:
|
|||
def set_audio_stream_volume(stream: AudioStream,volume: float,) -> None:
|
||||
"""Set volume for audio stream (1.0 is max level)"""
|
||||
...
|
||||
def set_camera_alt_control(keyAlt: int,) -> None:
|
||||
"""Set camera alt key to combine with mouse movement (free camera)"""
|
||||
...
|
||||
def set_camera_mode(camera: Camera3D,mode: int,) -> None:
|
||||
"""Set camera mode (multiple camera modes available)"""
|
||||
...
|
||||
def set_camera_move_controls(keyFront: int,keyBack: int,keyRight: int,keyLeft: int,keyUp: int,keyDown: int,) -> None:
|
||||
"""Set camera move controls (1st person and 3rd person cameras)"""
|
||||
...
|
||||
def set_camera_pan_control(keyPan: int,) -> None:
|
||||
"""Set camera pan key to combine with mouse movement (free camera)"""
|
||||
...
|
||||
def set_camera_smooth_zoom_control(keySmoothZoom: int,) -> None:
|
||||
"""Set camera smooth zoom key to combine with mouse (free camera)"""
|
||||
...
|
||||
def set_clipboard_text(text: str,) -> None:
|
||||
"""Set clipboard text content"""
|
||||
...
|
||||
|
@ -1900,7 +1940,10 @@ def set_trace_log_level(logLevel: int,) -> None:
|
|||
"""Set the current threshold (minimum) log level"""
|
||||
...
|
||||
def set_window_icon(image: Image,) -> None:
|
||||
"""Set icon for window (only PLATFORM_DESKTOP)"""
|
||||
"""Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)"""
|
||||
...
|
||||
def set_window_icons(images: Any,count: int,) -> None:
|
||||
"""Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)"""
|
||||
...
|
||||
def set_window_min_size(width: int,height: int,) -> None:
|
||||
"""Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)"""
|
||||
|
@ -1935,9 +1978,6 @@ def stop_music_stream(music: Music,) -> None:
|
|||
def stop_sound(sound: Sound,) -> None:
|
||||
"""Stop playing a sound"""
|
||||
...
|
||||
def stop_sound_multi() -> None:
|
||||
"""Stop any sound playing (using multichannel buffer pool)"""
|
||||
...
|
||||
def swap_screen_buffer() -> None:
|
||||
"""Swap back buffer with front buffer (screen drawing)"""
|
||||
...
|
||||
|
@ -1947,9 +1987,6 @@ def take_screenshot(fileName: str,) -> None:
|
|||
def text_append(text: str,append: str,position: Any,) -> None:
|
||||
"""Append text at specific position and move cursor!"""
|
||||
...
|
||||
def text_codepoints_to_utf8(codepoints: Any,length: int,) -> str:
|
||||
"""Encode text as codepoints array into UTF-8 text string (WARNING: memory must be freed!)"""
|
||||
...
|
||||
def text_copy(dst: str,src: str,) -> int:
|
||||
"""Copy one string to another, returns bytes copied"""
|
||||
...
|
||||
|
@ -2046,9 +2083,6 @@ def unload_model_animation(anim: ModelAnimation,) -> None:
|
|||
def unload_model_animations(animations: Any,count: int,) -> None:
|
||||
"""Unload animation array data"""
|
||||
...
|
||||
def unload_model_keep_meshes(model: Model,) -> None:
|
||||
"""Unload model (but not meshes) from memory (RAM and/or VRAM)"""
|
||||
...
|
||||
def unload_music_stream(music: Music,) -> None:
|
||||
"""Unload music stream"""
|
||||
...
|
||||
|
@ -2064,6 +2098,9 @@ def unload_sound(sound: Sound,) -> None:
|
|||
def unload_texture(texture: Texture,) -> None:
|
||||
"""Unload texture from GPU memory (VRAM)"""
|
||||
...
|
||||
def unload_utf8(text: str,) -> None:
|
||||
"""Unload UTF-8 text encoded from codepoints array"""
|
||||
...
|
||||
def unload_vr_stereo_config(config: VrStereoConfig,) -> None:
|
||||
"""Unload VR stereo config"""
|
||||
...
|
||||
|
@ -2076,9 +2113,12 @@ def unload_wave_samples(samples: Any,) -> None:
|
|||
def update_audio_stream(stream: AudioStream,data: Any,frameCount: int,) -> None:
|
||||
"""Update audio stream buffers with data"""
|
||||
...
|
||||
def update_camera(camera: Any,) -> None:
|
||||
def update_camera(camera: Any,mode: int,) -> None:
|
||||
"""Update camera position for selected mode"""
|
||||
...
|
||||
def update_camera_pro(camera: Any,movement: Vector3,rotation: Vector3,zoom: float,) -> None:
|
||||
"""Update camera movement/rotation"""
|
||||
...
|
||||
def update_mesh_buffer(mesh: Mesh,index: int,data: Any,dataSize: int,offset: int,) -> None:
|
||||
"""Update mesh vertex data in GPU for a specific buffer index"""
|
||||
...
|
||||
|
@ -2173,6 +2213,11 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def vector2_lerp(Vector2_0: Vector2,Vector2_1: Vector2,float_2: float,) -> Vector2:
|
||||
"""struct Vector2 Vector2Lerp(struct Vector2, struct Vector2, float);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def vector2_line_angle(Vector2_0: Vector2,Vector2_1: Vector2,) -> float:
|
||||
"""float Vector2LineAngle(struct Vector2, struct Vector2);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def vector2_move_towards(Vector2_0: Vector2,Vector2_1: Vector2,float_2: float,) -> Vector2:
|
||||
|
@ -2445,8 +2490,8 @@ def rl_begin(int_0: int,) -> None:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rl_bind_image_texture(unsignedint_0: int,unsignedint_1: int,unsignedint_2: int,int_3: int,) -> None:
|
||||
"""void rlBindImageTexture(unsigned int, unsigned int, unsigned int, int);
|
||||
def rl_bind_image_texture(unsignedint_0: int,unsignedint_1: int,int_2: int,_Bool_3: bool,) -> None:
|
||||
"""void rlBindImageTexture(unsigned int, unsigned int, int, _Bool);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
|
@ -2500,8 +2545,13 @@ def rl_compute_shader_dispatch(unsignedint_0: int,unsignedint_1: int,unsignedint
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rl_copy_buffers_elements(unsignedint_0: int,unsignedint_1: int,unsignedlonglong_2: int,unsignedlonglong_3: int,unsignedlonglong_4: int,) -> None:
|
||||
"""void rlCopyBuffersElements(unsigned int, unsigned int, unsigned long long, unsigned long long, unsigned long long);
|
||||
def rl_copy_shader_buffer(unsignedint_0: int,unsignedint_1: int,unsignedint_2: int,unsignedint_3: int,unsignedint_4: int,) -> None:
|
||||
"""void rlCopyShaderBuffer(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rl_cubemap_parameters(unsignedint_0: int,int_1: int,int_2: int,) -> None:
|
||||
"""void rlCubemapParameters(unsigned int, int, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
|
@ -2781,7 +2831,7 @@ def rl_get_pixel_format_name(unsignedint_0: int,) -> str:
|
|||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rl_get_shader_buffer_size(unsignedint_0: int,) -> int:
|
||||
"""unsigned long long rlGetShaderBufferSize(unsigned int);
|
||||
"""unsigned int rlGetShaderBufferSize(unsigned int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
|
@ -2845,8 +2895,8 @@ def rl_load_render_batch(int_0: int,int_1: int,) -> rlRenderBatch:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rl_load_shader_buffer(unsignedlonglong_0: int,void_pointer_1: Any,int_2: int,) -> int:
|
||||
"""unsigned int rlLoadShaderBuffer(unsigned long long, void *, int);
|
||||
def rl_load_shader_buffer(unsignedint_0: int,void_pointer_1: Any,int_2: int,) -> int:
|
||||
"""unsigned int rlLoadShaderBuffer(unsigned int, void *, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
|
@ -2925,8 +2975,8 @@ def rl_read_screen_pixels(int_0: int,int_1: int,) -> str:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rl_read_shader_buffer_elements(unsignedint_0: int,void_pointer_1: Any,unsignedlonglong_2: int,unsignedlonglong_3: int,) -> None:
|
||||
"""void rlReadShaderBufferElements(unsigned int, void *, unsigned long long, unsigned long long);
|
||||
def rl_read_shader_buffer(unsignedint_0: int,void_pointer_1: Any,unsignedint_2: int,unsignedint_3: int,) -> None:
|
||||
"""void rlReadShaderBuffer(unsigned int, void *, unsigned int, unsigned int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
|
@ -2953,11 +3003,21 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def rl_set_blend_factors(int_0: int,int_1: int,int_2: int,) -> None:
|
||||
"""void rlSetBlendFactors(int, int, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rl_set_blend_factors_separate(int_0: int,int_1: int,int_2: int,int_3: int,int_4: int,int_5: int,) -> None:
|
||||
"""void rlSetBlendFactorsSeparate(int, int, int, int, int, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rl_set_blend_mode(int_0: int,) -> None:
|
||||
"""void rlSetBlendMode(int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rl_set_cull_face(int_0: int,) -> None:
|
||||
"""void rlSetCullFace(int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rl_set_framebuffer_height(int_0: int,) -> None:
|
||||
|
@ -3090,8 +3150,8 @@ def rl_unload_vertex_buffer(unsignedint_0: int,) -> None:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rl_update_shader_buffer_elements(unsignedint_0: int,void_pointer_1: Any,unsignedlonglong_2: int,unsignedlonglong_3: int,) -> None:
|
||||
"""void rlUpdateShaderBufferElements(unsigned int, void *, unsigned long long, unsigned long long);
|
||||
def rl_update_shader_buffer(unsignedint_0: int,void_pointer_1: Any,unsignedint_2: int,unsignedint_3: int,) -> None:
|
||||
"""void rlUpdateShaderBuffer(unsigned int, void *, unsigned int, unsigned int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
|
@ -3835,6 +3895,7 @@ class BlendMode(IntEnum):
|
|||
BLEND_SUBTRACT_COLORS = 4
|
||||
BLEND_ALPHA_PREMULTIPLY = 5
|
||||
BLEND_CUSTOM = 6
|
||||
BLEND_CUSTOM_SEPARATE = 7
|
||||
|
||||
class Gesture(IntEnum):
|
||||
GESTURE_NONE = 0
|
||||
|
@ -3950,6 +4011,9 @@ class GuiDropdownBoxProperty(IntEnum):
|
|||
class GuiTextBoxProperty(IntEnum):
|
||||
TEXT_INNER_PADDING = 16
|
||||
TEXT_LINES_SPACING = 17
|
||||
TEXT_ALIGNMENT_VERTICAL = 18
|
||||
TEXT_MULTILINE = 19
|
||||
TEXT_WRAP_MODE = 20
|
||||
|
||||
class GuiSpinnerProperty(IntEnum):
|
||||
SPIN_BUTTON_WIDTH = 16
|
||||
|
@ -4175,19 +4239,19 @@ class GuiIconName(IntEnum):
|
|||
ICON_FILE_NEW = 203
|
||||
ICON_FOLDER_ADD = 204
|
||||
ICON_ALARM = 205
|
||||
ICON_206 = 206
|
||||
ICON_207 = 207
|
||||
ICON_208 = 208
|
||||
ICON_209 = 209
|
||||
ICON_210 = 210
|
||||
ICON_211 = 211
|
||||
ICON_212 = 212
|
||||
ICON_213 = 213
|
||||
ICON_214 = 214
|
||||
ICON_215 = 215
|
||||
ICON_216 = 216
|
||||
ICON_217 = 217
|
||||
ICON_218 = 218
|
||||
ICON_CPU = 206
|
||||
ICON_ROM = 207
|
||||
ICON_STEP_OVER = 208
|
||||
ICON_STEP_INTO = 209
|
||||
ICON_STEP_OUT = 210
|
||||
ICON_RESTART = 211
|
||||
ICON_BREAKPOINT_ON = 212
|
||||
ICON_BREAKPOINT_OFF = 213
|
||||
ICON_BURGER_MENU = 214
|
||||
ICON_CASE_SENSITIVE = 215
|
||||
ICON_REG_EXP = 216
|
||||
ICON_FOLDER = 217
|
||||
ICON_FILE = 218
|
||||
ICON_219 = 219
|
||||
ICON_220 = 220
|
||||
ICON_221 = 221
|
||||
|
|
2
raygui
2
raygui
|
@ -1 +1 @@
|
|||
Subproject commit 4e2a878e715c4aafa6ad7bd58d851221503c6e60
|
||||
Subproject commit 2b45fea4295cd6ff4b425e21706b9c950245b805
|
2
raylib-c
2
raylib-c
|
@ -1 +1 @@
|
|||
Subproject commit 904c5051251ff348234de20ea2336bb17ae5f3e8
|
||||
Subproject commit fec96137e8d10ee6c88914fbe5e5429c13ee1dac
|
|
@ -6,6 +6,9 @@ class struct: ...
|
|||
ARROWS_SIZE: int
|
||||
ARROWS_VISIBLE: int
|
||||
ARROW_PADDING: int
|
||||
def AttachAudioMixedProcessor(processor: Any,) -> None:
|
||||
"""Attach audio stream processor to the entire audio pipeline"""
|
||||
...
|
||||
def AttachAudioStreamProcessor(stream: AudioStream,processor: Any,) -> None:
|
||||
"""Attach audio stream processor to stream"""
|
||||
...
|
||||
|
@ -19,6 +22,7 @@ BLEND_ADD_COLORS: int
|
|||
BLEND_ALPHA: int
|
||||
BLEND_ALPHA_PREMULTIPLY: int
|
||||
BLEND_CUSTOM: int
|
||||
BLEND_CUSTOM_SEPARATE: int
|
||||
BLEND_MULTIPLIED: int
|
||||
BLEND_SUBTRACT_COLORS: int
|
||||
BORDER_COLOR_DISABLED: int
|
||||
|
@ -95,6 +99,9 @@ def CheckCollisionPointCircle(point: Vector2,center: Vector2,radius: float,) ->
|
|||
def CheckCollisionPointLine(point: Vector2,p1: Vector2,p2: Vector2,threshold: int,) -> bool:
|
||||
"""Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]"""
|
||||
...
|
||||
def CheckCollisionPointPoly(point: Vector2,points: Any,pointCount: int,) -> bool:
|
||||
"""Check if point is within a polygon described by array of vertices"""
|
||||
...
|
||||
def CheckCollisionPointRec(point: Vector2,rec: Rectangle,) -> bool:
|
||||
"""Check if point is inside rectangle"""
|
||||
...
|
||||
|
@ -129,7 +136,7 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def CloseWindow() -> None:
|
||||
"""Close window and unload OpenGL context"""
|
||||
...
|
||||
def CodepointToUTF8(codepoint: int,byteSize: Any,) -> str:
|
||||
def CodepointToUTF8(codepoint: int,utf8Size: Any,) -> str:
|
||||
"""Encode one codepoint into UTF-8 byte array (array length returned as parameter)"""
|
||||
...
|
||||
def ColorAlpha(color: Color,alpha: float,) -> Color:
|
||||
|
@ -138,6 +145,12 @@ def ColorAlpha(color: Color,alpha: float,) -> Color:
|
|||
def ColorAlphaBlend(dst: Color,src: Color,tint: Color,) -> Color:
|
||||
"""Get src alpha-blended into dst color with tint"""
|
||||
...
|
||||
def ColorBrightness(color: Color,factor: float,) -> Color:
|
||||
"""Get color with brightness correction, brightness factor goes from -1.0f to 1.0f"""
|
||||
...
|
||||
def ColorContrast(color: Color,contrast: float,) -> Color:
|
||||
"""Get color with contrast correction, contrast values between -1.0f and 1.0f"""
|
||||
...
|
||||
def ColorFromHSV(hue: float,saturation: float,value: float,) -> Color:
|
||||
"""Get a Color from HSV values, hue [0..360], saturation/value [0..1]"""
|
||||
...
|
||||
|
@ -147,6 +160,9 @@ def ColorFromNormalized(normalized: Vector4,) -> Color:
|
|||
def ColorNormalize(color: Color,) -> Vector4:
|
||||
"""Get Color normalized as float [0..1]"""
|
||||
...
|
||||
def ColorTint(color: Color,tint: Color,) -> Color:
|
||||
"""Get color multiplied with another color"""
|
||||
...
|
||||
def ColorToHSV(color: Color,) -> Vector3:
|
||||
"""Get HSV values for a Color, hue [0..360], saturation/value [0..1]"""
|
||||
...
|
||||
|
@ -185,6 +201,9 @@ def DestroyPhysicsBody(PhysicsBodyData_pointer_0: Any,) -> None:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def DetachAudioMixedProcessor(processor: Any,) -> None:
|
||||
"""Detach audio stream processor from the entire audio pipeline"""
|
||||
...
|
||||
def DetachAudioStreamProcessor(stream: AudioStream,processor: Any,) -> None:
|
||||
"""Detach audio stream processor from stream"""
|
||||
...
|
||||
|
@ -209,6 +228,12 @@ def DrawBillboardRec(camera: Camera3D,texture: Texture,source: Rectangle,positio
|
|||
def DrawBoundingBox(box: BoundingBox,color: Color,) -> None:
|
||||
"""Draw bounding box (wires)"""
|
||||
...
|
||||
def DrawCapsule(startPos: Vector3,endPos: Vector3,radius: float,slices: int,rings: int,color: Color,) -> None:
|
||||
"""Draw a capsule with the center of its sphere caps at startPos and endPos"""
|
||||
...
|
||||
def DrawCapsuleWires(startPos: Vector3,endPos: Vector3,radius: float,slices: int,rings: int,color: Color,) -> None:
|
||||
"""Draw capsule wireframe with the center of its sphere caps at startPos and endPos"""
|
||||
...
|
||||
def DrawCircle(centerX: int,centerY: int,radius: float,color: Color,) -> None:
|
||||
"""Draw a color-filled circle"""
|
||||
...
|
||||
|
@ -233,12 +258,6 @@ def DrawCircleV(center: Vector2,radius: float,color: Color,) -> None:
|
|||
def DrawCube(position: Vector3,width: float,height: float,length: float,color: Color,) -> None:
|
||||
"""Draw cube"""
|
||||
...
|
||||
def DrawCubeTexture(texture: Texture,position: Vector3,width: float,height: float,length: float,color: Color,) -> None:
|
||||
"""Draw cube textured"""
|
||||
...
|
||||
def DrawCubeTextureRec(texture: Texture,source: Rectangle,position: Vector3,width: float,height: float,length: float,color: Color,) -> None:
|
||||
"""Draw cube with a region of a texture"""
|
||||
...
|
||||
def DrawCubeV(position: Vector3,size: Vector3,color: Color,) -> None:
|
||||
"""Draw cube (Vector version)"""
|
||||
...
|
||||
|
@ -410,21 +429,12 @@ def DrawTextureEx(texture: Texture,position: Vector2,rotation: float,scale: floa
|
|||
def DrawTextureNPatch(texture: Texture,nPatchInfo: NPatchInfo,dest: Rectangle,origin: Vector2,rotation: float,tint: Color,) -> None:
|
||||
"""Draws a texture (or part of it) that stretches or shrinks nicely"""
|
||||
...
|
||||
def DrawTexturePoly(texture: Texture,center: Vector2,points: Any,texcoords: Any,pointCount: int,tint: Color,) -> None:
|
||||
"""Draw a textured polygon"""
|
||||
...
|
||||
def DrawTexturePro(texture: Texture,source: Rectangle,dest: Rectangle,origin: Vector2,rotation: float,tint: Color,) -> None:
|
||||
"""Draw a part of a texture defined by a rectangle with 'pro' parameters"""
|
||||
...
|
||||
def DrawTextureQuad(texture: Texture,tiling: Vector2,offset: Vector2,quad: Rectangle,tint: Color,) -> None:
|
||||
"""Draw texture quad with tiling and offset parameters"""
|
||||
...
|
||||
def DrawTextureRec(texture: Texture,source: Rectangle,position: Vector2,tint: Color,) -> None:
|
||||
"""Draw a part of a texture defined by a rectangle"""
|
||||
...
|
||||
def DrawTextureTiled(texture: Texture,source: Rectangle,dest: Rectangle,origin: Vector2,rotation: float,scale: float,tint: Color,) -> None:
|
||||
"""Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest."""
|
||||
...
|
||||
def DrawTextureV(texture: Texture,position: Vector2,tint: Color,) -> None:
|
||||
"""Draw a Texture2D with position defined as Vector2"""
|
||||
...
|
||||
|
@ -586,6 +596,12 @@ def GenImageGradientRadial(width: int,height: int,density: float,inner: Color,ou
|
|||
def GenImageGradientV(width: int,height: int,top: Color,bottom: Color,) -> Image:
|
||||
"""Generate image: vertical gradient"""
|
||||
...
|
||||
def GenImagePerlinNoise(width: int,height: int,offsetX: int,offsetY: int,scale: float,) -> Image:
|
||||
"""Generate image: perlin noise"""
|
||||
...
|
||||
def GenImageText(width: int,height: int,text: str,) -> Image:
|
||||
"""Generate image: grayscale image from text data"""
|
||||
...
|
||||
def GenImageWhiteNoise(width: int,height: int,factor: float,) -> Image:
|
||||
"""Generate image: white noise"""
|
||||
...
|
||||
|
@ -643,12 +659,18 @@ def GetCharPressed() -> int:
|
|||
def GetClipboardText() -> str:
|
||||
"""Get clipboard text content"""
|
||||
...
|
||||
def GetCodepoint(text: str,bytesProcessed: Any,) -> int:
|
||||
def GetCodepoint(text: str,codepointSize: Any,) -> int:
|
||||
"""Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure"""
|
||||
...
|
||||
def GetCodepointCount(text: str,) -> int:
|
||||
"""Get total number of codepoints in a UTF-8 encoded string"""
|
||||
...
|
||||
def GetCodepointNext(text: str,codepointSize: Any,) -> int:
|
||||
"""Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure"""
|
||||
...
|
||||
def GetCodepointPrevious(text: str,codepointSize: Any,) -> int:
|
||||
"""Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure"""
|
||||
...
|
||||
def GetCollisionRec(rec1: Rectangle,rec2: Rectangle,) -> Rectangle:
|
||||
"""Get collision rectangle for two rectangles collision"""
|
||||
...
|
||||
|
@ -863,9 +885,6 @@ def GetShaderLocation(shader: Shader,uniformName: str,) -> int:
|
|||
def GetShaderLocationAttrib(shader: Shader,attribName: str,) -> int:
|
||||
"""Get shader attribute location"""
|
||||
...
|
||||
def GetSoundsPlaying() -> int:
|
||||
"""Get number of sounds playing in the multichannel"""
|
||||
...
|
||||
def GetTime() -> float:
|
||||
"""Get elapsed time in seconds since InitWindow()"""
|
||||
...
|
||||
|
@ -913,16 +932,6 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def GuiCheckBox(Rectangle_0: Rectangle,str_1: str,_Bool_2: bool,) -> bool:
|
||||
"""_Bool GuiCheckBox(struct Rectangle, char *, _Bool);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiCheckIconPixel(int_0: int,int_1: int,int_2: int,) -> bool:
|
||||
"""_Bool GuiCheckIconPixel(int, int, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiClearIconPixel(int_0: int,int_1: int,int_2: int,) -> None:
|
||||
"""void GuiClearIconPixel(int, int, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiColorBarAlpha(Rectangle_0: Rectangle,str_1: str,float_2: float,) -> float:
|
||||
|
@ -953,6 +962,11 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def GuiDisable() -> None:
|
||||
"""void GuiDisable();
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiDisableTooltip() -> None:
|
||||
"""void GuiDisableTooltip();
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiDrawIcon(int_0: int,int_1: int,int_2: int,int_3: int,Color_4: Color,) -> None:
|
||||
|
@ -973,6 +987,11 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def GuiEnable() -> None:
|
||||
"""void GuiEnable();
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiEnableTooltip() -> None:
|
||||
"""void GuiEnableTooltip();
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiFade(float_0: float,) -> None:
|
||||
|
@ -983,11 +1002,6 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def GuiGetFont() -> Font:
|
||||
"""struct Font GuiGetFont();
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiGetIconData(int_0: int,) -> Any:
|
||||
"""unsigned int *GuiGetIconData(int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiGetIcons() -> Any:
|
||||
|
@ -1048,6 +1062,11 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def GuiListViewEx(Rectangle_0: Rectangle,str_pointer_1: str,int_2: int,int_pointer_3: Any,int_pointer_4: Any,int_5: int,) -> int:
|
||||
"""int GuiListViewEx(struct Rectangle, char * *, int, int *, int *, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiLoadIcons(str_0: str,_Bool_1: bool,) -> str:
|
||||
"""char * *GuiLoadIcons(char *, _Bool);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiLoadStyle(str_0: str,) -> None:
|
||||
|
@ -1090,18 +1109,8 @@ def GuiSetFont(Font_0: Font,) -> None:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiSetIconData(int_0: int,unsignedint_pointer_1: Any,) -> None:
|
||||
"""void GuiSetIconData(int, unsigned int *);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiSetIconPixel(int_0: int,int_1: int,int_2: int,) -> None:
|
||||
"""void GuiSetIconPixel(int, int, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiSetIconScale(unsignedint_0: int,) -> None:
|
||||
"""void GuiSetIconScale(unsigned int);
|
||||
def GuiSetIconScale(int_0: int,) -> None:
|
||||
"""void GuiSetIconScale(int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
|
@ -1113,6 +1122,11 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def GuiSetStyle(int_0: int,int_1: int,int_2: int,) -> None:
|
||||
"""void GuiSetStyle(int, int, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiSetTooltip(str_0: str,) -> None:
|
||||
"""void GuiSetTooltip(char *);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiSlider(Rectangle_0: Rectangle,str_1: str,str_2: str,float_3: float,float_4: float,float_5: float,) -> float:
|
||||
|
@ -1135,13 +1149,13 @@ def GuiStatusBar(Rectangle_0: Rectangle,str_1: str,) -> None:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiTextBox(Rectangle_0: Rectangle,str_1: str,int_2: int,_Bool_3: bool,) -> bool:
|
||||
"""_Bool GuiTextBox(struct Rectangle, char *, int, _Bool);
|
||||
def GuiTabBar(Rectangle_0: Rectangle,str_pointer_1: str,int_2: int,int_pointer_3: Any,) -> int:
|
||||
"""int GuiTabBar(struct Rectangle, char * *, int, int *);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiTextBoxMulti(Rectangle_0: Rectangle,str_1: str,int_2: int,_Bool_3: bool,) -> bool:
|
||||
"""_Bool GuiTextBoxMulti(struct Rectangle, char *, int, _Bool);
|
||||
def GuiTextBox(Rectangle_0: Rectangle,str_1: str,int_2: int,_Bool_3: bool,) -> bool:
|
||||
"""_Bool GuiTextBox(struct Rectangle, char *, int, _Bool);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
|
@ -1183,19 +1197,6 @@ def HideCursor() -> None:
|
|||
"""Hides cursor"""
|
||||
...
|
||||
ICON_1UP: int
|
||||
ICON_206: int
|
||||
ICON_207: int
|
||||
ICON_208: int
|
||||
ICON_209: int
|
||||
ICON_210: int
|
||||
ICON_211: int
|
||||
ICON_212: int
|
||||
ICON_213: int
|
||||
ICON_214: int
|
||||
ICON_215: int
|
||||
ICON_216: int
|
||||
ICON_217: int
|
||||
ICON_218: int
|
||||
ICON_219: int
|
||||
ICON_220: int
|
||||
ICON_221: int
|
||||
|
@ -1265,14 +1266,19 @@ ICON_BOX_RIGHT: int
|
|||
ICON_BOX_TOP: int
|
||||
ICON_BOX_TOP_LEFT: int
|
||||
ICON_BOX_TOP_RIGHT: int
|
||||
ICON_BREAKPOINT_OFF: int
|
||||
ICON_BREAKPOINT_ON: int
|
||||
ICON_BRUSH_CLASSIC: int
|
||||
ICON_BRUSH_PAINTER: int
|
||||
ICON_BURGER_MENU: int
|
||||
ICON_CAMERA: int
|
||||
ICON_CASE_SENSITIVE: int
|
||||
ICON_CLOCK: int
|
||||
ICON_COIN: int
|
||||
ICON_COLOR_BUCKET: int
|
||||
ICON_COLOR_PICKER: int
|
||||
ICON_CORNER: int
|
||||
ICON_CPU: int
|
||||
ICON_CRACK: int
|
||||
ICON_CRACK_POINTS: int
|
||||
ICON_CROP: int
|
||||
|
@ -1307,6 +1313,7 @@ ICON_EXIT: int
|
|||
ICON_EXPLOSION: int
|
||||
ICON_EYE_OFF: int
|
||||
ICON_EYE_ON: int
|
||||
ICON_FILE: int
|
||||
ICON_FILETYPE_ALPHA: int
|
||||
ICON_FILETYPE_AUDIO: int
|
||||
ICON_FILETYPE_BINARY: int
|
||||
|
@ -1330,6 +1337,7 @@ ICON_FILTER: int
|
|||
ICON_FILTER_BILINEAR: int
|
||||
ICON_FILTER_POINT: int
|
||||
ICON_FILTER_TOP: int
|
||||
ICON_FOLDER: int
|
||||
ICON_FOLDER_ADD: int
|
||||
ICON_FOLDER_FILE_OPEN: int
|
||||
ICON_FOLDER_OPEN: int
|
||||
|
@ -1390,11 +1398,14 @@ ICON_POT: int
|
|||
ICON_PRINTER: int
|
||||
ICON_REDO: int
|
||||
ICON_REDO_FILL: int
|
||||
ICON_REG_EXP: int
|
||||
ICON_REPEAT: int
|
||||
ICON_REPEAT_FILL: int
|
||||
ICON_REREDO: int
|
||||
ICON_REREDO_FILL: int
|
||||
ICON_RESIZE: int
|
||||
ICON_RESTART: int
|
||||
ICON_ROM: int
|
||||
ICON_ROTATE: int
|
||||
ICON_ROTATE_FILL: int
|
||||
ICON_RUBBER: int
|
||||
|
@ -1405,6 +1416,9 @@ ICON_SHUFFLE_FILL: int
|
|||
ICON_SPECIAL: int
|
||||
ICON_SQUARE_TOGGLE: int
|
||||
ICON_STAR: int
|
||||
ICON_STEP_INTO: int
|
||||
ICON_STEP_OUT: int
|
||||
ICON_STEP_OVER: int
|
||||
ICON_SUITCASE: int
|
||||
ICON_SUITCASE_ZIP: int
|
||||
ICON_SYMMETRY: int
|
||||
|
@ -1450,6 +1464,9 @@ def ImageAlphaMask(image: Any,alphaMask: Image,) -> None:
|
|||
def ImageAlphaPremultiply(image: Any,) -> None:
|
||||
"""Premultiply alpha channel"""
|
||||
...
|
||||
def ImageBlurGaussian(image: Any,blurSize: int,) -> None:
|
||||
"""Apply Gaussian blur using a box blur approximation"""
|
||||
...
|
||||
def ImageClearBackground(dst: Any,color: Color,) -> None:
|
||||
"""Clear image background with given color"""
|
||||
...
|
||||
|
@ -1484,10 +1501,16 @@ def ImageDraw(dst: Any,src: Image,srcRec: Rectangle,dstRec: Rectangle,tint: Colo
|
|||
"""Draw a source image within a destination image (tint applied to source)"""
|
||||
...
|
||||
def ImageDrawCircle(dst: Any,centerX: int,centerY: int,radius: int,color: Color,) -> None:
|
||||
"""Draw circle within an image"""
|
||||
"""Draw a filled circle within an image"""
|
||||
...
|
||||
def ImageDrawCircleLines(dst: Any,centerX: int,centerY: int,radius: int,color: Color,) -> None:
|
||||
"""Draw circle outline within an image"""
|
||||
...
|
||||
def ImageDrawCircleLinesV(dst: Any,center: Vector2,radius: int,color: Color,) -> None:
|
||||
"""Draw circle outline within an image (Vector version)"""
|
||||
...
|
||||
def ImageDrawCircleV(dst: Any,center: Vector2,radius: int,color: Color,) -> None:
|
||||
"""Draw circle within an image (Vector version)"""
|
||||
"""Draw a filled circle within an image (Vector version)"""
|
||||
...
|
||||
def ImageDrawLine(dst: Any,startPosX: int,startPosY: int,endPosX: int,endPosY: int,color: Color,) -> None:
|
||||
"""Draw line within an image"""
|
||||
|
@ -1578,6 +1601,9 @@ def IsAudioStreamPlaying(stream: AudioStream,) -> bool:
|
|||
def IsAudioStreamProcessed(stream: AudioStream,) -> bool:
|
||||
"""Check if any audio stream buffers requires refill"""
|
||||
...
|
||||
def IsAudioStreamReady(stream: AudioStream,) -> bool:
|
||||
"""Checks if an audio stream is ready"""
|
||||
...
|
||||
def IsCursorHidden() -> bool:
|
||||
"""Check if cursor is not visible"""
|
||||
...
|
||||
|
@ -1590,6 +1616,9 @@ def IsFileDropped() -> bool:
|
|||
def IsFileExtension(fileName: str,ext: str,) -> bool:
|
||||
"""Check file extension (including point: .png, .wav)"""
|
||||
...
|
||||
def IsFontReady(font: Font,) -> bool:
|
||||
"""Check if a font is ready"""
|
||||
...
|
||||
def IsGamepadAvailable(gamepad: int,) -> bool:
|
||||
"""Check if a gamepad is available"""
|
||||
...
|
||||
|
@ -1608,6 +1637,9 @@ def IsGamepadButtonUp(gamepad: int,button: int,) -> bool:
|
|||
def IsGestureDetected(gesture: int,) -> bool:
|
||||
"""Check if a gesture have been detected"""
|
||||
...
|
||||
def IsImageReady(image: Image,) -> bool:
|
||||
"""Check if an image is ready"""
|
||||
...
|
||||
def IsKeyDown(key: int,) -> bool:
|
||||
"""Check if a key is being pressed"""
|
||||
...
|
||||
|
@ -1620,9 +1652,15 @@ def IsKeyReleased(key: int,) -> bool:
|
|||
def IsKeyUp(key: int,) -> bool:
|
||||
"""Check if a key is NOT being pressed"""
|
||||
...
|
||||
def IsMaterialReady(material: Material,) -> bool:
|
||||
"""Check if a material is ready"""
|
||||
...
|
||||
def IsModelAnimationValid(model: Model,anim: ModelAnimation,) -> bool:
|
||||
"""Check model animation skeleton match"""
|
||||
...
|
||||
def IsModelReady(model: Model,) -> bool:
|
||||
"""Check if a model is ready"""
|
||||
...
|
||||
def IsMouseButtonDown(button: int,) -> bool:
|
||||
"""Check if a mouse button is being pressed"""
|
||||
...
|
||||
|
@ -1635,15 +1673,33 @@ def IsMouseButtonReleased(button: int,) -> bool:
|
|||
def IsMouseButtonUp(button: int,) -> bool:
|
||||
"""Check if a mouse button is NOT being pressed"""
|
||||
...
|
||||
def IsMusicReady(music: Music,) -> bool:
|
||||
"""Checks if a music stream is ready"""
|
||||
...
|
||||
def IsMusicStreamPlaying(music: Music,) -> bool:
|
||||
"""Check if music is playing"""
|
||||
...
|
||||
def IsPathFile(path: str,) -> bool:
|
||||
"""Check if a given path is a file or a directory"""
|
||||
...
|
||||
def IsRenderTextureReady(target: RenderTexture,) -> bool:
|
||||
"""Check if a render texture is ready"""
|
||||
...
|
||||
def IsShaderReady(shader: Shader,) -> bool:
|
||||
"""Check if a shader is ready"""
|
||||
...
|
||||
def IsSoundPlaying(sound: Sound,) -> bool:
|
||||
"""Check if a sound is currently playing"""
|
||||
...
|
||||
def IsSoundReady(sound: Sound,) -> bool:
|
||||
"""Checks if a sound is ready"""
|
||||
...
|
||||
def IsTextureReady(texture: Texture,) -> bool:
|
||||
"""Check if a texture is ready"""
|
||||
...
|
||||
def IsWaveReady(wave: Wave,) -> bool:
|
||||
"""Checks if wave data is ready"""
|
||||
...
|
||||
def IsWindowFocused() -> bool:
|
||||
"""Check if window is currently focused (only PLATFORM_DESKTOP)"""
|
||||
...
|
||||
|
@ -1901,6 +1957,9 @@ def LoadTextureCubemap(image: Image,layout: int,) -> Texture:
|
|||
def LoadTextureFromImage(image: Image,) -> Texture:
|
||||
"""Load texture from image data"""
|
||||
...
|
||||
def LoadUTF8(codepoints: Any,length: int,) -> str:
|
||||
"""Load UTF-8 text encoded from codepoints array"""
|
||||
...
|
||||
def LoadVrStereoConfig(device: VrDeviceInfo,) -> VrStereoConfig:
|
||||
"""Load VR stereo config for VR simulator device parameters"""
|
||||
...
|
||||
|
@ -2076,11 +2135,6 @@ def Normalize(float_0: float,float_1: float,float_2: float,) -> float:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
OPENGL_11: int
|
||||
OPENGL_21: int
|
||||
OPENGL_33: int
|
||||
OPENGL_43: int
|
||||
OPENGL_ES_20: int
|
||||
def OpenURL(url: str,) -> None:
|
||||
"""Open URL with default system browser (if available)"""
|
||||
...
|
||||
|
@ -2142,9 +2196,6 @@ def PlayMusicStream(music: Music,) -> None:
|
|||
def PlaySound(sound: Sound,) -> None:
|
||||
"""Play a sound"""
|
||||
...
|
||||
def PlaySoundMulti(sound: Sound,) -> None:
|
||||
"""Play a sound (using multichannel buffer pool)"""
|
||||
...
|
||||
def PollInputEvents() -> None:
|
||||
"""Register all input events"""
|
||||
...
|
||||
|
@ -2287,8 +2338,11 @@ RL_BLEND_ADD_COLORS: int
|
|||
RL_BLEND_ALPHA: int
|
||||
RL_BLEND_ALPHA_PREMULTIPLY: int
|
||||
RL_BLEND_CUSTOM: int
|
||||
RL_BLEND_CUSTOM_SEPARATE: int
|
||||
RL_BLEND_MULTIPLIED: int
|
||||
RL_BLEND_SUBTRACT_COLORS: int
|
||||
RL_CULL_FACE_BACK: int
|
||||
RL_CULL_FACE_FRONT: int
|
||||
RL_LOG_ALL: int
|
||||
RL_LOG_DEBUG: int
|
||||
RL_LOG_ERROR: int
|
||||
|
@ -2297,6 +2351,11 @@ RL_LOG_INFO: int
|
|||
RL_LOG_NONE: int
|
||||
RL_LOG_TRACE: int
|
||||
RL_LOG_WARNING: int
|
||||
RL_OPENGL_11: int
|
||||
RL_OPENGL_21: int
|
||||
RL_OPENGL_33: int
|
||||
RL_OPENGL_43: int
|
||||
RL_OPENGL_ES_20: int
|
||||
RL_PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA: int
|
||||
RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA: int
|
||||
RL_PIXELFORMAT_COMPRESSED_DXT1_RGB: int
|
||||
|
@ -2466,21 +2525,6 @@ def SetAudioStreamPitch(stream: AudioStream,pitch: float,) -> None:
|
|||
def SetAudioStreamVolume(stream: AudioStream,volume: float,) -> None:
|
||||
"""Set volume for audio stream (1.0 is max level)"""
|
||||
...
|
||||
def SetCameraAltControl(keyAlt: int,) -> None:
|
||||
"""Set camera alt key to combine with mouse movement (free camera)"""
|
||||
...
|
||||
def SetCameraMode(camera: Camera3D,mode: int,) -> None:
|
||||
"""Set camera mode (multiple camera modes available)"""
|
||||
...
|
||||
def SetCameraMoveControls(keyFront: int,keyBack: int,keyRight: int,keyLeft: int,keyUp: int,keyDown: int,) -> None:
|
||||
"""Set camera move controls (1st person and 3rd person cameras)"""
|
||||
...
|
||||
def SetCameraPanControl(keyPan: int,) -> None:
|
||||
"""Set camera pan key to combine with mouse movement (free camera)"""
|
||||
...
|
||||
def SetCameraSmoothZoomControl(keySmoothZoom: int,) -> None:
|
||||
"""Set camera smooth zoom key to combine with mouse (free camera)"""
|
||||
...
|
||||
def SetClipboardText(text: str,) -> None:
|
||||
"""Set clipboard text content"""
|
||||
...
|
||||
|
@ -2599,7 +2643,10 @@ def SetTraceLogLevel(logLevel: int,) -> None:
|
|||
"""Set the current threshold (minimum) log level"""
|
||||
...
|
||||
def SetWindowIcon(image: Image,) -> None:
|
||||
"""Set icon for window (only PLATFORM_DESKTOP)"""
|
||||
"""Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)"""
|
||||
...
|
||||
def SetWindowIcons(images: Any,count: int,) -> None:
|
||||
"""Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)"""
|
||||
...
|
||||
def SetWindowMinSize(width: int,height: int,) -> None:
|
||||
"""Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)"""
|
||||
|
@ -2634,9 +2681,6 @@ def StopMusicStream(music: Music,) -> None:
|
|||
def StopSound(sound: Sound,) -> None:
|
||||
"""Stop playing a sound"""
|
||||
...
|
||||
def StopSoundMulti() -> None:
|
||||
"""Stop any sound playing (using multichannel buffer pool)"""
|
||||
...
|
||||
def SwapScreenBuffer() -> None:
|
||||
"""Swap back buffer with front buffer (screen drawing)"""
|
||||
...
|
||||
|
@ -2652,6 +2696,7 @@ TEXTURE_WRAP_MIRROR_CLAMP: int
|
|||
TEXTURE_WRAP_MIRROR_REPEAT: int
|
||||
TEXTURE_WRAP_REPEAT: int
|
||||
TEXT_ALIGNMENT: int
|
||||
TEXT_ALIGNMENT_VERTICAL: int
|
||||
TEXT_ALIGN_CENTER: int
|
||||
TEXT_ALIGN_LEFT: int
|
||||
TEXT_ALIGN_RIGHT: int
|
||||
|
@ -2661,9 +2706,11 @@ TEXT_COLOR_NORMAL: int
|
|||
TEXT_COLOR_PRESSED: int
|
||||
TEXT_INNER_PADDING: int
|
||||
TEXT_LINES_SPACING: int
|
||||
TEXT_MULTILINE: int
|
||||
TEXT_PADDING: int
|
||||
TEXT_SIZE: int
|
||||
TEXT_SPACING: int
|
||||
TEXT_WRAP_MODE: int
|
||||
TOGGLE: int
|
||||
def TakeScreenshot(fileName: str,) -> None:
|
||||
"""Takes a screenshot of current screen (filename extension defines format)"""
|
||||
|
@ -2671,9 +2718,6 @@ def TakeScreenshot(fileName: str,) -> None:
|
|||
def TextAppend(text: str,append: str,position: Any,) -> None:
|
||||
"""Append text at specific position and move cursor!"""
|
||||
...
|
||||
def TextCodepointsToUTF8(codepoints: Any,length: int,) -> str:
|
||||
"""Encode text as codepoints array into UTF-8 text string (WARNING: memory must be freed!)"""
|
||||
...
|
||||
def TextCopy(dst: str,src: str,) -> int:
|
||||
"""Copy one string to another, returns bytes copied"""
|
||||
...
|
||||
|
@ -2770,9 +2814,6 @@ def UnloadModelAnimation(anim: ModelAnimation,) -> None:
|
|||
def UnloadModelAnimations(animations: Any,count: int,) -> None:
|
||||
"""Unload animation array data"""
|
||||
...
|
||||
def UnloadModelKeepMeshes(model: Model,) -> None:
|
||||
"""Unload model (but not meshes) from memory (RAM and/or VRAM)"""
|
||||
...
|
||||
def UnloadMusicStream(music: Music,) -> None:
|
||||
"""Unload music stream"""
|
||||
...
|
||||
|
@ -2788,6 +2829,9 @@ def UnloadSound(sound: Sound,) -> None:
|
|||
def UnloadTexture(texture: Texture,) -> None:
|
||||
"""Unload texture from GPU memory (VRAM)"""
|
||||
...
|
||||
def UnloadUTF8(text: str,) -> None:
|
||||
"""Unload UTF-8 text encoded from codepoints array"""
|
||||
...
|
||||
def UnloadVrStereoConfig(config: VrStereoConfig,) -> None:
|
||||
"""Unload VR stereo config"""
|
||||
...
|
||||
|
@ -2800,9 +2844,12 @@ def UnloadWaveSamples(samples: Any,) -> None:
|
|||
def UpdateAudioStream(stream: AudioStream,data: Any,frameCount: int,) -> None:
|
||||
"""Update audio stream buffers with data"""
|
||||
...
|
||||
def UpdateCamera(camera: Any,) -> None:
|
||||
def UpdateCamera(camera: Any,mode: int,) -> None:
|
||||
"""Update camera position for selected mode"""
|
||||
...
|
||||
def UpdateCameraPro(camera: Any,movement: Vector3,rotation: Vector3,zoom: float,) -> None:
|
||||
"""Update camera movement/rotation"""
|
||||
...
|
||||
def UpdateMeshBuffer(mesh: Mesh,index: int,data: Any,dataSize: int,offset: int,) -> None:
|
||||
"""Update mesh vertex data in GPU for a specific buffer index"""
|
||||
...
|
||||
|
@ -2898,6 +2945,11 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def Vector2Lerp(Vector2_0: Vector2,Vector2_1: Vector2,float_2: float,) -> Vector2:
|
||||
"""struct Vector2 Vector2Lerp(struct Vector2, struct Vector2, float);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def Vector2LineAngle(Vector2_0: Vector2,Vector2_1: Vector2,) -> float:
|
||||
"""float Vector2LineAngle(struct Vector2, struct Vector2);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def Vector2MoveTowards(Vector2_0: Vector2,Vector2_1: Vector2,float_2: float,) -> Vector2:
|
||||
|
@ -3170,8 +3222,8 @@ def rlBegin(int_0: int,) -> None:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rlBindImageTexture(unsignedint_0: int,unsignedint_1: int,unsignedint_2: int,int_3: int,) -> None:
|
||||
"""void rlBindImageTexture(unsigned int, unsigned int, unsigned int, int);
|
||||
def rlBindImageTexture(unsignedint_0: int,unsignedint_1: int,int_2: int,_Bool_3: bool,) -> None:
|
||||
"""void rlBindImageTexture(unsigned int, unsigned int, int, _Bool);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
|
@ -3225,8 +3277,13 @@ def rlComputeShaderDispatch(unsignedint_0: int,unsignedint_1: int,unsignedint_2:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rlCopyBuffersElements(unsignedint_0: int,unsignedint_1: int,unsignedlonglong_2: int,unsignedlonglong_3: int,unsignedlonglong_4: int,) -> None:
|
||||
"""void rlCopyBuffersElements(unsigned int, unsigned int, unsigned long long, unsigned long long, unsigned long long);
|
||||
def rlCopyShaderBuffer(unsignedint_0: int,unsignedint_1: int,unsignedint_2: int,unsignedint_3: int,unsignedint_4: int,) -> None:
|
||||
"""void rlCopyShaderBuffer(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rlCubemapParameters(unsignedint_0: int,int_1: int,int_2: int,) -> None:
|
||||
"""void rlCubemapParameters(unsigned int, int, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
|
@ -3506,7 +3563,7 @@ def rlGetPixelFormatName(unsignedint_0: int,) -> str:
|
|||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rlGetShaderBufferSize(unsignedint_0: int,) -> int:
|
||||
"""unsigned long long rlGetShaderBufferSize(unsigned int);
|
||||
"""unsigned int rlGetShaderBufferSize(unsigned int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
|
@ -3570,8 +3627,8 @@ def rlLoadRenderBatch(int_0: int,int_1: int,) -> rlRenderBatch:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rlLoadShaderBuffer(unsignedlonglong_0: int,void_pointer_1: Any,int_2: int,) -> int:
|
||||
"""unsigned int rlLoadShaderBuffer(unsigned long long, void *, int);
|
||||
def rlLoadShaderBuffer(unsignedint_0: int,void_pointer_1: Any,int_2: int,) -> int:
|
||||
"""unsigned int rlLoadShaderBuffer(unsigned int, void *, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
|
@ -3650,8 +3707,8 @@ def rlReadScreenPixels(int_0: int,int_1: int,) -> str:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rlReadShaderBufferElements(unsignedint_0: int,void_pointer_1: Any,unsignedlonglong_2: int,unsignedlonglong_3: int,) -> None:
|
||||
"""void rlReadShaderBufferElements(unsigned int, void *, unsigned long long, unsigned long long);
|
||||
def rlReadShaderBuffer(unsignedint_0: int,void_pointer_1: Any,unsignedint_2: int,unsignedint_3: int,) -> None:
|
||||
"""void rlReadShaderBuffer(unsigned int, void *, unsigned int, unsigned int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
|
@ -3678,11 +3735,21 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def rlSetBlendFactors(int_0: int,int_1: int,int_2: int,) -> None:
|
||||
"""void rlSetBlendFactors(int, int, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rlSetBlendFactorsSeparate(int_0: int,int_1: int,int_2: int,int_3: int,int_4: int,int_5: int,) -> None:
|
||||
"""void rlSetBlendFactorsSeparate(int, int, int, int, int, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rlSetBlendMode(int_0: int,) -> None:
|
||||
"""void rlSetBlendMode(int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rlSetCullFace(int_0: int,) -> None:
|
||||
"""void rlSetCullFace(int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rlSetFramebufferHeight(int_0: int,) -> None:
|
||||
|
@ -3815,8 +3882,8 @@ def rlUnloadVertexBuffer(unsignedint_0: int,) -> None:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rlUpdateShaderBufferElements(unsignedint_0: int,void_pointer_1: Any,unsignedlonglong_2: int,unsignedlonglong_3: int,) -> None:
|
||||
"""void rlUpdateShaderBufferElements(unsigned int, void *, unsigned long long, unsigned long long);
|
||||
def rlUpdateShaderBuffer(unsignedint_0: int,void_pointer_1: Any,unsignedint_2: int,unsignedint_3: int,) -> None:
|
||||
"""void rlUpdateShaderBuffer(unsigned int, void *, unsigned int, unsigned int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
|
@ -3952,6 +4019,7 @@ float3: struct
|
|||
rAudioBuffer: struct
|
||||
rAudioProcessor: struct
|
||||
rlBlendMode: int
|
||||
rlCullMode: int
|
||||
rlDrawCall: struct
|
||||
rlFramebufferAttachTextureType: int
|
||||
rlFramebufferAttachType: int
|
||||
|
|
|
@ -305,6 +305,7 @@ class BlendMode(IntEnum):
|
|||
BLEND_SUBTRACT_COLORS = 4
|
||||
BLEND_ALPHA_PREMULTIPLY = 5
|
||||
BLEND_CUSTOM = 6
|
||||
BLEND_CUSTOM_SEPARATE = 7
|
||||
|
||||
class Gesture(IntEnum):
|
||||
GESTURE_NONE = 0
|
||||
|
@ -420,6 +421,9 @@ class GuiDropdownBoxProperty(IntEnum):
|
|||
class GuiTextBoxProperty(IntEnum):
|
||||
TEXT_INNER_PADDING = 16
|
||||
TEXT_LINES_SPACING = 17
|
||||
TEXT_ALIGNMENT_VERTICAL = 18
|
||||
TEXT_MULTILINE = 19
|
||||
TEXT_WRAP_MODE = 20
|
||||
|
||||
class GuiSpinnerProperty(IntEnum):
|
||||
SPIN_BUTTON_WIDTH = 16
|
||||
|
@ -645,19 +649,19 @@ class GuiIconName(IntEnum):
|
|||
ICON_FILE_NEW = 203
|
||||
ICON_FOLDER_ADD = 204
|
||||
ICON_ALARM = 205
|
||||
ICON_206 = 206
|
||||
ICON_207 = 207
|
||||
ICON_208 = 208
|
||||
ICON_209 = 209
|
||||
ICON_210 = 210
|
||||
ICON_211 = 211
|
||||
ICON_212 = 212
|
||||
ICON_213 = 213
|
||||
ICON_214 = 214
|
||||
ICON_215 = 215
|
||||
ICON_216 = 216
|
||||
ICON_217 = 217
|
||||
ICON_218 = 218
|
||||
ICON_CPU = 206
|
||||
ICON_ROM = 207
|
||||
ICON_STEP_OVER = 208
|
||||
ICON_STEP_INTO = 209
|
||||
ICON_STEP_OUT = 210
|
||||
ICON_RESTART = 211
|
||||
ICON_BREAKPOINT_ON = 212
|
||||
ICON_BREAKPOINT_OFF = 213
|
||||
ICON_BURGER_MENU = 214
|
||||
ICON_CASE_SENSITIVE = 215
|
||||
ICON_REG_EXP = 216
|
||||
ICON_FOLDER = 217
|
||||
ICON_FILE = 218
|
||||
ICON_219 = 219
|
||||
ICON_220 = 220
|
||||
ICON_221 = 221
|
||||
|
|
|
@ -1,14 +1,28 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raygui v3.2 - A simple and easy-to-use immediate-mode gui library
|
||||
* raygui v3.5 - A simple and easy-to-use immediate-mode gui library
|
||||
*
|
||||
* DESCRIPTION:
|
||||
*
|
||||
* raygui is a tools-dev-focused immediate-mode-gui library based on raylib but also
|
||||
* available as a standalone library, as long as input and drawing functions are provided.
|
||||
*
|
||||
* Controls provided:
|
||||
* FEATURES:
|
||||
* - Immediate-mode gui, minimal retained data
|
||||
* - +25 controls provided (basic and advanced)
|
||||
* - Styling system for colors, font and metrics
|
||||
* - Icons supported, embeds a complete 1-bit icons pack
|
||||
* - Standalone usage mode option (custom graphics backends)
|
||||
* - Multiple tools provided for raygui development
|
||||
*
|
||||
* POSSIBLE IMPROVEMENTS:
|
||||
* - Allow some controls to work in exclusive mode: GuiSlider(), GuiScrollBar()
|
||||
* - Better standalone mode API for easy plug of custom backends
|
||||
*
|
||||
* LIMITATIONS:
|
||||
* - No auto-layout mechanism provided, up to the user to define controls position and size
|
||||
* - Standalone mode requires library modification and some user work to plug another backend
|
||||
*
|
||||
* CONTROLS PROVIDED:
|
||||
* # Container/separators Controls
|
||||
* - WindowBox --> StatusBar, Panel
|
||||
* - GroupBox --> Line
|
||||
|
@ -26,7 +40,6 @@
|
|||
* - ComboBox
|
||||
* - DropdownBox
|
||||
* - TextBox
|
||||
* - TextBoxMulti
|
||||
* - ValueBox --> TextBox
|
||||
* - Spinner --> Button, ValueBox
|
||||
* - Slider
|
||||
|
@ -46,7 +59,6 @@
|
|||
*
|
||||
*
|
||||
* RAYGUI STYLE (guiStyle):
|
||||
*
|
||||
* raygui uses a global data array for all gui style properties (allocated on data segment by default),
|
||||
* when a new style is loaded, it is loaded over the global style... but a default gui style could always be
|
||||
* recovered with GuiLoadStyleDefault() function, that overwrites the current style to the default one
|
||||
|
@ -67,11 +79,10 @@
|
|||
*
|
||||
* Custom control properties can be defined using the EXTENDED properties for each independent control.
|
||||
*
|
||||
* TOOL: rGuiStyler is a visual tool to customize raygui style.
|
||||
* TOOL: rGuiStyler is a visual tool to customize raygui style: github.com/raysan5/rguistyler
|
||||
*
|
||||
*
|
||||
* RAYGUI ICONS (guiIcons):
|
||||
*
|
||||
* raygui could use a global array containing icons data (allocated on data segment by default),
|
||||
* a custom icons set could be loaded over this array using GuiLoadIcons(), but loaded icons set
|
||||
* must be same RAYGUI_ICON_SIZE and no more than RAYGUI_ICON_MAX_ICONS will be loaded
|
||||
|
@ -87,11 +98,15 @@
|
|||
*
|
||||
* guiIcons size is by default: 256*(16*16/32) = 2048*4 = 8192 bytes = 8 KB
|
||||
*
|
||||
* TOOL: rGuiIcons is a visual tool to customize raygui icons.
|
||||
* TOOL: rGuiIcons is a visual tool to customize/create raygui icons: github.com/raysan5/rguiicons
|
||||
*
|
||||
* RAYGUI LAYOUT:
|
||||
* raygui currently does not provide an auto-layout mechanism like other libraries,
|
||||
* layouts must be defined manually on controls drawing, providing the right bounds Rectangle for it.
|
||||
*
|
||||
* TOOL: rGuiLayout is a visual tool to create raygui layouts: github.com/raysan5/rguilayout
|
||||
*
|
||||
* CONFIGURATION:
|
||||
*
|
||||
* #define RAYGUI_IMPLEMENTATION
|
||||
* Generates the implementation of the library into the included file.
|
||||
* If not defined, the library is in header only mode and can be included in other headers
|
||||
|
@ -111,6 +126,17 @@
|
|||
*
|
||||
*
|
||||
* VERSIONS HISTORY:
|
||||
* 3.5 (20-Apr-2023) ADDED: GuiTabBar(), based on GuiToggle()
|
||||
* ADDED: Helper functions to split text in separate lines
|
||||
* ADDED: Multiple new icons, useful for code editing tools
|
||||
* REMOVED: Unneeded icon editing functions
|
||||
* REMOVED: GuiTextBoxMulti(), very limited and broken
|
||||
* REMOVED: MeasureTextEx() dependency, logic directly implemented
|
||||
* REMOVED: DrawTextEx() dependency, logic directly implemented
|
||||
* REVIEWED: GuiScrollBar(), improve mouse-click behaviour
|
||||
* REVIEWED: Library header info, more info, better organized
|
||||
* REDESIGNED: GuiTextBox() to support cursor movement
|
||||
* REDESIGNED: GuiDrawText() to divide drawing by lines
|
||||
* 3.2 (22-May-2022) RENAMED: Some enum values, for unification, avoiding prefixes
|
||||
* REMOVED: GuiScrollBar(), only internal
|
||||
* REDESIGNED: GuiPanel() to support text parameter
|
||||
|
@ -158,9 +184,13 @@
|
|||
* 0.9 (07-Mar-2016) Reviewed and tested by Albert Martos, Ian Eito, Sergio Martinez and Ramon Santamaria.
|
||||
* 0.8 (27-Aug-2015) Initial release. Implemented by Kevin Gato, Daniel Nicolás and Ramon Santamaria.
|
||||
*
|
||||
* DEPENDENCIES:
|
||||
* raylib 4.5 Inputs reading (keyboard/mouse), shapes drawing, font loading and text drawing
|
||||
*
|
||||
* By default raygui depends on raylib mostly for the inputs and the drawing functionality but that dependency can be disabled
|
||||
* with the config flag RAYGUI_STANDALONE. In that case is up to the user to provide another backend to cover library needs.
|
||||
*
|
||||
* CONTRIBUTORS:
|
||||
*
|
||||
* Ramon Santamaria: Supervision, review, redesign, update and maintenance
|
||||
* Vlad Adrian: Complete rewrite of GuiTextBox() to support extended features (2019)
|
||||
* Sergio Martinez: Review, testing (2015) and redesign of multiple controls (2018)
|
||||
|
@ -174,7 +204,7 @@
|
|||
*
|
||||
* LICENSE: zlib/libpng
|
||||
*
|
||||
* Copyright (c) 2014-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* This software is provided "as-is", without any express or implied warranty. In no event
|
||||
* will the authors be held liable for any damages arising from the use of this software.
|
||||
|
@ -320,6 +350,9 @@ typedef enum {
|
|||
typedef enum {
|
||||
TEXT_INNER_PADDING = 16, // TextBox/TextBoxMulti/ValueBox/Spinner inner text padding
|
||||
TEXT_LINES_SPACING, // TextBoxMulti lines separation
|
||||
TEXT_ALIGNMENT_VERTICAL, // TextBoxMulti vertical alignment: 0-CENTERED, 1-UP, 2-DOWN
|
||||
TEXT_MULTILINE, // TextBox supports multiple lines
|
||||
TEXT_WRAP_MODE // TextBox wrap mode for multiline: 0-NO_WRAP, 1-CHAR_WRAP, 2-WORD_WRAP
|
||||
} GuiTextBoxProperty;
|
||||
// Spinner
|
||||
typedef enum {
|
||||
|
@ -368,6 +401,7 @@ typedef enum {
|
|||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiGroupBox(Rectangle bounds, const char *text); // Group Box control with text name
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiLine(Rectangle bounds, const char *text); // Line separator control, could contain text
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiPanel(Rectangle bounds, const char *text); // Panel control, useful to group controls
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiTabBar(Rectangle bounds, const char **text, int count, int *active); // Tab Bar control, returns TAB to be closed or -1
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ Rectangle GuiScrollPanel(Rectangle bounds, const char *text, Rectangle content, Vector2 *scroll); // Scroll Panel control
|
||||
// Basic controls set
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiLabel(Rectangle bounds, const char *text); // Label control, shows text
|
||||
|
@ -381,7 +415,6 @@ typedef enum {
|
|||
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiSpinner(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode); // Spinner control, returns selected value
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode); // Value Box control, updates input text with numbers
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode); // Text Box control, updates input text
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiTextBoxMulti(Rectangle bounds, char *text, int textSize, bool editMode); // Text Box control with multiple lines
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ float GuiSlider(Rectangle bounds, const char *textLeft, const char *textRight, float value, float minValue, float maxValue); // Slider control, returns selected value
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ float GuiSliderBar(Rectangle bounds, const char *textLeft, const char *textRight, float value, float minValue, float maxValue); // Slider Bar control, returns selected value
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ float GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight, float value, float minValue, float maxValue); // Progress Bar control, shows current progress value
|
||||
|
@ -400,16 +433,16 @@ typedef enum {
|
|||
// Styles loading functions
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiLoadStyle(const char *fileName); // Load style file over global style variable (.rgs)
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiLoadStyleDefault(void); // Load style default over global style
|
||||
// Tooltips management functions
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiEnableTooltip(void); // Enable gui tooltips (global state)
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiDisableTooltip(void); // Disable gui tooltips (global state)
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiSetTooltip(const char *tooltip); // Set tooltip string
|
||||
// Icons functionality
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ const char *GuiIconText(int iconId, const char *text); // Get text with icon id prepended (if supported)
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiDrawIcon(int iconId, int posX, int posY, int pixelSize, Color color);
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ unsigned int *GuiGetIcons(void); // Get full icons data pointer
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ unsigned int *GuiGetIconData(int iconId); // Get icon bit data
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiSetIconData(int iconId, unsigned int *data); // Set icon bit data
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiSetIconScale(unsigned int scale); // Set icon scale (1 by default)
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiSetIconPixel(int iconId, int x, int y); // Set icon pixel value
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiClearIconPixel(int iconId, int x, int y); // Clear icon pixel value
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiCheckIconPixel(int iconId, int x, int y); // Check icon pixel value
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiSetIconScale(int scale); // Set default icon drawing size
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ unsigned int *GuiGetIcons(void); // Get raygui icons data pointer
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ char **GuiLoadIcons(const char *fileName, bool loadIconsName); // Load raygui icons file (.rgi) into internal icons data
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiDrawIcon(int iconId, int posX, int posY, int pixelSize, Color color); // Draw icon using pixel size at specified position
|
||||
//----------------------------------------------------------------------------------
|
||||
// Icons enumeration
|
||||
//----------------------------------------------------------------------------------
|
||||
|
@ -620,19 +653,19 @@ typedef enum {
|
|||
ICON_FILE_NEW = 203,
|
||||
ICON_FOLDER_ADD = 204,
|
||||
ICON_ALARM = 205,
|
||||
ICON_206 = 206,
|
||||
ICON_207 = 207,
|
||||
ICON_208 = 208,
|
||||
ICON_209 = 209,
|
||||
ICON_210 = 210,
|
||||
ICON_211 = 211,
|
||||
ICON_212 = 212,
|
||||
ICON_213 = 213,
|
||||
ICON_214 = 214,
|
||||
ICON_215 = 215,
|
||||
ICON_216 = 216,
|
||||
ICON_217 = 217,
|
||||
ICON_218 = 218,
|
||||
ICON_CPU = 206,
|
||||
ICON_ROM = 207,
|
||||
ICON_STEP_OVER = 208,
|
||||
ICON_STEP_INTO = 209,
|
||||
ICON_STEP_OUT = 210,
|
||||
ICON_RESTART = 211,
|
||||
ICON_BREAKPOINT_ON = 212,
|
||||
ICON_BREAKPOINT_OFF = 213,
|
||||
ICON_BURGER_MENU = 214,
|
||||
ICON_CASE_SENSITIVE = 215,
|
||||
ICON_REG_EXP = 216,
|
||||
ICON_FOLDER = 217,
|
||||
ICON_FILE = 218,
|
||||
ICON_219 = 219,
|
||||
ICON_220 = 220,
|
||||
ICON_221 = 221,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**********************************************************************************************
|
||||
*
|
||||
* raylib v4.2 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
|
||||
* raylib v4.5 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
|
||||
*
|
||||
* FEATURES:
|
||||
* - NO external dependencies, all required libraries included with raylib
|
||||
|
@ -43,6 +43,7 @@
|
|||
* [rmodels] par_shapes (Philip Rideout) for parametric 3d shapes generation
|
||||
* [rmodels] tinyobj_loader_c (Syoyo Fujita) for models loading (OBJ, MTL)
|
||||
* [rmodels] cgltf (Johannes Kuhlmann) for models loading (glTF)
|
||||
* [rmodels] Model3D (bzt) for models loading (M3D, https://bztsrc.gitlab.io/model3d)
|
||||
* [raudio] dr_wav (David Reid) for WAV audio file loading
|
||||
* [raudio] dr_flac (David Reid) for FLAC audio file loading
|
||||
* [raudio] dr_mp3 (David Reid) for MP3 audio file loading
|
||||
|
@ -56,7 +57,7 @@
|
|||
* raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software:
|
||||
*
|
||||
* Copyright (c) 2013-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2013-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* This software is provided "as-is", without any express or implied warranty. In no event
|
||||
* will the authors be held liable for any damages arising from the use of this software.
|
||||
|
@ -113,7 +114,7 @@ typedef struct Vector4 {
|
|||
} Vector4;
|
||||
// Quaternion, 4 components (Vector4 alias)
|
||||
typedef Vector4 Quaternion;
|
||||
// Matrix, 4x4 components, column major, OpenGL style, right handed
|
||||
// Matrix, 4x4 components, column major, OpenGL style, right-handed
|
||||
typedef struct Matrix {
|
||||
float m0, m4, m8, m12; // Matrix first row (4 components)
|
||||
float m1, m5, m9, m13; // Matrix second row (4 components)
|
||||
|
@ -193,7 +194,7 @@ typedef struct Camera3D {
|
|||
Vector3 position; // Camera position
|
||||
Vector3 target; // Camera target it looks-at
|
||||
Vector3 up; // Camera up vector (rotation over its axis)
|
||||
float fovy; // Camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic
|
||||
float fovy; // Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic
|
||||
int projection; // Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
|
||||
} Camera3D;
|
||||
typedef Camera3D Camera; // Camera type fallback, defaults to Camera3D
|
||||
|
@ -242,7 +243,7 @@ typedef struct Material {
|
|||
MaterialMap *maps; // Material maps array (MAX_MATERIAL_MAPS)
|
||||
float params[4]; // Material generic parameters (if required)
|
||||
} Material;
|
||||
// Transform, vectex transformation data
|
||||
// Transform, vertex transformation data
|
||||
typedef struct Transform {
|
||||
Vector3 translation; // Translation
|
||||
Quaternion rotation; // Rotation
|
||||
|
@ -281,8 +282,8 @@ typedef struct Ray {
|
|||
// RayCollision, ray hit information
|
||||
typedef struct RayCollision {
|
||||
bool hit; // Did the ray hit something?
|
||||
float distance; // Distance to nearest hit
|
||||
Vector3 point; // Point of nearest hit
|
||||
float distance; // Distance to the nearest hit
|
||||
Vector3 point; // Point of the nearest hit
|
||||
Vector3 normal; // Surface normal of hit
|
||||
} RayCollision;
|
||||
// BoundingBox
|
||||
|
@ -515,7 +516,7 @@ typedef enum {
|
|||
MOUSE_BUTTON_MIDDLE = 2, // Mouse button middle (pressed wheel)
|
||||
MOUSE_BUTTON_SIDE = 3, // Mouse button side (advanced mouse device)
|
||||
MOUSE_BUTTON_EXTRA = 4, // Mouse button extra (advanced mouse device)
|
||||
MOUSE_BUTTON_FORWARD = 5, // Mouse button fordward (advanced mouse device)
|
||||
MOUSE_BUTTON_FORWARD = 5, // Mouse button forward (advanced mouse device)
|
||||
MOUSE_BUTTON_BACK = 6, // Mouse button back (advanced mouse device)
|
||||
} MouseButton;
|
||||
// Mouse cursor
|
||||
|
@ -529,7 +530,7 @@ typedef enum {
|
|||
MOUSE_CURSOR_RESIZE_NS = 6, // Vertical resize/move arrow shape
|
||||
MOUSE_CURSOR_RESIZE_NWSE = 7, // Top-left to bottom-right diagonal resize/move arrow shape
|
||||
MOUSE_CURSOR_RESIZE_NESW = 8, // The top-right to bottom-left diagonal resize/move arrow shape
|
||||
MOUSE_CURSOR_RESIZE_ALL = 9, // The omni-directional resize/move cursor shape
|
||||
MOUSE_CURSOR_RESIZE_ALL = 9, // The omnidirectional resize/move cursor shape
|
||||
MOUSE_CURSOR_NOT_ALLOWED = 10 // The operation-not-allowed shape
|
||||
} MouseCursor;
|
||||
// Gamepad buttons
|
||||
|
@ -671,10 +672,10 @@ typedef enum {
|
|||
typedef enum {
|
||||
CUBEMAP_LAYOUT_AUTO_DETECT = 0, // Automatically detect layout type
|
||||
CUBEMAP_LAYOUT_LINE_VERTICAL, // Layout is defined by a vertical line with faces
|
||||
CUBEMAP_LAYOUT_LINE_HORIZONTAL, // Layout is defined by an horizontal line with faces
|
||||
CUBEMAP_LAYOUT_LINE_HORIZONTAL, // Layout is defined by a horizontal line with faces
|
||||
CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR, // Layout is defined by a 3x4 cross with cubemap faces
|
||||
CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE, // Layout is defined by a 4x3 cross with cubemap faces
|
||||
CUBEMAP_LAYOUT_PANORAMA // Layout is defined by a panorama image (equirectangular map)
|
||||
CUBEMAP_LAYOUT_PANORAMA // Layout is defined by a panorama image (equirrectangular map)
|
||||
} CubemapLayout;
|
||||
// Font type, defines generation method
|
||||
typedef enum {
|
||||
|
@ -690,10 +691,11 @@ typedef enum {
|
|||
BLEND_ADD_COLORS, // Blend textures adding colors (alternative)
|
||||
BLEND_SUBTRACT_COLORS, // Blend textures subtracting colors (alternative)
|
||||
BLEND_ALPHA_PREMULTIPLY, // Blend premultiplied textures considering alpha
|
||||
BLEND_CUSTOM // Blend textures using custom src/dst factors (use rlSetBlendMode())
|
||||
BLEND_CUSTOM, // Blend textures using custom src/dst factors (use rlSetBlendFactors())
|
||||
BLEND_CUSTOM_SEPARATE // Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendFactorsSeparate())
|
||||
} BlendMode;
|
||||
// Gesture
|
||||
// NOTE: It could be used as flags to enable only some gestures
|
||||
// NOTE: Provided as bit-wise flags to enable only desired gestures
|
||||
typedef enum {
|
||||
GESTURE_NONE = 0, // No gesture
|
||||
GESTURE_TAP = 1, // Tap gesture
|
||||
|
@ -727,7 +729,7 @@ typedef enum {
|
|||
NPATCH_THREE_PATCH_HORIZONTAL // Npatch layout: 3x1 tiles
|
||||
} NPatchLayout;
|
||||
// Callbacks to hook some internal functions
|
||||
// WARNING: This callbacks are intended for advance users
|
||||
// WARNING: These callbacks are intended for advance users
|
||||
typedef void (*TraceLogCallback)(int logLevel, const char *text, void * args); // Logging: Redirect trace log messages
|
||||
typedef unsigned char *(*LoadFileDataCallback)(const char *fileName, unsigned int *bytesRead); // FileIO: Load binary data
|
||||
typedef bool (*SaveFileDataCallback)(const char *fileName, void *data, unsigned int bytesToWrite); // FileIO: Save binary data
|
||||
|
@ -758,7 +760,8 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void MaximizeWindow(void); // Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
|
||||
void MinimizeWindow(void); // Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
|
||||
void RestoreWindow(void); // Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
|
||||
void SetWindowIcon(Image image); // Set icon for window (only PLATFORM_DESKTOP)
|
||||
void SetWindowIcon(Image image); // Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)
|
||||
void SetWindowIcons(Image *images, int count); // Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)
|
||||
void SetWindowTitle(const char *title); // Set title for window (only PLATFORM_DESKTOP)
|
||||
void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP)
|
||||
void SetWindowMonitor(int monitor); // Set monitor for the current window (fullscreen mode)
|
||||
|
@ -787,7 +790,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void DisableEventWaiting(void); // Disable waiting for events on EndDrawing(), automatic events polling
|
||||
// Custom frame control functions
|
||||
// NOTE: Those functions are intended for advance users that want full control over the frame processing
|
||||
// By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timming + PollInputEvents()
|
||||
// By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timing + PollInputEvents()
|
||||
// To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL
|
||||
void SwapScreenBuffer(void); // Swap back buffer with front buffer (screen drawing)
|
||||
void PollInputEvents(void); // Register all input events
|
||||
|
@ -824,6 +827,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
// NOTE: Shader functionality is not available on OpenGL 1.1
|
||||
Shader LoadShader(const char *vsFileName, const char *fsFileName); // Load shader from files and bind default locations
|
||||
Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode); // Load shader from code strings and bind default locations
|
||||
bool IsShaderReady(Shader shader); // Check if a shader is ready
|
||||
int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location
|
||||
int GetShaderLocationAttrib(Shader shader, const char *attribName); // Get shader attribute location
|
||||
void SetShaderValue(Shader shader, int locIndex, const void *value, int uniformType); // Set shader uniform value
|
||||
|
@ -851,8 +855,8 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void SetConfigFlags(unsigned int flags); // Setup init configuration flags (view FLAGS)
|
||||
void TraceLog(int logLevel, const char *text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...)
|
||||
void SetTraceLogLevel(int logLevel); // Set the current threshold (minimum) log level
|
||||
void *MemAlloc(int size); // Internal memory allocator
|
||||
void *MemRealloc(void *ptr, int size); // Internal memory reallocator
|
||||
void *MemAlloc(unsigned int size); // Internal memory allocator
|
||||
void *MemRealloc(void *ptr, unsigned int size); // Internal memory reallocator
|
||||
void MemFree(void *ptr); // Internal memory free
|
||||
void OpenURL(const char *url); // Open URL with default system browser (if available)
|
||||
// Set custom callbacks
|
||||
|
@ -866,7 +870,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
unsigned char *LoadFileData(const char *fileName, unsigned int *bytesRead); // Load file data as byte array (read)
|
||||
void UnloadFileData(unsigned char *data); // Unload file data allocated by LoadFileData()
|
||||
bool SaveFileData(const char *fileName, void *data, unsigned int bytesToWrite); // Save data to file from byte array (write), returns true on success
|
||||
bool ExportDataAsCode(const char *data, unsigned int size, const char *fileName); // Export data to code (.h), returns true on success
|
||||
bool ExportDataAsCode(const unsigned char *data, unsigned int size, const char *fileName); // Export data to code (.h), returns true on success
|
||||
char *LoadFileText(const char *fileName); // Load text data from file (read), returns a '\0' terminated string
|
||||
void UnloadFileText(char *text); // Unload file text data allocated by LoadFileText()
|
||||
bool SaveFileText(const char *fileName, char *text); // Save text data to file (write), string must be '\0' terminated, returns true on success
|
||||
|
@ -952,12 +956,8 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
//------------------------------------------------------------------------------------
|
||||
// Camera System Functions (Module: rcamera)
|
||||
//------------------------------------------------------------------------------------
|
||||
void SetCameraMode(Camera camera, int mode); // Set camera mode (multiple camera modes available)
|
||||
void UpdateCamera(Camera *camera); // Update camera position for selected mode
|
||||
void SetCameraPanControl(int keyPan); // Set camera pan key to combine with mouse movement (free camera)
|
||||
void SetCameraAltControl(int keyAlt); // Set camera alt key to combine with mouse movement (free camera)
|
||||
void SetCameraSmoothZoomControl(int keySmoothZoom); // Set camera smooth zoom key to combine with mouse (free camera)
|
||||
void SetCameraMoveControls(int keyFront, int keyBack, int keyRight, int keyLeft, int keyUp, int keyDown); // Set camera move controls (1st person and 3rd person cameras)
|
||||
void UpdateCamera(Camera *camera, int mode); // Update camera position for selected mode
|
||||
void UpdateCameraPro(Camera *camera, Vector3 movement, Vector3 rotation, float zoom); // Update camera movement/rotation
|
||||
//------------------------------------------------------------------------------------
|
||||
// Basic Shapes Drawing Functions (Module: shapes)
|
||||
//------------------------------------------------------------------------------------
|
||||
|
@ -1010,6 +1010,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
bool CheckCollisionPointRec(Vector2 point, Rectangle rec); // Check if point is inside rectangle
|
||||
bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius); // Check if point is inside circle
|
||||
bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3); // Check if point is inside a triangle
|
||||
bool CheckCollisionPointPoly(Vector2 point, Vector2 *points, int pointCount); // Check if point is within a polygon described by array of vertices
|
||||
bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 *collisionPoint); // Check the collision between two lines defined by two points each, returns collision point by reference
|
||||
bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshold); // Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
|
||||
Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2); // Get collision rectangle for two rectangles collision
|
||||
|
@ -1017,13 +1018,14 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
// Texture Loading and Drawing Functions (Module: textures)
|
||||
//------------------------------------------------------------------------------------
|
||||
// Image loading functions
|
||||
// NOTE: This functions do not require GPU access
|
||||
// NOTE: These functions do not require GPU access
|
||||
Image LoadImage(const char *fileName); // Load image from file into CPU memory (RAM)
|
||||
Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image from RAW file data
|
||||
Image LoadImageAnim(const char *fileName, int *frames); // Load image sequence from file (frames appended to image.data)
|
||||
Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load image from memory buffer, fileType refers to extension: i.e. '.png'
|
||||
Image LoadImageFromTexture(Texture2D texture); // Load image from GPU texture data
|
||||
Image LoadImageFromScreen(void); // Load image from screen buffer and (screenshot)
|
||||
bool IsImageReady(Image image); // Check if an image is ready
|
||||
void UnloadImage(Image image); // Unload image from CPU memory (RAM)
|
||||
bool ExportImage(Image image, const char *fileName); // Export image data to file, returns true on success
|
||||
bool ExportImageAsCode(Image image, const char *fileName); // Export image as code file defining an array of bytes, returns true on success
|
||||
|
@ -1034,7 +1036,9 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
Image GenImageGradientRadial(int width, int height, float density, Color inner, Color outer); // Generate image: radial gradient
|
||||
Image GenImageChecked(int width, int height, int checksX, int checksY, Color col1, Color col2); // Generate image: checked
|
||||
Image GenImageWhiteNoise(int width, int height, float factor); // Generate image: white noise
|
||||
Image GenImagePerlinNoise(int width, int height, int offsetX, int offsetY, float scale); // Generate image: perlin noise
|
||||
Image GenImageCellular(int width, int height, int tileSize); // Generate image: cellular algorithm, bigger tileSize means bigger cells
|
||||
Image GenImageText(int width, int height, const char *text); // Generate image: grayscale image from text data
|
||||
// Image manipulation functions
|
||||
Image ImageCopy(Image image); // Create an image duplicate (useful for transformations)
|
||||
Image ImageFromImage(Image image, Rectangle rec); // Create an image from another image piece
|
||||
|
@ -1047,6 +1051,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void ImageAlphaClear(Image *image, Color color, float threshold); // Clear alpha channel to desired color
|
||||
void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image
|
||||
void ImageAlphaPremultiply(Image *image); // Premultiply alpha channel
|
||||
void ImageBlurGaussian(Image *image, int blurSize); // Apply Gaussian blur using a box blur approximation
|
||||
void ImageResize(Image *image, int newWidth, int newHeight); // Resize image (Bicubic scaling algorithm)
|
||||
void ImageResizeNN(Image *image, int newWidth,int newHeight); // Resize image (Nearest-Neighbor scaling algorithm)
|
||||
void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color fill); // Resize canvas and fill with color
|
||||
|
@ -1075,8 +1080,10 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void ImageDrawPixelV(Image *dst, Vector2 position, Color color); // Draw pixel within an image (Vector version)
|
||||
void ImageDrawLine(Image *dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw line within an image
|
||||
void ImageDrawLineV(Image *dst, Vector2 start, Vector2 end, Color color); // Draw line within an image (Vector version)
|
||||
void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color); // Draw circle within an image
|
||||
void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color); // Draw circle within an image (Vector version)
|
||||
void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color); // Draw a filled circle within an image
|
||||
void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color); // Draw a filled circle within an image (Vector version)
|
||||
void ImageDrawCircleLines(Image *dst, int centerX, int centerY, int radius, Color color); // Draw circle outline within an image
|
||||
void ImageDrawCircleLinesV(Image *dst, Vector2 center, int radius, Color color); // Draw circle outline within an image (Vector version)
|
||||
void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int height, Color color); // Draw rectangle within an image
|
||||
void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); // Draw rectangle within an image (Vector version)
|
||||
void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image
|
||||
|
@ -1090,7 +1097,9 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
Texture2D LoadTextureFromImage(Image image); // Load texture from image data
|
||||
TextureCubemap LoadTextureCubemap(Image image, int layout); // Load cubemap from image, multiple image cubemap layouts supported
|
||||
RenderTexture2D LoadRenderTexture(int width, int height); // Load texture for rendering (framebuffer)
|
||||
bool IsTextureReady(Texture2D texture); // Check if a texture is ready
|
||||
void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM)
|
||||
bool IsRenderTextureReady(RenderTexture2D target); // Check if a render texture is ready
|
||||
void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM)
|
||||
void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data
|
||||
void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels); // Update GPU texture rectangle with new data
|
||||
|
@ -1103,11 +1112,8 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void DrawTextureV(Texture2D texture, Vector2 position, Color tint); // Draw a Texture2D with position defined as Vector2
|
||||
void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint); // Draw a Texture2D with extended parameters
|
||||
void DrawTextureRec(Texture2D texture, Rectangle source, Vector2 position, Color tint); // Draw a part of a texture defined by a rectangle
|
||||
void DrawTextureQuad(Texture2D texture, Vector2 tiling, Vector2 offset, Rectangle quad, Color tint); // Draw texture quad with tiling and offset parameters
|
||||
void DrawTextureTiled(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, float scale, Color tint); // Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest.
|
||||
void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a rectangle with 'pro' parameters
|
||||
void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draws a texture (or part of it) that stretches or shrinks nicely
|
||||
void DrawTexturePoly(Texture2D texture, Vector2 center, Vector2 *points, Vector2 *texcoords, int pointCount, Color tint); // Draw a textured polygon
|
||||
// Color/pixel related functions
|
||||
Color Fade(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
|
||||
int ColorToInt(Color color); // Get hexadecimal value for a Color
|
||||
|
@ -1115,6 +1121,9 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
Color ColorFromNormalized(Vector4 normalized); // Get Color from normalized values [0..1]
|
||||
Vector3 ColorToHSV(Color color); // Get HSV values for a Color, hue [0..360], saturation/value [0..1]
|
||||
Color ColorFromHSV(float hue, float saturation, float value); // Get a Color from HSV values, hue [0..360], saturation/value [0..1]
|
||||
Color ColorTint(Color color, Color tint); // Get color multiplied with another color
|
||||
Color ColorBrightness(Color color, float factor); // Get color with brightness correction, brightness factor goes from -1.0f to 1.0f
|
||||
Color ColorContrast(Color color, float contrast); // Get color with contrast correction, contrast values between -1.0f and 1.0f
|
||||
Color ColorAlpha(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
|
||||
Color ColorAlphaBlend(Color dst, Color src, Color tint); // Get src alpha-blended into dst color with tint
|
||||
Color GetColor(unsigned int hexValue); // Get Color structure from hexadecimal value
|
||||
|
@ -1130,6 +1139,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
Font LoadFontEx(const char *fileName, int fontSize, int *fontChars, int glyphCount); // Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load the default character set
|
||||
Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style)
|
||||
Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int glyphCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
|
||||
bool IsFontReady(Font font); // Check if a font is ready
|
||||
GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int glyphCount, int type); // Load font data for further use
|
||||
Image GenImageFontAtlas(const GlyphInfo *chars, Rectangle **recs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
|
||||
void UnloadFontData(GlyphInfo *chars, int glyphCount); // Unload font chars info data (RAM)
|
||||
|
@ -1149,12 +1159,15 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
GlyphInfo GetGlyphInfo(Font font, int codepoint); // Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found
|
||||
Rectangle GetGlyphAtlasRec(Font font, int codepoint); // Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found
|
||||
// Text codepoints management functions (unicode characters)
|
||||
char *LoadUTF8(const int *codepoints, int length); // Load UTF-8 text encoded from codepoints array
|
||||
void UnloadUTF8(char *text); // Unload UTF-8 text encoded from codepoints array
|
||||
int *LoadCodepoints(const char *text, int *count); // Load all codepoints from a UTF-8 text string, codepoints count returned by parameter
|
||||
void UnloadCodepoints(int *codepoints); // Unload codepoints data from memory
|
||||
int GetCodepointCount(const char *text); // Get total number of codepoints in a UTF-8 encoded string
|
||||
int GetCodepoint(const char *text, int *bytesProcessed); // Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
|
||||
const char *CodepointToUTF8(int codepoint, int *byteSize); // Encode one codepoint into UTF-8 byte array (array length returned as parameter)
|
||||
char *TextCodepointsToUTF8(const int *codepoints, int length); // Encode text as codepoints array into UTF-8 text string (WARNING: memory must be freed!)
|
||||
int GetCodepoint(const char *text, int *codepointSize); // Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
|
||||
int GetCodepointNext(const char *text, int *codepointSize); // Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
|
||||
int GetCodepointPrevious(const char *text, int *codepointSize); // Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
|
||||
const char *CodepointToUTF8(int codepoint, int *utf8Size); // Encode one codepoint into UTF-8 byte array (array length returned as parameter)
|
||||
// Text strings management functions (no UTF-8 strings, only byte chars)
|
||||
// NOTE: Some strings allocate memory internally for returned strings, just be careful!
|
||||
int TextCopy(char *dst, const char *src); // Copy one string to another, returns bytes copied
|
||||
|
@ -1185,8 +1198,6 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void DrawCubeV(Vector3 position, Vector3 size, Color color); // Draw cube (Vector version)
|
||||
void DrawCubeWires(Vector3 position, float width, float height, float length, Color color); // Draw cube wires
|
||||
void DrawCubeWiresV(Vector3 position, Vector3 size, Color color); // Draw cube wires (Vector version)
|
||||
void DrawCubeTexture(Texture2D texture, Vector3 position, float width, float height, float length, Color color); // Draw cube textured
|
||||
void DrawCubeTextureRec(Texture2D texture, Rectangle source, Vector3 position, float width, float height, float length, Color color); // Draw cube with a region of a texture
|
||||
void DrawSphere(Vector3 centerPos, float radius, Color color); // Draw sphere
|
||||
void DrawSphereEx(Vector3 centerPos, float radius, int rings, int slices, Color color); // Draw sphere with extended parameters
|
||||
void DrawSphereWires(Vector3 centerPos, float radius, int rings, int slices, Color color); // Draw sphere wires
|
||||
|
@ -1194,6 +1205,8 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void DrawCylinderEx(Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color); // Draw a cylinder with base at startPos and top at endPos
|
||||
void DrawCylinderWires(Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color); // Draw a cylinder/cone wires
|
||||
void DrawCylinderWiresEx(Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color); // Draw a cylinder wires with base at startPos and top at endPos
|
||||
void DrawCapsule(Vector3 startPos, Vector3 endPos, float radius, int slices, int rings, Color color); // Draw a capsule with the center of its sphere caps at startPos and endPos
|
||||
void DrawCapsuleWires(Vector3 startPos, Vector3 endPos, float radius, int slices, int rings, Color color); // Draw capsule wireframe with the center of its sphere caps at startPos and endPos
|
||||
void DrawPlane(Vector3 centerPos, Vector2 size, Color color); // Draw a plane XZ
|
||||
void DrawRay(Ray ray, Color color); // Draw a ray line
|
||||
void DrawGrid(int slices, float spacing); // Draw a grid (centered at (0, 0, 0))
|
||||
|
@ -1203,8 +1216,8 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
// Model management functions
|
||||
Model LoadModel(const char *fileName); // Load model from files (meshes and materials)
|
||||
Model LoadModelFromMesh(Mesh mesh); // Load model from generated mesh (default material)
|
||||
bool IsModelReady(Model model); // Check if a model is ready
|
||||
void UnloadModel(Model model); // Unload model (including meshes) from memory (RAM and/or VRAM)
|
||||
void UnloadModelKeepMeshes(Model model); // Unload model (but not meshes) from memory (RAM and/or VRAM)
|
||||
BoundingBox GetModelBoundingBox(Model model); // Compute model bounding box limits (considers all meshes)
|
||||
// Model drawing functions
|
||||
void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set)
|
||||
|
@ -1239,6 +1252,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
// Material loading/unloading functions
|
||||
Material *LoadMaterials(const char *fileName, int *materialCount); // Load materials from model file
|
||||
Material LoadMaterialDefault(void); // Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
|
||||
bool IsMaterialReady(Material material); // Check if a material is ready
|
||||
void UnloadMaterial(Material material); // Unload material from GPU memory (VRAM)
|
||||
void SetMaterialTexture(Material *material, int mapType, Texture2D texture); // Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...)
|
||||
void SetModelMeshMaterial(Model *model, int meshId, int materialId); // Set material for a mesh
|
||||
|
@ -1269,8 +1283,10 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
|
|||
// Wave/Sound loading/unloading functions
|
||||
Wave LoadWave(const char *fileName); // Load wave data from file
|
||||
Wave LoadWaveFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load wave from memory buffer, fileType refers to extension: i.e. '.wav'
|
||||
bool IsWaveReady(Wave wave); // Checks if wave data is ready
|
||||
Sound LoadSound(const char *fileName); // Load sound from file
|
||||
Sound LoadSoundFromWave(Wave wave); // Load sound from wave data
|
||||
bool IsSoundReady(Sound sound); // Checks if a sound is ready
|
||||
void UpdateSound(Sound sound, const void *data, int sampleCount); // Update sound buffer with new data
|
||||
void UnloadWave(Wave wave); // Unload wave data
|
||||
void UnloadSound(Sound sound); // Unload sound
|
||||
|
@ -1281,9 +1297,6 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
|
|||
void StopSound(Sound sound); // Stop playing a sound
|
||||
void PauseSound(Sound sound); // Pause a sound
|
||||
void ResumeSound(Sound sound); // Resume a paused sound
|
||||
void PlaySoundMulti(Sound sound); // Play a sound (using multichannel buffer pool)
|
||||
void StopSoundMulti(void); // Stop any sound playing (using multichannel buffer pool)
|
||||
int GetSoundsPlaying(void); // Get number of sounds playing in the multichannel
|
||||
bool IsSoundPlaying(Sound sound); // Check if a sound is currently playing
|
||||
void SetSoundVolume(Sound sound, float volume); // Set volume for a sound (1.0 is max level)
|
||||
void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level)
|
||||
|
@ -1296,6 +1309,7 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
|
|||
// Music management functions
|
||||
Music LoadMusicStream(const char *fileName); // Load music stream from file
|
||||
Music LoadMusicStreamFromMemory(const char *fileType, const unsigned char *data, int dataSize); // Load music stream from data
|
||||
bool IsMusicReady(Music music); // Checks if a music stream is ready
|
||||
void UnloadMusicStream(Music music); // Unload music stream
|
||||
void PlayMusicStream(Music music); // Start music playing
|
||||
bool IsMusicStreamPlaying(Music music); // Check if music is playing
|
||||
|
@ -1311,6 +1325,7 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
|
|||
float GetMusicTimePlayed(Music music); // Get current music time played (in seconds)
|
||||
// AudioStream management functions
|
||||
AudioStream LoadAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels); // Load audio stream (to stream raw audio pcm data)
|
||||
bool IsAudioStreamReady(AudioStream stream); // Checks if an audio stream is ready
|
||||
void UnloadAudioStream(AudioStream stream); // Unload audio stream and free memory
|
||||
void UpdateAudioStream(AudioStream stream, const void *data, int frameCount); // Update audio stream buffers with data
|
||||
bool IsAudioStreamProcessed(AudioStream stream); // Check if any audio stream buffers requires refill
|
||||
|
@ -1326,3 +1341,5 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
|
|||
void SetAudioStreamCallback(AudioStream stream, AudioCallback callback); // Audio thread callback to request new data
|
||||
void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream
|
||||
void DetachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Detach audio stream processor from stream
|
||||
void AttachAudioMixedProcessor(AudioCallback processor); // Attach audio stream processor to the entire audio pipeline
|
||||
void DetachAudioMixedProcessor(AudioCallback processor); // Detach audio stream processor from the entire audio pipeline
|
|
@ -24,7 +24,7 @@
|
|||
*
|
||||
* LICENSE: zlib/libpng
|
||||
*
|
||||
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2015-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* This software is provided "as-is", without any express or implied warranty. In no event
|
||||
* will the authors be held liable for any damages arising from the use of this software.
|
||||
|
@ -81,8 +81,12 @@ inline /* Functions may be inlined or external definition used*/ float Vector2Le
|
|||
inline /* Functions may be inlined or external definition used*/ float Vector2LengthSqr(Vector2 v);// Calculate two vectors dot product
|
||||
inline /* Functions may be inlined or external definition used*/ float Vector2DotProduct(Vector2 v1, Vector2 v2);// Calculate distance between two vectors
|
||||
inline /* Functions may be inlined or external definition used*/ float Vector2Distance(Vector2 v1, Vector2 v2);// Calculate square distance between two vectors
|
||||
inline /* Functions may be inlined or external definition used*/ float Vector2DistanceSqr(Vector2 v1, Vector2 v2);// Calculate angle from two vectors
|
||||
inline /* Functions may be inlined or external definition used*/ float Vector2Angle(Vector2 v1, Vector2 v2);// Scale vector (multiply by value)
|
||||
inline /* Functions may be inlined or external definition used*/ float Vector2DistanceSqr(Vector2 v1, Vector2 v2);// Calculate angle between two vectors
|
||||
// NOTE: Angle is calculated from origin point (0, 0)
|
||||
inline /* Functions may be inlined or external definition used*/ float Vector2Angle(Vector2 v1, Vector2 v2);// Calculate angle defined by a two vectors line
|
||||
// NOTE: Parameters need to be normalized
|
||||
// Current implementation should be aligned with glm::angle
|
||||
inline /* Functions may be inlined or external definition used*/ float Vector2LineAngle(Vector2 start, Vector2 end);// Scale vector (multiply by value)
|
||||
inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Scale(Vector2 v, float scale);// Multiply vector by vector
|
||||
inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Multiply(Vector2 v1, Vector2 v2);// Negate vector
|
||||
inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Negate(Vector2 v);// Divide vector by vector
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
/**********************************************************************************************
|
||||
*
|
||||
* rlgl v4.0 - A multi-OpenGL abstraction layer with an immediate-mode style API
|
||||
* rlgl v4.5 - A multi-OpenGL abstraction layer with an immediate-mode style API
|
||||
*
|
||||
* An abstraction layer for multiple OpenGL versions (1.1, 2.1, 3.3 Core, 4.3 Core, ES 2.0)
|
||||
* that provides a pseudo-OpenGL 1.1 immediate-mode style API (rlVertex, rlTranslate, rlRotate...)
|
||||
*
|
||||
* When chosing an OpenGL backend different than OpenGL 1.1, some internal buffer are
|
||||
* When choosing an OpenGL backend different than OpenGL 1.1, some internal buffer are
|
||||
* initialized on rlglInit() to accumulate vertex data.
|
||||
*
|
||||
* When an internal state change is required all the stored vertex data is renderer in batch,
|
||||
* additioanlly, rlDrawRenderBatchActive() could be called to force flushing of the batch.
|
||||
* additionally, rlDrawRenderBatchActive() could be called to force flushing of the batch.
|
||||
*
|
||||
* Some additional resources are also loaded for convenience, here the complete list:
|
||||
* - Default batch (RLGL.defaultBatch): RenderBatch system to accumulate vertex data
|
||||
|
@ -61,12 +61,11 @@
|
|||
* When loading a shader, the following vertex attribute and uniform
|
||||
* location names are tried to be set automatically:
|
||||
*
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION "vertexPosition" // Binded by default to shader location: 0
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD "vertexTexCoord" // Binded by default to shader location: 1
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL "vertexNormal" // Binded by default to shader location: 2
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR "vertexColor" // Binded by default to shader location: 3
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT "vertexTangent" // Binded by default to shader location: 4
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2 "vertexTexCoord2" // Binded by default to shader location: 5
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION "vertexPosition" // Bound by default to shader location: 0
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD "vertexTexCoord" // Bound by default to shader location: 1
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL "vertexNormal" // Bound by default to shader location: 2
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR "vertexColor" // Bound by default to shader location: 3
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT "vertexTangent" // Bound by default to shader location: 4
|
||||
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_MVP "mvp" // model-view-projection matrix
|
||||
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_VIEW "matView" // view matrix
|
||||
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_PROJECTION "matProjection" // projection matrix
|
||||
|
@ -85,7 +84,7 @@
|
|||
*
|
||||
* LICENSE: zlib/libpng
|
||||
*
|
||||
* Copyright (c) 2014-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* This software is provided "as-is", without any express or implied warranty. In no event
|
||||
* will the authors be held liable for any damages arising from the use of this software.
|
||||
|
@ -128,40 +127,13 @@
|
|||
// Matrix modes (equivalent to OpenGL)
|
||||
// Primitive assembly draw modes
|
||||
// GL equivalent data types
|
||||
// Buffer usage hint
|
||||
// GL buffer usage hint
|
||||
// GL Shader type
|
||||
// GL blending factors
|
||||
// GL blending functions/equations
|
||||
//----------------------------------------------------------------------------------
|
||||
// Types and Structures Definition
|
||||
//----------------------------------------------------------------------------------
|
||||
typedef enum {
|
||||
OPENGL_11 = 1,
|
||||
OPENGL_21,
|
||||
OPENGL_33,
|
||||
OPENGL_43,
|
||||
OPENGL_ES_20
|
||||
} rlGlVersion;
|
||||
typedef enum {
|
||||
RL_ATTACHMENT_COLOR_CHANNEL0 = 0,
|
||||
RL_ATTACHMENT_COLOR_CHANNEL1,
|
||||
RL_ATTACHMENT_COLOR_CHANNEL2,
|
||||
RL_ATTACHMENT_COLOR_CHANNEL3,
|
||||
RL_ATTACHMENT_COLOR_CHANNEL4,
|
||||
RL_ATTACHMENT_COLOR_CHANNEL5,
|
||||
RL_ATTACHMENT_COLOR_CHANNEL6,
|
||||
RL_ATTACHMENT_COLOR_CHANNEL7,
|
||||
RL_ATTACHMENT_DEPTH = 100,
|
||||
RL_ATTACHMENT_STENCIL = 200,
|
||||
} rlFramebufferAttachType;
|
||||
typedef enum {
|
||||
RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0,
|
||||
RL_ATTACHMENT_CUBEMAP_NEGATIVE_X,
|
||||
RL_ATTACHMENT_CUBEMAP_POSITIVE_Y,
|
||||
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y,
|
||||
RL_ATTACHMENT_CUBEMAP_POSITIVE_Z,
|
||||
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z,
|
||||
RL_ATTACHMENT_TEXTURE2D = 100,
|
||||
RL_ATTACHMENT_RENDERBUFFER = 200,
|
||||
} rlFramebufferAttachTextureType;
|
||||
// Dynamic vertex buffers (position + texcoords + colors + indices arrays)
|
||||
typedef struct rlVertexBuffer {
|
||||
int elementCount; // Number of elements in the buffer (QUADS)
|
||||
|
@ -195,6 +167,14 @@ typedef struct rlRenderBatch {
|
|||
int drawCounter; // Draw calls counter
|
||||
float currentDepth; // Current depth value for next draw
|
||||
} rlRenderBatch;
|
||||
// OpenGL version
|
||||
typedef enum {
|
||||
RL_OPENGL_11 = 1, // OpenGL 1.1
|
||||
RL_OPENGL_21, // OpenGL 2.1 (GLSL 120)
|
||||
RL_OPENGL_33, // OpenGL 3.3 (GLSL 330)
|
||||
RL_OPENGL_43, // OpenGL 4.3 (using GLSL 330)
|
||||
RL_OPENGL_ES_20 // OpenGL ES 2.0 (GLSL 100)
|
||||
} rlGlVersion;
|
||||
// Trace log level
|
||||
// NOTE: Organized by priority level
|
||||
typedef enum {
|
||||
|
@ -207,7 +187,8 @@ typedef enum {
|
|||
RL_LOG_FATAL, // Fatal logging, used to abort program: exit(EXIT_FAILURE)
|
||||
RL_LOG_NONE // Disable logging
|
||||
} rlTraceLogLevel;
|
||||
// Texture formats (support depends on OpenGL version)
|
||||
// Texture pixel formats
|
||||
// NOTE: Support depends on OpenGL version
|
||||
typedef enum {
|
||||
RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1, // 8 bit per pixel (no alpha)
|
||||
RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA, // 8*2 bpp (2 channels)
|
||||
|
@ -250,7 +231,8 @@ typedef enum {
|
|||
RL_BLEND_ADD_COLORS, // Blend textures adding colors (alternative)
|
||||
RL_BLEND_SUBTRACT_COLORS, // Blend textures subtracting colors (alternative)
|
||||
RL_BLEND_ALPHA_PREMULTIPLY, // Blend premultiplied textures considering alpha
|
||||
RL_BLEND_CUSTOM // Blend textures using custom src/dst factors (use rlSetBlendFactors())
|
||||
RL_BLEND_CUSTOM, // Blend textures using custom src/dst factors (use rlSetBlendFactors())
|
||||
RL_BLEND_CUSTOM_SEPARATE // Blend textures using custom src/dst factors (use rlSetBlendFactorsSeparate())
|
||||
} rlBlendMode;
|
||||
// Shader location point type
|
||||
typedef enum {
|
||||
|
@ -300,17 +282,47 @@ typedef enum {
|
|||
RL_SHADER_ATTRIB_VEC3, // Shader attribute type: vec3 (3 float)
|
||||
RL_SHADER_ATTRIB_VEC4 // Shader attribute type: vec4 (4 float)
|
||||
} rlShaderAttributeDataType;
|
||||
// Framebuffer attachment type
|
||||
// NOTE: By default up to 8 color channels defined, but it can be more
|
||||
typedef enum {
|
||||
RL_ATTACHMENT_COLOR_CHANNEL0 = 0, // Framebuffer attachment type: color 0
|
||||
RL_ATTACHMENT_COLOR_CHANNEL1, // Framebuffer attachment type: color 1
|
||||
RL_ATTACHMENT_COLOR_CHANNEL2, // Framebuffer attachment type: color 2
|
||||
RL_ATTACHMENT_COLOR_CHANNEL3, // Framebuffer attachment type: color 3
|
||||
RL_ATTACHMENT_COLOR_CHANNEL4, // Framebuffer attachment type: color 4
|
||||
RL_ATTACHMENT_COLOR_CHANNEL5, // Framebuffer attachment type: color 5
|
||||
RL_ATTACHMENT_COLOR_CHANNEL6, // Framebuffer attachment type: color 6
|
||||
RL_ATTACHMENT_COLOR_CHANNEL7, // Framebuffer attachment type: color 7
|
||||
RL_ATTACHMENT_DEPTH = 100, // Framebuffer attachment type: depth
|
||||
RL_ATTACHMENT_STENCIL = 200, // Framebuffer attachment type: stencil
|
||||
} rlFramebufferAttachType;
|
||||
// Framebuffer texture attachment type
|
||||
typedef enum {
|
||||
RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0, // Framebuffer texture attachment type: cubemap, +X side
|
||||
RL_ATTACHMENT_CUBEMAP_NEGATIVE_X, // Framebuffer texture attachment type: cubemap, -X side
|
||||
RL_ATTACHMENT_CUBEMAP_POSITIVE_Y, // Framebuffer texture attachment type: cubemap, +Y side
|
||||
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y, // Framebuffer texture attachment type: cubemap, -Y side
|
||||
RL_ATTACHMENT_CUBEMAP_POSITIVE_Z, // Framebuffer texture attachment type: cubemap, +Z side
|
||||
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z, // Framebuffer texture attachment type: cubemap, -Z side
|
||||
RL_ATTACHMENT_TEXTURE2D = 100, // Framebuffer texture attachment type: texture2d
|
||||
RL_ATTACHMENT_RENDERBUFFER = 200, // Framebuffer texture attachment type: renderbuffer
|
||||
} rlFramebufferAttachTextureType;
|
||||
// Face culling mode
|
||||
typedef enum {
|
||||
RL_CULL_FACE_FRONT = 0,
|
||||
RL_CULL_FACE_BACK
|
||||
} rlCullMode;
|
||||
//------------------------------------------------------------------------------------
|
||||
// Functions Declaration - Matrix operations
|
||||
//------------------------------------------------------------------------------------
|
||||
void rlMatrixMode(int mode); // Choose the current matrix to be transformed
|
||||
void rlPushMatrix(void); // Push the current matrix to stack
|
||||
void rlPopMatrix(void); // Pop lattest inserted matrix from stack
|
||||
void rlPopMatrix(void); // Pop latest inserted matrix from stack
|
||||
void rlLoadIdentity(void); // Reset current matrix to identity matrix
|
||||
void rlTranslatef(float x, float y, float z); // Multiply the current matrix by a translation matrix
|
||||
void rlRotatef(float angle, float x, float y, float z); // Multiply the current matrix by a rotation matrix
|
||||
void rlScalef(float x, float y, float z); // Multiply the current matrix by a scaling matrix
|
||||
void rlMultMatrixf(float *matf); // Multiply the current matrix by another matrix
|
||||
void rlMultMatrixf(const float *matf); // Multiply the current matrix by another matrix
|
||||
void rlFrustum(double left, double right, double bottom, double top, double znear, double zfar);
|
||||
void rlOrtho(double left, double right, double bottom, double top, double znear, double zfar);
|
||||
void rlViewport(int x, int y, int width, int height); // Set the viewport area
|
||||
|
@ -348,6 +360,7 @@ typedef enum {
|
|||
void rlEnableTextureCubemap(unsigned int id); // Enable texture cubemap
|
||||
void rlDisableTextureCubemap(void); // Disable texture cubemap
|
||||
void rlTextureParameters(unsigned int id, int param, int value); // Set texture parameters (filter, wrap)
|
||||
void rlCubemapParameters(unsigned int id, int param, int value); // Set cubemap parameters (filter, wrap)
|
||||
// Shader state
|
||||
void rlEnableShader(unsigned int id); // Enable shader program
|
||||
void rlDisableShader(void); // Disable shader program
|
||||
|
@ -364,6 +377,7 @@ typedef enum {
|
|||
void rlDisableDepthMask(void); // Disable depth write
|
||||
void rlEnableBackfaceCulling(void); // Enable backface culling
|
||||
void rlDisableBackfaceCulling(void); // Disable backface culling
|
||||
void rlSetCullFace(int mode); // Set face culling mode
|
||||
void rlEnableScissorTest(void); // Enable scissor test
|
||||
void rlDisableScissorTest(void); // Disable scissor test
|
||||
void rlScissor(int x, int y, int width, int height); // Scissor test
|
||||
|
@ -381,12 +395,13 @@ typedef enum {
|
|||
void rlCheckErrors(void); // Check and log OpenGL error codes
|
||||
void rlSetBlendMode(int mode); // Set blending mode
|
||||
void rlSetBlendFactors(int glSrcFactor, int glDstFactor, int glEquation); // Set blending mode factor and equation (using OpenGL factors)
|
||||
void rlSetBlendFactorsSeparate(int glSrcRGB, int glDstRGB, int glSrcAlpha, int glDstAlpha, int glEqRGB, int glEqAlpha); // Set blending mode factors and equations separately (using OpenGL factors)
|
||||
//------------------------------------------------------------------------------------
|
||||
// Functions Declaration - rlgl functionality
|
||||
//------------------------------------------------------------------------------------
|
||||
// rlgl initialization functions
|
||||
void rlglInit(int width, int height); // Initialize rlgl (buffers, shaders, textures, states)
|
||||
void rlglClose(void); // De-inititialize rlgl (buffers, shaders, textures)
|
||||
void rlglClose(void); // De-initialize rlgl (buffers, shaders, textures)
|
||||
void rlLoadExtensions(void *loader); // Load OpenGL extensions (loader function required)
|
||||
int rlGetVersion(void); // Get current OpenGL version
|
||||
void rlSetFramebufferWidth(int width); // Set current framebuffer width
|
||||
|
@ -451,17 +466,17 @@ typedef enum {
|
|||
void rlSetShader(unsigned int id, int *locs); // Set shader currently active (id and locations)
|
||||
// Compute shader management
|
||||
unsigned int rlLoadComputeShaderProgram(unsigned int shaderId); // Load compute shader program
|
||||
void rlComputeShaderDispatch(unsigned int groupX, unsigned int groupY, unsigned int groupZ); // Dispatch compute shader (equivalent to *draw* for graphics pilepine)
|
||||
void rlComputeShaderDispatch(unsigned int groupX, unsigned int groupY, unsigned int groupZ); // Dispatch compute shader (equivalent to *draw* for graphics pipeline)
|
||||
// Shader buffer storage object management (ssbo)
|
||||
unsigned int rlLoadShaderBuffer(unsigned long long size, const void *data, int usageHint); // Load shader storage buffer object (SSBO)
|
||||
unsigned int rlLoadShaderBuffer(unsigned int size, const void *data, int usageHint); // Load shader storage buffer object (SSBO)
|
||||
void rlUnloadShaderBuffer(unsigned int ssboId); // Unload shader storage buffer object (SSBO)
|
||||
void rlUpdateShaderBufferElements(unsigned int id, const void *data, unsigned long long dataSize, unsigned long long offset); // Update SSBO buffer data
|
||||
unsigned long long rlGetShaderBufferSize(unsigned int id); // Get SSBO buffer size
|
||||
void rlReadShaderBufferElements(unsigned int id, void *dest, unsigned long long count, unsigned long long offset); // Bind SSBO buffer
|
||||
void rlBindShaderBuffer(unsigned int id, unsigned int index); // Copy SSBO buffer data
|
||||
void rlUpdateShaderBuffer(unsigned int id, const void *data, unsigned int dataSize, unsigned int offset); // Update SSBO buffer data
|
||||
void rlBindShaderBuffer(unsigned int id, unsigned int index); // Bind SSBO buffer
|
||||
void rlReadShaderBuffer(unsigned int id, void *dest, unsigned int count, unsigned int offset); // Read SSBO buffer data (GPU->CPU)
|
||||
void rlCopyShaderBuffer(unsigned int destId, unsigned int srcId, unsigned int destOffset, unsigned int srcOffset, unsigned int count); // Copy SSBO data between buffers
|
||||
unsigned int rlGetShaderBufferSize(unsigned int id); // Get SSBO buffer size
|
||||
// Buffer management
|
||||
void rlCopyBuffersElements(unsigned int destId, unsigned int srcId, unsigned long long destOffset, unsigned long long srcOffset, unsigned long long count); // Copy SSBO buffer data
|
||||
void rlBindImageTexture(unsigned int id, unsigned int index, unsigned int format, int readonly); // Bind image texture
|
||||
void rlBindImageTexture(unsigned int id, unsigned int index, int format, bool readonly); // Bind image texture
|
||||
// Matrix state management
|
||||
Matrix rlGetMatrixModelview(void); // Get internal modelview matrix
|
||||
Matrix rlGetMatrixProjection(void); // Get internal projection matrix
|
||||
|
|
1
setup.py
1
setup.py
|
@ -30,6 +30,7 @@ setup(
|
|||
classifiers=[
|
||||
"License :: OSI Approved :: Eclipse Public License 2.0 (EPL-2.0)",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
|
|
|
@ -19,7 +19,6 @@ model = pr.load_model_from_mesh(mesh)
|
|||
model.materials.maps[pr.MaterialMapIndex.MATERIAL_MAP_ALBEDO].texture = texture
|
||||
|
||||
pr.unload_image(image)
|
||||
pr.set_camera_mode(camera, pr.CAMERA_ORBITAL)
|
||||
|
||||
pos = pr.get_mouse_position()
|
||||
ray = pr.get_mouse_ray(pos, camera)
|
||||
|
@ -27,7 +26,7 @@ ray = pr.get_mouse_ray(pos, camera)
|
|||
#print(str(rayhit.position.x))
|
||||
|
||||
while not pr.window_should_close():
|
||||
pr.update_camera(camera)
|
||||
pr.update_camera(camera, pr.CAMERA_ORBITAL)
|
||||
pr.begin_drawing()
|
||||
pr.clear_background(pr.RAYWHITE)
|
||||
pr.begin_mode_3d(camera)
|
||||
|
|
|
@ -19,7 +19,6 @@ model = load_model_from_mesh(mesh)
|
|||
model.materials.maps[MATERIAL_MAP_ALBEDO].texture = texture
|
||||
|
||||
unload_image(image)
|
||||
set_camera_mode(camera, CAMERA_ORBITAL)
|
||||
|
||||
pos = get_mouse_position()
|
||||
ray = get_mouse_ray(pos, camera)
|
||||
|
@ -27,7 +26,7 @@ ray = get_mouse_ray(pos, camera)
|
|||
#print(str(rayhit.position.x))
|
||||
|
||||
while not window_should_close():
|
||||
update_camera(camera)
|
||||
update_camera(camera, CAMERA_ORBITAL)
|
||||
begin_drawing()
|
||||
clear_background(RAYWHITE)
|
||||
begin_mode_3d(camera)
|
||||
|
|
|
@ -17,10 +17,9 @@ print(model.materials) # SHOULD BE A pointer to a 'struct Material' but some is
|
|||
model.materials.maps[rl.MATERIAL_MAP_ALBEDO].texture = texture
|
||||
|
||||
rl.UnloadImage(image)
|
||||
rl.SetCameraMode(camera[0], rl.CAMERA_ORBITAL)
|
||||
|
||||
while not rl.WindowShouldClose():
|
||||
rl.UpdateCamera(camera)
|
||||
rl.UpdateCamera(camera, rl.CAMERA_ORBITAL)
|
||||
rl.BeginDrawing()
|
||||
rl.ClearBackground(colors.RAYWHITE)
|
||||
rl.BeginMode3D(camera[0])
|
||||
|
|
|
@ -16,10 +16,9 @@ model = LoadModelFromMesh(mesh)
|
|||
model.materials.maps[MATERIAL_MAP_ALBEDO].texture = texture
|
||||
|
||||
UnloadImage(image)
|
||||
SetCameraMode(camera[0], CAMERA_ORBITAL)
|
||||
|
||||
while not WindowShouldClose():
|
||||
UpdateCamera(camera)
|
||||
UpdateCamera(camera, CAMERA_ORBITAL)
|
||||
BeginDrawing()
|
||||
ClearBackground(RAYWHITE)
|
||||
BeginMode3D(camera[0])
|
||||
|
|
|
@ -17,10 +17,9 @@ print(model.materials) # SHOULD BE A pointer to a 'struct Material' but some is
|
|||
model.materials.maps[rl.MATERIAL_MAP_ALBEDO].texture = texture
|
||||
|
||||
rl.UnloadImage(image)
|
||||
rl.SetCameraMode(camera[0], rl.CAMERA_ORBITAL)
|
||||
|
||||
while not rl.WindowShouldClose():
|
||||
rl.UpdateCamera(camera)
|
||||
rl.UpdateCamera(camera, rl.CAMERA_ORBITAL)
|
||||
rl.BeginDrawing()
|
||||
rl.ClearBackground(rl.RAYWHITE)
|
||||
rl.BeginMode3D(camera[0])
|
||||
|
|
|
@ -1 +1 @@
|
|||
__version__ = "4.2.1.2"
|
||||
__version__ = "4.5.0.0"
|
Reference in a new issue