diff --git a/src/lib/Imlib2.h b/src/lib/Imlib2.h index 7313966..f2d86cf 100644 --- a/src/lib/Imlib2.h +++ b/src/lib/Imlib2.h @@ -1,62 +1,60 @@ #ifndef __IMLIB_API_H -# define __IMLIB_API_H 1 +#define __IMLIB_API_H 1 -# ifdef EAPI -# undef EAPI -# endif -# ifdef WIN32 -# ifdef BUILDING_DLL -# define EAPI __declspec(dllexport) -# else -# define EAPI __declspec(dllimport) -# endif -# else -# ifdef __GNUC__ -# if __GNUC__ >= 4 -# define EAPI __attribute__ ((visibility("default"))) -# else -# define EAPI -# endif -# else -# define EAPI -# endif -# endif +#ifdef EAPI +#undef EAPI +#endif +#ifdef WIN32 +#ifdef BUILDING_DLL +#define EAPI __declspec(dllexport) +#else +#define EAPI __declspec(dllimport) +#endif +#else +#ifdef __GNUC__ +#if __GNUC__ >= 4 +#define EAPI __attribute__ ((visibility("default"))) +#else +#define EAPI +#endif +#else +#define EAPI +#endif +#endif -# ifndef X_DISPLAY_MISSING -# include -# endif +#ifndef X_DISPLAY_MISSING +#include +#endif /* Data types to use */ -# ifndef DATA64 -# define DATA64 unsigned long long -# define DATA32 unsigned int -# define DATA16 unsigned short -# define DATA8 unsigned char -# endif +#ifndef DATA64 +#define DATA64 unsigned long long +#define DATA32 unsigned int +#define DATA16 unsigned short +#define DATA8 unsigned char +#endif /* opaque data types */ -typedef void *Imlib_Context; -typedef void *Imlib_Image; -typedef void *Imlib_Color_Modifier; -typedef void *Imlib_Updates; -typedef void *Imlib_Font; -typedef void *Imlib_Color_Range; -typedef void *Imlib_Filter; +typedef void *Imlib_Context; +typedef void *Imlib_Image; +typedef void *Imlib_Color_Modifier; +typedef void *Imlib_Updates; +typedef void *Imlib_Font; +typedef void *Imlib_Color_Range; +typedef void *Imlib_Filter; typedef struct _imlib_border Imlib_Border; typedef struct _imlib_color Imlib_Color; -typedef void *ImlibPolygon; +typedef void *ImlibPolygon; /* blending operations */ -enum _imlib_operation -{ +enum _imlib_operation { IMLIB_OP_COPY, IMLIB_OP_ADD, IMLIB_OP_SUBTRACT, IMLIB_OP_RESHADE }; -enum _imlib_text_direction -{ +enum _imlib_text_direction { IMLIB_TEXT_TO_RIGHT = 0, IMLIB_TEXT_TO_LEFT = 1, IMLIB_TEXT_TO_DOWN = 2, @@ -64,8 +62,7 @@ enum _imlib_text_direction IMLIB_TEXT_TO_ANGLE = 4 }; -enum _imlib_load_error -{ +enum _imlib_load_error { IMLIB_LOAD_ERROR_NONE, IMLIB_LOAD_ERROR_FILE_DOES_NOT_EXIST, IMLIB_LOAD_ERROR_FILE_IS_DIRECTORY, @@ -84,8 +81,7 @@ enum _imlib_load_error }; /* 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_2, 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_TTF_encoding Imlib_TTF_Encoding; -struct _imlib_border -{ - int left, right, top, bottom; +struct _imlib_border { + int left, right, top, bottom; }; -struct _imlib_color -{ - int alpha, red, green, blue; +struct _imlib_color { + int alpha, red, green, blue; }; /* Progressive loading callbacks */ -typedef int (*Imlib_Progress_Function) (Imlib_Image im, char percent, - int update_x, int update_y, - int update_w, int update_h); -typedef void (*Imlib_Data_Destructor_Function) (Imlib_Image im, void *data); +typedef int (*Imlib_Progress_Function) (Imlib_Image im, char percent, + int update_x, int update_y, + int update_w, int update_h); +typedef void (*Imlib_Data_Destructor_Function) (Imlib_Image im, + void *data); -# ifdef __cplusplus -extern "C" -{ -# endif +/* *INDENT-OFF* */ +#ifdef __cplusplus +extern "C" { +#endif +/* *INDENT-ON* */ /* context handling */ - EAPI Imlib_Context imlib_context_new(void); - EAPI void imlib_context_free(Imlib_Context context); +EAPI Imlib_Context imlib_context_new(void); +EAPI void imlib_context_free(Imlib_Context context); - EAPI void imlib_context_push(Imlib_Context context); - EAPI void imlib_context_pop(void); - EAPI Imlib_Context imlib_context_get(void); +EAPI void imlib_context_push(Imlib_Context context); +EAPI void imlib_context_pop(void); +EAPI Imlib_Context imlib_context_get(void); /* context setting */ -# ifndef X_DISPLAY_MISSING - EAPI void imlib_context_set_display(Display * display); - EAPI void imlib_context_disconnect_display(void); - EAPI void imlib_context_set_visual(Visual * visual); - EAPI void imlib_context_set_colormap(Colormap colormap); - EAPI void imlib_context_set_drawable(Drawable drawable); - EAPI void imlib_context_set_mask(Pixmap mask); -# endif - 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_anti_alias(char anti_alias); - EAPI void imlib_context_set_dither(char dither); - EAPI void imlib_context_set_blend(char blend); - EAPI void imlib_context_set_color_modifier(Imlib_Color_Modifier color_modifier); - EAPI void imlib_context_set_operation(Imlib_Operation operation); - EAPI void imlib_context_set_font(Imlib_Font font); - EAPI void imlib_context_set_direction(Imlib_Text_Direction direction); - EAPI void imlib_context_set_angle(double angle); - EAPI void imlib_context_set_color(int red, int green, int blue, int alpha); - EAPI void imlib_context_set_color_hsva(float hue, float saturation, float value, int alpha); - EAPI void imlib_context_set_color_hlsa(float hue, float lightness, float saturation, int alpha); - EAPI void imlib_context_set_color_cmya(int cyan, int magenta, int yellow, int alpha); - 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); +#ifndef X_DISPLAY_MISSING +EAPI void imlib_context_set_display(Display * display); +EAPI void imlib_context_disconnect_display(void); +EAPI void imlib_context_set_visual(Visual * visual); +EAPI void imlib_context_set_colormap(Colormap colormap); +EAPI void imlib_context_set_drawable(Drawable drawable); +EAPI void imlib_context_set_mask(Pixmap mask); +#endif +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_anti_alias(char anti_alias); +EAPI void imlib_context_set_dither(char dither); +EAPI void imlib_context_set_blend(char blend); +EAPI void imlib_context_set_color_modifier(Imlib_Color_Modifier + color_modifier); +EAPI void imlib_context_set_operation(Imlib_Operation operation); +EAPI void imlib_context_set_font(Imlib_Font font); +EAPI void imlib_context_set_direction(Imlib_Text_Direction direction); +EAPI void imlib_context_set_angle(double angle); +EAPI void imlib_context_set_color(int red, int green, int blue, + int alpha); +EAPI void imlib_context_set_color_hsva(float hue, float saturation, + float value, int alpha); +EAPI void imlib_context_set_color_hlsa(float hue, float lightness, + float saturation, int alpha); +EAPI void imlib_context_set_color_cmya(int cyan, int magenta, + int yellow, int alpha); +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 */ -# ifndef X_DISPLAY_MISSING - EAPI Display *imlib_context_get_display(void); - EAPI Visual *imlib_context_get_visual(void); - EAPI Colormap imlib_context_get_colormap(void); - EAPI Drawable imlib_context_get_drawable(void); - EAPI Pixmap imlib_context_get_mask(void); -# endif - EAPI char imlib_context_get_dither_mask(void); - EAPI char imlib_context_get_anti_alias(void); - EAPI int imlib_context_get_mask_alpha_threshold(void); - EAPI char imlib_context_get_dither(void); - EAPI char imlib_context_get_blend(void); - EAPI Imlib_Color_Modifier imlib_context_get_color_modifier(void); - EAPI Imlib_Operation imlib_context_get_operation(void); - EAPI Imlib_Font imlib_context_get_font(void); - EAPI double imlib_context_get_angle(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_hsva(float *hue, float *saturation, float *value, int *alpha); - EAPI void imlib_context_get_color_hlsa(float *hue, float *lightness, float *saturation, int *alpha); - EAPI void imlib_context_get_color_cmya(int *cyan, int *magenta, int *yellow, int *alpha); - EAPI Imlib_Color *imlib_context_get_imlib_color(void); - EAPI Imlib_Color_Range imlib_context_get_color_range(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); +#ifndef X_DISPLAY_MISSING +EAPI Display *imlib_context_get_display(void); +EAPI Visual *imlib_context_get_visual(void); +EAPI Colormap imlib_context_get_colormap(void); +EAPI Drawable imlib_context_get_drawable(void); +EAPI Pixmap imlib_context_get_mask(void); +#endif +EAPI char imlib_context_get_dither_mask(void); +EAPI char imlib_context_get_anti_alias(void); +EAPI int imlib_context_get_mask_alpha_threshold(void); +EAPI char imlib_context_get_dither(void); +EAPI char imlib_context_get_blend(void); +EAPI Imlib_Color_Modifier imlib_context_get_color_modifier(void); +EAPI Imlib_Operation imlib_context_get_operation(void); +EAPI Imlib_Font imlib_context_get_font(void); +EAPI double imlib_context_get_angle(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_hsva(float *hue, float *saturation, + float *value, int *alpha); +EAPI void imlib_context_get_color_hlsa(float *hue, float *lightness, + float *saturation, int *alpha); +EAPI void imlib_context_get_color_cmya(int *cyan, int *magenta, + int *yellow, int *alpha); +EAPI Imlib_Color *imlib_context_get_imlib_color(void); +EAPI Imlib_Color_Range imlib_context_get_color_range(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 void imlib_set_cache_size(int bytes); - EAPI int imlib_get_color_usage(void); - EAPI void imlib_set_color_usage(int max); - 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 int imlib_get_cache_size(void); +EAPI void imlib_set_cache_size(int bytes); +EAPI int imlib_get_color_usage(void); +EAPI void imlib_set_color_usage(int max); +EAPI void imlib_flush_loaders(void); - 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, +#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); +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 * error_return); - EAPI void imlib_free_image(void); - EAPI void imlib_free_image_and_decache(void); +EAPI void imlib_free_image(void); +EAPI void imlib_free_image_and_decache(void); /* query/modify image parameters */ - EAPI int imlib_image_get_width(void); - EAPI int imlib_image_get_height(void); - EAPI const char *imlib_image_get_filename(void); - EAPI DATA32 *imlib_image_get_data(void); - EAPI DATA32 *imlib_image_get_data_for_reading_only(void); - EAPI void imlib_image_put_back_data(DATA32 * data); - EAPI char imlib_image_has_alpha(void); - EAPI void imlib_image_set_changes_on_disk(void); - EAPI void imlib_image_get_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_irrelevant_format(char irrelevant); - EAPI void imlib_image_set_irrelevant_border(char irrelevant); - EAPI void imlib_image_set_irrelevant_alpha(char irrelevant); - EAPI char *imlib_image_format(void); - 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_hsva(int x, int y, float *hue, 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); +EAPI int imlib_image_get_width(void); +EAPI int imlib_image_get_height(void); +EAPI const char *imlib_image_get_filename(void); +EAPI DATA32 *imlib_image_get_data(void); +EAPI DATA32 *imlib_image_get_data_for_reading_only(void); +EAPI void imlib_image_put_back_data(DATA32 * data); +EAPI char imlib_image_has_alpha(void); +EAPI void imlib_image_set_changes_on_disk(void); +EAPI void imlib_image_get_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_irrelevant_format(char irrelevant); +EAPI void imlib_image_set_irrelevant_border(char irrelevant); +EAPI void imlib_image_set_irrelevant_alpha(char irrelevant); +EAPI char *imlib_image_format(void); +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_hsva(int x, int y, float *hue, + 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 */ -# ifndef X_DISPLAY_MISSING - EAPI void imlib_render_pixmaps_for_whole_image(Pixmap * pixmap_return, - Pixmap * mask_return); - EAPI void imlib_render_pixmaps_for_whole_image_at_size(Pixmap * pixmap_return, - Pixmap * mask_return, - int width, int height); - EAPI void imlib_free_pixmap_and_mask(Pixmap pixmap); - EAPI void imlib_render_image_on_drawable(int x, int y); - EAPI void imlib_render_image_on_drawable_at_size(int x, int y, int width, - int height); - EAPI void imlib_render_image_part_on_drawable_at_size(int source_x, - int source_y, - int source_width, - int source_height, int x, - int y, int width, - int height); - EAPI DATA32 imlib_render_get_pixel_color(void); -# 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); +#ifndef X_DISPLAY_MISSING +EAPI void imlib_render_pixmaps_for_whole_image(Pixmap * pixmap_return, + Pixmap * mask_return); +EAPI void imlib_render_pixmaps_for_whole_image_at_size(Pixmap * + pixmap_return, + Pixmap * + mask_return, + int width, + int height); +EAPI void imlib_free_pixmap_and_mask(Pixmap pixmap); +EAPI void imlib_render_image_on_drawable(int x, int y); +EAPI void imlib_render_image_on_drawable_at_size(int x, int y, + int width, + int height); +EAPI void imlib_render_image_part_on_drawable_at_size(int source_x, + int source_y, + int + source_width, int + source_height, + int x, int y, + int width, + int height); +EAPI DATA32 imlib_render_get_pixel_color(void); +#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 */ - 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(int width, int height); +EAPI Imlib_Image imlib_create_image_using_data(int width, int height, 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); -# ifndef X_DISPLAY_MISSING - EAPI Imlib_Image imlib_create_image_from_drawable(Pixmap mask, int x, int y, +#ifndef X_DISPLAY_MISSING +EAPI Imlib_Image imlib_create_image_from_drawable(Pixmap mask, + int x, int y, int width, int height, char need_to_grab_x); - EAPI Imlib_Image imlib_create_image_from_ximage(XImage *image, XImage *mask, int x, int y, - int width, int height, - char need_to_grab_x); - EAPI Imlib_Image imlib_create_scaled_image_from_drawable(Pixmap mask, +EAPI Imlib_Image imlib_create_image_from_ximage(XImage * image, + XImage * mask, + int x, int y, + 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_y, int source_width, - int source_height, - int destination_width, - int destination_height, - char need_to_grab_x, - char + int + source_height, int + destination_width, int + destination_height, char + need_to_grab_x, char get_mask_from_shape); - EAPI char imlib_copy_drawable_to_image(Pixmap mask, int x, int y, int width, - int height, int destination_x, - int destination_y, char need_to_grab_x); -# endif - EAPI Imlib_Image imlib_clone_image(void); - EAPI Imlib_Image imlib_create_cropped_image(int x, int y, int width, +EAPI char imlib_copy_drawable_to_image(Pixmap mask, int x, int y, + int width, int height, + int destination_x, + int destination_y, + char need_to_grab_x); +#endif +EAPI Imlib_Image imlib_clone_image(void); +EAPI Imlib_Image imlib_create_cropped_image(int x, int y, int width, 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_height, int destination_width, int destination_height); /* imlib updates. lists of rectangles for storing required update draws */ - EAPI Imlib_Updates imlib_updates_clone(Imlib_Updates updates); - EAPI Imlib_Updates imlib_update_append_rect(Imlib_Updates updates, 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_for_rendering(Imlib_Updates updates, - int w, int h); - EAPI void imlib_updates_free(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, - int *y_return, int *width_return, - int *height_return); - EAPI void imlib_updates_set_coordinates(Imlib_Updates updates, int x, int y, - int width, int height); - EAPI void imlib_render_image_updates_on_drawable(Imlib_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); +EAPI Imlib_Updates imlib_updates_clone(Imlib_Updates updates); +EAPI Imlib_Updates imlib_update_append_rect(Imlib_Updates updates, + 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_for_rendering(Imlib_Updates updates, + int w, int h); +EAPI void imlib_updates_free(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, + int *y_return, + int *width_return, + int *height_return); +EAPI void imlib_updates_set_coordinates(Imlib_Updates updates, + int x, int y, + int width, int height); +EAPI void imlib_render_image_updates_on_drawable(Imlib_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 */ - EAPI void imlib_image_flip_horizontal(void); - EAPI void imlib_image_flip_vertical(void); - EAPI void imlib_image_flip_diagonal(void); - EAPI void imlib_image_orientate(int orientation); - EAPI void imlib_image_blur(int radius); - EAPI void imlib_image_sharpen(int radius); - EAPI void imlib_image_tile_horizontal(void); - EAPI void imlib_image_tile_vertical(void); - EAPI void imlib_image_tile(void); +EAPI void imlib_image_flip_horizontal(void); +EAPI void imlib_image_flip_vertical(void); +EAPI void imlib_image_flip_diagonal(void); +EAPI void imlib_image_orientate(int orientation); +EAPI void imlib_image_blur(int radius); +EAPI void imlib_image_sharpen(int radius); +EAPI void imlib_image_tile_horizontal(void); +EAPI void imlib_image_tile_vertical(void); +EAPI void imlib_image_tile(void); /* fonts and text */ - EAPI Imlib_Font imlib_load_font(const char *font_name); - EAPI void imlib_free_font(void); +EAPI Imlib_Font imlib_load_font(const char *font_name); +EAPI void imlib_free_font(void); + /* NB! The four functions below are deprecated. */ - EAPI int imlib_insert_font_into_fallback_chain(Imlib_Font font, Imlib_Font fallback_font); - 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); +EAPI int imlib_insert_font_into_fallback_chain(Imlib_Font font, + Imlib_Font + fallback_font); +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. */ - 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, - int *width_return, - int *height_return, - int *horizontal_advance_return, - int *vertical_advance_return); - EAPI void imlib_get_text_size(const char *text, int *width_return, - int *height_return); - EAPI void imlib_get_text_advance(const char *text, - int *horizontal_advance_return, - int *vertical_advance_return); - EAPI int imlib_get_text_inset(const char *text); - EAPI void imlib_add_path_to_font_path(const char *path); - EAPI void imlib_remove_path_from_font_path(const char *path); - EAPI char **imlib_list_font_path(int *number_return); - EAPI int imlib_text_get_index_and_location(const char *text, int x, int y, - int *char_x_return, - int *char_y_return, - int *char_width_return, - int *char_height_return); - EAPI void imlib_text_get_location_at_index(const char *text, int index, - int *char_x_return, - int *char_y_return, - int *char_width_return, - int *char_height_return); - EAPI char **imlib_list_fonts(int *number_return); - EAPI void imlib_free_font_list(char **font_list, int number); - EAPI int imlib_get_font_cache_size(void); - EAPI void imlib_set_font_cache_size(int bytes); - EAPI void imlib_flush_font_cache(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); +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, + int *width_return, + int *height_return, int + *horizontal_advance_return, int + *vertical_advance_return); +EAPI void imlib_get_text_size(const char *text, + int *width_return, int *height_return); +EAPI void imlib_get_text_advance(const char *text, + int *horizontal_advance_return, + int *vertical_advance_return); +EAPI int imlib_get_text_inset(const char *text); +EAPI void imlib_add_path_to_font_path(const char *path); +EAPI void imlib_remove_path_from_font_path(const char *path); +EAPI char **imlib_list_font_path(int *number_return); +EAPI int imlib_text_get_index_and_location(const char *text, + int x, int y, + int *char_x_return, + int *char_y_return, + int *char_width_return, + int *char_height_return); +EAPI void imlib_text_get_location_at_index(const char *text, + int index, + int *char_x_return, + int *char_y_return, + int *char_width_return, + int *char_height_return); +EAPI char **imlib_list_fonts(int *number_return); +EAPI void imlib_free_font_list(char **font_list, int number); +EAPI int imlib_get_font_cache_size(void); +EAPI void imlib_set_font_cache_size(int bytes); +EAPI void imlib_flush_font_cache(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 */ - EAPI Imlib_Color_Modifier imlib_create_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_brightness(double brightness_value); - EAPI void imlib_modify_color_modifier_contrast(double contrast_value); - EAPI void imlib_set_color_modifier_tables(DATA8 * red_table, - DATA8 * green_table, - DATA8 * blue_table, - DATA8 * alpha_table); - EAPI void imlib_get_color_modifier_tables(DATA8 * red_table, - DATA8 * green_table, - DATA8 * blue_table, - DATA8 * alpha_table); - EAPI void imlib_reset_color_modifier(void); - EAPI void imlib_apply_color_modifier(void); - EAPI void imlib_apply_color_modifier_to_rectangle(int x, int y, int width, - int height); +EAPI Imlib_Color_Modifier imlib_create_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_brightness(double + brightness_value); +EAPI void imlib_modify_color_modifier_contrast(double + contrast_value); +EAPI void imlib_set_color_modifier_tables(DATA8 * red_table, + DATA8 * green_table, + DATA8 * blue_table, + DATA8 * alpha_table); +EAPI void imlib_get_color_modifier_tables(DATA8 * red_table, + DATA8 * green_table, + DATA8 * blue_table, + DATA8 * alpha_table); +EAPI void imlib_reset_color_modifier(void); +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 */ - 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, - char make_updates); - EAPI void imlib_image_draw_rectangle(int x, int y, int width, int height); - EAPI void imlib_image_fill_rectangle(int x, int y, int width, int height); - EAPI void imlib_image_copy_alpha_to_image(Imlib_Image image_source, int x, - int y); - EAPI void imlib_image_copy_alpha_rectangle_to_image(Imlib_Image image_source, - int x, int y, int width, - int height, - int destination_x, - 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); +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, + char make_updates); +EAPI void imlib_image_draw_rectangle(int x, int y, + int width, int height); +EAPI void imlib_image_fill_rectangle(int x, int y, + int width, int height); +EAPI void imlib_image_copy_alpha_to_image(Imlib_Image image_source, + int x, int y); +EAPI void imlib_image_copy_alpha_rectangle_to_image(Imlib_Image + image_source, + int x, int y, + int width, + int height, + int destination_x, + 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 */ - EAPI ImlibPolygon imlib_polygon_new(void); - EAPI void imlib_polygon_free(ImlibPolygon poly); - 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_fill_polygon(ImlibPolygon poly); - EAPI void imlib_polygon_get_bounds(ImlibPolygon poly, int *px1, int *py1, - int *px2, int *py2); - EAPI unsigned char imlib_polygon_contains_point(ImlibPolygon poly, int x, - int y); +EAPI ImlibPolygon imlib_polygon_new(void); +EAPI void imlib_polygon_free(ImlibPolygon poly); +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_fill_polygon(ImlibPolygon poly); +EAPI void imlib_polygon_get_bounds(ImlibPolygon poly, + int *px1, int *py1, + int *px2, int *py2); +EAPI unsigned char imlib_polygon_contains_point(ImlibPolygon poly, + int x, int y); /* ellipses */ - 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_draw_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 */ - EAPI Imlib_Color_Range imlib_create_color_range(void); - EAPI void imlib_free_color_range(void); - 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, - int height, double angle); - EAPI void imlib_image_fill_hsva_color_range_rectangle(int x, int y, int width, - int height, double angle); +EAPI Imlib_Color_Range imlib_create_color_range(void); +EAPI void imlib_free_color_range(void); +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, + int height, + double angle); +EAPI void imlib_image_fill_hsva_color_range_rectangle(int x, int y, + int width, + int height, + double + angle); /* image data */ - EAPI void imlib_image_attach_data_value(const char *key, void *data, int value, - Imlib_Data_Destructor_Function - destructor_function); - EAPI void *imlib_image_get_attached_data(const char *key); - EAPI int imlib_image_get_attached_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); +EAPI void imlib_image_attach_data_value(const char *key, + void *data, int value, + Imlib_Data_Destructor_Function + destructor_function); +EAPI void *imlib_image_get_attached_data(const char *key); +EAPI int imlib_image_get_attached_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 */ - EAPI void imlib_save_image(const char *filename); - EAPI void imlib_save_image_with_error_return(const char *filename, - Imlib_Load_Error * error_return); +EAPI void imlib_save_image(const char *filename); +EAPI void imlib_save_image_with_error_return(const char *filename, + Imlib_Load_Error * + error_return); /* FIXME: */ /* need to add arbitrary rotation routines */ /* 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)*/ - EAPI void imlib_rotate_image_from_buffer(double angle, - Imlib_Image source_image); +EAPI void imlib_rotate_image_from_buffer(double angle, + Imlib_Image source_image); - EAPI void imlib_blend_image_onto_image_at_angle(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 angle_x, - int angle_y); - EAPI void imlib_blend_image_onto_image_skewed(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 h_angle_x, - int h_angle_y, int v_angle_x, - int v_angle_y); -# ifndef X_DISPLAY_MISSING - EAPI void imlib_render_image_on_drawable_skewed(int source_x, int source_y, - int source_width, - int source_height, - 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 +EAPI void imlib_blend_image_onto_image_at_angle(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 angle_x, + int angle_y); +EAPI void imlib_blend_image_onto_image_skewed(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 h_angle_x, + int h_angle_y, + int v_angle_x, + int v_angle_y); +#ifndef X_DISPLAY_MISSING +EAPI void imlib_render_image_on_drawable_skewed(int source_x, + int source_y, + int source_width, + int source_height, + 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 */ - EAPI void imlib_image_filter(void); - EAPI Imlib_Filter imlib_create_filter(int initsize); - EAPI void imlib_context_set_filter(Imlib_Filter filter); - EAPI Imlib_Filter imlib_context_get_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_alpha(int xoff, int yoff, int a, int r, int g, - int b); - EAPI void imlib_filter_set_red(int xoff, int yoff, int a, int r, int g, int b); - EAPI void imlib_filter_set_green(int xoff, int yoff, 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_image_filter(void); +EAPI Imlib_Filter imlib_create_filter(int initsize); +EAPI void imlib_context_set_filter(Imlib_Filter filter); +EAPI Imlib_Filter imlib_context_get_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_alpha(int xoff, int yoff, + int a, int r, int g, int b); +EAPI void imlib_filter_set_red(int xoff, int yoff, + int a, int r, int g, int b); +EAPI void imlib_filter_set_green(int xoff, int yoff, + 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_color(int r, int g, int b, int a); +EAPI void imlib_image_clear(void); +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 diff --git a/src/lib/asm.h b/src/lib/asm.h index 406f9d9..0a0cc2f 100644 --- a/src/lib/asm.h +++ b/src/lib/asm.h @@ -4,9 +4,9 @@ #define PR_(sym) __##sym #if defined(__GNUC__) && (__GNUC__ >= 4) -# define HIDDEN_(sym) .hidden PR_(sym) +#define HIDDEN_(sym) .hidden PR_(sym) #else -# define HIDDEN_(sym) +#define HIDDEN_(sym) #endif #define FN_(sym) \ diff --git a/src/lib/blend.h b/src/lib/blend.h index ea83d08..50610c2 100644 --- a/src/lib/blend.h +++ b/src/lib/blend.h @@ -80,7 +80,7 @@ else \ _w = 0; _h = 0; \ } \ } - + /* * 1) Basic Saturation - 8 bit unsigned * @@ -344,8 +344,8 @@ nc = (tmp | (-(tmp >> 8))) & (~(tmp >> 9)); tmp = (cc) + (((c) - 127) << 1); \ nc = (tmp | (-(tmp >> 8))) & (~(tmp >> 9)); -extern int pow_lut_initialized; -extern DATA8 pow_lut[256][256]; +extern int pow_lut_initialized; +extern DATA8 pow_lut[256][256]; #define BLEND_DST_ALPHA(r1, g1, b1, a1, dest) \ { 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, B_VAL(dest), b1, B_VAL(dest)); -enum _imlibop -{ +enum _imlibop { OP_COPY, OP_ADD, OP_SUBTRACT, @@ -386,319 +385,228 @@ enum _imlibop typedef enum _imlibop ImlibOp; -typedef void (*ImlibBlendFunction)(DATA32*, int, DATA32*, int, int, int, - ImlibColorModifier *); +typedef void (*ImlibBlendFunction) (DATA32 *, int, DATA32 *, int, int, + int, ImlibColorModifier *); -ImlibBlendFunction -__imlib_GetBlendFunction(ImlibOp op, char merge_alpha, char blend, char rgb_src, - ImlibColorModifier * cm); -void -__imlib_BlendImageToImage(ImlibImage *im_src, ImlibImage *im_dst, - char aa, char blend, char merge_alpha, - int ssx, int ssy, int ssw, int ssh, - int ddx, int ddy, int ddw, int ddh, - ImlibColorModifier *cm, ImlibOp op, - int clx, int cly, int clw, int clh); -void -__imlib_BlendRGBAToData(DATA32 *src, int src_w, int src_h, DATA32 *dst, - int dst_w, int dst_h, int sx, int sy, int dx, int dy, - int w, int h, char blend, char merge_alpha, - ImlibColorModifier *cm, ImlibOp op, char rgb_src); -void -__imlib_build_pow_lut(void); +ImlibBlendFunction __imlib_GetBlendFunction(ImlibOp op, char merge_alpha, + char blend, char rgb_src, + ImlibColorModifier * cm); +void __imlib_BlendImageToImage(ImlibImage * im_src, + ImlibImage * im_dst, char aa, + char blend, char merge_alpha, + int ssx, int ssy, + int ssw, int ssh, + int ddx, int ddy, + int ddw, int ddh, + ImlibColorModifier * cm, + ImlibOp op, int clx, int cly, + int clw, int clh); +void __imlib_BlendRGBAToData(DATA32 * src, int src_w, int src_h, + DATA32 * dst, int dst_w, int dst_h, + int sx, int sy, int dx, int dy, + 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 -void -__imlib_mmx_blend_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_blend_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_copy_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_copy_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_copy_rgb_to_rgba(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_add_blend_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_add_blend_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_add_copy_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_add_copy_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_add_copy_rgb_to_rgba(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_subtract_blend_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_subtract_blend_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_subtract_copy_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__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 __imlib_mmx_blend_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_blend_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_copy_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_copy_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_copy_rgb_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_add_blend_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_add_blend_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_add_copy_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_add_copy_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_add_copy_rgb_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_subtract_blend_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_subtract_blend_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_subtract_copy_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __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 -__imlib_mmx_blend_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_blend_rgba_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_blend_rgb_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_blend_rgb_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_copy_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_copy_rgba_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_copy_rgb_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, - 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, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_add_blend_rgba_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_add_blend_rgb_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, - 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, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_add_copy_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_add_copy_rgba_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, - 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, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_subtract_blend_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_subtract_blend_rgba_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, - 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, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_subtract_blend_rgb_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_mmx_subtract_copy_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, - 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); +void __imlib_mmx_blend_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_blend_rgba_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_blend_rgb_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_blend_rgb_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_copy_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_copy_rgba_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_copy_rgb_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, 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, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_add_blend_rgba_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_add_blend_rgb_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, 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, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_add_copy_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_add_copy_rgba_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, 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, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_subtract_blend_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_subtract_blend_rgba_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, 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, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_subtract_blend_rgb_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_mmx_subtract_copy_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, 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 -void -__imlib_amd64_blend_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_blend_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_copy_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_copy_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_copy_rgb_to_rgba(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_add_blend_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_add_blend_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_add_copy_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_add_copy_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_add_copy_rgb_to_rgba(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_subtract_blend_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_subtract_blend_rgba_to_rgba(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_subtract_copy_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__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(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_blend_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_copy_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_copy_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_copy_rgb_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_add_blend_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_add_blend_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_add_copy_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_add_copy_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_add_copy_rgb_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_subtract_blend_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_subtract_blend_rgba_to_rgba(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_subtract_copy_rgba_to_rgb(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __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, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_blend_rgba_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_blend_rgb_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_blend_rgb_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_copy_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_copy_rgba_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_copy_rgb_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_add_blend_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_add_blend_rgba_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, - 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, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_add_blend_rgb_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_add_copy_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, - 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, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_add_copy_rgb_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_subtract_blend_rgba_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, - 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, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_subtract_blend_rgb_to_rgb_cmod(DATA32 *src, int sw, DATA32 *dst, - int dw, int w, int h, ImlibColorModifier *cm); -void -__imlib_amd64_subtract_blend_rgb_to_rgba_cmod(DATA32 *src, int sw, DATA32 *dst, - 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, 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); +void __imlib_amd64_blend_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_blend_rgba_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_blend_rgb_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_blend_rgb_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_copy_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_copy_rgba_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_copy_rgb_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_add_blend_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_add_blend_rgba_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, 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, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_add_blend_rgb_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_add_copy_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, 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, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_add_copy_rgb_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_subtract_blend_rgba_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, 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, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_subtract_blend_rgb_to_rgb_cmod(DATA32 * src, int sw, DATA32 * dst, int dw, + int w, int h, ImlibColorModifier * cm); +void __imlib_amd64_subtract_blend_rgb_to_rgba_cmod(DATA32 * src, int sw, DATA32 * dst, 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, + 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 +/* *INDENT-ON* */ #endif diff --git a/src/lib/color.h b/src/lib/color.h index 90dde06..9a1bcf0 100644 --- a/src/lib/color.h +++ b/src/lib/color.h @@ -7,26 +7,26 @@ extern DATA16 _max_colors; -int __imlib_XActualDepth(Display * d, Visual * v); -Visual *__imlib_BestVisual(Display * d, int screen, +int __imlib_XActualDepth(Display * d, Visual * v); +Visual *__imlib_BestVisual(Display * d, int screen, int *depth_return); -DATA8 *__imlib_AllocColorTable(Display * d, Colormap cmap, +DATA8 *__imlib_AllocColorTable(Display * d, Colormap cmap, DATA8 * type_return, Visual * v); -DATA8 *__imlib_AllocColors332(Display * d, Colormap cmap, +DATA8 *__imlib_AllocColors332(Display * d, Colormap cmap, Visual * v); -DATA8 *__imlib_AllocColors666(Display * d, Colormap cmap, +DATA8 *__imlib_AllocColors666(Display * d, Colormap cmap, Visual * v); -DATA8 *__imlib_AllocColors232(Display * d, Colormap cmap, +DATA8 *__imlib_AllocColors232(Display * d, Colormap cmap, Visual * v); -DATA8 *__imlib_AllocColors222(Display * d, Colormap cmap, +DATA8 *__imlib_AllocColors222(Display * d, Colormap cmap, Visual * v); -DATA8 *__imlib_AllocColors221(Display * d, Colormap cmap, +DATA8 *__imlib_AllocColors221(Display * d, Colormap cmap, Visual * v); -DATA8 *__imlib_AllocColors121(Display * d, Colormap cmap, +DATA8 *__imlib_AllocColors121(Display * d, Colormap cmap, Visual * v); -DATA8 *__imlib_AllocColors111(Display * d, Colormap cmap, +DATA8 *__imlib_AllocColors111(Display * d, Colormap cmap, Visual * v); -DATA8 *__imlib_AllocColors1(Display * d, Colormap cmap, +DATA8 *__imlib_AllocColors1(Display * d, Colormap cmap, Visual * v); #endif diff --git a/src/lib/color_helpers.h b/src/lib/color_helpers.h index a972153..4579f3e 100644 --- a/src/lib/color_helpers.h +++ b/src/lib/color_helpers.h @@ -1,11 +1,16 @@ -#ifndef __COLOR_HELPERS +#ifndef __COLOR_HELPERS #define __COLOR_HELPERS 1 #include "common.h" -void __imlib_rgb_to_hsv(int r, int g, int b, float *hue, float *saturation, float *value); -void __imlib_hsv_to_rgb(float hue, float saturation, float value, 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); +void __imlib_rgb_to_hsv(int r, int g, int b, float *hue, + float *saturation, float *value); +void __imlib_hsv_to_rgb(float hue, float saturation, float value, + 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 diff --git a/src/lib/colormod.h b/src/lib/colormod.h index 06b9796..05ff5c6 100644 --- a/src/lib/colormod.h +++ b/src/lib/colormod.h @@ -4,15 +4,14 @@ #include "common.h" #include "image.h" -typedef struct _imlib_color_modifier ImlibColorModifier; +typedef struct _imlib_color_modifier ImlibColorModifier; -struct _imlib_color_modifier -{ - DATA8 red_mapping[256]; - DATA8 green_mapping[256]; - DATA8 blue_mapping[256]; - DATA8 alpha_mapping[256]; - DATABIG modification_count; +struct _imlib_color_modifier { + DATA8 red_mapping[256]; + DATA8 green_mapping[256]; + DATA8 blue_mapping[256]; + DATA8 alpha_mapping[256]; + DATABIG modification_count; }; #define CMOD_APPLY_RGB(cm, r, g, b) \ @@ -44,22 +43,20 @@ struct _imlib_color_modifier #define A_CMOD(cm, a) \ (cm)->alpha_mapping[(int)(a)] -ImlibColorModifier * __imlib_CreateCmod(void); -void __imlib_FreeCmod(ImlibColorModifier *cm); -void __imlib_CmodChanged(ImlibColorModifier *cm); -void __imlib_CmodSetTables(ImlibColorModifier *cm, DATA8 *r, - DATA8 *g, DATA8 *b, DATA8 *a); -void __imlib_CmodReset(ImlibColorModifier *cm); -void __imlib_DataCmodApply(DATA32 *data, int w, int h, - int jump, ImlibImageFlags *fl, - ImlibColorModifier *cm); +ImlibColorModifier *__imlib_CreateCmod(void); +void __imlib_FreeCmod(ImlibColorModifier * cm); +void __imlib_CmodChanged(ImlibColorModifier * cm); +void __imlib_CmodSetTables(ImlibColorModifier * cm, DATA8 * r, + DATA8 * g, DATA8 * b, DATA8 * a); +void __imlib_CmodReset(ImlibColorModifier * cm); +void __imlib_DataCmodApply(DATA32 * data, int w, int h, + int jump, ImlibImageFlags * fl, + ImlibColorModifier * cm); -void __imlib_CmodGetTables(ImlibColorModifier *cm, DATA8 *r, - DATA8 *g, DATA8 *b, DATA8 *a); -void __imlib_CmodModBrightness(ImlibColorModifier *cm, - double v); -void __imlib_CmodModContrast(ImlibColorModifier *cm, - double v); -void __imlib_CmodModGamma(ImlibColorModifier *cm, - double v); +void __imlib_CmodGetTables(ImlibColorModifier * cm, DATA8 * r, + DATA8 * g, DATA8 * b, DATA8 * a); +void __imlib_CmodModBrightness(ImlibColorModifier * cm, + double v); +void __imlib_CmodModContrast(ImlibColorModifier * cm, double v); +void __imlib_CmodModGamma(ImlibColorModifier * cm, double v); #endif diff --git a/src/lib/common.h b/src/lib/common.h index 16d09dc..798965f 100644 --- a/src/lib/common.h +++ b/src/lib/common.h @@ -10,7 +10,7 @@ #include #include #ifdef WITH_DMALLOC -# include +#include #endif #define DATABIG unsigned long long @@ -20,7 +20,8 @@ #define DATA8 unsigned char #ifdef DO_MMX_ASM -int __imlib_get_cpuid(void); +int __imlib_get_cpuid(void); + #define CPUID_MMX (1 << 23) #define CPUID_XMM (1 << 25) #endif diff --git a/src/lib/context.h b/src/lib/context.h index 40801d7..1aa6cb8 100644 --- a/src/lib/context.h +++ b/src/lib/context.h @@ -20,17 +20,17 @@ struct _context { void *b_dither; }; -void __imlib_SetMaxContexts(int num); -int __imlib_GetMaxContexts(void); -void __imlib_FlushContexts(void); -void __imlib_FreeContextForDisplay(Display * d); -void __imlib_FreeContextForColormap(Display * d, Colormap cm); -void __imlib_FreeContextForVisual(Display * d, Visual * v); -Context *__imlib_FindContext(Display * d, Visual * v, Colormap c, +void __imlib_SetMaxContexts(int num); +int __imlib_GetMaxContexts(void); +void __imlib_FlushContexts(void); +void __imlib_FreeContextForDisplay(Display * d); +void __imlib_FreeContextForColormap(Display * d, Colormap cm); +void __imlib_FreeContextForVisual(Display * d, Visual * v); +Context *__imlib_FindContext(Display * d, Visual * v, Colormap c, int depth); -Context *__imlib_NewContext(Display * d, Visual * v, Colormap c, +Context *__imlib_NewContext(Display * d, Visual * v, Colormap c, int depth); -Context *__imlib_GetContext(Display * d, Visual * v, Colormap c, +Context *__imlib_GetContext(Display * d, Visual * v, Colormap c, int depth); #endif diff --git a/src/lib/draw.h b/src/lib/draw.h index 6bb181a..8ce0ac4 100644 --- a/src/lib/draw.h +++ b/src/lib/draw.h @@ -4,7 +4,7 @@ #include "colormod.h" #include "common.h" -char __imlib_CreatePixmapsForImage(Display * d, Drawable w, +char __imlib_CreatePixmapsForImage(Display * d, Drawable w, Visual * v, int depth, Colormap cm, ImlibImage * im, Pixmap * p, Mask * m, int sx, diff --git a/src/lib/dynamic_filters.h b/src/lib/dynamic_filters.h index 204cf24..ab57cbd 100644 --- a/src/lib/dynamic_filters.h +++ b/src/lib/dynamic_filters.h @@ -4,37 +4,36 @@ #include "common.h" #include "script.h" -struct imlib_filter_info -{ - char *name; - char *author; - char *description; - char **filters; - int num_filters; +struct imlib_filter_info { + char *name; + char *author; + char *description; + char **filters; + int num_filters; }; typedef struct _imlib_external_filter ImlibExternalFilter; typedef struct _imlib_external_filter *pImlibExternalFilter; -struct _imlib_external_filter -{ - char *name; - char *author; - char *description; - int num_filters; - char *filename; - void *handle; - char **filters; - void (*init_filter)( struct imlib_filter_info *info ); - void (*deinit_filter)(void); - void *(*exec_filter)( char *filter, void *im, pIFunctionParam params ); +struct _imlib_external_filter { + char *name; + char *author; + char *description; + int num_filters; + char *filename; + void *handle; + char **filters; + void (*init_filter) (struct imlib_filter_info * info); + void (*deinit_filter) (void); + void *(*exec_filter) (char *filter, void *im, + pIFunctionParam params); pImlibExternalFilter next; }; -void __imlib_dynamic_filters_init(void); -void __imlib_dynamic_filters_deinit(void); -pImlibExternalFilter __imlib_get_dynamic_filter( char *name ); -char **__imlib_ListFilters(int *num_ret); -pImlibExternalFilter __imlib_LoadFilter( char *file ); +void __imlib_dynamic_filters_init(void); +void __imlib_dynamic_filters_deinit(void); +pImlibExternalFilter __imlib_get_dynamic_filter(char *name); +char **__imlib_ListFilters(int *num_ret); +pImlibExternalFilter __imlib_LoadFilter(char *file); #endif diff --git a/src/lib/filter.h b/src/lib/filter.h index fef4942..56ea46a 100644 --- a/src/lib/filter.h +++ b/src/lib/filter.h @@ -7,39 +7,31 @@ typedef struct _imlib_filter ImlibFilter; typedef struct _imlib_filter_color ImlibFilterColor; typedef struct _imlib_filter_pixel ImlibFilterPixel; -struct _imlib_filter_pixel -{ - int xoff, yoff; - int a, r, g, b; +struct _imlib_filter_pixel { + int xoff, yoff; + int a, r, g, b; }; -struct _imlib_filter_color -{ - int size, entries; - int div, cons; - ImlibFilterPixel *pixels; +struct _imlib_filter_color { + int size, entries; + int div, cons; + ImlibFilterPixel *pixels; }; -struct _imlib_filter -{ - ImlibFilterColor alpha, red, green, blue; +struct _imlib_filter { + ImlibFilterColor alpha, red, green, blue; }; -ImlibFilter * -__imlib_CreateFilter(int size); -void -__imlib_FreeFilter(ImlibFilter *fil); -void -__imlib_FilterSet(ImlibFilterColor *fil, int x, int y, - int a, int r, int g, int b); -void -__imlib_FilterSetColor(ImlibFilterColor * fil, int x, int y, - int a, int r, int g, int b); -void -__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); +ImlibFilter *__imlib_CreateFilter(int size); +void __imlib_FreeFilter(ImlibFilter * fil); +void __imlib_FilterSet(ImlibFilterColor * fil, int x, int y, + int a, int r, int g, int b); +void __imlib_FilterSetColor(ImlibFilterColor * fil, int x, int y, + int a, int r, int g, int b); +void __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 diff --git a/src/lib/font.h b/src/lib/font.h index 02f2784..fff6d09 100644 --- a/src/lib/font.h +++ b/src/lib/font.h @@ -6,44 +6,38 @@ /* TODO separate fonts and data stuff */ -typedef struct _Imlib_Font ImlibFont; -typedef struct _Imlib_Font_Glyph Imlib_Font_Glyph; +typedef struct _Imlib_Font ImlibFont; +typedef struct _Imlib_Font_Glyph Imlib_Font_Glyph; -typedef struct _Imlib_Object_List Imlib_Object_List; -typedef struct _Imlib_Hash Imlib_Hash; -typedef struct _Imlib_Hash_El Imlib_Hash_El; +typedef struct _Imlib_Object_List Imlib_Object_List; +typedef struct _Imlib_Hash Imlib_Hash; +typedef struct _Imlib_Hash_El Imlib_Hash_El; -struct _Imlib_Object_List -{ +struct _Imlib_Object_List { Imlib_Object_List *next, *prev; Imlib_Object_List *last; }; -struct _Imlib_Hash -{ +struct _Imlib_Hash { int population; Imlib_Object_List *buckets[256]; }; -struct _Imlib_Hash_El -{ +struct _Imlib_Hash_El { Imlib_Object_List _list_data; char *key; void *data; }; -struct _Imlib_Font -{ +struct _Imlib_Font { Imlib_Object_List _list_data; char *name; char *file; int size; - struct - { + struct { FT_Face face; - } - ft; + } ft; Imlib_Hash *glyphs; @@ -52,12 +46,11 @@ struct _Imlib_Font int references; /* using a double-linked list for the fallback chain */ - struct _Imlib_Font *fallback_prev; - struct _Imlib_Font *fallback_next; + struct _Imlib_Font *fallback_prev; + struct _Imlib_Font *fallback_next; }; -struct _Imlib_Font_Glyph -{ +struct _Imlib_Font_Glyph { FT_Glyph glyph; FT_BitmapGlyph glyph_out; }; @@ -80,7 +73,8 @@ char **__imlib_font_list_fonts(int *num_ret); ImlibFont *__imlib_font_load_joined(const char *name); void __imlib_font_free(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); int __imlib_font_cache_get(void); 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_flush_last(void); 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, - int *w, int *h); + int *w, int *h); int __imlib_font_query_inset(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, - const char *text, int pos, - int *cx, int *cy, int *cw, - int *ch); + const char *text, int pos, + int *cx, int *cy, + int *cw, int *ch); int __imlib_font_query_text_at_pos(ImlibFont * fn, - const char *text, int x, int y, - int *cx, int *cy, int *cw, - int *ch); + const char *text, + int x, int y, + int *cx, int *cy, + int *cw, int *ch); Imlib_Font_Glyph *__imlib_font_cache_glyph_get(ImlibFont * fn, FT_UInt index); -void __imlib_render_str(ImlibImage * im, ImlibFont * f, int drx, - int dry, const char *text, DATA8 r, - DATA8 g, DATA8 b, DATA8 a, char dir, - double angle, int *retw, int *reth, - int blur, int *nextx, int *nexty, - ImlibOp op, int clx, int cly, int clw, - int clh); +void __imlib_render_str(ImlibImage * im, ImlibFont * f, + int drx, int dry, const char *text, + DATA8 r, DATA8 g, DATA8 b, DATA8 a, + char dir, double angle, + int *retw, int *reth, int blur, + int *nextx, int *nexty, ImlibOp op, + int clx, int cly, int clw, int clh); void __imlib_font_draw(ImlibImage * dst, DATA32 col, - ImlibFont * fn, int x, int y, - const char *text, int *nextx, int *nexty, - int clx, int cly, int clw, int clh); + ImlibFont * fn, int x, int y, + const char *text, int *nextx, int *nexty, + int clx, int cly, int clw, int clh); /* data manipulation */ void *__imlib_object_list_prepend(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, - const void *data); + const void *data); void *__imlib_hash_find(Imlib_Hash * hash, const char *key); void __imlib_hash_free(Imlib_Hash * hash); void __imlib_hash_foreach(Imlib_Hash * hash, - int (*func) (Imlib_Hash * hash, - const char *key, void *data, - void *fdata), - const void *fdata); + int (*func) (Imlib_Hash * hash, + const char *key, + void *data, void *fdata), + const void *fdata); diff --git a/src/lib/grab.h b/src/lib/grab.h index ca5ede3..cf4086a 100644 --- a/src/lib/grab.h +++ b/src/lib/grab.h @@ -3,13 +3,13 @@ #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, Drawable p, Pixmap m, Visual * v, Colormap cm, int depth, int x, int y, int w, int h, 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, XImage * xim, XImage * mxim, Visual * v, int depth, int x, diff --git a/src/lib/grad.h b/src/lib/grad.h index 8826c4d..5d0aa0a 100644 --- a/src/lib/grad.h +++ b/src/lib/grad.h @@ -3,28 +3,35 @@ #include "common.h" -typedef struct _imlib_range ImlibRange; +typedef struct _imlib_range ImlibRange; typedef struct _imlib_range_color ImlibRangeColor; -struct _imlib_range_color -{ - DATA8 red, green, blue, alpha; - int distance; - ImlibRangeColor *next; +struct _imlib_range_color { + DATA8 red, green, blue, alpha; + int distance; + ImlibRangeColor *next; }; -struct _imlib_range -{ - ImlibRangeColor *color; +struct _imlib_range { + ImlibRangeColor *color; }; -ImlibRange *__imlib_CreateRange(void); -void __imlib_FreeRange(ImlibRange *rg); -void __imlib_AddRangeColor(ImlibRange *rg, DATA8 r, DATA8 g, DATA8 b, - DATA8 a, int dist); -DATA32 *__imlib_MapRange(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_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); +ImlibRange *__imlib_CreateRange(void); +void __imlib_FreeRange(ImlibRange * rg); +void __imlib_AddRangeColor(ImlibRange * rg, DATA8 r, DATA8 g, + DATA8 b, DATA8 a, int dist); +DATA32 *__imlib_MapRange(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_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 diff --git a/src/lib/image.h b/src/lib/image.h index 51aed88..e9eb678 100644 --- a/src/lib/image.h +++ b/src/lib/image.h @@ -10,168 +10,171 @@ #endif #endif -typedef struct _imlibimage ImlibImage; +typedef struct _imlibimage ImlibImage; + #ifdef BUILD_X11 -typedef struct _imlibimagepixmap ImlibImagePixmap; +typedef struct _imlibimagepixmap ImlibImagePixmap; #endif -typedef struct _imlibborder ImlibBorder; -typedef struct _imlibloader ImlibLoader; -typedef struct _imlibimagetag ImlibImageTag; -typedef enum _imlib_load_error ImlibLoadError; +typedef struct _imlibborder ImlibBorder; +typedef struct _imlibloader ImlibLoader; +typedef struct _imlibimagetag ImlibImageTag; +typedef enum _imlib_load_error ImlibLoadError; -typedef int (*ImlibProgressFunction)(ImlibImage *im, char percent, - int update_x, int update_y, - int update_w, int update_h); -typedef void (*ImlibDataDestructorFunction)(ImlibImage *im, void *data); +typedef int (*ImlibProgressFunction) (ImlibImage * im, char percent, + int update_x, int update_y, + int update_w, int update_h); +typedef void (*ImlibDataDestructorFunction) (ImlibImage * im, + void *data); -enum _iflags -{ - F_NONE = 0, - F_HAS_ALPHA = (1 << 0), - F_UNLOADED = (1 << 1), - F_UNCACHEABLE = (1 << 2), +enum _iflags { + F_NONE = 0, + F_HAS_ALPHA = (1 << 0), + F_UNLOADED = (1 << 1), + F_UNCACHEABLE = (1 << 2), F_ALWAYS_CHECK_DISK = (1 << 3), - F_INVALID = (1 << 4), - F_DONT_FREE_DATA = (1 << 5), + F_INVALID = (1 << 4), + F_DONT_FREE_DATA = (1 << 5), F_FORMAT_IRRELEVANT = (1 << 6), 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 -{ - int left, right, top, bottom; +struct _imlibborder { + int left, right, top, bottom; }; -struct _imlibimagetag -{ - char *key; - int val; - void *data; - void (*destructor)(ImlibImage *im, void *data); - ImlibImageTag *next; +struct _imlibimagetag { + char *key; + int val; + void *data; + void (*destructor) (ImlibImage * im, void *data); + ImlibImageTag *next; }; -struct _imlibimage -{ - char *file; - int w, h; - DATA32 *data; - ImlibImageFlags flags; - time_t moddate; - ImlibBorder border; - int references; - ImlibLoader *loader; - char *format; - ImlibImage *next; - ImlibImageTag *tags; - char *real_file; - char *key; +struct _imlibimage { + char *file; + int w, h; + DATA32 *data; + ImlibImageFlags flags; + time_t moddate; + ImlibBorder border; + int references; + ImlibLoader *loader; + char *format; + ImlibImage *next; + ImlibImageTag *tags; + char *real_file; + char *key; }; #ifdef BUILD_X11 -struct _imlibimagepixmap -{ - int w, h; - Pixmap pixmap, mask; - Display *display; - Visual *visual; - int depth; - int source_x, source_y, source_w, source_h; - Colormap colormap; - char antialias, hi_quality, dither_mask; - ImlibBorder border; - ImlibImage *image; - char *file; - char dirty; - int references; - DATABIG modification_count; - ImlibImagePixmap *next; +struct _imlibimagepixmap { + int w, h; + Pixmap pixmap, mask; + Display *display; + Visual *visual; + int depth; + int source_x, source_y, source_w, source_h; + Colormap colormap; + char antialias, hi_quality, dither_mask; + ImlibBorder border; + ImlibImage *image; + char *file; + char dirty; + int references; + DATABIG modification_count; + ImlibImagePixmap *next; }; #endif -struct _imlibloader -{ - char *file; - int num_formats; - char **formats; - void *handle; - char (*load)(ImlibImage *im, - ImlibProgressFunction progress, - char progress_granularity, char immediate_load); - char (*save)(ImlibImage *im, - ImlibProgressFunction progress, - char progress_granularity); - ImlibLoader *next; +struct _imlibloader { + char *file; + int num_formats; + char **formats; + void *handle; + char (*load) (ImlibImage * im, + ImlibProgressFunction progress, + char progress_granularity, char immediate_load); + char (*save) (ImlibImage * im, + ImlibProgressFunction progress, + char progress_granularity); + ImlibLoader *next; }; -void __imlib_AttachTag(ImlibImage *im, const char *key, - int val, void *data, - ImlibDataDestructorFunction destructor); -ImlibImageTag *__imlib_GetTag(ImlibImage *im, const char *key); -ImlibImageTag *__imlib_RemoveTag(ImlibImage *im, const char *key); -void __imlib_FreeTag(ImlibImage *im, ImlibImageTag *t); -void __imlib_FreeAllTags(ImlibImage *im); +void __imlib_AttachTag(ImlibImage * im, const char *key, + int val, void *data, + ImlibDataDestructorFunction destructor); +ImlibImageTag *__imlib_GetTag(ImlibImage * im, const char *key); +ImlibImageTag *__imlib_RemoveTag(ImlibImage * im, const char *key); +void __imlib_FreeTag(ImlibImage * im, ImlibImageTag * t); +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 -ImlibImagePixmap *__imlib_ProduceImagePixmap(void); -void __imlib_ConsumeImagePixmap(ImlibImagePixmap *ip); -ImlibImagePixmap *__imlib_FindCachedImagePixmap(ImlibImage *im, int w, int h, - Display *d, Visual *v, - int depth, int sx, int sy, - int sw, int sh, Colormap cm, - char aa, char hiq, char dmask, - DATABIG modification_count); -ImlibImagePixmap *__imlib_FindCachedImagePixmapByID(Display *d, Pixmap p); -void __imlib_AddImagePixmapToCache(ImlibImagePixmap *ip); -void __imlib_RemoveImagePixmapFromCache(ImlibImagePixmap *ip); -void __imlib_CleanupImagePixmapCache(void); +ImlibImagePixmap *__imlib_ProduceImagePixmap(void); +void __imlib_ConsumeImagePixmap(ImlibImagePixmap * ip); +ImlibImagePixmap *__imlib_FindCachedImagePixmap(ImlibImage * im, int w, int h, + Display * d, Visual * v, + int depth, int sx, int sy, + int sw, int sh, Colormap cm, + char aa, char hiq, char dmask, + DATABIG modification_count); +ImlibImagePixmap *__imlib_FindCachedImagePixmapByID(Display * d, Pixmap p); +void __imlib_AddImagePixmapToCache(ImlibImagePixmap * ip); +void __imlib_RemoveImagePixmapFromCache(ImlibImagePixmap * ip); +void __imlib_CleanupImagePixmapCache(void); #endif -ImlibLoader *__imlib_ProduceLoader(char *file); -char **__imlib_ListLoaders(int *num_ret); -char **__imlib_TrimLoaderList(char **list, int *num); -int __imlib_ItemInList(char **list, int size, char *item); -void __imlib_ConsumeLoader(ImlibLoader *l); -void __imlib_RescanLoaders(void); -void __imlib_RemoveAllLoaders(void); -void __imlib_LoadAllLoaders(void); -ImlibLoader *__imlib_FindBestLoaderForFile(const char *file, int for_save); -ImlibLoader *__imlib_FindBestLoaderForFileFormat(const char *file, char *format, int for_save); -void __imlib_SetImageAlphaFlag(ImlibImage *im, char alpha); -ImlibImage *__imlib_CreateImage(int w, int h, DATA32 *data); -ImlibImage *__imlib_LoadImage(const char *file, - ImlibProgressFunction progress, - char progress_granularity, char immediate_load, - char dont_cache, ImlibLoadError *er); +ImlibLoader *__imlib_ProduceLoader(char *file); +char **__imlib_ListLoaders(int *num_ret); +char **__imlib_TrimLoaderList(char **list, int *num); +int __imlib_ItemInList(char **list, int size, char *item); +void __imlib_ConsumeLoader(ImlibLoader * l); +void __imlib_RescanLoaders(void); +void __imlib_RemoveAllLoaders(void); +void __imlib_LoadAllLoaders(void); +ImlibLoader *__imlib_FindBestLoaderForFile(const char *file, + int for_save); +ImlibLoader *__imlib_FindBestLoaderForFileFormat(const char *file, + char *format, + int for_save); +void __imlib_SetImageAlphaFlag(ImlibImage * im, char alpha); +ImlibImage *__imlib_CreateImage(int w, int h, DATA32 * data); +ImlibImage *__imlib_LoadImage(const char *file, + ImlibProgressFunction progress, + char progress_granularity, + char immediate_load, char dont_cache, + ImlibLoadError * er); #ifdef BUILD_X11 -ImlibImagePixmap *__imlib_FindImlibImagePixmapByID(Display *d, Pixmap p); +ImlibImagePixmap *__imlib_FindImlibImagePixmapByID(Display * d, Pixmap p); #endif -void __imlib_FreeImage(ImlibImage *im); +void __imlib_FreeImage(ImlibImage * im); + #ifdef BUILD_X11 -void __imlib_FreePixmap(Display *d, Pixmap p); +void __imlib_FreePixmap(Display * d, Pixmap p); #endif -void __imlib_FlushCache(void); +void __imlib_FlushCache(void); + #ifdef BUILD_X11 -void __imlib_DirtyPixmapsForImage(ImlibImage *im); +void __imlib_DirtyPixmapsForImage(ImlibImage * im); #else -#define __imlib_DirtyPixmapsForImage(x) /* x */ +#define __imlib_DirtyPixmapsForImage(x) /* x */ #endif -void __imlib_DirtyImage(ImlibImage *im); -void __imlib_SaveImage(ImlibImage *im, const char *file, - ImlibProgressFunction progress, - char progress_granularity, - ImlibLoadError *er); +void __imlib_DirtyImage(ImlibImage * im); +void __imlib_SaveImage(ImlibImage * im, const char *file, + ImlibProgressFunction progress, + char progress_granularity, + ImlibLoadError * er); #define IMAGE_HAS_ALPHA(im) ((im)->flags & F_HAS_ALPHA) #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. */ /* 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) \ ( ((w) > 0) && ((h) > 0) && ((w) < X_MAX_DIM) && ((h) < X_MAX_DIM) ) diff --git a/src/lib/rend.h b/src/lib/rend.h index d7b1498..2a68c46 100644 --- a/src/lib/rend.h +++ b/src/lib/rend.h @@ -3,13 +3,13 @@ #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, 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, Visual * v, Colormap cm, int depth, int sx, int sy, int sw, int sh, @@ -18,7 +18,7 @@ void __imlib_RenderImage(Display * d, ImlibImage * im, char dither_mask, int mat, ImlibColorModifier * cmod, ImlibOp op); -void __imlib_RenderImageSkewed(Display * d, ImlibImage * im, +void __imlib_RenderImageSkewed(Display * d, ImlibImage * im, Drawable w, Drawable m, Visual * v, Colormap cm, int depth, int sx, int sy, int sw, diff --git a/src/lib/rgba.h b/src/lib/rgba.h index 3d4b60f..7c83598 100644 --- a/src/lib/rgba.h +++ b/src/lib/rgba.h @@ -8,19 +8,18 @@ #define DM_X (8) #define DM_Y (8) -void __imlib_RGBASetupContext(Context * ct); -void __imlib_RGBA_init(void *rd, void *gd, void *bd, int depth, +void __imlib_RGBASetupContext(Context * ct); +void __imlib_RGBA_init(void *rd, void *gd, void *bd, int depth, DATA8 palette_type); typedef void (*ImlibRGBAFunction) (DATA32 *, int, DATA8 *, int, int, int, int, int); typedef void (*ImlibMaskFunction) (DATA32 *, int, DATA8 *, int, int, int, int, int, int); - ImlibRGBAFunction -__imlib_GetRGBAFunction(int depth, - unsigned long rm, unsigned long gm, unsigned long bm, - char hiq, DATA8 palette_type); -ImlibMaskFunction __imlib_GetMaskFunction(char hiq); +ImlibRGBAFunction __imlib_GetRGBAFunction(int depth, unsigned long rm, + unsigned long gm, unsigned long bm, + char hiq, DATA8 palette_type); +ImlibMaskFunction __imlib_GetMaskFunction(char hiq); #ifdef DO_MMX_ASM void __imlib_mmx_rgb555_fast(DATA32 *, int, DATA8 *, int, int, diff --git a/src/lib/rgbadraw.h b/src/lib/rgbadraw.h index 83f2cf1..2e11092 100644 --- a/src/lib/rgbadraw.h +++ b/src/lib/rgbadraw.h @@ -37,109 +37,116 @@ do { \ #define MULT(na, a0, a1, tmp) \ DIV_255(na, (a0) * (a1), tmp) - typedef struct _imlib_point ImlibPoint; -struct _imlib_point -{ - int x, y; +struct _imlib_point { + int x, y; }; typedef struct _imlib_rectangle Imlib_Rectangle; -struct _imlib_rectangle -{ - int x, y, w, h; +struct _imlib_rectangle { + int x, y, w, h; }; typedef struct _imlib_polygon _ImlibPoly; typedef _ImlibPoly *ImlibPoly; -struct _imlib_polygon -{ - ImlibPoint *points; - int pointcount; - int lx, rx; - int ty, by; +struct _imlib_polygon { + ImlibPoint *points; + int pointcount; + int lx, rx; + int ty, by; }; /* image related operations: in rgbadraw.c */ -void __imlib_FlipImageHoriz(ImlibImage * im); -void __imlib_FlipImageVert(ImlibImage * im); -void __imlib_FlipImageBoth(ImlibImage * im); -void __imlib_FlipImageDiagonal(ImlibImage * im, int direction); -void __imlib_BlurImage(ImlibImage * im, int rad); -void __imlib_SharpenImage(ImlibImage * im, int rad); -void __imlib_TileImageHoriz(ImlibImage * im); -void __imlib_TileImageVert(ImlibImage * im); +void __imlib_FlipImageHoriz(ImlibImage * im); +void __imlib_FlipImageVert(ImlibImage * im); +void __imlib_FlipImageBoth(ImlibImage * im); +void __imlib_FlipImageDiagonal(ImlibImage * im, int direction); +void __imlib_BlurImage(ImlibImage * im, int rad); +void __imlib_SharpenImage(ImlibImage * im, int rad); +void __imlib_TileImageHoriz(ImlibImage * im); +void __imlib_TileImageVert(ImlibImage * im); -void __imlib_copy_alpha_data(ImlibImage * src, ImlibImage * dst, 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_alpha_data(ImlibImage * src, ImlibImage * dst, + 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 */ -ImlibUpdate * -__imlib_Point_DrawToImage(int x, int y, DATA32 color, - ImlibImage *im, int clx, int cly, int clw, int clh, - ImlibOp op, char blend, 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); +ImlibUpdate *__imlib_Point_DrawToImage(int x, int y, DATA32 color, + ImlibImage * im, + int clx, int cly, + int clw, int clh, + ImlibOp op, char blend, + 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 */ -void -__imlib_Rectangle_DrawToImage(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); +void __imlib_Rectangle_DrawToImage(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 */ -void -__imlib_Ellipse_DrawToImage(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); +void __imlib_Ellipse_DrawToImage(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 */ -ImlibPoly __imlib_polygon_new(void); -void __imlib_polygon_free(ImlibPoly poly); -void __imlib_polygon_add_point(ImlibPoly poly, int x, int y); -unsigned char __imlib_polygon_contains_point(ImlibPoly poly, int x, int y); -void __imlib_polygon_get_bounds(ImlibPoly poly, int *px1, int *py1, int *px2, int *py2); - +ImlibPoly __imlib_polygon_new(void); +void __imlib_polygon_free(ImlibPoly poly); +void __imlib_polygon_add_point(ImlibPoly poly, int x, int y); +unsigned char __imlib_polygon_contains_point(ImlibPoly poly, + 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 */ -void -__imlib_Polygon_DrawToImage(ImlibPoly poly, char closed, DATA32 color, - ImlibImage *im, int clx, int cly, int clw, int clh, - ImlibOp op, char blend, char anti_alias); -void -__imlib_Polygon_FillToImage(ImlibPoly poly, DATA32 color, - ImlibImage *im, int clx, int cly, int clw, int clh, - ImlibOp op, char blend, char anti_alias); - +void __imlib_Polygon_DrawToImage(ImlibPoly poly, char closed, + DATA32 color, ImlibImage * im, + int clx, int cly, + int clw, int clh, + ImlibOp op, char blend, + char anti_alias); +void __imlib_Polygon_FillToImage(ImlibPoly poly, DATA32 color, + ImlibImage * im, + int clx, int cly, + int clw, int clh, + ImlibOp op, char blend, + char anti_alias); #endif diff --git a/src/lib/rotate.h b/src/lib/rotate.h index a96c219..aa93ea3 100644 --- a/src/lib/rotate.h +++ b/src/lib/rotate.h @@ -11,24 +11,34 @@ #define _ROTATE_PREC_MAX (1 << _ROTATE_PREC) #define _ROTATE_PREC_BITS (_ROTATE_PREC_MAX - 1) -void __imlib_RotateSample(DATA32 *src, DATA32 *dest, int sow, int sw, int sh, - int dow, int dw, int dh, int x, int y, - int dxh, int dyh, int dxv, int dyv); -void __imlib_RotateAA(DATA32 *src, DATA32 *dest, int sow, int sw, int sh, - int dow, int dw, int dh, int x, int y, - int dx, int dy, int dxv, int dyv); -void __imlib_BlendImageToImageSkewed(ImlibImage *im_src, ImlibImage *im_dst, - 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); - +void __imlib_RotateSample(DATA32 * src, DATA32 * dest, + int sow, int sw, int sh, + int dow, int dw, int dh, + int x, int y, + int dxh, int dyh, int dxv, int dyv); +void __imlib_RotateAA(DATA32 * src, DATA32 * dest, + int sow, int sw, int sh, + int dow, int dw, int dh, + int x, int y, int dx, int dy, + int dxv, int dyv); +void __imlib_BlendImageToImageSkewed(ImlibImage * im_src, + ImlibImage * im_dst, + 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 -void __imlib_mmx_RotateAA(DATA32 *src, DATA32 *dest, int sow, int sw, int sh, - int dow, int dw, int dh, int x, int y, - int dx, int dy, int dxv, int dyv); +void __imlib_mmx_RotateAA(DATA32 * src, DATA32 * dest, int sow, + int sw, int sh, int dow, int dw, + int dh, int x, int y, int dx, int dy, + int dxv, int dyv); #endif #endif diff --git a/src/lib/scale.h b/src/lib/scale.h index eb92456..e15a4dd 100644 --- a/src/lib/scale.h +++ b/src/lib/scale.h @@ -5,20 +5,21 @@ typedef struct _imlib_scale_info ImlibScaleInfo; -ImlibScaleInfo * -__imlib_CalcScaleInfo(ImlibImage *im, int sw, int sh, int dw, int dh, char aa); -ImlibScaleInfo * -__imlib_FreeScaleInfo(ImlibScaleInfo *isi); -void -__imlib_ScaleSampleRGBA(ImlibScaleInfo *isi, DATA32 *dest, int dxx, int dyy, - int dx, int dy, int dw, int dh, int dow); -void -__imlib_ScaleAARGBA(ImlibScaleInfo *isi, DATA32 *dest, int dxx, int dyy, - int dx, int dy, int dw, int dh, int dow, int sow); -void -__imlib_ScaleAARGB(ImlibScaleInfo *isi, DATA32 *dest, int dxx, int dyy, - int dx, int dy, int dw, int dh, int dow, int sow); -void -__imlib_Scale_mmx_AARGBA(ImlibScaleInfo *isi, DATA32 *dest, int dxx, int dyy, - int dx, int dy, int dw, int dh, int dow, int sow); +ImlibScaleInfo *__imlib_CalcScaleInfo(ImlibImage * im, + int sw, int sh, + int dw, int dh, char aa); +ImlibScaleInfo *__imlib_FreeScaleInfo(ImlibScaleInfo * isi); +void __imlib_ScaleSampleRGBA(ImlibScaleInfo * isi, DATA32 * dest, + int dxx, int dyy, int dx, int dy, + int dw, int dh, int dow); +void __imlib_ScaleAARGBA(ImlibScaleInfo * isi, DATA32 * dest, + int dxx, int dyy, int dx, int dy, + int dw, int dh, int dow, int sow); +void __imlib_ScaleAARGB(ImlibScaleInfo * isi, DATA32 * dest, + int dxx, int dyy, int dx, int dy, + int dw, int dh, int dow, int sow); +void __imlib_Scale_mmx_AARGBA(ImlibScaleInfo * isi, + DATA32 * dest, + int dxx, int dyy, int dx, int dy, + int dw, int dh, int dow, int sow); #endif diff --git a/src/lib/script.h b/src/lib/script.h index 7ee9396..c706a5a 100644 --- a/src/lib/script.h +++ b/src/lib/script.h @@ -37,34 +37,34 @@ typedef struct _imlib_function_param IFunctionParam; typedef struct _imlib_function_param *pIFunctionParam; -struct _imlib_function_param -{ - char *key; - int type; - void *data; - pIFunctionParam next; +struct _imlib_function_param { + char *key; + int type; + void *data; + pIFunctionParam next; }; typedef struct _imlib_function IFunction; typedef struct _imlib_function *pIFunction; -struct _imlib_function -{ - char *name; - pIFunctionParam params; - pIFunction next; +struct _imlib_function { + char *name; + pIFunctionParam params; + pIFunction next; }; -typedef struct _imlib_variable -{ - void *ptr; +typedef struct _imlib_variable { + void *ptr; struct _imlib_variable *next; } IVariable; -ImlibImage *__imlib_script_parse(ImlibImage *im, char *script, va_list); -IFunctionParam *__imlib_script_parse_parameters(ImlibImage *im, char *parameters); -ImlibImage *__imlib_script_parse_function(ImlibImage *im, char *function); -void __imlib_script_tidyup(void); -void *__imlib_script_get_next_var(void); -void __imlib_script_add_var( void *ptr ); +ImlibImage *__imlib_script_parse(ImlibImage * im, char *script, + va_list); +IFunctionParam *__imlib_script_parse_parameters(ImlibImage * im, + char *parameters); +ImlibImage *__imlib_script_parse_function(ImlibImage * im, + char *function); +void __imlib_script_tidyup(void); +void *__imlib_script_get_next_var(void); +void __imlib_script_add_var(void *ptr); #endif /* _FUNCTION_H_ */ diff --git a/src/lib/span.h b/src/lib/span.h index d4d8f23..3a77b0b 100644 --- a/src/lib/span.h +++ b/src/lib/span.h @@ -3,19 +3,18 @@ #include "common.h" -typedef void (*ImlibPointDrawFunction)(DATA32, DATA32 *); +typedef void (*ImlibPointDrawFunction) (DATA32, DATA32 *); ImlibPointDrawFunction __imlib_GetPointDrawFunction(ImlibOp op, char dst_alpha, char blend); - -typedef void (*ImlibSpanDrawFunction)(DATA32, DATA32 *, int); +typedef void (*ImlibSpanDrawFunction) (DATA32, DATA32 *, int); ImlibSpanDrawFunction __imlib_GetSpanDrawFunction(ImlibOp op, char dst_alpha, char blend); - -typedef void (*ImlibShapedSpanDrawFunction)(DATA8 *, DATA32, DATA32 *, int); +typedef void (*ImlibShapedSpanDrawFunction) (DATA8 *, DATA32, DATA32 *, + int); ImlibShapedSpanDrawFunction __imlib_GetShapedSpanDrawFunction(ImlibOp op, char dst_alpha, char blend); diff --git a/src/lib/updates.h b/src/lib/updates.h index abb35ac..1d3ac5d 100644 --- a/src/lib/updates.h +++ b/src/lib/updates.h @@ -5,15 +5,16 @@ typedef struct _imlibupdate ImlibUpdate; -struct _imlibupdate -{ - int x, y, w, h; - ImlibUpdate *next; +struct _imlibupdate { + int x, y, w, h; + ImlibUpdate *next; }; -ImlibUpdate *__imlib_AddUpdate(ImlibUpdate *u, int x, int y, int w, int h); -ImlibUpdate *__imlib_MergeUpdate(ImlibUpdate *u, int w, int h, int hgapmax); -void __imlib_FreeUpdates(ImlibUpdate *u); -ImlibUpdate *__imlib_DupUpdates(ImlibUpdate *u); +ImlibUpdate *__imlib_AddUpdate(ImlibUpdate * u, + int x, int y, int w, int h); +ImlibUpdate *__imlib_MergeUpdate(ImlibUpdate * u, + int w, int h, int hgapmax); +void __imlib_FreeUpdates(ImlibUpdate * u); +ImlibUpdate *__imlib_DupUpdates(ImlibUpdate * u); #endif diff --git a/src/lib/ximage.h b/src/lib/ximage.h index e892a9a..01dc951 100644 --- a/src/lib/ximage.h +++ b/src/lib/ximage.h @@ -6,20 +6,20 @@ #include "common.h" -extern signed char x_does_shm; +extern signed char x_does_shm; void __imlib_SetMaxXImageCount(Display * d, int num); -int __imlib_GetMaxXImageCount(Display * d); -void __imlib_SetMaxXImageTotalSize(Display * d, int num); -int __imlib_GetMaxXImageTotalSize(Display * d); -void __imlib_FlushXImage(Display * d); -void __imlib_ConsumeXImage(Display * d, XImage * xim); -XImage *__imlib_ProduceXImage(Display * d, Visual * v, int depth, +int __imlib_GetMaxXImageCount(Display * d); +void __imlib_SetMaxXImageTotalSize(Display * d, int num); +int __imlib_GetMaxXImageTotalSize(Display * d); +void __imlib_FlushXImage(Display * d); +void __imlib_ConsumeXImage(Display * d, XImage * xim); +XImage *__imlib_ProduceXImage(Display * d, Visual * v, int depth, int w, int h, char *shared); -void __imlib_ShmCheck(Display * d); -XImage *__imlib_ShmGetXImage(Display * d, Visual * v, Drawable draw, +void __imlib_ShmCheck(Display * d); +XImage *__imlib_ShmGetXImage(Display * d, Visual * v, Drawable draw, int depth, int x, int y, int w, int h, XShmSegmentInfo * si); -void __imlib_ShmDetach(Display * d, XShmSegmentInfo * si); +void __imlib_ShmDetach(Display * d, XShmSegmentInfo * si); #endif