| Flutter Linux Embedder |

fl_renderable.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_RENDERABLE_H_
6 #define FLUTTER_SHELL_PLATFORM_LINUX_FL_RENDERABLE_H_
7
8 #include <gdk/gdk.h>
9
10 #include "flutter/shell/platform/embedder/embedder.h"
11
12 G_BEGIN_DECLS
13
14 G_DECLARE_INTERFACE(FlRenderable, fl_renderable, FL, RENDERABLE, GObject);
15
16 /**
17 * FlRenderable:
18 *
19 * An interface for a class that can render views from #FlRenderer.
20 *
21 * This interface is typically implemented by #FlView and is provided to make
22 * #FlRenderer easier to test.
23 */
24
25 struct _FlRenderableInterface {
26 GTypeInterface g_iface;
27
28 void (*redraw)(FlRenderable* renderable);
29 void (*make_current)(FlRenderable* renderable);
30 };
31
32 /**
33 * fl_renderable_redraw:
34 * @renderable: an #FlRenderable
35 *
36 * Indicate the renderable needs to redraw. When ready, the renderable should
37 * call fl_compositor_draw().
38 */
39 void fl_renderable_redraw(FlRenderable* renderable);
40
41 /**
42 * fl_renderable_make_current:
43 * @renderable: an #FlRenderable
44 *
45 * Make this renderable the current OpenGL context.
46 */
47 void fl_renderable_make_current(FlRenderable* renderable);
48
49 G_END_DECLS
50
51 #endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_RENDERABLE_H_
FL
FL
Definition: fl_binary_messenger.cc:27
fl_renderable_make_current
void fl_renderable_make_current(FlRenderable *renderable)
Definition: fl_renderable.cc:17
fl_renderable_redraw
void fl_renderable_redraw(FlRenderable *renderable)
Definition: fl_renderable.cc:11
G_DECLARE_INTERFACE
G_BEGIN_DECLS G_DECLARE_INTERFACE(FlRenderable, fl_renderable, FL, RENDERABLE, GObject)
_FlRenderableInterface
Definition: fl_renderable.h:25
_FlRenderableInterface::redraw
void(* redraw)(FlRenderable *renderable)
Definition: fl_renderable.h:28
_FlRenderableInterface::make_current
void(* make_current)(FlRenderable *renderable)
Definition: fl_renderable.h:29
_FlRenderableInterface::g_iface
GTypeInterface g_iface
Definition: fl_renderable.h:26