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;
|
return rect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MtkRectangle *
|
||||||
|
mtk_rectangle_new_empty (void)
|
||||||
|
{
|
||||||
|
return g_new0 (MtkRectangle, 1);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* mtk_rectangle_area:
|
* mtk_rectangle_area:
|
||||||
* @rect: A rectangle
|
* @rect: A rectangle
|
||||||
|
|
|
@ -86,6 +86,9 @@ MtkRectangle * mtk_rectangle_new (int x,
|
||||||
int width,
|
int width,
|
||||||
int height);
|
int height);
|
||||||
|
|
||||||
|
MTK_EXPORT
|
||||||
|
MtkRectangle * mtk_rectangle_new_empty (void);
|
||||||
|
|
||||||
/* Basic comparison functions */
|
/* Basic comparison functions */
|
||||||
MTK_EXPORT
|
MTK_EXPORT
|
||||||
int mtk_rectangle_area (const MtkRectangle *rect);
|
int mtk_rectangle_area (const MtkRectangle *rect);
|
||||||
|
|
Loading…
Reference in a new issue