cursor-sprite: Add API to get dimension

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1136
This commit is contained in:
Jonas Ådahl 2020-03-19 08:58:52 +01:00 committed by Carlos Garnacho
parent 32c99513c8
commit 3c157242fa
2 changed files with 22 additions and 0 deletions

View File

@ -142,6 +142,24 @@ meta_cursor_sprite_get_hotspot (MetaCursorSprite *sprite,
*hot_y = priv->hot_y;
}
int
meta_cursor_sprite_get_width (MetaCursorSprite *sprite)
{
CoglTexture *texture;
texture = meta_cursor_sprite_get_cogl_texture (sprite);
return cogl_texture_get_width (texture);
}
int
meta_cursor_sprite_get_height (MetaCursorSprite *sprite)
{
CoglTexture *texture;
texture = meta_cursor_sprite_get_cogl_texture (sprite);
return cogl_texture_get_height (texture);
}
float
meta_cursor_sprite_get_texture_scale (MetaCursorSprite *sprite)
{

View File

@ -67,6 +67,10 @@ void meta_cursor_sprite_get_hotspot (MetaCursorSprite *sprite,
int *hot_x,
int *hot_y);
int meta_cursor_sprite_get_width (MetaCursorSprite *sprite);
int meta_cursor_sprite_get_height (MetaCursorSprite *sprite);
float meta_cursor_sprite_get_texture_scale (MetaCursorSprite *sprite);
MetaMonitorTransform meta_cursor_sprite_get_texture_transform (MetaCursorSprite *sprite);