/* * objcsigcglue.h * Ardour * * Created by Taybin on 8/25/06. * Copyright 2006 Penguin Sounds. All rights reserved. * */ #ifndef __cocoa_glue_h__ #define __cocoa_glue_h__ #import typedef void (*msgFtn)(id, SEL); template void objcsigcglue (T1 t1, id _id, SEL _sel) { void (*voidReturn)(id, SEL, T1) = (void (*)(id, SEL, T1))objc_msgSend; voidReturn(_id, _sel, t1); } template void objcsigcgluebind (T1 t1, id _id, SEL _sel, T2 t2) { void (*voidReturn)(id, SEL, T1, T2) = (void (*)(id, SEL, T1, T2))objc_msgSend; voidReturn(_id, _sel, t1, t2); } template void objcsigcglue2 (T1 t1, T2 t2, id _id, SEL _sel) { void (*voidReturn)(id, SEL, T1, T2) = (void (*)(id, SEL, T1, T2))objc_msgSend; voidReturn(_id, _sel, t1, t2); } template void objcsigcglue2bind (T1 t1, T2 t2, id _id, SEL _sel, T3 t3) { void (*voidReturn)(id, SEL, T1, T2, T3) = (void (*)(id, SEL, T1, T2, T3))objc_msgSend; voidReturn(_id, _sel, t1, t2, t3); } typedef int (*intMsgFtn)(id, SEL); template int intobjcsigcglue (T1 t1, id _id, SEL _sel) { int (*intReturn)(id, SEL, T1) = (int (*)(id, SEL, T1))objc_msgSend; return intReturn(_id, _sel, t1); } template int intobjcsigcgluebind (T1 t1, id _id, SEL _sel, T2 t2) { int (*intReturn)(id, SEL, T1, T2) = (int (*)(id, SEL, T1, T2))objc_msgSend; return intReturn(_id, _sel, t1, t2); } #endif // __cocoa_glue_h__