| Flutter Linux Embedder |

fl_application.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef FLUTTER_SHELL_PLATFORM_LINUX_PUBLIC_FLUTTER_LINUX_FL_APPLICATION_H_
6 #define FLUTTER_SHELL_PLATFORM_LINUX_PUBLIC_FLUTTER_LINUX_FL_APPLICATION_H_
7
8 #if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION)
9 #error "Only <flutter_linux/flutter_linux.h> can be included directly."
10 #endif
11
12 #include "fl_plugin_registry.h"
13 #include "fl_view.h"
14
15 #include <gmodule.h>
16 #include <gtk/gtk.h>
17
18 G_BEGIN_DECLS
19
20 G_MODULE_EXPORT
21 G_DECLARE_DERIVABLE_TYPE(FlApplication,
22 fl_application,
23 FL,
24 APPLICATION,
25 GtkApplication);
26
27 /**
28 * FlApplicationClass:
29 * @register_plugins: invoked when plugins should be registered.
30 */
31 struct _FlApplicationClass {
32 GtkApplicationClass parent_class;
33
34 /**
35 * FlApplication::register_plugins:
36 * @application: the application
37 * @registry: registry to use.
38 *
39 * The ::register_plugins signal is emitted when plugins can be registered.
40 */
41 void (*register_plugins)(FlApplication* application,
42 FlPluginRegistry* registry);
43
44 /**
45 * FlApplication::create_window:
46 * @application: the application
47 * @view: the view to add to this window.
48 *
49 * The ::create_window signal is emitted when a needs to be created for a
50 * view. By handling this signal the application can create the appropriate
51 * window for the given view and set any window properties or additional
52 * widgets required.
53 *
54 * If this signal is not handled a standard GTK window will be created.
55 */
56 GtkWindow* (*create_window)(FlApplication* application, FlView* view);
57 };
58
59 /**
60 * FlApplication:
61 *
62 * #Flutter-based application with the GTK embedder.
63 *
64 * Provides default behaviour for basic Flutter applications.
65 */
66
67 /**
68 * fl_application_new:
69 * @application_id: (allow-none): The application ID or %NULL.
70 * @flags: The application flags.
71 *
72 * Creates a new Flutter-based application.
73 *
74 * Returns: a new #FlApplication
75 */
76 FlApplication* fl_application_new(const gchar* application_id,
77 GApplicationFlags flags);
78
79 G_END_DECLS
80
81 #endif // FLUTTER_SHELL_PLATFORM_LINUX_PUBLIC_FLUTTER_LINUX_FL_APPLICATION_H_
fl_application_new
FlApplication * fl_application_new(const gchar *application_id, GApplicationFlags flags)
Definition: fl_application.cc:167
flags
FlutterSemanticsFlag flags
Definition: fl_accessible_node.cc:106
_FlApplicationClass
Definition: fl_application.h:31
_FlApplicationClass::parent_class
GtkApplicationClass parent_class
Definition: fl_application.h:32
_FlApplicationClass::register_plugins
void(* register_plugins)(FlApplication *application, FlPluginRegistry *registry)
Definition: fl_application.h:41
FL
FL
Definition: fl_binary_messenger.cc:27
fl_view.h
view
FlView * view
Definition: fl_application.cc:35
fl_plugin_registry.h
G_DECLARE_DERIVABLE_TYPE
G_BEGIN_DECLS G_MODULE_EXPORT G_DECLARE_DERIVABLE_TYPE(FlApplication, fl_application, FL, APPLICATION, GtkApplication)