mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-08 16:03:21 +02:00
no need to use SignalArgs, just use args.RetVal where needed
svn path=/trunk/gtk-sharp/; revision=20254
This commit is contained in:
parent
e11b569484
commit
ab2dda15d7
@ -100,7 +100,6 @@ namespace GtkSamples {
|
||||
|
||||
void Item_Event (object obj, GnomeSharp.CanvasEventArgs args) {
|
||||
EventButton ev = EventButton.New (args.Event.Handle);
|
||||
SignalArgs sa = (SignalArgs) args;
|
||||
CanvasRE item = (CanvasRE) obj;
|
||||
|
||||
switch (ev.type) {
|
||||
@ -108,17 +107,17 @@ namespace GtkSamples {
|
||||
if (ev.button == 1) {
|
||||
remember_x = ev.x;
|
||||
remember_y = ev.y;
|
||||
sa.RetVal = true;
|
||||
args.RetVal = true;
|
||||
return;
|
||||
} else if (ev.button == 3) {
|
||||
item.Destroy ();
|
||||
sa.RetVal = true;
|
||||
args.RetVal = true;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case EventType.TwoButtonPress:
|
||||
ChangeItemColor (item);
|
||||
sa.RetVal = true;
|
||||
args.RetVal = true;
|
||||
return;
|
||||
case EventType.MotionNotify:
|
||||
Gdk.ModifierType state = (Gdk.ModifierType) ev.state;
|
||||
@ -127,21 +126,21 @@ namespace GtkSamples {
|
||||
item.Move (new_x - remember_x, new_y - remember_y);
|
||||
remember_x = new_x;
|
||||
remember_y = new_y;
|
||||
sa.RetVal = true;
|
||||
args.RetVal = true;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case EventType.EnterNotify:
|
||||
item.WidthUnits = 3.0;
|
||||
sa.RetVal = true;
|
||||
args.RetVal = true;
|
||||
return;
|
||||
case EventType.LeaveNotify:
|
||||
item.WidthUnits = 1.0;
|
||||
sa.RetVal = true;
|
||||
args.RetVal = true;
|
||||
return;
|
||||
}
|
||||
|
||||
sa.RetVal = false;
|
||||
args.RetVal = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -152,9 +151,8 @@ namespace GtkSamples {
|
||||
|
||||
void Window_Delete (object obj, DeleteEventArgs args)
|
||||
{
|
||||
SignalArgs sa = (SignalArgs) args;
|
||||
Application.Quit ();
|
||||
sa.RetVal = true;
|
||||
args.RetVal = true;
|
||||
}
|
||||
|
||||
public static int Main (string[] args)
|
||||
|
@ -120,9 +120,8 @@ namespace GtkSamples {
|
||||
|
||||
static void Window_Delete (object obj, DeleteEventArgs args)
|
||||
{
|
||||
SignalArgs sa = (SignalArgs) args;
|
||||
Application.Quit ();
|
||||
sa.RetVal = true;
|
||||
args.RetVal = true;
|
||||
}
|
||||
|
||||
static void exit_cb (object o, EventArgs args)
|
||||
|
@ -25,9 +25,8 @@ namespace GtkSamples {
|
||||
|
||||
static void Window_Delete (object obj, DeleteEventArgs args)
|
||||
{
|
||||
SignalArgs sa = (SignalArgs) args;
|
||||
Application.Quit ();
|
||||
sa.RetVal = true;
|
||||
args.RetVal = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -43,9 +43,8 @@ namespace GtkSharp.Samples {
|
||||
|
||||
static void delete_cb (object o, DeleteEventArgs args)
|
||||
{
|
||||
SignalArgs sa = (SignalArgs) args;
|
||||
Application.Quit ();
|
||||
sa.RetVal = true;
|
||||
args.RetVal = true;
|
||||
}
|
||||
|
||||
static void exit_cb (object o, EventArgs args)
|
||||
|
@ -42,9 +42,8 @@ namespace GtkSamples {
|
||||
|
||||
static void Window_Delete (object obj, DeleteEventArgs args)
|
||||
{
|
||||
SignalArgs sa = (SignalArgs) args;
|
||||
Application.Quit ();
|
||||
sa.RetVal = true;
|
||||
args.RetVal = true;
|
||||
}
|
||||
|
||||
static void ExposeEvent (object obj, ExposeEventArgs args)
|
||||
@ -60,8 +59,7 @@ namespace GtkSamples {
|
||||
area.x, area.y,
|
||||
area.width, area.height);
|
||||
|
||||
SignalArgs sa = (SignalArgs) args;
|
||||
sa.RetVal = false;
|
||||
args.RetVal = false;
|
||||
}
|
||||
|
||||
static void ConfigureEvent (object obj, ConfigureEventArgs args)
|
||||
@ -79,8 +77,7 @@ namespace GtkSamples {
|
||||
pixmap.DrawRectangle (darea.Style.WhiteGC, true, 0, 0,
|
||||
allocation.width, allocation.height);
|
||||
|
||||
SignalArgs sa = (SignalArgs) args;
|
||||
sa.RetVal = true;
|
||||
args.RetVal = true;
|
||||
}
|
||||
|
||||
static void DrawBrush (double x, double y)
|
||||
@ -104,8 +101,7 @@ namespace GtkSamples {
|
||||
if (ev.button == 1 && pixmap != null)
|
||||
DrawBrush (ev.x, ev.y);
|
||||
|
||||
SignalArgs sa = (SignalArgs) args;
|
||||
sa.RetVal = true;
|
||||
args.RetVal = true;
|
||||
}
|
||||
|
||||
static void MotionNotifyEvent (object obj, MotionNotifyEventArgs args)
|
||||
@ -128,8 +124,7 @@ namespace GtkSamples {
|
||||
if ((state & Gdk.ModifierType.Button1Mask) != 0 && pixmap != null)
|
||||
DrawBrush (x, y);
|
||||
|
||||
SignalArgs sa = (SignalArgs) args;
|
||||
sa.RetVal = true;
|
||||
args.RetVal = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,9 +26,8 @@ namespace GtkSamples {
|
||||
|
||||
static void Window_Delete (object obj, DeleteEventArgs args)
|
||||
{
|
||||
SignalArgs sa = (SignalArgs) args;
|
||||
Application.Quit ();
|
||||
sa.RetVal = true;
|
||||
args.RetVal = true;
|
||||
}
|
||||
|
||||
static void Size_Allocated (object obj, SizeAllocatedArgs args)
|
||||
|
Loading…
Reference in New Issue
Block a user