| 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 199 of file fl_texture_registrar.cc.

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

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 183 of file fl_texture_registrar.cc.

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

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 208 of file fl_texture_registrar.cc.

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

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 };

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

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:133
unregister_texture
static gboolean unregister_texture(FlTextureRegistrar *registrar, FlTexture *texture)
Definition: fl_texture_registrar.cc:145
register_texture
static gboolean register_texture(FlTextureRegistrar *registrar, FlTexture *texture)
Definition: fl_texture_registrar.cc:92