Robert Ancell
d6415a16c7
Make FlApplication class (flutter/engine#54637)
An app can now be:
```c
#include <flutter_linux/flutter_linux.h>
#include "flutter/generated_plugin_registrant.h"
static void register_plugins_cb(FlApplication *app, FlPluginRegistry *registry) {
fl_register_plugins(registry);
}
static GtkWindow *create_window_cb(FlApplication *app, FlView *view) {
GtkApplicationWindow *window =
GTK_APPLICATION_WINDOW(gtk_application_window_new(GTK_APPLICATION(app)));
gtk_window_set_title(GTK_WINDOW(window), "flutter_application_test");
gtk_window_set_default_size(GTK_WINDOW(window), 1280, 720);
gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
return GTK_WINDOW(window);
}
int main(int argc, char** argv) {
g_autoptr(FlApplication) app = fl_application_new(APPLICATION_ID, G_APPLICATION_NON_UNIQUE);
g_signal_connect(app, "register-plugins", G_CALLBACK(register_plugins_cb), nullptr);
g_signal_connect(app, "create-window", G_CALLBACK(create_window_cb), nullptr);
return g_application_run(G_APPLICATION(app), argc, argv);
}
```
With this simplified, we can now build multi-window behaviour without having to modify the template much in the future.
Fixes https://github.com/flutter/flutter/issues/142920
2024-09-03 16:02:21 +12:00
..
2024-09-03 16:02:21 +12:00
2024-08-20 08:00:06 +12:00
2024-05-16 22:01:38 +00:00
2024-09-03 16:02:21 +12:00
2024-05-30 17:15:53 +00:00
2024-08-27 15:43:13 +12:00
2024-09-03 16:02:21 +12:00
2024-09-03 16:02:21 +12:00
2024-07-19 14:36:32 +12:00
2024-07-02 17:18:07 +12:00
2024-07-19 14:36:32 +12:00
2024-07-02 17:18:07 +12:00
2024-07-25 19:45:37 +12:00
2024-07-24 04:57:12 +12:00
2024-07-25 19:45:37 +12:00
2024-07-25 19:45:37 +12:00
2024-05-16 22:01:38 +00:00
2024-07-24 18:55:36 +12:00
2024-07-24 18:55:36 +12:00
2024-08-27 15:43:13 +12:00
2024-02-13 12:26:46 +13:00
2024-07-19 12:44:41 +12:00
2024-07-19 12:44:41 +12:00
2024-07-19 12:44:41 +12:00
2024-02-13 12:26:46 +13:00
2024-01-12 23:08:52 +00:00
2024-07-19 12:44:41 +12:00
2024-02-13 12:19:29 +13:00
2024-07-19 12:44:41 +12:00
2024-07-19 12:44:41 +12:00
2024-07-19 12:44:41 +12:00
2024-07-19 12:44:41 +12:00
2024-07-19 12:44:41 +12:00
2024-07-19 12:44:41 +12:00
2024-05-16 22:01:38 +00:00
2024-07-19 14:36:32 +12:00
2024-07-19 12:44:41 +12:00
2024-07-19 12:44:41 +12:00
2024-07-19 12:44:41 +12:00
2024-07-19 12:44:41 +12:00
2024-07-19 12:44:41 +12:00
2024-07-02 17:18:07 +12:00
2024-07-02 17:18:07 +12:00
2024-05-28 12:38:07 +12:00
2024-08-27 20:28:05 +12:00
2024-08-27 20:28:05 +12:00
2024-08-27 20:28:05 +12:00
2024-06-10 22:35:55 +00:00
2024-06-10 22:35:55 +00:00
2024-02-28 09:06:20 +13:00
2024-06-10 22:35:55 +00:00
2024-06-10 22:35:55 +00:00
2024-07-19 12:44:41 +12:00
2024-07-19 12:44:41 +12:00
2024-07-19 12:44:41 +12:00
2024-08-27 15:43:13 +12:00
2023-11-21 13:39:18 -08:00
2024-04-29 09:34:20 +12:00
2024-04-29 09:34:20 +12:00
2024-01-25 09:29:54 +13:00
2024-05-16 22:01:38 +00:00
2024-03-25 14:06:27 +13:00
2024-03-25 14:06:27 +13:00
2024-07-02 17:18:07 +12:00
2024-07-19 12:44:41 +12:00
2024-07-19 12:44:41 +12:00
2024-07-19 12:44:41 +12:00
2024-07-19 12:44:41 +12:00
2024-07-02 17:18:07 +12:00
2024-03-06 20:27:00 +00:00
2024-07-02 17:18:07 +12:00
2024-01-25 09:29:54 +13:00
2024-03-04 15:05:41 +13:00
2024-04-29 09:34:20 +12:00
2024-08-27 15:43:13 +12:00
2024-04-29 09:34:20 +12:00
2024-03-01 10:24:11 +13:00
2024-07-02 17:18:07 +12:00
2024-08-27 20:28:05 +12:00
2024-07-23 22:47:56 +12:00
2024-07-23 22:47:56 +12:00
2024-07-23 22:47:56 +12:00
2024-07-19 12:44:41 +12:00