| Flutter Linux Embedder |

Functions
fl_texture_registrar.h File Reference
`#include <glib-object.h>`
`#include <gmodule.h>`
`#include <stdint.h>`
`#include "fl_texture.h"`

Go to the source code of this file.

## Functions
G_BEGIN_DECLS G_MODULE_EXPORT | G_DECLARE_INTERFACE (FlTextureRegistrar, fl_texture_registrar, FL, TEXTURE_REGISTRAR, GObject) struct _FlTextureRegistrarInterface
gboolean | fl_texture_registrar_register_texture (FlTextureRegistrar *registrar, FlTexture *texture)
gboolean | fl_texture_registrar_mark_texture_frame_available (FlTextureRegistrar *registrar, FlTexture *texture)
gboolean | fl_texture_registrar_unregister_texture (FlTextureRegistrar *registrar, FlTexture *texture)

## Function Documentation

## ◆ fl_texture_registrar_mark_texture_frame_available()

gboolean fl_texture_registrar_mark_texture_frame_available | ( | FlTextureRegistrar * | registrar,
|  | FlTexture * | texture
| ) |  |

fl_texture_registrar_mark_texture_frame_available: @registrar: an #FlTextureRegistrar. @texture: the texture that has a frame available.

Notifies the flutter engine that the texture object has updated and needs to be rerendered.

Returns: TRUE on success.

Definition at line 197 of file fl_texture_registrar.cc.

199 {
200 g_return_val_if_fail(FL_IS_TEXTURE_REGISTRAR(self), FALSE);
201
202 return FL_TEXTURE_REGISTRAR_GET_IFACE(self)->mark_texture_frame_available(
203 self, texture);
204 }

Referenced by TEST().

## ◆ fl_texture_registrar_register_texture()

gboolean fl_texture_registrar_register_texture | ( | FlTextureRegistrar * | registrar,
|  | FlTexture * | texture
| ) |  |

FlTextureRegistrar:

#FlTextureRegistrar is used when registering textures.

Flutter Framework accesses your texture by the related unique texture ID. To draw your texture in Dart, you should add Texture widget in your widget tree with the same texture ID. Use platform channels to send this unique texture ID to the Dart side. fl_texture_registrar_register_texture: @registrar: an #FlTextureRegistrar. @texture: an #FlTexture for registration.

Registers a texture.

Returns: TRUE on success.

Definition at line 181 of file fl_texture_registrar.cc.

183 {
184 g_return_val_if_fail(FL_IS_TEXTURE_REGISTRAR(self), FALSE);
185 g_return_val_if_fail(FL_IS_TEXTURE(texture), FALSE);
186
187 return FL_TEXTURE_REGISTRAR_GET_IFACE(self)->register_texture(self, texture);
188 }

Referenced by add_mock_texture_to_registrar(), and TEST().

## ◆ fl_texture_registrar_unregister_texture()

gboolean fl_texture_registrar_unregister_texture | ( | FlTextureRegistrar * | registrar,
|  | FlTexture * | texture
| ) |  |

fl_texture_registrar_unregister_texture: @registrar: an #FlTextureRegistrar. @texture: the texture being unregistered.

Unregisters an existing texture object.

Returns: TRUE on success.

Definition at line 206 of file fl_texture_registrar.cc.

208 {
209 g_return_val_if_fail(FL_IS_TEXTURE_REGISTRAR(self), FALSE);
210
211 return FL_TEXTURE_REGISTRAR_GET_IFACE(self)->unregister_texture(self,
212 texture);
213 }

Referenced by TEST().

## ◆ G_DECLARE_INTERFACE()

G_BEGIN_DECLS G_MODULE_EXPORT G_DECLARE_INTERFACE | ( | FlTextureRegistrar | ,
|  | fl_texture_registrar | ,
|  | FL | ,
|  | TEXTURE_REGISTRAR | ,
|  | GObject |
| ) |  |

Definition at line 21 of file fl_texture_registrar.h.

27 {
28 GTypeInterface parent_iface;
29
30 gboolean (*register_texture)(FlTextureRegistrar* registrar,
31 FlTexture* texture);
32
33 FlTexture* (*lookup_texture)(FlTextureRegistrar* registrar, int64_t id);
34
35 gboolean (*mark_texture_frame_available)(FlTextureRegistrar* registrar,
36 FlTexture* texture);
37
38 gboolean (*unregister_texture)(FlTextureRegistrar* registrar,
39 FlTexture* texture);
40
41 void (*shutdown)(FlTextureRegistrar* registrar);
42 };

References id, mark_texture_frame_available(), register_texture(), shutdown(), and unregister_texture().

shutdown
static void shutdown(FlBinaryMessenger *messenger)
Definition: fl_binary_messenger.cc:367
id
int64_t id
Definition: fl_pixel_buffer_texture.cc:28
mark_texture_frame_available
static gboolean mark_texture_frame_available(FlTextureRegistrar *registrar, FlTexture *texture)
Definition: fl_texture_registrar.cc:117
unregister_texture
static gboolean unregister_texture(FlTextureRegistrar *registrar, FlTexture *texture)
Definition: fl_texture_registrar.cc:130
register_texture
static gboolean register_texture(FlTextureRegistrar *registrar, FlTexture *texture)
Definition: fl_texture_registrar.cc:75