372e7ef7de
* codegen/defs-parse.pl (get_sighandler): gen the helper class. arg passing and return value handling need beefing up still. * glib/SignalArgs.cs : New arg passing/ return value handling class. * glib/SignalCallback.cs (dtor): kill, this will be gen'd in the subclasses. (ctor): prune down to two params. svn path=/trunk/gtk-sharp/; revision=1438
103 lines
1.6 KiB
C#
103 lines
1.6 KiB
C#
// GtkSharp.SignalArgs.cs - Signal argument class implementation
|
|
//
|
|
// Author: Mike Kestner <mkestner@speakeasy.net>
|
|
//
|
|
// (c) 2001 Mike Kestner
|
|
|
|
namespace GtkSharp {
|
|
using System;
|
|
using System.Collections;
|
|
|
|
/// <summary>
|
|
/// SignalArgs Class
|
|
/// </summary>
|
|
///
|
|
/// <remarks>
|
|
/// Arguments and return value for signals.
|
|
/// </remarks>
|
|
|
|
public class SignalArgs : EventArgs {
|
|
|
|
private object _ret;
|
|
private object[] _args;
|
|
|
|
/// <summary>
|
|
/// SignalArgs Constructor
|
|
/// </summary>
|
|
///
|
|
/// <remarks>
|
|
/// Creates a SignalArgs object with no return value and
|
|
/// no arguments.
|
|
/// </remarks>
|
|
|
|
public SignalArgs()
|
|
{
|
|
_ret = null;
|
|
_args = null;
|
|
}
|
|
|
|
/// <summary>
|
|
/// SignalArgs Constructor
|
|
/// </summary>
|
|
///
|
|
/// <remarks>
|
|
/// Creates a SignalArgs object with a return value and
|
|
/// no arguments.
|
|
/// </remarks>
|
|
|
|
public SignalArgs(object retval)
|
|
{
|
|
_ret = retval;
|
|
_args = null;
|
|
}
|
|
|
|
/// <summary>
|
|
/// SignalArgs Constructor
|
|
/// </summary>
|
|
///
|
|
/// <remarks>
|
|
/// Creates a SignalArgs object with a return value and
|
|
/// a list of arguments.
|
|
/// </remarks>
|
|
|
|
public SignalArgs(object retval, object[] args)
|
|
{
|
|
_ret = retval;
|
|
_args = args;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Args Property
|
|
/// </summary>
|
|
///
|
|
/// <remarks>
|
|
/// A list of arguments.
|
|
/// </remarks>
|
|
|
|
public object[] Args {
|
|
get {
|
|
return _args;
|
|
}
|
|
set {
|
|
_args = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// RetVal Property
|
|
/// </summary>
|
|
///
|
|
/// <remarks>
|
|
/// The return value.
|
|
/// </remarks>
|
|
|
|
public object RetVal {
|
|
get {
|
|
return _ret;
|
|
}
|
|
set {
|
|
_ret = value;
|
|
}
|
|
}
|
|
}
|
|
}
|