2003-08-26 Alp Toker <alp@atoker.com>
* glue/style.c: glue and corresponding .custom entries for BaseGC, plus the ability to set GCs svn path=/trunk/gtk-sharp/; revision=17605
This commit is contained in:
parent
4fc7596db5
commit
e91763b734
|
@ -1,3 +1,8 @@
|
||||||
|
2003-08-26 Alp Toker <alp@atoker.com>
|
||||||
|
|
||||||
|
* glue/style.c: glue and corresponding .custom entries for
|
||||||
|
BaseGC, plus the ability to set GCs
|
||||||
|
|
||||||
2003-08-21 Martin Willemoes Hansen <mwh@sysrq.dk>
|
2003-08-21 Martin Willemoes Hansen <mwh@sysrq.dk>
|
||||||
|
|
||||||
* gnomeprint:
|
* gnomeprint:
|
||||||
|
|
36
glue/style.c
36
glue/style.c
|
@ -17,6 +17,14 @@ GdkGC *gtksharp_gtk_style_get_fg_gc (GtkStyle *style, int i);
|
||||||
|
|
||||||
GdkGC *gtksharp_gtk_style_get_bg_gc (GtkStyle *style, int i);
|
GdkGC *gtksharp_gtk_style_get_bg_gc (GtkStyle *style, int i);
|
||||||
|
|
||||||
|
GdkGC *gtksharp_gtk_style_get_base_gc (GtkStyle *style, int i);
|
||||||
|
|
||||||
|
void gtksharp_gtk_style_set_fg_gc (GtkStyle *style, int i, GdkGC *gc);
|
||||||
|
|
||||||
|
void gtksharp_gtk_style_set_bg_gc (GtkStyle *style, int i, GdkGC *gc);
|
||||||
|
|
||||||
|
void gtksharp_gtk_style_set_base_gc (GtkStyle *style, int i, GdkGC *gc);
|
||||||
|
|
||||||
GdkColor *gtksharp_gtk_style_get_white (GtkStyle *style);
|
GdkColor *gtksharp_gtk_style_get_white (GtkStyle *style);
|
||||||
|
|
||||||
GdkColor *gtksharp_gtk_style_get_black (GtkStyle *style);
|
GdkColor *gtksharp_gtk_style_get_black (GtkStyle *style);
|
||||||
|
@ -62,6 +70,34 @@ gtksharp_gtk_style_get_bg_gc (GtkStyle *style, int i)
|
||||||
return style->bg_gc[i];
|
return style->bg_gc[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GdkGC*
|
||||||
|
gtksharp_gtk_style_get_base_gc (GtkStyle *style, int i)
|
||||||
|
{
|
||||||
|
g_object_ref (G_OBJECT (style->base_gc[i]));
|
||||||
|
return style->base_gc[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gtksharp_gtk_style_set_fg_gc (GtkStyle *style, int i, GdkGC *gc)
|
||||||
|
{
|
||||||
|
g_object_ref (G_OBJECT (gc));
|
||||||
|
style->fg_gc[i] = gc;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gtksharp_gtk_style_set_bg_gc (GtkStyle *style, int i, GdkGC *gc)
|
||||||
|
{
|
||||||
|
g_object_ref (G_OBJECT (gc));
|
||||||
|
style->bg_gc[i] = gc;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gtksharp_gtk_style_set_base_gc (GtkStyle *style, int i, GdkGC *gc)
|
||||||
|
{
|
||||||
|
g_object_ref (G_OBJECT (gc));
|
||||||
|
style->base_gc[i] = gc;
|
||||||
|
}
|
||||||
|
|
||||||
GdkColor*
|
GdkColor*
|
||||||
gtksharp_gtk_style_get_white (GtkStyle *style)
|
gtksharp_gtk_style_get_white (GtkStyle *style)
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,6 +41,14 @@ public Gdk.GC ForegroundGC (StateType state)
|
||||||
return EnsureGC (raw);
|
return EnsureGC (raw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DllImport("gtksharpglue")]
|
||||||
|
static extern IntPtr gtksharp_gtk_style_set_fg_gc (IntPtr style, int i, IntPtr gc);
|
||||||
|
|
||||||
|
public void SetForegroundGC (StateType state, Gdk.GC gc)
|
||||||
|
{
|
||||||
|
gtksharp_gtk_style_set_fg_gc (Handle, (int) state, gc.Handle);
|
||||||
|
}
|
||||||
|
|
||||||
public Gdk.GC[] ForegroundGCs {
|
public Gdk.GC[] ForegroundGCs {
|
||||||
get {
|
get {
|
||||||
IntPtr[] raws = new IntPtr[6];
|
IntPtr[] raws = new IntPtr[6];
|
||||||
|
@ -61,6 +69,14 @@ public Gdk.GC BackgroundGC (StateType state)
|
||||||
return EnsureGC (raw);
|
return EnsureGC (raw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DllImport("gtksharpglue")]
|
||||||
|
static extern IntPtr gtksharp_gtk_style_set_bg_gc (IntPtr style, int i, IntPtr gc);
|
||||||
|
|
||||||
|
public void SetBackgroundGC (StateType state, Gdk.GC gc)
|
||||||
|
{
|
||||||
|
gtksharp_gtk_style_set_bg_gc (Handle, (int) state, gc.Handle);
|
||||||
|
}
|
||||||
|
|
||||||
public Gdk.GC[] BackgroundGCs {
|
public Gdk.GC[] BackgroundGCs {
|
||||||
get {
|
get {
|
||||||
IntPtr[] raws = new IntPtr[6];
|
IntPtr[] raws = new IntPtr[6];
|
||||||
|
@ -72,6 +88,23 @@ public Gdk.GC[] BackgroundGCs {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DllImport("gtksharpglue")]
|
||||||
|
static extern IntPtr gtksharp_gtk_style_get_base_gc (IntPtr style, int i);
|
||||||
|
|
||||||
|
public Gdk.GC BaseGC (StateType state)
|
||||||
|
{
|
||||||
|
IntPtr raw = gtksharp_gtk_style_get_base_gc (Handle, (int) state);
|
||||||
|
return EnsureGC (raw);
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport("gtksharpglue")]
|
||||||
|
static extern IntPtr gtksharp_gtk_style_set_base_gc (IntPtr style, int i, IntPtr gc);
|
||||||
|
|
||||||
|
public void SetBaseGC (StateType state, Gdk.GC gc)
|
||||||
|
{
|
||||||
|
gtksharp_gtk_style_set_base_gc (Handle, (int) state, gc.Handle);
|
||||||
|
}
|
||||||
|
|
||||||
[DllImport("gtksharpglue")]
|
[DllImport("gtksharpglue")]
|
||||||
static extern IntPtr gtksharp_gtk_style_get_white (IntPtr style);
|
static extern IntPtr gtksharp_gtk_style_get_white (IntPtr style);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue