mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
6d678c927c
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@808 a592a061-630c-0410-9148-cb99ea01b6c8
22 lines
531 B
C
22 lines
531 B
C
#ifndef XFORM_MACROS_H
|
|
#define XFORM_MACROS_H
|
|
|
|
/** Collection of useful macros to assist in correctly wrapping and
|
|
mapping C callbacks to the C++ member functions.
|
|
*/
|
|
|
|
#define C_GENERICCB(FN, METHOD) \
|
|
extern "C" void C_##FN##METHOD(FL_OBJECT * ob, long d) \
|
|
{ \
|
|
FN::METHOD(ob, d); \
|
|
}
|
|
|
|
// Return CB's all seem to take a void* as the 2nd argument and return an int.
|
|
#define C_RETURNCB(FN, METHOD) \
|
|
extern "C" int C_##FN##METHOD(FL_FORM * ob, void * d) \
|
|
{ \
|
|
return FN::METHOD(ob, d); \
|
|
}
|
|
|
|
#endif
|