[gnome-games/wip/exalm/ds: 54/63] runner: Add get_extra_widget()



commit 71e2bd30c90f8488fc1f4160711c560216047e3e
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Fri Jan 4 02:32:53 2019 +0500

    runner: Add get_extra_widget()
    
    This will be used in the following commits to add additional widgets, such
    as a Nintendo DS screen mode switcher.

 src/command/command-runner.vala | 4 ++++
 src/core/runner.vala            | 1 +
 src/dummy/dummy-runner.vala     | 4 ++++
 src/retro/retro-runner.vala     | 4 ++++
 4 files changed, 13 insertions(+)
---
diff --git a/src/command/command-runner.vala b/src/command/command-runner.vala
index 43257f61..c70191d6 100644
--- a/src/command/command-runner.vala
+++ b/src/command/command-runner.vala
@@ -45,6 +45,10 @@ public class Games.CommandRunner : Object, Runner {
                return new RemoteDisplay ();
        }
 
+       public Gtk.Widget? get_extra_widget () {
+               return null;
+       }
+
        public void start () throws Error {
                string? working_directory = null;
                string[]? envp = null;
diff --git a/src/core/runner.vala b/src/core/runner.vala
index 48815af9..c140405a 100644
--- a/src/core/runner.vala
+++ b/src/core/runner.vala
@@ -11,6 +11,7 @@ public interface Games.Runner : Object {
 
        public abstract bool check_is_valid (out string error_message) throws Error;
        public abstract Gtk.Widget get_display ();
+       public abstract Gtk.Widget? get_extra_widget ();
        public abstract void start () throws Error;
        public abstract void resume () throws Error;
        public abstract void pause ();
diff --git a/src/dummy/dummy-runner.vala b/src/dummy/dummy-runner.vala
index 935429f8..af443a54 100644
--- a/src/dummy/dummy-runner.vala
+++ b/src/dummy/dummy-runner.vala
@@ -32,6 +32,10 @@ private class Games.DummyRunner : Object, Runner {
                return new DummyDisplay ();
        }
 
+       public Gtk.Widget? get_extra_widget () {
+               return null;
+       }
+
        public void start () throws Error {
        }
 
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index 268dacce..f6207831 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -130,6 +130,10 @@ public class Games.RetroRunner : Object, Runner {
                return view;
        }
 
+       public Gtk.Widget? get_extra_widget () {
+               return null;
+       }
+
        public void start () throws Error {
                load_media_data ();
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]