mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
4f1ccca594
Sun Jul 2 12:45:50 2000 Owen Taylor <otaylor@redhat.com> * gdk/gdkrgb.[ch]: Add gdk_rgb_find_color() to get a pixel value using GdkRGB functionality given GdkColormap and GdkColor. (name not final, waiting for inspiration.) * gdk/gdkgc.[ch] (gdk_gc_set_rgb_fg/bg_color): New functions to set the foreground/background of a GC using the GC's colormap and GdkRGB. (name not final, waiting for inspiration.) * gdk/gdkcompat.h gdk/gdkrgb.c (gdk_rgb_get_colormap): Rename from gdk_rgb_get_cmap(), put #define in gdkcompat.h. * gtk/gtkwidget.[ch] gtkcompat.h: Make visuals for gtk_widget_get_visual(), gtk_widget_get_default_visual, etc, purely a function of the corresponding colormap. Make gtk_widget_set_visual(), etc, noop macros in gtkcompat.h. * gdk/gdkpixmap.c gdk/x11/gdkpixmap-c11.c: Rewrite gdk_pixbuf_*create_from_xpm_* in terms of gdk_pixbuf_new_from_xpm_data(), move into platform independent code. * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): Take advantage of the new draw_rgb_32_image_dithalign. * gdk/gdkrgb.c (gdk_draw_rgb_32_image_dithalign): Added. * gtk/gtkgc.c (gtk_gc_new): Set the appropriate colormap on each created GC. * gdk/gdkgc.[ch]: Add gdk_gc_get/set_colormap. * gdk/gdkgc.[ch]: Add a colormap field to the GdkGC structure which we initialize from the drawable when the GC is created, if the drawable has a colormap. * gdk/x11/gdkgc-x11.c: include string.h for memset. * gdk/x11/gdkinput-x11.c: include string.h for strlen, etc. * gtk/gtklayout.[ch]: Remove unsed configure serial member.
47 lines
1.5 KiB
C
47 lines
1.5 KiB
C
#ifndef __GDK_COMPAT_H__
|
|
#define __GDK_COMPAT_H__
|
|
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif /* __cplusplus */
|
|
|
|
/* use -DGDK_DISABLE_COMPAT_H to compile your code and assure that it
|
|
* works with future GTK+ versions as well.
|
|
*/
|
|
#ifndef GDK_DISABLE_COMPAT_H
|
|
|
|
#define gdk_draw_pixmap gdk_draw_drawable
|
|
#define gdk_draw_bitmap gdk_draw_drawable
|
|
|
|
#define gdk_window_get_size gdk_drawable_get_size
|
|
#define gdk_window_get_type gdk_window_get_window_type
|
|
#define gdk_window_get_colormap gdk_drawable_get_colormap
|
|
#define gdk_window_set_colormap gdk_drawable_set_colormap
|
|
#define gdk_window_get_visual gdk_drawable_get_visual
|
|
|
|
#define gdk_window_ref gdk_drawable_ref
|
|
#define gdk_window_unref gdk_drawable_unref
|
|
#define gdk_bitmap_ref gdk_drawable_ref
|
|
#define gdk_bitmap_unref gdk_drawable_unref
|
|
#define gdk_pixmap_ref gdk_drawable_ref
|
|
#define gdk_pixmap_unref gdk_drawable_unref
|
|
|
|
#define gdk_window_copy_area(drawable,gc,x,y,source_drawable,source_x,source_y,width,height) \
|
|
gdk_draw_pixmap(drawable,gc,source_drawable,source_x,source_y,x,y,width,height)
|
|
|
|
#define gdk_gc_destroy gdk_gc_unref
|
|
#define gdk_image_destroy gdk_image_unref
|
|
#define gdk_cursor_destroy gdk_cursor_unref
|
|
|
|
#define gdk_rgb_get_cmap gdk_rgb_get_colormap
|
|
|
|
#endif /* GDK_DISABLE_COMPAT_H */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif /* __cplusplus */
|
|
|
|
#endif /* __GDK_COMPAT_H__ */
|
|
|