using System;
using System.Collections.Generic;
using System.Net;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;
namespace Funique
{
///
/// Tool utility, Unit testable
/// ------------------------------------------------
/// 工具組功能. 可被單元測試
///
[Obsolete("Soon this will replace by C# extensions features")]
public interface IToolUtility : IToolVideoInfoExtension, IToolStringExtension, IToolPlayerInformationExtension
{
#region Server Part
Vector3 GetMenuUIPosition(Transform canvas, Vector2 mousePosition);
bool CheckRaycast(string tag);
///
/// Adding event to button (Try casting)
/// ------------------------------------------------
/// 新增事件到按鈕上 (嘗試抓取)
///
/// GameObject
/// Action Event
/// Type
void AddBtnEvent(GameObject BtnObj, UnityAction BtnAction, EventTriggerType TriggerType);
///
///
///
void AddBtnEvent(GameObject BtnObj, UnityAction BtnAction, T ActionString, EventTriggerType TriggerType);
///
/// Replace two item in a list by two index
/// ------------------------------------------------
/// 置換清單中的 兩物件
///
/// Type
/// List Object
/// Index
/// Another Index
///
IList MoveListItem(IList list, int indexA, int indexB);
bool DetectInWindows(GameObject target);
///
/// Get self ip address
/// ------------------------------------------------
/// 得到自己的 IP 位址
///
///
string GetSelfIPAddress();
string[] GetSelfIPAddresses();
IPAddress[] GetIPRange(IPAddress p1, IPAddress p2, int mask);
#endregion
#region Client Part
Texture2D TextureCompression(Texture2D texture, float rate);
void ObjShowInHMD(Transform header, Transform objTrans, float Len, float offsetAngles);
Sprite ReadImg(string imageName);
Texture2D ReadTexture(string imageName, string imgFolder = null);
Texture2D ReadTexture(string imageName, ref Texture2D tex);
void FFmpegSetVideoInfo(ref VideoInfo video, FFmpegPlace place);
double FFmpegDurationTime(string ffmpegMsg);
string FFmpegAudioChannel(string ffmpegMsg);
///
/// Search a file in the directory
/// ------------------------------------------------
/// 根據檔案名稱 搜尋資料夾
///
/// Target directory
/// Target filename
/// Find it or not
bool FileSearch(string sDir, string fileName);
///
///
///
/// Target directory
/// Target filename
/// Result fullpath
/// Find it or not
bool FileSearch(string sDir, string fileName, out string fullpath);
void ResetCalculation(GameObject targetObj, float len);
void AddEventTrigger(GameObject Object, Action TriggerAction, EventTriggerType TriggerType);
#endregion
}
}