2002-10-26 Mike Kestner <mkestner@speakeasy.net>

* gconf/GConf.PropertyEditors/PropertyEditorColorPicker.cs : ns stuff
	* glade/XML.custom : more GnomeSharp namespace stuff
	* gnome/CanvasProxy.cs : ditto
	* sample/CanvasExample.cs : ditto
	* sample/Fifteen.cs : ditto
	* sample/GnomeHelloWorld.cs : ditto

svn path=/trunk/gtk-sharp/; revision=8592
This commit is contained in:
Mike Kestner 2002-10-27 04:16:45 +00:00
parent d5590121a0
commit 6c02b6f431
7 changed files with 24 additions and 15 deletions

View file

@ -1,3 +1,12 @@
2002-10-26 Mike Kestner <mkestner@speakeasy.net>
* gconf/GConf.PropertyEditors/PropertyEditorColorPicker.cs : ns stuff
* glade/XML.custom : more GnomeSharp namespace stuff
* gnome/CanvasProxy.cs : ditto
* sample/CanvasExample.cs : ditto
* sample/Fifteen.cs : ditto
* sample/GnomeHelloWorld.cs : ditto
2002-10-26 Mike Kestner <mkestner@speakeasy.net> 2002-10-26 Mike Kestner <mkestner@speakeasy.net>
Much of this patch from Vlad, with substantial rework by mk. Much of this patch from Vlad, with substantial rework by mk.

View file

@ -24,7 +24,7 @@ namespace GConf.PropertyEditors
return (byte) (val >> 8); return (byte) (val >> 8);
} }
void Changed (object obj, ColorSetArgs args) void Changed (object obj, GnomeSharp.ColorSetArgs args)
{ {
ColorPicker picker = (ColorPicker) Control; ColorPicker picker = (ColorPicker) Control;
Color color = Color.FromArgb (ToByte (picker.Red), ToByte (picker.Green), ToByte (picker.Blue)); Color color = Color.FromArgb (ToByte (picker.Red), ToByte (picker.Green), ToByte (picker.Blue));
@ -34,7 +34,7 @@ namespace GConf.PropertyEditors
protected override void ConnectHandlers () protected override void ConnectHandlers ()
{ {
ColorPicker picker = (ColorPicker) Control; ColorPicker picker = (ColorPicker) Control;
picker.ColorSet += new ColorSetHandler (Changed); picker.ColorSet += new GnomeSharp.ColorSetHandler (Changed);
} }
public PropertyEditorColorPicker (string key, ColorPicker picker) : base (key, picker) public PropertyEditorColorPicker (string key, ColorPicker picker) : base (key, picker)

View file

@ -7,14 +7,14 @@
// This code is inserted after the automatically generated code. // This code is inserted after the automatically generated code.
// keep this around so it doesn't get GC'd // keep this around so it doesn't get GC'd
static GtkSharp.GladeXMLCustomWidgetHandlerWrapper callback_wrapper = null; static GladeSharp.XMLCustomWidgetHandlerWrapper callback_wrapper = null;
[DllImport("glade-2.0")] [DllImport("glade-2.0")]
static extern void glade_set_custom_handler (GtkSharp.GladeXMLCustomWidgetHandlerNative handler, IntPtr user_data); static extern void glade_set_custom_handler (GladeSharp.XMLCustomWidgetHandlerNative handler, IntPtr user_data);
static public void SetCustomHandler (Glade.XMLCustomWidgetHandler handler) static public void SetCustomHandler (Glade.XMLCustomWidgetHandler handler)
{ {
callback_wrapper = new GtkSharp.GladeXMLCustomWidgetHandlerWrapper (handler); callback_wrapper = new GladeSharp.XMLCustomWidgetHandlerWrapper (handler);
glade_set_custom_handler (callback_wrapper.NativeDelegate, IntPtr.Zero); glade_set_custom_handler (callback_wrapper.NativeDelegate, IntPtr.Zero);
} }

View file

@ -41,7 +41,7 @@ namespace Gnome {
public event EventHandler Realize { public event EventHandler Realize {
add { add {
if (EventList["realize"] == null) if (EventList["realize"] == null)
Signals["realize"] = new GtkSharp.Gtk.voidObjectSignal(this, Handle, "realize", value, System.Type.GetType("EventArgs")); Signals["realize"] = new GtkSharp.voidObjectSignal(this, Handle, "realize", value, System.Type.GetType("EventArgs"));
EventList.AddHandler("realize", value); EventList.AddHandler("realize", value);
} }
remove { remove {
@ -54,7 +54,7 @@ namespace Gnome {
public event EventHandler Unrealize { public event EventHandler Unrealize {
add { add {
if (EventList["unrealize"] == null) if (EventList["unrealize"] == null)
Signals["unrealize"] = new GtkSharp.Gtk.voidObjectSignal(this, Handle, "unrealize", value, System.Type.GetType("EventArgs")); Signals["unrealize"] = new GtkSharp.voidObjectSignal(this, Handle, "unrealize", value, System.Type.GetType("EventArgs"));
EventList.AddHandler("unrealize", value); EventList.AddHandler("unrealize", value);
} }
remove { remove {
@ -67,7 +67,7 @@ namespace Gnome {
public event EventHandler Map { public event EventHandler Map {
add { add {
if (EventList["map"] == null) if (EventList["map"] == null)
Signals["map"] = new GtkSharp.Gtk.voidObjectSignal(this, Handle, "map", value, System.Type.GetType("EventArgs")); Signals["map"] = new GtkSharp.voidObjectSignal(this, Handle, "map", value, System.Type.GetType("EventArgs"));
EventList.AddHandler("map", value); EventList.AddHandler("map", value);
} }
remove { remove {
@ -80,7 +80,7 @@ namespace Gnome {
public event EventHandler Unmap { public event EventHandler Unmap {
add { add {
if (EventList["unmap"] == null) if (EventList["unmap"] == null)
Signals["unmap"] = new GtkSharp.Gtk.voidObjectSignal(this, Handle, "unmap", value, System.Type.GetType("EventArgs")); Signals["unmap"] = new GtkSharp.voidObjectSignal(this, Handle, "unmap", value, System.Type.GetType("EventArgs"));
EventList.AddHandler("unmap", value); EventList.AddHandler("unmap", value);
} }
remove { remove {

View file

@ -89,7 +89,7 @@ namespace GtkSamples {
item.OutlineColor = "black"; item.OutlineColor = "black";
item.WidthUnits = 1.0; item.WidthUnits = 1.0;
item.CanvasEvent += new CanvasEventHandler (Item_Event); item.CanvasEvent += new GnomeSharp.CanvasEventHandler (Item_Event);
} }
void ChangeItemColor (CanvasRE item) void ChangeItemColor (CanvasRE item)
@ -98,7 +98,7 @@ namespace GtkSamples {
item.FillColor = colors[random.Next (colors.Length)]; item.FillColor = colors[random.Next (colors.Length)];
} }
void Item_Event (object obj, CanvasEventArgs args) { void Item_Event (object obj, GnomeSharp.CanvasEventArgs args) {
EventButton ev = EventButton.New (args.Event.Handle); EventButton ev = EventButton.New (args.Event.Handle);
SignalArgs sa = (SignalArgs) args; SignalArgs sa = (SignalArgs) args;
CanvasRE item = (CanvasRE) obj; CanvasRE item = (CanvasRE) obj;

View file

@ -212,7 +212,7 @@ public class BoardPiece : Gnome.CanvasGroup
text.FillColor = "black"; text.FillColor = "black";
this.Text = text; this.Text = text;
this.CanvasEvent += new CanvasEventHandler (Piece_Event); this.CanvasEvent += new GnomeSharp.CanvasEventHandler (Piece_Event);
} }
public string Color { public string Color {
@ -239,7 +239,7 @@ public class BoardPiece : Gnome.CanvasGroup
} }
} }
static void Piece_Event (object o, CanvasEventArgs args) static void Piece_Event (object o, GnomeSharp.CanvasEventArgs args)
{ {
BoardPiece piece = (BoardPiece) o; BoardPiece piece = (BoardPiece) o;
Canvas canvas = piece.Canvas; Canvas canvas = piece.Canvas;

View file

@ -57,7 +57,7 @@ namespace GtkSamples {
entry.desc); entry.desc);
} }
icons.IconSelected += new IconSelectedHandler (icon_selected_cb); icons.IconSelected += new GnomeSharp.IconSelectedHandler (icon_selected_cb);
return icons; return icons;
} }
@ -150,7 +150,7 @@ namespace GtkSamples {
[DllImport("glib-2.0")] [DllImport("glib-2.0")]
static extern bool g_spawn_command_line_async (string command, IntPtr err); static extern bool g_spawn_command_line_async (string command, IntPtr err);
void icon_selected_cb (object obj, IconSelectedArgs args) void icon_selected_cb (object obj, GnomeSharp.IconSelectedArgs args)
{ {
int idx = args.Num; int idx = args.Num;
Event ev_any = args.Event; Event ev_any = args.Event;