[f-spot] update gtk#beans
- From: Stephane Delcroix <sdelcroix src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [f-spot] update gtk#beans
- Date: Mon, 21 Sep 2009 18:37:50 +0000 (UTC)
commit 269842b0709049f1cd18e83c5d842ea8a4c384c7
Author: Stephane Delcroix <stephane delcroix org>
Date: Mon Sep 21 20:36:01 2009 +0200
update gtk#beans
lib/gtk-sharp-beans/Makefile.am | 1 +
lib/gtk-sharp-beans/Style.cs | 44 +++++++++++++++++++++++++++++++++++++++
2 files changed, 45 insertions(+), 0 deletions(-)
---
diff --git a/lib/gtk-sharp-beans/Makefile.am b/lib/gtk-sharp-beans/Makefile.am
index 378e535..2446e7f 100644
--- a/lib/gtk-sharp-beans/Makefile.am
+++ b/lib/gtk-sharp-beans/Makefile.am
@@ -11,6 +11,7 @@ SRCS = \
$(srcdir)/Priority.cs \
$(srcdir)/Shell.cs \
$(srcdir)/Sources.cs \
+ $(srcdir)/Style.cs \
$(srcdir)/Timeout.cs \
$(srcdir)/PixbufFormat.cs \
$(srcdir)/PixbufLoader.cs \
diff --git a/lib/gtk-sharp-beans/Style.cs b/lib/gtk-sharp-beans/Style.cs
new file mode 100644
index 0000000..7ba92ff
--- /dev/null
+++ b/lib/gtk-sharp-beans/Style.cs
@@ -0,0 +1,44 @@
+// Gtk.Style.cs
+//
+// Author(s):
+// Stephane Delcroix <stephane delcroix org>
+//
+// Copyright (c) 2009 Novell, Inc.
+//
+// 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.
+
+using System;
+using System.Collections;
+using System.Runtime.InteropServices;
+using Gtk;
+
+namespace GtkBeans {
+ public class Style {
+ [DllImport("libgtk-win32-2.0-0.dll")]
+ static extern void gtk_paint_flat_box(IntPtr style, IntPtr window, int state_type, int shadow_type, IntPtr area, IntPtr widget, IntPtr detail, int x, int y, int width, int height);
+
+ public static void PaintFlatBox(Gtk.Style style, Gdk.Drawable window, Gtk.StateType state_type, Gtk.ShadowType shadow_type, Gdk.Rectangle? area, Gtk.Widget widget, string detail, int x, int y, int width, int height) {
+ IntPtr native_area = area == null ? IntPtr.Zero : GLib.Marshaller.StructureToPtrAlloc (area);
+ IntPtr native_detail = GLib.Marshaller.StringToPtrGStrdup (detail);
+ gtk_paint_flat_box(style == null ? IntPtr.Zero : style.Handle, window == null ? IntPtr.Zero : window.Handle, (int) state_type, (int) shadow_type, native_area, widget == null ? IntPtr.Zero : widget.Handle, native_detail, x, y, width, height);
+ if (area != null) {
+ area = Gdk.Rectangle.New (native_area);
+ Marshal.FreeHGlobal (native_area);
+ }
+ GLib.Marshaller.Free (native_detail);
+ }
+ }
+}
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]