#include <mi32/micallbacklist.h>
#include <mi32/stddefns.h>
Include dependency graph for mcb.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Classes | |
| struct | McbAnyCallbackStruct |
| struct | McbLIST |
| Callback list. More... | |
Defines | |
| #define | LIBEXPORT MI_DLLIMPORT |
| #define | MCB_ADD(_clsname) inline void McbCallbackAdd (McbLIST *list, void (*f)(McbAnyCallbackStruct*,_clsname*), UINT32 flags) const { McbAddCallback(list,reinterpret_cast<McbCallbackFunc>(f),const_cast<_clsname*>(this),(flags)); } |
| #define | MCB_ADDEX(_clsname, _strname) inline void McbCallbackAdd (McbLIST *list, void (*f)(_strname*,_clsname*), UINT32 flags) const { McbAddCallback(list,reinterpret_cast<McbCallbackFunc>(f),const_cast<_clsname*>(this),(flags)); } |
| #define | MCB_PriorityHigh -1 |
| #define | MCB_PriorityLow 1 |
| #define | MCB_PriorityNormal 0 |
| #define | MCB_REMOVE(_clsname) inline void McbCallbackRemove (McbLIST *list, void (*f)(McbAnyCallbackStruct*,_clsname*), UINT32 flags) const { McbRemoveCallback(list,reinterpret_cast<McbCallbackFunc>(f),const_cast<_clsname*>(this),(flags)); } |
| #define | MCB_REMOVEEX(_clsname, _strname) inline void McbCallbackRemove (McbLIST *list, void (*f)(_strname*,_clsname*), UINT32 flags) const { McbRemoveCallback(list,reinterpret_cast<McbCallbackFunc>(f),const_cast<_clsname*>(this),(flags)); } |
Typedefs | |
| typedef void(*) | McbCallbackFunc (McbAnyCallbackStruct *, void *) |
Functions | |
| DEPRECATED LIBEXPORT int | McbAddCallback (McbLIST *cblist, McbCallbackFunc cbfunc, void *cbdata, UINT32 reasonmask) |
| DEPRECATED LIBEXPORT int | McbAddCallbackExt (McbLIST *cblist, McbCallbackFunc cbfunc, void *cbdata, UINT32 reasonmask, INT8 priority) |
| DEPRECATED LIBEXPORT void | McbCallCallbacks (McbLIST *cblist, McbAnyCallbackStruct *cbstruct, UINT32 reason) |
| DEPRECATED LIBEXPORT int | McbHasCallbacks (McbLIST *cblist, UINT32 reason) |
| DEPRECATED LIBEXPORT void | McbRemoveAllCallbacks (McbLIST *cblist) |
| DEPRECATED LIBEXPORT void | McbRemoveCallback (McbLIST *cblist, McbCallbackFunc cbfunc, void *cbdata, UINT32 reasonmask) |
Definition in file mcb.h.
| #define MCB_ADD | ( | _clsname | ) | inline void McbCallbackAdd (McbLIST *list, void (*f)(McbAnyCallbackStruct*,_clsname*), UINT32 flags) const { McbAddCallback(list,reinterpret_cast<McbCallbackFunc>(f),const_cast<_clsname*>(this),(flags)); } |
| #define MCB_ADDEX | ( | _clsname, | |||
| _strname | ) | inline void McbCallbackAdd (McbLIST *list, void (*f)(_strname*,_clsname*), UINT32 flags) const { McbAddCallback(list,reinterpret_cast<McbCallbackFunc>(f),const_cast<_clsname*>(this),(flags)); } |
| #define MCB_REMOVE | ( | _clsname | ) | inline void McbCallbackRemove (McbLIST *list, void (*f)(McbAnyCallbackStruct*,_clsname*), UINT32 flags) const { McbRemoveCallback(list,reinterpret_cast<McbCallbackFunc>(f),const_cast<_clsname*>(this),(flags)); } |
| #define MCB_REMOVEEX | ( | _clsname, | |||
| _strname | ) | inline void McbCallbackRemove (McbLIST *list, void (*f)(_strname*,_clsname*), UINT32 flags) const { McbRemoveCallback(list,reinterpret_cast<McbCallbackFunc>(f),const_cast<_clsname*>(this),(flags)); } |
| typedef void(*) McbCallbackFunc(McbAnyCallbackStruct *, void *) |
| DEPRECATED LIBEXPORT int McbAddCallback | ( | McbLIST * | cblist, | |
| McbCallbackFunc | cbfunc, | |||
| void * | cbdata, | |||
| UINT32 | reasonmask | |||
| ) |
Add callback to callback list.
This is equivalent to McbAddCallbackExt(cblist, cbfunc, cbdata, reasonmask, MCB_PriorityNormal).
| cblist | Callback list to add to |
| cbfunc | Callback function |
| cbdata | "Hook" data to pass to callback function |
| reasonmask | Programmer-defined reasons for which callback will be called |
| DEPRECATED LIBEXPORT int McbAddCallbackExt | ( | McbLIST * | cblist, | |
| McbCallbackFunc | cbfunc, | |||
| void * | cbdata, | |||
| UINT32 | reasonmask, | |||
| INT8 | priority | |||
| ) |
Add callback to callback list with position determined by priority.
If reasonmask is 0 all reasons will be selected.
| cblist | Callback list to add to |
| cbfunc | Callback function |
| cbdata | "Hook" data to pass to callback function |
| reasonmask | Programmer-defined reasons for which callback will be called |
| priority | (MCB_PriorityHigh, MCB_PriorityNormal, MCB_PriorityLow) |
| DEPRECATED LIBEXPORT void McbCallCallbacks | ( | McbLIST * | cblist, | |
| McbAnyCallbackStruct * | cbstruct, | |||
| UINT32 | reason | |||
| ) |
Call callbacks in list selected by reason.
The specified reason will be bitwise-anded with the reasonmask which was specified in McbAddCallback() to determine if the callback function will actually be called. You can use McbAnyCallbackStruct for the structure type if you are only interested in specifying a callback reason and no additional information.
| cblist | Callback list |
| cbstruct | Pointer to callback structure, first entry must be ULONG reason |
| reason | Reason, will be ANDed with callback reasonmask |
Check to see if callback list has a callback for a given reason.
| cblist | Callback list |
| reason | Reason, will be ANDed with callback reasonmask |
| DEPRECATED LIBEXPORT void McbRemoveAllCallbacks | ( | McbLIST * | cblist | ) |
Remove all callbacks from list.
| cblist | Callback list to remove all callbacks from |
| DEPRECATED LIBEXPORT void McbRemoveCallback | ( | McbLIST * | cblist, | |
| McbCallbackFunc | cbfunc, | |||
| void * | cbdata, | |||
| UINT32 | reasonmask | |||
| ) |
Remove callback from list.
If "cbfunc" or "cbdata" are NULL and/or the "reasonmask" is 0 they will not be used to "match" the callbacks. For example, McbRemoveCallback(&cblist,NULL,data,0) will remove all callbacks that reference the specified "data". This can be useful if that data is about to be freed. Selected callback "reasons" can be removed without removing the entire callback as well. Callbacks can be removed from the list safely while being called.
| cblist | Callback list to remove to |
| cbfunc | Callback function |
| cbdata | "Hook" data specified in McbAddCallback() |
| reasonmask | Programmer-defined reasons specified in McbAddCallback() |
1.5.2