summaryrefslogtreecommitdiff
path: root/gdk/gdkpixbuf-drawable.c
Commit message (Collapse)AuthorAgeFilesLines
* New function to avoid pointless strdups when creating atoms from staticMatthias Clasen2005-09-111-4/+2
| | | | | | | | | | | | | | | | | | | 2005-09-11 Matthias Clasen <mclasen@redhat.com> * gdk/gdk.symbols: * gdk/gdkproperty.h: * gdk/x11/gdkproperty-x11.c (gdk_atom_intern_static_string): New function to avoid pointless strdups when creating atoms from static strings. * gdk/x11/gdkdisplay-x11.c: * gdk/x11/gdkdnd-x11.c: * gdk/x11/gdkevents-x11.c: * gdk/x11/gdkmain-x11.c: * gdk/x11/gdkproperty-x11.c: * gdk/x11/gdkselection-x11.c: * gdk/x11/gdkwindow-x11.c: Use gdk_atom_intern_static_string() where appropriate.
* Make PLT-reduction work with gcc4, and don't include everything inMatthias Clasen2005-03-161-1/+4
| | | | | | | | | | | | | | | | | 2005-03-15 Matthias Clasen <mclasen@redhat.com> Make PLT-reduction work with gcc4, and don't include everything in gdkalias.h: * gdk/gdk.symbols: Group symbols by header and source file. * gdk/makegdkalias.pl: Protect definitions by the same preprocessor symbols used to guard the headers. Move the alias declarations to a separate file which is produced when calling makegdkalias.pl -def * gdk/Makefile.am (gdkaliasdef.c): Add a rule to generate this file. * gdk/*.c, gdk/x11/*.c: Include gdkalias.h after the other headers, include gdkaliasdef.c at the bottom.
* gdk/gdkkeyuni.c gdk/gdkpixbuf-drawable.c gdk/gdkrgb.c gdk/x11/gdkdnd-x11.cMatthias Clasen2005-03-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-03-01 Matthias Clasen <mclasen@redhat.com> * gdk/gdkkeyuni.c * gdk/gdkpixbuf-drawable.c * gdk/gdkrgb.c * gdk/x11/gdkdnd-x11.c * gdk/x11/gdkevents-x11.c * gdk/x11/gdkproperty-x11.c * gdk/x11/gdkvisual-x11.c * gdk-pixbuf/gdk-pixbuf.c * gtk/gtkaction.c * gtk/gtkbindings.c * gtk/gtkcolorbutton.c * gtk/gtkcombo.c * gtk/gtkcontainer.c * gtk/gtkfilechooserdefault.c * gtk/gtkfilesel.c * gtk/gtkgamma.c * gtk/gtkiconview.c * gtk/gtkinputdialog.c * gtk/gtkitemfactory.c * gtk/gtkmenu.c * gtk/gtktextview.c * gtk/gtktooltips.c * gtk/gtktreedatalist.c * gtk/gtkuimanager.c * gtk/tree_minus.xpm * gtk/tree_plus.xpm * gtk/xdgmime/xdgmime.c * gtk/xdgmime/xdgmime.h: Move constant data to .rodata.
* Add hidden aliases for exported symbols which are used internally in orderMatthias Clasen2004-08-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Mon Aug 9 15:41:17 2004 Matthias Clasen <maclas@gmx.de> Add hidden aliases for exported symbols which are used internally in order to get rid of many PLT entries. (#145519, Arjan van de Ven) * gdk/Makefile.am: Add rules to generate gdk.def and gdkalias.h from gdk.symbols, and make make check check the abi with abicheck.sh. * gdk/gdk.symbols: New file. Definition of the GDK ABI. The file can be processed by cpp to filter out certain subsets of symbols. * gdk/abicheck.sh: New file. Script to check the actually symbols exported from libgdk-x11.2.0.so against the symbols found in gdk.symbols. * gdk/makegdkalias.pl: New file. Perl script to generate the header containing the alias definitions for internally used exported symbols from a list of symbols. * gdk/*.c, gdk/x11/*.c: Include gdkalias.h
* Fix for #119555, Peter Zelesny:Matthias Clasen2003-11-171-2/+2
| | | | | | | | | | | | Tue Nov 18 00:12:55 2003 Matthias Clasen <maclas@gmx.de> Fix for #119555, Peter Zelesny: * gdk/gdkdrawable.h: Declare gdk_drawable_copy_to_image. * gdk/gdkdraw.c (gdk_drawable_copy_to_image): Make public by removing the _ prefix. * gdk/gdkdraw.c, gdk/gdkpixbuf-drawable.c, gdk/gdkpixmap.c, gdk/gdkwindow.c: Adjust all callers.
* swap G and B. Fixes (#114669)Soeren Sandmann2003-06-081-4/+4
| | | | | | | Sun Jun 8 18:27:14 2003 Soeren Sandmann <sandmann@daimi.au.dk> * gdk/gdkpixbuf-drawable.c (G8fromRGB565): swap G and B. Fixes (#114669)
* #71597, reported by Morten WelinderOwen Taylor2003-06-031-402/+119
| | | | | | | | | | | | | | | | | | | | | Tue Jun 3 17:39:16 2003 Owen Taylor <otaylor@redhat.com> #71597, reported by Morten Welinder * gdk/gdkpixbuf-drawable.c (rgb888amsb): Fix and simplify (Patch from Christian Petig) * gdk/gdkpixbuf-drawable.c (rgb{555,565}{a,}{msb,lsb}): Major rewrite of 555 and 565 conversion routines: - Move all the bit shifting into a small block of macros, eliminating much duplication of complicated arithmetic. - Get rid of 2-pixels at a time code, which was buggy, hard to maintain, caused unaligned accesses, and probably didn't actually perform any better. - Simplify cases where different data types were used for the little and big endian cases, use GUINT16_SWAP_LE_BE() where appropriate.
* fixed my latest change.Sven Neumann2002-09-141-1/+1
| | | | | | 2002-09-14 Sven Neumann <sven@gimp.org> * gdk/gdkpixbuf-drawable.c: fixed my latest change.
* use the most significant bits of the GdkColor components (#89703).Sven Neumann2002-09-131-21/+21
| | | | | | | 2002-09-13 Sven Neumann <sven@gimp.org> * gdk/gdkpixbuf-drawable.c: use the most significant bits of the GdkColor components (#89703).
* Check if depth of the source is not equal to the depth of the colormapShivram U2002-07-261-0/+33
| | | | | | | | | Fri Jul 26 16:34:34 2002 Shivram U <shivaram.upadhyayula@wipro.com> * gdk/gdkpixbuf-drawable.c (gdk_pixbuf_get_from_drawable), (gdk_pixbuf_get_from_image), (rgbconvert), (convert_real_slow): Check if depth of the source is not equal to the depth of the colormap passed. (#75597)
* Fixed the LSB -> MSB case. Fixes #79463.Federico Mena Quintero2002-07-161-7/+8
| | | | | | | 2002-07-16 Federico Mena Quintero <federico@ximian.com> * gdk/gdkpixbuf-drawable.c (rgb565lsb): Fixed the LSB -> MSB case. Fixes #79463.
* Fix the MSB -> MSB case. Fixes #79190.Federico Mena Quintero2002-06-031-6/+6
| | | | | | | 2002-06-03 Federico Mena Quintero <federico@ximian.com> * gdk/gdkpixbuf-drawable.c (rgb565msb): Fix the MSB -> MSB case. Fixes #79190.
* Start of integration of Erwann Chenede's multihead work from theOwen Taylor2002-04-251-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thu Apr 25 16:51:40 2002 Owen Taylor <otaylor@redhat.com> Start of integration of Erwann Chenede's multihead work from the gtk-multihead branch. * gdk/gdkdisplay.[ch] gdk/gdkscreen.[ch] gdk/x11/gdkdisplay-x11.[ch] gdk/x11/gdkscreen-x11.[ch] New classes representing a set of screens with attached input devices and a single contiguous area, respectively. * gdk/gdk.[ch] gdk/gdkinternals.h gdk/x11/gdkmain-x11.c: gdk/x11/gdkprivate-x11.h: Make the initialization interface simple _gdk_windowing_init() and do the rest in gdk_open_display() calls. * gdk/gdk.[ch]: Add gdk_parse_args() which can be used to do the display-independent part of initialization instead of gdk_init_[check]. * gdk/gdkcursor.h gdk/gdkfont.h gdk/gdkkeys.h gdk/gdkpixmap.h gdk/gdkproperty.h gdk/gdkselection.h gdk/gdkwindow.h: Add multihead variants (_for_display(), for_screen()) of functions getting information specific to a particular screen screen or display. * gdk/gdkscreen.[ch]: Add gdk_screen__* variants of functions like gdk_rgb_get_colormap() that used to get/list global objects. * gdk/x11/gdkx.h: Add functions for converting GdkScreen and GdkDisplay into the X equivalents. * gdk/x11/gdkwindow-x11.c: Removed gdk_window_xid_at_coords() not in the headers and unused. * configure.in gdk/x11/{gxid.c,gxid_lib.[ch],gdkinput-gxi.c}: Remove gxid support ... has not been tested for a long time... "xfree" support is more portable to non XFree86. * gdk/**.h: Add a GDK_MULTIHEAD_SAFE define that can be used to turn off functions that are inherently non-multihead safe. * gdk/**.c: add GDK_NOTE(multihead, ...) calls when functions are used in non-multihead-safe ways. * gdk/*.c gdk/x11/*.c: Changes to make the internals of GDK multihead safe.
* create the target pixbuf AFTER filling in width/height, so that passing inHavoc Pennington2002-04-131-8/+8
| | | | | | | | 2002-04-13 Havoc Pennington <hp@pobox.com> * gdk/gdkpixbuf-drawable.c (gdk_pixbuf_get_from_drawable): create the target pixbuf AFTER filling in width/height, so that passing in -1 for width/height will work.
* Fixes for AIX compilation from Miroslaw Dobrzanski-Neumann, #72182.Owen Taylor2002-02-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | Fri Feb 22 18:36:45 2002 Owen Taylor <otaylor@redhat.com> Fixes for AIX compilation from Miroslaw Dobrzanski-Neumann, #72182. * demos/gtk-demo/main.c gtk/gtktreeview.c gtk/gtktoolbar.c gtk/gtkpaned.c gtk/gtkobject.c gtk/gtkcontainer.c gtk/gtkcolorsel.c gtk/gtkcellrender.c gdk/x11/xsettings-client.h: Squash trailing commas on enumerations. * gdk/gdktypes.h: Drop GDK_RELEASE_MASK to 1 << 30 instead of 1 << 31 to work around AIX compiler problem. (C standard seems to imply that compiler is required to use an unsigned type for the enum value in this case.) * gdk/gdkpixbuf-drawable.c: Fix lvalue casts. * gtk/gtkwindow.h: Fix use of enum types for bitfields ... compilers may choose to use a signed type for bitfields.
* Merge from gdk-pixbuf stable.Federico Mena Quintero2002-01-251-4/+4
| | | | | | | | | | | | | 2002-01-25 Federico Mena Quintero <federico@ximian.com> Merge from gdk-pixbuf stable. * gdk/gdkpixbuf-drawable.c (rgb565msb): Fixed the endianness conversion --- swap the individual 16 bit values instead of taking everying as a 32 bit value. (rgb565lsb): Likewise. (rgb555lsb): Likewise. (rgb555msb): Likewise.
* need to cast image->mem away from void* to avoid 'error C2036: 'void *' :Hans Breuer2002-01-051-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-01-04 Hans Breuer <hans@breuer.org> * gdk/gdkdraw.c gdk/gdkpixbuf-drawable.c : need to cast image->mem away from void* to avoid 'error C2036: 'void *' : unknown size'. Doing pointer arithmetics on void pointers is a GCCism afaik. * gdk/gdkpixbuf-render.c : #include "gdkinternals.h" for _gdk_draw_pixbuf () * gdk/makefile.msc gdk/win32/makefile.msc gdk/gtk/makefile.msc.in : use -FI msvc_recommended_pragmas.h * gdk/win32/gdkdrawable-win32.c : use _gkd_win32_copy_to_image and take care of image->visual possibly NULL. * gdk/win32/gdkimage-win32.c : implement _gdk_image_new_for_depth(), _gdk_win32_copy_to_image() and _gdk_windowing_bits_for_depth(). Again take care of image->visual possibly NULL. * gdk/win32/gdkprivate-win32.h : declare _gdk_win32_copy_to_image() * gdk/win32/gdkevents-win32.c : use gdk_drawable_get_colormap instead of private field access * gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new) : adapt colormap setting to the gdk-X behaviour
* Private function to tell if we have RENDER extension.Owen Taylor2002-01-041-36/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thu Jan 3 22:18:15 2002 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkdrawable-x11.c gdk/x11/gdkprivate-x11.h (_gdk_x11_have_render): Private function to tell if we have RENDER extension. * gdk/x11/gdkgc-x11.c (_gdk_x11_gc_get_fg_picture): Return None if we don't have RENDER extension. * gdk/x11/gdkpango-x11.c (gdk_pango_context_get): Don't use Xft unless we have render extension. * gdk/x11/gdkdrawable-x11.c (gdk_x11_drawable_get_picture): Handle missing render extension. * gdk/gdkdraw.c gdk/gdkdrawable.h gdk/gdkpixmap.c gdk/gdkwindow.c gdk/gdkinternals.h: Add a private copy_to_image() virtual function to the GdkDrawable vtable that extends get_image() to allow copying onto existing images. Make the default implementation of get_image() use this so that backends don't have to implement both. Add private wrapper _gdk_drawable_copy_to_image(). * gdk/x11/gdkimage-x11.c gdk/x11/gdkprivate-x11.c gdk/x11/gdkdrawable-x11.c (_gdk_x11_copy_to_image): Implement copy_to_image() semantics, speed up by using ShmPixmaps and XCopyArea when possible, XFlush() after ungrabbing the server, generally redo the logic once again. * gdk/gdkinternals.h gdk/x11/gdkimage-x11.c _gdk_windowing_bits_per_depth(): Function to convert from depth to bits-per-pixel. (We assume only one bpp per depth - X requires this.) * gdk/gdkinternals.h gdk/gdkrgb.c gdk/gdkimage.c: Move the GdkRGB scratch image code into a generic _gdk_image_get_scratch() chunk of code that we can use other places we need scratch images. * gdk/gdkimage.c gdk/x11/gdkimage.c gdk/gdkinternals.h: Add _gdk_image_new_for_depth() as the backend to _gdk_image_new() to allowing creating images with a depth and no visual. * gdk/gdkpixbuf-drawable.c: Fix so that getting parts of images not at 0,0 actually works. * gdk/gdkdrawable.h gdk/gdkinternals.h gdk/gdkdraw.c gdk/gdkwindow.c gdk/gdkpixmap.c gdk/gdkpixbuf-render.c: - Add a new GdkDrawableClass vfunc _draw_pixbuf, and _gdk_draw_pixbuf() [ will be made public later ], to allow backends to accelerate drawing pixbufs. - Move the implementation of gdk_pixbuf_render_to_drawable_alpha() to be the default implementation. - Update docs for gdk_pixbuf_render_to_drawable_alpha(). - Optimize the default implementation by using _gdk_image_copy_to_pixmap() and scratch shared images, and special casing the compositing. * gdk/x11/gdkdrawable-x11.c: Accelerate _gdk_draw_pixbuf() with alpha using the RENDER extension. * gdk/gdkpixbuf-drawable.c (gdk_pixbuf_get_from_drawable): Optimize by _gdk_image_copy_to_pixmap() and scratch images. * tests/testrgb.c: Add test for speed of alpha composition, reduce the number of iterations since alpha composition can be a bit slow. * gdk/x11/gdkimage-x11.c gdk/gdkprivate-x11.h (_gdk_x11_image_get_shm_pixmap): Private function to get a ShmPixmap for an image, if possible.
* remove gtk_menu_* compat defines; these are already in gtkmenu.h, and theHavoc Pennington2001-08-261-47/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-08-24 Havoc Pennington <hp@pobox.com> * gtk/gtkcompat.h: remove gtk_menu_* compat defines; these are already in gtkmenu.h, and the copies here were broken. Also, change GTK_DISABLE_COMPAT_H to GTK_DISABLE_DEPRECATED * gdk/gdkpixbuf-drawable.c (gdk_pixbuf_get_from_image): special-case bitmaps to allow no colormap (bitmap1): implement no-colormap bitmap-getting (bitmap1a): implement no-colormap bitmap-getting to pixbuf with alpha (rgb8): indentation (rgb1a, rgb1): change the way we read the data out of the image, old way didn't seem to work quite right. I'm pretty sure a lot of the rgbconvert code is still broken. * gtk/gtkwindow.c (gtk_window_move_resize): move hints comparison above position constraint (I really intended to do this before, don't know what's up with that) (gtk_XParseGeometry): shut up gcc * gdk/gdkpixbuf-drawable.c (rgb1a): fix bug where "x1" was used and "0" should have been. remove the attempted 4-bytes-at-once optimization, it was totally broken.
* Clip the retrieved image data to the screen, using a server grab to avoidHavoc Pennington2001-06-291-163/+385
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-06-28 Havoc Pennington <hp@pobox.com> * gdk/x11/gdkimage-x11.c (_gdk_x11_get_image): Clip the retrieved image data to the screen, using a server grab to avoid race conditions. * gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove check for NULL return from gtk_image_new_from_stock(), it never returns NULL. (gtk_item_factory_create_item): fix bug where we parsed the stock ID as an inline pixbuf * gtk/gtktext.c (gtk_text_key_press): numeric keypad support * gtk/gtkspinbutton.c (gtk_spin_button_key_press): numeric keypad support (should be using binding set here) * gtk/gtkoptionmenu.c (gtk_option_menu_key_press): numeric keypad support (should be using binding set here) * gtk/gtkmenushell.c (gtk_menu_shell_class_init): numeric keypad support * gtk/gtkmenu.c (gtk_menu_class_init): numeric keypad support * gtk/gtkmenubar.c (gtk_menu_bar_class_init): numeric keypad * gtk/gtklistitem.c (gtk_list_item_class_init): numeric keypad * gtk/gtkimcontextsimple.c (gtk_im_context_simple_filter_keypress): keypad * gtk/gtkfilesel.c (gtk_file_selection_key_press): keypad * gtk/gtkentry.c (gtk_entry_class_init): numeric keypad fixes * gtk/gtkctree.c (gtk_ctree_class_init): numeric keypad support * gtk/gtkcolorsel.c (palette_activate): keypad support (of course, should be binding-setted) * gtk/gtkwindow.c (gtk_window_class_init): numeric keypad fixes * gtk/gtkclist.c (gtk_clist_class_init): numeric keypad fixes * gtk/gtkcalendar.c: numeric keypad fixes * gtk/gtktextview.c (gtk_text_view_class_init): numeric keypad support * gdk/gdkwindow.c (gdk_window_get_clip_region): fix infinite loop screwup * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha): clip the render area to the drawable's clip region in advance, so we don't get data from the server that we don't need. * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha): check return value of gdk_pixbuf_get_from_drawable(), fall back to bilevel alpha if we can't get the pixbuf to composite against. * gdk/gdkdraw.c (gdk_drawable_get_image): set the image colormap * gdk/gdkimage.c (gdk_image_get_colormap): add gdk_image_set_colormap, gdk_image_get_colormap * gdk/gdkpixbuf-drawable.c (rgbconvert): Change all converters to take a region of the image, instead of converting the entire image. * gtk/gtkwidget.h (struct _GtkWidgetClass): add show_help keybinding signal. Add default bindings for it. Add default handler for show_help that shows the tooltip for the widget. * gtk/gtkdialog.c (gtk_dialog_class_init): add binding set and "close" keybinding signal, remove key press handler. * gtk/gtktooltips.c (gtk_tooltips_set_colors): Just remove this, it's not our usual practice to leave a deprecated function around with a runtime warning, plus we don't want it to appear in docs, plus if we make them yellow no one will want to change them anyhow.
* Make gdk_colormap_sync private since it was never exported in a headerOwen Taylor2001-02-021-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fri Feb 2 17:16:09 2001 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkcolor-x11.c (gdk_colormap_sync): Make gdk_colormap_sync private since it was never exported in a header file. * gdk/x11/gdkcolor-x11.c (gdk_colormap_new): Fill in colormap->colors[] for StaticGray, StaticColor colormaps. * gdk/gdkpixbuf-drawable.c: Fix problems where image->bpp was being used as if it was image->bits_per_pixel. * gdk/gdkimage.h, gdk/x11/gdkimage-x11.c: Save the bits-per-pixel for the image in the GdkImage structure since it isn't reconstructable, and we need it to handle packed types * gdk/win32/gdkimage-win32.c: Set image->bits_per_pixel. (I'm making the assumption that on Win32 image->bits_per_pixel == image->depth, always. * gdk/linux-fb/gdkimage-fb.c: Set image->bits_per_pixel. * gdk/gdkrgb.c (gdk_rgb_select_conv): Exit with an informative warning message if no converter can be found.
* New function to create a pixbuf pointing to a subregion of another pixbuf.Havoc Pennington2000-11-011-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-11-01 Havoc Pennington <hp@pobox.com> * gdk-pixbuf.c (gdk_pixbuf_new_subpixbuf): New function to create a pixbuf pointing to a subregion of another pixbuf. 2000-11-01 Havoc Pennington <hp@pobox.com> * gtk/gtklabel.c (gtk_label_set_attributes): Set a PangoAttrList on a label (gtk_label_finalize): unref the attr list if any. * gtk/testgtk.c (create_get_image): close test on second click (make_message_dialog): close dialog if it exists * gdk/gdkpango.c (gdk_draw_layout): Handle rise attribute * gdk-2.0.pc.in (Requires): Make it require gdk-pixbuf-2.0 not gdk-pixbuf * gtk/gtklabel.c (gtk_label_set_markup): new function to set label from Pango markup format (gtk_label_set_markup_with_accel): ditto but with accelerator parsing * gtk/gtkimage.c (gtk_image_expose): reformatting. * gdk/gdkpixbuf-drawable.c (gdk_pixbuf_get_from_drawable): Hack to reflect current state of GDK - use gdk_drawable_get_colormap, etc. Check GDK_IS_WINDOW() not !GDK_IS_PIXMAP() to decide whether to call gdk_window_get_origin(). * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha): implement GDK_PIXBUF_ALPHA_FULL
* applied patch from Andreas Persenius <ndap@swipnet.se> that updates theTim Janik2000-07-261-3/+3
| | | | | | | | Wed Jul 26 12:59:31 2000 Tim Janik <timj@gtk.org> * *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that updates the license headers to the GNU Lesser General Public License, as well as updating the copyright year to 2000.
* Indentation fixups to GTK+ standard.Owen Taylor2000-06-211-841/+950
| | | | | | | Wed Jun 21 19:29:08 2000 Owen Taylor <otaylor@redhat.com> * gdk/gdkpixbuf-render.c gdk/gdkpixbuf-drawable.c: Indentation fixups to GTK+ standard.
* Welcome aboard, gdk-pixbuf.Owen Taylor2000-06-211-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Wed Jun 21 16:38:13 2000 Owen Taylor <otaylor@redhat.com> * gdk-pixbuf/* docs/reference/gdk-pixbuf/*: Welcome aboard, gdk-pixbuf. * gtk/gdk-pixbuf-loader.c (gdk_pixbuf_loader_class_init): fixups for GObject. * gdk/Makefile.am gdk/gdkpixbuf-render.[ch] gdk/gdkpixbuf.[ch]: Bits of gdk-pixbuf with GDK dependencies moved into GDK. * gtk/Makefile.am gtk/gdk-pixbuf-loader.[ch]: Temporarily move gdk-pixbuf-loader here until GObject has signals. * demos/: New directory of demos. Move demos from gdk-pixbuf here. * demos/pixbuf-init.c: Small bit of code to check for loaders in ../gdk-pixbuf/.libs/gdk-pixbuf, and if found, set GDK_PIXBUF_MODULEDIR appropriately. * gdk/gdkcompat.h: Remove GDK_DRAWABLE_PIXMAP compat define which no longer makes sense.
* Change all conversion from 16-bit formats to 32-bit formats to re-useDarin Adler2000-05-091-67/+118
| | | | the high bits of the color values so that white maps to full white.
* Most of this patch is based on a patch by Havoc Pennington (hp@redhat.com)Federico Mena Quintero2000-04-111-41/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-04-11 Federico Mena Quintero <federico@helixcode.com> Most of this patch is based on a patch by Havoc Pennington (hp@redhat.com) to make GdkPixbuf's structures opaque and to remove the libart dependency. * gdk-pixbuf/gdk-pixbuf.h: Removed the public structures. (GdkColorspace): New enum that for now only contains GDK_COLORSPACE_RGB. (GdkPixbufDestroyNotify): New type for the pixbuf's pixels destroy notification function. (GdkInterpType): New num with interpolation types. * *.[ch]: Replace the libart stuff with our own stuff. * pixops/*.[ch]: Likewise. * gdk-pixbuf/gdk-pixbuf-private.h: New file with the private declarations of the GdkPixbuf structures. * gdk-pixbuf/gdk-pixbuf.c (gdk_pixbuf_new_from_art_pixbuf): Removed function. (gdk_pixbuf_get_format): Constify. (gdk_pixbuf_get_n_channels): Constify. (gdk_pixbuf_get_has_alpha): Constify. (gdk_pixbuf_get_bits_per_sample): Constify. (gdk_pixbuf_get_pixels): Constify. (gdk_pixbuf_get_width): Constify. (gdk_pixbuf_get_height): Constify. (gdk_pixbuf_get_rowstride): Constify. * gdk-pixbuf/gdk-pixbuf.c (gdk_pixbuf_copy): New function to copy a pixbuf. * gdk-pixbuf/gdk-pixbuf-data.c (gdk_pixbuf_new_from_data): Added a bits_per_sample argument; currently only 8 bits per sample are supported. * gdk-pixbuf/gdk-pixbuf-animation.c (gdk_pixbuf_frame_get_pixbuf): New accessor. (gdk_pixbuf_frame_get_x_offset): New accessor. (gdk_pixbuf_frame_get_y_offset): New accessor. (gdk_pixbuf_frame_get_delay_time): New accessor. (gdk_pixbuf_frame_get_action): New accessor. * gdk-pixbuf/gdk-pixbuf-render.c (gdk_pixbuf_render_pixmap_and_mask): Instead of returning a solid mask rectangle for pixbufs without an alpha channel, set the *mask_return to NULL. * gdk-pixbuf/gdk-pixbuf-util.c (gdk_pixbuf_add_alpha): Constify. * gdk-pixbuf/gdk-pixbuf-scale.c: Fix includes. * gdk-pixbuf/gdk-pixbuf-scale.c (gdk_pixbuf_scale): Added some preconditions. Maybe we should also check for the colorspace, bits per pixel, and such. (gdk_pixbuf_composite): Likewise. (gdk_pixbuf_composite_color): Likewise. (gdk_pixbuf_scale_simple): Likewise, and fail gracefully if we cannot allocate the new pixbuf. (gdk_pixbuf_composite_color_simple): Likewise. * gdk-pixbuf/gnome-canvas-pixbuf.c (gnome_canvas_pixbuf_render): Use art_rgb_rgba_affine() or art_rgb_affine() since we no longer have an ArtPixBuf. * gdk-pixbuf/io-bmp.c: Fix includes. * gdk-pixbuf/pixops/pixops.c (pixops_scale_nearest): Fixed cast in an lvalue. * TODO: Populated. * configure.in: Removed checks for libart. * gdk-pixbuf/Makefile.am: Removed references to libart. (noinst_HEADERS): Added gdk-pixbuf-private.h. * gdk-pixbuf/Makefile.am (libgdk_pixbuf_la_LDFLAGS): Incremented the version number of the libtool library to indicate that this definitely is not compatible with the old usage. I know you love me. I know you do. * configure.in: Bumped version number to 0.7.0. * README: Updated. * gdk-pixbuf-config.in (--libs): We no longer require libart. * DEPENDS.libgdk_pixbuf: We no longer depend on libart. * gdk-pixbuf.spec.in: Updated, but I don't guarantee anything.
* s/unsigned long/guint32/g, s/unsigned short/guint16/g, s/unsignedMatt Wilson2000-02-291-100/+100
| | | | | | | 2000-02-28 Matt Wilson <msw@redhat.com> * gdk-pixbuf/gdk-pixbuf-drawable.c: s/unsigned long/guint32/g, s/unsigned short/guint16/g, s/unsigned char/guint8/g
* Added reference counting to animations. A web browser may want to share aFederico Mena Quintero2000-01-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-01-01 Federico Mena Quintero <federico@helixcode.com> * gdk-pixbuf/gdk-pixbuf.h (GdkPixbufAnimation): Added reference counting to animations. A web browser may want to share a single copy of an animated GIF if it appears multiple times in a web page, for example. * gdk-pixbuf/gdk-pixbuf-animation.c: New file. Moved the animation functions here. (gdk_pixbuf_animation_new_from_file): Prettified. Return a NULL animation if the loader does not support multiframe loading and the single-frame load returned NULL. Check that the filename is not NULL. Updated inline documentation. (gdk_pixbuf_animation_ref): New function. (gdk_pixbuf_animation_unref): New function. Removed gdk_pixbuf_animation_destroy() in favor of reference counting. * gdk-pixbuf/gdk-pixbuf-io.c (gdk_pixbuf_new_from_file): Prettified. Made ref_count assertion more paranoid. Check that the filename is not NULL. (gdk_pixbuf_get_module): Use guchar * and guint for buffer and size, respectively. (gdk_pixbuf_new_from_xpm_data): Changed the "data" argument to const char **. * gdk-pixbuf/io-gif.c (image_load_animation): Create the animation with a reference count of 1. * gdk-pixbuf/Makefile.am (libgdk_pixbuf_la_SOURCES): Added gdk-pixbuf-animation.c. * doc/tmpl/animation.sgml: Populated. It is still missing a description of the overlay modes. * doc/gdk-pixbuf-sections.txt: Added the animation section. Moved the canvas item section to the end, as it will be moved later to gnome-libs. * doc/gdk-pixbuf.sgml: Added the animation section. * doc/Makefile.am (tmpl_sources): Added tmpl/animation.sgml.
* make a warning go away.Jonathan Blandford1999-12-101-1/+1
| | | | | | | | | | | | 1999-12-10 Jonathan Blandford <jrb@redhat.com> * gdk-pixbuf/gdk-pixbuf-drawable.c (gdk_pixbuf_get_from_drawable): make a warning go away. * gdk-pixbuf/gdk-pixbuf.h: added new prototypes for animations. * gdk-pixbuf/gdk-pixbuf-loader.h: added new prototypes for animations.
* Should now handle all formats, slow routine used where optimisedMichael Zucchi1999-12-091-21/+115
| | | | | | | | | | | | | | ones can't be. 1999-12-09 Michael Zucchi <zucchi@zedzone.mmc.com.au> * gdk-pixbuf/gdk-pixbuf-drawable.c (convert_real_slow): New function - should convert ANY visual/data format properly, but it aint fast. Used as a fallback when an optimised routine wont match. (rgbconvert): Do very specific tests on the data format to verify properly if the optimised version will do, otherwise use the fallback function for all other data formats.
* Filled in body of function. (rgbconvert): Added GdkColormap parameter, andMichael Zucchi1999-12-091-79/+42
| | | | | | | | | | | | | | | 1999-12-09 Michael Zucchi <zucchi@zedzone.mmc.com.au> * gdk-pixbuf/gdk-pixbuf-drawable.c (gdk_pixbuf_get_from_drawable): Filled in body of function. (rgbconvert): Added GdkColormap parameter, and to all conversion functions also. * gdk-pixbuf/Makefile.am: Re-enabled building of textpixbuf-drawable. * gdk-pixbuf/testpixbuf-drawable.c (main): Changed to use gdk_pixbuf_get_from_drawable().
* Fixed the red/green/red bug on two occasions. Changed from the customArjan van de Ven1999-12-081-2/+2
| | | | | | | | | | 1999-12-08 Arjan van de Ven <arjan@fenrus.demon.nl> * gdk-pixbuf/gdk-pixbuf-drawable.c : Fixed the red/green/red bug on two occasions. * gdk-pixbuf/io-ras.c: Changed from the custom be32_to_cpu function to the generic glib one.
* Fix includes. (gdk_pixbuf_get_from_drawable): Implemented the zillionFederico Mena Quintero1999-12-081-173/+331
| | | | | | | | | | | | | | | | | | | | | | | | 1999-12-08 Federico Mena Quintero <federico@redhat.com> * gdk-pixbuf/gdk-pixbuf-drawable.c: Fix includes. (gdk_pixbuf_get_from_drawable): Implemented the zillion sanity checks and API definition. The body needs filling in and it needs to do the Right Thing(tm) for pixmaps plus the given colormap and windows and their own colormaps. * gdk-pixbuf/gdk-pixbuf.h: Added prototype for gdk_pixbuf_get_from_drawable(). Killed gdk-pixbuf-drawable.h. * gdk-pixbuf/Makefile.am: Re-added the gdk-pixbuf-drawable sources. * doc/tmpl/from-drawables.sgml: Populated. * doc/gdk-pixbuf.sgml: Added the from-drawables section. * doc/Makefile.am (tmpl_sources): Added tmpl/from-drawables.sgml. * doc/gdk-pixbuf-sections.txt: Added a section for getting pixbufs from drawables.
* #include <config.h>, and fix includes.Federico Mena Quintero1999-12-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1999-12-02 Federico Mena Quintero <federico@redhat.com> * src/testpixbuf.c: #include <config.h>, and fix includes. * src/testpixbuf-drawable.c: #include <config.h>, and fix includes. * src/io-xpm.c: Fix includes. * src/io-tiff.c: Fix includes. * src/io-ras.c: Fix includes, and do not include more stuff than needed. * src/io-pnm.c: Fix inlcudes, and do not include more stuff than needed. * src/io-png.c: Fix includes. * src/io-ico.c: Fix includes, and do not include more stuff than needed. * src/io-gif.c: Fix includes, and do not include more stuff than needed. * src/io-bmp.c: Fix includes, and do not include more stuff than needed. * src/gnome-canvas-pixbuf.c: Fix includes. * src/gdk-pixbuf.c: Fix includes. * src/gdk-pixbuf-util.c: Fix includes. * src/gdk-pixbuf-render.c: Fix includes. * src/gdk-pixbuf-io.h: Fix includes. * src/gdk-pixbuf-drawable.c: Fix includes. * src/gdk-pixbuf-drawable.h: Use angle brackets for the gdk-pixbuf include files. * src/gdk-pixbuf-data.c: Fix includes. * src/gdk-pixbuf-loader.c: #include <config.h> * src/gdk-pixbuf-loader.h: Use angle brackets for the gdk-pixbuf include files. * src/Makefile.am: Commented out the gdk-pixbuf-drawable stuff, since it is not finished.
* make the symlink. Does not work for srcdir != buildir != . Beats me why; IJonathan Blandford1999-11-221-2/+2
| | | | | | | | 1999-11-22 Jonathan Blandford <jrb@redhat.com> * configure.in (GDK_PIXBUF_DIR): make the symlink. Does not work for srcdir != buildir != . Beats me why; I can't figure it out. AC_OUTPUT_COMMANDS doesn't seem to let me substitute it correctly.
* Rework/reorder of the code. Each case has been separated into anotherMichael Zucchi1999-11-201-376/+785
| | | | | | | | | | | 1999-11-20 Michael Zucchi <zucchi@zedzone.mmc.com.au> * src/gdk-pixbuf-drawable.c (gdk_pixbuf_from_drawable_core): Rework/reorder of the code. Each case has been separated into another function; its big but it should be quick. gdk_pixbuf_rgba_from_drawable() will now return a pixbuf with opaque alpha information. Not all depths/formats have been tested, but 8, 15/16 and 24 (alinged 32) should work ok.
* Applying Michael Zucchi's changes to significantly speed up pixbuf from ↵Cody Russell1999-11-131-112/+477
| | | | drawable code.
* src/gdk-pixbuf-drawable.c: Changed the behavior to return NULL if part ofCody Russell1999-11-031-14/+6
| | | | the requested image is offscreen, rather than clipping the image.
* src/gdk-pixbuf-drawable.c (gdk_pibxuf_from_drawable_core): Now callsCody Russell1999-11-021-1/+1
| | | | gdk_pixbuf_new_from_art_pixbuf() instead of gdk_pixbuf_new().
* Reindented to use the GNOME Indentation.Federico Mena Quintero1999-10-181-41/+22
| | | | | | 1999-10-18 Federico Mena Quintero <federico@redhat.com> * src/*: Reindented to use the GNOME Indentation.
* Changed 'pixbuf' variable to 'art_pixbuf' in the core function.Cody Russell1999-10-101-2/+32
| | | | | | Core function now determines whether the requested geometry is on screen or not. If part of it is not then the request is clamped to geometry that is on the screen.
* Changed the functions to return GdkPixBuf* instead of ArtPixBuf*.Cody Russell1999-10-071-9/+11
|
* Added #include "gdk-pixbuf-drawable.h" to the top. This fixes remainingCody Russell1999-10-071-0/+1
| | | | compile error.
* Added files from Cody RussellArturo Espinosa1999-10-071-0/+135