From 0aa5f9a056faea0c7d98b2006ae82e5efd6b3d33 Mon Sep 17 00:00:00 2001 From: Zhiyi Zhang Date: Fri, 15 Oct 2021 09:56:51 +0800 Subject: [PATCH 43/51] winex11.drv: Add xrender.h. To: wine-devel@winehq.org XRender functions need to be called from other c files later. Signed-off-by: Zhiyi Zhang --- dlls/winex11.drv/xrender.c | 2 +- dlls/winex11.drv/xrender.h | 56 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 dlls/winex11.drv/xrender.h diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index 97392eba0b7..22e17033238 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -172,7 +172,7 @@ static INT mru = -1; static void *xrender_handle; -#define MAKE_FUNCPTR(f) static typeof(f) * p##f; +#define MAKE_FUNCPTR(f) typeof(f) * p##f; MAKE_FUNCPTR(XRenderAddGlyphs) MAKE_FUNCPTR(XRenderChangePicture) MAKE_FUNCPTR(XRenderComposite) diff --git a/dlls/winex11.drv/xrender.h b/dlls/winex11.drv/xrender.h new file mode 100644 index 00000000000..b3275233a51 --- /dev/null +++ b/dlls/winex11.drv/xrender.h @@ -0,0 +1,56 @@ +/* + * Wine X11DRV XRender interface + * + * Copyright 2021 Zhiyi Zhang for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +#ifndef __WINE_XRENDER_H +#define __WINE_XRENDER_H + +#ifndef __WINE_CONFIG_H +#error You must include config.h to use this header +#endif + +#ifdef SONAME_LIBXRENDER + +#include + +#define MAKE_FUNCPTR(f) extern typeof(f) * p##f DECLSPEC_HIDDEN; + +MAKE_FUNCPTR(XRenderAddGlyphs) +MAKE_FUNCPTR(XRenderChangePicture) +MAKE_FUNCPTR(XRenderComposite) +MAKE_FUNCPTR(XRenderCompositeText16) +MAKE_FUNCPTR(XRenderCreateGlyphSet) +MAKE_FUNCPTR(XRenderCreatePicture) +MAKE_FUNCPTR(XRenderFillRectangle) +MAKE_FUNCPTR(XRenderFindFormat) +MAKE_FUNCPTR(XRenderFindVisualFormat) +MAKE_FUNCPTR(XRenderFreeGlyphSet) +MAKE_FUNCPTR(XRenderFreePicture) +MAKE_FUNCPTR(XRenderSetPictureClipRectangles) +#ifdef HAVE_XRENDERCREATELINEARGRADIENT +MAKE_FUNCPTR(XRenderCreateLinearGradient) +#endif +#ifdef HAVE_XRENDERSETPICTURETRANSFORM +MAKE_FUNCPTR(XRenderSetPictureTransform) +#endif +MAKE_FUNCPTR(XRenderQueryExtension) + +#undef MAKE_FUNCPTR + +#endif /* defined(SONAME_LIBXRENDER) */ +#endif /* __WINE_XRENDER_H */ -- 2.32.0