mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-01-23 05:41:04 +00: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) {
|
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;
|
|
||||||
CanvasRE item = (CanvasRE) obj;
|
CanvasRE item = (CanvasRE) obj;
|
||||||
|
|
||||||
switch (ev.type) {
|
switch (ev.type) {
|
||||||
|
@ -108,17 +107,17 @@ namespace GtkSamples {
|
||||||
if (ev.button == 1) {
|
if (ev.button == 1) {
|
||||||
remember_x = ev.x;
|
remember_x = ev.x;
|
||||||
remember_y = ev.y;
|
remember_y = ev.y;
|
||||||
sa.RetVal = true;
|
args.RetVal = true;
|
||||||
return;
|
return;
|
||||||
} else if (ev.button == 3) {
|
} else if (ev.button == 3) {
|
||||||
item.Destroy ();
|
item.Destroy ();
|
||||||
sa.RetVal = true;
|
args.RetVal = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EventType.TwoButtonPress:
|
case EventType.TwoButtonPress:
|
||||||
ChangeItemColor (item);
|
ChangeItemColor (item);
|
||||||
sa.RetVal = true;
|
args.RetVal = true;
|
||||||
return;
|
return;
|
||||||
case EventType.MotionNotify:
|
case EventType.MotionNotify:
|
||||||
Gdk.ModifierType state = (Gdk.ModifierType) ev.state;
|
Gdk.ModifierType state = (Gdk.ModifierType) ev.state;
|
||||||
|
@ -127,21 +126,21 @@ namespace GtkSamples {
|
||||||
item.Move (new_x - remember_x, new_y - remember_y);
|
item.Move (new_x - remember_x, new_y - remember_y);
|
||||||
remember_x = new_x;
|
remember_x = new_x;
|
||||||
remember_y = new_y;
|
remember_y = new_y;
|
||||||
sa.RetVal = true;
|
args.RetVal = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EventType.EnterNotify:
|
case EventType.EnterNotify:
|
||||||
item.WidthUnits = 3.0;
|
item.WidthUnits = 3.0;
|
||||||
sa.RetVal = true;
|
args.RetVal = true;
|
||||||
return;
|
return;
|
||||||
case EventType.LeaveNotify:
|
case EventType.LeaveNotify:
|
||||||
item.WidthUnits = 1.0;
|
item.WidthUnits = 1.0;
|
||||||
sa.RetVal = true;
|
args.RetVal = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sa.RetVal = false;
|
args.RetVal = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,9 +151,8 @@ namespace GtkSamples {
|
||||||
|
|
||||||
void Window_Delete (object obj, DeleteEventArgs args)
|
void Window_Delete (object obj, DeleteEventArgs args)
|
||||||
{
|
{
|
||||||
SignalArgs sa = (SignalArgs) args;
|
|
||||||
Application.Quit ();
|
Application.Quit ();
|
||||||
sa.RetVal = true;
|
args.RetVal = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int Main (string[] args)
|
public static int Main (string[] args)
|
||||||
|
|
|
@ -120,9 +120,8 @@ namespace GtkSamples {
|
||||||
|
|
||||||
static void Window_Delete (object obj, DeleteEventArgs args)
|
static void Window_Delete (object obj, DeleteEventArgs args)
|
||||||
{
|
{
|
||||||
SignalArgs sa = (SignalArgs) args;
|
|
||||||
Application.Quit ();
|
Application.Quit ();
|
||||||
sa.RetVal = true;
|
args.RetVal = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void exit_cb (object o, EventArgs args)
|
static void exit_cb (object o, EventArgs args)
|
||||||
|
|
|
@ -25,9 +25,8 @@ namespace GtkSamples {
|
||||||
|
|
||||||
static void Window_Delete (object obj, DeleteEventArgs args)
|
static void Window_Delete (object obj, DeleteEventArgs args)
|
||||||
{
|
{
|
||||||
SignalArgs sa = (SignalArgs) args;
|
|
||||||
Application.Quit ();
|
Application.Quit ();
|
||||||
sa.RetVal = true;
|
args.RetVal = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,9 +43,8 @@ namespace GtkSharp.Samples {
|
||||||
|
|
||||||
static void delete_cb (object o, DeleteEventArgs args)
|
static void delete_cb (object o, DeleteEventArgs args)
|
||||||
{
|
{
|
||||||
SignalArgs sa = (SignalArgs) args;
|
|
||||||
Application.Quit ();
|
Application.Quit ();
|
||||||
sa.RetVal = true;
|
args.RetVal = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void exit_cb (object o, EventArgs args)
|
static void exit_cb (object o, EventArgs args)
|
||||||
|
|
|
@ -42,9 +42,8 @@ namespace GtkSamples {
|
||||||
|
|
||||||
static void Window_Delete (object obj, DeleteEventArgs args)
|
static void Window_Delete (object obj, DeleteEventArgs args)
|
||||||
{
|
{
|
||||||
SignalArgs sa = (SignalArgs) args;
|
|
||||||
Application.Quit ();
|
Application.Quit ();
|
||||||
sa.RetVal = true;
|
args.RetVal = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ExposeEvent (object obj, ExposeEventArgs args)
|
static void ExposeEvent (object obj, ExposeEventArgs args)
|
||||||
|
@ -60,8 +59,7 @@ namespace GtkSamples {
|
||||||
area.x, area.y,
|
area.x, area.y,
|
||||||
area.width, area.height);
|
area.width, area.height);
|
||||||
|
|
||||||
SignalArgs sa = (SignalArgs) args;
|
args.RetVal = false;
|
||||||
sa.RetVal = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ConfigureEvent (object obj, ConfigureEventArgs args)
|
static void ConfigureEvent (object obj, ConfigureEventArgs args)
|
||||||
|
@ -79,8 +77,7 @@ namespace GtkSamples {
|
||||||
pixmap.DrawRectangle (darea.Style.WhiteGC, true, 0, 0,
|
pixmap.DrawRectangle (darea.Style.WhiteGC, true, 0, 0,
|
||||||
allocation.width, allocation.height);
|
allocation.width, allocation.height);
|
||||||
|
|
||||||
SignalArgs sa = (SignalArgs) args;
|
args.RetVal = true;
|
||||||
sa.RetVal = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void DrawBrush (double x, double y)
|
static void DrawBrush (double x, double y)
|
||||||
|
@ -104,8 +101,7 @@ namespace GtkSamples {
|
||||||
if (ev.button == 1 && pixmap != null)
|
if (ev.button == 1 && pixmap != null)
|
||||||
DrawBrush (ev.x, ev.y);
|
DrawBrush (ev.x, ev.y);
|
||||||
|
|
||||||
SignalArgs sa = (SignalArgs) args;
|
args.RetVal = true;
|
||||||
sa.RetVal = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void MotionNotifyEvent (object obj, MotionNotifyEventArgs args)
|
static void MotionNotifyEvent (object obj, MotionNotifyEventArgs args)
|
||||||
|
@ -128,8 +124,7 @@ namespace GtkSamples {
|
||||||
if ((state & Gdk.ModifierType.Button1Mask) != 0 && pixmap != null)
|
if ((state & Gdk.ModifierType.Button1Mask) != 0 && pixmap != null)
|
||||||
DrawBrush (x, y);
|
DrawBrush (x, y);
|
||||||
|
|
||||||
SignalArgs sa = (SignalArgs) args;
|
args.RetVal = true;
|
||||||
sa.RetVal = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,9 +26,8 @@ namespace GtkSamples {
|
||||||
|
|
||||||
static void Window_Delete (object obj, DeleteEventArgs args)
|
static void Window_Delete (object obj, DeleteEventArgs args)
|
||||||
{
|
{
|
||||||
SignalArgs sa = (SignalArgs) args;
|
|
||||||
Application.Quit ();
|
Application.Quit ();
|
||||||
sa.RetVal = true;
|
args.RetVal = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Size_Allocated (object obj, SizeAllocatedArgs args)
|
static void Size_Allocated (object obj, SizeAllocatedArgs args)
|
||||||
|
|
Loading…
Reference in a new issue