Indent the remaining unindented files.

This commit is contained in:
Kim Woelders 2014-12-20 16:58:48 +01:00
parent e20587d7a7
commit ec1b4319b8
24 changed files with 1164 additions and 1157 deletions

View File

@ -1,62 +1,60 @@
#ifndef __IMLIB_API_H #ifndef __IMLIB_API_H
# define __IMLIB_API_H 1 #define __IMLIB_API_H 1
# ifdef EAPI #ifdef EAPI
# undef EAPI #undef EAPI
# endif #endif
# ifdef WIN32 #ifdef WIN32
# ifdef BUILDING_DLL #ifdef BUILDING_DLL
# define EAPI __declspec(dllexport) #define EAPI __declspec(dllexport)
# else #else
# define EAPI __declspec(dllimport) #define EAPI __declspec(dllimport)
# endif #endif
# else #else
# ifdef __GNUC__ #ifdef __GNUC__
# if __GNUC__ >= 4 #if __GNUC__ >= 4
# define EAPI __attribute__ ((visibility("default"))) #define EAPI __attribute__ ((visibility("default")))
# else #else
# define EAPI #define EAPI
# endif #endif
# else #else
# define EAPI #define EAPI
# endif #endif
# endif #endif
# ifndef X_DISPLAY_MISSING #ifndef X_DISPLAY_MISSING
# include <X11/Xlib.h> #include <X11/Xlib.h>
# endif #endif
/* Data types to use */ /* Data types to use */
# ifndef DATA64 #ifndef DATA64
# define DATA64 unsigned long long #define DATA64 unsigned long long
# define DATA32 unsigned int #define DATA32 unsigned int
# define DATA16 unsigned short #define DATA16 unsigned short
# define DATA8 unsigned char #define DATA8 unsigned char
# endif #endif
/* opaque data types */ /* opaque data types */
typedef void *Imlib_Context; typedef void *Imlib_Context;
typedef void *Imlib_Image; typedef void *Imlib_Image;
typedef void *Imlib_Color_Modifier; typedef void *Imlib_Color_Modifier;
typedef void *Imlib_Updates; typedef void *Imlib_Updates;
typedef void *Imlib_Font; typedef void *Imlib_Font;
typedef void *Imlib_Color_Range; typedef void *Imlib_Color_Range;
typedef void *Imlib_Filter; typedef void *Imlib_Filter;
typedef struct _imlib_border Imlib_Border; typedef struct _imlib_border Imlib_Border;
typedef struct _imlib_color Imlib_Color; typedef struct _imlib_color Imlib_Color;
typedef void *ImlibPolygon; typedef void *ImlibPolygon;
/* blending operations */ /* blending operations */
enum _imlib_operation enum _imlib_operation {
{
IMLIB_OP_COPY, IMLIB_OP_COPY,
IMLIB_OP_ADD, IMLIB_OP_ADD,
IMLIB_OP_SUBTRACT, IMLIB_OP_SUBTRACT,
IMLIB_OP_RESHADE IMLIB_OP_RESHADE
}; };
enum _imlib_text_direction enum _imlib_text_direction {
{
IMLIB_TEXT_TO_RIGHT = 0, IMLIB_TEXT_TO_RIGHT = 0,
IMLIB_TEXT_TO_LEFT = 1, IMLIB_TEXT_TO_LEFT = 1,
IMLIB_TEXT_TO_DOWN = 2, IMLIB_TEXT_TO_DOWN = 2,
@ -64,8 +62,7 @@ enum _imlib_text_direction
IMLIB_TEXT_TO_ANGLE = 4 IMLIB_TEXT_TO_ANGLE = 4
}; };
enum _imlib_load_error enum _imlib_load_error {
{
IMLIB_LOAD_ERROR_NONE, IMLIB_LOAD_ERROR_NONE,
IMLIB_LOAD_ERROR_FILE_DOES_NOT_EXIST, IMLIB_LOAD_ERROR_FILE_DOES_NOT_EXIST,
IMLIB_LOAD_ERROR_FILE_IS_DIRECTORY, IMLIB_LOAD_ERROR_FILE_IS_DIRECTORY,
@ -84,8 +81,7 @@ enum _imlib_load_error
}; };
/* Encodings known to Imlib2 (so far) */ /* Encodings known to Imlib2 (so far) */
enum _imlib_TTF_encoding enum _imlib_TTF_encoding {
{
IMLIB_TTF_ENCODING_ISO_8859_1, IMLIB_TTF_ENCODING_ISO_8859_1,
IMLIB_TTF_ENCODING_ISO_8859_2, IMLIB_TTF_ENCODING_ISO_8859_2,
IMLIB_TTF_ENCODING_ISO_8859_3, IMLIB_TTF_ENCODING_ISO_8859_3,
@ -98,415 +94,501 @@ typedef enum _imlib_load_error Imlib_Load_Error;
typedef enum _imlib_text_direction Imlib_Text_Direction; typedef enum _imlib_text_direction Imlib_Text_Direction;
typedef enum _imlib_TTF_encoding Imlib_TTF_Encoding; typedef enum _imlib_TTF_encoding Imlib_TTF_Encoding;
struct _imlib_border struct _imlib_border {
{ int left, right, top, bottom;
int left, right, top, bottom;
}; };
struct _imlib_color struct _imlib_color {
{ int alpha, red, green, blue;
int alpha, red, green, blue;
}; };
/* Progressive loading callbacks */ /* Progressive loading callbacks */
typedef int (*Imlib_Progress_Function) (Imlib_Image im, char percent, typedef int (*Imlib_Progress_Function) (Imlib_Image im, char percent,
int update_x, int update_y, int update_x, int update_y,
int update_w, int update_h); int update_w, int update_h);
typedef void (*Imlib_Data_Destructor_Function) (Imlib_Image im, void *data); typedef void (*Imlib_Data_Destructor_Function) (Imlib_Image im,
void *data);
# ifdef __cplusplus /* *INDENT-OFF* */
extern "C" #ifdef __cplusplus
{ extern "C" {
# endif #endif
/* *INDENT-ON* */
/* context handling */ /* context handling */
EAPI Imlib_Context imlib_context_new(void); EAPI Imlib_Context imlib_context_new(void);
EAPI void imlib_context_free(Imlib_Context context); EAPI void imlib_context_free(Imlib_Context context);
EAPI void imlib_context_push(Imlib_Context context); EAPI void imlib_context_push(Imlib_Context context);
EAPI void imlib_context_pop(void); EAPI void imlib_context_pop(void);
EAPI Imlib_Context imlib_context_get(void); EAPI Imlib_Context imlib_context_get(void);
/* context setting */ /* context setting */
# ifndef X_DISPLAY_MISSING #ifndef X_DISPLAY_MISSING
EAPI void imlib_context_set_display(Display * display); EAPI void imlib_context_set_display(Display * display);
EAPI void imlib_context_disconnect_display(void); EAPI void imlib_context_disconnect_display(void);
EAPI void imlib_context_set_visual(Visual * visual); EAPI void imlib_context_set_visual(Visual * visual);
EAPI void imlib_context_set_colormap(Colormap colormap); EAPI void imlib_context_set_colormap(Colormap colormap);
EAPI void imlib_context_set_drawable(Drawable drawable); EAPI void imlib_context_set_drawable(Drawable drawable);
EAPI void imlib_context_set_mask(Pixmap mask); EAPI void imlib_context_set_mask(Pixmap mask);
# endif #endif
EAPI void imlib_context_set_dither_mask(char dither_mask); EAPI void imlib_context_set_dither_mask(char dither_mask);
EAPI void imlib_context_set_mask_alpha_threshold(int mask_alpha_threshold); EAPI void imlib_context_set_mask_alpha_threshold(int
EAPI void imlib_context_set_anti_alias(char anti_alias); mask_alpha_threshold);
EAPI void imlib_context_set_dither(char dither); EAPI void imlib_context_set_anti_alias(char anti_alias);
EAPI void imlib_context_set_blend(char blend); EAPI void imlib_context_set_dither(char dither);
EAPI void imlib_context_set_color_modifier(Imlib_Color_Modifier color_modifier); EAPI void imlib_context_set_blend(char blend);
EAPI void imlib_context_set_operation(Imlib_Operation operation); EAPI void imlib_context_set_color_modifier(Imlib_Color_Modifier
EAPI void imlib_context_set_font(Imlib_Font font); color_modifier);
EAPI void imlib_context_set_direction(Imlib_Text_Direction direction); EAPI void imlib_context_set_operation(Imlib_Operation operation);
EAPI void imlib_context_set_angle(double angle); EAPI void imlib_context_set_font(Imlib_Font font);
EAPI void imlib_context_set_color(int red, int green, int blue, int alpha); EAPI void imlib_context_set_direction(Imlib_Text_Direction direction);
EAPI void imlib_context_set_color_hsva(float hue, float saturation, float value, int alpha); EAPI void imlib_context_set_angle(double angle);
EAPI void imlib_context_set_color_hlsa(float hue, float lightness, float saturation, int alpha); EAPI void imlib_context_set_color(int red, int green, int blue,
EAPI void imlib_context_set_color_cmya(int cyan, int magenta, int yellow, int alpha); int alpha);
EAPI void imlib_context_set_color_range(Imlib_Color_Range color_range); EAPI void imlib_context_set_color_hsva(float hue, float saturation,
EAPI void imlib_context_set_progress_function(Imlib_Progress_Function float value, int alpha);
progress_function); EAPI void imlib_context_set_color_hlsa(float hue, float lightness,
EAPI void imlib_context_set_progress_granularity(char progress_granularity); float saturation, int alpha);
EAPI void imlib_context_set_image(Imlib_Image image); EAPI void imlib_context_set_color_cmya(int cyan, int magenta,
EAPI void imlib_context_set_cliprect(int x, int y, int w, int h); int yellow, int alpha);
EAPI void imlib_context_set_TTF_encoding(Imlib_TTF_Encoding encoding); EAPI void imlib_context_set_color_range(Imlib_Color_Range
color_range);
EAPI void imlib_context_set_progress_function(Imlib_Progress_Function
progress_function);
EAPI void imlib_context_set_progress_granularity(char
progress_granularity);
EAPI void imlib_context_set_image(Imlib_Image image);
EAPI void imlib_context_set_cliprect(int x, int y, int w, int h);
EAPI void imlib_context_set_TTF_encoding(Imlib_TTF_Encoding encoding);
/* context getting */ /* context getting */
# ifndef X_DISPLAY_MISSING #ifndef X_DISPLAY_MISSING
EAPI Display *imlib_context_get_display(void); EAPI Display *imlib_context_get_display(void);
EAPI Visual *imlib_context_get_visual(void); EAPI Visual *imlib_context_get_visual(void);
EAPI Colormap imlib_context_get_colormap(void); EAPI Colormap imlib_context_get_colormap(void);
EAPI Drawable imlib_context_get_drawable(void); EAPI Drawable imlib_context_get_drawable(void);
EAPI Pixmap imlib_context_get_mask(void); EAPI Pixmap imlib_context_get_mask(void);
# endif #endif
EAPI char imlib_context_get_dither_mask(void); EAPI char imlib_context_get_dither_mask(void);
EAPI char imlib_context_get_anti_alias(void); EAPI char imlib_context_get_anti_alias(void);
EAPI int imlib_context_get_mask_alpha_threshold(void); EAPI int imlib_context_get_mask_alpha_threshold(void);
EAPI char imlib_context_get_dither(void); EAPI char imlib_context_get_dither(void);
EAPI char imlib_context_get_blend(void); EAPI char imlib_context_get_blend(void);
EAPI Imlib_Color_Modifier imlib_context_get_color_modifier(void); EAPI Imlib_Color_Modifier imlib_context_get_color_modifier(void);
EAPI Imlib_Operation imlib_context_get_operation(void); EAPI Imlib_Operation imlib_context_get_operation(void);
EAPI Imlib_Font imlib_context_get_font(void); EAPI Imlib_Font imlib_context_get_font(void);
EAPI double imlib_context_get_angle(void); EAPI double imlib_context_get_angle(void);
EAPI Imlib_Text_Direction imlib_context_get_direction(void); EAPI Imlib_Text_Direction imlib_context_get_direction(void);
EAPI void imlib_context_get_color(int *red, int *green, int *blue, int *alpha); EAPI void imlib_context_get_color(int *red, int *green, int *blue,
EAPI void imlib_context_get_color_hsva(float *hue, float *saturation, float *value, int *alpha); int *alpha);
EAPI void imlib_context_get_color_hlsa(float *hue, float *lightness, float *saturation, int *alpha); EAPI void imlib_context_get_color_hsva(float *hue, float *saturation,
EAPI void imlib_context_get_color_cmya(int *cyan, int *magenta, int *yellow, int *alpha); float *value, int *alpha);
EAPI Imlib_Color *imlib_context_get_imlib_color(void); EAPI void imlib_context_get_color_hlsa(float *hue, float *lightness,
EAPI Imlib_Color_Range imlib_context_get_color_range(void); float *saturation, int *alpha);
EAPI Imlib_Progress_Function imlib_context_get_progress_function(void); EAPI void imlib_context_get_color_cmya(int *cyan, int *magenta,
EAPI char imlib_context_get_progress_granularity(void); int *yellow, int *alpha);
EAPI Imlib_Image imlib_context_get_image(void); EAPI Imlib_Color *imlib_context_get_imlib_color(void);
EAPI void imlib_context_get_cliprect(int *x, int *y, int *w, int *h); EAPI Imlib_Color_Range imlib_context_get_color_range(void);
EAPI Imlib_TTF_Encoding imlib_context_get_TTF_encoding(void); EAPI Imlib_Progress_Function imlib_context_get_progress_function(void);
EAPI char imlib_context_get_progress_granularity(void);
EAPI Imlib_Image imlib_context_get_image(void);
EAPI void imlib_context_get_cliprect(int *x, int *y, int *w, int *h);
EAPI Imlib_TTF_Encoding imlib_context_get_TTF_encoding(void);
EAPI int imlib_get_cache_size(void); EAPI int imlib_get_cache_size(void);
EAPI void imlib_set_cache_size(int bytes); EAPI void imlib_set_cache_size(int bytes);
EAPI int imlib_get_color_usage(void); EAPI int imlib_get_color_usage(void);
EAPI void imlib_set_color_usage(int max); EAPI void imlib_set_color_usage(int max);
EAPI void imlib_flush_loaders(void); EAPI void imlib_flush_loaders(void);
# ifndef X_DISPLAY_MISSING
EAPI int imlib_get_visual_depth(Display * display, Visual * visual);
EAPI Visual *imlib_get_best_visual(Display * display, int screen,
int *depth_return);
# endif
EAPI Imlib_Image imlib_load_image(const char *file); #ifndef X_DISPLAY_MISSING
EAPI Imlib_Image imlib_load_image_immediately(const char *file); EAPI int imlib_get_visual_depth(Display * display, Visual * visual);
EAPI Imlib_Image imlib_load_image_without_cache(const char *file); EAPI Visual *imlib_get_best_visual(Display * display, int screen,
EAPI Imlib_Image imlib_load_image_immediately_without_cache(const char *file); int *depth_return);
EAPI Imlib_Image imlib_load_image_with_error_return(const char *file, #endif
EAPI Imlib_Image imlib_load_image(const char *file);
EAPI Imlib_Image imlib_load_image_immediately(const char *file);
EAPI Imlib_Image imlib_load_image_without_cache(const char *file);
EAPI Imlib_Image imlib_load_image_immediately_without_cache(const char
*file);
EAPI Imlib_Image imlib_load_image_with_error_return(const char *file,
Imlib_Load_Error * Imlib_Load_Error *
error_return); error_return);
EAPI void imlib_free_image(void); EAPI void imlib_free_image(void);
EAPI void imlib_free_image_and_decache(void); EAPI void imlib_free_image_and_decache(void);
/* query/modify image parameters */ /* query/modify image parameters */
EAPI int imlib_image_get_width(void); EAPI int imlib_image_get_width(void);
EAPI int imlib_image_get_height(void); EAPI int imlib_image_get_height(void);
EAPI const char *imlib_image_get_filename(void); EAPI const char *imlib_image_get_filename(void);
EAPI DATA32 *imlib_image_get_data(void); EAPI DATA32 *imlib_image_get_data(void);
EAPI DATA32 *imlib_image_get_data_for_reading_only(void); EAPI DATA32 *imlib_image_get_data_for_reading_only(void);
EAPI void imlib_image_put_back_data(DATA32 * data); EAPI void imlib_image_put_back_data(DATA32 * data);
EAPI char imlib_image_has_alpha(void); EAPI char imlib_image_has_alpha(void);
EAPI void imlib_image_set_changes_on_disk(void); EAPI void imlib_image_set_changes_on_disk(void);
EAPI void imlib_image_get_border(Imlib_Border * border); EAPI void imlib_image_get_border(Imlib_Border * border);
EAPI void imlib_image_set_border(Imlib_Border * border); EAPI void imlib_image_set_border(Imlib_Border * border);
EAPI void imlib_image_set_format(const char *format); EAPI void imlib_image_set_format(const char *format);
EAPI void imlib_image_set_irrelevant_format(char irrelevant); EAPI void imlib_image_set_irrelevant_format(char irrelevant);
EAPI void imlib_image_set_irrelevant_border(char irrelevant); EAPI void imlib_image_set_irrelevant_border(char irrelevant);
EAPI void imlib_image_set_irrelevant_alpha(char irrelevant); EAPI void imlib_image_set_irrelevant_alpha(char irrelevant);
EAPI char *imlib_image_format(void); EAPI char *imlib_image_format(void);
EAPI void imlib_image_set_has_alpha(char has_alpha); EAPI void imlib_image_set_has_alpha(char has_alpha);
EAPI void imlib_image_query_pixel(int x, int y, Imlib_Color * color_return); EAPI void imlib_image_query_pixel(int x, int y,
EAPI void imlib_image_query_pixel_hsva(int x, int y, float *hue, float *saturation, float *value, int *alpha); Imlib_Color * color_return);
EAPI void imlib_image_query_pixel_hlsa(int x, int y, float *hue, float *lightness, float *saturation, int *alpha); EAPI void imlib_image_query_pixel_hsva(int x, int y, float *hue,
EAPI void imlib_image_query_pixel_cmya(int x, int y, int *cyan, int *magenta, int *yellow, int *alpha); float *saturation,
float *value, int *alpha);
EAPI void imlib_image_query_pixel_hlsa(int x, int y, float *hue,
float *lightness,
float *saturation, int *alpha);
EAPI void imlib_image_query_pixel_cmya(int x, int y, int *cyan,
int *magenta, int *yellow,
int *alpha);
/* rendering functions */ /* rendering functions */
# ifndef X_DISPLAY_MISSING #ifndef X_DISPLAY_MISSING
EAPI void imlib_render_pixmaps_for_whole_image(Pixmap * pixmap_return, EAPI void imlib_render_pixmaps_for_whole_image(Pixmap * pixmap_return,
Pixmap * mask_return); Pixmap * mask_return);
EAPI void imlib_render_pixmaps_for_whole_image_at_size(Pixmap * pixmap_return, EAPI void imlib_render_pixmaps_for_whole_image_at_size(Pixmap *
Pixmap * mask_return, pixmap_return,
int width, int height); Pixmap *
EAPI void imlib_free_pixmap_and_mask(Pixmap pixmap); mask_return,
EAPI void imlib_render_image_on_drawable(int x, int y); int width,
EAPI void imlib_render_image_on_drawable_at_size(int x, int y, int width, int height);
int height); EAPI void imlib_free_pixmap_and_mask(Pixmap pixmap);
EAPI void imlib_render_image_part_on_drawable_at_size(int source_x, EAPI void imlib_render_image_on_drawable(int x, int y);
int source_y, EAPI void imlib_render_image_on_drawable_at_size(int x, int y,
int source_width, int width,
int source_height, int x, int height);
int y, int width, EAPI void imlib_render_image_part_on_drawable_at_size(int source_x,
int height); int source_y,
EAPI DATA32 imlib_render_get_pixel_color(void); int
# endif source_width, int
EAPI void imlib_blend_image_onto_image(Imlib_Image source_image, source_height,
char merge_alpha, int source_x, int x, int y,
int source_y, int source_width, int width,
int source_height, int destination_x, int height);
int destination_y, int destination_width, EAPI DATA32 imlib_render_get_pixel_color(void);
int destination_height); #endif
EAPI void imlib_blend_image_onto_image(Imlib_Image source_image,
char merge_alpha,
int source_x, int source_y,
int source_width,
int source_height,
int destination_x,
int destination_y,
int destination_width,
int destination_height);
/* creation functions */ /* creation functions */
EAPI Imlib_Image imlib_create_image(int width, int height); EAPI Imlib_Image imlib_create_image(int width, int height);
EAPI Imlib_Image imlib_create_image_using_data(int width, int height, EAPI Imlib_Image imlib_create_image_using_data(int width, int height,
DATA32 * data); DATA32 * data);
EAPI Imlib_Image imlib_create_image_using_copied_data(int width, int height, EAPI Imlib_Image imlib_create_image_using_copied_data(int width,
int height,
DATA32 * data); DATA32 * data);
# ifndef X_DISPLAY_MISSING #ifndef X_DISPLAY_MISSING
EAPI Imlib_Image imlib_create_image_from_drawable(Pixmap mask, int x, int y, EAPI Imlib_Image imlib_create_image_from_drawable(Pixmap mask,
int x, int y,
int width, int height, int width, int height,
char need_to_grab_x); char need_to_grab_x);
EAPI Imlib_Image imlib_create_image_from_ximage(XImage *image, XImage *mask, int x, int y, EAPI Imlib_Image imlib_create_image_from_ximage(XImage * image,
int width, int height, XImage * mask,
char need_to_grab_x); int x, int y,
EAPI Imlib_Image imlib_create_scaled_image_from_drawable(Pixmap mask, int width, int height,
char need_to_grab_x);
EAPI Imlib_Image imlib_create_scaled_image_from_drawable(Pixmap mask,
int source_x, int source_x,
int source_y, int source_y,
int source_width, int source_width,
int source_height, int
int destination_width, source_height, int
int destination_height, destination_width, int
char need_to_grab_x, destination_height, char
char need_to_grab_x, char
get_mask_from_shape); get_mask_from_shape);
EAPI char imlib_copy_drawable_to_image(Pixmap mask, int x, int y, int width, EAPI char imlib_copy_drawable_to_image(Pixmap mask, int x, int y,
int height, int destination_x, int width, int height,
int destination_y, char need_to_grab_x); int destination_x,
# endif int destination_y,
EAPI Imlib_Image imlib_clone_image(void); char need_to_grab_x);
EAPI Imlib_Image imlib_create_cropped_image(int x, int y, int width, #endif
EAPI Imlib_Image imlib_clone_image(void);
EAPI Imlib_Image imlib_create_cropped_image(int x, int y, int width,
int height); int height);
EAPI Imlib_Image imlib_create_cropped_scaled_image(int source_x, int source_y, EAPI Imlib_Image imlib_create_cropped_scaled_image(int source_x,
int source_y,
int source_width, int source_width,
int source_height, int source_height,
int destination_width, int destination_width,
int destination_height); int destination_height);
/* imlib updates. lists of rectangles for storing required update draws */ /* imlib updates. lists of rectangles for storing required update draws */
EAPI Imlib_Updates imlib_updates_clone(Imlib_Updates updates); EAPI Imlib_Updates imlib_updates_clone(Imlib_Updates updates);
EAPI Imlib_Updates imlib_update_append_rect(Imlib_Updates updates, int x, int y, EAPI Imlib_Updates imlib_update_append_rect(Imlib_Updates updates,
int w, int h); int x, int y, int w, int h);
EAPI Imlib_Updates imlib_updates_merge(Imlib_Updates updates, int w, int h); EAPI Imlib_Updates imlib_updates_merge(Imlib_Updates updates, int w, int h);
EAPI Imlib_Updates imlib_updates_merge_for_rendering(Imlib_Updates updates, EAPI Imlib_Updates imlib_updates_merge_for_rendering(Imlib_Updates updates,
int w, int h); int w, int h);
EAPI void imlib_updates_free(Imlib_Updates updates); EAPI void imlib_updates_free(Imlib_Updates updates);
EAPI Imlib_Updates imlib_updates_get_next(Imlib_Updates updates); EAPI Imlib_Updates imlib_updates_get_next(Imlib_Updates updates);
EAPI void imlib_updates_get_coordinates(Imlib_Updates updates, int *x_return, EAPI void imlib_updates_get_coordinates(Imlib_Updates updates,
int *y_return, int *width_return, int *x_return,
int *height_return); int *y_return,
EAPI void imlib_updates_set_coordinates(Imlib_Updates updates, int x, int y, int *width_return,
int width, int height); int *height_return);
EAPI void imlib_render_image_updates_on_drawable(Imlib_Updates updates, int x, EAPI void imlib_updates_set_coordinates(Imlib_Updates updates,
int y); int x, int y,
EAPI Imlib_Updates imlib_updates_init(void); int width, int height);
EAPI Imlib_Updates imlib_updates_append_updates(Imlib_Updates updates, EAPI void imlib_render_image_updates_on_drawable(Imlib_Updates
Imlib_Updates appended_updates); updates,
int x, int y);
EAPI Imlib_Updates imlib_updates_init(void);
EAPI Imlib_Updates imlib_updates_append_updates(Imlib_Updates updates,
Imlib_Updates
appended_updates);
/* image modification */ /* image modification */
EAPI void imlib_image_flip_horizontal(void); EAPI void imlib_image_flip_horizontal(void);
EAPI void imlib_image_flip_vertical(void); EAPI void imlib_image_flip_vertical(void);
EAPI void imlib_image_flip_diagonal(void); EAPI void imlib_image_flip_diagonal(void);
EAPI void imlib_image_orientate(int orientation); EAPI void imlib_image_orientate(int orientation);
EAPI void imlib_image_blur(int radius); EAPI void imlib_image_blur(int radius);
EAPI void imlib_image_sharpen(int radius); EAPI void imlib_image_sharpen(int radius);
EAPI void imlib_image_tile_horizontal(void); EAPI void imlib_image_tile_horizontal(void);
EAPI void imlib_image_tile_vertical(void); EAPI void imlib_image_tile_vertical(void);
EAPI void imlib_image_tile(void); EAPI void imlib_image_tile(void);
/* fonts and text */ /* fonts and text */
EAPI Imlib_Font imlib_load_font(const char *font_name); EAPI Imlib_Font imlib_load_font(const char *font_name);
EAPI void imlib_free_font(void); EAPI void imlib_free_font(void);
/* NB! The four functions below are deprecated. */ /* NB! The four functions below are deprecated. */
EAPI int imlib_insert_font_into_fallback_chain(Imlib_Font font, Imlib_Font fallback_font); EAPI int imlib_insert_font_into_fallback_chain(Imlib_Font font,
EAPI void imlib_remove_font_from_fallback_chain(Imlib_Font fallback_font); Imlib_Font
EAPI Imlib_Font imlib_get_prev_font_in_fallback_chain(Imlib_Font fn); fallback_font);
EAPI Imlib_Font imlib_get_next_font_in_fallback_chain(Imlib_Font fn); EAPI void imlib_remove_font_from_fallback_chain(Imlib_Font
fallback_font);
EAPI Imlib_Font imlib_get_prev_font_in_fallback_chain(Imlib_Font fn);
EAPI Imlib_Font imlib_get_next_font_in_fallback_chain(Imlib_Font fn);
/* NB! The four functions above are deprecated. */ /* NB! The four functions above are deprecated. */
EAPI void imlib_text_draw(int x, int y, const char *text); EAPI void imlib_text_draw(int x, int y, const char *text);
EAPI void imlib_text_draw_with_return_metrics(int x, int y, const char *text, EAPI void imlib_text_draw_with_return_metrics(int x, int y,
int *width_return, const char *text,
int *height_return, int *width_return,
int *horizontal_advance_return, int *height_return, int
int *vertical_advance_return); *horizontal_advance_return, int
EAPI void imlib_get_text_size(const char *text, int *width_return, *vertical_advance_return);
int *height_return); EAPI void imlib_get_text_size(const char *text,
EAPI void imlib_get_text_advance(const char *text, int *width_return, int *height_return);
int *horizontal_advance_return, EAPI void imlib_get_text_advance(const char *text,
int *vertical_advance_return); int *horizontal_advance_return,
EAPI int imlib_get_text_inset(const char *text); int *vertical_advance_return);
EAPI void imlib_add_path_to_font_path(const char *path); EAPI int imlib_get_text_inset(const char *text);
EAPI void imlib_remove_path_from_font_path(const char *path); EAPI void imlib_add_path_to_font_path(const char *path);
EAPI char **imlib_list_font_path(int *number_return); EAPI void imlib_remove_path_from_font_path(const char *path);
EAPI int imlib_text_get_index_and_location(const char *text, int x, int y, EAPI char **imlib_list_font_path(int *number_return);
int *char_x_return, EAPI int imlib_text_get_index_and_location(const char *text,
int *char_y_return, int x, int y,
int *char_width_return, int *char_x_return,
int *char_height_return); int *char_y_return,
EAPI void imlib_text_get_location_at_index(const char *text, int index, int *char_width_return,
int *char_x_return, int *char_height_return);
int *char_y_return, EAPI void imlib_text_get_location_at_index(const char *text,
int *char_width_return, int index,
int *char_height_return); int *char_x_return,
EAPI char **imlib_list_fonts(int *number_return); int *char_y_return,
EAPI void imlib_free_font_list(char **font_list, int number); int *char_width_return,
EAPI int imlib_get_font_cache_size(void); int *char_height_return);
EAPI void imlib_set_font_cache_size(int bytes); EAPI char **imlib_list_fonts(int *number_return);
EAPI void imlib_flush_font_cache(void); EAPI void imlib_free_font_list(char **font_list, int number);
EAPI int imlib_get_font_ascent(void); EAPI int imlib_get_font_cache_size(void);
EAPI int imlib_get_font_descent(void); EAPI void imlib_set_font_cache_size(int bytes);
EAPI int imlib_get_maximum_font_ascent(void); EAPI void imlib_flush_font_cache(void);
EAPI int imlib_get_maximum_font_descent(void); EAPI int imlib_get_font_ascent(void);
EAPI int imlib_get_font_descent(void);
EAPI int imlib_get_maximum_font_ascent(void);
EAPI int imlib_get_maximum_font_descent(void);
/* color modifiers */ /* color modifiers */
EAPI Imlib_Color_Modifier imlib_create_color_modifier(void); EAPI Imlib_Color_Modifier imlib_create_color_modifier(void);
EAPI void imlib_free_color_modifier(void); EAPI void imlib_free_color_modifier(void);
EAPI void imlib_modify_color_modifier_gamma(double gamma_value); EAPI void imlib_modify_color_modifier_gamma(double gamma_value);
EAPI void imlib_modify_color_modifier_brightness(double brightness_value); EAPI void imlib_modify_color_modifier_brightness(double
EAPI void imlib_modify_color_modifier_contrast(double contrast_value); brightness_value);
EAPI void imlib_set_color_modifier_tables(DATA8 * red_table, EAPI void imlib_modify_color_modifier_contrast(double
DATA8 * green_table, contrast_value);
DATA8 * blue_table, EAPI void imlib_set_color_modifier_tables(DATA8 * red_table,
DATA8 * alpha_table); DATA8 * green_table,
EAPI void imlib_get_color_modifier_tables(DATA8 * red_table, DATA8 * blue_table,
DATA8 * green_table, DATA8 * alpha_table);
DATA8 * blue_table, EAPI void imlib_get_color_modifier_tables(DATA8 * red_table,
DATA8 * alpha_table); DATA8 * green_table,
EAPI void imlib_reset_color_modifier(void); DATA8 * blue_table,
EAPI void imlib_apply_color_modifier(void); DATA8 * alpha_table);
EAPI void imlib_apply_color_modifier_to_rectangle(int x, int y, int width, EAPI void imlib_reset_color_modifier(void);
int height); EAPI void imlib_apply_color_modifier(void);
EAPI void imlib_apply_color_modifier_to_rectangle(int x, int y,
int width,
int height);
/* drawing on images */ /* drawing on images */
EAPI Imlib_Updates imlib_image_draw_pixel(int x, int y, char make_updates); EAPI Imlib_Updates imlib_image_draw_pixel(int x, int y, char make_updates);
EAPI Imlib_Updates imlib_image_draw_line(int x1, int y1, int x2, int y2, EAPI Imlib_Updates imlib_image_draw_line(int x1, int y1, int x2, int y2,
char make_updates); char make_updates);
EAPI void imlib_image_draw_rectangle(int x, int y, int width, int height); EAPI void imlib_image_draw_rectangle(int x, int y,
EAPI void imlib_image_fill_rectangle(int x, int y, int width, int height); int width, int height);
EAPI void imlib_image_copy_alpha_to_image(Imlib_Image image_source, int x, EAPI void imlib_image_fill_rectangle(int x, int y,
int y); int width, int height);
EAPI void imlib_image_copy_alpha_rectangle_to_image(Imlib_Image image_source, EAPI void imlib_image_copy_alpha_to_image(Imlib_Image image_source,
int x, int y, int width, int x, int y);
int height, EAPI void imlib_image_copy_alpha_rectangle_to_image(Imlib_Image
int destination_x, image_source,
int destination_y); int x, int y,
EAPI void imlib_image_scroll_rect(int x, int y, int width, int height, int width,
int delta_x, int delta_y); int height,
EAPI void imlib_image_copy_rect(int x, int y, int width, int height, int new_x, int destination_x,
int new_y); int
destination_y);
EAPI void imlib_image_scroll_rect(int x, int y, int width, int height,
int delta_x, int delta_y);
EAPI void imlib_image_copy_rect(int x, int y, int width, int height,
int new_x, int new_y);
/* polygons */ /* polygons */
EAPI ImlibPolygon imlib_polygon_new(void); EAPI ImlibPolygon imlib_polygon_new(void);
EAPI void imlib_polygon_free(ImlibPolygon poly); EAPI void imlib_polygon_free(ImlibPolygon poly);
EAPI void imlib_polygon_add_point(ImlibPolygon poly, int x, int y); EAPI void imlib_polygon_add_point(ImlibPolygon poly, int x, int y);
EAPI void imlib_image_draw_polygon(ImlibPolygon poly, unsigned char closed); EAPI void imlib_image_draw_polygon(ImlibPolygon poly,
EAPI void imlib_image_fill_polygon(ImlibPolygon poly); unsigned char closed);
EAPI void imlib_polygon_get_bounds(ImlibPolygon poly, int *px1, int *py1, EAPI void imlib_image_fill_polygon(ImlibPolygon poly);
int *px2, int *py2); EAPI void imlib_polygon_get_bounds(ImlibPolygon poly,
EAPI unsigned char imlib_polygon_contains_point(ImlibPolygon poly, int x, int *px1, int *py1,
int y); int *px2, int *py2);
EAPI unsigned char imlib_polygon_contains_point(ImlibPolygon poly,
int x, int y);
/* ellipses */ /* ellipses */
EAPI void imlib_image_draw_ellipse(int xc, int yc, int a, int b); EAPI void imlib_image_draw_ellipse(int xc, int yc, int a, int b);
EAPI void imlib_image_fill_ellipse(int xc, int yc, int a, int b); EAPI void imlib_image_fill_ellipse(int xc, int yc, int a, int b);
/* color ranges */ /* color ranges */
EAPI Imlib_Color_Range imlib_create_color_range(void); EAPI Imlib_Color_Range imlib_create_color_range(void);
EAPI void imlib_free_color_range(void); EAPI void imlib_free_color_range(void);
EAPI void imlib_add_color_to_color_range(int distance_away); EAPI void imlib_add_color_to_color_range(int distance_away);
EAPI void imlib_image_fill_color_range_rectangle(int x, int y, int width, EAPI void imlib_image_fill_color_range_rectangle(int x, int y,
int height, double angle); int width,
EAPI void imlib_image_fill_hsva_color_range_rectangle(int x, int y, int width, int height,
int height, double angle); double angle);
EAPI void imlib_image_fill_hsva_color_range_rectangle(int x, int y,
int width,
int height,
double
angle);
/* image data */ /* image data */
EAPI void imlib_image_attach_data_value(const char *key, void *data, int value, EAPI void imlib_image_attach_data_value(const char *key,
Imlib_Data_Destructor_Function void *data, int value,
destructor_function); Imlib_Data_Destructor_Function
EAPI void *imlib_image_get_attached_data(const char *key); destructor_function);
EAPI int imlib_image_get_attached_value(const char *key); EAPI void *imlib_image_get_attached_data(const char *key);
EAPI void imlib_image_remove_attached_data_value(const char *key); EAPI int imlib_image_get_attached_value(const char *key);
EAPI void imlib_image_remove_and_free_attached_data_value(const char *key); EAPI void imlib_image_remove_attached_data_value(const char *key);
EAPI void imlib_image_remove_and_free_attached_data_value(const char
*key);
/* saving */ /* saving */
EAPI void imlib_save_image(const char *filename); EAPI void imlib_save_image(const char *filename);
EAPI void imlib_save_image_with_error_return(const char *filename, EAPI void imlib_save_image_with_error_return(const char *filename,
Imlib_Load_Error * error_return); Imlib_Load_Error *
error_return);
/* FIXME: */ /* FIXME: */
/* need to add arbitrary rotation routines */ /* need to add arbitrary rotation routines */
/* rotation/skewing */ /* rotation/skewing */
EAPI Imlib_Image imlib_create_rotated_image(double angle); EAPI Imlib_Image imlib_create_rotated_image(double angle);
/* rotation from buffer to context (without copying)*/ /* rotation from buffer to context (without copying)*/
EAPI void imlib_rotate_image_from_buffer(double angle, EAPI void imlib_rotate_image_from_buffer(double angle,
Imlib_Image source_image); Imlib_Image source_image);
EAPI void imlib_blend_image_onto_image_at_angle(Imlib_Image source_image, EAPI void imlib_blend_image_onto_image_at_angle(Imlib_Image
char merge_alpha, int source_x, source_image,
int source_y, int source_width, char merge_alpha,
int source_height, int source_x,
int destination_x, int source_y,
int destination_y, int angle_x, int source_width,
int angle_y); int source_height,
EAPI void imlib_blend_image_onto_image_skewed(Imlib_Image source_image, int destination_x,
char merge_alpha, int source_x, int destination_y,
int source_y, int source_width, int angle_x,
int source_height, int angle_y);
int destination_x, EAPI void imlib_blend_image_onto_image_skewed(Imlib_Image
int destination_y, int h_angle_x, source_image,
int h_angle_y, int v_angle_x, char merge_alpha,
int v_angle_y); int source_x,
# ifndef X_DISPLAY_MISSING int source_y,
EAPI void imlib_render_image_on_drawable_skewed(int source_x, int source_y, int source_width,
int source_width, int source_height,
int source_height, int destination_x,
int destination_x, int destination_y,
int destination_y, int h_angle_x,
int h_angle_x, int h_angle_y, int h_angle_y,
int v_angle_x, int v_angle_y); int v_angle_x,
EAPI void imlib_render_image_on_drawable_at_angle(int source_x, int source_y, int v_angle_y);
int source_width, #ifndef X_DISPLAY_MISSING
int source_height, EAPI void imlib_render_image_on_drawable_skewed(int source_x,
int destination_x, int source_y,
int destination_y, int source_width,
int angle_x, int angle_y); int source_height,
# endif int destination_x,
int destination_y,
int h_angle_x,
int h_angle_y,
int v_angle_x,
int v_angle_y);
EAPI void imlib_render_image_on_drawable_at_angle(int source_x,
int source_y,
int source_width,
int source_height,
int destination_x,
int destination_y,
int angle_x,
int angle_y);
#endif
/* image filters */ /* image filters */
EAPI void imlib_image_filter(void); EAPI void imlib_image_filter(void);
EAPI Imlib_Filter imlib_create_filter(int initsize); EAPI Imlib_Filter imlib_create_filter(int initsize);
EAPI void imlib_context_set_filter(Imlib_Filter filter); EAPI void imlib_context_set_filter(Imlib_Filter filter);
EAPI Imlib_Filter imlib_context_get_filter(void); EAPI Imlib_Filter imlib_context_get_filter(void);
EAPI void imlib_free_filter(void); EAPI void imlib_free_filter(void);
EAPI void imlib_filter_set(int xoff, int yoff, int a, int r, int g, int b); EAPI void imlib_filter_set(int xoff, int yoff,
EAPI void imlib_filter_set_alpha(int xoff, int yoff, int a, int r, int g, int a, int r, int g, int b);
int b); EAPI void imlib_filter_set_alpha(int xoff, int yoff,
EAPI void imlib_filter_set_red(int xoff, int yoff, int a, int r, int g, int b); int a, int r, int g, int b);
EAPI void imlib_filter_set_green(int xoff, int yoff, int a, int r, int g, EAPI void imlib_filter_set_red(int xoff, int yoff,
int b); int a, int r, int g, int b);
EAPI void imlib_filter_set_blue(int xoff, int yoff, int a, int r, int g, int b); EAPI void imlib_filter_set_green(int xoff, int yoff,
EAPI void imlib_filter_constants(int a, int r, int g, int b); int a, int r, int g, int b);
EAPI void imlib_filter_divisors(int a, int r, int g, int b); EAPI void imlib_filter_set_blue(int xoff, int yoff,
int a, int r, int g, int b);
EAPI void imlib_filter_constants(int a, int r, int g, int b);
EAPI void imlib_filter_divisors(int a, int r, int g, int b);
EAPI void imlib_apply_filter(char *script, ...); EAPI void imlib_apply_filter(char *script, ...);
EAPI void imlib_image_clear(void); EAPI void imlib_image_clear(void);
EAPI void imlib_image_clear_color(int r, int g, int b, int a); EAPI void imlib_image_clear_color(int r, int g, int b, int a);
# ifdef __cplusplus /* *INDENT-OFF* */
#ifdef __cplusplus
} }
# endif #endif
/* *INDENT-ON* */
#endif #endif

View File

@ -4,9 +4,9 @@
#define PR_(sym) __##sym #define PR_(sym) __##sym
#if defined(__GNUC__) && (__GNUC__ >= 4) #if defined(__GNUC__) && (__GNUC__ >= 4)
# define HIDDEN_(sym) .hidden PR_(sym) #define HIDDEN_(sym) .hidden PR_(sym)
#else #else
# define HIDDEN_(sym) #define HIDDEN_(sym)
#endif #endif
#define FN_(sym) \ #define FN_(sym) \

View File

@ -80,7 +80,7 @@ else \
_w = 0; _h = 0; \ _w = 0; _h = 0; \
} \ } \
} }
/* /*
* 1) Basic Saturation - 8 bit unsigned * 1) Basic Saturation - 8 bit unsigned
* *
@ -344,8 +344,8 @@ nc = (tmp | (-(tmp >> 8))) & (~(tmp >> 9));
tmp = (cc) + (((c) - 127) << 1); \ tmp = (cc) + (((c) - 127) << 1); \
nc = (tmp | (-(tmp >> 8))) & (~(tmp >> 9)); nc = (tmp | (-(tmp >> 8))) & (~(tmp >> 9));
extern int pow_lut_initialized; extern int pow_lut_initialized;
extern DATA8 pow_lut[256][256]; extern DATA8 pow_lut[256][256];
#define BLEND_DST_ALPHA(r1, g1, b1, a1, dest) \ #define BLEND_DST_ALPHA(r1, g1, b1, a1, dest) \
{ DATA8 _aa; \ { DATA8 _aa; \
@ -376,8 +376,7 @@ RESHADE_COLOR_WITH_ALPHA(a1, R_VAL(dest), r1, R_VAL(dest)); \
RESHADE_COLOR_WITH_ALPHA(a1, G_VAL(dest), g1, G_VAL(dest)); \ RESHADE_COLOR_WITH_ALPHA(a1, G_VAL(dest), g1, G_VAL(dest)); \
RESHADE_COLOR_WITH_ALPHA(a1, B_VAL(dest), b1, B_VAL(dest)); RESHADE_COLOR_WITH_ALPHA(a1, B_VAL(dest), b1, B_VAL(dest));
enum _imlibop enum _imlibop {
{
OP_COPY, OP_COPY,
OP_ADD, OP_ADD,
OP_SUBTRACT, OP_SUBTRACT,
@ -386,319 +385,228 @@ enum _imlibop
typedef enum _imlibop ImlibOp; typedef enum _imlibop ImlibOp;
typedef void (*ImlibBlendFunction)(DATA32*, int, DATA32*, int, int, int, typedef void (*ImlibBlendFunction) (DATA32 *, int, DATA32 *, int, int,
ImlibColorModifier *); int, ImlibColorModifier *);
ImlibBlendFunction ImlibBlendFunction __imlib_GetBlendFunction(ImlibOp op, char merge_alpha,
__imlib_GetBlendFunction(ImlibOp op, char merge_alpha, char blend, char rgb_src, char blend, char rgb_src,
ImlibColorModifier * cm); ImlibColorModifier * cm);
void void __imlib_BlendImageToImage(ImlibImage * im_src,
__imlib_BlendImageToImage(ImlibImage *im_src, ImlibImage *im_dst, ImlibImage * im_dst, char aa,
char aa, char blend, char merge_alpha, char blend, char merge_alpha,
int ssx, int ssy, int ssw, int ssh, int ssx, int ssy,
int ddx, int ddy, int ddw, int ddh, int ssw, int ssh,
ImlibColorModifier *cm, ImlibOp op, int ddx, int ddy,
int clx, int cly, int clw, int clh); int ddw, int ddh,
void ImlibColorModifier * cm,
__imlib_BlendRGBAToData(DATA32 *src, int src_w, int src_h, DATA32 *dst, ImlibOp op, int clx, int cly,
int dst_w, int dst_h, int sx, int sy, int dx, int dy, int clw, int clh);
int w, int h, char blend, char merge_alpha, void __imlib_BlendRGBAToData(DATA32 * src, int src_w, int src_h,
ImlibColorModifier *cm, ImlibOp op, char rgb_src); DATA32 * dst, int dst_w, int dst_h,
void int sx, int sy, int dx, int dy,
__imlib_build_pow_lut(void); int w, int h,
char blend, char merge_alpha,
ImlibColorModifier * cm, ImlibOp op,
char rgb_src);
void __imlib_build_pow_lut(void);
/* *INDENT-OFF* */
#ifdef DO_MMX_ASM #ifdef DO_MMX_ASM
void void __imlib_mmx_blend_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_mmx_blend_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_mmx_blend_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_mmx_blend_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst, void __imlib_mmx_copy_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_mmx_copy_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_mmx_copy_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_mmx_copy_rgb_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_mmx_copy_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst, void __imlib_mmx_add_blend_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_mmx_add_blend_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_mmx_copy_rgb_to_rgba(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_mmx_add_copy_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_mmx_add_blend_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, void __imlib_mmx_add_copy_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_mmx_add_copy_rgb_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_mmx_add_blend_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_mmx_subtract_blend_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_mmx_add_copy_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, void __imlib_mmx_subtract_blend_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_mmx_subtract_copy_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_mmx_add_copy_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_mmx_subtract_copy_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_mmx_add_copy_rgb_to_rgba(DATA32 *src, int sw, DATA32 *dst, void __imlib_mmx_subtract_copy_rgb_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_mmx_reshade_blend_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_mmx_subtract_blend_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_mmx_reshade_blend_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_mmx_subtract_blend_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst, void __imlib_mmx_reshade_copy_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_mmx_reshade_copy_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_mmx_subtract_copy_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_mmx_reshade_copy_rgb_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_mmx_subtract_copy_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_mmx_subtract_copy_rgb_to_rgba(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_mmx_reshade_blend_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_mmx_reshade_blend_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_mmx_reshade_copy_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_mmx_reshade_copy_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_mmx_reshade_copy_rgb_to_rgba(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void void __imlib_mmx_blend_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_mmx_blend_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_mmx_blend_rgba_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_mmx_blend_rgba_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, void __imlib_mmx_blend_rgb_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_mmx_blend_rgb_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_mmx_blend_rgb_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_mmx_copy_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_mmx_blend_rgb_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, void __imlib_mmx_copy_rgba_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_mmx_copy_rgb_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_mmx_copy_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_mmx_add_blend_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_mmx_copy_rgba_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, void __imlib_mmx_add_blend_rgba_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_mmx_add_blend_rgb_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_mmx_copy_rgb_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_mmx_add_blend_rgb_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_mmx_add_blend_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, void __imlib_mmx_add_copy_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_mmx_add_copy_rgba_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_mmx_add_blend_rgba_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_mmx_add_copy_rgb_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_mmx_add_blend_rgb_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, void __imlib_mmx_subtract_blend_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_mmx_subtract_blend_rgba_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_mmx_add_blend_rgb_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_mmx_subtract_blend_rgb_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_mmx_add_copy_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, void __imlib_mmx_subtract_blend_rgb_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_mmx_subtract_copy_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_mmx_add_copy_rgba_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_mmx_subtract_copy_rgba_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_mmx_add_copy_rgb_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, void __imlib_mmx_subtract_copy_rgb_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_mmx_reshade_blend_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_mmx_subtract_blend_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_mmx_reshade_blend_rgba_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_mmx_subtract_blend_rgba_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, void __imlib_mmx_reshade_blend_rgb_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_mmx_reshade_blend_rgb_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_mmx_subtract_blend_rgb_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_mmx_reshade_copy_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_mmx_subtract_blend_rgb_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, void __imlib_mmx_reshade_copy_rgba_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_mmx_reshade_copy_rgb_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_mmx_subtract_copy_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_mmx_subtract_copy_rgba_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_mmx_subtract_copy_rgb_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_mmx_reshade_blend_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_mmx_reshade_blend_rgba_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_mmx_reshade_blend_rgb_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_mmx_reshade_blend_rgb_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_mmx_reshade_copy_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_mmx_reshade_copy_rgba_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_mmx_reshade_copy_rgb_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
#elif DO_AMD64_ASM #elif DO_AMD64_ASM
void void __imlib_amd64_blend_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_amd64_blend_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_amd64_blend_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_amd64_blend_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst, void __imlib_amd64_copy_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_amd64_copy_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_amd64_copy_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_amd64_copy_rgb_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_amd64_copy_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst, void __imlib_amd64_add_blend_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_amd64_add_blend_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_amd64_copy_rgb_to_rgba(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_amd64_add_copy_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_amd64_add_blend_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, void __imlib_amd64_add_copy_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_amd64_add_copy_rgb_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_amd64_add_blend_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_amd64_subtract_blend_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_amd64_add_copy_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, void __imlib_amd64_subtract_blend_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_amd64_subtract_copy_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_amd64_add_copy_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_amd64_subtract_copy_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_amd64_add_copy_rgb_to_rgba(DATA32 *src, int sw, DATA32 *dst, void __imlib_amd64_subtract_copy_rgb_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_amd64_reshade_blend_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_amd64_subtract_blend_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_amd64_reshade_blend_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_amd64_subtract_blend_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst, void __imlib_amd64_reshade_copy_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_amd64_reshade_copy_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_amd64_subtract_copy_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_amd64_reshade_copy_rgb_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_amd64_subtract_copy_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_amd64_subtract_copy_rgb_to_rgba(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_amd64_reshade_blend_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_amd64_reshade_blend_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_amd64_reshade_copy_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_amd64_reshade_copy_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_amd64_reshade_copy_rgb_to_rgba(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void __imlib_amd64_blend_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_amd64_blend_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, void __imlib_amd64_blend_rgba_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_amd64_blend_rgb_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_amd64_blend_rgba_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_amd64_blend_rgb_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_amd64_blend_rgb_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, void __imlib_amd64_copy_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_amd64_copy_rgba_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_amd64_blend_rgb_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_amd64_copy_rgb_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_amd64_copy_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, void __imlib_amd64_add_blend_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_amd64_add_blend_rgba_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_amd64_copy_rgba_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_amd64_add_blend_rgb_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_amd64_copy_rgb_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, void __imlib_amd64_add_blend_rgb_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_amd64_add_copy_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_amd64_add_blend_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_amd64_add_copy_rgba_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_amd64_add_blend_rgba_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, void __imlib_amd64_add_copy_rgb_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_amd64_subtract_blend_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_amd64_add_blend_rgb_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_amd64_subtract_blend_rgba_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_amd64_add_blend_rgb_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, void __imlib_amd64_subtract_blend_rgb_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_amd64_subtract_blend_rgb_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_amd64_add_copy_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_amd64_subtract_copy_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_amd64_add_copy_rgba_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, void __imlib_amd64_subtract_copy_rgba_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_amd64_subtract_copy_rgb_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_amd64_add_copy_rgb_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_amd64_reshade_blend_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_amd64_subtract_blend_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, void __imlib_amd64_reshade_blend_rgba_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_amd64_reshade_blend_rgb_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_amd64_subtract_blend_rgba_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_amd64_reshade_blend_rgb_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_amd64_subtract_blend_rgb_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, void __imlib_amd64_reshade_copy_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
int dw, int w, int h, ImlibColorModifier *cm); int w, int h, ImlibColorModifier * cm);
void void __imlib_amd64_reshade_copy_rgba_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
__imlib_amd64_subtract_blend_rgb_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, int w, int h, ImlibColorModifier * cm);
int dw, int w, int h, ImlibColorModifier *cm); void __imlib_amd64_reshade_copy_rgb_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw,
void int w, int h, ImlibColorModifier * cm);
__imlib_amd64_subtract_copy_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_amd64_subtract_copy_rgba_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_amd64_subtract_copy_rgb_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_amd64_reshade_blend_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_amd64_reshade_blend_rgba_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_amd64_reshade_blend_rgb_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_amd64_reshade_blend_rgb_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_amd64_reshade_copy_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_amd64_reshade_copy_rgba_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
void
__imlib_amd64_reshade_copy_rgb_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst,
int dw, int w, int h, ImlibColorModifier *cm);
#endif #endif
/* *INDENT-ON* */
#endif #endif

View File

@ -7,26 +7,26 @@
extern DATA16 _max_colors; extern DATA16 _max_colors;
int __imlib_XActualDepth(Display * d, Visual * v); int __imlib_XActualDepth(Display * d, Visual * v);
Visual *__imlib_BestVisual(Display * d, int screen, Visual *__imlib_BestVisual(Display * d, int screen,
int *depth_return); int *depth_return);
DATA8 *__imlib_AllocColorTable(Display * d, Colormap cmap, DATA8 *__imlib_AllocColorTable(Display * d, Colormap cmap,
DATA8 * type_return, Visual * v); DATA8 * type_return, Visual * v);
DATA8 *__imlib_AllocColors332(Display * d, Colormap cmap, DATA8 *__imlib_AllocColors332(Display * d, Colormap cmap,
Visual * v); Visual * v);
DATA8 *__imlib_AllocColors666(Display * d, Colormap cmap, DATA8 *__imlib_AllocColors666(Display * d, Colormap cmap,
Visual * v); Visual * v);
DATA8 *__imlib_AllocColors232(Display * d, Colormap cmap, DATA8 *__imlib_AllocColors232(Display * d, Colormap cmap,
Visual * v); Visual * v);
DATA8 *__imlib_AllocColors222(Display * d, Colormap cmap, DATA8 *__imlib_AllocColors222(Display * d, Colormap cmap,
Visual * v); Visual * v);
DATA8 *__imlib_AllocColors221(Display * d, Colormap cmap, DATA8 *__imlib_AllocColors221(Display * d, Colormap cmap,
Visual * v); Visual * v);
DATA8 *__imlib_AllocColors121(Display * d, Colormap cmap, DATA8 *__imlib_AllocColors121(Display * d, Colormap cmap,
Visual * v); Visual * v);
DATA8 *__imlib_AllocColors111(Display * d, Colormap cmap, DATA8 *__imlib_AllocColors111(Display * d, Colormap cmap,
Visual * v); Visual * v);
DATA8 *__imlib_AllocColors1(Display * d, Colormap cmap, DATA8 *__imlib_AllocColors1(Display * d, Colormap cmap,
Visual * v); Visual * v);
#endif #endif

View File

@ -1,11 +1,16 @@
#ifndef __COLOR_HELPERS #ifndef __COLOR_HELPERS
#define __COLOR_HELPERS 1 #define __COLOR_HELPERS 1
#include "common.h" #include "common.h"
void __imlib_rgb_to_hsv(int r, int g, int b, float *hue, float *saturation, float *value); void __imlib_rgb_to_hsv(int r, int g, int b, float *hue,
void __imlib_hsv_to_rgb(float hue, float saturation, float value, int *r, int *g, int *b); float *saturation, float *value);
void __imlib_rgb_to_hls(int r, int g, int b, float *hue, float *lightness, float *saturation); void __imlib_hsv_to_rgb(float hue, float saturation, float value,
void __imlib_hls_to_rgb(float hue, float lightness, float saturation, int *r, int *g, int *b); int *r, int *g, int *b);
void __imlib_rgb_to_hls(int r, int g, int b, float *hue,
float *lightness, float *saturation);
void __imlib_hls_to_rgb(float hue, float lightness,
float saturation,
int *r, int *g, int *b);
#endif #endif

View File

@ -4,15 +4,14 @@
#include "common.h" #include "common.h"
#include "image.h" #include "image.h"
typedef struct _imlib_color_modifier ImlibColorModifier; typedef struct _imlib_color_modifier ImlibColorModifier;
struct _imlib_color_modifier struct _imlib_color_modifier {
{ DATA8 red_mapping[256];
DATA8 red_mapping[256]; DATA8 green_mapping[256];
DATA8 green_mapping[256]; DATA8 blue_mapping[256];
DATA8 blue_mapping[256]; DATA8 alpha_mapping[256];
DATA8 alpha_mapping[256]; DATABIG modification_count;
DATABIG modification_count;
}; };
#define CMOD_APPLY_RGB(cm, r, g, b) \ #define CMOD_APPLY_RGB(cm, r, g, b) \
@ -44,22 +43,20 @@ struct _imlib_color_modifier
#define A_CMOD(cm, a) \ #define A_CMOD(cm, a) \
(cm)->alpha_mapping[(int)(a)] (cm)->alpha_mapping[(int)(a)]
ImlibColorModifier * __imlib_CreateCmod(void); ImlibColorModifier *__imlib_CreateCmod(void);
void __imlib_FreeCmod(ImlibColorModifier *cm); void __imlib_FreeCmod(ImlibColorModifier * cm);
void __imlib_CmodChanged(ImlibColorModifier *cm); void __imlib_CmodChanged(ImlibColorModifier * cm);
void __imlib_CmodSetTables(ImlibColorModifier *cm, DATA8 *r, void __imlib_CmodSetTables(ImlibColorModifier * cm, DATA8 * r,
DATA8 *g, DATA8 *b, DATA8 *a); DATA8 * g, DATA8 * b, DATA8 * a);
void __imlib_CmodReset(ImlibColorModifier *cm); void __imlib_CmodReset(ImlibColorModifier * cm);
void __imlib_DataCmodApply(DATA32 *data, int w, int h, void __imlib_DataCmodApply(DATA32 * data, int w, int h,
int jump, ImlibImageFlags *fl, int jump, ImlibImageFlags * fl,
ImlibColorModifier *cm); ImlibColorModifier * cm);
void __imlib_CmodGetTables(ImlibColorModifier *cm, DATA8 *r, void __imlib_CmodGetTables(ImlibColorModifier * cm, DATA8 * r,
DATA8 *g, DATA8 *b, DATA8 *a); DATA8 * g, DATA8 * b, DATA8 * a);
void __imlib_CmodModBrightness(ImlibColorModifier *cm, void __imlib_CmodModBrightness(ImlibColorModifier * cm,
double v); double v);
void __imlib_CmodModContrast(ImlibColorModifier *cm, void __imlib_CmodModContrast(ImlibColorModifier * cm, double v);
double v); void __imlib_CmodModGamma(ImlibColorModifier * cm, double v);
void __imlib_CmodModGamma(ImlibColorModifier *cm,
double v);
#endif #endif

View File

@ -10,7 +10,7 @@
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
#ifdef WITH_DMALLOC #ifdef WITH_DMALLOC
# include <dmalloc.h> #include <dmalloc.h>
#endif #endif
#define DATABIG unsigned long long #define DATABIG unsigned long long
@ -20,7 +20,8 @@
#define DATA8 unsigned char #define DATA8 unsigned char
#ifdef DO_MMX_ASM #ifdef DO_MMX_ASM
int __imlib_get_cpuid(void); int __imlib_get_cpuid(void);
#define CPUID_MMX (1 << 23) #define CPUID_MMX (1 << 23)
#define CPUID_XMM (1 << 25) #define CPUID_XMM (1 << 25)
#endif #endif

View File

@ -20,17 +20,17 @@ struct _context {
void *b_dither; void *b_dither;
}; };
void __imlib_SetMaxContexts(int num); void __imlib_SetMaxContexts(int num);
int __imlib_GetMaxContexts(void); int __imlib_GetMaxContexts(void);
void __imlib_FlushContexts(void); void __imlib_FlushContexts(void);
void __imlib_FreeContextForDisplay(Display * d); void __imlib_FreeContextForDisplay(Display * d);
void __imlib_FreeContextForColormap(Display * d, Colormap cm); void __imlib_FreeContextForColormap(Display * d, Colormap cm);
void __imlib_FreeContextForVisual(Display * d, Visual * v); void __imlib_FreeContextForVisual(Display * d, Visual * v);
Context *__imlib_FindContext(Display * d, Visual * v, Colormap c, Context *__imlib_FindContext(Display * d, Visual * v, Colormap c,
int depth); int depth);
Context *__imlib_NewContext(Display * d, Visual * v, Colormap c, Context *__imlib_NewContext(Display * d, Visual * v, Colormap c,
int depth); int depth);
Context *__imlib_GetContext(Display * d, Visual * v, Colormap c, Context *__imlib_GetContext(Display * d, Visual * v, Colormap c,
int depth); int depth);
#endif #endif

View File

@ -4,7 +4,7 @@
#include "colormod.h" #include "colormod.h"
#include "common.h" #include "common.h"
char __imlib_CreatePixmapsForImage(Display * d, Drawable w, char __imlib_CreatePixmapsForImage(Display * d, Drawable w,
Visual * v, int depth, Visual * v, int depth,
Colormap cm, ImlibImage * im, Colormap cm, ImlibImage * im,
Pixmap * p, Mask * m, int sx, Pixmap * p, Mask * m, int sx,

View File

@ -4,37 +4,36 @@
#include "common.h" #include "common.h"
#include "script.h" #include "script.h"
struct imlib_filter_info struct imlib_filter_info {
{ char *name;
char *name; char *author;
char *author; char *description;
char *description; char **filters;
char **filters; int num_filters;
int num_filters;
}; };
typedef struct _imlib_external_filter ImlibExternalFilter; typedef struct _imlib_external_filter ImlibExternalFilter;
typedef struct _imlib_external_filter *pImlibExternalFilter; typedef struct _imlib_external_filter *pImlibExternalFilter;
struct _imlib_external_filter struct _imlib_external_filter {
{ char *name;
char *name; char *author;
char *author; char *description;
char *description; int num_filters;
int num_filters; char *filename;
char *filename; void *handle;
void *handle; char **filters;
char **filters; void (*init_filter) (struct imlib_filter_info * info);
void (*init_filter)( struct imlib_filter_info *info ); void (*deinit_filter) (void);
void (*deinit_filter)(void); void *(*exec_filter) (char *filter, void *im,
void *(*exec_filter)( char *filter, void *im, pIFunctionParam params ); pIFunctionParam params);
pImlibExternalFilter next; pImlibExternalFilter next;
}; };
void __imlib_dynamic_filters_init(void); void __imlib_dynamic_filters_init(void);
void __imlib_dynamic_filters_deinit(void); void __imlib_dynamic_filters_deinit(void);
pImlibExternalFilter __imlib_get_dynamic_filter( char *name ); pImlibExternalFilter __imlib_get_dynamic_filter(char *name);
char **__imlib_ListFilters(int *num_ret); char **__imlib_ListFilters(int *num_ret);
pImlibExternalFilter __imlib_LoadFilter( char *file ); pImlibExternalFilter __imlib_LoadFilter(char *file);
#endif #endif

View File

@ -7,39 +7,31 @@ typedef struct _imlib_filter ImlibFilter;
typedef struct _imlib_filter_color ImlibFilterColor; typedef struct _imlib_filter_color ImlibFilterColor;
typedef struct _imlib_filter_pixel ImlibFilterPixel; typedef struct _imlib_filter_pixel ImlibFilterPixel;
struct _imlib_filter_pixel struct _imlib_filter_pixel {
{ int xoff, yoff;
int xoff, yoff; int a, r, g, b;
int a, r, g, b;
}; };
struct _imlib_filter_color struct _imlib_filter_color {
{ int size, entries;
int size, entries; int div, cons;
int div, cons; ImlibFilterPixel *pixels;
ImlibFilterPixel *pixels;
}; };
struct _imlib_filter struct _imlib_filter {
{ ImlibFilterColor alpha, red, green, blue;
ImlibFilterColor alpha, red, green, blue;
}; };
ImlibFilter * ImlibFilter *__imlib_CreateFilter(int size);
__imlib_CreateFilter(int size); void __imlib_FreeFilter(ImlibFilter * fil);
void void __imlib_FilterSet(ImlibFilterColor * fil, int x, int y,
__imlib_FreeFilter(ImlibFilter *fil); int a, int r, int g, int b);
void void __imlib_FilterSetColor(ImlibFilterColor * fil, int x, int y,
__imlib_FilterSet(ImlibFilterColor *fil, int x, int y, int a, int r, int g, int b);
int a, int r, int g, int b); void __imlib_FilterDivisors(ImlibFilter * fil,
void int a, int r, int g, int b);
__imlib_FilterSetColor(ImlibFilterColor * fil, int x, int y, void __imlib_FilterConstants(ImlibFilter * fil,
int a, int r, int g, int b); int a, int r, int g, int b);
void void __imlib_FilterImage(ImlibImage * im, ImlibFilter * fil);
__imlib_FilterDivisors(ImlibFilter *fil, int a, int r, int g, int b);
void
__imlib_FilterConstants(ImlibFilter *fil, int a, int r, int g, int b);
void
__imlib_FilterImage(ImlibImage *im, ImlibFilter *fil);
#endif #endif

View File

@ -6,44 +6,38 @@
/* TODO separate fonts and data stuff */ /* TODO separate fonts and data stuff */
typedef struct _Imlib_Font ImlibFont; typedef struct _Imlib_Font ImlibFont;
typedef struct _Imlib_Font_Glyph Imlib_Font_Glyph; typedef struct _Imlib_Font_Glyph Imlib_Font_Glyph;
typedef struct _Imlib_Object_List Imlib_Object_List; typedef struct _Imlib_Object_List Imlib_Object_List;
typedef struct _Imlib_Hash Imlib_Hash; typedef struct _Imlib_Hash Imlib_Hash;
typedef struct _Imlib_Hash_El Imlib_Hash_El; typedef struct _Imlib_Hash_El Imlib_Hash_El;
struct _Imlib_Object_List struct _Imlib_Object_List {
{
Imlib_Object_List *next, *prev; Imlib_Object_List *next, *prev;
Imlib_Object_List *last; Imlib_Object_List *last;
}; };
struct _Imlib_Hash struct _Imlib_Hash {
{
int population; int population;
Imlib_Object_List *buckets[256]; Imlib_Object_List *buckets[256];
}; };
struct _Imlib_Hash_El struct _Imlib_Hash_El {
{
Imlib_Object_List _list_data; Imlib_Object_List _list_data;
char *key; char *key;
void *data; void *data;
}; };
struct _Imlib_Font struct _Imlib_Font {
{
Imlib_Object_List _list_data; Imlib_Object_List _list_data;
char *name; char *name;
char *file; char *file;
int size; int size;
struct struct {
{
FT_Face face; FT_Face face;
} } ft;
ft;
Imlib_Hash *glyphs; Imlib_Hash *glyphs;
@ -52,12 +46,11 @@ struct _Imlib_Font
int references; int references;
/* using a double-linked list for the fallback chain */ /* using a double-linked list for the fallback chain */
struct _Imlib_Font *fallback_prev; struct _Imlib_Font *fallback_prev;
struct _Imlib_Font *fallback_next; struct _Imlib_Font *fallback_next;
}; };
struct _Imlib_Font_Glyph struct _Imlib_Font_Glyph {
{
FT_Glyph glyph; FT_Glyph glyph;
FT_BitmapGlyph glyph_out; FT_BitmapGlyph glyph_out;
}; };
@ -80,7 +73,8 @@ char **__imlib_font_list_fonts(int *num_ret);
ImlibFont *__imlib_font_load_joined(const char *name); ImlibFont *__imlib_font_load_joined(const char *name);
void __imlib_font_free(ImlibFont * fn); void __imlib_font_free(ImlibFont * fn);
int __imlib_font_insert_into_fallback_chain_imp(ImlibFont * fn, int __imlib_font_insert_into_fallback_chain_imp(ImlibFont * fn,
ImlibFont * fallback); ImlibFont *
fallback);
void __imlib_font_remove_from_fallback_chain_imp(ImlibFont * fn); void __imlib_font_remove_from_fallback_chain_imp(ImlibFont * fn);
int __imlib_font_cache_get(void); int __imlib_font_cache_get(void);
void __imlib_font_cache_set(int size); void __imlib_font_cache_set(int size);
@ -89,45 +83,47 @@ void __imlib_font_modify_cache_by(ImlibFont * fn, int dir);
void __imlib_font_modify_cache_by(ImlibFont * fn, int dir); void __imlib_font_modify_cache_by(ImlibFont * fn, int dir);
void __imlib_font_flush_last(void); void __imlib_font_flush_last(void);
ImlibFont *__imlib_font_find(const char *name, int size); ImlibFont *__imlib_font_find(const char *name, int size);
ImlibFont *__imlib_font_find_glyph(ImlibFont * fn, int gl, unsigned int *ret_index); ImlibFont *__imlib_font_find_glyph(ImlibFont * fn, int gl,
unsigned int *ret_index);
void __imlib_font_query_size(ImlibFont * fn, const char *text, void __imlib_font_query_size(ImlibFont * fn, const char *text,
int *w, int *h); int *w, int *h);
int __imlib_font_query_inset(ImlibFont * fn, const char *text); int __imlib_font_query_inset(ImlibFont * fn, const char *text);
void __imlib_font_query_advance(ImlibFont * fn, const char *text, void __imlib_font_query_advance(ImlibFont * fn, const char *text,
int *h_adv, int *v_adv); int *h_adv, int *v_adv);
int __imlib_font_query_char_coords(ImlibFont * fn, int __imlib_font_query_char_coords(ImlibFont * fn,
const char *text, int pos, const char *text, int pos,
int *cx, int *cy, int *cw, int *cx, int *cy,
int *ch); int *cw, int *ch);
int __imlib_font_query_text_at_pos(ImlibFont * fn, int __imlib_font_query_text_at_pos(ImlibFont * fn,
const char *text, int x, int y, const char *text,
int *cx, int *cy, int *cw, int x, int y,
int *ch); int *cx, int *cy,
int *cw, int *ch);
Imlib_Font_Glyph *__imlib_font_cache_glyph_get(ImlibFont * fn, FT_UInt index); Imlib_Font_Glyph *__imlib_font_cache_glyph_get(ImlibFont * fn, FT_UInt index);
void __imlib_render_str(ImlibImage * im, ImlibFont * f, int drx, void __imlib_render_str(ImlibImage * im, ImlibFont * f,
int dry, const char *text, DATA8 r, int drx, int dry, const char *text,
DATA8 g, DATA8 b, DATA8 a, char dir, DATA8 r, DATA8 g, DATA8 b, DATA8 a,
double angle, int *retw, int *reth, char dir, double angle,
int blur, int *nextx, int *nexty, int *retw, int *reth, int blur,
ImlibOp op, int clx, int cly, int clw, int *nextx, int *nexty, ImlibOp op,
int clh); int clx, int cly, int clw, int clh);
void __imlib_font_draw(ImlibImage * dst, DATA32 col, void __imlib_font_draw(ImlibImage * dst, DATA32 col,
ImlibFont * fn, int x, int y, ImlibFont * fn, int x, int y,
const char *text, int *nextx, int *nexty, const char *text, int *nextx, int *nexty,
int clx, int cly, int clw, int clh); int clx, int cly, int clw, int clh);
/* data manipulation */ /* data manipulation */
void *__imlib_object_list_prepend(void *in_list, void *in_item); void *__imlib_object_list_prepend(void *in_list, void *in_item);
void *__imlib_object_list_remove(void *in_list, void *in_item); void *__imlib_object_list_remove(void *in_list, void *in_item);
Imlib_Hash *__imlib_hash_add(Imlib_Hash * hash, const char *key, Imlib_Hash *__imlib_hash_add(Imlib_Hash * hash, const char *key,
const void *data); const void *data);
void *__imlib_hash_find(Imlib_Hash * hash, const char *key); void *__imlib_hash_find(Imlib_Hash * hash, const char *key);
void __imlib_hash_free(Imlib_Hash * hash); void __imlib_hash_free(Imlib_Hash * hash);
void __imlib_hash_foreach(Imlib_Hash * hash, void __imlib_hash_foreach(Imlib_Hash * hash,
int (*func) (Imlib_Hash * hash, int (*func) (Imlib_Hash * hash,
const char *key, void *data, const char *key,
void *fdata), void *data, void *fdata),
const void *fdata); const void *fdata);

View File

@ -3,13 +3,13 @@
#include "common.h" #include "common.h"
char __imlib_GrabDrawableToRGBA(DATA32 * data, int ox, int oy, char __imlib_GrabDrawableToRGBA(DATA32 * data, int ox, int oy,
int ow, int oh, Display * d, int ow, int oh, Display * d,
Drawable p, Pixmap m, Visual * v, Drawable p, Pixmap m, Visual * v,
Colormap cm, int depth, int x, Colormap cm, int depth, int x,
int y, int w, int h, int y, int w, int h,
char *domask, char grab); char *domask, char grab);
void __imlib_GrabXImageToRGBA(DATA32 * data, int ox, int oy, void __imlib_GrabXImageToRGBA(DATA32 * data, int ox, int oy,
int ow, int oh, Display * d, int ow, int oh, Display * d,
XImage * xim, XImage * mxim, XImage * xim, XImage * mxim,
Visual * v, int depth, int x, Visual * v, int depth, int x,

View File

@ -3,28 +3,35 @@
#include "common.h" #include "common.h"
typedef struct _imlib_range ImlibRange; typedef struct _imlib_range ImlibRange;
typedef struct _imlib_range_color ImlibRangeColor; typedef struct _imlib_range_color ImlibRangeColor;
struct _imlib_range_color struct _imlib_range_color {
{ DATA8 red, green, blue, alpha;
DATA8 red, green, blue, alpha; int distance;
int distance; ImlibRangeColor *next;
ImlibRangeColor *next;
}; };
struct _imlib_range struct _imlib_range {
{ ImlibRangeColor *color;
ImlibRangeColor *color;
}; };
ImlibRange *__imlib_CreateRange(void); ImlibRange *__imlib_CreateRange(void);
void __imlib_FreeRange(ImlibRange *rg); void __imlib_FreeRange(ImlibRange * rg);
void __imlib_AddRangeColor(ImlibRange *rg, DATA8 r, DATA8 g, DATA8 b, void __imlib_AddRangeColor(ImlibRange * rg, DATA8 r, DATA8 g,
DATA8 a, int dist); DATA8 b, DATA8 a, int dist);
DATA32 *__imlib_MapRange(ImlibRange *rg, int len); DATA32 *__imlib_MapRange(ImlibRange * rg, int len);
DATA32 *__imlib_MapHsvaRange(ImlibRange *rg, int len); DATA32 *__imlib_MapHsvaRange(ImlibRange * rg, int len);
void __imlib_DrawGradient(ImlibImage *im, int x, int y, int w, int h, ImlibRange *rg, double angle, ImlibOp op, int clx, int cly, int clw, int clh); void __imlib_DrawGradient(ImlibImage * im,
void __imlib_DrawHsvaGradient(ImlibImage *im, int x, int y, int w, int h, ImlibRange *rg, double angle, ImlibOp op, int clx, int cly, int clw, int clh); int x, int y, int w, int h,
ImlibRange * rg, double angle,
ImlibOp op,
int clx, int cly, int clw, int clh);
void __imlib_DrawHsvaGradient(ImlibImage * im,
int x, int y, int w, int h,
ImlibRange * rg, double angle,
ImlibOp op,
int clx, int cly,
int clw, int clh);
#endif #endif

View File

@ -10,168 +10,171 @@
#endif #endif
#endif #endif
typedef struct _imlibimage ImlibImage; typedef struct _imlibimage ImlibImage;
#ifdef BUILD_X11 #ifdef BUILD_X11
typedef struct _imlibimagepixmap ImlibImagePixmap; typedef struct _imlibimagepixmap ImlibImagePixmap;
#endif #endif
typedef struct _imlibborder ImlibBorder; typedef struct _imlibborder ImlibBorder;
typedef struct _imlibloader ImlibLoader; typedef struct _imlibloader ImlibLoader;
typedef struct _imlibimagetag ImlibImageTag; typedef struct _imlibimagetag ImlibImageTag;
typedef enum _imlib_load_error ImlibLoadError; typedef enum _imlib_load_error ImlibLoadError;
typedef int (*ImlibProgressFunction)(ImlibImage *im, char percent, typedef int (*ImlibProgressFunction) (ImlibImage * im, char percent,
int update_x, int update_y, int update_x, int update_y,
int update_w, int update_h); int update_w, int update_h);
typedef void (*ImlibDataDestructorFunction)(ImlibImage *im, void *data); typedef void (*ImlibDataDestructorFunction) (ImlibImage * im,
void *data);
enum _iflags enum _iflags {
{ F_NONE = 0,
F_NONE = 0, F_HAS_ALPHA = (1 << 0),
F_HAS_ALPHA = (1 << 0), F_UNLOADED = (1 << 1),
F_UNLOADED = (1 << 1), F_UNCACHEABLE = (1 << 2),
F_UNCACHEABLE = (1 << 2),
F_ALWAYS_CHECK_DISK = (1 << 3), F_ALWAYS_CHECK_DISK = (1 << 3),
F_INVALID = (1 << 4), F_INVALID = (1 << 4),
F_DONT_FREE_DATA = (1 << 5), F_DONT_FREE_DATA = (1 << 5),
F_FORMAT_IRRELEVANT = (1 << 6), F_FORMAT_IRRELEVANT = (1 << 6),
F_BORDER_IRRELEVANT = (1 << 7), F_BORDER_IRRELEVANT = (1 << 7),
F_ALPHA_IRRELEVANT = (1 << 8) F_ALPHA_IRRELEVANT = (1 << 8)
}; };
typedef enum _iflags ImlibImageFlags; typedef enum _iflags ImlibImageFlags;
struct _imlibborder struct _imlibborder {
{ int left, right, top, bottom;
int left, right, top, bottom;
}; };
struct _imlibimagetag struct _imlibimagetag {
{ char *key;
char *key; int val;
int val; void *data;
void *data; void (*destructor) (ImlibImage * im, void *data);
void (*destructor)(ImlibImage *im, void *data); ImlibImageTag *next;
ImlibImageTag *next;
}; };
struct _imlibimage struct _imlibimage {
{ char *file;
char *file; int w, h;
int w, h; DATA32 *data;
DATA32 *data; ImlibImageFlags flags;
ImlibImageFlags flags; time_t moddate;
time_t moddate; ImlibBorder border;
ImlibBorder border; int references;
int references; ImlibLoader *loader;
ImlibLoader *loader; char *format;
char *format; ImlibImage *next;
ImlibImage *next; ImlibImageTag *tags;
ImlibImageTag *tags; char *real_file;
char *real_file; char *key;
char *key;
}; };
#ifdef BUILD_X11 #ifdef BUILD_X11
struct _imlibimagepixmap struct _imlibimagepixmap {
{ int w, h;
int w, h; Pixmap pixmap, mask;
Pixmap pixmap, mask; Display *display;
Display *display; Visual *visual;
Visual *visual; int depth;
int depth; int source_x, source_y, source_w, source_h;
int source_x, source_y, source_w, source_h; Colormap colormap;
Colormap colormap; char antialias, hi_quality, dither_mask;
char antialias, hi_quality, dither_mask; ImlibBorder border;
ImlibBorder border; ImlibImage *image;
ImlibImage *image; char *file;
char *file; char dirty;
char dirty; int references;
int references; DATABIG modification_count;
DATABIG modification_count; ImlibImagePixmap *next;
ImlibImagePixmap *next;
}; };
#endif #endif
struct _imlibloader struct _imlibloader {
{ char *file;
char *file; int num_formats;
int num_formats; char **formats;
char **formats; void *handle;
void *handle; char (*load) (ImlibImage * im,
char (*load)(ImlibImage *im, ImlibProgressFunction progress,
ImlibProgressFunction progress, char progress_granularity, char immediate_load);
char progress_granularity, char immediate_load); char (*save) (ImlibImage * im,
char (*save)(ImlibImage *im, ImlibProgressFunction progress,
ImlibProgressFunction progress, char progress_granularity);
char progress_granularity); ImlibLoader *next;
ImlibLoader *next;
}; };
void __imlib_AttachTag(ImlibImage *im, const char *key, void __imlib_AttachTag(ImlibImage * im, const char *key,
int val, void *data, int val, void *data,
ImlibDataDestructorFunction destructor); ImlibDataDestructorFunction destructor);
ImlibImageTag *__imlib_GetTag(ImlibImage *im, const char *key); ImlibImageTag *__imlib_GetTag(ImlibImage * im, const char *key);
ImlibImageTag *__imlib_RemoveTag(ImlibImage *im, const char *key); ImlibImageTag *__imlib_RemoveTag(ImlibImage * im, const char *key);
void __imlib_FreeTag(ImlibImage *im, ImlibImageTag *t); void __imlib_FreeTag(ImlibImage * im, ImlibImageTag * t);
void __imlib_FreeAllTags(ImlibImage *im); void __imlib_FreeAllTags(ImlibImage * im);
void __imlib_SetCacheSize(int size);
int __imlib_GetCacheSize(void);
ImlibImage *__imlib_ProduceImage(void);
void __imlib_ConsumeImage(ImlibImage * im);
ImlibImage *__imlib_FindCachedImage(const char *file);
void __imlib_AddImageToCache(ImlibImage * im);
void __imlib_RemoveImageFromCache(ImlibImage * im);
int __imlib_CurrentCacheSize(void);
void __imlib_CleanupImageCache(void);
void __imlib_SetCacheSize(int size);
int __imlib_GetCacheSize(void);
ImlibImage *__imlib_ProduceImage(void);
void __imlib_ConsumeImage(ImlibImage *im);
ImlibImage *__imlib_FindCachedImage(const char *file);
void __imlib_AddImageToCache(ImlibImage *im);
void __imlib_RemoveImageFromCache(ImlibImage *im);
int __imlib_CurrentCacheSize(void);
void __imlib_CleanupImageCache(void);
#ifdef BUILD_X11 #ifdef BUILD_X11
ImlibImagePixmap *__imlib_ProduceImagePixmap(void); ImlibImagePixmap *__imlib_ProduceImagePixmap(void);
void __imlib_ConsumeImagePixmap(ImlibImagePixmap *ip); void __imlib_ConsumeImagePixmap(ImlibImagePixmap * ip);
ImlibImagePixmap *__imlib_FindCachedImagePixmap(ImlibImage *im, int w, int h, ImlibImagePixmap *__imlib_FindCachedImagePixmap(ImlibImage * im, int w, int h,
Display *d, Visual *v, Display * d, Visual * v,
int depth, int sx, int sy, int depth, int sx, int sy,
int sw, int sh, Colormap cm, int sw, int sh, Colormap cm,
char aa, char hiq, char dmask, char aa, char hiq, char dmask,
DATABIG modification_count); DATABIG modification_count);
ImlibImagePixmap *__imlib_FindCachedImagePixmapByID(Display *d, Pixmap p); ImlibImagePixmap *__imlib_FindCachedImagePixmapByID(Display * d, Pixmap p);
void __imlib_AddImagePixmapToCache(ImlibImagePixmap *ip); void __imlib_AddImagePixmapToCache(ImlibImagePixmap * ip);
void __imlib_RemoveImagePixmapFromCache(ImlibImagePixmap *ip); void __imlib_RemoveImagePixmapFromCache(ImlibImagePixmap * ip);
void __imlib_CleanupImagePixmapCache(void); void __imlib_CleanupImagePixmapCache(void);
#endif #endif
ImlibLoader *__imlib_ProduceLoader(char *file); ImlibLoader *__imlib_ProduceLoader(char *file);
char **__imlib_ListLoaders(int *num_ret); char **__imlib_ListLoaders(int *num_ret);
char **__imlib_TrimLoaderList(char **list, int *num); char **__imlib_TrimLoaderList(char **list, int *num);
int __imlib_ItemInList(char **list, int size, char *item); int __imlib_ItemInList(char **list, int size, char *item);
void __imlib_ConsumeLoader(ImlibLoader *l); void __imlib_ConsumeLoader(ImlibLoader * l);
void __imlib_RescanLoaders(void); void __imlib_RescanLoaders(void);
void __imlib_RemoveAllLoaders(void); void __imlib_RemoveAllLoaders(void);
void __imlib_LoadAllLoaders(void); void __imlib_LoadAllLoaders(void);
ImlibLoader *__imlib_FindBestLoaderForFile(const char *file, int for_save); ImlibLoader *__imlib_FindBestLoaderForFile(const char *file,
ImlibLoader *__imlib_FindBestLoaderForFileFormat(const char *file, char *format, int for_save); int for_save);
void __imlib_SetImageAlphaFlag(ImlibImage *im, char alpha); ImlibLoader *__imlib_FindBestLoaderForFileFormat(const char *file,
ImlibImage *__imlib_CreateImage(int w, int h, DATA32 *data); char *format,
ImlibImage *__imlib_LoadImage(const char *file, int for_save);
ImlibProgressFunction progress, void __imlib_SetImageAlphaFlag(ImlibImage * im, char alpha);
char progress_granularity, char immediate_load, ImlibImage *__imlib_CreateImage(int w, int h, DATA32 * data);
char dont_cache, ImlibLoadError *er); ImlibImage *__imlib_LoadImage(const char *file,
ImlibProgressFunction progress,
char progress_granularity,
char immediate_load, char dont_cache,
ImlibLoadError * er);
#ifdef BUILD_X11 #ifdef BUILD_X11
ImlibImagePixmap *__imlib_FindImlibImagePixmapByID(Display *d, Pixmap p); ImlibImagePixmap *__imlib_FindImlibImagePixmapByID(Display * d, Pixmap p);
#endif #endif
void __imlib_FreeImage(ImlibImage *im); void __imlib_FreeImage(ImlibImage * im);
#ifdef BUILD_X11 #ifdef BUILD_X11
void __imlib_FreePixmap(Display *d, Pixmap p); void __imlib_FreePixmap(Display * d, Pixmap p);
#endif #endif
void __imlib_FlushCache(void); void __imlib_FlushCache(void);
#ifdef BUILD_X11 #ifdef BUILD_X11
void __imlib_DirtyPixmapsForImage(ImlibImage *im); void __imlib_DirtyPixmapsForImage(ImlibImage * im);
#else #else
#define __imlib_DirtyPixmapsForImage(x) /* x */ #define __imlib_DirtyPixmapsForImage(x) /* x */
#endif #endif
void __imlib_DirtyImage(ImlibImage *im); void __imlib_DirtyImage(ImlibImage * im);
void __imlib_SaveImage(ImlibImage *im, const char *file, void __imlib_SaveImage(ImlibImage * im, const char *file,
ImlibProgressFunction progress, ImlibProgressFunction progress,
char progress_granularity, char progress_granularity,
ImlibLoadError *er); ImlibLoadError * er);
#define IMAGE_HAS_ALPHA(im) ((im)->flags & F_HAS_ALPHA) #define IMAGE_HAS_ALPHA(im) ((im)->flags & F_HAS_ALPHA)
#define IMAGE_IS_UNLOADED(im) ((im)->flags & F_UNLOADED) #define IMAGE_IS_UNLOADED(im) ((im)->flags & F_UNLOADED)
@ -185,7 +188,7 @@ void __imlib_SaveImage(ImlibImage *im, const char *file,
/* The maximum pixmap dimension is 65535. */ /* The maximum pixmap dimension is 65535. */
/* However, for now, use 46340 (46340^2 < 2^31) to avoid buffer overflow issues. */ /* However, for now, use 46340 (46340^2 < 2^31) to avoid buffer overflow issues. */
# define X_MAX_DIM 46340 #define X_MAX_DIM 46340
#define IMAGE_DIMENSIONS_OK(w, h) \ #define IMAGE_DIMENSIONS_OK(w, h) \
( ((w) > 0) && ((h) > 0) && ((w) < X_MAX_DIM) && ((h) < X_MAX_DIM) ) ( ((w) > 0) && ((h) > 0) && ((w) < X_MAX_DIM) && ((h) < X_MAX_DIM) )

View File

@ -3,13 +3,13 @@
#include "common.h" #include "common.h"
DATA32 __imlib_RenderGetPixel(Display * d, Drawable w, Visual * v, DATA32 __imlib_RenderGetPixel(Display * d, Drawable w, Visual * v,
Colormap cm, int depth, DATA8 r, Colormap cm, int depth, DATA8 r,
DATA8 g, DATA8 b); DATA8 g, DATA8 b);
void __imlib_RenderDisconnect(Display * d); void __imlib_RenderDisconnect(Display * d);
void __imlib_RenderImage(Display * d, ImlibImage * im, void __imlib_RenderImage(Display * d, ImlibImage * im,
Drawable w, Drawable m, Drawable w, Drawable m,
Visual * v, Colormap cm, int depth, Visual * v, Colormap cm, int depth,
int sx, int sy, int sw, int sh, int sx, int sy, int sw, int sh,
@ -18,7 +18,7 @@ void __imlib_RenderImage(Display * d, ImlibImage * im,
char dither_mask, int mat, char dither_mask, int mat,
ImlibColorModifier * cmod, ImlibOp op); ImlibColorModifier * cmod, ImlibOp op);
void __imlib_RenderImageSkewed(Display * d, ImlibImage * im, void __imlib_RenderImageSkewed(Display * d, ImlibImage * im,
Drawable w, Drawable m, Drawable w, Drawable m,
Visual * v, Colormap cm, Visual * v, Colormap cm,
int depth, int sx, int sy, int sw, int depth, int sx, int sy, int sw,

View File

@ -8,19 +8,18 @@
#define DM_X (8) #define DM_X (8)
#define DM_Y (8) #define DM_Y (8)
void __imlib_RGBASetupContext(Context * ct); void __imlib_RGBASetupContext(Context * ct);
void __imlib_RGBA_init(void *rd, void *gd, void *bd, int depth, void __imlib_RGBA_init(void *rd, void *gd, void *bd, int depth,
DATA8 palette_type); DATA8 palette_type);
typedef void (*ImlibRGBAFunction) (DATA32 *, int, DATA8 *, typedef void (*ImlibRGBAFunction) (DATA32 *, int, DATA8 *,
int, int, int, int, int); int, int, int, int, int);
typedef void (*ImlibMaskFunction) (DATA32 *, int, DATA8 *, typedef void (*ImlibMaskFunction) (DATA32 *, int, DATA8 *,
int, int, int, int, int, int); int, int, int, int, int, int);
ImlibRGBAFunction ImlibRGBAFunction __imlib_GetRGBAFunction(int depth, unsigned long rm,
__imlib_GetRGBAFunction(int depth, unsigned long gm, unsigned long bm,
unsigned long rm, unsigned long gm, unsigned long bm, char hiq, DATA8 palette_type);
char hiq, DATA8 palette_type); ImlibMaskFunction __imlib_GetMaskFunction(char hiq);
ImlibMaskFunction __imlib_GetMaskFunction(char hiq);
#ifdef DO_MMX_ASM #ifdef DO_MMX_ASM
void __imlib_mmx_rgb555_fast(DATA32 *, int, DATA8 *, int, int, void __imlib_mmx_rgb555_fast(DATA32 *, int, DATA8 *, int, int,

View File

@ -37,109 +37,116 @@ do { \
#define MULT(na, a0, a1, tmp) \ #define MULT(na, a0, a1, tmp) \
DIV_255(na, (a0) * (a1), tmp) DIV_255(na, (a0) * (a1), tmp)
typedef struct _imlib_point ImlibPoint; typedef struct _imlib_point ImlibPoint;
struct _imlib_point struct _imlib_point {
{ int x, y;
int x, y;
}; };
typedef struct _imlib_rectangle Imlib_Rectangle; typedef struct _imlib_rectangle Imlib_Rectangle;
struct _imlib_rectangle struct _imlib_rectangle {
{ int x, y, w, h;
int x, y, w, h;
}; };
typedef struct _imlib_polygon _ImlibPoly; typedef struct _imlib_polygon _ImlibPoly;
typedef _ImlibPoly *ImlibPoly; typedef _ImlibPoly *ImlibPoly;
struct _imlib_polygon struct _imlib_polygon {
{ ImlibPoint *points;
ImlibPoint *points; int pointcount;
int pointcount; int lx, rx;
int lx, rx; int ty, by;
int ty, by;
}; };
/* image related operations: in rgbadraw.c */ /* image related operations: in rgbadraw.c */
void __imlib_FlipImageHoriz(ImlibImage * im); void __imlib_FlipImageHoriz(ImlibImage * im);
void __imlib_FlipImageVert(ImlibImage * im); void __imlib_FlipImageVert(ImlibImage * im);
void __imlib_FlipImageBoth(ImlibImage * im); void __imlib_FlipImageBoth(ImlibImage * im);
void __imlib_FlipImageDiagonal(ImlibImage * im, int direction); void __imlib_FlipImageDiagonal(ImlibImage * im, int direction);
void __imlib_BlurImage(ImlibImage * im, int rad); void __imlib_BlurImage(ImlibImage * im, int rad);
void __imlib_SharpenImage(ImlibImage * im, int rad); void __imlib_SharpenImage(ImlibImage * im, int rad);
void __imlib_TileImageHoriz(ImlibImage * im); void __imlib_TileImageHoriz(ImlibImage * im);
void __imlib_TileImageVert(ImlibImage * im); void __imlib_TileImageVert(ImlibImage * im);
void __imlib_copy_alpha_data(ImlibImage * src, ImlibImage * dst, int x, int y, void __imlib_copy_alpha_data(ImlibImage * src, ImlibImage * dst,
int w, int h, int nx, int ny); int x, int y, int w, int h,
int nx, int ny);
void __imlib_copy_image_data(ImlibImage * im, int x, int y, int w, int h,
int nx, int ny);
void __imlib_copy_image_data(ImlibImage * im, int x, int y,
int w, int h, int nx, int ny);
/* point and line drawing: in line.c */ /* point and line drawing: in line.c */
ImlibUpdate * ImlibUpdate *__imlib_Point_DrawToImage(int x, int y, DATA32 color,
__imlib_Point_DrawToImage(int x, int y, DATA32 color, ImlibImage * im,
ImlibImage *im, int clx, int cly, int clw, int clh, int clx, int cly,
ImlibOp op, char blend, char make_updates); int clw, int clh,
ImlibOp op, char blend,
ImlibUpdate * char make_updates);
__imlib_Line_DrawToImage(int x0, int y0, int x1, int y1, DATA32 color,
ImlibImage *im, int clx, int cly, int clw, int clh,
ImlibOp op, char blend, char anti_alias,
char make_updates);
ImlibUpdate *__imlib_Line_DrawToImage(int x0, int y0, int x1, int y1,
DATA32 color, ImlibImage * im,
int clx, int cly, int clw, int clh,
ImlibOp op, char blend,
char anti_alias,
char make_updates);
/* rectangle drawing and filling: in rectangle.c */ /* rectangle drawing and filling: in rectangle.c */
void void __imlib_Rectangle_DrawToImage(int xc, int yc, int w, int h,
__imlib_Rectangle_DrawToImage(int xc, int yc, int w, int h, DATA32 color, DATA32 color, ImlibImage * im,
ImlibImage *im, int clx, int cly, int clw, int clh, int clx, int cly,
ImlibOp op, char blend); int clw, int clh,
ImlibOp op, char blend);
void
__imlib_Rectangle_FillToImage(int xc, int yc, int w, int h, DATA32 color,
ImlibImage *im, int clx, int cly, int clw, int clh,
ImlibOp op, char blend);
void __imlib_Rectangle_FillToImage(int xc, int yc, int w, int h,
DATA32 color, ImlibImage * im,
int clx, int cly,
int clw, int clh,
ImlibOp op, char blend);
/* ellipse drawing and filling: in ellipse.c */ /* ellipse drawing and filling: in ellipse.c */
void void __imlib_Ellipse_DrawToImage(int xc, int yc, int a, int b,
__imlib_Ellipse_DrawToImage(int xc, int yc, int a, int b, DATA32 color, DATA32 color, ImlibImage * im,
ImlibImage *im, int clx, int cly, int clw, int clh, int clx, int cly,
ImlibOp op, char blend, char anti_alias); int clw, int clh,
ImlibOp op, char blend,
void char anti_alias);
__imlib_Ellipse_FillToImage(int xc, int yc, int a, int b, DATA32 color,
ImlibImage *im, int clx, int cly, int clw, int clh,
ImlibOp op, char blend, char anti_alias);
void __imlib_Ellipse_FillToImage(int xc, int yc, int a, int b,
DATA32 color, ImlibImage * im,
int clx, int cly,
int clw, int clh,
ImlibOp op, char blend,
char anti_alias);
/* polygon handling functions: in polygon.c */ /* polygon handling functions: in polygon.c */
ImlibPoly __imlib_polygon_new(void); ImlibPoly __imlib_polygon_new(void);
void __imlib_polygon_free(ImlibPoly poly); void __imlib_polygon_free(ImlibPoly poly);
void __imlib_polygon_add_point(ImlibPoly poly, int x, int y); void __imlib_polygon_add_point(ImlibPoly poly, int x, int y);
unsigned char __imlib_polygon_contains_point(ImlibPoly poly, int x, int y); unsigned char __imlib_polygon_contains_point(ImlibPoly poly,
void __imlib_polygon_get_bounds(ImlibPoly poly, int *px1, int *py1, int *px2, int *py2); int x, int y);
void __imlib_polygon_get_bounds(ImlibPoly poly,
int *px1, int *py1,
int *px2, int *py2);
/* polygon drawing and filling: in polygon.c */ /* polygon drawing and filling: in polygon.c */
void void __imlib_Polygon_DrawToImage(ImlibPoly poly, char closed,
__imlib_Polygon_DrawToImage(ImlibPoly poly, char closed, DATA32 color, DATA32 color, ImlibImage * im,
ImlibImage *im, int clx, int cly, int clw, int clh, int clx, int cly,
ImlibOp op, char blend, char anti_alias); int clw, int clh,
void ImlibOp op, char blend,
__imlib_Polygon_FillToImage(ImlibPoly poly, DATA32 color, char anti_alias);
ImlibImage *im, int clx, int cly, int clw, int clh, void __imlib_Polygon_FillToImage(ImlibPoly poly, DATA32 color,
ImlibOp op, char blend, char anti_alias); ImlibImage * im,
int clx, int cly,
int clw, int clh,
ImlibOp op, char blend,
char anti_alias);
#endif #endif

View File

@ -11,24 +11,34 @@
#define _ROTATE_PREC_MAX (1 << _ROTATE_PREC) #define _ROTATE_PREC_MAX (1 << _ROTATE_PREC)
#define _ROTATE_PREC_BITS (_ROTATE_PREC_MAX - 1) #define _ROTATE_PREC_BITS (_ROTATE_PREC_MAX - 1)
void __imlib_RotateSample(DATA32 *src, DATA32 *dest, int sow, int sw, int sh, void __imlib_RotateSample(DATA32 * src, DATA32 * dest,
int dow, int dw, int dh, int x, int y, int sow, int sw, int sh,
int dxh, int dyh, int dxv, int dyv); int dow, int dw, int dh,
void __imlib_RotateAA(DATA32 *src, DATA32 *dest, int sow, int sw, int sh, int x, int y,
int dow, int dw, int dh, int x, int y, int dxh, int dyh, int dxv, int dyv);
int dx, int dy, int dxv, int dyv); void __imlib_RotateAA(DATA32 * src, DATA32 * dest,
void __imlib_BlendImageToImageSkewed(ImlibImage *im_src, ImlibImage *im_dst, int sow, int sw, int sh,
char aa, char blend, char merge_alpha, int dow, int dw, int dh,
int ssx, int ssy, int ssw, int ssh, int x, int y, int dx, int dy,
int ddx, int ddy, int dxv, int dyv);
int hsx, int hsy, int vsx, int vsy, void __imlib_BlendImageToImageSkewed(ImlibImage * im_src,
ImlibColorModifier *cm, ImlibOp op, ImlibImage * im_dst,
int clx, int cly, int clw, int clh); char aa, char blend,
char merge_alpha,
int ssx, int ssy,
int ssw, int ssh,
int ddx, int ddy,
int hsx, int hsy,
int vsx, int vsy,
ImlibColorModifier * cm,
ImlibOp op,
int clx, int cly,
int clw, int clh);
#ifdef DO_MMX_ASM #ifdef DO_MMX_ASM
void __imlib_mmx_RotateAA(DATA32 *src, DATA32 *dest, int sow, int sw, int sh, void __imlib_mmx_RotateAA(DATA32 * src, DATA32 * dest, int sow,
int dow, int dw, int dh, int x, int y, int sw, int sh, int dow, int dw,
int dx, int dy, int dxv, int dyv); int dh, int x, int y, int dx, int dy,
int dxv, int dyv);
#endif #endif
#endif #endif

View File

@ -5,20 +5,21 @@
typedef struct _imlib_scale_info ImlibScaleInfo; typedef struct _imlib_scale_info ImlibScaleInfo;
ImlibScaleInfo * ImlibScaleInfo *__imlib_CalcScaleInfo(ImlibImage * im,
__imlib_CalcScaleInfo(ImlibImage *im, int sw, int sh, int dw, int dh, char aa); int sw, int sh,
ImlibScaleInfo * int dw, int dh, char aa);
__imlib_FreeScaleInfo(ImlibScaleInfo *isi); ImlibScaleInfo *__imlib_FreeScaleInfo(ImlibScaleInfo * isi);
void void __imlib_ScaleSampleRGBA(ImlibScaleInfo * isi, DATA32 * dest,
__imlib_ScaleSampleRGBA(ImlibScaleInfo *isi, DATA32 *dest, int dxx, int dyy, int dxx, int dyy, int dx, int dy,
int dx, int dy, int dw, int dh, int dow); int dw, int dh, int dow);
void void __imlib_ScaleAARGBA(ImlibScaleInfo * isi, DATA32 * dest,
__imlib_ScaleAARGBA(ImlibScaleInfo *isi, DATA32 *dest, int dxx, int dyy, int dxx, int dyy, int dx, int dy,
int dx, int dy, int dw, int dh, int dow, int sow); int dw, int dh, int dow, int sow);
void void __imlib_ScaleAARGB(ImlibScaleInfo * isi, DATA32 * dest,
__imlib_ScaleAARGB(ImlibScaleInfo *isi, DATA32 *dest, int dxx, int dyy, int dxx, int dyy, int dx, int dy,
int dx, int dy, int dw, int dh, int dow, int sow); int dw, int dh, int dow, int sow);
void void __imlib_Scale_mmx_AARGBA(ImlibScaleInfo * isi,
__imlib_Scale_mmx_AARGBA(ImlibScaleInfo *isi, DATA32 *dest, int dxx, int dyy, DATA32 * dest,
int dx, int dy, int dw, int dh, int dow, int sow); int dxx, int dyy, int dx, int dy,
int dw, int dh, int dow, int sow);
#endif #endif

View File

@ -37,34 +37,34 @@
typedef struct _imlib_function_param IFunctionParam; typedef struct _imlib_function_param IFunctionParam;
typedef struct _imlib_function_param *pIFunctionParam; typedef struct _imlib_function_param *pIFunctionParam;
struct _imlib_function_param struct _imlib_function_param {
{ char *key;
char *key; int type;
int type; void *data;
void *data; pIFunctionParam next;
pIFunctionParam next;
}; };
typedef struct _imlib_function IFunction; typedef struct _imlib_function IFunction;
typedef struct _imlib_function *pIFunction; typedef struct _imlib_function *pIFunction;
struct _imlib_function struct _imlib_function {
{ char *name;
char *name; pIFunctionParam params;
pIFunctionParam params; pIFunction next;
pIFunction next;
}; };
typedef struct _imlib_variable typedef struct _imlib_variable {
{ void *ptr;
void *ptr;
struct _imlib_variable *next; struct _imlib_variable *next;
} IVariable; } IVariable;
ImlibImage *__imlib_script_parse(ImlibImage *im, char *script, va_list); ImlibImage *__imlib_script_parse(ImlibImage * im, char *script,
IFunctionParam *__imlib_script_parse_parameters(ImlibImage *im, char *parameters); va_list);
ImlibImage *__imlib_script_parse_function(ImlibImage *im, char *function); IFunctionParam *__imlib_script_parse_parameters(ImlibImage * im,
void __imlib_script_tidyup(void); char *parameters);
void *__imlib_script_get_next_var(void); ImlibImage *__imlib_script_parse_function(ImlibImage * im,
void __imlib_script_add_var( void *ptr ); char *function);
void __imlib_script_tidyup(void);
void *__imlib_script_get_next_var(void);
void __imlib_script_add_var(void *ptr);
#endif /* _FUNCTION_H_ */ #endif /* _FUNCTION_H_ */

View File

@ -3,19 +3,18 @@
#include "common.h" #include "common.h"
typedef void (*ImlibPointDrawFunction)(DATA32, DATA32 *); typedef void (*ImlibPointDrawFunction) (DATA32, DATA32 *);
ImlibPointDrawFunction ImlibPointDrawFunction
__imlib_GetPointDrawFunction(ImlibOp op, char dst_alpha, char blend); __imlib_GetPointDrawFunction(ImlibOp op, char dst_alpha, char blend);
typedef void (*ImlibSpanDrawFunction) (DATA32, DATA32 *, int);
typedef void (*ImlibSpanDrawFunction)(DATA32, DATA32 *, int);
ImlibSpanDrawFunction ImlibSpanDrawFunction
__imlib_GetSpanDrawFunction(ImlibOp op, char dst_alpha, char blend); __imlib_GetSpanDrawFunction(ImlibOp op, char dst_alpha, char blend);
typedef void (*ImlibShapedSpanDrawFunction) (DATA8 *, DATA32, DATA32 *,
typedef void (*ImlibShapedSpanDrawFunction)(DATA8 *, DATA32, DATA32 *, int); int);
ImlibShapedSpanDrawFunction ImlibShapedSpanDrawFunction
__imlib_GetShapedSpanDrawFunction(ImlibOp op, char dst_alpha, char blend); __imlib_GetShapedSpanDrawFunction(ImlibOp op, char dst_alpha, char blend);

View File

@ -5,15 +5,16 @@
typedef struct _imlibupdate ImlibUpdate; typedef struct _imlibupdate ImlibUpdate;
struct _imlibupdate struct _imlibupdate {
{ int x, y, w, h;
int x, y, w, h; ImlibUpdate *next;
ImlibUpdate *next;
}; };
ImlibUpdate *__imlib_AddUpdate(ImlibUpdate *u, int x, int y, int w, int h); ImlibUpdate *__imlib_AddUpdate(ImlibUpdate * u,
ImlibUpdate *__imlib_MergeUpdate(ImlibUpdate *u, int w, int h, int hgapmax); int x, int y, int w, int h);
void __imlib_FreeUpdates(ImlibUpdate *u); ImlibUpdate *__imlib_MergeUpdate(ImlibUpdate * u,
ImlibUpdate *__imlib_DupUpdates(ImlibUpdate *u); int w, int h, int hgapmax);
void __imlib_FreeUpdates(ImlibUpdate * u);
ImlibUpdate *__imlib_DupUpdates(ImlibUpdate * u);
#endif #endif

View File

@ -6,20 +6,20 @@
#include "common.h" #include "common.h"
extern signed char x_does_shm; extern signed char x_does_shm;
void __imlib_SetMaxXImageCount(Display * d, int num); void __imlib_SetMaxXImageCount(Display * d, int num);
int __imlib_GetMaxXImageCount(Display * d); int __imlib_GetMaxXImageCount(Display * d);
void __imlib_SetMaxXImageTotalSize(Display * d, int num); void __imlib_SetMaxXImageTotalSize(Display * d, int num);
int __imlib_GetMaxXImageTotalSize(Display * d); int __imlib_GetMaxXImageTotalSize(Display * d);
void __imlib_FlushXImage(Display * d); void __imlib_FlushXImage(Display * d);
void __imlib_ConsumeXImage(Display * d, XImage * xim); void __imlib_ConsumeXImage(Display * d, XImage * xim);
XImage *__imlib_ProduceXImage(Display * d, Visual * v, int depth, XImage *__imlib_ProduceXImage(Display * d, Visual * v, int depth,
int w, int h, char *shared); int w, int h, char *shared);
void __imlib_ShmCheck(Display * d); void __imlib_ShmCheck(Display * d);
XImage *__imlib_ShmGetXImage(Display * d, Visual * v, Drawable draw, XImage *__imlib_ShmGetXImage(Display * d, Visual * v, Drawable draw,
int depth, int x, int y, int w, int h, int depth, int x, int y, int w, int h,
XShmSegmentInfo * si); XShmSegmentInfo * si);
void __imlib_ShmDetach(Display * d, XShmSegmentInfo * si); void __imlib_ShmDetach(Display * d, XShmSegmentInfo * si);
#endif #endif