cursor-sprite: Add API to get dimension
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1136
This commit is contained in:
parent
32c99513c8
commit
3c157242fa
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user