RetroPixdata

RetroPixdata — A structure holding the video output from a RetroCore

Functions

Object Hierarchy

    GBoxed
    ╰── RetroPixdata

Includes

#include <retro-gtk/retro-gtk.h>

Description

The RetroPixdata structure holds the internal representation of a RetroCore's video output. To use the image, either convert it to a GdkPixbuf via retro_pixdata_to_pixbuf() or load it as an OpenGL texture via retro_pixdata_load_gl_texture().

The generated GdkPixbuf will store the intended aspect-ratio, you can access it via retro_pixbuf_get_aspect_ratio().

Functions

retro_pixdata_copy ()

RetroPixdata *
retro_pixdata_copy (RetroPixdata *self);

Copies self into a new RetroPixdata.

Parameters

self

a RetroPixdata

 

Returns

a new RetroPixdata, use retro_pixdata_free() to free it.

[transfer full]


retro_pixdata_free ()

void
retro_pixdata_free (RetroPixdata *self);

Frees the given RetroPixdata object.

Parameters

self

a RetroPixdata

 

retro_pixdata_get_width ()

gint
retro_pixdata_get_width (RetroPixdata *self);

Gets the width of self .

Parameters

self

a RetroCore

 

Returns

the width


retro_pixdata_get_height ()

gint
retro_pixdata_get_height (RetroPixdata *self);

Gets the height of self .

Parameters

self

a RetroCore

 

Returns

the height


retro_pixdata_get_aspect_ratio ()

gfloat
retro_pixdata_get_aspect_ratio (RetroPixdata *self);

Gets the aspect ratio the video should be rendered with.

Parameters

self

a RetroCore

 

Returns

the aspect ratio


retro_pixdata_to_pixbuf ()

GdkPixbuf *
retro_pixdata_to_pixbuf (RetroPixdata *self);

Creates a new GdkPixbuf from self .

The GdkPixbuf stores the intended aspect-ratio, you can access it via retro_pixbuf_get_aspect_ratio().

Parameters

self

the RetroPixdata

 

Returns

a new RetroPixdata.

[transfer full]


retro_pixdata_load_gl_texture ()

gboolean
retro_pixdata_load_gl_texture (RetroPixdata *self);

Loads an OpenGL texture from self .

Parameters

self

the RetroPixdata

 

Returns

whether the loading was successful

Types and Values

See Also

GdkPixbuf, RetroCoreView