From 7cf6671bcece9b1c9fe820fd31023b7f63df46d0 Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Thu, 30 Oct 2003 18:19:59 +0000 Subject: [PATCH] 2003-10-30 Ken Foster * glue/button.c: initial creating of glue file for GdkButton * glue/Makefile.am: added button.c to glue make * glue/makefile.win32: added button.c to win32 glue make * gtk/Button.custom: expose in_button GdkButton member svn path=/trunk/gtk-sharp/; revision=19486 --- ChangeLog | 7 +++++++ glue/Makefile.am | 1 + glue/button.c | 21 +++++++++++++++++++++ glue/makefile.win32 | 1 + gtk/Button.custom | 14 ++++++++++++++ 5 files changed, 44 insertions(+) create mode 100644 glue/button.c create mode 100644 gtk/Button.custom diff --git a/ChangeLog b/ChangeLog index 906728827..b446d58cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-10-30 Ken Foster + + * glue/button.c: initial creating of glue file for GdkButton + * glue/Makefile.am: added button.c to glue make + * glue/makefile.win32: added button.c to win32 glue make + * gtk/Button.custom: expose in_button GdkButton member + 2003-10-29 Martin Willemoes Hansen * generator/Method.cs: marked Is and Has methods, diff --git a/glue/Makefile.am b/glue/Makefile.am index 3dc43fb26..c2fc88d36 100644 --- a/glue/Makefile.am +++ b/glue/Makefile.am @@ -2,6 +2,7 @@ lib_LTLIBRARIES = libgtksharpglue.la BASESOURCES = \ adjustment.c \ + button.c \ clipboard.c \ colorseldialog.c \ combo.c \ diff --git a/glue/button.c b/glue/button.c new file mode 100644 index 000000000..1b99279e2 --- /dev/null +++ b/glue/button.c @@ -0,0 +1,21 @@ +/* + * button.c : Glue for utility functions for GtkButton + */ + +#include + +/* Forward declarations */ +int gtksharp_button_get_in_button (GtkButton* button); +void gtksharp_button_set_in_button (GtkButton* button, int b); + +int +gtksharp_button_get_in_button (GtkButton* button) +{ + return button->in_button; +} + +void +gtksharp_button_set_in_button (GtkButton* button, int b) +{ + button->in_button = b; +} diff --git a/glue/makefile.win32 b/glue/makefile.win32 index 11cb1a1c7..5e32f7eb6 100755 --- a/glue/makefile.win32 +++ b/glue/makefile.win32 @@ -5,6 +5,7 @@ DLLWRAP=dllwrap -mno-cygwin -mms-bitfields --target i386-mingw32 --export-all-sy GLUE_OBJS = \ adjustment.o \ + button.o \ clipboard.o \ colorseldialog.o \ combo.o \ diff --git a/gtk/Button.custom b/gtk/Button.custom new file mode 100644 index 000000000..da8a2d179 --- /dev/null +++ b/gtk/Button.custom @@ -0,0 +1,14 @@ + +[DllImport("gtksharpglue")] +static extern int gtksharp_button_get_in_button (IntPtr button); +[DllImport("gtksharpglue")] +static extern void gtksharp_button_set_in_button (IntPtr button, int b); + +public bool InButton { + get { + return gtksharp_button_get_in_button (Handle) == 1 ? true : false; + } + set { + gtksharp_button_set_in_button (Handle, value ? 1 : 0); + } +}