| Flutter Linux Embedder |

fl_renderer_gdk.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_FL_RENDERER_GDK_H_
6 #define FLUTTER_SHELL_PLATFORM_LINUX_FL_RENDERER_GDK_H_
7
8 #include "flutter/shell/platform/linux/fl_renderer.h"
9
10 G_BEGIN_DECLS
11
12 G_DECLARE_FINAL_TYPE(FlRendererGdk,
13 fl_renderer_gdk,
14 FL,
15 RENDERER_GDK,
16 FlRenderer)
17
18 /**
19 * FlRendererGdk:
20 *
21 * #FlRendererGdk is an implementation of #FlRenderer that renders by OpenGL ES.
22 */
23
24 /**
25 * fl_renderer_gdk_new:
26 *
27 * Creates an object that allows Flutter to render by OpenGL ES.
28 *
29 * Returns: a new #FlRendererGdk.
30 */
31 FlRendererGdk* fl_renderer_gdk_new();
32
33 /**
34 * fl_renderer_gdk_set_window:
35 * @renderer: an #FlRendererGdk.
36 * @window: the window that is being rendered on.
37 *
38 * Set the window that is being rendered on. This is only called once when the
39 * window is available.
40 */
41 void fl_renderer_gdk_set_window(FlRendererGdk* renderer, GdkWindow* window);
42
43 /**
44 * fl_renderer_gdk_create_contexts:
45 * @renderer: an #FlRendererGdk.
46 * @error: (allow-none): #GError location to store the error occurring, or
47 * %NULL to ignore.
48 *
49 * Create rendering contexts.
50 *
51 * Returns: %TRUE if contexts were created, %FALSE if there was an error.
52 */
53 gboolean fl_renderer_gdk_create_contexts(FlRendererGdk* renderer,
54 GError** error);
55
56 /**
57 * fl_renderer_gdk_get_context:
58 * @renderer: an #FlRendererGdk.
59 *
60 * Returns: the main context used for rendering.
61 */
62 GdkGLContext* fl_renderer_gdk_get_context(FlRendererGdk* renderer);
63
64 G_END_DECLS
65
66 #endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_RENDERER_GDK_H_
fl_renderer.h
FL
FL
Definition: fl_binary_messenger.cc:27
fl_renderer_gdk_set_window
void fl_renderer_gdk_set_window(FlRendererGdk *renderer, GdkWindow *window)
Definition: fl_renderer_gdk.cc:88
error
const uint8_t uint32_t uint32_t GError ** error
Definition: fl_pixel_buffer_texture_test.cc:40
fl_renderer_gdk_new
FlRendererGdk * fl_renderer_gdk_new()
Definition: fl_renderer_gdk.cc:82
fl_renderer_gdk_create_contexts
gboolean fl_renderer_gdk_create_contexts(FlRendererGdk *renderer, GError **error)
Definition: fl_renderer_gdk.cc:95
fl_renderer_gdk_get_context
GdkGLContext * fl_renderer_gdk_get_context(FlRendererGdk *renderer)
Definition: fl_renderer_gdk.cc:125
G_DECLARE_FINAL_TYPE
G_BEGIN_DECLS G_DECLARE_FINAL_TYPE(FlRendererGdk, fl_renderer_gdk, FL, RENDERER_GDK, FlRenderer) FlRendererGdk *fl_renderer_gdk_new()