forked from old/legacy-imlib2
Remove redundant BUILD_X11 tests, indent.
SVN revision: 37145
This commit is contained in:
parent
e3ec99354e
commit
29442b80f5
|
@ -3,9 +3,6 @@
|
|||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include "color.h"
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_X11
|
||||
|
||||
DATA8 _pal_type = 0;
|
||||
DATA16 _max_colors = 256;
|
||||
|
@ -552,4 +549,4 @@ __imlib_AllocColors1(Display * d, Colormap cmap, Visual * v)
|
|||
return color_lut;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* BUILD_X11 */
|
||||
|
|
|
@ -3,19 +3,29 @@
|
|||
|
||||
#ifdef BUILD_X11
|
||||
|
||||
extern DATA16 _max_colors;
|
||||
extern DATA16 _max_colors;
|
||||
|
||||
__hidden int __imlib_XActualDepth(Display *d, Visual *v);
|
||||
__hidden Visual *__imlib_BestVisual(Display *d, int screen, int *depth_return);
|
||||
__hidden DATA8 * __imlib_AllocColorTable(Display *d, Colormap cmap, DATA8 *type_return, Visual *v);
|
||||
__hidden DATA8 * __imlib_AllocColors332(Display *d, Colormap cmap, Visual *v);
|
||||
__hidden DATA8 * __imlib_AllocColors666(Display *d, Colormap cmap, Visual *v);
|
||||
__hidden DATA8 * __imlib_AllocColors232(Display *d, Colormap cmap, Visual *v);
|
||||
__hidden DATA8 * __imlib_AllocColors222(Display *d, Colormap cmap, Visual *v);
|
||||
__hidden DATA8 * __imlib_AllocColors221(Display *d, Colormap cmap, Visual *v);
|
||||
__hidden DATA8 * __imlib_AllocColors121(Display *d, Colormap cmap, Visual *v);
|
||||
__hidden DATA8 * __imlib_AllocColors111(Display *d, Colormap cmap, Visual *v);
|
||||
__hidden DATA8 * __imlib_AllocColors1(Display *d, Colormap cmap, Visual *v);
|
||||
__hidden int __imlib_XActualDepth(Display * d, Visual * v);
|
||||
__hidden Visual *__imlib_BestVisual(Display * d, int screen,
|
||||
int *depth_return);
|
||||
__hidden DATA8 *__imlib_AllocColorTable(Display * d, Colormap cmap,
|
||||
DATA8 * type_return, Visual * v);
|
||||
__hidden DATA8 *__imlib_AllocColors332(Display * d, Colormap cmap,
|
||||
Visual * v);
|
||||
__hidden DATA8 *__imlib_AllocColors666(Display * d, Colormap cmap,
|
||||
Visual * v);
|
||||
__hidden DATA8 *__imlib_AllocColors232(Display * d, Colormap cmap,
|
||||
Visual * v);
|
||||
__hidden DATA8 *__imlib_AllocColors222(Display * d, Colormap cmap,
|
||||
Visual * v);
|
||||
__hidden DATA8 *__imlib_AllocColors221(Display * d, Colormap cmap,
|
||||
Visual * v);
|
||||
__hidden DATA8 *__imlib_AllocColors121(Display * d, Colormap cmap,
|
||||
Visual * v);
|
||||
__hidden DATA8 *__imlib_AllocColors111(Display * d, Colormap cmap,
|
||||
Visual * v);
|
||||
__hidden DATA8 *__imlib_AllocColors1(Display * d, Colormap cmap,
|
||||
Visual * v);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
#include "common.h"
|
||||
#ifdef BUILD_X11
|
||||
#include <X11/Xlib.h>
|
||||
#endif
|
||||
#include "image.h"
|
||||
#include "context.h"
|
||||
#include "color.h"
|
||||
#include "rgba.h"
|
||||
|
||||
#ifdef BUILD_X11
|
||||
|
||||
static Context *context = NULL;
|
||||
static int max_context_count = 128;
|
||||
static int context_counter = 0;
|
||||
|
@ -209,4 +206,4 @@ __imlib_GetContext(Display * d, Visual * v, Colormap c, int depth)
|
|||
return ct;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* BUILD_X11 */
|
||||
|
|
|
@ -1,36 +1,34 @@
|
|||
#ifndef __CONTEXT
|
||||
#define __CONTEXT 1
|
||||
|
||||
#ifdef BUILD_X11
|
||||
|
||||
typedef struct _context Context;
|
||||
|
||||
struct _context
|
||||
{
|
||||
int last_use;
|
||||
Display *display;
|
||||
Visual *visual;
|
||||
Colormap colormap;
|
||||
int depth;
|
||||
Context *next;
|
||||
|
||||
DATA8 *palette;
|
||||
DATA8 palette_type;
|
||||
void *r_dither;
|
||||
void *g_dither;
|
||||
void *b_dither;
|
||||
struct _context {
|
||||
int last_use;
|
||||
Display *display;
|
||||
Visual *visual;
|
||||
Colormap colormap;
|
||||
int depth;
|
||||
Context *next;
|
||||
|
||||
DATA8 *palette;
|
||||
DATA8 palette_type;
|
||||
void *r_dither;
|
||||
void *g_dither;
|
||||
void *b_dither;
|
||||
};
|
||||
|
||||
__hidden void __imlib_SetMaxContexts(int num);
|
||||
__hidden int __imlib_GetMaxContexts(void);
|
||||
__hidden void __imlib_FlushContexts(void);
|
||||
__hidden void __imlib_FreeContextForDisplay(Display *d);
|
||||
__hidden void __imlib_FreeContextForColormap(Display *d, Colormap cm);
|
||||
__hidden void __imlib_FreeContextForVisual(Display *d, Visual *v);
|
||||
__hidden Context *__imlib_FindContext(Display *d, Visual *v, Colormap c, int depth);
|
||||
__hidden Context *__imlib_NewContext(Display *d, Visual *v, Colormap c, int depth);
|
||||
__hidden Context *__imlib_GetContext(Display *d, Visual *v, Colormap c, int depth);
|
||||
|
||||
#endif
|
||||
__hidden void __imlib_SetMaxContexts(int num);
|
||||
__hidden int __imlib_GetMaxContexts(void);
|
||||
__hidden void __imlib_FlushContexts(void);
|
||||
__hidden void __imlib_FreeContextForDisplay(Display * d);
|
||||
__hidden void __imlib_FreeContextForColormap(Display * d, Colormap cm);
|
||||
__hidden void __imlib_FreeContextForVisual(Display * d, Visual * v);
|
||||
__hidden Context *__imlib_FindContext(Display * d, Visual * v, Colormap c,
|
||||
int depth);
|
||||
__hidden Context *__imlib_NewContext(Display * d, Visual * v, Colormap c,
|
||||
int depth);
|
||||
__hidden Context *__imlib_GetContext(Display * d, Visual * v, Colormap c,
|
||||
int depth);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -2,15 +2,12 @@
|
|||
#ifdef BUILD_X11
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/XShm.h>
|
||||
#endif
|
||||
#include "colormod.h"
|
||||
#include "image.h"
|
||||
#include "blend.h"
|
||||
#include "rend.h"
|
||||
#include "draw.h"
|
||||
|
||||
#ifdef BUILD_X11
|
||||
|
||||
char
|
||||
__imlib_CreatePixmapsForImage(Display * d, Drawable w, Visual * v, int depth,
|
||||
Colormap cm, ImlibImage * im, Pixmap * p,
|
||||
|
@ -91,4 +88,4 @@ __imlib_CreatePixmapsForImage(Display * d, Drawable w, Visual * v, int depth,
|
|||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* BUILD_X11 */
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
#ifndef __DRAW
|
||||
#define __DRAW 1
|
||||
|
||||
#ifdef BUILD_X11
|
||||
|
||||
__hidden char
|
||||
__imlib_CreatePixmapsForImage(Display *d, Drawable w, Visual *v, int depth,
|
||||
Colormap cm, ImlibImage *im, Pixmap *p, Mask *m,
|
||||
int sx, int sy, int sw, int sh,
|
||||
int dw, int dh,
|
||||
char anitalias, char hiq, char dither_mask,
|
||||
int mat, ImlibColorModifier *cmod);
|
||||
|
||||
#endif
|
||||
__hidden char __imlib_CreatePixmapsForImage(Display * d, Drawable w,
|
||||
Visual * v, int depth,
|
||||
Colormap cm, ImlibImage * im,
|
||||
Pixmap * p, Mask * m, int sx,
|
||||
int sy, int sw, int sh,
|
||||
int dw, int dh,
|
||||
char anitalias, char hiq,
|
||||
char dither_mask, int mat,
|
||||
ImlibColorModifier * cmod);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,16 +1,13 @@
|
|||
#include "common.h"
|
||||
#ifdef BUILD_X11
|
||||
# include <X11/Xlib.h>
|
||||
# include <X11/extensions/XShm.h>
|
||||
# include <X11/Xutil.h>
|
||||
# include <X11/extensions/shape.h>
|
||||
# include <sys/ipc.h>
|
||||
# include <sys/shm.h>
|
||||
#endif
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/XShm.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/extensions/shape.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
#include "grab.h"
|
||||
|
||||
#ifdef BUILD_X11
|
||||
|
||||
static char _x_err = 0;
|
||||
static DATA8 rtab[256], gtab[256], btab[256];
|
||||
|
||||
|
@ -868,4 +865,4 @@ __imlib_GrabDrawableToRGBA(DATA32 * data, int ox, int oy, int ow, int oh,
|
|||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* BUILD_X11 */
|
||||
|
|
|
@ -1,19 +1,16 @@
|
|||
#ifndef __GRAB
|
||||
#define __GRAB 1
|
||||
|
||||
#ifdef BUILD_X11
|
||||
|
||||
__hidden char
|
||||
__imlib_GrabDrawableToRGBA(DATA32 *data, int ox, int oy, int ow, int oh,
|
||||
Display *d, Drawable p, Pixmap m, Visual *v,
|
||||
Colormap cm, int depth, int x, int y,
|
||||
int w, int h, char *domask, char grab);
|
||||
__hidden void
|
||||
__imlib_GrabXImageToRGBA(DATA32 *data, int ox, int oy, int ow, int oh,
|
||||
Display *d, XImage *xim, XImage *mxim, Visual *v,
|
||||
int depth, int x, int y,
|
||||
int w, int h, char grab);
|
||||
|
||||
#endif
|
||||
__hidden char __imlib_GrabDrawableToRGBA(DATA32 * data, int ox, int oy,
|
||||
int ow, int oh, Display * d,
|
||||
Drawable p, Pixmap m, Visual * v,
|
||||
Colormap cm, int depth, int x,
|
||||
int y, int w, int h,
|
||||
char *domask, char grab);
|
||||
__hidden void __imlib_GrabXImageToRGBA(DATA32 * data, int ox, int oy,
|
||||
int ow, int oh, Display * d,
|
||||
XImage * xim, XImage * mxim,
|
||||
Visual * v, int depth, int x,
|
||||
int y, int w, int h, char grab);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/extensions/XShm.h>
|
||||
#endif
|
||||
#include "colormod.h"
|
||||
#include "image.h"
|
||||
#include "scale.h"
|
||||
|
@ -16,8 +15,6 @@
|
|||
#include "rend.h"
|
||||
#include "rotate.h"
|
||||
|
||||
#ifdef BUILD_X11
|
||||
|
||||
/* size of the lines per segment we scale / render at a time */
|
||||
#define LINESIZE 16
|
||||
|
||||
|
@ -601,4 +598,4 @@ __imlib_RenderImageSkewed(Display * d, ImlibImage * im, Drawable w, Drawable m,
|
|||
__imlib_FreeImage(back);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* BUILD_X11 */
|
||||
|
|
|
@ -1,32 +1,31 @@
|
|||
#ifndef __REND
|
||||
#define __REND 1
|
||||
|
||||
#ifdef BUILD_X11
|
||||
__hidden DATA32 __imlib_RenderGetPixel(Display * d, Drawable w, Visual * v,
|
||||
Colormap cm, int depth, DATA8 r,
|
||||
DATA8 g, DATA8 b);
|
||||
|
||||
__hidden DATA32
|
||||
__imlib_RenderGetPixel(Display *d, Drawable w, Visual *v, Colormap cm, int depth, DATA8 r, DATA8 g, DATA8 b);
|
||||
__hidden void __imlib_RenderDisconnect(Display * d);
|
||||
|
||||
__hidden void
|
||||
__imlib_RenderDisconnect(Display *d);
|
||||
__hidden void __imlib_RenderImage(Display * d, ImlibImage * im,
|
||||
Drawable w, Drawable m,
|
||||
Visual * v, Colormap cm, int depth,
|
||||
int sx, int sy, int sw, int sh,
|
||||
int dx, int dy, int dw, int dh,
|
||||
char anitalias, char hiq, char blend,
|
||||
char dither_mask, int mat,
|
||||
ImlibColorModifier * cmod, ImlibOp op);
|
||||
|
||||
__hidden void
|
||||
__imlib_RenderImage(Display *d, ImlibImage *im,
|
||||
Drawable w, Drawable m,
|
||||
Visual *v, Colormap cm, int depth,
|
||||
int sx, int sy, int sw, int sh,
|
||||
int dx, int dy, int dw, int dh,
|
||||
char anitalias, char hiq, char blend, char dither_mask,
|
||||
int mat, ImlibColorModifier *cmod, ImlibOp op);
|
||||
|
||||
__hidden void
|
||||
__imlib_RenderImageSkewed(Display *d, ImlibImage *im, Drawable w,
|
||||
Drawable m, Visual *v, Colormap cm, int depth,
|
||||
int sx, int sy, int sw, int sh, int dx, int dy,
|
||||
int hsx, int hsy, int vsx, int vsy,
|
||||
char antialias, char hiq, char blend,
|
||||
char dither_mask, int mat, ImlibColorModifier *cmod,
|
||||
ImlibOp op);
|
||||
|
||||
#endif
|
||||
__hidden void __imlib_RenderImageSkewed(Display * d, ImlibImage * im,
|
||||
Drawable w, Drawable m,
|
||||
Visual * v, Colormap cm,
|
||||
int depth, int sx, int sy, int sw,
|
||||
int sh, int dx, int dy, int hsx,
|
||||
int hsy, int vsx, int vsy,
|
||||
char antialias, char hiq,
|
||||
char blend, char dither_mask,
|
||||
int mat,
|
||||
ImlibColorModifier * cmod,
|
||||
ImlibOp op);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
#include "common.h"
|
||||
#ifdef BUILD_X11
|
||||
# include <X11/Xlib.h>
|
||||
# include "context.h"
|
||||
#endif
|
||||
#include <X11/Xlib.h>
|
||||
#include "context.h"
|
||||
#include "rgba.h"
|
||||
|
||||
#ifdef BUILD_X11
|
||||
|
||||
#define IS_ALIGNED_128(val) (!((val) & 0x15))
|
||||
#define IS_ALIGNED_64(val) (!((val) & 0x7))
|
||||
#define IS_ALIGNED_32(val) (!((val) & 0x3))
|
||||
|
@ -4998,4 +4995,4 @@ __imlib_GetMaskFunction(char hiq)
|
|||
return hiq ? &__imlib_RGBA_to_A1_dither : &__imlib_RGBA_to_A1_fast;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* BUILD_X11 */
|
||||
|
|
|
@ -1,35 +1,34 @@
|
|||
#ifndef __RGBA
|
||||
#define __RGBA 1
|
||||
|
||||
#ifdef BUILD_X11
|
||||
|
||||
#define DM_BS1 (8 + 3)
|
||||
#define DM_BS2 (8)
|
||||
#define DM_X (8)
|
||||
#define DM_Y (8)
|
||||
|
||||
__hidden void __imlib_RGBASetupContext(Context *ct);
|
||||
__hidden void __imlib_RGBA_init(void *rd, void *gd, void *bd, int depth,
|
||||
DATA8 palette_type);
|
||||
__hidden void __imlib_RGBASetupContext(Context * ct);
|
||||
__hidden void __imlib_RGBA_init(void *rd, void *gd, void *bd, int depth,
|
||||
DATA8 palette_type);
|
||||
|
||||
typedef void (*ImlibRGBAFunction)(DATA32*, int, DATA8*,
|
||||
int, int, int, int, int);
|
||||
typedef void (*ImlibMaskFunction)(DATA32*, int, DATA8*,
|
||||
int, int, int, int, int, int);
|
||||
__hidden ImlibRGBAFunction
|
||||
__imlib_GetRGBAFunction(int depth,
|
||||
unsigned long rm, unsigned long gm, unsigned long bm,
|
||||
char hiq, DATA8 palette_type);
|
||||
__hidden ImlibMaskFunction
|
||||
__imlib_GetMaskFunction(char hiq);
|
||||
typedef void (*ImlibRGBAFunction) (DATA32 *, int, DATA8 *,
|
||||
int, int, int, int, int);
|
||||
typedef void (*ImlibMaskFunction) (DATA32 *, int, DATA8 *,
|
||||
int, int, int, int, int, int);
|
||||
__hidden ImlibRGBAFunction
|
||||
__imlib_GetRGBAFunction(int depth,
|
||||
unsigned long rm, unsigned long gm, unsigned long bm,
|
||||
char hiq, DATA8 palette_type);
|
||||
__hidden ImlibMaskFunction __imlib_GetMaskFunction(char hiq);
|
||||
|
||||
#ifdef DO_MMX_ASM
|
||||
void __imlib_mmx_rgb555_fast(DATA32*, int, DATA8*, int, int, int, int, int);
|
||||
void __imlib_mmx_bgr555_fast(DATA32*, int, DATA8*, int, int, int, int, int);
|
||||
void __imlib_mmx_rgb565_fast(DATA32*, int, DATA8*, int, int, int, int, int);
|
||||
void __imlib_mmx_bgr565_fast(DATA32*, int, DATA8*, int, int, int, int, int);
|
||||
#endif
|
||||
|
||||
void __imlib_mmx_rgb555_fast(DATA32 *, int, DATA8 *, int, int,
|
||||
int, int, int);
|
||||
void __imlib_mmx_bgr555_fast(DATA32 *, int, DATA8 *, int, int,
|
||||
int, int, int);
|
||||
void __imlib_mmx_rgb565_fast(DATA32 *, int, DATA8 *, int, int,
|
||||
int, int, int);
|
||||
void __imlib_mmx_bgr565_fast(DATA32 *, int, DATA8 *, int, int,
|
||||
int, int, int);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
#include "common.h"
|
||||
#ifdef BUILD_X11
|
||||
# include <X11/Xlib.h>
|
||||
# include <X11/extensions/XShm.h>
|
||||
# include <X11/Xutil.h>
|
||||
# include <sys/ipc.h>
|
||||
# include <sys/shm.h>
|
||||
# include "ximage.h"
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_X11
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/XShm.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
#include "ximage.h"
|
||||
|
||||
/* static private variables */
|
||||
static signed char x_does_shm = -1;
|
||||
|
@ -363,4 +360,4 @@ __imlib_ProduceXImage(Display * d, Visual * v, int depth, int w, int h,
|
|||
return xim;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* BUILD_X11 */
|
||||
|
|
|
@ -1,16 +1,13 @@
|
|||
#ifndef __XIMAGE
|
||||
#define __XIMAGE 1
|
||||
|
||||
#ifdef BUILD_X11
|
||||
|
||||
void __imlib_SetMaxXImageCount(Display *d, int num);
|
||||
__hidden int __imlib_GetMaxXImageCount(Display *d);
|
||||
__hidden void __imlib_SetMaxXImageTotalSize(Display *d, int num);
|
||||
__hidden int __imlib_GetMaxXImageTotalSize(Display *d);
|
||||
__hidden void __imlib_FlushXImage(Display *d);
|
||||
__hidden void __imlib_ConsumeXImage(Display *d, XImage *xim);
|
||||
__hidden XImage *__imlib_ProduceXImage(Display *d, Visual *v, int depth, int w, int h, char *shared);
|
||||
|
||||
#endif
|
||||
void __imlib_SetMaxXImageCount(Display * d, int num);
|
||||
__hidden int __imlib_GetMaxXImageCount(Display * d);
|
||||
__hidden void __imlib_SetMaxXImageTotalSize(Display * d, int num);
|
||||
__hidden int __imlib_GetMaxXImageTotalSize(Display * d);
|
||||
__hidden void __imlib_FlushXImage(Display * d);
|
||||
__hidden void __imlib_ConsumeXImage(Display * d, XImage * xim);
|
||||
__hidden XImage *__imlib_ProduceXImage(Display * d, Visual * v, int depth,
|
||||
int w, int h, char *shared);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue