Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!unido!orthogo!basti From: basti@orthogo.UUCP (Sebastian Wangnick) Newsgroups: comp.windows.x.motif Subject: Re: C++ interface to Motif 1 of 2 (long) Message-ID: <824@orthogo.UUCP> Date: 23 Nov 90 09:22:51 GMT References: <901117000115.9011@alphalpha> <9011191652.AA01032@dolphin.aet_austin> Distribution: inet Organization: none Lines: 38 ctim@dolphin.aaet.ti.com (Craig Timmerman) writes: >> > instance. This way you can keep the code for the callbacks in C++ and >> > never have to worry about referencing widgets. This is a big >> But it must produce a dummy callback routine no? Or does it >> just assume it knows the C++ calling conventions? Or does it have >> one callback for each signature, which then converts to object and >> calls the C++ callback? >I should have been more explicit here. The macros you use to define >the callbacks do create normal Xt callbacks. The macros actually just >define the first three/four lines of the callback (the callback >definition, opening brace, do the widget->object hash table look up). >You provide the rest of the callback code including the terminating >brace. As all of you seen to write those wrappers, here's my DM 0,02 worth of approach: Use static member functions as callbacks. They are C-callable plus you don't need extra friends. Sebastian Wangnick (basti@orthogo.uucp) PS: inews hack .................................................. .................................................. .................................................. .................................................. .................................................. .................................................. .................................................. .................................................. .................................................. .................................................. .................................................. .................................................. .................................................. .................................................. .................................................. ..................................................