atk: Move all .custom files to partial classes

This commit is contained in:
Bertrand Lorentz 2012-04-06 18:31:57 +02:00
parent c0129f42d5
commit 412fe3d9d1
8 changed files with 64 additions and 23 deletions

View File

@ -1,4 +1,4 @@
// Global.custom - Atk Global class customizations
// Global.cs - Atk Global class customizations
//
// Author: Mike Kestner <mkestner@novell.com>
//
@ -21,6 +21,12 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
namespace Atk {
using System;
using System.Runtime.InteropServices;
public partial class Global {
[DllImport ("libatk-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern uint atk_add_global_event_listener (GLib.Signal.EmissionHookNative hook, IntPtr event_type);
@ -32,4 +38,5 @@
GLib.Marshaller.Free (native_event_type);
return id;
}
}
}

View File

@ -1,4 +1,4 @@
// Hyperlink.custom - Atk Hyperlink class customizations
// Hyperlink.cs - Atk Hyperlink class customizations
//
// Author: Mike Gorse <mgorse@novell.com>
//
@ -21,8 +21,12 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
namespace Atk {
public partial class Hyperlink {
protected void EmitLinkActivated ()
{
GLib.Signal.Emit (this, "link_activated");
}
}
}

View File

@ -8,16 +8,14 @@ references = ../glib/glib-sharp.dll
glue_includes = atk/atk.h
sources = \
TextChangedDetail.cs
customs = \
Global.custom \
Hyperlink.custom \
Misc.custom \
Object.custom \
SelectionAdapter.custom \
TextAdapter.custom \
Util.custom
Global.cs \
Hyperlink.cs \
Misc.cs \
Object.cs \
SelectionAdapter.cs \
TextAdapter.cs \
TextChangedDetail.cs \
Util.cs
add_dist =

View File

@ -1,4 +1,4 @@
// Misc.custom - Atk Misc class customizations
// Misc.cs - Atk Misc class customizations
//
// Author: Mike Kestner <mkestner@novell.com>
//
@ -21,6 +21,13 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
namespace Atk {
using System;
using System.Runtime.InteropServices;
public partial class Misc {
[DllImport("atksharpglue-3")]
static extern void atksharp_misc_set_singleton_instance (IntPtr misc);
@ -28,4 +35,5 @@
{
atksharp_misc_set_singleton_instance (misc.Handle);
}
}
}

View File

@ -1,4 +1,4 @@
// Object.custom - Atk Object class customizations
// Object.cs - Atk Object class customizations
//
// Author: Andres G. Aragoneses <aaragoneses@novell.com>
//
@ -20,7 +20,11 @@
// 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 partial class Object {
protected void EmitChildrenChanged (ChildrenChangedDetail detail, uint child_index, Atk.Object child)
{
GLib.Signal.Emit (this,
@ -47,3 +51,5 @@
{
GLib.Signal.Emit (this, "focus-event", gained);
}
}
}

View File

@ -1,4 +1,4 @@
// SelectionAdapter.custom - Atk SelectionAdapter class customizations
// SelectionAdapter.cs - Atk SelectionAdapter class customizations
//
// Author: Andrés G. Aragoneses <aaragoneses@novell.com>
//
@ -20,8 +20,13 @@
// 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 partial class SelectionAdapter {
public void EmitSelectionChanged ()
{
GLib.Signal.Emit (GLib.Object.GetObject (Handle), "selection_changed");
}
}
}

View File

@ -1,4 +1,4 @@
// TextAdapter.custom - Atk TextAdapter class customizations
// TextAdapter.cs - Atk TextAdapter class customizations
//
// Author: Brad Taylor <brad@getcoded.net>
//
@ -20,10 +20,15 @@
// 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 partial class TextAdapter {
public void EmitTextChanged (TextChangedDetail detail, int position, int length)
{
GLib.Signal.Emit (GLib.Object.GetObject (Handle),
"text_changed::" + detail.ToString ().ToLower (),
position, length);
}
}
}

View File

@ -1,4 +1,4 @@
// Util.custom - Atk Util class customizations
// Util.cs - Atk Util class customizations
//
// Author: Mike Kestner <mkestner@novell.com>
//
@ -21,6 +21,12 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
namespace Atk {
using System;
using System.Runtime.InteropServices;
public partial class Util {
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate uint AddGlobalEventListenerNativeDelegate (GLib.Signal.EmissionHookNative hook, IntPtr event_type);
@ -103,3 +109,5 @@
atksharp_util_override_remove_key_event_listener (remove_key_event_listener_callback);
}
}
}
}