diff --git a/plugins/include/functions.inc b/plugins/include/functions.inc index f1bab1e1..e386b1a3 100644 --- a/plugins/include/functions.inc +++ b/plugins/include/functions.inc @@ -448,6 +448,16 @@ typeset NativeCall * @return Value for the native call to return. */ function any (Handle plugin, int numParams); + + /** + * Defines a native function. + * + * It is not necessary to validate the parameter count + * + * @param plugin Handle of the calling plugin. + * @param numParams Number of parameters passed to the native. + */ + function void (Handle plugin, int numParams); } /** diff --git a/plugins/include/menus.inc b/plugins/include/menus.inc index e440e2f7..b1cd6673 100644 --- a/plugins/include/menus.inc +++ b/plugins/include/menus.inc @@ -148,8 +148,15 @@ enum MenuSource * @param action The action of the menu. * @param param1 First action parameter (usually the client). * @param param2 Second action parameter (usually the item). + * + * Use void-typed prototype if you don't plan to handle MenuAction_DrawItem + * and MenuAction_DisplayItem actions. */ -typedef MenuHandler = function int (Menu menu, MenuAction action, int param1, int param2); +typeset MenuHandler +{ + function int (Menu menu, MenuAction action, int param1, int param2); + function void (Menu menu, MenuAction action, int param1, int param2); +}; // Panels are used for drawing raw menus without any extra helper functions. // Handles must be closed via delete or CloseHandle().