Skip to content

Commit

Permalink
Update from slint-ui/slint
Browse files Browse the repository at this point in the history
Pull web demos and C++/Rust reference docs from commit 860014a8f1af97fe5ade5d81369c34e771147f78 (refs/heads/master)
  • Loading branch information
slint-team[bot] committed Sep 19, 2024
1 parent 50691e0 commit 8cf651d
Show file tree
Hide file tree
Showing 271 changed files with 586 additions and 551 deletions.
Binary file modified snapshots/master/demos/android/energy-monitor.apk
Binary file not shown.
Binary file modified snapshots/master/demos/android/todo_lib.apk
Binary file not shown.
Binary file modified snapshots/master/demos/carousel/pkg/carousel_bg.wasm
Binary file not shown.
Binary file modified snapshots/master/demos/energy-monitor/pkg/energy_monitor_bg.wasm
Binary file not shown.
6 changes: 3 additions & 3 deletions snapshots/master/demos/gallery/pkg/cosmic/gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,9 @@ function __wbg_get_imports() {
imports.wbg.__wbg_setfillStyle_98060f7b257936ba = function(arg0, arg1) {
getObject(arg0).fillStyle = getObject(arg1);
};
imports.wbg.__wbg_log_5766f8130e3dc687 = function(arg0, arg1) {
console.log(getStringFromWasm0(arg0, arg1));
};
imports.wbg.__wbg_naturalWidth_a29690dafff0d1ec = function(arg0) {
const ret = getObject(arg0).naturalWidth;
return ret;
Expand All @@ -1025,9 +1028,6 @@ function __wbg_get_imports() {
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
};
imports.wbg.__wbg_log_5766f8130e3dc687 = function(arg0, arg1) {
console.log(getStringFromWasm0(arg0, arg1));
};
imports.wbg.__wbg_cullFace_ccad99c645b704eb = function(arg0, arg1) {
getObject(arg0).cullFace(arg1 >>> 0);
};
Expand Down
Binary file modified snapshots/master/demos/gallery/pkg/cosmic/gallery_bg.wasm
Binary file not shown.
6 changes: 3 additions & 3 deletions snapshots/master/demos/gallery/pkg/cupertino/gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,9 @@ function __wbg_get_imports() {
imports.wbg.__wbg_setfillStyle_98060f7b257936ba = function(arg0, arg1) {
getObject(arg0).fillStyle = getObject(arg1);
};
imports.wbg.__wbg_log_5766f8130e3dc687 = function(arg0, arg1) {
console.log(getStringFromWasm0(arg0, arg1));
};
imports.wbg.__wbg_naturalWidth_a29690dafff0d1ec = function(arg0) {
const ret = getObject(arg0).naturalWidth;
return ret;
Expand All @@ -1025,9 +1028,6 @@ function __wbg_get_imports() {
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
};
imports.wbg.__wbg_log_5766f8130e3dc687 = function(arg0, arg1) {
console.log(getStringFromWasm0(arg0, arg1));
};
imports.wbg.__wbg_cullFace_ccad99c645b704eb = function(arg0, arg1) {
getObject(arg0).cullFace(arg1 >>> 0);
};
Expand Down
Binary file modified snapshots/master/demos/gallery/pkg/cupertino/gallery_bg.wasm
Binary file not shown.
6 changes: 3 additions & 3 deletions snapshots/master/demos/gallery/pkg/fluent/gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,9 @@ function __wbg_get_imports() {
imports.wbg.__wbg_setfillStyle_98060f7b257936ba = function(arg0, arg1) {
getObject(arg0).fillStyle = getObject(arg1);
};
imports.wbg.__wbg_log_5766f8130e3dc687 = function(arg0, arg1) {
console.log(getStringFromWasm0(arg0, arg1));
};
imports.wbg.__wbg_naturalWidth_a29690dafff0d1ec = function(arg0) {
const ret = getObject(arg0).naturalWidth;
return ret;
Expand All @@ -1025,9 +1028,6 @@ function __wbg_get_imports() {
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
};
imports.wbg.__wbg_log_5766f8130e3dc687 = function(arg0, arg1) {
console.log(getStringFromWasm0(arg0, arg1));
};
imports.wbg.__wbg_cullFace_ccad99c645b704eb = function(arg0, arg1) {
getObject(arg0).cullFace(arg1 >>> 0);
};
Expand Down
Binary file modified snapshots/master/demos/gallery/pkg/fluent/gallery_bg.wasm
Binary file not shown.
6 changes: 3 additions & 3 deletions snapshots/master/demos/gallery/pkg/material/gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,9 @@ function __wbg_get_imports() {
imports.wbg.__wbg_setfillStyle_98060f7b257936ba = function(arg0, arg1) {
getObject(arg0).fillStyle = getObject(arg1);
};
imports.wbg.__wbg_log_5766f8130e3dc687 = function(arg0, arg1) {
console.log(getStringFromWasm0(arg0, arg1));
};
imports.wbg.__wbg_naturalWidth_a29690dafff0d1ec = function(arg0) {
const ret = getObject(arg0).naturalWidth;
return ret;
Expand All @@ -1025,9 +1028,6 @@ function __wbg_get_imports() {
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
};
imports.wbg.__wbg_log_5766f8130e3dc687 = function(arg0, arg1) {
console.log(getStringFromWasm0(arg0, arg1));
};
imports.wbg.__wbg_cullFace_ccad99c645b704eb = function(arg0, arg1) {
getObject(arg0).cullFace(arg1 >>> 0);
};
Expand Down
Binary file modified snapshots/master/demos/gallery/pkg/material/gallery_bg.wasm
Binary file not shown.
Binary file modified snapshots/master/demos/imagefilter/pkg/imagefilter_bg.wasm
Binary file not shown.
Binary file modified snapshots/master/demos/memory/pkg/memory_bg.wasm
Binary file not shown.
Binary file modified snapshots/master/demos/opengl_underlay/pkg/opengl_underlay_bg.wasm
Binary file not shown.
Binary file modified snapshots/master/demos/plotter/pkg/plotter_bg.wasm
Binary file not shown.
Binary file modified snapshots/master/demos/printerdemo/pkg/printerdemo_lib_bg.wasm
Binary file not shown.
Binary file modified snapshots/master/demos/printerdemo_old/pkg/printerdemo_old_bg.wasm
Binary file not shown.
Binary file modified snapshots/master/demos/slide_puzzle/pkg/slide_puzzle_bg.wasm
Binary file not shown.
Binary file modified snapshots/master/demos/todo-mvc/pkg/todo_lib_mvc_bg.wasm
Binary file not shown.
Binary file modified snapshots/master/demos/todo/pkg/todo_lib_bg.wasm
Binary file not shown.
Binary file modified snapshots/master/demos/weather-demo/pkg/weather_demo_bg.wasm
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ Includes

- ``chrono``

- ``optional``

- ``slint_timer_internal.h`` (:ref:`file_cppdocs_generated_include_slint_timer_internal.h`)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ Program Listing for File slint_timer.h
#pragma once
#include <chrono>
#include <optional>
#include <slint_timer_internal.h>
namespace slint {
Expand Down Expand Up @@ -51,13 +49,9 @@ Program Listing for File slint_timer.h
void stop() { cbindgen_private::slint_timer_stop(id); }
void restart() { cbindgen_private::slint_timer_restart(id); }
bool running() const { return cbindgen_private::slint_timer_running(id); }
std::optional<std::chrono::milliseconds> interval() const
std::chrono::milliseconds interval() const
{
int64_t val = cbindgen_private::slint_timer_interval(id);
if (val < 0) {
return std::nullopt;
}
return std::chrono::milliseconds(val);
return std::chrono::milliseconds(cbindgen_private::slint_timer_interval(id));
}
template<std::invocable F>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Program Listing for File slint_enums.h
Left,
Right,
Middle,
Back,
Forward,
};
namespace testing {
enum class AccessibleRole {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -722,12 +722,12 @@ Program Listing for File slint_internal.h
using Instant = uint64_t;
struct SwipeGestureRecognizer {
struct SwipeGestureHandler {
Property<bool> enabled;
Property<bool> swipe_left;
Property<bool> swipe_right;
Property<bool> swipe_up;
Property<bool> swipe_down;
Property<bool> handle_swipe_left;
Property<bool> handle_swipe_right;
Property<bool> handle_swipe_up;
Property<bool> handle_swipe_down;
private_api::CallbackHelper<void> moved;
private_api::CallbackHelper<void> swiped;
private_api::CallbackHelper<void> cancelled;
Expand Down Expand Up @@ -1094,7 +1094,7 @@ Program Listing for File slint_internal.h
void send_keyboard_string_sequence(const SharedString *sequence,
const WindowAdapterRc *window_adapter);
int64_t slint_timer_interval(uintptr_t id);
uint64_t slint_timer_interval(uintptr_t id);
void slint_translate(SharedString *to_translate,
const SharedString *context,
Expand Down Expand Up @@ -1211,7 +1211,7 @@ Program Listing for File slint_internal.h
SLINT_DECL_ITEM(ClippedImage);
SLINT_DECL_ITEM(TouchArea);
SLINT_DECL_ITEM(FocusScope);
SLINT_DECL_ITEM(SwipeGestureRecognizer);
SLINT_DECL_ITEM(SwipeGestureHandler);
SLINT_DECL_ITEM(Flickable);
SLINT_DECL_ITEM(SimpleText);
SLINT_DECL_ITEM(ComplexText);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Program Listing for File slint_timer_internal.h
bool slint_timer_running(uintptr_t id);
int64_t slint_timer_interval(uintptr_t id);
uint64_t slint_timer_interval(uintptr_t id);
} // extern "C"
Expand Down
2 changes: 1 addition & 1 deletion snapshots/master/docs/cpp/_sources/getting_started.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ game.

## Template

You can clone the [Template Repository](https://github.com/slint-ui/slint-cpp-template) repository with
You can check out the [Slint C++ Template](https://github.com/slint-ui/slint-cpp-template) with
the code of a minimal C++ application using Slint. It provides a convenient starting point to a new program.

Of course you can also read on: We will cover some recipes to handle common
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ <h2>Enum Documentation<a class="headerlink" href="#enum-documentation" title="Pe
<dl class="cpp enumerator">
<dt class="sig sig-object cpp" id="_CPPv4N5slint18PointerEventButton5OtherE">
<span id="_CPPv3N5slint18PointerEventButton5OtherE"></span><span id="_CPPv2N5slint18PointerEventButton5OtherE"></span><span class="target" id="namespaceslint_1a88e5489a21965b1a271bf90ee12f1c6ea6311ae17c1ee52b36e68aaf4ad066387"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">Other</span></span></span><a class="headerlink" href="#_CPPv4N5slint18PointerEventButton5OtherE" title="Permalink to this definition"></a><br /></dt>
<dd><p>A button that is none of left, right or middle. For example this is used for a fourth button on a mouse with many buttons. </p>
<dd><p>A button that is none of left, right, middle, back or forward. For example, this is used for the task button on a mouse with many buttons. </p>
</dd></dl>

<dl class="cpp enumerator">
Expand All @@ -436,6 +436,18 @@ <h2>Enum Documentation<a class="headerlink" href="#enum-documentation" title="Pe
<dd><p>The center button. </p>
</dd></dl>

<dl class="cpp enumerator">
<dt class="sig sig-object cpp" id="_CPPv4N5slint18PointerEventButton4BackE">
<span id="_CPPv3N5slint18PointerEventButton4BackE"></span><span id="_CPPv2N5slint18PointerEventButton4BackE"></span><span class="target" id="namespaceslint_1a88e5489a21965b1a271bf90ee12f1c6ea0557fa923dcee4d0f86b1409f5c2167f"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">Back</span></span></span><a class="headerlink" href="#_CPPv4N5slint18PointerEventButton4BackE" title="Permalink to this definition"></a><br /></dt>
<dd><p>The back button. </p>
</dd></dl>

<dl class="cpp enumerator">
<dt class="sig sig-object cpp" id="_CPPv4N5slint18PointerEventButton7ForwardE">
<span id="_CPPv3N5slint18PointerEventButton7ForwardE"></span><span id="_CPPv2N5slint18PointerEventButton7ForwardE"></span><span class="target" id="namespaceslint_1a88e5489a21965b1a271bf90ee12f1c6ea67d2f6740a8eaebf4d5c6f79be8da481"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">Forward</span></span></span><a class="headerlink" href="#_CPPv4N5slint18PointerEventButton7ForwardE" title="Permalink to this definition"></a><br /></dt>
<dd><p>The forward button. </p>
</dd></dl>

</dd></dl>

</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@ <h2>Definition (<code class="docutils literal notranslate"><span class="pre">/ho
<h2>Includes<a class="headerlink" href="#includes" title="Permalink to this heading"></a></h2>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">chrono</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">optional</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">slint_timer_internal.h</span></code> (<a class="reference internal" href="file_cppdocs_generated_include_slint_timer_internal.h.html#file-cppdocs-generated-include-slint-timer-internal-h"><span class="std std-ref">File slint_timer_internal.h</span></a>)</p></li>
</ul>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,6 @@
<span class="cp">#pragma once</span>

<span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;chrono&gt;</span>

<span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;optional&gt;</span>
<span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;slint_timer_internal.h&gt;</span>

<span class="k">namespace</span><span class="w"> </span><span class="nn">slint</span><span class="w"> </span><span class="p">{</span>
Expand Down Expand Up @@ -444,13 +442,9 @@
<span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="n">stop</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">cbindgen_private</span><span class="o">::</span><span class="n">slint_timer_stop</span><span class="p">(</span><span class="n">id</span><span class="p">);</span><span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="n">restart</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">cbindgen_private</span><span class="o">::</span><span class="n">slint_timer_restart</span><span class="p">(</span><span class="n">id</span><span class="p">);</span><span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="kt">bool</span><span class="w"> </span><span class="n">running</span><span class="p">()</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">cbindgen_private</span><span class="o">::</span><span class="n">slint_timer_running</span><span class="p">(</span><span class="n">id</span><span class="p">);</span><span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">optional</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">chrono</span><span class="o">::</span><span class="n">milliseconds</span><span class="o">&gt;</span><span class="w"> </span><span class="n">interval</span><span class="p">()</span><span class="w"> </span><span class="k">const</span>
<span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">chrono</span><span class="o">::</span><span class="n">milliseconds</span><span class="w"> </span><span class="n">interval</span><span class="p">()</span><span class="w"> </span><span class="k">const</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="kt">int64_t</span><span class="w"> </span><span class="n">val</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cbindgen_private</span><span class="o">::</span><span class="n">slint_timer_interval</span><span class="p">(</span><span class="n">id</span><span class="p">);</span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">val</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">nullopt</span><span class="p">;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">chrono</span><span class="o">::</span><span class="n">milliseconds</span><span class="p">(</span><span class="n">val</span><span class="p">);</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">chrono</span><span class="o">::</span><span class="n">milliseconds</span><span class="p">(</span><span class="n">cbindgen_private</span><span class="o">::</span><span class="n">slint_timer_interval</span><span class="p">(</span><span class="n">id</span><span class="p">));</span>
<span class="w"> </span><span class="p">}</span>

<span class="w"> </span><span class="k">template</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">invocable</span><span class="w"> </span><span class="n">F</span><span class="o">&gt;</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,8 @@
<span class="w"> </span><span class="n">Left</span><span class="p">,</span>
<span class="w"> </span><span class="n">Right</span><span class="p">,</span>
<span class="w"> </span><span class="n">Middle</span><span class="p">,</span>
<span class="w"> </span><span class="n">Back</span><span class="p">,</span>
<span class="w"> </span><span class="n">Forward</span><span class="p">,</span>
<span class="p">};</span>
<span class="k">namespace</span><span class="w"> </span><span class="nn">testing</span><span class="w"> </span><span class="p">{</span>
<span class="k">enum</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">AccessibleRole</span><span class="w"> </span><span class="p">{</span>
Expand Down
Loading

0 comments on commit 8cf651d

Please sign in to comment.