mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
remove gtk_menu_* compat defines; these are already in gtkmenu.h, and the
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.
This commit is contained in:
parent
b94e6c0a80
commit
eae09f4d83
28
ChangeLog
28
ChangeLog
@ -1,3 +1,31 @@
|
||||
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.
|
||||
|
||||
Sat Aug 25 19:02:39 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkbutton.[ch] gtk/gtktogglebutton.c: Add optional movement
|
||||
|
@ -1,3 +1,31 @@
|
||||
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.
|
||||
|
||||
Sat Aug 25 19:02:39 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkbutton.[ch] gtk/gtktogglebutton.c: Add optional movement
|
||||
|
@ -1,3 +1,31 @@
|
||||
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.
|
||||
|
||||
Sat Aug 25 19:02:39 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkbutton.[ch] gtk/gtktogglebutton.c: Add optional movement
|
||||
|
@ -1,3 +1,31 @@
|
||||
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.
|
||||
|
||||
Sat Aug 25 19:02:39 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkbutton.[ch] gtk/gtktogglebutton.c: Add optional movement
|
||||
|
@ -1,3 +1,31 @@
|
||||
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.
|
||||
|
||||
Sat Aug 25 19:02:39 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkbutton.[ch] gtk/gtktogglebutton.c: Add optional movement
|
||||
|
@ -1,3 +1,31 @@
|
||||
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.
|
||||
|
||||
Sat Aug 25 19:02:39 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkbutton.[ch] gtk/gtktogglebutton.c: Add optional movement
|
||||
|
@ -1,3 +1,31 @@
|
||||
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.
|
||||
|
||||
Sat Aug 25 19:02:39 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkbutton.[ch] gtk/gtktogglebutton.c: Add optional movement
|
||||
|
@ -1613,6 +1613,16 @@ Get the type of GtkIdentifier.
|
||||
@menu:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_item_configure ##### -->
|
||||
<para>
|
||||
Sets whether the menu item should show a submenu indicator, which is a right
|
||||
arrow.
|
||||
</para>
|
||||
|
||||
@menu_item: the menu item
|
||||
@show_toggle_indicator: unused
|
||||
@show_submenu_indicator: whether to show the arrow or not
|
||||
|
||||
<!-- ##### FUNCTION gtk_object_arg_get ##### -->
|
||||
<para>
|
||||
Private function to get an argument and argument info from an object.
|
||||
@ -2296,6 +2306,13 @@ fundamental type.
|
||||
|
||||
@style:
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_set_default_style ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@style:
|
||||
|
||||
<!-- ##### FUNCTION gtk_window_activate_mnemonic ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -92,13 +92,14 @@ GtkContainer
|
||||
@notify:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_container_children ##### -->
|
||||
<!-- ##### MACRO gtk_container_children ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@container:
|
||||
@Returns:
|
||||
<!-- # Unused Parameters # -->
|
||||
@container:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_container_set_reallocate_redraws ##### -->
|
||||
|
@ -252,9 +252,10 @@ return %NULL values.
|
||||
Creates the new GtkImage using the value and the mask.
|
||||
</para>
|
||||
|
||||
@Returns: the GtkImage
|
||||
<!-- # Unused Parameters # -->
|
||||
@val:
|
||||
@mask: a GDKBitmap that indicates which parts of the image should be transparent.
|
||||
@Returns: the GtkImage
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_set ##### -->
|
||||
|
@ -96,11 +96,11 @@ Creates a new #GtkMenu.
|
||||
Adds a new #GtkMenuItem to the end of the menu's item list.
|
||||
</para>
|
||||
|
||||
@menu: a #GtkMenu.
|
||||
@child: The #GtkMenuItem to add.
|
||||
<!-- # Unused Parameters # -->
|
||||
@m:
|
||||
@c:
|
||||
@menu: a #GtkMenu.
|
||||
@child: The #GtkMenuItem to add.
|
||||
|
||||
|
||||
<!-- ##### MACRO gtk_menu_prepend ##### -->
|
||||
@ -108,6 +108,7 @@ Adds a new #GtkMenuItem to the end of the menu's item list.
|
||||
Adds a new #GtkMenuItem to the beginning of the menu's item list.
|
||||
</para>
|
||||
|
||||
@menu_child:
|
||||
<!-- # Unused Parameters # -->
|
||||
@m:
|
||||
@c:
|
||||
@ -121,9 +122,10 @@ Adds a new #GtkMenuItem to the menu's item list at the position
|
||||
indicated by @position.
|
||||
</para>
|
||||
|
||||
<!-- # Unused Parameters # -->
|
||||
@menu: a #GtkMenu.
|
||||
@child: The #GtkMenuItem to add.
|
||||
@pos:
|
||||
<!-- # Unused Parameters # -->
|
||||
@position: The position in the item list where @child is added.
|
||||
Positions are numbered from 0 to n-1.
|
||||
|
||||
@ -293,3 +295,8 @@ will be called when the menu is later detached from the widget.
|
||||
@menu: the #GtkMenu being detached.
|
||||
|
||||
|
||||
<!-- ##### ARG GtkMenu:tearoff-title ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
@ -28,31 +28,38 @@ Creates the new #GtkMenuBar
|
||||
@Returns: the #GtkMenuBar
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_bar_append ##### -->
|
||||
<!-- ##### MACRO gtk_menu_bar_append ##### -->
|
||||
<para>
|
||||
Adds a new #GtkMenuItem to the end of the GtkMenuBar
|
||||
</para>
|
||||
|
||||
@menu_bar: a #GtkMenuBar
|
||||
@menu:
|
||||
@child: the #GtkMenuItem to add
|
||||
<!-- # Unused Parameters # -->
|
||||
@menu_bar: a #GtkMenuBar
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_bar_prepend ##### -->
|
||||
<!-- ##### MACRO gtk_menu_bar_prepend ##### -->
|
||||
<para>
|
||||
Adds a new #GtkMenuItem to the beginning of the GtkMenuBar
|
||||
</para>
|
||||
|
||||
@menu_child:
|
||||
<!-- # Unused Parameters # -->
|
||||
@menu_bar: a #GtkMenuBar
|
||||
@child: the #GtkMenuItem to add
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_bar_insert ##### -->
|
||||
<!-- ##### MACRO gtk_menu_bar_insert ##### -->
|
||||
<para>
|
||||
Adds a new #GtkMenuItem to the GtkMenuBar at the position defined by @position
|
||||
</para>
|
||||
|
||||
@menu_bar: a #GtkMenuBar
|
||||
@menu:
|
||||
@child: the #GtkMenuItem to add
|
||||
@pos:
|
||||
<!-- # Unused Parameters # -->
|
||||
@menu_bar: a #GtkMenuBar
|
||||
@position: the position in the item list where the @child is added.
|
||||
|
||||
|
||||
|
@ -87,17 +87,6 @@ This function is useless in usual applications.
|
||||
@placement: the submenu placement
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_item_configure ##### -->
|
||||
<para>
|
||||
Sets whether the menu item should show a submenu indicator, which is a right
|
||||
arrow.
|
||||
</para>
|
||||
|
||||
@menu_item: the menu item
|
||||
@show_toggle_indicator: unused
|
||||
@show_submenu_indicator: whether to show the arrow or not
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_item_select ##### -->
|
||||
<para>
|
||||
Emits the "select" signal on the given item. Behaves exactly like
|
||||
|
@ -495,7 +495,6 @@ This can later be composited together with other
|
||||
#GtkRcStyle structures to form a #GtkStyle.
|
||||
</para>
|
||||
|
||||
@parent_instance:
|
||||
@name:
|
||||
@bg_pixmap_name:
|
||||
@font_desc:
|
||||
|
@ -211,6 +211,7 @@ GtkTreeView
|
||||
@tree_view:
|
||||
@path:
|
||||
@column:
|
||||
@use_align:
|
||||
@row_align:
|
||||
@col_align:
|
||||
|
||||
|
@ -55,6 +55,116 @@ static guint32 mask_table[] = {
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* convert bitmap data to pixbuf without alpha,
|
||||
* without using a colormap
|
||||
*/
|
||||
static void
|
||||
bitmap1 (GdkImage *image,
|
||||
guchar *pixels,
|
||||
int rowstride,
|
||||
int x1,
|
||||
int y1,
|
||||
int x2,
|
||||
int y2)
|
||||
{
|
||||
int xx, yy;
|
||||
int bpl;
|
||||
register guint8 data;
|
||||
guint8 *o;
|
||||
guint8 *srow = image->mem, *orow = pixels;
|
||||
|
||||
d (printf ("bitmap, no alpha\n"));
|
||||
|
||||
bpl = image->bpl;
|
||||
|
||||
for (yy = y1; yy < y2; yy++)
|
||||
{
|
||||
o = orow;
|
||||
|
||||
for (xx = x1; xx < x2; xx ++)
|
||||
{
|
||||
/* top 29 bits of xx (xx >> 3) indicate the byte the bit is inside,
|
||||
* bottom 3 bits (xx & 7) indicate bit inside that byte,
|
||||
* we don't bother to canonicalize data to 1 or 0, just
|
||||
* leave the relevant bit in-place.
|
||||
*/
|
||||
data = srow[xx >> 3] & (image->byte_order == GDK_MSB_FIRST ?
|
||||
(0x80 >> (xx & 7)) :
|
||||
(1 << (xx & 7)));
|
||||
|
||||
if (data)
|
||||
{
|
||||
*o++ = 255;
|
||||
*o++ = 255;
|
||||
*o++ = 255;
|
||||
}
|
||||
else
|
||||
{
|
||||
*o++ = 0;
|
||||
*o++ = 0;
|
||||
*o++ = 0;
|
||||
}
|
||||
}
|
||||
srow += bpl;
|
||||
orow += rowstride;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* convert bitmap data to pixbuf with alpha,
|
||||
* without using a colormap
|
||||
*/
|
||||
static void
|
||||
bitmap1a (GdkImage *image,
|
||||
guchar *pixels,
|
||||
int rowstride,
|
||||
int x1,
|
||||
int y1,
|
||||
int x2,
|
||||
int y2)
|
||||
{
|
||||
int xx, yy;
|
||||
int bpl;
|
||||
register guint8 data;
|
||||
guint8 *o;
|
||||
guint8 *srow = image->mem, *orow = pixels;
|
||||
|
||||
d (printf ("bitmap, with alpha\n"));
|
||||
|
||||
bpl = image->bpl;
|
||||
|
||||
for (yy = y1; yy < y2; yy++)
|
||||
{
|
||||
o = orow;
|
||||
|
||||
for (xx = x1; xx < x2; xx ++)
|
||||
{
|
||||
/* see comment in bitmap1() */
|
||||
data = srow[xx >> 3] & (image->byte_order == GDK_MSB_FIRST ?
|
||||
(0x80 >> (xx & 7)) :
|
||||
(1 << (xx & 7)));
|
||||
|
||||
if (data)
|
||||
{
|
||||
*o++ = 255;
|
||||
*o++ = 255;
|
||||
*o++ = 255;
|
||||
*o++ = 255;
|
||||
}
|
||||
else
|
||||
{
|
||||
*o++ = 0;
|
||||
*o++ = 0;
|
||||
*o++ = 0;
|
||||
*o++ = 0;
|
||||
}
|
||||
}
|
||||
srow += bpl;
|
||||
orow += rowstride;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* convert 1 bits-pixel data
|
||||
* no alpha
|
||||
@ -71,7 +181,6 @@ rgb1 (GdkImage *image,
|
||||
{
|
||||
int xx, yy;
|
||||
int bpl;
|
||||
guint8 *s;
|
||||
register guint8 data;
|
||||
guint8 *o;
|
||||
guint8 *srow = image->mem, *orow = pixels;
|
||||
@ -86,12 +195,15 @@ rgb1 (GdkImage *image,
|
||||
|
||||
for (yy = y1; yy < y2; yy++)
|
||||
{
|
||||
s = srow;
|
||||
o = orow;
|
||||
|
||||
for (xx = x1; xx < x2; xx ++)
|
||||
{
|
||||
data = srow[xx >> 3] >> (7 - (xx & 7)) & 1;
|
||||
/* see comment in bitmap1() */
|
||||
data = srow[xx >> 3] & (image->byte_order == GDK_MSB_FIRST ?
|
||||
(0x80 >> (xx & 7)) :
|
||||
(1 << (xx & 7)));
|
||||
|
||||
*o++ = colormap->colors[data].red;
|
||||
*o++ = colormap->colors[data].green;
|
||||
*o++ = colormap->colors[data].blue;
|
||||
@ -117,12 +229,10 @@ rgb1a (GdkImage *image,
|
||||
{
|
||||
int xx, yy;
|
||||
int bpl;
|
||||
guint8 *s;
|
||||
register guint8 data;
|
||||
guint8 *o;
|
||||
guint8 *srow = image->mem, *orow = pixels;
|
||||
guint32 remap[2];
|
||||
|
||||
|
||||
d (printf ("1 bits/pixel\n"));
|
||||
|
||||
/* convert upto 8 pixels/time */
|
||||
@ -130,30 +240,21 @@ rgb1a (GdkImage *image,
|
||||
* 1 bit displays anymore? */
|
||||
bpl = image->bpl;
|
||||
|
||||
for (xx = x1; xx < 2; xx++)
|
||||
{
|
||||
#ifdef LITTLE
|
||||
remap[xx] = 0xff000000
|
||||
| colormap->colors[xx].blue << 16
|
||||
| colormap->colors[xx].green << 8
|
||||
| colormap->colors[xx].red;
|
||||
#else
|
||||
remap[xx] = 0xff
|
||||
| colormap->colors[xx].red << 24
|
||||
| colormap->colors[xx].green << 16
|
||||
| colormap->colors[xx].blue << 8;
|
||||
#endif
|
||||
}
|
||||
|
||||
for (yy = y1; yy < y2; yy++)
|
||||
{
|
||||
s = srow;
|
||||
o = orow;
|
||||
|
||||
for (xx = x1; xx < x2; xx ++)
|
||||
{
|
||||
data = srow[xx >> 3] >> (7 - (xx & 7)) & 1;
|
||||
*o++ = remap[data];
|
||||
/* see comment in bitmap1() */
|
||||
data = srow[xx >> 3] & (image->byte_order == GDK_MSB_FIRST ?
|
||||
(0x80 >> (xx & 7)) :
|
||||
(1 << (xx & 7)));
|
||||
|
||||
*o++ = colormap->colors[data].red;
|
||||
*o++ = colormap->colors[data].green;
|
||||
*o++ = colormap->colors[data].blue;
|
||||
*o++ = 255;
|
||||
}
|
||||
srow += bpl;
|
||||
orow += rowstride;
|
||||
@ -192,12 +293,13 @@ rgb8 (GdkImage *image,
|
||||
{
|
||||
s = srow;
|
||||
o = orow;
|
||||
for (xx = x1; xx < x2; xx++) {
|
||||
data = *s++ & mask;
|
||||
*o++ = colormap->colors[data].red;
|
||||
*o++ = colormap->colors[data].green;
|
||||
*o++ = colormap->colors[data].blue;
|
||||
}
|
||||
for (xx = x1; xx < x2; xx++)
|
||||
{
|
||||
data = *s++ & mask;
|
||||
*o++ = colormap->colors[data].red;
|
||||
*o++ = colormap->colors[data].green;
|
||||
*o++ = colormap->colors[data].blue;
|
||||
}
|
||||
srow += bpl;
|
||||
orow += rowstride;
|
||||
}
|
||||
@ -1206,16 +1308,35 @@ rgbconvert (GdkImage *image,
|
||||
int height,
|
||||
GdkColormap *cmap)
|
||||
{
|
||||
int index = (image->byte_order == GDK_MSB_FIRST) | (alpha != 0) << 1;
|
||||
int bank = 5; /* default fallback converter */
|
||||
GdkVisual *v = gdk_colormap_get_visual (cmap);
|
||||
|
||||
d(printf("masks = %x:%x:%x\n", v->red_mask, v->green_mask, v->blue_mask));
|
||||
d(printf("image depth = %d, bits per pixel = %d\n", image->depth, image->bits_per_pixel));
|
||||
int index;
|
||||
int bank;
|
||||
GdkVisual *v;
|
||||
|
||||
g_assert ((x + width) <= image->width);
|
||||
g_assert ((y + height) <= image->height);
|
||||
|
||||
if (cmap == NULL)
|
||||
{
|
||||
/* Only allowed for bitmaps */
|
||||
g_return_if_fail (image->depth == 1);
|
||||
|
||||
if (alpha)
|
||||
bitmap1a (image, pixels, rowstride,
|
||||
x, y, x + width, y + height);
|
||||
else
|
||||
bitmap1 (image, pixels, rowstride,
|
||||
x, y, x + width, y + height);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
v = gdk_colormap_get_visual (cmap);
|
||||
bank = 5; /* default fallback converter */
|
||||
index = (image->byte_order == GDK_MSB_FIRST) | (alpha != 0) << 1;
|
||||
|
||||
d(printf("masks = %x:%x:%x\n", v->red_mask, v->green_mask, v->blue_mask));
|
||||
d(printf("image depth = %d, bits per pixel = %d\n", image->depth, image->bits_per_pixel));
|
||||
|
||||
switch (v->type)
|
||||
{
|
||||
/* I assume this is right for static & greyscale's too? */
|
||||
@ -1285,8 +1406,7 @@ rgbconvert (GdkImage *image,
|
||||
* gdk_pixbuf_get_from_drawable:
|
||||
* @dest: Destination pixbuf, or %NULL if a new pixbuf should be created.
|
||||
* @src: Source drawable.
|
||||
* @cmap: A colormap if @src is a pixmap. If it is a window, this argument will
|
||||
* be ignored.
|
||||
* @cmap: A colormap if @src doesn't have one set.
|
||||
* @src_x: Source X coordinate within drawable.
|
||||
* @src_y: Source Y coordinate within drawable.
|
||||
* @dest_x: Destination X coordinate in pixbuf, or 0 if @dest is NULL.
|
||||
@ -1298,12 +1418,17 @@ rgbconvert (GdkImage *image,
|
||||
* representation inside a #GdkPixbuf. In other words, copies
|
||||
* image data from a server-side drawable to a client-side RGB(A) buffer.
|
||||
* This allows you to efficiently read individual pixels on the client side.
|
||||
*
|
||||
* If the drawable @src is a pixmap, then a suitable colormap must be
|
||||
* specified, since pixmaps are just blocks of pixel data without an
|
||||
* associated colormap. If the drawable is a window, the @cmap
|
||||
* argument will be ignored and the window's own colormap will be used
|
||||
* instead.
|
||||
*
|
||||
* If the drawable @src has no colormap (gdk_drawable_get_colormap()
|
||||
* returns %NULL), then a suitable colormap must be specified.
|
||||
* Typically a #GdkWindow or a pixmap created by passing a #GdkWindow
|
||||
* to gdk_pixmap_new() will already have a colormap associated with
|
||||
* it. If the drawable has a colormap, the @cmap argument will be
|
||||
* ignored. If the drawable is a bitmap (1 bit per pixel pixmap),
|
||||
* then a colormap is not required; pixels with a value of 1 are
|
||||
* assumed to be white, and pixels with a value of 0 are assumed to be
|
||||
* black. For taking screenshots, gdk_colormap_get_system() returns
|
||||
* the correct colormap to use.
|
||||
*
|
||||
* If the specified destination pixbuf @dest is %NULL, then this
|
||||
* function will create an RGB pixbuf with 8 bits per channel and no
|
||||
@ -1355,6 +1480,7 @@ gdk_pixbuf_get_from_drawable (GdkPixbuf *dest,
|
||||
{
|
||||
int src_width, src_height;
|
||||
GdkImage *image;
|
||||
int depth;
|
||||
|
||||
/* General sanity checks */
|
||||
|
||||
@ -1380,7 +1506,9 @@ gdk_pixbuf_get_from_drawable (GdkPixbuf *dest,
|
||||
if (cmap == NULL)
|
||||
cmap = gdk_drawable_get_colormap (src);
|
||||
|
||||
if (cmap == NULL)
|
||||
depth = gdk_drawable_get_depth (src);
|
||||
|
||||
if (depth != 1 && cmap == NULL)
|
||||
{
|
||||
g_warning ("%s: Source drawable has no colormap; either pass "
|
||||
"in a colormap, or set the colormap on the drawable "
|
||||
@ -1469,8 +1597,8 @@ gdk_pixbuf_get_from_image (GdkPixbuf *dest,
|
||||
|
||||
if (cmap == NULL)
|
||||
cmap = gdk_image_get_colormap (src);
|
||||
|
||||
if (cmap == NULL)
|
||||
|
||||
if (src->depth != 1 && cmap == NULL)
|
||||
{
|
||||
g_warning ("%s: Source image has no colormap; either pass "
|
||||
"in a colormap, or set the colormap on the image "
|
||||
|
@ -3482,6 +3482,15 @@ gtk_window_move_resize (GtkWindow *window)
|
||||
widget->allocation.height != new_request.height))
|
||||
configure_request_size_changed = TRUE;
|
||||
|
||||
|
||||
hints_changed = FALSE;
|
||||
|
||||
if (!gtk_window_compare_hints (&info->last.geometry, info->last.flags,
|
||||
&new_geometry, new_flags))
|
||||
{
|
||||
hints_changed = TRUE;
|
||||
}
|
||||
|
||||
/* Position Constraints
|
||||
* ====================
|
||||
*
|
||||
@ -3545,14 +3554,6 @@ gtk_window_move_resize (GtkWindow *window)
|
||||
else
|
||||
configure_request_pos_changed = FALSE;
|
||||
}
|
||||
|
||||
hints_changed = FALSE;
|
||||
|
||||
if (!gtk_window_compare_hints (&info->last.geometry, info->last.flags,
|
||||
&new_geometry, new_flags))
|
||||
{
|
||||
hints_changed = TRUE;
|
||||
}
|
||||
|
||||
#if 0
|
||||
{
|
||||
@ -4791,6 +4792,12 @@ gtk_XParseGeometry (const char *string,
|
||||
int tempX, tempY;
|
||||
char *nextCharacter;
|
||||
|
||||
/* These initializations are just to silence gcc */
|
||||
tempWidth = 0;
|
||||
tempHeight = 0;
|
||||
tempX = 0;
|
||||
tempY = 0;
|
||||
|
||||
if ( (string == NULL) || (*string == '\0')) return(mask);
|
||||
if (*string == '=')
|
||||
string++; /* ignore possible '=' at beg of geometry spec */
|
||||
|
Loading…
Reference in New Issue
Block a user