Implementing libspeechdwrapper for linux screen reader support.
This commit is contained in:
		@@ -1 +0,0 @@
 | 
			
		||||
libspeechd.so.2.6.0
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
libspeechd.so.2.6.0
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							@@ -9,6 +9,16 @@ using System.Runtime.InteropServices;
 | 
			
		||||
 | 
			
		||||
namespace stardew_access
 | 
			
		||||
{
 | 
			
		||||
    public struct GoString
 | 
			
		||||
    {
 | 
			
		||||
        public string msg;
 | 
			
		||||
        public long len;
 | 
			
		||||
        public GoString(string msg, long len)
 | 
			
		||||
        {
 | 
			
		||||
            this.msg = msg;
 | 
			
		||||
            this.len = len;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class MainClass : Mod
 | 
			
		||||
    {
 | 
			
		||||
@@ -31,6 +41,17 @@ namespace stardew_access
 | 
			
		||||
            get{return _modHelper;}
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [DllImport("libspeechdwrapper.so")]
 | 
			
		||||
        private static extern void Initialize();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        [DllImport("libspeechdwrapper.so")]
 | 
			
		||||
        private static extern void Speak(GoString text, bool interrupt);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        [DllImport("libspeechdwrapper.so")]
 | 
			
		||||
        private static extern void Close();
 | 
			
		||||
 | 
			
		||||
        /*********
 | 
			
		||||
        ** Public methods
 | 
			
		||||
        *********/
 | 
			
		||||
@@ -63,6 +84,13 @@ namespace stardew_access
 | 
			
		||||
 | 
			
		||||
            #endregion
 | 
			
		||||
 | 
			
		||||
            Initialize();
 | 
			
		||||
            string text = "Testing";
 | 
			
		||||
            Speak(new GoString(text,text.Length), false);
 | 
			
		||||
            Close();
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            helper.Events.Input.ButtonPressed += this.OnButtonPressed;
 | 
			
		||||
            helper.Events.GameLoop.UpdateTicked += this.onUpdateTicked;
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,6 @@
 | 
			
		||||
using AccessibleOutput;
 | 
			
		||||
using StardewModdingAPI;
 | 
			
		||||
using System.Runtime.InteropServices;
 | 
			
		||||
using IronPython.Hosting;
 | 
			
		||||
 | 
			
		||||
namespace stardew_access
 | 
			
		||||
{
 | 
			
		||||
@@ -13,7 +12,6 @@ namespace stardew_access
 | 
			
		||||
        /// <summary>Initializes the screen reader.</summary>
 | 
			
		||||
        public void InitializeScreenReader()
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
            if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
 | 
			
		||||
                return;
 | 
			
		||||
            
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
{
 | 
			
		||||
  "Name": "Stardew Access",
 | 
			
		||||
  "Author": "Mohammad Shoaib",
 | 
			
		||||
  "Version": "1.0.18-beta",
 | 
			
		||||
  "Version": "1.0.19-beta",
 | 
			
		||||
  "Description": "An accessibility mod with screen reader support!",
 | 
			
		||||
  "UniqueID": "shoaib.stardewaccess",
 | 
			
		||||
  "EntryDll": "stardew-access.dll",
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,6 @@
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <PackageReference Include="AccessibleOutput" Version="1.0.0" />
 | 
			
		||||
    <PackageReference Include="AutoHotkey.Interop" Version="1.0.0.1" />
 | 
			
		||||
    <PackageReference Include="IronPython" Version="2.7.12" />
 | 
			
		||||
    <PackageReference Include="Lib.Harmony" Version="2.2.0" />
 | 
			
		||||
    <PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="4.0.0" />
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user