Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/webview_flutter_lwe/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.5.3

* Update lightweight web engine (1.5.1).

## 0.5.2

* Update lightweight web engine (1.4.1).
Expand Down
2 changes: 1 addition & 1 deletion packages/webview_flutter_lwe/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This package is not an _endorsed_ implementation of `webview_flutter`. Therefore
```yaml
dependencies:
webview_flutter: ^4.13.1
webview_flutter_lwe: ^0.5.2
webview_flutter_lwe: ^0.5.3
```

## Example
Expand Down
2 changes: 1 addition & 1 deletion packages/webview_flutter_lwe/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: webview_flutter_lwe
description: Tizen implementation of the webview_flutter plugin backed by Lightweight Web Engine.
homepage: https://github.com/flutter-tizen/plugins
repository: https://github.com/flutter-tizen/plugins/tree/master/packages/webview_flutter_lwe
version: 0.5.2
version: 0.5.3

environment:
sdk: ^3.8.0
Expand Down
85 changes: 79 additions & 6 deletions packages/webview_flutter_lwe/tizen/inc/lwe/LWEWebView.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,39 @@ using LWEDelegateRef = std::unique_ptr<void, std::function<void(void*)>>;

namespace LWE {

/**
* \brief Initialize option bit-flags that can be combined with the | operator.
*
* Pass to LWE::Initialize to prefer specific runtime behaviors.
*/
enum class InitializeOption : uint32_t {
None = 0,
/**
* \brief Prefer running LWE on a separate thread instead of the process
* main thread. Some backends (e.g., flutter, uv_cairo_gl) always use a
* separate thread regardless of this flag.
*/
PreferSeparateThread = 1 << 0,
/**
* \brief Prefer using incremental garbage collection if the GC supports it.
*/
PreferIncrementalGC = 1 << 1,
};

inline InitializeOption operator|(InitializeOption a, InitializeOption b) {
return static_cast<InitializeOption>(static_cast<uint32_t>(a) |
static_cast<uint32_t>(b));
}

inline InitializeOption operator&(InitializeOption a, InitializeOption b) {
return static_cast<InitializeOption>(static_cast<uint32_t>(a) &
static_cast<uint32_t>(b));
}

inline InitializeOption operator~(InitializeOption a) {
return static_cast<InitializeOption>(~static_cast<uint32_t>(a));
}

/**
* \brief Perform initialization or cleanup of lightweight web engine.
*/
Expand All @@ -64,16 +97,29 @@ class LWE_EXPORT LWE {
* function before using WebContainer or WebView
*
* \code{.cpp}
* // Default: prefer main thread, no incremental GC
* LWE::LWE::Initialize("/tmp/Starfish_storage");
*
* // Prefer separate thread (may be ignored by some backends)
* LWE::LWE::Initialize("/tmp/Starfish_storage",
* LWE::InitializeOption::PreferSeparateThread);
*
* // Combine options with the | operator
* LWE::LWE::Initialize("/tmp/Starfish_storage",
* LWE::InitializeOption::PreferSeparateThread |
* LWE::InitializeOption::PreferIncrementalGC);
* \endcode
*
* \param storageDirectoryPath Directory path for storage.
*
* \param preferMainThread If true, LWE prefers to run on the process main
* thread. Default is true.
* \param option Bit-flag combination of InitializeOption values.
* Default is InitializeOption::None (prefer main thread, no incremental
* GC). Note: Some backends (e.g., flutter, uv_cairo_gl) always use a
* separate thread regardless of the PreferSeparateThread flag.
*
*/
static void Initialize(const char* storageDirectoryPath,
bool preferMainThread = true);
InitializeOption option = InitializeOption::None);

/**
* \brief Returns the initialization status of lightweight web engine.
Expand Down Expand Up @@ -113,6 +159,16 @@ class LWE_EXPORT LWE {
* \brief Returns LWE version number if the parameter is not null.
*/
static void GetVersion(int* major, int* minor, int* patch);

/**
* \brief Returns whether LWE is running on a separate thread.
*
* \return true if LWE is using a separate thread, false if running on the
* main thread.
*
* \remark Must be called after Initialize.
*/
static bool IsUsingSeparateThread();
};

#define LWE_DEFAULT_FONT_SIZE 16
Expand Down Expand Up @@ -402,14 +458,23 @@ class LWE_EXPORT WebContainer {
void DispatchMouseUpEvent(MouseButtonValue button, MouseButtonsValue buttons,
double x, double y);
void DispatchMouseWheelEvent(double x, double y, int delta);
// points: interleaved [x0,y0, x1,y1, ...], ids: per-point identifier,
// pointCount: number of touch points
void DispatchTouchStartEvent(const float* points, const int* ids,
size_t pointCount);
void DispatchTouchMoveEvent(const float* points, const int* ids,
size_t pointCount);
void DispatchTouchEndEvent(const float* points, const int* ids,
size_t pointCount);
void DispatchKeyDownEvent(KeyValue keyCode);
void DispatchKeyPressEvent(KeyValue keyCode);
void DispatchKeyUpEvent(KeyValue keyCode);

void DispatchCompositionStartEvent(const std::string& soFarCompositiedString);
void DispatchCompositionStartEvent(
const std::string& currentCompositionString);
void DispatchCompositionUpdateEvent(
const std::string& soFarCompositiedString);
void DispatchCompositionEndEvent(const std::string& soFarCompositiedString);
const std::string& currentCompositionString);
void DispatchCompositionEndEvent(const std::string& currentCompositionString);
void RegisterOnShowSoftwareKeyboardIfPossibleHandler(
const std::function<void(WebContainer*)>& cb);
void RegisterOnHideSoftwareKeyboardIfPossibleHandler(
Expand Down Expand Up @@ -974,6 +1039,14 @@ class LWE_EXPORT WebView {
*/
float GetDevicePixelRatio();

/**
* \brief Returns the WebContainer associated with this WebView.
*
* \return Pointer to the WebContainer. Owned by this WebView.
*
*/
WebContainer* FetchWebContainer();

private:
WebView();
~WebView();
Expand Down
Binary file modified packages/webview_flutter_lwe/tizen/lib/aarch64/libclipper.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified packages/webview_flutter_lwe/tizen/lib/aarch64/libmp4parse.so
Binary file not shown.
Binary file modified packages/webview_flutter_lwe/tizen/lib/aarch64/libskia_matrix.so
Binary file not shown.
Binary file modified packages/webview_flutter_lwe/tizen/lib/aarch64/libtuv.so
Binary file not shown.
Binary file modified packages/webview_flutter_lwe/tizen/lib/aarch64/libwebm.so
Binary file not shown.
Binary file modified packages/webview_flutter_lwe/tizen/lib/aarch64/libwebp_lwe.so
Binary file not shown.
Binary file not shown.
Binary file modified packages/webview_flutter_lwe/tizen/lib/armel/libclipper.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified packages/webview_flutter_lwe/tizen/lib/armel/libmp4parse.so
Binary file not shown.
Binary file modified packages/webview_flutter_lwe/tizen/lib/armel/libskia_matrix.so
Binary file not shown.
Binary file modified packages/webview_flutter_lwe/tizen/lib/armel/libtuv.so
Binary file not shown.
Binary file modified packages/webview_flutter_lwe/tizen/lib/armel/libwebm.so
Binary file not shown.
Binary file modified packages/webview_flutter_lwe/tizen/lib/armel/libwebp_lwe.so
Binary file not shown.
Binary file not shown.
Binary file modified packages/webview_flutter_lwe/tizen/lib/i586/libclipper.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified packages/webview_flutter_lwe/tizen/lib/i586/libmp4parse.so
Binary file not shown.
Binary file modified packages/webview_flutter_lwe/tizen/lib/i586/libskia_matrix.so
Binary file not shown.
Binary file modified packages/webview_flutter_lwe/tizen/lib/i586/libtuv.so
Binary file not shown.
Binary file modified packages/webview_flutter_lwe/tizen/lib/i586/libwebm.so
Binary file not shown.
Binary file modified packages/webview_flutter_lwe/tizen/lib/i586/libwebp_lwe.so
Binary file not shown.
Binary file modified packages/webview_flutter_lwe/tizen/lib/i586/libwebsockets_lwe.so
Binary file not shown.
Binary file modified packages/webview_flutter_lwe/tizen/lib/x86_64/libclipper.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified packages/webview_flutter_lwe/tizen/lib/x86_64/libmp4parse.so
Binary file not shown.
Binary file modified packages/webview_flutter_lwe/tizen/lib/x86_64/libskia_matrix.so
Binary file not shown.
Binary file modified packages/webview_flutter_lwe/tizen/lib/x86_64/libtuv.so
Binary file not shown.
Binary file modified packages/webview_flutter_lwe/tizen/lib/x86_64/libwebm.so
Binary file not shown.
Binary file modified packages/webview_flutter_lwe/tizen/lib/x86_64/libwebp_lwe.so
Binary file not shown.
Binary file not shown.
Loading