2005-03-25 Mike Kestner <mkestner@novell.com>

* */*.cs : tag native callback delegates with [CDeclCallback].
	* */*.custom : tag native callback delegates with [CDeclCallback].

svn path=/trunk/gtk-sharp/; revision=42253
This commit is contained in:
Mike Kestner 2005-03-25 17:57:15 +00:00
parent d4af78e347
commit 4caefdec00
10 changed files with 34 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2005-03-25 Mike Kestner <mkestner@novell.com>
* */*.cs : tag native callback delegates with [CDeclCallback].
* */*.custom : tag native callback delegates with [CDeclCallback].
2005-03-24 Mike Kestner <mkestner@novell.com>
* generator/CallbackGen.cs : don't create native delegates for nulls.

View file

@ -69,6 +69,7 @@ namespace GLib {
}
}
[CDeclCallback]
private delegate void DestroyNotify (IntPtr data);
[DllImport("libgobject-2.0-0.dll")]

View file

@ -295,6 +295,7 @@ namespace GLib {
}
}
[CDeclCallback]
delegate void NotifyDelegate (IntPtr handle, IntPtr pspec, IntPtr gch);
void NotifyCallback (IntPtr handle, IntPtr pspec, IntPtr gch)

View file

@ -52,6 +52,7 @@ namespace GLib {
Delegate marshaler;
static DestroyNotify notify = new DestroyNotify (OnNativeDestroy);
[CDeclCallback]
delegate void DestroyNotify (IntPtr data, IntPtr obj);
static void OnNativeDestroy (IntPtr data, IntPtr obj)
{
@ -161,6 +162,7 @@ namespace GLib {
g_signal_handler_disconnect (handle, handler_id);
}
[CDeclCallback]
delegate void voidObjectDelegate (IntPtr handle, IntPtr gch);
static void voidObjectCallback (IntPtr handle, IntPtr gch)

View file

@ -30,6 +30,7 @@ namespace GLib {
GCHandle gc_handle;
static DestroyNotify notify = new DestroyNotify (OnNativeDestroy);
[CDeclCallback]
delegate void DestroyNotify (IntPtr data);
static void OnNativeDestroy (IntPtr data)
{

View file

@ -62,6 +62,7 @@
[DllImport("gnomesharpglue-2")]
static extern void gnomesharp_canvas_item_override_realize (GLib.GType gtype, RealizeDelegate cb);
[GLib.CDeclCallback]
delegate void RealizeDelegate (IntPtr item);
static RealizeDelegate RealizeCallback;
@ -91,6 +92,7 @@
[DllImport("gnomesharpglue-2")]
static extern void gnomesharp_canvas_item_override_point (GLib.GType gtype, PointDelegate cb);
[GLib.CDeclCallback]
delegate double PointDelegate (IntPtr item, double x, double y, int cx, int cy, out IntPtr actual_item_handle);
static PointDelegate PointCallback;
@ -126,6 +128,7 @@
[DllImport("gnomesharpglue-2")]
static extern void gnomesharp_canvas_item_override_draw (GLib.GType gtype, DrawDelegate cb);
[GLib.CDeclCallback]
delegate void DrawDelegate (IntPtr handle, IntPtr drawable, int x, int y, int width, int height);
static DrawDelegate DrawCallback;
@ -156,6 +159,7 @@
[DllImport("gnomesharpglue-2")]
static extern void gnomesharp_canvas_item_override_render (GLib.GType gtype, RenderDelegate cb);
[GLib.CDeclCallback]
delegate void RenderDelegate (IntPtr handle, ref CanvasBuf buf);
static RenderDelegate RenderCallback;
@ -185,6 +189,7 @@
[DllImport("gnomesharpglue-2")]
static extern void gnomesharp_canvas_item_override_update (GLib.GType gtype, UpdateDelegate cb);
[GLib.CDeclCallback]
delegate void UpdateDelegate (IntPtr item, IntPtr affine_ptr, IntPtr clip_path, int flags);
static UpdateDelegate UpdateCallback;

View file

@ -29,6 +29,7 @@
[DllImport("gtksharpglue-2")]
static extern void gtksharp_cellrenderer_override_get_size (GLib.GType gtype, GetSizeDelegate cb);
[GLib.CDeclCallback]
delegate void GetSizeDelegate (IntPtr item, IntPtr widget, IntPtr cell_area_ptr, IntPtr x_offset, IntPtr y_offset, IntPtr width, IntPtr height);
static GetSizeDelegate GetSizeCallback;
@ -70,6 +71,7 @@
[DllImport("gtksharpglue-2")]
static extern void gtksharp_cellrenderer_override_render (GLib.GType gtype, RenderDelegate cb);
[GLib.CDeclCallback]
delegate void RenderDelegate (IntPtr item, IntPtr window, IntPtr widget, ref Gdk.Rectangle background_area, ref Gdk.Rectangle cell_area, ref Gdk.Rectangle expose_area, Gtk.CellRendererState flags);
static RenderDelegate RenderCallback;
@ -98,6 +100,7 @@
[DllImport("gtksharpglue-2")]
static extern void gtksharp_cellrenderer_override_start_editing (GLib.GType gtype, StartEditingDelegate cb);
[GLib.CDeclCallback]
delegate IntPtr StartEditingDelegate (IntPtr raw, IntPtr evnt, IntPtr widget, IntPtr path, ref Gdk.Rectangle background_area, ref Gdk.Rectangle cell_area, Gtk.CellRendererState flags);
static StartEditingDelegate StartEditingCallback;

View file

@ -106,6 +106,7 @@ static extern void gtksharp_container_override_forall (GLib.GType gtype, ForallD
[DllImport("gtksharpglue-2")]
static extern void gtksharp_container_invoke_gtk_callback (IntPtr cb, IntPtr handle, IntPtr data);
[GLib.CDeclCallback]
delegate void ForallDelegate (IntPtr container, bool include_internals, IntPtr cb, IntPtr data);
static ForallDelegate ForallCallback;
@ -164,6 +165,7 @@ static extern IntPtr gtk_container_child_type(IntPtr raw);
[DllImport("gtksharpglue-2")]
static extern void gtksharp_container_override_child_type (GLib.GType type, ChildTypeDelegate cb);
[GLib.CDeclCallback]
delegate IntPtr ChildTypeDelegate (IntPtr raw);
static ChildTypeDelegate ChildTypeCallback;

View file

@ -49,17 +49,29 @@ namespace Gtk {
public IDHashtable () : base (new IDHashCodeProvider (), new IDComparer ()) {}
}
[GLib.CDeclCallback]
delegate int GetFlagsDelegate ();
[GLib.CDeclCallback]
delegate int GetNColumnsDelegate ();
[GLib.CDeclCallback]
delegate IntPtr GetColumnTypeDelegate (int col);
[GLib.CDeclCallback]
delegate bool GetNodeDelegate (out int node_idx, IntPtr path);
[GLib.CDeclCallback]
delegate IntPtr GetPathDelegate (int node_idx);
[GLib.CDeclCallback]
delegate void GetValueDelegate (int node_idx, int col, ref GLib.Value val);
[GLib.CDeclCallback]
delegate bool NextDelegate (ref int node_idx);
[GLib.CDeclCallback]
delegate bool ChildrenDelegate (out int child, int parent);
[GLib.CDeclCallback]
delegate bool HasChildDelegate (int node_idx);
[GLib.CDeclCallback]
delegate int NChildrenDelegate (int node_idx);
[GLib.CDeclCallback]
delegate bool NthChildDelegate (out int child, int parent, int n);
[GLib.CDeclCallback]
delegate bool ParentDelegate (out int parent, int child);
[StructLayout(LayoutKind.Sequential)]

View file

@ -211,6 +211,7 @@ public int FocusLineWidth {
[DllImport("gtksharpglue-2")]
static extern int gtksharp_widget_connect_set_scroll_adjustments_signal (IntPtr gtype, SetScrollAdjustmentsDelegate cb);
[GLib.CDeclCallback]
delegate void SetScrollAdjustmentsDelegate (IntPtr widget, IntPtr hadj, IntPtr vadj);
static SetScrollAdjustmentsDelegate SetScrollAdjustmentsCallback;
@ -251,6 +252,7 @@ private class BindingInvoker {
}
}
[GLib.CDeclCallback]
private delegate void BindingHandler (IntPtr handle, IntPtr user_data);
private static void BindingCallback (IntPtr handle, IntPtr user_data)