2005-07-12 05:09:13 +00:00
|
|
|
/* GDK - The GIMP Drawing Kit
|
|
|
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
|
|
|
* file for a list of people on the GTK+ Team. See the ChangeLog
|
|
|
|
* files for a list of changes. These files are distributed with
|
|
|
|
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
|
|
|
*/
|
|
|
|
|
2000-06-21 20:47:22 +00:00
|
|
|
#ifndef __GDK_PIXBUF_H__
|
|
|
|
#define __GDK_PIXBUF_H__
|
|
|
|
|
2005-03-30 17:40:39 +00:00
|
|
|
#include <cairo.h>
|
2000-06-21 20:47:22 +00:00
|
|
|
#include <gdk/gdktypes.h>
|
|
|
|
#include <gdk/gdkrgb.h>
|
|
|
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
|
|
|
|
2005-03-30 17:40:39 +00:00
|
|
|
G_BEGIN_DECLS
|
2000-06-21 20:47:22 +00:00
|
|
|
|
|
|
|
/* Rendering to a drawable */
|
|
|
|
|
|
|
|
void gdk_pixbuf_render_threshold_alpha (GdkPixbuf *pixbuf,
|
|
|
|
GdkBitmap *bitmap,
|
|
|
|
int src_x,
|
|
|
|
int src_y,
|
|
|
|
int dest_x,
|
|
|
|
int dest_y,
|
|
|
|
int width,
|
|
|
|
int height,
|
|
|
|
int alpha_threshold);
|
2003-01-31 00:37:38 +00:00
|
|
|
#ifndef GDK_DISABLE_DEPRECATED
|
2000-06-21 20:47:22 +00:00
|
|
|
void gdk_pixbuf_render_to_drawable (GdkPixbuf *pixbuf,
|
|
|
|
GdkDrawable *drawable,
|
|
|
|
GdkGC *gc,
|
|
|
|
int src_x,
|
|
|
|
int src_y,
|
|
|
|
int dest_x,
|
|
|
|
int dest_y,
|
|
|
|
int width,
|
|
|
|
int height,
|
|
|
|
GdkRgbDither dither,
|
|
|
|
int x_dither,
|
|
|
|
int y_dither);
|
|
|
|
void gdk_pixbuf_render_to_drawable_alpha (GdkPixbuf *pixbuf,
|
|
|
|
GdkDrawable *drawable,
|
|
|
|
int src_x,
|
|
|
|
int src_y,
|
|
|
|
int dest_x,
|
|
|
|
int dest_y,
|
|
|
|
int width,
|
|
|
|
int height,
|
|
|
|
GdkPixbufAlphaMode alpha_mode,
|
|
|
|
int alpha_threshold,
|
|
|
|
GdkRgbDither dither,
|
|
|
|
int x_dither,
|
|
|
|
int y_dither);
|
2003-01-31 00:37:38 +00:00
|
|
|
#endif /* GDK_DISABLE_DEPRECATED */
|
2001-09-07 22:33:09 +00:00
|
|
|
void gdk_pixbuf_render_pixmap_and_mask_for_colormap (GdkPixbuf *pixbuf,
|
|
|
|
GdkColormap *colormap,
|
|
|
|
GdkPixmap **pixmap_return,
|
|
|
|
GdkBitmap **mask_return,
|
|
|
|
int alpha_threshold);
|
2002-04-25 22:29:14 +00:00
|
|
|
#ifndef GDK_MULTIHEAD_SAFE
|
2001-09-07 22:33:09 +00:00
|
|
|
void gdk_pixbuf_render_pixmap_and_mask (GdkPixbuf *pixbuf,
|
|
|
|
GdkPixmap **pixmap_return,
|
|
|
|
GdkBitmap **mask_return,
|
|
|
|
int alpha_threshold);
|
2002-04-25 22:29:14 +00:00
|
|
|
#endif
|
2001-09-07 22:33:09 +00:00
|
|
|
|
2000-06-21 20:47:22 +00:00
|
|
|
|
|
|
|
/* Fetching a region from a drawable */
|
|
|
|
GdkPixbuf *gdk_pixbuf_get_from_drawable (GdkPixbuf *dest,
|
|
|
|
GdkDrawable *src,
|
|
|
|
GdkColormap *cmap,
|
|
|
|
int src_x,
|
|
|
|
int src_y,
|
|
|
|
int dest_x,
|
|
|
|
int dest_y,
|
|
|
|
int width,
|
|
|
|
int height);
|
|
|
|
|
Clip the retrieved image data to the screen, using a server grab to avoid
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.
2001-06-29 01:59:02 +00:00
|
|
|
GdkPixbuf *gdk_pixbuf_get_from_image (GdkPixbuf *dest,
|
|
|
|
GdkImage *src,
|
|
|
|
GdkColormap *cmap,
|
|
|
|
int src_x,
|
|
|
|
int src_y,
|
|
|
|
int dest_x,
|
|
|
|
int dest_y,
|
|
|
|
int width,
|
|
|
|
int height);
|
|
|
|
|
2005-03-30 17:40:39 +00:00
|
|
|
G_END_DECLS
|
2000-06-21 20:47:22 +00:00
|
|
|
|
2000-09-04 20:54:39 +00:00
|
|
|
#endif /* __GDK_PIXBUF_H__ */
|