Commit Graph

16 Commits

Author SHA1 Message Date
Andreas Schwab
adac86dbb0 (CHECK_LIB_AVAILABLE): Add third parameter LIBRARIES.
(Finit_image_library): Pass LIBRARIES through to
CHECK_LIB_AVAILABLE.  Declare parameters.  Doc fix.
(lookup_image_type): Pass Qnil as second argument to
Finit_image_library.
2004-06-30 13:11:36 +00:00
Miles Bader
803aac3efa Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-410
Make sure image types are initialized for lookup too
2004-06-16 02:45:09 +00:00
Juanma Barranquero
0855eb5219 (Vimage_types): Move from xdisp.c.
(Vimage_type_cache): New variable.
(define_image_type): New argument indicating whether an image library was
loaded; cache loaded status and return t on success, nil otherwise.
(CACHE_IMAGE_TYPE, ADD_IMAGE_TYPE): New macros.
(w32_delayed_load): New function to load an image library from a list of
possible filenames.
(init_xpm_functions, init_png_functions, init_jpeg_functions)
(init_tiff_functions, init_gif_functions): Use `w32_delayed_load'.
(CHECK_LIB_AVAILABLE): Call `define_image_library' with new argument.
(Finit_image_library): New function, extracted from `init_image'.  Try to
initialize an image library on demand and cache whether we were successful
or not.
(syms_of_image): Initialize `Vimage_types' and `Vimage_type_cache'.  Add
recognized image types to Vimage_types. Export `init-image-library'.
(init_image): Remove initialization of all image types, except xbm and pbm.
2004-06-14 20:47:25 +00:00
Andreas Schwab
be8c4ce456 Include <ctype.h>. 2004-06-13 15:04:45 +00:00
Juanma Barranquero
b0da69a77b Work around bugs/problems with MinGW builds of graphics libraries
called from MSVC builds of Emacs.

(lookup_image): Make pointer to img static.
(png_read_from_memory): Disable "global" optimization.
2004-06-02 00:50:09 +00:00
Steven Tamm
ea1aaa6fb8 Support XPM on Carbon Emacs. Does not
depend on libXpm, but only supports XPM version 3 without
extensions.
2004-05-12 02:23:37 +00:00
Steven Tamm
2a316a84d5 macterm.c (mac_check_for_quit_char): Adding BLOCK_INPUT
around call to ReceiveEvent to avoid certain crashes.
(mac_draw_line_to_pixmap, XCreatePixmapFromBitmapData)
(mac_fill_rectangle_to_pixmap, mac_draw_rectangle_to_pixmap)
(mac_copy_area_to_pixmap, mac_copy_area_with_mask_to_pixmap):
Save/restore the current graphics port and device handle when
drawing into an offscreen graphics world.
image.c [MAC_OS] (XPutPixel, XGetPixel, image_load_qt_1)
(gif_load): Likewise.
2004-05-07 17:46:50 +00:00
Jason Rumney
279d3293d3 (Display) [HAVE_NTGUI]: Redefine while loading xpm.h to avoid name clash. 2004-05-05 23:22:41 +00:00
Kim F. Storm
1938bc365d (image_ascent): Add slice arg; calculate ascent for
image slice (or full image).
2004-04-20 22:16:33 +00:00
Kim F. Storm
1f0268990d (PNG_BG_COLOR_SHIFT): Remove.
(png_load): Fix calculation of transparent background color on X
and W32 platforms.
2004-04-16 20:08:15 +00:00
Kim F. Storm
e1dfec150b (Qcenter): Move to xdisp.c. 2004-03-19 00:42:37 +00:00
Kim F. Storm
c640aa9b33 (x_find_image_file): Make extern. 2004-03-14 00:28:35 +00:00
Kim F. Storm
75fd7da16a (XImagePtr, XImagePtr_or_DC): Move typedefs to dispextern.h. 2004-03-11 22:43:06 +00:00
Steven Tamm
5243c06a3a * image.c [MAC_OSX]: Include sys/stat.h
* macfns.c (syms_of_macfns): Remove definitions of things now
	defined in image.c
2004-03-11 05:56:41 +00:00
Miles Bader
1b9f8ceccc Add arch tagline 2004-03-11 05:45:22 +00:00
Kim F. Storm
4ef0d4d03e New file (image.c) for Image consolidation:
(COLOR_TABLE_SUPPORT): New define to control whether
color table support is available (X only).
(Bitmap_Record): Common name for x_bitmap_record,
w32_bitmap_record, and mac_bitmap_record.
(XImagePtr): Common name for pointer to XImage or equivalent.
(XImagePtr_or_DC): New type to simplify code sharing; equivalent
to XImagePtr on X+MAC, and to HDC on W32.
(GET_PIXEL): Wrapper for XGetPixel or equivalent.
(NO_PIXMAP): Common name for "None" or equivalent.
(PNG_BG_COLOR_SHIFT): Bits to shift PNG background colors.
(RGB_PIXEL_COLOR): Common type for an integer "pixel color" value.
(PIX_MASK_RETAIN, PIX_MASK_DRAW): Portability macros (from macfns.c).
(FRAME_X_VISUAL, x_defined_color, DefaultDepthOfScreen): Define
with suitable equivalents on W32 and MAC for code sharing.
(XDrawLine): Define on MAC for code sharing.
(Destroy_Image, Free_Pixmap): Wrappers for code sharing.
(IF_LIB_AVAILABLE): Macro to simplify code sharing.
(Vx_bitmap_file_path, Vimage_cache_eviction_delay)
(x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
(x_reference_bitmap, x_create_bitmap_from_data)
(x_create_bitmap_from_file, x_destroy_bitmap)
(x_destroy_all_bitmaps, x_create_bitmap_mask)
(XGetImage, XPutPixel, XGetPixel, XDestroyImage)
(QCascent, QCmargin, QCrelief, QCconversion, QCcolor_symbols)
(QCheuristic_mask, QCindex, QCmatrix, QCcolor_adjustment, QCmask)
(Qlaplace, Qemboss, Qedge_detection, Qheuristic, Qcenter)
(define_image_type, lookup_image_type, valid_image_p)
(image_error, enum image_value_type, struct image_keyword)
(parse_image_spec, image_spec_value, Fimage_size, Fimage_mask_p)
(make_image, free_image, prepare_image_for_display, image_ascent)
(four_corners_best, image_background, image_background_transparent)
(x_clear_image_1,  x_clear_image, x_alloc_image_color)
(make_image_cache, free_image_cache, clear_image_cache)
(Fclear_image_cache, postprocess_image, lookup_image, cache_image)
(forall_images_in_image_cache, x_create_x_image_and_pixmap)
(x_destroy_x_image, x_put_x_image, x_find_image_file, slurp_file)
(find_image_fsspec, image_load_qt_1, image_load_quicktime)
(init_image_func_pointer, image_load_quartz2d)
(struct ct_color, init_color_table, free_color_table)
(lookup_rgb_color, lookup_pixel_color, colors_in_color_table)
(cross_disabled_images, x_to_xcolors, x_from_xcolors)
(x_detect_edges, x_emboss, x_laplace, x_edge_detection)
(x_disable_image, x_build_heuristic_mask)
(XBM support, XPM support, PBM support, PNG support, JPEG support)
(TIFF support, GIF support, Ghostscript support): Consolidate image
code from xfns.c, w32fns.c, and macfns.c.
(syms_of_image): Consolidate image related symbol setup here.
(init_image): Consolidate image related initializations here.
2004-03-11 00:28:24 +00:00