summaryrefslogtreecommitdiff
path: root/gdk/gdkpixbuf-drawable.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix the fix to the last commitEmmanuele Bassi2015-12-161-1/+1
| | | | I should not push while compilation is still going on
* Fix previous commitEmmanuele Bassi2015-12-161-0/+2
| | | | The scale parameter was missing.
* gdk_pixbuf_get_from_window: honor device scaleLars Uebernickel2015-12-161-5/+21
| | | | | | | | | | | gdk_pixbuf_get_from_window() paints the given window onto a new cairo surface. Create that new surface with the same device scale as the window so that the result is not scaled down on hidpi screens. This is similar to 657a43e (which was reverted), but doesn't modify the behavior of gdk_pixbuf_get_from_surface(). https://bugzilla.gnome.org/show_bug.cgi?id=757147
* Revert "gdk_pixbuf_get_from_window: honor device scale"Benjamin Otte2015-12-021-12/+4
| | | | | | | | | This reverts commit 657a43e54e7721fced8ef0e6808271838f14697f. The commit breaks the assumptions about the arguments in both gdk_pixbuf_get_from_window() and gdk_pixbuf_get_from_surface(). https://bugzilla.gnome.org/show_bug.cgi?id=757147
* gdkpixbuf-drawable: reinstate accidentally removed lineLars Uebernickel2015-10-271-0/+1
|
* gdk_pixbuf_get_from_window: honor device scaleLars Uebernickel2015-10-271-5/+12
| | | | | | | | gdk_pixbuf_get_from_window() paints the given window onto a new cairo surface. Create that new surface with the same device scale as the window so that the result is not scaled down on hidpi screens. https://bugzilla.gnome.org/show_bug.cgi?id=757147
* gdk: Mark window surfaces as dirty before reading from themBenjamin Otte2015-09-181-0/+8
| | | | | | | | | | We do not know what happened to this surface outside of GDK. Especially for foreign windows, they will have been modified by external applications. So be on the safe side and tell Cairo to clear all its caches. https://bugzilla.gnome.org/show_bug.cgi?id=754952
* Forgotten fileMatthias Clasen2014-05-221-1/+0
|
* gdk: add many missing (nullable) return value annotationsEvan Nemerson2014-05-111-4/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=729834
* docs: use Returns: consistentlyWilliam Jon McCann2014-02-191-2/+2
| | | | Instead of Return value:
* docs: use apostrophe in *'reWilliam Jon McCann2014-02-071-1/+1
|
* docs: use apostrophes in *n'tWilliam Jon McCann2014-02-071-1/+1
|
* docs: use proper apostropheWilliam Jon McCann2014-02-071-1/+1
| | | | https://wiki.gnome.org/Design/OS/Typography
* gdk_pixbuf_get_from_source: only reuse surfaces with matching formatClaudio Saavedra2013-09-061-1/+2
| | | | | | Otherwise the conversion functions will return rubbish. https://bugzilla.gnome.org/show_bug.cgi?id=707445
* gdk_pixbuf_get_from_surface: Avoid copying if source is image surfaceAlexander Larsson2013-08-071-5/+12
| | | | | If the source surface is an image surface we don't need to coerce it to one.
* Change FSF AddressJavier Jardón2012-02-271-3/+1
|
* More GDK documentation tweaksMatthias Clasen2011-02-091-45/+49
|
* gdk: Make _gdk_window_ref_cairo_surface() protected and use itBenjamin Otte2010-12-021-1/+1
| | | | | | | ... instead of _gdk_drawable_ref_cairo_surface() where appropriate. Also, don't implement the drawable->create_cairo_surface vfunc anymore. This is in preparation for the split of GdkWindow from GdkDrawable.
* Make gdk_pixbuf_get_from_surface() accept negative src_x,y coordinatesKristian Rietveld2010-10-191-11/+7
|
* Inclusion cleanups in sourcesMatthias Clasen2010-10-141-2/+3
| | | | Try to do inclusions in the same sequence, more or less.
* docs: Move documentation to inline comments: pixbufsJavier Jardón2010-10-041-1/+10
|
* Fix a reference in the gdk_pixbuf_get_from_surface docs2.91.0Matthias Clasen2010-10-011-1/+1
|
* gdk: Make gdk_pixbuf_get_from_*() bindableBenjamin Otte2010-10-021-79/+22
| | | | | | | | | | The ownership of the return value for gdk_pixbuf_get_from_window() and gdk_pixbuf_get_from_surface() was determined by the first argument. Because that is an ugly design and the functions are new to GTK3, we decided to adapt them. And that adaptation was quite easy since almost no one passses anything but NULL as the first argument.
* GDK docs: Improve gdk_pixbuf_get_from_window docsMatthias Clasen2010-10-011-53/+41
|
* API: gdk_pixbuf_get_from_drawable() => gdk_pixbuf_get_from_window()Benjamin Otte2010-09-261-48/+8
| | | | | The Colormap argument needed to be removed, so the renaming is just a side effect.
* gdk: Remove GdkPixmapBenjamin Otte2010-09-261-28/+2
| | | | | | All iusers of it are gone, so it's now time to let go. cairo_surface_t is a full replacement, combined with gdk_window_create_similar_surface().
* API: remove gdk_pixbuf_get_from_image()Benjamin Otte2010-08-101-1202/+0
|
* Implement gdk_pixbuf_get_from_drawable() with CairoBenjamin Otte2010-08-101-42/+8
| | | | | Use gdk_pixbuf_get_from_surface() instead of gdk_pixbuf_get_from_image().
* API: Add gdk_pixbuf_get_from_surface()Benjamin Otte2010-08-101-0/+226
| | | | New API to copy any cairo surface into a pixbuf.
* gdk/: fully remove gdkalias hacksJavier Jardón2010-07-101-4/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=623845
* Make GTK+ use an external gdk-pixbufMatthias Clasen2010-06-261-14/+17
|
* [annotations] Add allow-noneJohan Dahlin2010-02-191-3/+3
| | | | | | | | This commit was created using a script that searched for all docstrings containing a parameter and the string 'or %NULL'. Gdk backends and demos excluded as they are not part of a public API https://bugzilla.gnome.org/show_bug.cgi?id=610474
* Include "config.h" instead of <config.h> Command used: find -nameJohan Dahlin2008-06-221-1/+1
| | | | | | | | | | | | 2008-06-21 Johan Dahlin <jdahlin@async.com.br> * *.[ch]: Include "config.h" instead of <config.h> Command used: find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g' Rubberstamped by Mitch and Tim svn path=/trunk/; revision=20669
* 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