diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-02-02 22:19:31 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-02-02 22:19:31 +0000 |
commit | a2d1299475cb8f34f99e420ef752bf9366275bf7 (patch) | |
tree | 1a7dd40f663b198d7e525ea07a6a84a63f6e783e /examples | |
parent | a1a252ce46b50ff199e5ee084036267455b9ec5b (diff) | |
download | gtk+-a2d1299475cb8f34f99e420ef752bf9366275bf7.tar.gz |
Make gdk_colormap_sync private since it was never exported in a header
Fri Feb 2 17:16:09 2001 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkcolor-x11.c (gdk_colormap_sync): Make
gdk_colormap_sync private since it was never exported
in a header file.
* gdk/x11/gdkcolor-x11.c (gdk_colormap_new): Fill in
colormap->colors[] for StaticGray, StaticColor colormaps.
* gdk/gdkpixbuf-drawable.c: Fix problems where image->bpp
was being used as if it was image->bits_per_pixel.
* gdk/gdkimage.h, gdk/x11/gdkimage-x11.c: Save the bits-per-pixel
for the image in the GdkImage structure since it isn't
reconstructable, and we need it to handle packed types
* gdk/win32/gdkimage-win32.c: Set image->bits_per_pixel. (I'm making
the assumption that on Win32 image->bits_per_pixel == image->depth,
always.
* gdk/linux-fb/gdkimage-fb.c: Set image->bits_per_pixel.
* gdk/gdkrgb.c (gdk_rgb_select_conv): Exit with an informative
warning message if no converter can be found.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/packer/pack.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/examples/packer/pack.c b/examples/packer/pack.c index 6bde2f082b..e8e3af4873 100644 --- a/examples/packer/pack.c +++ b/examples/packer/pack.c @@ -159,10 +159,10 @@ main (int argv, char **argc) button_left = gtk_toggle_button_new_with_label("Left"); button_right = gtk_toggle_button_new_with_label("Right"); - gtk_object_set_data(GTK_OBJECT(button_top), "side", (gpointer) GTK_SIDE_TOP); - gtk_object_set_data(GTK_OBJECT(button_bottom), "side", (gpointer) GTK_SIDE_BOTTOM); - gtk_object_set_data(GTK_OBJECT(button_left), "side", (gpointer) GTK_SIDE_LEFT); - gtk_object_set_data(GTK_OBJECT(button_right), "side", (gpointer) GTK_SIDE_RIGHT); + gtk_object_set_data(GTK_OBJECT(button_top), "side", GINT_TO_POINTER (GTK_SIDE_TOP)); + gtk_object_set_data(GTK_OBJECT(button_bottom), "side", GINT_TO_POINTER (GTK_SIDE_BOTTOM)); + gtk_object_set_data(GTK_OBJECT(button_left), "side", GINT_TO_POINTER (GTK_SIDE_LEFT)); + gtk_object_set_data(GTK_OBJECT(button_right), "side", GINT_TO_POINTER (GTK_SIDE_RIGHT)); gtk_widget_set_usize(button_top, 50, -1); gtk_widget_set_usize(button_bottom, 50, -1); @@ -230,15 +230,15 @@ main (int argv, char **argc) button_sw = gtk_toggle_button_new_with_label("SW"); button_center = gtk_toggle_button_new_with_label(""); - gtk_object_set_data(GTK_OBJECT(button_n), "anchor", (gpointer) GTK_ANCHOR_N); - gtk_object_set_data(GTK_OBJECT(button_nw), "anchor", (gpointer) GTK_ANCHOR_NW); - gtk_object_set_data(GTK_OBJECT(button_ne), "anchor", (gpointer) GTK_ANCHOR_NE); - gtk_object_set_data(GTK_OBJECT(button_s), "anchor", (gpointer) GTK_ANCHOR_S); - gtk_object_set_data(GTK_OBJECT(button_sw), "anchor", (gpointer) GTK_ANCHOR_SW); - gtk_object_set_data(GTK_OBJECT(button_se), "anchor", (gpointer) GTK_ANCHOR_SE); - gtk_object_set_data(GTK_OBJECT(button_w), "anchor", (gpointer) GTK_ANCHOR_W); - gtk_object_set_data(GTK_OBJECT(button_e), "anchor", (gpointer) GTK_ANCHOR_E); - gtk_object_set_data(GTK_OBJECT(button_center), "anchor", (gpointer) GTK_ANCHOR_CENTER); + gtk_object_set_data(GTK_OBJECT(button_n), "anchor", GINT_TO_POINTER (GTK_ANCHOR_N)); + gtk_object_set_data(GTK_OBJECT(button_nw), "anchor", GINT_TO_POINTER (GTK_ANCHOR_NW)); + gtk_object_set_data(GTK_OBJECT(button_ne), "anchor", GINT_TO_POINTER (GTK_ANCHOR_NE)); + gtk_object_set_data(GTK_OBJECT(button_s), "anchor", GINT_TO_POINTER (GTK_ANCHOR_S)); + gtk_object_set_data(GTK_OBJECT(button_sw), "anchor", GINT_TO_POINTER (GTK_ANCHOR_SW)); + gtk_object_set_data(GTK_OBJECT(button_se), "anchor", GINT_TO_POINTER (GTK_ANCHOR_SE)); + gtk_object_set_data(GTK_OBJECT(button_w), "anchor", GINT_TO_POINTER (GTK_ANCHOR_W)); + gtk_object_set_data(GTK_OBJECT(button_e), "anchor", GINT_TO_POINTER (GTK_ANCHOR_E)); + gtk_object_set_data(GTK_OBJECT(button_center), "anchor", GINT_TO_POINTER (GTK_ANCHOR_CENTER)); gtk_signal_connect (GTK_OBJECT (button_n), "toggled", GTK_SIGNAL_FUNC (toggle_anchor), (gpointer) info); @@ -321,9 +321,9 @@ main (int argv, char **argc) GTK_FILL_X | GTK_PACK_EXPAND, 0, 10, 5, 0, 0); - gtk_object_set_data(GTK_OBJECT(button_fillx), "option", (gpointer) GTK_FILL_X); - gtk_object_set_data(GTK_OBJECT(button_filly), "option", (gpointer) GTK_FILL_Y); - gtk_object_set_data(GTK_OBJECT(button_expand), "option", (gpointer) GTK_PACK_EXPAND); + gtk_object_set_data(GTK_OBJECT(button_fillx), "option", GINT_TO_POINTER (GTK_FILL_X)); + gtk_object_set_data(GTK_OBJECT(button_filly), "option", GINT_TO_POINTER (GTK_FILL_Y)); + gtk_object_set_data(GTK_OBJECT(button_expand), "option", GINT_TO_POINTER (GTK_PACK_EXPAND)); gtk_signal_connect (GTK_OBJECT (button_fillx), "toggled", GTK_SIGNAL_FUNC (toggle_options), (gpointer) info); @@ -373,7 +373,7 @@ toggle_options (GtkWidget *widget, gpointer data) info = (Info*) data; - option = (gint) gtk_object_get_data(GTK_OBJECT(widget), "option"); + option = GPOINTER_TO_INT (gtk_object_get_data(GTK_OBJECT(widget), "option")); pchild = info->pchild; if (pchild == NULL) { @@ -412,7 +412,7 @@ toggle_anchor (GtkWidget *widget, gpointer data) info = (Info*) data; if (GTK_TOGGLE_BUTTON(widget)->active) { - anchor = (gint) gtk_object_get_data(GTK_OBJECT(widget), "anchor"); + anchor = GPOINTER_TO_INT (gtk_object_get_data(GTK_OBJECT(widget), "anchor")); pchild = info->pchild; if (pchild == NULL) { @@ -483,7 +483,7 @@ toggle_side (GtkWidget *widget, gpointer data) if (GTK_TOGGLE_BUTTON(widget)->active) { - side = (gint) gtk_object_get_data(GTK_OBJECT(widget), "side"); + side = GPOINTER_TO_INT (gtk_object_get_data(GTK_OBJECT(widget), "side")); pchild = info->pchild; if (pchild == NULL) { |