2008-08-19 Brad Taylor <brad@getcoded.net>

* atk/Object.custom: Add method to allow emission of
	  visible-data-changed signal.

	* atk/TextChangedDetail.cs: 
	* atk/TextAdapter.custom: Add method to allow emission of text-changed
	  signal.


svn path=/trunk/gtk-sharp/; revision=111015
This commit is contained in:
Brad Taylor 2008-08-19 22:00:33 +00:00
parent 253fd7954c
commit 70b8817f12
6 changed files with 74 additions and 2 deletions

View file

@ -1,3 +1,12 @@
2008-08-19 Brad Taylor <brad@getcoded.net>
* atk/Object.custom: Add method to allow emission of
visible-data-changed signal.
* atk/TextChangedDetail.cs:
* atk/TextAdapter.custom: Add method to allow emission of text-changed
signal.
2008-08-13 Mike Kestner <mkestner@novell.com>
* atk/Atk.metadata: switch Value methods to ref params since atk

View file

@ -5,12 +5,14 @@ METADATA = Atk.metadata
SYMBOLS =
references = ../glib/glib-sharp.dll
sources =
sources = \
TextChangedDetail.cs
customs = \
Global.custom \
Misc.custom \
Object.custom \
TextAdapter.custom \
Util.custom
add_dist =

View file

@ -105,6 +105,10 @@
Remove
}
protected void EmitVisibleDataChanged ()
{
GLib.Signal.Emit (this, "visible-data-changed");
}
[DllImport("atksharpglue-2")]
static extern void atksharp_object_override_ref_state_set (IntPtr type, RefStateSetDelegate cb);

29
atk/TextAdapter.custom Normal file
View file

@ -0,0 +1,29 @@
// TextAdapter.custom - Atk TextAdapter class customizations
//
// Author: Brad Taylor <brad@getcoded.net>
//
// Copyright (c) 2008 Novell, Inc.
//
// This code is inserted after the automatically generated code.
//
//
// 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.
public void EmitTextChanged (TextChangedDetail detail, int position, int length)
{
GLib.Signal.Emit (GLib.Object.GetObject (Handle),
"text_changed::" + detail.ToString ().ToLower (),
position, length);
}

26
atk/TextChangedDetail.cs Normal file
View file

@ -0,0 +1,26 @@
// TextChangedDetail.cs - Detail enumeration for the TextChanged signal
//
// Authors: Brad Taylor <brad@getcoded.net>
//
// Copyright (c) 2008 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.
namespace Atk {
public enum TextChangedDetail {
Insert,
Delete
}
}

View file

@ -380,6 +380,8 @@ namespace GLib {
return (GLib.Object) this;
else if (g_type_is_a (type, GType.Boxed.Val))
return ToBoxed ();
else if (type == IntPtr.Zero)
return null;
else
throw new Exception ("Unknown type " + new GType (type).ToString ());
}