> /** Function pointer type used for keybinding callbacks. */ > typedef void (*GeanyKeyCallback) (guint key_id); > > +/** Function pointer type used for keybinding callbacks, with userdata for passing context > + * > + * You should return @c TRUE to indicate handling the callback. (Occasionally, if the keybinding > + * cannot apply in the current situation, it is useful to return @c FALSE to allow a later keybinding > + * with the same key combination to handle it). > + * > + * @since 1.26 (API 226) */ > +typedef gboolean (*GeanyKeyBindingFunc)(GeanyKeyBinding *key, guint key_id, gpointer pdata);
I was trying to port some plugins to use this API and realized key_id
is kinda redundant here with key->id
. What about instead making GeanyKeyBinding::id
public (add a doc comment) and dropping the key_id
parameter here?
Or do we think it's good because it's more consistent with the group callback?
—
Reply to this email directly or view it on GitHub.