widl: Generate helper macros for WinRT implementation.
commitdc65f8865458e44c5c1f712a771565843bae923a
authorRémi Bernon <rbernon@codeweavers.com>
Fri, 26 Feb 2021 08:43:06 +0000 (26 09:43 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 26 Feb 2021 15:25:57 +0000 (26 16:25 +0100)
treedd8528d36cddb2d0744d1f14422df2c4015bae5f
parent5f6fdb183880a60ce06e2488329c5493dcb5997c
widl: Generate helper macros for WinRT implementation.

This generates additional macros to help keeping implementation simple,
guarded with WIDL_using ifdefs, like this:

    #ifdef WIDL_using_Windows_Foo
    #define IFooVtbl __x_ABI_CWindows_CFoo_CIFooVtbl
    #define IFoo __x_ABI_CWindows_CFoo_CIFoo
    #define IFoo_DoFoo __x_ABI_CWindows_CFoo_CIFoo_DoFoo
    #endif /* WIDL_using_Windows_Foo */

Implementation files can define the desired WIDL_using preprocessor
macros before including the header, and then implement or use the
interface methods with the simple non-prefixed names instead.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
tools/widl/header.c
tools/widl/typetree.c
tools/widl/widltypes.h