Flutter Linux Embedder
fl_texture.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_TEXTURE_H_
6 #define FLUTTER_SHELL_PLATFORM_LINUX_PUBLIC_FLUTTER_LINUX_FL_TEXTURE_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 <glib-object.h>
13 #include <gmodule.h>
14 #include <stdint.h>
15 
16 G_BEGIN_DECLS
17 
18 G_MODULE_EXPORT
19 G_DECLARE_INTERFACE(FlTexture, fl_texture, FL, TEXTURE, GObject)
20 
21 /**
22  * FlTexture:
23  *
24  * #FlTexture represents a texture.
25  *
26  * You can derive #FlTextureGL for populating hardware-accelerated textures or
27  * instantiate #FlPixelBufferTexture for populating pixel buffers. Do NOT
28  * directly implement this interface.
29  */
30 
32  GTypeInterface g_iface;
33 
34  void (*set_id)(FlTexture* texture, int64_t id);
35 
36  int64_t (*get_id)(FlTexture* texture);
37 };
38 
39 /**
40  * fl_texture_get_id:
41  * @texture: a #FlTexture.
42  *
43  * Get the ID for this texture, which can be passed to Flutter code to refer to
44  * this texture.
45  *
46  * Returns: a texture ID.
47  */
48 int64_t fl_texture_get_id(FlTexture* texture);
49 
50 G_END_DECLS
51 
52 #endif // FLUTTER_SHELL_PLATFORM_LINUX_PUBLIC_FLUTTER_LINUX_FL_TEXTURE_H_
_FlTextureInterface::g_iface
GTypeInterface g_iface
Definition: fl_texture.h:32
id
int64_t id
Definition: fl_pixel_buffer_texture.cc:28
G_DECLARE_INTERFACE
G_DECLARE_INTERFACE(FlKeyResponder, fl_key_responder, FL, KEY_RESPONDER, GObject)
fl_texture_get_id
int64_t fl_texture_get_id(FlTexture *texture)
Definition: fl_texture.cc:20
_FlTextureInterface
Definition: fl_texture.h:31
FL
FL
Definition: fl_binary_messenger.cc:27