mtk/rectangle: Add constructor for an empty rectangle
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3703>
This commit is contained in:
parent
1f82365021
commit
3091449298
2 changed files with 9 additions and 0 deletions
|
@ -65,6 +65,12 @@ mtk_rectangle_new (int x,
|
|||
return rect;
|
||||
}
|
||||
|
||||
MtkRectangle *
|
||||
mtk_rectangle_new_empty (void)
|
||||
{
|
||||
return g_new0 (MtkRectangle, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* mtk_rectangle_area:
|
||||
* @rect: A rectangle
|
||||
|
|
|
@ -86,6 +86,9 @@ MtkRectangle * mtk_rectangle_new (int x,
|
|||
int width,
|
||||
int height);
|
||||
|
||||
MTK_EXPORT
|
||||
MtkRectangle * mtk_rectangle_new_empty (void);
|
||||
|
||||
/* Basic comparison functions */
|
||||
MTK_EXPORT
|
||||
int mtk_rectangle_area (const MtkRectangle *rect);
|
||||
|
|
Loading…
Reference in a new issue