Commit 7cc30404 authored by CST 1998 Shawn T. Amundson's avatar CST 1998 Shawn T. Amundson Committed by Shawn Amundson

Fixes for low-color displays and a slight enhancement for true-color

Wed Dec  2 17:45:21 CST 1998 Shawn T. Amundson <amundson@gtk.org>

        * gtk/gtkpixmap.c: Fixes for low-color displays and a slight
          enhancement for true-color displays.

        * INSTALL:
          README:
          configure.in:
          gtk+.spec:
          docs/gtk-config.1: up to version 1.1.6
parent 8285f4fc
Wed Dec 2 17:45:21 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* gtk/gtkpixmap.c: Fixes for low-color displays and a slight
enhancement for true-color displays.
* INSTALL:
README:
configure.in:
gtk+.spec:
docs/gtk-config.1: up to version 1.1.6
Wed Dec 2 01:36:49 PST 1998 Manish Singh <yosh@gimp.org>
* gtk/gtkfeatures.h.in: lets #define GTK_HAVE_FEATURES_1_1_6 before
......
Wed Dec 2 17:45:21 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* gtk/gtkpixmap.c: Fixes for low-color displays and a slight
enhancement for true-color displays.
* INSTALL:
README:
configure.in:
gtk+.spec:
docs/gtk-config.1: up to version 1.1.6
Wed Dec 2 01:36:49 PST 1998 Manish Singh <yosh@gimp.org>
* gtk/gtkfeatures.h.in: lets #define GTK_HAVE_FEATURES_1_1_6 before
......
Wed Dec 2 17:45:21 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* gtk/gtkpixmap.c: Fixes for low-color displays and a slight
enhancement for true-color displays.
* INSTALL:
README:
configure.in:
gtk+.spec:
docs/gtk-config.1: up to version 1.1.6
Wed Dec 2 01:36:49 PST 1998 Manish Singh <yosh@gimp.org>
* gtk/gtkfeatures.h.in: lets #define GTK_HAVE_FEATURES_1_1_6 before
......
Wed Dec 2 17:45:21 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* gtk/gtkpixmap.c: Fixes for low-color displays and a slight
enhancement for true-color displays.
* INSTALL:
README:
configure.in:
gtk+.spec:
docs/gtk-config.1: up to version 1.1.6
Wed Dec 2 01:36:49 PST 1998 Manish Singh <yosh@gimp.org>
* gtk/gtkfeatures.h.in: lets #define GTK_HAVE_FEATURES_1_1_6 before
......
Wed Dec 2 17:45:21 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* gtk/gtkpixmap.c: Fixes for low-color displays and a slight
enhancement for true-color displays.
* INSTALL:
README:
configure.in:
gtk+.spec:
docs/gtk-config.1: up to version 1.1.6
Wed Dec 2 01:36:49 PST 1998 Manish Singh <yosh@gimp.org>
* gtk/gtkfeatures.h.in: lets #define GTK_HAVE_FEATURES_1_1_6 before
......
Wed Dec 2 17:45:21 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* gtk/gtkpixmap.c: Fixes for low-color displays and a slight
enhancement for true-color displays.
* INSTALL:
README:
configure.in:
gtk+.spec:
docs/gtk-config.1: up to version 1.1.6
Wed Dec 2 01:36:49 PST 1998 Manish Singh <yosh@gimp.org>
* gtk/gtkfeatures.h.in: lets #define GTK_HAVE_FEATURES_1_1_6 before
......
Wed Dec 2 17:45:21 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* gtk/gtkpixmap.c: Fixes for low-color displays and a slight
enhancement for true-color displays.
* INSTALL:
README:
configure.in:
gtk+.spec:
docs/gtk-config.1: up to version 1.1.6
Wed Dec 2 01:36:49 PST 1998 Manish Singh <yosh@gimp.org>
* gtk/gtkfeatures.h.in: lets #define GTK_HAVE_FEATURES_1_1_6 before
......
......@@ -7,8 +7,8 @@ you got this package.
Simple install procedure
========================
% gzip -cd gtk+-1.1.5.tar.gz | tar xvf - # unpack the sources
% cd gtk+-1.1.5 # change to the toplevel directory
% gzip -cd gtk+-1.1.6.tar.gz | tar xvf - # unpack the sources
% cd gtk+-1.1.6 # change to the toplevel directory
% ./configure # run the `configure' script
% make # build GTK
[ Become root if necessary ]
......@@ -92,7 +92,7 @@ You can compile GTK+ against a copy of GLIB that you have not
yet installed. To do this, give the --with-glib=DIR options
to ./configure. For instance:
./configure --with-glib=../glib-1.1.5
./configure --with-glib=../glib-1.1.6
This, however, will not work if you built GLIB with different
source and build directories.
......
General Information
===================
This is GTK+ version 1.1.5. GTK+, which stands for the Gimp ToolKit,
This is GTK+ version 1.1.6. GTK+, which stands for the Gimp ToolKit,
is a library for creating graphical user interfaces for the X Window
System. It is designed to be small, efficient, and flexible. GTK+ is
written in C with a very object-oriented approach.
......
......@@ -177,7 +177,7 @@ if test x$with_glib = x ; then
AM_PATH_GLIB(1.1.6,,
AC_MSG_ERROR([
*** GLIB 1.1.5 or better is required. The latest version of GLIB
*** GLIB 1.1.6 or better is required. The latest version of GLIB
*** is always available from ftp://ftp.gtk.org.]),
gmodule)
......
.TH GTK+ 1 "25 October 1998" Version 1.1.5
.TH GTK+ 1 "25 October 1998" Version 1.1.6
.SH NAME
gtk-config - script to get information about the installed version of GTK+
.SH SYNOPSIS
......
# Note that this is NOT a relocatable package
%define ver 1.1.5
%define ver 1.1.6
%define rel SNAP
%define prefix /usr
......
......@@ -263,63 +263,85 @@ build_insensitive_pixmap(GtkPixmap *gtkpixmap)
gint32 red, green, blue;
GtkStyle *style;
GtkWidget *window;
GdkColor c;
int failed;
window = GTK_WIDGET (gtkpixmap);
g_return_if_fail(window != NULL);
gdk_window_get_size(pixmap, &w, &h);
visual = gtk_widget_get_visual(GTK_WIDGET(gtkpixmap));
cmap = gtk_widget_get_colormap(GTK_WIDGET(gtkpixmap));
image = gdk_image_get(pixmap, 0, 0, w, h);
insensitive = gdk_pixmap_new(GTK_WIDGET (gtkpixmap)->window, w, h, -1);
gc = gdk_gc_new (pixmap);
visual = gtk_widget_get_visual(GTK_WIDGET(gtkpixmap));
cmap = gtk_widget_get_colormap(GTK_WIDGET(gtkpixmap));
cc = gdk_color_context_new(visual, cmap);
if ((cc->mode != GDK_CC_MODE_TRUE) && (cc->mode != GDK_CC_MODE_MY_GRAY))
{
gdk_color_context_free(cc);
gdk_draw_image(insensitive, gc, image, 0, 0, 0, 0, w, h);
style = gtk_widget_get_style(window);
color = style->bg[0];
gdk_gc_set_foreground (gc, &color);
for (y = 0; y < h; y ++)
for (y = 0; y < h; y++)
{
for (x = y % 2; x < w; x += 2)
{
gdk_draw_point(pixmap, gc, x, y);
gdk_draw_point(insensitive, gc, x, y);
}
}
gdk_gc_destroy(gc);
return;
}
image = gdk_image_get(pixmap, 0, 0, w, h);
gdk_gc_get_values(gc, &vals);
style = gtk_widget_get_style(window);
color = style->bg[0];
red = color.red;
green = color.green;
blue = color.blue;
for (y = 0; y < h; y++)
{
for (x = 0; x < w; x++)
{
GdkColor c;
int failed;
c.pixel = gdk_image_get_pixel(image, x, y);
gdk_color_context_query_color(cc, &c);
c.red = (((gint32)c.red - red) >> 1) + red;
c.green = (((gint32)c.green - green) >> 1) + green;
c.blue = (((gint32)c.blue - blue) >> 1) + blue;
c.pixel = gdk_color_context_get_pixel(cc, c.red, c.green, c.blue,
&failed);
gdk_image_put_pixel(image, x, y, c.pixel);
}
}
insensitive = gdk_pixmap_new(GTK_WIDGET (gtkpixmap)->window, w, h, -1);
gdk_draw_image(insensitive, gc, image, 0, 0, 0, 0, w, h);
gtkpixmap->pixmap_insensitive = insensitive;
gdk_image_destroy(image);
gdk_gc_destroy(gc);
gdk_color_context_free(cc);
}
else
{
gdk_gc_get_values(gc, &vals);
style = gtk_widget_get_style(window);
color = style->bg[0];
red = color.red;
green = color.green;
blue = color.blue;
for (y = 0; y < h; y++)
{
for (x = 0; x < w; x++)
{
c.pixel = gdk_image_get_pixel(image, x, y);
gdk_color_context_query_color(cc, &c);
c.red = (((gint32)c.red - red) >> 1) + red;
c.green = (((gint32)c.green - green) >> 1) + green;
c.blue = (((gint32)c.blue - blue) >> 1) + blue;
c.pixel = gdk_color_context_get_pixel(cc, c.red, c.green, c.blue,
&failed);
gdk_image_put_pixel(image, x, y, c.pixel);
}
}
for (y = 0; y < h; y++)
{
for (x = y % 2; x < w; x += 2)
{
c.pixel = gdk_image_get_pixel(image, x, y);
gdk_color_context_query_color(cc, &c);
c.red = (((gint32)c.red - red) >> 1) + red;
c.green = (((gint32)c.green - green) >> 1) + green;
c.blue = (((gint32)c.blue - blue) >> 1) + blue;
c.pixel = gdk_color_context_get_pixel(cc, c.red, c.green, c.blue,
&failed);
gdk_image_put_pixel(image, x, y, c.pixel);
}
}
gdk_draw_image(insensitive, gc, image, 0, 0, 0, 0, w, h);
}
gtkpixmap->pixmap_insensitive = insensitive;
gdk_image_destroy(image);
gdk_color_context_free(cc);
gdk_gc_destroy(gc);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment