101 Commits

Author SHA1 Message Date
Robert Ancell
e39301f23f
Add tests for FlBinaryMessenger, FlBasicMessageChannel, FlMethodChannel (#18638) 2020-06-02 09:39:37 +12:00
Robert Ancell
8c8c7b06d0
Fix FlValue functions not marked for export (#18641) 2020-06-02 09:38:10 +12:00
Robert Ancell
c86dcac156 Revert "Add tests for FlBinaryMessenger, FlBasicMessageChannel, FlMethodChannel (#18597)"
This reverts commit a095cc23d8d5a539fd6179846875d7218c60bdff.
2020-05-28 13:32:26 +12:00
Robert Ancell
a095cc23d8
Add tests for FlBinaryMessenger, FlBasicMessageChannel, FlMethodChannel (#18597)
* Add mock implementations of the Flutter embedding API and EGL
* Add tests for FlBinaryMessenger, FlBasicMessageChannel, FlMethodChannel
2020-05-28 13:13:32 +12:00
Robert Ancell
2bd95d9a4c
Add FlTextInputPlugin (#18314)
* Add FlTextInputPlugin
2020-05-28 13:11:16 +12:00
Robert Ancell
63ed5b1bbd
Add FlPluginRegistry and FlPluginRegistrar (#18453)
* Add FlPluginRegistry and FlPluginRegistrar
2020-05-27 13:39:48 +12:00
Robert Ancell
79b136534a
Add GDestroyNotify callbacks on handlers (#18546) 2020-05-27 13:38:45 +12:00
Robert Ancell
17d1dc7ec5
Show error details in method channel response error messages (#18571) 2020-05-27 09:17:55 +12:00
Robert Ancell
363050d4f6
Fix wrong method name - copy/paste error from FlBinaryMessenger (#18596) 2020-05-27 09:17:16 +12:00
Robert Ancell
680eb90a42
Add fl_value_to_string (#18540) 2020-05-22 10:57:21 +12:00
Robert Ancell
72f7a7c4ea
Add FlKeyEventPlugin (#18313) 2020-05-21 16:08:56 +12:00
Robert Ancell
e48ad6ec73
Add FlMethodChannel, FlMethodCodec, FlStandardMethodCodec and FlJsonMethodCodec (#18220)
* Add FlMethodChannel, FlMethodCall, FlMethodResponse and FlMethodCodec

* Add FlJsonMethodCodec

* Add FlStandardMethodCodec
2020-05-21 12:53:15 +12:00
Robert Ancell
52a11ee411
Make FlBasicMessageChannelResponseHandle a GObject to detect unresponded and double responded messages. (#18514) 2020-05-21 11:15:56 +12:00
Robert Ancell
784e5d7ded
Update comments for grammar and content to required style (#18491) 2020-05-20 09:14:28 +12:00
Robert Ancell
69d7200c48
Rename NULL tests to Nullptr for consistency (#18359) 2020-05-15 15:00:11 +12:00
Robert Ancell
47707965b4
Fix incorrect header for #FlBasicMessageChannel::respond (#18365) 2020-05-15 09:19:00 +12:00
Robert Ancell
5ad4f9ee4a
Add FlJsonMessageCodec (#18221) 2020-05-14 13:49:40 +12:00
Robert Ancell
960035462a
Add FlBasicMessageChannel (#18189) 2020-05-14 12:09:32 +12:00
Robert Ancell
f321613e5a
Add guards on FlValue methods to check for NULL values (#18226) 2020-05-14 09:02:51 +12:00
Robert Ancell
7b6406720a
Use 'message' as the parameter name in FlMessageCodec::encode_message (#18253)
This is more consistent with the Dart code.
2020-05-13 16:55:20 +12:00
Robert Ancell
2f6bcdeb94
Add FlStandardMessageCodec (#18213) 2020-05-12 11:09:21 +12:00
Robert Ancell
72a48bd6ee
Fix incorrect declaration of FlBinaryCodec (#18283) 2020-05-12 09:58:47 +12:00
Robert Ancell
044f2542d4
Use the term 'handler' for registering callbacks. (#18269)
This is the term used in the Dart code and which callback is more commonly used
in GLib matching the Dart code will make developers life easier.
2020-05-12 09:01:10 +12:00
Robert Ancell
ccfec72798
Fix grammar in FlBinaryCodec/FlStringCodec descriptions (#18268) 2020-05-12 09:00:36 +12:00
Robert Ancell
9ea2db5bac
Add FlMessageCodec, FlBinaryCodec, FlStringCodec (#18186)
Classs for binary message encoding/decoding that matches the ones in the Flutter services library.
2020-05-08 16:13:54 +12:00
Robert Ancell
403931ff22
Add FlValue (#18185)
FlValue is a lightweight object used to contain the value types that Flutter
uses on platform channels.
2020-05-08 13:48:41 +12:00
Robert Ancell
e5a7ca577d
Handle leak of message handle when no engine present (#18157)
* Handle leak of message handle when no engine present
* Move callback in wrong location
2020-05-08 09:05:20 +12:00
Robert Ancell
805a8874cb
Add first Linux shell tests (#18159) 2020-05-06 15:33:11 +12:00
Robert Ancell
95ecd9a405
Move G_END_DECLS that was in the wrong place (#18116) 2020-05-05 09:11:57 +12:00
Robert Ancell
180a497ee5
Support platform messages in Linux shell (#17995) 2020-05-04 17:03:04 +12:00
Robert Ancell
ae96c36c55
Replace usage of NULL with nullptr to match coding style (#18023) 2020-04-29 13:26:27 -07:00
Robert Ancell
34f516b016
Use g_warning instead of stderr (#17994) 2020-04-29 15:13:29 +12:00
Robert Ancell
fda26fc70f
Run Flutter platform tasks in GLib main loop (#17910)
Fixes https://github.com/flutter/flutter/issues/54856
2020-04-29 09:13:58 +12:00
Robert Ancell
9ece5ba789
Fix units used in Linux shell timestamps. (#17912)
GTK uses timestamps in milliseconds, Flutter wants them in microseconds.
2020-04-24 13:30:34 +12:00
Robert Ancell
12012f135c
Refactor FlutterEngine usage in Linux shell (#17363) 2020-04-24 10:30:41 +12:00
Robert Ancell
1dba1ef1f8
Add pointer events to the Linux shell (#17304) 2020-04-21 11:27:13 +12:00
stuartmorgan
dfe13788ed
Adjust the GLFW build options (#17704)
- Adds an explicit option for not building the GLFW embedding.
- Disables GLFW by default on Windows, where it's no longer the
  uploaded embedding.
- Moves the X11 pkg-config, which is only used by the GLFW embedding,
  behind the GLFW build flag.
2020-04-14 12:45:21 -07:00
Robert Ancell
b360eab6f7
Move Linux shell docstrings to headers (#17410)
Update docstrings for typos and grammar style specified in the style guide.
2020-04-14 15:41:23 +12:00
stuartmorgan
71d8edb13a
Always build GTK shell (#17634) 2020-04-11 11:50:03 -07:00
Robert Ancell
6befd4a804
Update FlDartProject to new path format (#17302)
Matches the structure used on Windows of assuming a directory format.
2020-03-31 15:25:44 -07:00
Robert Ancell
c93b67aa81
Add a Linux Shell that uses GTK for rendering. (#16977) 2020-03-24 13:26:02 -07:00
Greg Spencer
8ff6948e23
Make GetDefaultFontFamilies return a vector<string> instead of… (#16928)
On Linux, there is rarely just one default font that can reasonably be expected to be on the platform. This PR changes the GetDefaultFontFamily call to be GetDefaultFontFamilies, and it now returns a vector<string> so that the font collection code can look up all of them, and if any of them exist, add them to the fallback list.

For Linux, I supplied the list "Ubuntu", "Cantarell", "DejaVu Sans", "Liberation Sans", and "Arial", which should cover a large proportion of linux machines. For the other platforms, I supplied a list of length one, containing the one fallback font that used to be defined. On Windows, I added "Segoe UI" as a default, since that is the default system font on newer Windows.

The goal of this function is to provide at least one font family that is installed, since otherwise linux (or any platform) will just have no font at all if the default font isn't found.
2020-03-05 00:45:53 +01:00
Chinmay Garde
f7b78e001d
Remove all uses of the redundant flutter_root variable. (#16311)
This was only necessary when the Engine had to build in multiple buildroots
where the sources where checked out at different paths relative to the
buildroot. This is no longer the case and there are already cases GN rules
have been written that mix and match variable usage with the direct
specification of the path to the Flutter sources relative to the sole buildroot.
2020-01-31 21:49:48 -08:00
stuartmorgan
fa161274fb
Switch to an incremental runloop for GLFW (#11368)
Rather than running the runloop forever, have the API expose an incremental runloop. This allows clients to do other processing if they need it.

This allows for removing the odd construction of having knowledge of GTK event handling built into the library even though nothing in the library uses it; instead runner applications that use GTK plugins (such as FDE's testbed) can do that processing at the application level instead.
2019-08-22 11:39:00 -07:00
stuartmorgan
9f8b1d223e
Clean up Windows and Linux build output (#11324)
Final portion of reworking the names of the Linux and Windows desktop build outputs.

See flutter/flutter#38589
2019-08-21 05:53:38 -07:00
stuartmorgan
f1560e6c6e
Add _glfw versions of the GLFW desktop libraries (#11024)
Part of restructuring the artifacts to support transitioning away from
GLFW embeddings on desktop.

https://github.com/flutter/flutter/issues/38589
2019-08-15 14:41:15 -07:00
James Clarke
ff484d4f69 [Windows] Alternative Windows shell platform implementation (#9835)
Start work on flutter/flutter#30726 by adding an alternative win32 shell platform implementation for Windows that is not based on GLFW and that uses LIBANGLE for rendering and native win32 windowing and input. This change does not replace the GLFW implementation but rather runs side by side with it producing a secondary flutter_windows_win32.dll artifact. The following items must be added to attain parity with the GLFW implementation:
- Custom task scheduling
- Support for keyboard modifier keys
- Async texture uploads
- Correct high DPI handling on Windows versions < 1703
and will be added in subsequent changes.
2019-08-14 15:52:52 -07:00
Jason Simmons
6aaf5b38df
Build the GLFW shell on Linux host builds but not target builds (#9320)
Linux targets building the embedder library may be targeting environments
that do not support GLFW and GTK.
2019-06-13 16:22:33 -07:00
stuartmorgan
8412c199a5
Enable Linux shell build (#8233)
Enables building of the GLFW shell and the related unit tests.
2019-03-29 16:34:02 -04:00
Chinmay Garde
a1a2129bc4
GN Format all files in the engine. (#8369) 2019-03-29 12:44:57 -07:00