linuxmint / muffin

The window management library for the Cinnamon desktop (libmuffin) and its sample WM binary (muffin)
GNU General Public License v2.0
197 stars 93 forks source link

gir: Correct usage of the closure annotation #704

Closed rcalixte closed 3 weeks ago

rcalixte commented 1 month ago

Whenever you’re describing a function that takes a callback, you should always annotate the callback argument with the argument that contains the user data using the (closure argument) annotation

You should not annotate the data argument with a unary (closure).

The unary (closure) is meant to be used when annotating the callback type

Ref: https://gitlab.gnome.org/GNOME/mutter/-/commit/077eb80a8d9bb2968c2bfac959c2f2ca966ca7e7