# IupSetGlobalFunction

Definition: | include pGUI.e IupSetGlobalFunction(string name, cbfunc func)
Description: | Associates a function to an action as a global callback. name: name of an action. func: function address, usually the result of Icallback(). If NULL removes the association.
pwa/p2js: | Supported, but currently only for "IDLE_ACTION".
Notes: | This function wraps the C function IupSetFunction (there is no C function named IupSetGlobalFunction). The official documentation of IupSetFunction states “This function should not be used by new applications, use it only for global callbacks. For regular elements use IupSetCallback instead.” To reflect that, pGUI.e changes the routine name, and Edita(/Edix) colours IupSetFunction as illegal, and links here. When you are quite certain that something you are translating should not be using/improved to IupSetCallback, insert "Global" into the name to get the normal syntax colouring back. Unlike the C function IupSetFunction, this is a procedure, so in some cases when translating C code you may need to replace a single C IupSetFunction call with an IupGetGlobalFunction followed by an IupSetGlobalFunction.
See Also: | IupGetGlobalFunction, IupSetCallback