2002-08-03 22:24:37 +00:00
|
|
|
//
|
|
|
|
// Gtk.Style.custom - Gtk Style class customizations
|
|
|
|
//
|
2003-02-08 17:33:17 +00:00
|
|
|
// Authors: Rachel Hestilow <hestilow@ximian.com>
|
|
|
|
// Radek Doulik <rodo@matfyz.cz>
|
2002-08-03 22:24:37 +00:00
|
|
|
//
|
2003-02-08 17:33:17 +00:00
|
|
|
// Copyright (C) 2002, 2003 Rachel Hestilow, Radek Doulik
|
2002-08-03 22:24:37 +00:00
|
|
|
//
|
|
|
|
// This code is inserted after the automatically generated code.
|
|
|
|
//
|
2004-06-25 18:42:19 +00:00
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of version 2 of the Lesser GNU General
|
|
|
|
// Public License as published by the Free Software Foundation.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
// Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
// License along with this program; if not, write to the
|
|
|
|
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
// Boston, MA 02111-1307, USA.
|
|
|
|
|
2002-08-03 22:24:37 +00:00
|
|
|
|
|
|
|
static Gdk.GC EnsureGC (IntPtr raw) {
|
|
|
|
if (raw == IntPtr.Zero)
|
|
|
|
return null;
|
2003-07-23 17:19:21 +00:00
|
|
|
Gdk.GC ret = (Gdk.GC) GLib.Object.GetObject (raw, false);
|
2002-08-03 22:24:37 +00:00
|
|
|
if (ret == null)
|
|
|
|
ret = new Gdk.GC (raw);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
2002-08-03 22:24:37 +00:00
|
|
|
static extern IntPtr gtksharp_gtk_style_get_white_gc (IntPtr style);
|
|
|
|
|
|
|
|
public Gdk.GC WhiteGC {
|
|
|
|
get { return EnsureGC (gtksharp_gtk_style_get_white_gc (Handle)); }
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
2002-08-03 22:24:37 +00:00
|
|
|
static extern IntPtr gtksharp_gtk_style_get_black_gc (IntPtr style);
|
|
|
|
|
|
|
|
public Gdk.GC BlackGC {
|
|
|
|
get { return EnsureGC (gtksharp_gtk_style_get_black_gc (Handle)); }
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
2002-10-08 07:48:43 +00:00
|
|
|
static extern IntPtr gtksharp_gtk_style_get_fg_gc (IntPtr style, int i);
|
2002-08-03 22:24:37 +00:00
|
|
|
|
2002-10-08 07:48:43 +00:00
|
|
|
public Gdk.GC ForegroundGC (StateType state)
|
|
|
|
{
|
|
|
|
IntPtr raw = gtksharp_gtk_style_get_fg_gc (Handle, (int) state);
|
|
|
|
return EnsureGC (raw);
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
2003-08-26 00:48:00 +00:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2002-10-08 07:48:43 +00:00
|
|
|
public Gdk.GC[] ForegroundGCs {
|
2002-08-03 22:24:37 +00:00
|
|
|
get {
|
2002-10-08 07:48:43 +00:00
|
|
|
IntPtr[] raws = new IntPtr[6];
|
2002-08-03 22:24:37 +00:00
|
|
|
Gdk.GC[] ret = new Gdk.GC[raws.Length];
|
2002-10-08 07:48:43 +00:00
|
|
|
for (int i = 0; i < 6; i++) {
|
|
|
|
ret[i] = EnsureGC (gtksharp_gtk_style_get_fg_gc (Handle, i));
|
2002-08-03 22:24:37 +00:00
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
2002-10-08 07:48:43 +00:00
|
|
|
static extern IntPtr gtksharp_gtk_style_get_bg_gc (IntPtr style, int i);
|
|
|
|
|
|
|
|
public Gdk.GC BackgroundGC (StateType state)
|
|
|
|
{
|
2003-08-26 00:48:00 +00:00
|
|
|
IntPtr raw = gtksharp_gtk_style_get_bg_gc (Handle, (int) state);
|
|
|
|
return EnsureGC (raw);
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
2003-08-26 00:48:00 +00:00
|
|
|
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);
|
2002-10-08 07:48:43 +00:00
|
|
|
}
|
2002-08-03 22:24:37 +00:00
|
|
|
|
2002-10-08 07:48:43 +00:00
|
|
|
public Gdk.GC[] BackgroundGCs {
|
2002-08-03 22:24:37 +00:00
|
|
|
get {
|
2002-10-08 07:48:43 +00:00
|
|
|
IntPtr[] raws = new IntPtr[6];
|
2002-08-03 22:24:37 +00:00
|
|
|
Gdk.GC[] ret = new Gdk.GC[raws.Length];
|
2002-10-08 07:48:43 +00:00
|
|
|
for (int i = 0; i < 6; i++) {
|
|
|
|
ret[i] = EnsureGC (gtksharp_gtk_style_get_bg_gc (Handle, i));
|
2002-08-03 22:24:37 +00:00
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
2003-08-26 00:48:00 +00:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
2003-08-26 00:48:00 +00:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
2003-08-28 00:19:39 +00:00
|
|
|
static extern IntPtr gtksharp_gtk_style_get_text_gc (IntPtr style, int i);
|
|
|
|
|
|
|
|
public Gdk.GC TextGC (StateType state)
|
|
|
|
{
|
|
|
|
IntPtr raw = gtksharp_gtk_style_get_text_gc (Handle, (int) state);
|
|
|
|
return EnsureGC (raw);
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
2003-08-28 00:19:39 +00:00
|
|
|
static extern IntPtr gtksharp_gtk_style_set_text_gc (IntPtr style, int i, IntPtr gc);
|
|
|
|
|
|
|
|
public void SetTextGC (StateType state, Gdk.GC gc)
|
|
|
|
{
|
|
|
|
gtksharp_gtk_style_set_text_gc (Handle, (int) state, gc.Handle);
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
* gdk/Gdk.metadata: Remap all "out Gdk.Bitmap" params to be
Gdk.Pixmaps instead, because the former will crash. Also fix the
"data" param to Pixmap.CreateFromXpmD and
Pixmap.ColormapCreateFromXpmD
* gtk/Style.custom (TextAAGC, SetTextAAGC, LightGC, SetLightGC,
DarkGC, SetDarkGC, MidGC, SetMidGC): add these to go along with
BaseGC, SetBaseGC, etc.
* gtk/glue/style.c: add the glue methods needed for the above
svn path=/trunk/gtk-sharp/; revision=35409
2004-10-28 19:25:50 +00:00
|
|
|
static extern IntPtr gtksharp_gtk_style_get_text_aa_gc (IntPtr style, int i);
|
|
|
|
|
|
|
|
public Gdk.GC TextAAGC (StateType state)
|
|
|
|
{
|
|
|
|
IntPtr raw = gtksharp_gtk_style_get_text_aa_gc (Handle, (int) state);
|
|
|
|
return EnsureGC (raw);
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
* gdk/Gdk.metadata: Remap all "out Gdk.Bitmap" params to be
Gdk.Pixmaps instead, because the former will crash. Also fix the
"data" param to Pixmap.CreateFromXpmD and
Pixmap.ColormapCreateFromXpmD
* gtk/Style.custom (TextAAGC, SetTextAAGC, LightGC, SetLightGC,
DarkGC, SetDarkGC, MidGC, SetMidGC): add these to go along with
BaseGC, SetBaseGC, etc.
* gtk/glue/style.c: add the glue methods needed for the above
svn path=/trunk/gtk-sharp/; revision=35409
2004-10-28 19:25:50 +00:00
|
|
|
static extern IntPtr gtksharp_gtk_style_set_text_aa_gc (IntPtr style, int i, IntPtr gc);
|
|
|
|
|
|
|
|
public void SetTextAAGC (StateType state, Gdk.GC gc)
|
|
|
|
{
|
|
|
|
gtksharp_gtk_style_set_text_aa_gc (Handle, (int) state, gc.Handle);
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
* gdk/Gdk.metadata: Remap all "out Gdk.Bitmap" params to be
Gdk.Pixmaps instead, because the former will crash. Also fix the
"data" param to Pixmap.CreateFromXpmD and
Pixmap.ColormapCreateFromXpmD
* gtk/Style.custom (TextAAGC, SetTextAAGC, LightGC, SetLightGC,
DarkGC, SetDarkGC, MidGC, SetMidGC): add these to go along with
BaseGC, SetBaseGC, etc.
* gtk/glue/style.c: add the glue methods needed for the above
svn path=/trunk/gtk-sharp/; revision=35409
2004-10-28 19:25:50 +00:00
|
|
|
static extern IntPtr gtksharp_gtk_style_get_light_gc (IntPtr style, int i);
|
|
|
|
|
|
|
|
public Gdk.GC LightGC (StateType state)
|
|
|
|
{
|
|
|
|
IntPtr raw = gtksharp_gtk_style_get_light_gc (Handle, (int) state);
|
|
|
|
return EnsureGC (raw);
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
* gdk/Gdk.metadata: Remap all "out Gdk.Bitmap" params to be
Gdk.Pixmaps instead, because the former will crash. Also fix the
"data" param to Pixmap.CreateFromXpmD and
Pixmap.ColormapCreateFromXpmD
* gtk/Style.custom (TextAAGC, SetTextAAGC, LightGC, SetLightGC,
DarkGC, SetDarkGC, MidGC, SetMidGC): add these to go along with
BaseGC, SetBaseGC, etc.
* gtk/glue/style.c: add the glue methods needed for the above
svn path=/trunk/gtk-sharp/; revision=35409
2004-10-28 19:25:50 +00:00
|
|
|
static extern IntPtr gtksharp_gtk_style_set_light_gc (IntPtr style, int i, IntPtr gc);
|
|
|
|
|
|
|
|
public void SetLightGC (StateType state, Gdk.GC gc)
|
|
|
|
{
|
|
|
|
gtksharp_gtk_style_set_light_gc (Handle, (int) state, gc.Handle);
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
* gdk/Gdk.metadata: Remap all "out Gdk.Bitmap" params to be
Gdk.Pixmaps instead, because the former will crash. Also fix the
"data" param to Pixmap.CreateFromXpmD and
Pixmap.ColormapCreateFromXpmD
* gtk/Style.custom (TextAAGC, SetTextAAGC, LightGC, SetLightGC,
DarkGC, SetDarkGC, MidGC, SetMidGC): add these to go along with
BaseGC, SetBaseGC, etc.
* gtk/glue/style.c: add the glue methods needed for the above
svn path=/trunk/gtk-sharp/; revision=35409
2004-10-28 19:25:50 +00:00
|
|
|
static extern IntPtr gtksharp_gtk_style_get_dark_gc (IntPtr style, int i);
|
|
|
|
|
|
|
|
public Gdk.GC DarkGC (StateType state)
|
|
|
|
{
|
|
|
|
IntPtr raw = gtksharp_gtk_style_get_dark_gc (Handle, (int) state);
|
|
|
|
return EnsureGC (raw);
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
* gdk/Gdk.metadata: Remap all "out Gdk.Bitmap" params to be
Gdk.Pixmaps instead, because the former will crash. Also fix the
"data" param to Pixmap.CreateFromXpmD and
Pixmap.ColormapCreateFromXpmD
* gtk/Style.custom (TextAAGC, SetTextAAGC, LightGC, SetLightGC,
DarkGC, SetDarkGC, MidGC, SetMidGC): add these to go along with
BaseGC, SetBaseGC, etc.
* gtk/glue/style.c: add the glue methods needed for the above
svn path=/trunk/gtk-sharp/; revision=35409
2004-10-28 19:25:50 +00:00
|
|
|
static extern IntPtr gtksharp_gtk_style_set_dark_gc (IntPtr style, int i, IntPtr gc);
|
|
|
|
|
|
|
|
public void SetDarkGC (StateType state, Gdk.GC gc)
|
|
|
|
{
|
|
|
|
gtksharp_gtk_style_set_dark_gc (Handle, (int) state, gc.Handle);
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
* gdk/Gdk.metadata: Remap all "out Gdk.Bitmap" params to be
Gdk.Pixmaps instead, because the former will crash. Also fix the
"data" param to Pixmap.CreateFromXpmD and
Pixmap.ColormapCreateFromXpmD
* gtk/Style.custom (TextAAGC, SetTextAAGC, LightGC, SetLightGC,
DarkGC, SetDarkGC, MidGC, SetMidGC): add these to go along with
BaseGC, SetBaseGC, etc.
* gtk/glue/style.c: add the glue methods needed for the above
svn path=/trunk/gtk-sharp/; revision=35409
2004-10-28 19:25:50 +00:00
|
|
|
static extern IntPtr gtksharp_gtk_style_get_mid_gc (IntPtr style, int i);
|
|
|
|
|
|
|
|
public Gdk.GC MidGC (StateType state)
|
|
|
|
{
|
|
|
|
IntPtr raw = gtksharp_gtk_style_get_mid_gc (Handle, (int) state);
|
|
|
|
return EnsureGC (raw);
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
* gdk/Gdk.metadata: Remap all "out Gdk.Bitmap" params to be
Gdk.Pixmaps instead, because the former will crash. Also fix the
"data" param to Pixmap.CreateFromXpmD and
Pixmap.ColormapCreateFromXpmD
* gtk/Style.custom (TextAAGC, SetTextAAGC, LightGC, SetLightGC,
DarkGC, SetDarkGC, MidGC, SetMidGC): add these to go along with
BaseGC, SetBaseGC, etc.
* gtk/glue/style.c: add the glue methods needed for the above
svn path=/trunk/gtk-sharp/; revision=35409
2004-10-28 19:25:50 +00:00
|
|
|
static extern IntPtr gtksharp_gtk_style_set_mid_gc (IntPtr style, int i, IntPtr gc);
|
|
|
|
|
|
|
|
public void SetMidGC (StateType state, Gdk.GC gc)
|
|
|
|
{
|
|
|
|
gtksharp_gtk_style_set_mid_gc (Handle, (int) state, gc.Handle);
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
2002-08-03 22:24:37 +00:00
|
|
|
static extern IntPtr gtksharp_gtk_style_get_white (IntPtr style);
|
|
|
|
|
|
|
|
public Gdk.Color White {
|
|
|
|
get { return Gdk.Color.New (gtksharp_gtk_style_get_white (Handle)); }
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
2002-08-03 22:24:37 +00:00
|
|
|
static extern IntPtr gtksharp_gtk_style_get_black (IntPtr style);
|
|
|
|
|
|
|
|
public Gdk.Color Black {
|
|
|
|
get { return Gdk.Color.New (gtksharp_gtk_style_get_black (Handle)); }
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
2002-10-08 07:48:43 +00:00
|
|
|
static extern IntPtr gtksharp_gtk_style_get_bg (IntPtr style, int i);
|
|
|
|
|
|
|
|
public Gdk.Color Background (StateType state)
|
|
|
|
{
|
|
|
|
IntPtr raw = gtksharp_gtk_style_get_bg (Handle, (int) state);
|
|
|
|
return Gdk.Color.New (raw);
|
|
|
|
}
|
|
|
|
|
|
|
|
public Gdk.Color[] Backgrounds {
|
2002-08-03 22:24:37 +00:00
|
|
|
get {
|
2002-10-08 07:48:43 +00:00
|
|
|
IntPtr[] raws = new IntPtr[6];
|
|
|
|
Gdk.Color[] ret = new Gdk.Color[raws.Length];
|
|
|
|
for (int i = 0; i < 6; i++) {
|
|
|
|
ret[i] = Gdk.Color.New (gtksharp_gtk_style_get_bg (Handle, i));
|
|
|
|
}
|
|
|
|
return ret;
|
2002-08-03 22:24:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
2002-10-08 07:48:43 +00:00
|
|
|
static extern IntPtr gtksharp_gtk_style_get_fg (IntPtr style, int i);
|
|
|
|
|
|
|
|
public Gdk.Color Foreground (StateType state)
|
|
|
|
{
|
|
|
|
IntPtr raw = gtksharp_gtk_style_get_fg (Handle, (int) state);
|
|
|
|
return Gdk.Color.New (raw);
|
|
|
|
}
|
|
|
|
|
|
|
|
public Gdk.Color[] Foregrounds {
|
2002-08-03 22:24:37 +00:00
|
|
|
get {
|
2002-10-08 07:48:43 +00:00
|
|
|
IntPtr[] raws = new IntPtr[6];
|
|
|
|
Gdk.Color[] ret = new Gdk.Color[raws.Length];
|
|
|
|
for (int i = 0; i < 6; i++) {
|
|
|
|
ret[i] = Gdk.Color.New (gtksharp_gtk_style_get_fg (Handle, i));
|
|
|
|
}
|
|
|
|
return ret;
|
2002-08-03 22:24:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
2004-04-01 22:19:51 +00:00
|
|
|
static extern IntPtr gtksharp_gtk_style_get_text (IntPtr style, int i);
|
|
|
|
|
|
|
|
public Gdk.Color Text (StateType state)
|
|
|
|
{
|
|
|
|
IntPtr raw = gtksharp_gtk_style_get_text (Handle, (int) state);
|
|
|
|
return Gdk.Color.New (raw);
|
|
|
|
}
|
|
|
|
|
|
|
|
public Gdk.Color[] TextColors {
|
|
|
|
get {
|
|
|
|
IntPtr[] raws = new IntPtr[6];
|
|
|
|
Gdk.Color[] ret = new Gdk.Color[raws.Length];
|
|
|
|
for (int i = 0; i < 6; i++) {
|
|
|
|
ret[i] = Gdk.Color.New (gtksharp_gtk_style_get_text (Handle, i));
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
2004-04-01 22:19:51 +00:00
|
|
|
static extern IntPtr gtksharp_gtk_style_get_base (IntPtr style, int i);
|
|
|
|
|
|
|
|
public Gdk.Color Base (StateType state)
|
|
|
|
{
|
|
|
|
IntPtr raw = gtksharp_gtk_style_get_base (Handle, (int) state);
|
|
|
|
return Gdk.Color.New (raw);
|
|
|
|
}
|
|
|
|
|
|
|
|
public Gdk.Color[] BaseColors {
|
|
|
|
get {
|
|
|
|
IntPtr[] raws = new IntPtr[6];
|
|
|
|
Gdk.Color[] ret = new Gdk.Color[raws.Length];
|
|
|
|
for (int i = 0; i < 6; i++) {
|
|
|
|
ret[i] = Gdk.Color.New (gtksharp_gtk_style_get_base (Handle, i));
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-01-18 04:11:16 +00:00
|
|
|
[DllImport("gtksharpglue-2")]
|
|
|
|
static extern IntPtr gtksharp_gtk_style_get_light (IntPtr style, int i);
|
|
|
|
|
|
|
|
public Gdk.Color Light (StateType state)
|
|
|
|
{
|
|
|
|
IntPtr raw = gtksharp_gtk_style_get_light (Handle, (int) state);
|
|
|
|
return Gdk.Color.New (raw);
|
|
|
|
}
|
|
|
|
|
|
|
|
public Gdk.Color[] LightColors {
|
|
|
|
get {
|
|
|
|
IntPtr[] raws = new IntPtr[6];
|
|
|
|
Gdk.Color[] ret = new Gdk.Color[raws.Length];
|
|
|
|
for (int i = 0; i < 6; i++) {
|
|
|
|
ret[i] = Gdk.Color.New (gtksharp_gtk_style_get_light (Handle, i));
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
[DllImport("gtksharpglue-2")]
|
|
|
|
static extern IntPtr gtksharp_gtk_style_get_mid (IntPtr style, int i);
|
|
|
|
|
|
|
|
public Gdk.Color Mid (StateType state)
|
|
|
|
{
|
|
|
|
IntPtr raw = gtksharp_gtk_style_get_mid (Handle, (int) state);
|
|
|
|
return Gdk.Color.New (raw);
|
|
|
|
}
|
|
|
|
|
|
|
|
public Gdk.Color[] MidColors {
|
|
|
|
get {
|
|
|
|
IntPtr[] raws = new IntPtr[6];
|
|
|
|
Gdk.Color[] ret = new Gdk.Color[raws.Length];
|
|
|
|
for (int i = 0; i < 6; i++) {
|
|
|
|
ret[i] = Gdk.Color.New (gtksharp_gtk_style_get_mid (Handle, i));
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
[DllImport("gtksharpglue-2")]
|
|
|
|
static extern IntPtr gtksharp_gtk_style_get_dark (IntPtr style, int i);
|
|
|
|
|
|
|
|
public Gdk.Color Dark (StateType state)
|
|
|
|
{
|
|
|
|
IntPtr raw = gtksharp_gtk_style_get_dark (Handle, (int) state);
|
|
|
|
return Gdk.Color.New (raw);
|
|
|
|
}
|
|
|
|
|
|
|
|
public Gdk.Color[] DarkColors {
|
|
|
|
get {
|
|
|
|
IntPtr[] raws = new IntPtr[6];
|
|
|
|
Gdk.Color[] ret = new Gdk.Color[raws.Length];
|
|
|
|
for (int i = 0; i < 6; i++) {
|
|
|
|
ret[i] = Gdk.Color.New (gtksharp_gtk_style_get_dark (Handle, i));
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport ("gtksharpglue-2")]
|
2002-09-24 03:21:37 +00:00
|
|
|
static extern int gtksharp_gtk_style_get_thickness (IntPtr style, int x_axis);
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport ("gtksharpglue-2")]
|
2002-09-24 03:21:37 +00:00
|
|
|
static extern void gtksharp_gtk_style_set_thickness (IntPtr style, int value);
|
|
|
|
|
|
|
|
public int XThickness {
|
|
|
|
get {
|
|
|
|
return gtksharp_gtk_style_get_thickness (Handle, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
set {
|
|
|
|
gtksharp_gtk_style_set_thickness (Handle, value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public int YThickness {
|
|
|
|
get {
|
|
|
|
return gtksharp_gtk_style_get_thickness (Handle, 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
set {
|
|
|
|
gtksharp_gtk_style_set_thickness (Handle, -value);
|
|
|
|
}
|
|
|
|
}
|
2003-02-08 17:33:17 +00:00
|
|
|
|
2004-12-07 19:03:55 +00:00
|
|
|
[DllImport ("gtksharpglue-2")]
|
2003-02-08 17:33:17 +00:00
|
|
|
static extern IntPtr gtksharp_gtk_style_get_font_description (IntPtr style);
|
|
|
|
|
|
|
|
public Pango.FontDescription FontDescription {
|
|
|
|
get {
|
|
|
|
IntPtr Raw = gtksharp_gtk_style_get_font_description (Handle);
|
|
|
|
|
|
|
|
if (Raw == IntPtr.Zero)
|
|
|
|
return null;
|
|
|
|
Pango.FontDescription ret = (Pango.FontDescription) GLib.Opaque.GetOpaque (Raw);
|
|
|
|
if (ret == null)
|
|
|
|
ret = new Pango.FontDescription (Raw);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|