Commit 64911ddc authored by Tim Janik's avatar Tim Janik Committed by Tim Janik

add xthickness and ythickness to GtkRcStyle and add the necessary tokens.

Tue Jul 11 06:38:42 2000  Tim Janik  <timj@gtk.org>

        * gtk/gtkrc.h: add xthickness and ythickness to GtkRcStyle and
        add the necessary tokens.

        * gtk/gtkrc.c (gtk_rc_style_init): properly initiality the rc style.
        (gtk_rc_style_to_style): copy thicknesses.
        (gtk_rc_init_style): apply thicknesses.
        (gtk_rc_parse_style): parse xthickness and ythickness.

        * gdk/x11/gdkdnd-x11.c: silence compiler in switch() statements.

        * gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new):
        (gdk_window_new):
        (_gdk_windowing_window_init):
        * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_foreign_new):
        (gdk_pixmap_create_from_data):
        (gdk_bitmap_create_from_data):
        (gdk_pixmap_new):
        * gdk/x11/gdkimage-x11.c (gdk_image_get):
        (gdk_image_new):
        * gdk/x11/gdkgc-x11.c (_gdk_x11_gc_new):
        * gdk/x11/gdkdnd-x11.c (gdk_drag_context_new):
        * gdk/x11/gdkcolor-x11.c (gdkx_colormap_get):
        (gdk_colormap_get_system):
        (gdk_colormap_new):
        * gdk/gdkwindow.c (gdk_window_init):
        * gtk/gtkstyle.c (gtk_style_new):
        * gtk/gdk-pixbuf-loader.c (gdk_pixbuf_loader_frame_done):
        * gdk/gdkpixmap.c (gdk_pixmap_init):
        * gtk/gtkrc.c (gtk_rc_style_new):
        use g_object_new() instead of g_type_create_instance() which
        is a private function for fundamental type implementations.

Tue Jul 11 06:20:14 2000  Tim Janik  <timj@gtk.org>

        * io-gif.c (gdk_pixbuf__gif_image_load_animation):
        * gdk-pixbuf-data.c (gdk_pixbuf_new_from_data):
        * gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file):
        use g_object_new() instead of g_type_create_instance() which
        is a private function for fundamental type implementations.
parent 1e723281
Tue Jul 11 06:38:42 2000 Tim Janik <timj@gtk.org>
* gtk/gtkrc.h: add xthickness and ythickness to GtkRcStyle and
add the necessary tokens.
* gtk/gtkrc.c (gtk_rc_style_init): properly initiality the rc style.
(gtk_rc_style_to_style): copy thicknesses.
(gtk_rc_init_style): apply thicknesses.
(gtk_rc_parse_style): parse xthickness and ythickness.
* gdk/x11/gdkdnd-x11.c: silence compiler in switch() statements.
* gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new):
(gdk_window_new):
(_gdk_windowing_window_init):
* gdk/x11/gdkpixmap-x11.c (gdk_pixmap_foreign_new):
(gdk_pixmap_create_from_data):
(gdk_bitmap_create_from_data):
(gdk_pixmap_new):
* gdk/x11/gdkimage-x11.c (gdk_image_get):
(gdk_image_new):
* gdk/x11/gdkgc-x11.c (_gdk_x11_gc_new):
* gdk/x11/gdkdnd-x11.c (gdk_drag_context_new):
* gdk/x11/gdkcolor-x11.c (gdkx_colormap_get):
(gdk_colormap_get_system):
(gdk_colormap_new):
* gdk/gdkwindow.c (gdk_window_init):
* gtk/gtkstyle.c (gtk_style_new):
* gtk/gdk-pixbuf-loader.c (gdk_pixbuf_loader_frame_done):
* gdk/gdkpixmap.c (gdk_pixmap_init):
* gtk/gtkrc.c (gtk_rc_style_new):
use g_object_new() instead of g_type_create_instance() which
is a private function for fundamental type implementations.
Thu Jul 6 16:12:14 2000 Owen Taylor <otaylor@redhat.com>
* configure.in: Add check for db2html
......
Tue Jul 11 06:38:42 2000 Tim Janik <timj@gtk.org>
* gtk/gtkrc.h: add xthickness and ythickness to GtkRcStyle and
add the necessary tokens.
* gtk/gtkrc.c (gtk_rc_style_init): properly initiality the rc style.
(gtk_rc_style_to_style): copy thicknesses.
(gtk_rc_init_style): apply thicknesses.
(gtk_rc_parse_style): parse xthickness and ythickness.
* gdk/x11/gdkdnd-x11.c: silence compiler in switch() statements.
* gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new):
(gdk_window_new):
(_gdk_windowing_window_init):
* gdk/x11/gdkpixmap-x11.c (gdk_pixmap_foreign_new):
(gdk_pixmap_create_from_data):
(gdk_bitmap_create_from_data):
(gdk_pixmap_new):
* gdk/x11/gdkimage-x11.c (gdk_image_get):
(gdk_image_new):
* gdk/x11/gdkgc-x11.c (_gdk_x11_gc_new):
* gdk/x11/gdkdnd-x11.c (gdk_drag_context_new):
* gdk/x11/gdkcolor-x11.c (gdkx_colormap_get):
(gdk_colormap_get_system):
(gdk_colormap_new):
* gdk/gdkwindow.c (gdk_window_init):
* gtk/gtkstyle.c (gtk_style_new):
* gtk/gdk-pixbuf-loader.c (gdk_pixbuf_loader_frame_done):
* gdk/gdkpixmap.c (gdk_pixmap_init):
* gtk/gtkrc.c (gtk_rc_style_new):
use g_object_new() instead of g_type_create_instance() which
is a private function for fundamental type implementations.
Thu Jul 6 16:12:14 2000 Owen Taylor <otaylor@redhat.com>
* configure.in: Add check for db2html
......
Tue Jul 11 06:38:42 2000 Tim Janik <timj@gtk.org>
* gtk/gtkrc.h: add xthickness and ythickness to GtkRcStyle and
add the necessary tokens.
* gtk/gtkrc.c (gtk_rc_style_init): properly initiality the rc style.
(gtk_rc_style_to_style): copy thicknesses.
(gtk_rc_init_style): apply thicknesses.
(gtk_rc_parse_style): parse xthickness and ythickness.
* gdk/x11/gdkdnd-x11.c: silence compiler in switch() statements.
* gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new):
(gdk_window_new):
(_gdk_windowing_window_init):
* gdk/x11/gdkpixmap-x11.c (gdk_pixmap_foreign_new):
(gdk_pixmap_create_from_data):
(gdk_bitmap_create_from_data):
(gdk_pixmap_new):
* gdk/x11/gdkimage-x11.c (gdk_image_get):
(gdk_image_new):
* gdk/x11/gdkgc-x11.c (_gdk_x11_gc_new):
* gdk/x11/gdkdnd-x11.c (gdk_drag_context_new):
* gdk/x11/gdkcolor-x11.c (gdkx_colormap_get):
(gdk_colormap_get_system):
(gdk_colormap_new):
* gdk/gdkwindow.c (gdk_window_init):
* gtk/gtkstyle.c (gtk_style_new):
* gtk/gdk-pixbuf-loader.c (gdk_pixbuf_loader_frame_done):
* gdk/gdkpixmap.c (gdk_pixmap_init):
* gtk/gtkrc.c (gtk_rc_style_new):
use g_object_new() instead of g_type_create_instance() which
is a private function for fundamental type implementations.
Thu Jul 6 16:12:14 2000 Owen Taylor <otaylor@redhat.com>
* configure.in: Add check for db2html
......
Tue Jul 11 06:38:42 2000 Tim Janik <timj@gtk.org>
* gtk/gtkrc.h: add xthickness and ythickness to GtkRcStyle and
add the necessary tokens.
* gtk/gtkrc.c (gtk_rc_style_init): properly initiality the rc style.
(gtk_rc_style_to_style): copy thicknesses.
(gtk_rc_init_style): apply thicknesses.
(gtk_rc_parse_style): parse xthickness and ythickness.
* gdk/x11/gdkdnd-x11.c: silence compiler in switch() statements.
* gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new):
(gdk_window_new):
(_gdk_windowing_window_init):
* gdk/x11/gdkpixmap-x11.c (gdk_pixmap_foreign_new):
(gdk_pixmap_create_from_data):
(gdk_bitmap_create_from_data):
(gdk_pixmap_new):
* gdk/x11/gdkimage-x11.c (gdk_image_get):
(gdk_image_new):
* gdk/x11/gdkgc-x11.c (_gdk_x11_gc_new):
* gdk/x11/gdkdnd-x11.c (gdk_drag_context_new):
* gdk/x11/gdkcolor-x11.c (gdkx_colormap_get):
(gdk_colormap_get_system):
(gdk_colormap_new):
* gdk/gdkwindow.c (gdk_window_init):
* gtk/gtkstyle.c (gtk_style_new):
* gtk/gdk-pixbuf-loader.c (gdk_pixbuf_loader_frame_done):
* gdk/gdkpixmap.c (gdk_pixmap_init):
* gtk/gtkrc.c (gtk_rc_style_new):
use g_object_new() instead of g_type_create_instance() which
is a private function for fundamental type implementations.
Thu Jul 6 16:12:14 2000 Owen Taylor <otaylor@redhat.com>
* configure.in: Add check for db2html
......
Tue Jul 11 06:38:42 2000 Tim Janik <timj@gtk.org>
* gtk/gtkrc.h: add xthickness and ythickness to GtkRcStyle and
add the necessary tokens.
* gtk/gtkrc.c (gtk_rc_style_init): properly initiality the rc style.
(gtk_rc_style_to_style): copy thicknesses.
(gtk_rc_init_style): apply thicknesses.
(gtk_rc_parse_style): parse xthickness and ythickness.
* gdk/x11/gdkdnd-x11.c: silence compiler in switch() statements.
* gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new):
(gdk_window_new):
(_gdk_windowing_window_init):
* gdk/x11/gdkpixmap-x11.c (gdk_pixmap_foreign_new):
(gdk_pixmap_create_from_data):
(gdk_bitmap_create_from_data):
(gdk_pixmap_new):
* gdk/x11/gdkimage-x11.c (gdk_image_get):
(gdk_image_new):
* gdk/x11/gdkgc-x11.c (_gdk_x11_gc_new):
* gdk/x11/gdkdnd-x11.c (gdk_drag_context_new):
* gdk/x11/gdkcolor-x11.c (gdkx_colormap_get):
(gdk_colormap_get_system):
(gdk_colormap_new):
* gdk/gdkwindow.c (gdk_window_init):
* gtk/gtkstyle.c (gtk_style_new):
* gtk/gdk-pixbuf-loader.c (gdk_pixbuf_loader_frame_done):
* gdk/gdkpixmap.c (gdk_pixmap_init):
* gtk/gtkrc.c (gtk_rc_style_new):
use g_object_new() instead of g_type_create_instance() which
is a private function for fundamental type implementations.
Thu Jul 6 16:12:14 2000 Owen Taylor <otaylor@redhat.com>
* configure.in: Add check for db2html
......
Tue Jul 11 06:38:42 2000 Tim Janik <timj@gtk.org>
* gtk/gtkrc.h: add xthickness and ythickness to GtkRcStyle and
add the necessary tokens.
* gtk/gtkrc.c (gtk_rc_style_init): properly initiality the rc style.
(gtk_rc_style_to_style): copy thicknesses.
(gtk_rc_init_style): apply thicknesses.
(gtk_rc_parse_style): parse xthickness and ythickness.
* gdk/x11/gdkdnd-x11.c: silence compiler in switch() statements.
* gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new):
(gdk_window_new):
(_gdk_windowing_window_init):
* gdk/x11/gdkpixmap-x11.c (gdk_pixmap_foreign_new):
(gdk_pixmap_create_from_data):
(gdk_bitmap_create_from_data):
(gdk_pixmap_new):
* gdk/x11/gdkimage-x11.c (gdk_image_get):
(gdk_image_new):
* gdk/x11/gdkgc-x11.c (_gdk_x11_gc_new):
* gdk/x11/gdkdnd-x11.c (gdk_drag_context_new):
* gdk/x11/gdkcolor-x11.c (gdkx_colormap_get):
(gdk_colormap_get_system):
(gdk_colormap_new):
* gdk/gdkwindow.c (gdk_window_init):
* gtk/gtkstyle.c (gtk_style_new):
* gtk/gdk-pixbuf-loader.c (gdk_pixbuf_loader_frame_done):
* gdk/gdkpixmap.c (gdk_pixmap_init):
* gtk/gtkrc.c (gtk_rc_style_new):
use g_object_new() instead of g_type_create_instance() which
is a private function for fundamental type implementations.
Thu Jul 6 16:12:14 2000 Owen Taylor <otaylor@redhat.com>
* configure.in: Add check for db2html
......
Tue Jul 11 06:38:42 2000 Tim Janik <timj@gtk.org>
* gtk/gtkrc.h: add xthickness and ythickness to GtkRcStyle and
add the necessary tokens.
* gtk/gtkrc.c (gtk_rc_style_init): properly initiality the rc style.
(gtk_rc_style_to_style): copy thicknesses.
(gtk_rc_init_style): apply thicknesses.
(gtk_rc_parse_style): parse xthickness and ythickness.
* gdk/x11/gdkdnd-x11.c: silence compiler in switch() statements.
* gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new):
(gdk_window_new):
(_gdk_windowing_window_init):
* gdk/x11/gdkpixmap-x11.c (gdk_pixmap_foreign_new):
(gdk_pixmap_create_from_data):
(gdk_bitmap_create_from_data):
(gdk_pixmap_new):
* gdk/x11/gdkimage-x11.c (gdk_image_get):
(gdk_image_new):
* gdk/x11/gdkgc-x11.c (_gdk_x11_gc_new):
* gdk/x11/gdkdnd-x11.c (gdk_drag_context_new):
* gdk/x11/gdkcolor-x11.c (gdkx_colormap_get):
(gdk_colormap_get_system):
(gdk_colormap_new):
* gdk/gdkwindow.c (gdk_window_init):
* gtk/gtkstyle.c (gtk_style_new):
* gtk/gdk-pixbuf-loader.c (gdk_pixbuf_loader_frame_done):
* gdk/gdkpixmap.c (gdk_pixmap_init):
* gtk/gtkrc.c (gtk_rc_style_new):
use g_object_new() instead of g_type_create_instance() which
is a private function for fundamental type implementations.
Thu Jul 6 16:12:14 2000 Owen Taylor <otaylor@redhat.com>
* configure.in: Add check for db2html
......
Tue Jul 11 06:20:14 2000 Tim Janik <timj@gtk.org>
* io-gif.c (gdk_pixbuf__gif_image_load_animation):
* gdk-pixbuf-data.c (gdk_pixbuf_new_from_data):
* gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file):
use g_object_new() instead of g_type_create_instance() which
is a private function for fundamental type implementations.
Thu Jul 6 11:49:47 2000 Owen Taylor <otaylor@redhat.com>
* Makefile.am (libgdk_pixbuf_la_LDFLAGS): Use GTK+ version
......
......@@ -159,7 +159,7 @@ gdk_pixbuf_animation_new_from_file (const char *filename)
frame->delay_time = -1;
frame->action = GDK_PIXBUF_FRAME_RETAIN;
animation = GDK_PIXBUF_ANIMATION (g_type_create_instance (GDK_TYPE_PIXBUF_ANIMATION));
animation = g_object_new (GDK_TYPE_PIXBUF_ANIMATION, NULL);
animation->n_frames = 1;
animation->frames = g_list_prepend (NULL, frame);
......
......@@ -60,7 +60,7 @@ gdk_pixbuf_new_from_data (const guchar *data, GdkColorspace colorspace, gboolean
g_return_val_if_fail (width > 0, NULL);
g_return_val_if_fail (height > 0, NULL);
pixbuf = GDK_PIXBUF (g_type_create_instance (GDK_TYPE_PIXBUF));
pixbuf = g_object_new (GDK_TYPE_PIXBUF, NULL);
pixbuf->colorspace = colorspace;
pixbuf->n_channels = has_alpha ? 4 : 3;
......
......@@ -274,7 +274,7 @@ gdk_pixbuf_loader_frame_done (GdkPixbufFrame *frame,
if (priv->animation == NULL)
{
priv->animation = GDK_PIXBUF_ANIMATION (g_type_create_instance (GDK_TYPE_PIXBUF_ANIMATION));
priv->animation = g_object_new (GDK_TYPE_PIXBUF_ANIMATION, NULL);
priv->animation->n_frames = 0;
priv->animation->width = gdk_pixbuf_get_width (frame->pixbuf) + frame->x_offset;
......
......@@ -1214,7 +1214,7 @@ gdk_pixbuf__gif_image_load_animation (FILE *file)
g_return_val_if_fail (file != NULL, NULL);
context = new_context ();
context->animation = GDK_PIXBUF_ANIMATION (g_type_create_instance (GDK_TYPE_PIXBUF_ANIMATION));
context->animation = g_object_new (GDK_TYPE_PIXBUF_ANIMATION, NULL);
context->animation->n_frames = 0;
context->animation->frames = NULL;
......
......@@ -151,8 +151,7 @@ static void
gdk_pixmap_init (GdkPixmapObject *pixmap)
{
/* 0-initialization is good for all other fields. */
pixmap->impl =
GDK_DRAWABLE (g_type_create_instance (_gdk_pixmap_impl_get_type ()));
pixmap->impl = g_object_new (_gdk_pixmap_impl_get_type (), NULL);
}
static void
......
......@@ -174,8 +174,7 @@ gdk_window_init (GdkWindowObject *window)
window->window_type = GDK_WINDOW_CHILD;
window->impl =
GDK_DRAWABLE (g_type_create_instance (_gdk_window_impl_get_type ()));
window->impl = g_object_new (_gdk_window_impl_get_type (), NULL);
}
static void
......
......@@ -139,7 +139,7 @@ gdk_colormap_new (GdkVisual *visual,
g_return_val_if_fail (visual != NULL, NULL);
colormap = GDK_COLORMAP (g_type_create_instance (gdk_colormap_get_type ()));
colormap = g_object_new (gdk_colormap_get_type (), NULL);
private = GDK_COLORMAP_PRIVATE_DATA (colormap);
colormap->visual = visual;
......@@ -282,7 +282,7 @@ gdk_colormap_get_system (void)
if (!colormap)
{
colormap = GDK_COLORMAP (g_type_create_instance (gdk_colormap_get_type ()));
colormap = g_object_new (gdk_colormap_get_type (), NULL);
private = GDK_COLORMAP_PRIVATE_DATA (colormap);
private->xdisplay = gdk_display;
......@@ -1001,7 +1001,7 @@ gdkx_colormap_get (Colormap xcolormap)
if (xcolormap == DefaultColormap (gdk_display, gdk_screen))
return gdk_colormap_get_system ();
colormap = GDK_COLORMAP (g_type_create_instance (gdk_colormap_get_type ()));
colormap = g_object_new (gdk_colormap_get_type (), NULL);
private = GDK_COLORMAP_PRIVATE_DATA (colormap);
private->xdisplay = gdk_display;
......
......@@ -215,7 +215,7 @@ gdk_drag_context_finalize (GObject *object)
GdkDragContext *
gdk_drag_context_new (void)
{
return GDK_DRAG_CONTEXT (g_type_create_instance (gdk_drag_context_get_type ()));
return g_object_new (gdk_drag_context_get_type (), NULL);
}
void
......@@ -2761,6 +2761,7 @@ gdk_drag_do_leave (GdkDragContext *context, guint32 time)
break;
case GDK_DRAG_PROTO_ROOTWIN:
case GDK_DRAG_PROTO_NONE:
default:
break;
}
......@@ -2985,6 +2986,7 @@ gdk_drag_motion (GdkDragContext *context,
case GDK_DRAG_PROTO_ROOTWIN:
case GDK_DRAG_PROTO_NONE:
default:
break;
}
private->old_action = suggested_action;
......@@ -3061,6 +3063,8 @@ gdk_drag_motion (GdkDragContext *context,
case GDK_DRAG_PROTO_NONE:
g_warning ("GDK_DRAG_PROTO_NONE is not valid in gdk_drag_motion()");
break;
default:
break;
}
}
else
......@@ -3095,6 +3099,8 @@ gdk_drag_drop (GdkDragContext *context,
case GDK_DRAG_PROTO_NONE:
g_warning ("GDK_DRAG_PROTO_NONE is not valid in gdk_drag_drop()");
break;
default:
break;
}
}
}
......
......@@ -128,7 +128,7 @@ _gdk_x11_gc_new (GdkDrawable *drawable,
*/
g_return_val_if_fail (GDK_IS_DRAWABLE_IMPL_X11 (drawable), NULL);
gc = GDK_GC (g_type_create_instance (gdk_gc_x11_get_type ()));
gc = g_object_new (gdk_gc_x11_get_type (), NULL);
private = GDK_GC_X11 (gc);
private->dirty_mask = 0;
......
......@@ -147,7 +147,7 @@ gdk_image_new_bitmap(GdkVisual *visual, gpointer data, gint w, gint h)
Visual *xvisual;
GdkImage *image;
GdkImagePrivateX11 *private;
image = GDK_IMAGE (g_type_create_instance (gdk_image_get_type ()));
image = g_object_new (gdk_image_get_type (), NULL);
private = PRIVATE_DATA (image);
private->xdisplay = gdk_display;
image->type = GDK_IMAGE_NORMAL;
......@@ -227,7 +227,7 @@ gdk_image_new (GdkImageType type,
break;
default:
image = GDK_IMAGE (g_type_create_instance (gdk_image_get_type ()));
image = g_object_new (gdk_image_get_type (), NULL);
private = PRIVATE_DATA (image);
......@@ -386,7 +386,7 @@ gdk_image_get (GdkWindow *window,
if (GDK_WINDOW_DESTROYED (window))
return NULL;
image = GDK_IMAGE (g_type_create_instance (gdk_image_get_type ()));
image = g_object_new (gdk_image_get_type (), NULL);
private = PRIVATE_DATA (image);
private->xdisplay = gdk_display;
......
......@@ -163,7 +163,7 @@ gdk_pixmap_new (GdkWindow *window,
if (depth == -1)
depth = gdk_drawable_get_depth (GDK_DRAWABLE (window));
pixmap = GDK_PIXMAP (g_type_create_instance (gdk_pixmap_get_type ()));
pixmap = g_object_new (gdk_pixmap_get_type (), NULL);
draw_impl = GDK_DRAWABLE_IMPL_X11 (GDK_PIXMAP_OBJECT (pixmap)->impl);
pix_impl = GDK_PIXMAP_IMPL_X11 (GDK_PIXMAP_OBJECT (pixmap)->impl);
draw_impl->wrapper = GDK_DRAWABLE (pixmap);
......@@ -203,7 +203,7 @@ gdk_bitmap_create_from_data (GdkWindow *window,
if (GDK_WINDOW_DESTROYED (window))
return NULL;
pixmap = GDK_PIXMAP (g_type_create_instance (gdk_pixmap_get_type ()));
pixmap = g_object_new (gdk_pixmap_get_type (), NULL);
draw_impl = GDK_DRAWABLE_IMPL_X11 (GDK_PIXMAP_OBJECT (pixmap)->impl);
pix_impl = GDK_PIXMAP_IMPL_X11 (GDK_PIXMAP_OBJECT (pixmap)->impl);
draw_impl->wrapper = GDK_DRAWABLE (pixmap);
......@@ -252,7 +252,7 @@ gdk_pixmap_create_from_data (GdkWindow *window,
if (depth == -1)
depth = gdk_drawable_get_visual (window)->depth;
pixmap = GDK_PIXMAP (g_type_create_instance (gdk_pixmap_get_type ()));
pixmap = g_object_new (gdk_pixmap_get_type (), NULL);
draw_impl = GDK_DRAWABLE_IMPL_X11 (GDK_PIXMAP_OBJECT (pixmap)->impl);
pix_impl = GDK_PIXMAP_IMPL_X11 (GDK_PIXMAP_OBJECT (pixmap)->impl);
draw_impl->wrapper = GDK_DRAWABLE (pixmap);
......@@ -297,7 +297,7 @@ gdk_pixmap_foreign_new (GdkNativeWindow anid)
&x_ret, &y_ret, &w_ret, &h_ret, &bw_ret, &depth_ret))
return NULL;
pixmap = GDK_PIXMAP (g_type_create_instance (gdk_pixmap_get_type ()));
pixmap = g_object_new (gdk_pixmap_get_type (), NULL);
draw_impl = GDK_DRAWABLE_IMPL_X11 (GDK_PIXMAP_OBJECT (pixmap)->impl);
pix_impl = GDK_PIXMAP_IMPL_X11 (GDK_PIXMAP_OBJECT (pixmap)->impl);
draw_impl->wrapper = GDK_DRAWABLE (pixmap);
......
......@@ -253,7 +253,7 @@ _gdk_windowing_window_init (void)
&x, &y, &width, &height, &border_width, &depth);
XGetWindowAttributes (gdk_display, gdk_root_window, &xattributes);
gdk_parent_root = GDK_WINDOW (g_type_create_instance (GDK_TYPE_WINDOW));
gdk_parent_root = g_object_new (GDK_TYPE_WINDOW, NULL);
private = (GdkWindowObject *)gdk_parent_root;
impl = GDK_WINDOW_IMPL_X11 (private->impl);
draw_impl = GDK_DRAWABLE_IMPL_X11 (private->impl);
......@@ -311,7 +311,7 @@ gdk_window_new (GdkWindow *parent,
xparent = GDK_WINDOW_XID (parent);
window = GDK_WINDOW (g_type_create_instance (GDK_TYPE_WINDOW));
window = g_object_new (GDK_TYPE_WINDOW, NULL);
private = (GdkWindowObject *)window;
impl = GDK_WINDOW_IMPL_X11 (private->impl);
draw_impl = GDK_DRAWABLE_IMPL_X11 (private->impl);
......@@ -591,7 +591,7 @@ gdk_window_foreign_new (GdkNativeWindow anid)
if (children)
XFree (children);
window = GDK_WINDOW (g_type_create_instance (GDK_TYPE_WINDOW));
window = g_object_new (GDK_TYPE_WINDOW, NULL);
private = (GdkWindowObject *)window;
impl = GDK_WINDOW_IMPL_X11 (private->impl);
draw_impl = GDK_DRAWABLE_IMPL_X11 (private->impl);
......
......@@ -274,7 +274,7 @@ gdk_pixbuf_loader_frame_done (GdkPixbufFrame *frame,
if (priv->animation == NULL)
{
priv->animation = GDK_PIXBUF_ANIMATION (g_type_create_instance (GDK_TYPE_PIXBUF_ANIMATION));
priv->animation = g_object_new (GDK_TYPE_PIXBUF_ANIMATION, NULL);
priv->animation->n_frames = 0;
priv->animation->width = gdk_pixbuf_get_width (frame->pixbuf) + frame->x_offset;
......
......@@ -100,14 +100,18 @@ static void gtk_rc_parse_any (const gchar *input_nam
const gchar *input_string);
static guint gtk_rc_parse_statement (GScanner *scanner);
static guint gtk_rc_parse_style (GScanner *scanner);
static guint gtk_rc_parse_base (GScanner *scanner,
GtkRcStyle *style);
static guint gtk_rc_parse_bg (GScanner *scanner,
GtkRcStyle *style);
static guint gtk_rc_parse_fg (GScanner *scanner,
GtkRcStyle *style);
static guint gtk_rc_parse_text (GScanner *scanner,
GtkRcStyle *style);
static guint gtk_rc_parse_base (GScanner *scanner,
GtkRcStyle *style);
static guint gtk_rc_parse_xthickness (GScanner *scanner,
GtkRcStyle *style);
static guint gtk_rc_parse_ythickness (GScanner *scanner,
GtkRcStyle *style);
static guint gtk_rc_parse_bg_pixmap (GScanner *scanner,
GtkRcStyle *rc_style);
static guint gtk_rc_parse_font (GScanner *scanner,
......@@ -191,8 +195,10 @@ static const struct
{ "INSENSITIVE", GTK_RC_TOKEN_INSENSITIVE },
{ "fg", GTK_RC_TOKEN_FG },
{ "bg", GTK_RC_TOKEN_BG },
{ "base", GTK_RC_TOKEN_BASE },
{ "text", GTK_RC_TOKEN_TEXT },
{ "base", GTK_RC_TOKEN_BASE },
{ "xthickness", GTK_RC_TOKEN_XTHICKNESS },
{ "ythickness", GTK_RC_TOKEN_YTHICKNESS },
{ "font", GTK_RC_TOKEN_FONT },
{ "fontset", GTK_RC_TOKEN_FONTSET },
{ "font_name", GTK_RC_TOKEN_FONT_NAME },
......@@ -751,7 +757,25 @@ gtk_rc_style_get_type (void)
static void
gtk_rc_style_init (GtkRcStyle *style)
{
guint i;
style->name = NULL;
for (i = 0; i < 5; i++)
{
static const GdkColor init_color = { 0, 0, 0, 0, };
style->bg_pixmap_name[i] = NULL;
style->color_flags[i] = 0;
style->fg[i] = init_color;
style->bg[i] = init_color;
style->text[i] = init_color;
style->base[i] = init_color;
}
style->xthickness = -1;
style->ythickness = -1;
style->engine = NULL;
style->engine_data = NULL;
style->rc_style_lists = NULL;
}
static void
......@@ -864,11 +888,11 @@ gtk_rc_style_finalize (GObject *object)
}
GtkRcStyle *
gtk_rc_style_new (void)
gtk_rc_style_new (void)
{
GtkRcStyle *style;
style = GTK_RC_STYLE (g_type_create_instance (gtk_rc_style_get_type ()));
style = g_object_new (GTK_TYPE_RC_STYLE, NULL);
return style;
}
......@@ -1314,6 +1338,11 @@ gtk_rc_style_to_style (GtkRcStyle *rc_style)
style->base[i] = rc_style->base[i];
}
if (rc_style->xthickness >= 0)
style->xthickness = rc_style->xthickness;
if (rc_style->ythickness >= 0)
style->ythickness = rc_style->ythickness;
if (rc_style->engine)
{
style->engine = rc_style->engine;
......@@ -1328,29 +1357,28 @@ gtk_rc_style_to_style (GtkRcStyle *rc_style)
static GtkStyle *
gtk_rc_init_style (GSList *rc_styles)
{
gint i;
GtkStyle *style = NULL;
gint i;
if (!realized_style_ht)
realized_style_ht = g_hash_table_new ((GHashFunc)gtk_rc_styles_hash,
(GCompareFunc)gtk_rc_styles_compare);
realized_style_ht = g_hash_table_new ((GHashFunc) gtk_rc_styles_hash,
(GCompareFunc) gtk_rc_styles_compare);
style = g_hash_table_lookup (realized_style_ht, rc_styles);
if (!style)
{
GtkRcStyle *proto_style;
GSList *tmp_styles;
GSList *tmp_style;
proto_style = gtk_rc_style_new ();
tmp_styles = rc_styles;
while (tmp_styles)
tmp_style = rc_styles;
while (tmp_style)
{
GtkRcStyle *rc_style = tmp_styles->data;
GtkRcStyle *rc_style = tmp_style->data;
for (i=0; i<5; i++)
for (i = 0; i < 5; i++)
{
if (!proto_style->bg_pixmap_name[i] && rc_style->bg_pixmap_name[i])
proto_style->bg_pixmap_name[i] = g_strdup (rc_style->bg_pixmap_name[i]);
......@@ -1381,6 +1409,11 @@ gtk_rc_init_style (GSList *rc_styles)
}
}
if (proto_style->xthickness < 0 && rc_style->xthickness >= 0)
proto_style->xthickness = rc_style->xthickness;
if (proto_style->ythickness < 0 && rc_style->ythickness >= 0)
proto_style->ythickness = rc_style->ythickness;
if (!proto_style->font_desc && rc_style->font_desc)
proto_style->font_desc = pango_font_description_copy (rc_style->font_desc);
......@@ -1399,10 +1432,10 @@ gtk_rc_init_style (GSList *rc_styles)
if (!g_slist_find (rc_style->rc_style_lists, rc_styles))
rc_style->rc_style_lists = g_slist_prepend (rc_style->rc_style_lists, rc_styles);
tmp_styles = tmp_styles->next;
tmp_style = tmp_style->next;
}
for (i=0; i<5; i++)
for (i = 0; i < 5; i++)
if (proto_style->bg_pixmap_name[i] &&
(strcmp (proto_style->bg_pixmap_name[i], "<none>") == 0))
{
......@@ -1533,6 +1566,9 @@ gtk_rc_parse_style (GScanner *scanner)
rc_style->text[i] = parent_style->text[i];
rc_style->base[i] = parent_style->base[i];
}
rc_style->xthickness = parent_style->xthickness;
rc_style->ythickness = parent_style->ythickness;
if (parent_style->font_desc)
{
......@@ -1564,9 +1600,6 @@ gtk_rc_parse_style (GScanner *scanner)
{
switch (token)
{
case GTK_RC_TOKEN_BASE:
token = gtk_rc_parse_base (scanner, rc_style);
break;
case GTK_RC_TOKEN_BG:
token = gtk_rc_parse_bg (scanner, rc_style);
break;
......@@ -1576,6 +1609,15 @@ gtk_rc_parse_style (GScanner *scanner)
case GTK_RC_TOKEN_TEXT:
token = gtk_rc_parse_text (scanner, rc_style);
break;
case GTK_RC_TOKEN_BASE:
token = gtk_rc_parse_base (scanner, rc_style);
break;
case GTK_RC_TOKEN_XTHICKNESS:
token = gtk_rc_parse_xthickness (scanner, rc_style);
break;
case GTK_RC_TOKEN_YTHICKNESS:
token = gtk_rc_parse_ythickness (scanner, rc_style);
break;
case GTK_RC_TOKEN_BG_PIXMAP:
token = gtk_rc_parse_bg_pixmap (scanner, rc_style);
break;
......@@ -1643,29 +1685,6 @@ gtk_rc_parse_style (GScanner *scanner)
return G_TOKEN_NONE;
}
static guint
gtk_rc_parse_base (GScanner *scanner,
GtkRcStyle *style)
{
GtkStateType state;
guint token;
token = g_scanner_get_next_token (scanner);
if (token != GTK_RC_TOKEN_BASE)
return GTK_RC_TOKEN_BASE;
token = gtk_rc_parse_state (scanner, &state);
if (token != G_TOKEN_NONE)
return token;
token = g_scanner_get_next_token (scanner);
if (token != G_TOKEN_EQUAL_SIGN)
return G_TOKEN_EQUAL_SIGN;
style->color_flags[state] |= GTK_RC_BASE;
return gtk_rc_parse_color (scanner, &style->base[state]);
}
static guint
gtk_rc_parse_bg (GScanner *scanner,
GtkRcStyle *style)
......@@ -1735,6 +1754,65 @@ gtk_rc_parse_text (GScanner *scanner,
return gtk_rc_parse_color (scanner, &style->text[state]);
}
static guint
gtk_rc_parse_base (GScanner *scanner,
GtkRcStyle *style)
{
GtkStateType state;
guint token;
token = g_scanner_get_next_token (scanner);
if (token != GTK_RC_TOKEN_BASE)
return GTK_RC_TOKEN_BASE;