GtkSharp/glue/style.c
Rachel Hestilow 32ae593a0e 2002-09-11 Rachel Hestilow <hestilow@ximian.com>
* glib/Object.cs (Ref): Added.

	* gtk/Object.custom (Ref): Overload. Note that we were reffed.
	(DisposeNative): Unref if we were explicitly reffed.

	* generator/Method.cs: Call Ref if needs_ret is set.
	* generator/StructBase.cs: Call Ref on all object accessors.

	* glue/style.c: Ref returned GCs.

	* sources/Gtk.metadata: Set needs_ret on various gdk-related
	accessors in GtkWidget. Hide Ref/Unref methods on Widget and
	RcStyle as these ought to be deprecated anyway.

svn path=/trunk/gtk-sharp/; revision=7380
2002-09-12 05:21:16 +00:00

63 lines
1 KiB
C

/* style.c : Glue to access fields in GtkStyle.
*
* Author: Rachel Hestilow <hestilow@ximian.com>
*
* <c> 2002 Rachel Hestilow, Mike Kestner
*/
#include <gtk/gtkstyle.h>
/* FIXME: include all fields */
GdkGC*
gtksharp_gtk_style_get_white_gc (GtkStyle *style)
{
g_object_ref (G_OBJECT (style->white_gc));
return style->white_gc;
}
GdkGC*
gtksharp_gtk_style_get_black_gc (GtkStyle *style)
{
g_object_ref (G_OBJECT (style->black_gc));
return style->black_gc;
}
GdkGC**
gtksharp_gtk_style_get_fg_gc (GtkStyle *style)
{
g_object_ref (G_OBJECT (style->fg_gc));
return style->fg_gc;
}
GdkGC**
gtksharp_gtk_style_get_bg_gc (GtkStyle *style)
{
g_object_ref (G_OBJECT (style->bg_gc));
return style->bg_gc;
}
GdkColor*
gtksharp_gtk_style_get_white (GtkStyle *style)
{
return &style->white;
}
GdkColor*
gtksharp_gtk_style_get_black (GtkStyle *style)
{
return &style->black;
}
GdkColor*
gtksharp_gtk_style_get_fg (GtkStyle *style)
{
return style->fg;
}
GdkColor**
gtksharp_gtk_style_get_bg (GtkStyle *style)
{
return style->bg;
}