mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-04 21:08:10 +02:00
extern "C" stuff to support C++ (Fredrik Hglund)
This commit is contained in:
parent
189b01b4fd
commit
5a4f65a774
3 changed files with 19 additions and 3 deletions
|
|
@ -29,6 +29,14 @@
|
|||
|
||||
#include "pixregion.h"
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */
|
||||
#define _ICFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */
|
||||
#define _ICFUNCPROTOEND }
|
||||
#else
|
||||
#define _ICFUNCPROTOBEGIN
|
||||
#define _ICFUNCPROTOEND
|
||||
#endif
|
||||
|
||||
/* icformat.c */
|
||||
|
||||
/* XXX: Change from int to enum for IcFormatName */
|
||||
|
|
@ -45,6 +53,8 @@ typedef struct _IcFormat {
|
|||
int alpha, alphaMask;
|
||||
} IcFormat;
|
||||
|
||||
_ICFUNCPROTOBEGIN
|
||||
|
||||
void
|
||||
IcFormatInit (IcFormat *format, IcFormatName name);
|
||||
|
||||
|
|
@ -192,4 +202,6 @@ IcComposite (char op,
|
|||
int width,
|
||||
int height);
|
||||
|
||||
_ICFUNCPROTOEND
|
||||
|
||||
#endif /* _IC_H_ */
|
||||
|
|
|
|||
6
src/Xr.h
6
src/Xr.h
|
|
@ -31,6 +31,8 @@
|
|||
typedef struct _XrState XrState;
|
||||
typedef struct _XrSurface XrSurface;
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
/* Functions for manipulating state objects */
|
||||
XrState *
|
||||
XrCreate(void);
|
||||
|
|
@ -112,7 +114,7 @@ typedef enum _XrOperator {
|
|||
} XrOperator;
|
||||
|
||||
void
|
||||
XrSetOperator(XrState *xrs, XrOperator operator);
|
||||
XrSetOperator(XrState *xrs, XrOperator op);
|
||||
|
||||
void
|
||||
XrSetRGBColor(XrState *xrs, double red, double green, double blue);
|
||||
|
|
@ -349,5 +351,7 @@ XrSurfaceSetClipRegion (XrSurface *surface, Region region);
|
|||
XrStatus
|
||||
XrSurfaceSetRepeat (XrSurface *surface, int repeat);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
4
src/xr.c
4
src/xr.c
|
|
@ -114,12 +114,12 @@ XrSetTargetDrawable (XrState *xrs,
|
|||
}
|
||||
|
||||
void
|
||||
XrSetOperator(XrState *xrs, XrOperator operator)
|
||||
XrSetOperator(XrState *xrs, XrOperator op)
|
||||
{
|
||||
if (xrs->status)
|
||||
return;
|
||||
|
||||
xrs->status = _XrGStateSetOperator(_XR_CURRENT_GSTATE(xrs), operator);
|
||||
xrs->status = _XrGStateSetOperator(_XR_CURRENT_GSTATE(xrs), op);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue