diff --git a/.gitignore b/.gitignore index baa35bd0..db9211aa 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ /SXElectricalInspection/obj /SXElectricalInspection/Temp /SXElectricalInspection/UserSettings +/SXElectricalInspection/Assets/Vuplex +/SXElectricalInspection/Assets/ZFBrowser diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts.meta deleted file mode 100644 index 24e6d42c..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 56b8faaae4b14ef46be6a4552ecae7fb -folderAsset: yes -timeCreated: 1447088713 -licenseType: Store -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Attributes.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Attributes.cs deleted file mode 100644 index dd87c89c..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Attributes.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using UnityEngine; - -namespace ZenFulcrum.EmbeddedBrowser { - -public class FlagsFieldAttribute : PropertyAttribute {} - - - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Attributes.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Attributes.cs.meta deleted file mode 100644 index 29bead06..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Attributes.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 578312a754d9da142ad199b54e09488f -timeCreated: 1450462477 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Browser.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Browser.cs deleted file mode 100644 index 0c66468d..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Browser.cs +++ /dev/null @@ -1,1340 +0,0 @@ -using System; -using UnityEngine; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using UnityEngine.Assertions; -using UnityEngine.Serialization; - -#if UNITY_EDITOR -using UnityEditor; -#endif -#if UNITY_5_5_OR_NEWER -using UnityEngine.Profiling; -#endif - -namespace ZenFulcrum.EmbeddedBrowser { - -/** Represents a browser "tab". */ -public partial class Browser : MonoBehaviour { - private static int lastUpdateFrame; - - public static string LocalUrlPrefix { get { return BrowserNative.LocalUrlPrefix; } } - - /** - * List of possible actions when a new window is opened. - */ - [Flags] - public enum NewWindowAction { - /** Ignore attempts to open new windows. */ - Ignore = 1, - /** Navigate the current window to the new window's URL. */ - Redirect, - /** - * Create a new Browser instance to handle rendering the new window in the scene. - * For this to be useful, you'll need to supply an INewWindowHandler with an - * implementation of your choosing. - * (If you set this behavior in the inspector, it won't take effect until you call SetNewWindowHandler.) - */ - NewBrowser, - /** - * Create a new OS window, outside the game, to show the page. - * Controlling and interacting with the new window outside is limited, though you can use JavaScript calls - * from the parent. - * OS-level windows may have unexpected or incomplete behavior. Using this outside of debugging/testing - * is not officially supported. - */ - NewWindow, - } - - protected IBrowserUI _uiHandler; - protected bool uiHandlerAssigned = false; - /** - * Input handler. - * If you don't assign anything, it will default to something useful, but you can replace - * it or null it as desired. - * - * If do you want to use your own or disable it, be sure to assign something (or null) before WhenReady fires. - */ - public IBrowserUI UIHandler { - get { return _uiHandler; } - set { - uiHandlerAssigned = true; - _uiHandler = value; - } - } - - [Tooltip("Initial URL to load.\n\nTo change at runtime use browser.Url to load a page.")] - [SerializeField] private string _url = ""; - - [Tooltip("Initial size.\n\nTo change at runtime use browser.Resize.")] - [SerializeField] private int _width = 512, _height = 512; - - [Tooltip(@"Generate mipmaps? - -Generating mipmaps tends to be somewhat expensive, especially when updating a large texture every frame. Instead of -generating mipmaps, try using one of the ""emulate mipmap"" shader variants. - -To change at runtime modify this value and call browser.Resize.")] - public bool generateMipmap = false; - - [Tooltip(@"Base background color to use for pages. - -The texture will be cleared to this color until the page has rendered. Additionally, if baseColor.a is not -fully opaque the browser will render transparently. (Don't forget to use an appropriate material for transparency.) - -Don't change this after the first Update() tick. (You can still tweak a page via EvalJS and CSS.)")] - [FormerlySerializedAs("backgroundColor")] - public Color32 baseColor = new Color32(0, 0, 0, 0);//default to transparent - - - [Tooltip(@"Initial browser ""zoom level"". Negative numbers are smaller, zero is normal, positive numbers are larger. -The size roughly doubles/halves for every four units added/removed. -Note that zoom level is shared by all pages on the some domain. -Also note that this zoom level may be persisted across runs. - -To change at runtime use browser.Zoom.")] -//TODO: prefer deviceScale (not yet implemented) for DPI-style size changes. - [SerializeField] private float _zoom = 0; - - /** - * Fired when we get a console.log/warn/error from the page. - * args: (message, source) - * - * (CEF's console event leaves a lot to be desired, we are unable to get the log level or additional arguments.) - */ - public event Action onConsoleMessage = (s, s1) => {}; - - [Tooltip(@"Allow right-clicking to show a context menu on what parts of the page? - -May be changed at any time. -")] - [FlagsField] - public BrowserNative.ContextMenuOrigin allowContextMenuOn = BrowserNative.ContextMenuOrigin.Editable; - - [Tooltip(@"What should we do when a user/the page tries to open a new window? - -For ""New Browser"" to work, you need to assign NewWindowHandler to a handler of your creation. - -Don't use ""New Window"" outside debugging and testing. - -Use SetNewWindowHandler to adjust at runtime. -")] - [SerializeField] - private NewWindowAction newWindowAction = NewWindowAction.Redirect; - - [Obsolete("Use SetNewWindowHandler", true)] - public INewWindowHandler NewWindowHandler { get; set; } - - /** If false, the texture won't be updated with new changes. */ - public bool EnableRendering { get; set; } - /** If false, we won't process input with the UIHandler. */ - public bool EnableInput { get; set; } - - public CookieManager CookieManager { get; private set; } - - /** Handle to the native browser. */ - [NonSerialized] - internal protected int browserId; - /** Same as browserId, but will be set before the browser is ready and remain set even after it's disposed */ - private int unsafeBrowserId; - /** Have we requested a native handle yet? (It may take a moment for the native browser to be ready.) */ - protected bool browserIdRequested = false; - protected Texture2D texture; - public Texture2D Texture { get { return texture; } } - /** Called when the image canvas has changed or resized. */ - public event Action afterResize = t => { }; - protected bool textureIsOurs = false; - protected bool forceNextRender = true; - protected bool isPopup = false; - - /** List of tasks to execute on the main thread. May be used on any thread, but lock before touching. */ - protected List thingsToDo = new List(); - /** List of callbacks to call when the page loads next. */ - protected List onloadActions = new List(); - - /** - * We pass delegates/closures to the native level. We must ensure that they don't get GC'd - * while the native object still exists and might use them, so we keep track of them here - * to prevent that. - */ - protected List thingsToRemember = new List(); - /** - * And, to make it more complicated, in some cases we can get GC'd (along with thingsToRemember and the - * generated trampolines) before the native browser finishes shutting down. - * - * We use this to make sure {this} stays alive until the native side is done. - * - * Used across threads, lock before touching. - */ - protected static Dictionary> allThingsToRemember = new Dictionary>(); - - /** A callback. {args} is a JSON node with the top-level type of array. */ - public delegate void JSCallback(JSONNode args); - protected delegate void JSResultFunc(JSONNode value, bool isError); - - private int nextCallbackId = 1; - /** Registered callbacks that JS can call to us with. */ - protected Dictionary registeredCallbacks = new Dictionary(); - - - /** - * We can't do much (go to url, navigate, etc) until the native browser is ready. - * Most these actions will be queued for you and fired when we are ready. - * - * See also: WhenReady() - */ - protected event BrowserNative.ReadyFunc onNativeReady; - - /** - * Called when the page's onload fires. (Top frame only.) - * loadData['status'] contains the status code, loadData['url'] the url - */ - public event Action onLoad = loadData => {}; - /** - * Called when the top-level page has been fetched (but not necessarily parsed and run). - * loadData['status'] contains the status code, loadData['url'] the url - * (Top frame only.) - */ - [Obsolete("Doesn't fire reliably due to its design. Consider using onLoad or onNavStateChange.")] - public event Action onFetch = loadData => {}; - /** - * Called when a page fails to load. - * Use QueuePageReplacer to inject a custom error page. - * (Top frame only.) - */ - public event Action onFetchError = errCode => {}; - /** - * Called when an SSL cert fails checks. - * Use QueuePageReplacer to inject a custom error page. - * (Top frame only.) - */ - public event Action onCertError = errInfo => {}; - /** - * Called when a renderer process dies/is killed. - * Use QueuePageReplacer to inject a custom error page; you might also choose to try reloading once or twice. - */ - public event Action onSadTab = () => {}; - /** - * Called after the browser's texture/image data is updated. - */ - public event Action onTextureUpdated = () => {}; - - /// - /// Called when the browser's nav state changes. - /// Presently these are considered nav state changes, but other things may be added in the future: - /// - URL change - /// - canGoForward/Back change - /// - loading started or completed - /// - public event Action onNavStateChange = () => {}; - - /** - * Called when a download is started. - * See BrowserNative.ChangeType.CHT_DOWNLOAD_STARTED for a list and explanation of - * the elements in the JSON object. - * - * If a handler is given it should call DownloadCommand() to start or cancel the download (eventually). - * Once a download is started onDownloadStatus will be called from time-to-time. Additionally, you can use - * DownloadCommand to cancel, pause, or resume a running download. - * - * If this is null, no downloading will happen. - */ - public Action onDownloadStarted = null; - - /** - * Called when a download has a status update. - * See BrowserNative.ChangeType.CHT_DOWNLOAD_STATUS for a list and explanation of - * the elements in the JSON object. - * - * NB: You may get status reports on downloads that haven't triggered onDownloadStarted yet. - */ - public event Action onDownloadStatus = (downloadId, info) => {}; - - /** - * Called when the element in the page with keyboard focus changes. - * If tagName == "", then focus has been lost. - */ - public event Action onNodeFocus = (tagName, editable, value) => {}; - - /// - /// Called when the browser (as a whole) gains/loses keyboard or mouse focus. - /// - public event Action onBrowserFocus = (mouseFocused, keyboardFocused) => {}; - - [HideInInspector] - public readonly BrowserFocusState focusState = new BrowserFocusState(); - - /// - /// Called when any browser is created. - /// - public static event Action onAnyBrowserCreated = browser => {}; - /// - /// Called when any browser is destroyed. - /// - public static event Action onAnyBrowserDestroyed = browser => {}; - - - private BrowserInput browserInput; - private Browser overlay; - /** We have to load a blank page before we can inject HTML. If we load a blank page, don't count it as the "loading". */ - private bool skipNextLoad; - /** There may be a short moment between requesting a URL and when IsLoadedRaw turns false. We use this flag to help cope. */ - private bool loadPending; - - private BrowserNavState navState = new BrowserNavState(); - - private bool newWindowHandlerSet = false; - /// - /// If - /// - private INewWindowHandler newWindowHandler; - - /** - * This will sometimes contain an inner Browser that handles tasks such as - * rendering alert()s and such. - */ - protected DialogHandler dialogHandler; - - protected void Awake() { - EnableRendering = true; - EnableInput = true; - CookieManager = new CookieManager(this); - - browserInput = new BrowserInput(this); - - if (!newWindowHandlerSet) { - //(if another component calls SetNewWindowHandler in its Awake, we'll overwrite that - //so only do this if it's not been called yet) - SetNewWindowHandler(newWindowAction == NewWindowAction.NewBrowser ? NewWindowAction.Ignore : newWindowAction, null); - } - - onNativeReady += id => { - if (!uiHandlerAssigned) { - var meshCollider = GetComponent(); - if (meshCollider) { - var ui = gameObject.AddComponent(); - gameObject.AddComponent(); - UIHandler = ui; - } - } - - Resize(_width, _height); - - Zoom = _zoom; - - if (!isPopup && !string.IsNullOrEmpty(_url)) Url = _url; - }; - - onConsoleMessage += (message, source) => { - var text = source + ": " + message; - Debug.Log(text, this); - }; - - onFetchError += err => { - //don't show anything if the error is a load abort - if (err["error"] == "ERR_ABORTED") return; - - QueuePageReplacer(() => { - LoadHTML(Resources.Load("Browser/Errors").text, Url); - CallFunction("setErrorInfo", err); - }, -1000); - }; - - onCertError += err => { - QueuePageReplacer(() => { - LoadHTML(Resources.Load("Browser/Errors").text, Url); - CallFunction("setErrorInfo", err); - }, -900); - }; - - onSadTab += () => { - QueuePageReplacer(() => { - LoadHTML(Resources.Load("Browser/Errors").text, Url); - CallFunction("showCrash"); - }, -1000); - }; - - onAnyBrowserCreated(this); - } - - /** Returns true if the browser is ready to take orders. Most actions will be internally delayed until it is. */ - public bool IsReady { - get { return browserId != 0; } - } - - /** - * The given callback will be called when the browser is ready to start taking commands. - */ - public void WhenReady(Action callback) { - if (IsReady) { - //Call it later instead of now to help head off some subtle bugs that can be produced by such a scheme. - //Call it at next update. (Since our script order is a little bit later than everyone else this usually will add no latency.) - lock (thingsToDo) thingsToDo.Add(callback); - } else { - BrowserNative.ReadyFunc func = null; - func = id => { - try { - callback(); - } catch (Exception ex) { - Debug.LogException(ex); - } - onNativeReady -= func; - }; - onNativeReady += func; - } - } - - /** Fires the given callback during th next Update/LateUpdate tick on the main thread. This may be called from any thread. */ - public void RunOnMainThread(Action callback) { - lock (thingsToDo) thingsToDo.Add(callback); - } - - /** - * Calls the given callback the next time the page is loaded. - * This will not fire right away if IsLoaded is true, it will wait for a new page to load. - * Callbacks won't be fired yet if the url is some type of blank url ("", "about:blank", etc). - */ - public void WhenLoaded(Action callback) { - onloadActions.Add(callback); - } - - /** - * Sets up a new native browser. - * If newBrowserId is zero, allocates a new browser and sets it up. - * If newBrowserId is nonzero, takes ownership of that allocated browser and sets it up. - * - * Internal use only. - */ - internal void RequestNativeBrowser(int newBrowserId = 0) { - if (browserId != 0 || browserIdRequested) return; - - browserIdRequested = true; - - try { - BrowserNative.LoadNative(); - } catch { - gameObject.SetActive(false); - throw; - } - - int newId; - if (newBrowserId == 0) { - var settings = new BrowserNative.ZFBSettings() { - bgR = baseColor.r, - bgG = baseColor.g, - bgB = baseColor.b, - bgA = baseColor.a, - offscreen = 1, - }; - newId = BrowserNative.zfb_createBrowser(settings); - } else { - newId = newBrowserId; - isPopup = true;//don't nav to our to URL, it will be loaded by the backend - } - - unsafeBrowserId = newId; - allBrowsers[unsafeBrowserId] = this; - - //Debug.Log("Requested browser for " + name + " " + newId); - - //We have a native browser, but it is invalid to do anything with it until it's ready. - //Therefore, we don't set browserId until it's ready. - - //But we will put all our callbacks in place. - - //Don't let our remember list get destroyed until we are ready for that. - lock (allThingsToRemember) allThingsToRemember[newId] = thingsToRemember; - - //Set up callbacks: - BrowserNative.ForwardJSCallFunc forwardCall = CB_ForwardJSCallFunc; - thingsToRemember.Add(forwardCall); - BrowserNative.zfb_registerJSCallback(newId, forwardCall); - - BrowserNative.ChangeFunc changeCall = CB_ChangeFunc; - thingsToRemember.Add(changeCall); - BrowserNative.zfb_registerChangeCallback(newId, changeCall); - - BrowserNative.DisplayDialogFunc dialogCall = CB_DisplayDialogFunc; - thingsToRemember.Add(dialogCall); - BrowserNative.zfb_registerDialogCallback(newId, dialogCall); - - BrowserNative.ShowContextMenuFunc contextCall = CB_ShowContextMenuFunc; - thingsToRemember.Add(contextCall); - BrowserNative.zfb_registerContextMenuCallback(newId, contextCall); - - BrowserNative.ConsoleFunc consoleCall = CB_ConsoleFunc; - thingsToRemember.Add(consoleCall); - BrowserNative.zfb_registerConsoleCallback(newId, consoleCall); - - BrowserNative.ReadyFunc readyCall = CB_ReadyFunc; - thingsToRemember.Add(readyCall); - BrowserNative.zfb_setReadyCallback(newId, readyCall); - - BrowserNative.NavStateFunc navStateCall = CB_NavStateFunc; - thingsToRemember.Add(navStateCall); - BrowserNative.zfb_registerNavStateCallback(newId, navStateCall); - } - - protected void OnItemChange(BrowserNative.ChangeType type, string arg1) { - //Debug.Log("ChangeType " + name + " " + type + " arg " + arg1 + " loaded " + IsLoaded); - switch (type) { - case BrowserNative.ChangeType.CHT_CURSOR: - UpdateCursor(); - break; - case BrowserNative.ChangeType.CHT_BROWSER_CLOSE: - //handled directly on the calling thread, nothing to do here - break; - case BrowserNative.ChangeType.CHT_FETCH_FINISHED: -#pragma warning disable 618 - onFetch(JSONNode.Parse(arg1)); -#pragma warning restore 618 - break; - case BrowserNative.ChangeType.CHT_FETCH_FAILED: - onFetchError(JSONNode.Parse(arg1)); - break; - case BrowserNative.ChangeType.CHT_LOAD_FINISHED: - if (skipNextLoad) { - //deal with extra step we have to do to load HTML to an empty page - skipNextLoad = false; - return; - } - - loadPending = false; - - navState.loading = false;//we'll get the event to update this in a moment, but we need to not be "loading" now - - if (onloadActions.Count != 0) { - foreach (var action in onloadActions) action(); - onloadActions.Clear(); - } - - onLoad(JSONNode.Parse(arg1)); - break; - case BrowserNative.ChangeType.CHT_CERT_ERROR: - onCertError(JSONNode.Parse(arg1)); - break; - case BrowserNative.ChangeType.CHT_SAD_TAB: - onSadTab(); - break; - case BrowserNative.ChangeType.CHT_DOWNLOAD_STARTED: { - var info = JSONNode.Parse(arg1); - if (onDownloadStarted != null) { - onDownloadStarted(info["id"], info); - } else { - DownloadCommand(info["id"], BrowserNative.DownloadAction.Cancel); - } - break; - } - case BrowserNative.ChangeType.CHT_DOWNLOAD_STATUS: { - var info = JSONNode.Parse(arg1); - onDownloadStatus(info["id"], info); - break; - } - case BrowserNative.ChangeType.CHT_FOCUSED_NODE: { - var info = JSONNode.Parse(arg1); - focusState.focusedTagName = info["TagName"]; - focusState.focusedNodeEditable = info["editable"]; - onNodeFocus(info["tagName"], info["editable"], info["value"]); - break; - } - - } - } - - protected void CreateDialogHandler() { - if (dialogHandler != null) return; - - DialogHandler.DialogCallback dialogCallback = (affirm, text1, text2) => { - CheckSanity(); - BrowserNative.zfb_sendDialogResults(browserId, affirm, text1, text2); - }; - DialogHandler.MenuCallback contextCallback = commandId => { - CheckSanity(); - BrowserNative.zfb_sendContextMenuResults(browserId, commandId); - }; - - dialogHandler = DialogHandler.Create(this, dialogCallback, contextCallback); - } - - /** - * Call this before you do any native things with our browser instance. - * If something terribly stupid is going on this may be able to bail out with an exception instead of - * crashing everything. - */ - protected void CheckSanity() { - if (browserId == 0) throw new InvalidOperationException("No native browser allocated"); - if (!BrowserNative.SymbolsLoaded) throw new InvalidOperationException("Browser .dll not loaded"); - } - - /** - * If we aren't ready, queues the given action to happen later and returns true. - * Else calls CheckSanity and returns false. - */ - internal bool DeferUnready(Action ifNotReady) { - if (browserId == 0) { - WhenReady(ifNotReady); - return true; - } else { - CheckSanity(); - return false; - } - } - - protected void OnDisable() { - //note: if you want a browser to stop, load a different page or destroy it - //The browser will continue to run until destroyed. - } - - protected void OnDestroy() { - onAnyBrowserDestroyed(this); - - if (browserId == 0) return; - - if (dialogHandler) DestroyImmediate(dialogHandler.gameObject); - dialogHandler = null; - - if (BrowserNative.SymbolsLoaded) BrowserNative.zfb_destroyBrowser(browserId); - if (textureIsOurs) Destroy(texture); - //(Don't remove from allBrowsers here, there's some callbacks that need to happen first.) - - browserId = 0; - texture = null; - } - - public string Url { - /** - * Gets the current browser URL. - * Note that if you just set the URL and the page hasn't loaded, this won't return the new value. - * It always returns the current URL of the browser as we are most recently aware of. - */ - get { - return navState.url; - } - /** Shortcut for LoadURL(value, true) */ - set { - LoadURL(value, true); - } - } - - /** - * Navigates to the given URL. If force is true, it will go there right away. - * If force is false, pages that wish to can prompt the user and possibly cancel the - * navigation. - */ - public void LoadURL(string url, bool force) { - if (string.IsNullOrEmpty(url)) { - //If we ask CEF to load "" it will crash. Try Url = "about:blank" or LoadHTML() instead. - throw new ArgumentException("URL must be non-empty", "value"); - } - - if (DeferUnready(() => LoadURL(url, force))) return; - - const string magicPrefix = "localGame://"; - - if (url.StartsWith(magicPrefix)) { - url = LocalUrlPrefix + url.Substring(magicPrefix.Length); - } - - loadPending = true; - - BrowserNative.zfb_goToURL(browserId, url, force); - } - - /** - * Loads the given HTML string as if it were the given URL. - * For the URL use http://-like porotocols or else things may not work right. (In particular, the backend - * might sanitize it to "about:blank" and things won't work right because it appears a page isn't loaded.) - * - * Note that, instead of using this, you can also load "data:" URIs into this.Url. - * This allows pretty much any type of content to be loaded as the whole page. - */ - public void LoadHTML(string html, string url = null) { - if (DeferUnready(() => LoadHTML(html, url))) return; - - //Debug.Log("Load HTML " + html); - - loadPending = true; - - if (string.IsNullOrEmpty(url)) { - url = LocalUrlPrefix + "custom"; - } - - if (string.IsNullOrEmpty(this.Url)) { - //Nothing will happen if we don't have an initial page, so cause one. - this.Url = "about:blank"; - skipNextLoad = true; - } - - BrowserNative.zfb_goToHTML(browserId, html, url); - } - - /// - /// Sets how new popup windows are handled. - /// - /// - /// - /// If action==NewBrowser, this handler will be invoked to create the browser in the scene. - /// May be null otherwise. - /// - public void SetNewWindowHandler(NewWindowAction action, INewWindowHandler newWindowHandler) { - newWindowHandlerSet = true; - if (action == NewWindowAction.NewBrowser && newWindowHandler == null) { - throw new Exception("No new window handler supplied for NewBrowser action"); - } - - if (DeferUnready(() => SetNewWindowHandler(action, newWindowHandler))) return; - - var settings = new BrowserNative.ZFBSettings() { - bgR = baseColor.r, - bgG = baseColor.g, - bgB = baseColor.b, - bgA = baseColor.a, - }; - - this.newWindowHandler = newWindowHandler; - this.newWindowAction = action; - BrowserNative.NewWindowFunc cb = CB_NewWindowFunc; - thingsToRemember.Add(cb); - BrowserNative.zfb_registerPopupCallback(browserId, (BrowserNative.NewWindowAction)action, settings, cb); - } - - /** - * Sends a command such as "select all", "undo", or "copy" - * to the currently focused frame in th browser. - */ - public void SendFrameCommand(BrowserNative.FrameCommand command) { - if (DeferUnready(() => SendFrameCommand(command))) return; - - BrowserNative.zfb_sendCommandToFocusedFrame(browserId, command); - } - - private Action pageReplacer; - private float pageReplacerPriority; - /** - * Queues a function to replace the current page. - * - * This is used mostly in error handling. Namely, the default error handler will queue an error page at a low - * priority, but your onLoadError callback can call this to queue its own error page. - * - * At the end of the tick, the {replacePage} callback with the highest priority will - * be called. Typically {replacePage} will call LoadHTML to change things around. - * - * Default error handles will have a priority of less than -100. - */ - public void QueuePageReplacer(Action replacePage, float priority) { - if (pageReplacer == null || priority >= pageReplacerPriority) { - pageReplacer = replacePage; - pageReplacerPriority = priority; - } - } - - public bool CanGoBack { - get { - return navState.canGoBack; - } - } - - public void GoBack() { - if (!IsReady) return; - CheckSanity(); - BrowserNative.zfb_doNav(browserId, -1); - } - - public bool CanGoForward { - get { - return navState.canGoForward; - } - } - - public void GoForward() { - if (!IsReady) return; - CheckSanity(); - BrowserNative.zfb_doNav(browserId, 1); - } - - /** - * Returns true if the browser is loading a page. - * Unlike IsLoaded, this does not account for special case urls. - */ - public bool IsLoadingRaw { - get { - return navState.loading; - } - } - - /** - * Returns true if we have a page and it's loaded. - * This will not return true if we haven't gone to a URL or we are on "about:blank" - */ - public bool IsLoaded { - get { - if (!IsReady || loadPending) return false; - if (navState.loading) return false; - - var url = Url; - var urlIsBlank = string.IsNullOrEmpty(url) || url == "about:blank"; - - return !urlIsBlank; - } - } - - public void Stop() { - if (!IsReady) return; - CheckSanity(); - BrowserNative.zfb_changeLoading(browserId, BrowserNative.LoadChange.LC_STOP); - } - - /** - * Reloads the current page. - * If force is true, the cache will be skipped. - */ - public void Reload(bool force = false) { - if (!IsReady) return; - CheckSanity(); - if (force) BrowserNative.zfb_changeLoading(browserId, BrowserNative.LoadChange.LC_FORCE_RELOAD); - else BrowserNative.zfb_changeLoading(browserId, BrowserNative.LoadChange.LC_RELOAD); - } - - - /** - * Show the development tools for the current page. - * - * If {show} is false the dev tools will be hidden, if possible. - */ - public void ShowDevTools(bool show = true) { - if (DeferUnready(() => ShowDevTools(show))) return; - - BrowserNative.zfb_showDevTools(browserId, show); - } - - public Vector2 Size { - get { return new Vector2(_width, _height); } - } - - protected void _Resize(Texture2D newTexture, bool newTextureIsOurs) { - - var width = newTexture.width; - var height = newTexture.height; - - if (textureIsOurs && texture && newTexture != texture) { - Destroy(texture); - } - - _width = width; - _height = height; - - if (IsReady) BrowserNative.zfb_resize(browserId, width, height); - else WhenReady(() => BrowserNative.zfb_resize(browserId, width, height)); - - texture = newTexture; - textureIsOurs = newTextureIsOurs; - - var renderer = GetComponent(); - if (renderer) renderer.material.mainTexture = texture; - - afterResize(texture); - - if (overlay) overlay.Resize(Texture); - - forceNextRender = true; - } - - /** - * Creates a new texture of the given size and starts rendering to that. - */ - public void Resize(int width, int height) { - var newTexture = new Texture2D(width, height, TextureFormat.ARGB32, generateMipmap); - if (generateMipmap) newTexture.filterMode = FilterMode.Trilinear; - newTexture.wrapMode = TextureWrapMode.Clamp; - - //Clear it to a color: - var pixelCount = width * height; - if (newTexture.mipmapCount > 1) { - //generateMipmap doesn't tell us how many or how big, so quick hack to look it up: - for (int i = 1; i < newTexture.mipmapCount; i++) { - pixelCount += newTexture.GetPixels32(i).Length; - } - } - BrowserNative.LoadSymbols(); - var pixelData = BrowserNative.zfb_flatColorTexture( - pixelCount, baseColor.r, baseColor.g, baseColor.b, baseColor.a - ); - newTexture.LoadRawTextureData(pixelData, pixelCount * 4); - newTexture.Apply(); - BrowserNative.zfb_free(pixelData); - - _Resize(newTexture, true); - } - - /** Tells the Browser to render to the given ARGB32 texture. */ - public void Resize(Texture2D newTexture) { - Assert.AreEqual(TextureFormat.ARGB32, newTexture.format); - _Resize(newTexture, false); - } - - /** Sets and gets the current zoom level/DPI scaling factor. */ - public float Zoom { - get { return _zoom; } - set { - if (DeferUnready(() => Zoom = value)) return; - - BrowserNative.zfb_setZoom(browserId, value); - _zoom = value; - } - } - - - - /** - * Evaluates JavaScript in the browser. - * NB: This is JavaScript. Not UnityScript. If you try to feed this UnityScript it will choke and die. - * - * If IsLoaded is false, the script will be deferred until IsLoaded is true. - * - * The script is asynchronously executed in a separate process. To get the result value, yield on the returned - * promise (in a coroutine) then take a look at promise.Value. - * - * To see script errors and debug issues, call ShowDevTools and use the inspector window to tackle - * your problems. Also, keep an eye on console output (which gets forwarded to Debug.Log). - * - * If desired, you can fill out scriptURL with a URL for the file you are reading from. This can help fill out errors - * with the correct filename and in some cases allow you to view the source in the inspector. - * - * If cspFriendly is true, we won't use eval() to run the script. This keeps it from getting blocked by a - * Content Security Policy, but we will be unable to handle and report syntax errors. If you wish to get a result - * in this mode you must return it (e.g. "var a = 3; return a * 7;"). - * (Normally the result of the last statement is returned.) - * - */ - - /// - /// Evaluates JavaScript in the browser. - /// - /// (This is JavaScript. Not UnityScript. If you try to feed this UnityScript it will choke and die.) - /// - /// If IsLoaded is false, the script will be deferred until IsLoaded is true. - /// - /// The script is asynchronously executed in a separate process. - /// A promise (see the docs) is returned which you can use to inspect the last evaluated value. - /// For example: - /// browser.EvalJS("var a = 3; a + 3;").Then(ret => Debug.Log("Result: " + (int)ret).Done(); - /// - /// To see script errors and debug issues, call ShowDevTools and use the inspector window to tackle - /// your problems. Also, keep an eye on console output (which gets forwarded to Debug.Log). - /// - /// If desired, you can fill out scriptURL with a URL for the file you are reading from. This can help fill out errors - /// with the correct filename and in some cases allow you to view the source in the inspector. - /// - /// If the page you are viewing has a Content Security Policy (CSP) that prevents evaluating scripts - /// don't use this function, use EvalJSCSP instead. - /// - /// - /// - /// - public IPromise EvalJS(string script, string scriptURL = "scripted command") { - //Debug.Log("Asked to EvalJS " + script + " loaded state: " + IsLoaded); - var promise = new Promise(); - var id = nextCallbackId++; - - var jsonScript = new JSONNode(script).AsJSON; - var resultJS = @"try {"+ - "_zfb_event(" + id + ", JSON.stringify(eval(" + jsonScript + " )) || 'null');" + - "} catch(ex) {" + - "_zfb_event(" + id + ", 'fail-' + (JSON.stringify(ex.stack) || 'null'));" + - "}" - ; - - registeredCallbacks.Add(id, (val, isError) => { - registeredCallbacks.Remove(id); - if (isError) promise.Reject(new JSException(val)); - else promise.Resolve(val); - }); - - if (!IsLoaded) WhenLoaded(() => _EvalJS(resultJS, scriptURL)); - else _EvalJS(resultJS, scriptURL); - - return promise; - } - - /// - /// Like EvalJS, but for pages with a Content Security Policy (CSP) that prevents evaluating scripts. - /// This will also work on regular pages, but it has some disadvantages, keep reading. - /// - /// Unlike EvalJS: - /// If your script has syntax errors, you won't get the error in the returned promise, it will just not work. - /// To inspect a result you must `return` it: - /// browser.EvalJS("var a = 3; return a + 3;").Then(ret => Debug.Log("Result: " + (int)ret).Done(); - /// - /// This version of the function doens't use eval() to run the script. This keeps it from getting blocked by a - /// Content Security Policy, but we will be unable to handle and report syntax errors. - /// - /// Don't forget to respect the user's privacy and any applicable ToS terms for the page you are manipulating. - /// - /// - /// - /// - public IPromise EvalJSCSP(string script, string scriptURL = "scripted command") { - //Debug.Log("Asked to EvalJSCSP " + script + " loaded state: " + IsLoaded); - var promise = new Promise(); - var id = nextCallbackId++; - - var resultJS = @"try {"+ - "_zfb_event(" + id + ", JSON.stringify( (function() {" + script + "})() ) || 'null');" + - "} catch(ex) {" + - "_zfb_event(" + id + ", 'fail-' + (JSON.stringify(ex.stack) || 'null'));" + - "}" - ; - - registeredCallbacks.Add(id, (val, isError) => { - registeredCallbacks.Remove(id); - if (isError) promise.Reject(new JSException(val)); - else promise.Resolve(val); - }); - - if (!IsLoaded) WhenLoaded(() => _EvalJS(resultJS, scriptURL)); - else _EvalJS(resultJS, scriptURL); - - return promise; - } - - protected void _EvalJS(string script, string scriptURL) { - BrowserNative.zfb_evalJS(browserId, script, scriptURL); - } - - - /** - * Looks up {name} by evaluating it as JavaScript code, then calls it with the given arguments. - * - * If IsLoaded is false, the call will be deferred until IsLoaded is true. - * - * Because {name} is evaluated, you can use lookups like "MyGUI.show" or "Foo.getThing().doBob" - * - * The call itself is run asynchronously in a separate process. To get the value returned by the JS back, yield - * on the promise CallFunction returns (in a coroutine) then take a look at promise.Value. - * - * Note that because JSONNode is implicitly convertible from many different types, you can often just - * dump the values in directly when you call this: - * int x = 5, y = 47; - * browser.CallFunction("Menu.setPosition", x, y); - * browser.CallFunction("Menu.setTitle", "Super Game"); - * - */ - public IPromise CallFunction(string name, params JSONNode[] arguments) { - var js = name + "("; - - var sep = ""; - foreach (var arg in arguments) { - js += sep + (arg ?? JSONNode.NullNode).AsJSON; - sep = ", "; - } - - js += ");"; - - return EvalJS(js); - } - - /** - * Registers a JavaScript function in the Browser. When called, the given Mono {callback} will be executed. - * - * If IsLoaded is false, the in-page registration will be deferred until IsLoaded is true. - * - * The callback will be executed with one argument: a JSONNode array representing the arguments to the function - * given in the browser. (Access the first argument with args[0], second with args[1], etc.) - * - * The arguments sent back-and forth must be JSON-able. - * - * The JavaScript process runs asynchronously. Callbacks triggered will be collected and fired during the next Update(). - * - * {name} is evaluate-assigned JavaScript. You can use values like "myCallback", "MySystem.myCallback" (only if MySystem - * already exists), or "GetThing().bobFunc" (if GetThing() returns an object you can use later). - * - */ - public void RegisterFunction(string name, JSCallback callback) { - var id = nextCallbackId++; - registeredCallbacks.Add(id, (value, error) => { - //(we shouldn't be able to get an error here) - callback(value); - }); - - var js = name + " = function() { _zfb_event(" + id + ", JSON.stringify(Array.prototype.slice.call(arguments))); };"; - EvalJS(js); - } - - protected List thingsToDoClone = new List(); - protected void ProcessCallbacks() { - while (thingsToDo.Count != 0) { - Profiler.BeginSample("Browser.ProcessCallbacks", this); - - //It's not uncommon for some callbacks to add other callbacks - //To keep from altering thingsToDo while iterating, we'll make a quick copy and use that. - lock (thingsToDo) { - thingsToDoClone.AddRange(thingsToDo); - thingsToDo.Clear(); - } - - foreach (var thingToDo in thingsToDoClone) thingToDo(); - - thingsToDoClone.Clear(); - - Profiler.EndSample(); - } - } - - protected void Update() { - ProcessCallbacks(); - - if (browserId == 0) { - RequestNativeBrowser(); - return;//not ready yet or not loaded - } - - if (!BrowserNative.SymbolsLoaded) return; - - HandleInput(); - } - - protected void LateUpdate() { - //Note: we use LateUpdate here in hopes that commands issued during (anybody's) Update() - //will have a better chance of being completed before we push the render - - if (lastUpdateFrame != Time.frameCount && BrowserNative.NativeLoaded) { - Profiler.BeginSample("Browser.NativeTick"); - BrowserNative.zfb_tick(); - Profiler.EndSample(); - lastUpdateFrame = Time.frameCount; - } - - - if (browserId == 0) return; - - ProcessCallbacks(); - - if (pageReplacer != null) { - pageReplacer(); - pageReplacer = null; - } - - if (browserId == 0) return;//not ready yet or not loaded - if (EnableRendering) Render(); - } - - private Color32[] colorBuffer = null; - - protected void Render() { - if (!BrowserNative.SymbolsLoaded) return; - CheckSanity(); - - BrowserNative.RenderData renderData; - - Profiler.BeginSample("Browser.UpdateTexture.zfb_getImage", this); - { - renderData = BrowserNative.zfb_getImage(browserId, forceNextRender); - forceNextRender = false; - - if (renderData.pixels == IntPtr.Zero) return;//no changes - - if (renderData.w != texture.width || renderData.h != texture.height) { - //Mismatch. Can happen, for example, when we resize but got an "old" image at the old resolution. (IPC is async.) - return; - } - } - Profiler.EndSample(); - - - if (texture.mipmapCount == 1) { - Profiler.BeginSample("Browser.UpdateTexture.LoadRawTextureData", this); - texture.LoadRawTextureData(renderData.pixels, renderData.w * renderData.h * 4); - Profiler.EndSample(); - } else { - //whelp, this is gonna be slow. - //First, having Unity calculate mipmaps is slow. Second, we can't just LoadRawTextureData because it doesn't - //contain mip levels. Third, LoadRawTextureData and Color32 have different in-memory byte orders (for our texture type). - - if (colorBuffer == null || colorBuffer.Length != renderData.w * renderData.h) { - colorBuffer = new Color32[renderData.w * renderData.h]; - } - - Profiler.BeginSample("Browser.UpdateTexture.CopyData", this); - var handle = GCHandle.Alloc(colorBuffer, GCHandleType.Pinned); - BrowserNative.zfb_copyToColor32(renderData.pixels, handle.AddrOfPinnedObject(), renderData.w * renderData.h); - handle.Free(); - Profiler.EndSample(); - - Profiler.BeginSample("Browser.UpdateTexture.SetPixels32", this); - texture.SetPixels32(colorBuffer); - Profiler.EndSample(); - } - - Profiler.BeginSample("Browser.UpdateTexture.Apply", this); - { - texture.Apply(true); - } - Profiler.EndSample(); - - onTextureUpdated(); - } - - /** - * Adds the given browser as an overlay of this browser. - * - * The overlaid browser will appear transparently over the top of us on our texture. - * {overlayBrowser} must not have an overlay and must be sized exactly the same as {this}. - * Additionally, overlayBrowser.EnableRendering must be false. You still need to - * do something to handle getting input to the right places. Overlays take a notable performance - * hit on rendering (CPU alpha compositing). - * - * Overlays are used internally to implement context menus and pop-up dialogs (alert, onbeforeunload). - * If the page causes any type of dialog, the overlay will be replaced. - * - * Overlays will be resized onto our texture when we are resized. The sizes must always match exactly. - * - * Remove the overlay (SetOverlay(null)) before closing either browser. - * - * (Note: though you can't set B as an overlay to A when B has an overlay, you can set - * an overlay on B /while/ it is the overlay for A. For an example of this, try - * right-clicking on the text area inside a prompt() popup. The context menu that - * appears is an overlay to the overlay to the actual browser.) - */ - public void SetOverlay(Browser overlayBrowser) { - if (DeferUnready(() => SetOverlay(overlayBrowser))) return; - if (overlayBrowser && overlayBrowser.DeferUnready(() => SetOverlay(overlayBrowser))) return; - - if (!overlayBrowser) { - BrowserNative.zfb_setOverlay(browserId, 0); - overlay = null; - } else { - overlay = overlayBrowser; - - if ( - !overlay.Texture || - (overlay.Texture.width != Texture.width || overlay.Texture.height != Texture.height) - ) { - overlay.Resize(Texture); - } - - BrowserNative.zfb_setOverlay(browserId, overlayBrowser.browserId); - } - } - - protected void HandleInput() { - if (_uiHandler == null || !EnableInput) return; - CheckSanity(); - - browserInput.HandleInput(); - } - - protected void OnApplicationFocus(bool focus) { - if (!focus && browserInput != null) browserInput.HandleFocusLoss(); - } - - protected void OnApplicationPause(bool paused) { - if (paused && browserInput != null) browserInput.HandleFocusLoss(); - } - - /** - * Updates the cursor on our UIHandler. - * Usually you don't need to call this, but if you are sharing input with an overlay, call this any time the - * "focused" overlay changes. - */ - public void UpdateCursor() { - if (UIHandler == null) return; - if (DeferUnready(UpdateCursor)) return; - - int w, h; - var cursorType = BrowserNative.zfb_getMouseCursor(browserId, out w, out h); - if (cursorType != BrowserNative.CursorType.Custom) { - UIHandler.BrowserCursor.SetActiveCursor(cursorType); - } else { - if (w == 0 && h == 0) { - //bad cursor - UIHandler.BrowserCursor.SetActiveCursor(BrowserNative.CursorType.None); - return; - } - - var buffer = new Color32[w * h]; - int hx, hy; - - var handle = GCHandle.Alloc(buffer, GCHandleType.Pinned); - BrowserNative.zfb_getMouseCustomCursor(browserId, handle.AddrOfPinnedObject(), w, h, out hx, out hy); - handle.Free(); - - var tex = new Texture2D(w, h, TextureFormat.ARGB32, false); - tex.SetPixels32(buffer); - //in-memory only, no Apply() - - UIHandler.BrowserCursor.SetCustomCursor(tex, new Vector2(hx, hy)); - DestroyImmediate(tex); - } - } - - /** - * Take an action on a download. - * - * At the outset: - * Begin: Starts the download. Saves to the given file if given. If fileName is null, the user will be prompted. - * Cancel: Does nothing with a download. - * - * After starting a download: - * Pause, Cancel, Resume: Does what it says on the tin. - * - * Once a download is finished or canceled it is not valid to call this function for that download any more. - * - * fileName is ignored except when beginning a download. - */ - public void DownloadCommand(int downloadId, BrowserNative.DownloadAction action, string fileName = null) { - CheckSanity(); - - BrowserNative.zfb_downloadCommand(browserId, downloadId, action, fileName); - } - - /// - /// Injects the given unicode text to the browser as if it had been typed. - /// (No key press events are generated.) - /// - /// - public void TypeText(string text) { - for (int i = 0; i < text.Length; i++) { - var ev = new Event() { - type = EventType.KeyDown, - keyCode = 0, - character = text[i], - }; - browserInput.extraEventsToInject.Add(ev); - } - } - - /// - /// Sends key presses/releases to the browser. - /// - /// - /// - public void PressKey(KeyCode key, KeyAction action = KeyAction.PressAndRelease) { - if (action == KeyAction.Press || action == KeyAction.PressAndRelease) { - var ev = new Event() { - type = EventType.KeyDown, - keyCode = key, - character = (char)0, - }; - browserInput.extraEventsToInject.Add(ev); - } - - if (action == KeyAction.Release || action == KeyAction.PressAndRelease) { - var ev = new Event() { - type = EventType.KeyUp, - keyCode = key, - character = (char)0, - }; - browserInput.extraEventsToInject.Add(ev); - } - - } - - internal void _RaiseFocusEvent(bool mouseIsFocused, bool keyboardIsFocused) { - focusState.hasMouseFocus = mouseIsFocused; - focusState.hasKeyboardFocus = keyboardIsFocused; - onBrowserFocus(mouseIsFocused, keyboardIsFocused); - } - -} - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Browser.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Browser.cs.meta deleted file mode 100644 index 68216fcc..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Browser.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 35bf0bd4ded61a34f9be34f6738e4010 -timeCreated: 1447801917 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 10 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserCallbacks.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserCallbacks.cs deleted file mode 100644 index fcf2e29f..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserCallbacks.cs +++ /dev/null @@ -1,216 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Runtime.Serialization; -using AOT; -using UnityEngine; - -namespace ZenFulcrum.EmbeddedBrowser { - -/// -/// Callbacks used by Browser.cs -/// Man, that file's getting big. (Breaking it up would likely involve backwards-incompatible API changes, so -/// let it be for now.) -/// -public partial class Browser { - /// - /// Map of browserId => Browser fro looking up C# objects when we get a native callback. - /// - /// Note that this reflects the native state, that is, we include Browsers that havne't fully initialized yet, - /// but instead list what we need to lookup callbacks coming from the native side. - /// - /// (We used to rely on closures and generated trampolines for this data, but il2cpp doens't support that.) - /// - internal static Dictionary allBrowsers = new Dictionary(); - - private static Browser GetBrowser(int browserId) { - lock (allBrowsers) { - Browser ret; - if (allBrowsers.TryGetValue(browserId, out ret)) return ret; - } - - Debug.LogWarning("Got a callback for brower id " + browserId + " which doesn't exist."); - return null; - } - - [MonoPInvokeCallback(typeof(BrowserNative.ForwardJSCallFunc))] - private static void CB_ForwardJSCallFunc(int browserId, int callbackId, string data, int size) { - var browser = GetBrowser(browserId); - if (!browser) return; - - lock (browser.thingsToDo) browser.thingsToDo.Add(() => { - - JSResultFunc cb; - if (!browser.registeredCallbacks.TryGetValue(callbackId, out cb)) { - Debug.LogWarning("Got a JS callback for event " + callbackId + ", but no such event is registered."); - return; - } - - var isError = false; - if (data.StartsWith("fail-")) { - isError = true; - data = data.Substring(5); - } - - JSONNode node; - try { - node = JSONNode.Parse(data); - } catch (SerializationException) { - Debug.LogWarning("Invalid JSON sent from browser: " + data); - return; - } - - try { - cb(node, isError); - } catch (Exception ex) { - //user's function died, log it and carry on - Debug.LogException(ex); - return; - } - }); - } - - [MonoPInvokeCallback(typeof(BrowserNative.ChangeFunc))] - private static void CB_ChangeFunc(int browserId, BrowserNative.ChangeType changeType, string arg1) { - //Note: we may have been Object.Destroy'd at this point, so guard against that. - //That means we can't trust that `browser == null` means we don't have a browser, we may have an object that - //is destroyed, but not actually null. - Browser browser; - lock (allBrowsers) { - if (!allBrowsers.TryGetValue(browserId, out browser)) return; - } - - if (changeType == BrowserNative.ChangeType.CHT_BROWSER_CLOSE) { - //We can't continue if the browser is closed, so goodbye. - - //At this point, we may or may not be destroyed, but if not, become destroyed. - //Debug.Log("Got close notification for " + unsafeBrowserId); - if (browser) { - //Need to be destroyed. - lock (browser.thingsToDo) browser.thingsToDo.Add(() => { - Destroy(browser.gameObject); - }); - } else { - //If we are (Unity) destroyed, we won't get another update, so we can't rely on thingsToDo - //That said, there's not anything else for us to do but step out of allThingsToRemember. - } - - //The native side has acknowledged it's done, now we can finally let the native trampolines be GC'd - lock (allThingsToRemember) allThingsToRemember.Remove(browser.unsafeBrowserId); - - //Now that we know we can allow ourselves to be GC'd and destroyed (without leaking to allThingsToRemember) - //go ahead and allow it. (And we won't get any more native callbacks at this point.) - lock (allBrowsers) allBrowsers.Remove(browserId); - - //Just in case someone tries to call something, make sure CheckSanity and such fail. - browser.browserId = 0; - } else if (browser) { - lock (browser.thingsToDo) browser.thingsToDo.Add(() => browser.OnItemChange(changeType, arg1)); - } - } - - [MonoPInvokeCallback(typeof(BrowserNative.DisplayDialogFunc))] - private static void CB_DisplayDialogFunc( - int browserId, BrowserNative.DialogType dialogType, IntPtr textPtr, - IntPtr promptTextPtr, IntPtr sourceURL - ) { - var browser = GetBrowser(browserId); - if (!browser) return; - - var text = Util.PtrToStringUTF8(textPtr); - var promptText = Util.PtrToStringUTF8(promptTextPtr); - //var url = Util.PtrToStringUTF8(urlPtr); - - lock (browser.thingsToDo) browser.thingsToDo.Add(() => { - browser.CreateDialogHandler(); - browser.dialogHandler.HandleDialog(dialogType, text, promptText); - }); - } - - [MonoPInvokeCallback(typeof(BrowserNative.ShowContextMenuFunc))] - private static void CB_ShowContextMenuFunc( - int browserId, string json, int x, int y, BrowserNative.ContextMenuOrigin origin - ) { - var browser = GetBrowser(browserId); - if (!browser) return; - - if (json != null && (browser.allowContextMenuOn & origin) == 0) { - //ignore this - BrowserNative.zfb_sendContextMenuResults(browserId, -1); - return; - } - - lock (browser.thingsToDo) browser.thingsToDo.Add(() => { - if (json != null) browser.CreateDialogHandler(); - if (browser.dialogHandler != null) browser.dialogHandler.HandleContextMenu(json, x, y); - }); - } - - [MonoPInvokeCallback(typeof(BrowserNative.ConsoleFunc))] - private static void CB_ConsoleFunc(int browserId, string message, string source, int line) { - var browser = GetBrowser(browserId); - if (!browser) return; - - lock (browser.thingsToDo) browser.thingsToDo.Add(() => { - browser.onConsoleMessage(message, source + ":" + line); - }); - } - - [MonoPInvokeCallback(typeof(BrowserNative.ReadyFunc))] - private static void CB_ReadyFunc(int browserId) { - var browser = GetBrowser(browserId); - if (!browser) return; - - //We could be on any thread at this time, so schedule the callbacks to fire during the next InputUpdate - lock (browser.thingsToDo) browser.thingsToDo.Add(() => { - browser.browserId = browserId; - - // ReSharper disable once PossibleNullReferenceException - browser.onNativeReady(browserId); - }); - } - - [MonoPInvokeCallback(typeof(BrowserNative.NavStateFunc))] - private static void CB_NavStateFunc(int browserId, bool canGoBack, bool canGoForward, bool lodaing, IntPtr urlRaw) { - var browser = GetBrowser(browserId); - if (!browser) return; - - var url = Util.PtrToStringUTF8(urlRaw); - - lock (browser.thingsToDo) browser.thingsToDo.Add(() => { - browser.navState.canGoBack = canGoBack; - browser.navState.canGoForward = canGoForward; - browser.navState.loading = lodaing; - browser.navState.url = url; - - browser._url = url;//update the inspector - - browser.onNavStateChange(); - }); - } - - [MonoPInvokeCallback(typeof(BrowserNative.NewWindowFunc))] - private static void CB_NewWindowFunc(int creatorBrowserId, int newBrowserId, IntPtr urlPtr) { - var browser = GetBrowser(creatorBrowserId); - if (!browser) return; - - #if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX - var url = Util.PtrToStringUTF8(urlPtr); - if (url == "about:inspector" || browser.newWindowAction == NewWindowAction.NewWindow) lock (browser.thingsToDo) { - browser.thingsToDo.Add(() => { - PopUpBrowser.Create(newBrowserId); - }); - return; - } - #endif - - lock (browser.thingsToDo) { - browser.thingsToDo.Add(() => { - var newBrowser = browser.newWindowHandler.CreateBrowser(browser); - newBrowser.RequestNativeBrowser(newBrowserId); - }); - } - } -} - -} \ No newline at end of file diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserCallbacks.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserCallbacks.cs.meta deleted file mode 100644 index 0b12872f..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserCallbacks.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a30036008e7d3434291fcfba205bf239 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserCursor.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserCursor.cs deleted file mode 100644 index 842002cf..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserCursor.cs +++ /dev/null @@ -1,170 +0,0 @@ -using System; -using UnityEngine; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using CursorType = ZenFulcrum.EmbeddedBrowser.BrowserNative.CursorType; -using Object = UnityEngine.Object; - -namespace ZenFulcrum.EmbeddedBrowser { - -/** - * Manages finding and copying cursors for you. - * Each instance has one active cursor and a Texture2D you can read from to use it. - */ -public class BrowserCursor { - public class CursorInfo { - public int atlasOffset; - public Vector2 hotspot; - } - - private static Dictionary mapping = new Dictionary(); - - private static bool loaded = false; - - private static int size; - private static Texture2D allCursors; - - /// - /// Fired when the mouse cursor's appearance or hotspot changes. - /// Also fired when the mouse enters/leaves the browser. - /// - public event Action cursorChange = () => {}; - - private static void Load() { - if (loaded) return; - allCursors = Resources.Load("Browser/Cursors"); - if (!allCursors) throw new Exception("Failed to find browser allCursors"); - - size = allCursors.height; - - var listObj = Resources.Load("Browser/Cursors"); - - foreach (var row in listObj.text.Split('\n')) { - var info = row.Split(','); - - var k = (CursorType)Enum.Parse(typeof(CursorType), info[0]); - var v = new CursorInfo() { - atlasOffset = int.Parse(info[1]), - hotspot = new Vector2(int.Parse(info[2]), int.Parse(info[3])), - }; - mapping[k] = v; - } - - loaded = true; - } - - /** - * Texture for the current cursor. - * If the cursor should be hidden, this will be null. - */ - public virtual Texture2D Texture { get; protected set; } - - /** - * Hotspot for the current cursor. (0, 0) indicates the top-left of the texture is the hotspot. - * (1, 1) indicates the bottom-right. - */ - public virtual Vector2 Hotspot { get; protected set; } - - private bool _hasMouse; - /// - /// True when the mouse is over the browser, false otherwise. - /// - public bool HasMouse { - get { - return _hasMouse; - } - set { - _hasMouse = value; - cursorChange(); - } - } - - protected Texture2D normalTexture; - protected Texture2D customTexture; - - public BrowserCursor() { - Load(); - - normalTexture = new Texture2D(size, size, TextureFormat.ARGB32, false); -#if UNITY_EDITOR - normalTexture.alphaIsTransparency = true; -#endif - - SetActiveCursor(BrowserNative.CursorType.Pointer); - } - - /// - /// Switches the active cursor type. After calling this you can access the cursor image through this.Texture. - /// - /// - public virtual void SetActiveCursor(CursorType type) { - if (type == CursorType.Custom) throw new ArgumentException("Use SetCustomCursor to set custom cursors.", "type"); - - if (type == CursorType.None) { - Texture = null; - //Side note: if you copy down a bunch of transparent pixels and try to set the mouse cursor to that - //both OS X and Windows fail to do what you'd expect. - //Edit: OS X is now crashing for me if you try to do that. - cursorChange(); - return; - } - - var info = mapping[type]; - var pixelData = allCursors.GetPixels(info.atlasOffset * size, 0, size, size); - - Hotspot = info.hotspot; - - normalTexture.SetPixels(pixelData); - - normalTexture.Apply(true); - - Texture = normalTexture; - - cursorChange(); - } - - /// - /// Sets a custom cursor. - /// - /// ARGB texture to set - /// - public virtual void SetCustomCursor(Texture2D cursor, Vector2 hotspot) { - var pixels = cursor.GetPixels32(); - - //First off, is it completely blank? 'Cuz if so that can cause OS X to crash. - var hasData = false; - for (int i = 0; i < pixels.Length; i++) { - if (pixels[i].a != 0) { - hasData = true; - break; - } - } - - if (!hasData) { - //it's blank, so handle it like a regular blank cursor - SetActiveCursor(CursorType.None); - return; - } - - if (!customTexture || customTexture.width != cursor.width || customTexture.height != cursor.height) { - Object.Destroy(customTexture); - customTexture = new Texture2D(cursor.width, cursor.height, TextureFormat.ARGB32, false); -#if UNITY_EDITOR - customTexture.alphaIsTransparency = true; -#endif - } - - customTexture.SetPixels32(pixels); - customTexture.Apply(true); - - this.Hotspot = hotspot; - - Texture = customTexture; - cursorChange(); - } - - -} - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserCursor.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserCursor.cs.meta deleted file mode 100644 index 384f25c2..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserCursor.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: d74b3f6909bb41f4c86d03a80156416f -timeCreated: 1448061720 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserInput.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserInput.cs deleted file mode 100644 index f5404d2e..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserInput.cs +++ /dev/null @@ -1,335 +0,0 @@ -#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX -#define ZF_OSX -#endif -#if UNITY_EDITOR_LINX || UNITY_STANDALONE_LINUX -#define ZF_LINUX -#endif - -using System.Collections.Generic; -using System.Runtime.InteropServices; -using UnityEngine; - -namespace ZenFulcrum.EmbeddedBrowser { - -/** Helper class for reading data from an IUIHandler, converting it, and feeding it to the native backend. */ -internal class BrowserInput { - - private readonly Browser browser; - - public BrowserInput(Browser browser) { - this.browser = browser; - } - - private bool kbWasFocused = false; - private bool mouseWasFocused = false; - - public void HandleInput() { - browser.UIHandler.InputUpdate(); - bool focusChanged = false; - - if (browser.UIHandler.MouseHasFocus || mouseWasFocused) { - HandleMouseInput(); - } - if (browser.UIHandler.MouseHasFocus != mouseWasFocused) { - browser.UIHandler.BrowserCursor.HasMouse = browser.UIHandler.MouseHasFocus; - focusChanged = true; - } - mouseWasFocused = browser.UIHandler.MouseHasFocus; - - - - if (kbWasFocused != browser.UIHandler.KeyboardHasFocus) focusChanged = true; - - if (browser.UIHandler.KeyboardHasFocus) { - if (!kbWasFocused) { - BrowserNative.zfb_setFocused(browser.browserId, kbWasFocused = true); - } - HandleKeyInput(); - } else { - if (kbWasFocused) { - BrowserNative.zfb_setFocused(browser.browserId, kbWasFocused = false); - } - } - - if (focusChanged) { - browser._RaiseFocusEvent(browser.UIHandler.MouseHasFocus, browser.UIHandler.KeyboardHasFocus); - } - } - - private static HashSet keysToReleaseOnFocusLoss = new HashSet(); - public List extraEventsToInject = new List(); - - private MouseButton prevButtons = 0; - private Vector2 prevPos; - - private class ButtonHistory { - public float lastPressTime; - public int repeatCount; - public Vector3 lastPosition; - - public void ButtonPress(Vector3 mousePos, IBrowserUI uiHandler, Vector2 browserSize) { - var now = Time.realtimeSinceStartup; - - if (now - lastPressTime > uiHandler.InputSettings.multiclickSpeed) { - //too long ago? forget the past - repeatCount = 0; - } - - if (repeatCount > 0) { - //close enough to be a multiclick? - var p1 = Vector2.Scale(mousePos, browserSize); - var p2 = Vector2.Scale(lastPosition, browserSize); - if (Vector2.Distance(p1, p2) > uiHandler.InputSettings.multiclickTolerance) { - repeatCount = 0; - } - } - - repeatCount++; - - lastPressTime = now; - lastPosition = mousePos; - } - } - - private readonly ButtonHistory leftClickHistory = new ButtonHistory(); - - private void HandleMouseInput() { - var handler = browser.UIHandler; - var mousePos = handler.MousePosition; - - var currentButtons = handler.MouseButtons; - var mouseScroll = handler.MouseScroll; - - if (mousePos != prevPos) { - BrowserNative.zfb_mouseMove(browser.browserId, mousePos.x, 1 - mousePos.y); - } - - FeedScrolling(mouseScroll, handler.InputSettings.scrollSpeed); - - var leftChange = (prevButtons & MouseButton.Left) != (currentButtons & MouseButton.Left); - var leftDown = (currentButtons & MouseButton.Left) == MouseButton.Left; - var middleChange = (prevButtons & MouseButton.Middle) != (currentButtons & MouseButton.Middle); - var middleDown = (currentButtons & MouseButton.Middle) == MouseButton.Middle; - var rightChange = (prevButtons & MouseButton.Right) != (currentButtons & MouseButton.Right); - var rightDown = (currentButtons & MouseButton.Right) == MouseButton.Right; - - if (leftChange) { - if (leftDown) leftClickHistory.ButtonPress(mousePos, handler, browser.Size); - BrowserNative.zfb_mouseButton( - browser.browserId, BrowserNative.MouseButton.MBT_LEFT, leftDown, - leftDown ? leftClickHistory.repeatCount : 0 - ); - } - if (middleChange) { - //no double-clicks, to be consistent with other browsers - BrowserNative.zfb_mouseButton( - browser.browserId, BrowserNative.MouseButton.MBT_MIDDLE, middleDown, 1 - ); - } - if (rightChange) { - //no double-clicks, to be consistent with other browsers - BrowserNative.zfb_mouseButton( - browser.browserId, BrowserNative.MouseButton.MBT_RIGHT, rightDown, 1 - ); - } - - prevPos = mousePos; - prevButtons = currentButtons; - } - - private Vector2 accumulatedScroll; - private float lastScrollEvent; - /// - /// How often (in sec) we can send scroll events to the browser without it choking up. - /// The right number seems to depend on how hard the page is to render, so there's not a perfect number. - /// Hopefully this one works well, though. - /// - private const float maxScrollEventRate = 1 / 15f; - - /// - /// Feeds scroll events to the browser. - /// In particular, it will clump together scrolling "floods" into fewer larger scrolls - /// to prevent the backend from getting choked up and taking forever to execute the requests. - /// - /// - private void FeedScrolling(Vector2 mouseScroll, float scrollSpeed) { - accumulatedScroll += mouseScroll * scrollSpeed; - - if (accumulatedScroll.sqrMagnitude != 0 && Time.realtimeSinceStartup > lastScrollEvent + maxScrollEventRate) { - //Debug.Log("Do scroll: " + accumulatedScroll); - - //The backend seems to have trouble coping with horizontal AND vertical scroll. So only do one at a time. - //(And if we do both at once, vertical appears to get priority and horizontal gets ignored.) - - if (Mathf.Abs(accumulatedScroll.x) > Mathf.Abs(accumulatedScroll.y)) { - BrowserNative.zfb_mouseScroll(browser.browserId, (int)accumulatedScroll.x, 0); - accumulatedScroll.x = 0; - accumulatedScroll.y = Mathf.Round(accumulatedScroll.y * .5f);//reduce the thing we weren't doing so it's less likely to accumulate strange - } else { - BrowserNative.zfb_mouseScroll(browser.browserId, 0, (int)accumulatedScroll.y); - accumulatedScroll.x = Mathf.Round(accumulatedScroll.x * .5f); - accumulatedScroll.y = 0; - } - - lastScrollEvent = Time.realtimeSinceStartup; - } - } - - private void HandleKeyInput() { - var keyEvents = browser.UIHandler.KeyEvents; - if (keyEvents.Count > 0) HandleKeyInput(keyEvents); - - if (extraEventsToInject.Count > 0) { - HandleKeyInput(extraEventsToInject); - extraEventsToInject.Clear(); - } - } - - private void HandleKeyInput(List keyEvents) { - -#if ZF_OSX - ReconstructInputs(keyEvents); -#endif - - foreach (var ev in keyEvents) { - var keyCode = KeyMappings.GetWindowsKeyCode(ev); - if (ev.character == '\n') ev.character = '\r';//'cuz that's what Chromium expects - - if (ev.character == 0) { - if (ev.type == EventType.KeyDown) keysToReleaseOnFocusLoss.Add(ev.keyCode); - else keysToReleaseOnFocusLoss.Remove(ev.keyCode); - } - -// if (false) { -// if (ev.character != 0) Debug.Log("k >>> " + ev.character); -// else if (ev.type == EventType.KeyUp) Debug.Log("k ^^^ " + ev.keyCode); -// else if (ev.type == EventType.KeyDown) Debug.Log("k vvv " + ev.keyCode); -// } - - FireCommands(ev); - - if (ev.character != 0 && ev.type == EventType.KeyDown) { -#if ZF_LINUX - //It seems, on Linux, we don't get keydown, keypress, keyup, we just get a keypress, keyup. - //So, fire the keydown just before the keypress. - BrowserNative.zfb_keyEvent(browser.browserId, true, keyCode); - //Thanks for being consistent, Unity. -#endif - - BrowserNative.zfb_characterEvent(browser.browserId, ev.character, keyCode); - } else { - BrowserNative.zfb_keyEvent(browser.browserId, ev.type == EventType.KeyDown, keyCode); - } - } - } - - public void HandleFocusLoss() { - foreach (var keyCode in keysToReleaseOnFocusLoss) { - //Debug.Log("Key " + keyCode + " is held, release"); - var wCode = KeyMappings.GetWindowsKeyCode(new Event() { keyCode = keyCode }); - BrowserNative.zfb_keyEvent(browser.browserId, false, wCode); - } - - keysToReleaseOnFocusLoss.Clear(); - } - -#if ZF_OSX - /** Used by ReconstructInputs */ - protected HashSet pressedKeys = new HashSet(); - - /** - * OS X + Unity has issues. - * - * Mac editor: If I press cmd+A: The "keydown A" event doesn't get sent, - * though we do get a keypress A and a keyup A. - * Mac player: We get duplicate keyUPs normally. If cmd is down we get duplicate keyDOWNs instead. - */ - protected void ReconstructInputs(List keyEvents) { - for (int i = 0; i < keyEvents.Count; ++i) {//int loop, not iterator, we mutate during iteration - var ev = keyEvents[i]; - - if (ev.type == EventType.KeyDown && ev.character == 0) { - pressedKeys.Add(ev.keyCode); - - //Repeated keydown events sent in the same frame are always bogus (but valid if in different - //frames for held key repeats) - //Remove duplicated key down events in this tick. - for (int j = i + 1; j < keyEvents.Count; ++j) { - if (keyEvents[j].Equals(ev)) keyEvents.RemoveAt(j--); - } - } else if (ev.type == EventType.KeyDown) { - //key down with character. - //...did the key actually get pressed, though? - if (ev.keyCode != KeyCode.None && !pressedKeys.Contains(ev.keyCode)) { - //no. insert a keydown before the press - var downEv = new Event(ev) { - type = EventType.KeyDown, - character = (char)0 - }; - keyEvents.Insert(i++, downEv); - pressedKeys.Add(ev.keyCode); - } - } else if (ev.type == EventType.KeyUp) { - if (!pressedKeys.Contains(ev.keyCode)) { - //Ignore duplicate key up events - keyEvents.RemoveAt(i--); - } - - pressedKeys.Remove(ev.keyCode); - } - - } - } -#endif - - /** - * OS X + Unity has issues. - * Commands won't be run if the command is not in the application menu. - * Here we trap keystrokes and manually fire the relevant events in the browser. - * - * Also, ctrl+A stopped working with CEF at some point on Windows. - */ - protected void FireCommands(Event ev) { - -#if ZF_OSX - if (ev.type != EventType.KeyDown || ev.character != 0 || !ev.command) return; - - switch (ev.keyCode) { - case KeyCode.C: - browser.SendFrameCommand(BrowserNative.FrameCommand.Copy); - break; - case KeyCode.X: - browser.SendFrameCommand(BrowserNative.FrameCommand.Cut); - break; - case KeyCode.V: - browser.SendFrameCommand(BrowserNative.FrameCommand.Paste); - break; - case KeyCode.A: - browser.SendFrameCommand(BrowserNative.FrameCommand.SelectAll); - break; - case KeyCode.Z: - if (ev.shift) browser.SendFrameCommand(BrowserNative.FrameCommand.Redo); - else browser.SendFrameCommand(BrowserNative.FrameCommand.Undo); - break; - case KeyCode.Y: - //I, for one, prefer Y for redo, but shift+Z is more idiomatic on OS X - //Support both. - browser.SendFrameCommand(BrowserNative.FrameCommand.Redo); - break; - } - -#else - //mmm, yeah. I guess Unity doesn't send us the keydown on a ctrl+a keystroke anymore. - if (ev.type != EventType.KeyUp || !ev.control) return; - - switch (ev.keyCode) { - case KeyCode.A: - browser.SendFrameCommand(BrowserNative.FrameCommand.SelectAll); - break; - } -#endif - } - -} - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserInput.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserInput.cs.meta deleted file mode 100644 index 01dce9e7..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserInput.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: d00cb9636aac20d4989efeaf7de81909 -timeCreated: 1450218467 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserNative.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserNative.cs deleted file mode 100644 index e0b7b220..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserNative.cs +++ /dev/null @@ -1,1135 +0,0 @@ -#if UNITY_EDITOR_WIN || (UNITY_STANDALONE_WIN && !UNITY_EDITOR) -#define ZF_WINDOWS -#endif - -#define PROXY_BROWSER_API - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using UnityEngine; -using System.Runtime.InteropServices; -using System.Text; -using UnityEngine.Assertions; -using System.Reflection; -using AOT; -using UnityEngine.Profiling; -#if UNITY_EDITOR -using UnityEditor; -using System.Diagnostics; -using Debug = UnityEngine.Debug; -#endif - - - -// ReSharper disable InconsistentNaming - -namespace ZenFulcrum.EmbeddedBrowser { - -/** - * Wrapper/native callbacks for CEF browser implementation. - * When changing code in this file you may have to restart the Unity Editor for things to get working again. - * - * Note that callbacks given to the native side may be invoked on any thread. - * - * Make sure IntPtrs are pinned and callbacks are kept alive from GC while their object lives. - */ -public static class BrowserNative { -#if UNITY_EDITOR - public const int DebugPort = 9848; -#else - public const int DebugPort = 9849; -#endif - - public static bool NativeLoaded { get; private set; } - - public static bool SymbolsLoaded { get; private set; } - - /// - /// Lock this object before touching any of the zfb_* functions outside the main thread. - /// (While many of them are thread safe, the shared library can be unloaded, leading - /// to a possible race condition at shutdown. For example thread A grabs the value of zfb_sendRequestData, - /// the main thread unloads the shared library, then thread A tries to execute the pointer it has for - /// zfb_sendRequestData, resulting in sadness.) - /// - public static readonly object symbolsLock = new object(); - -#if PROXY_BROWSER_API - public const bool UsingAPIProxy = true; -#else - public const bool UsingAPIProxy = false; -#endif - - /** - * List of command-line switches given to Chromium. - * http://peter.sh/experiments/chromium-command-line-switches/ - * - * If you want to change this, be sure to change it before LoadNative gets called. - * - * Adding or removing flags may lead to instability and/or insecurity. - * Make sure you understand what a flag does before you use it. - * Be sure to test your use cases thoroughly after changing any flags as - * things are more likely to crash or break if you aren't using the default - * configuration. - * - * Extra non-Chromium arguments: - * --zf-cef-log-verbose - * if enabled, we'll write a lot more CEF/Chromium logging to your editor/player log file than usual - * --zf-log-internal - * If enabled, some extra logs will be dumped to the current working directory. - * - */ - public static List commandLineSwitches = new List() { - //Smooth scrolling tends to make scrolling act wonky or break. - "--disable-smooth-scrolling", - - //If you install the PPAPI version of Flash on your system this tells Chromium to try to use it. - //(download at https://get.adobe.com/flashplayer/otherversions/) - "--enable-system-flash", - //For Linux use probably need something like this instead (see docs) - //"--ppapi-flash-version=29.0.0.113", "--ppapi-flash-path=/usr/lib/adobe-flashplugin/libpepflashplayer.so", - - //getUserMedia (microphone/webcam). - //Turning this on has security implications, it appears there's no - //CEF API for authorizing access, it just allows it. (ergo, any website can record the user) - //"--enable-media-stream", - - //Enable these to get a higher browser framerate at the expense of more CPU usage: - // "--disable-gpu-vsync", - - //If you want to specify a proxy by hand: - //"--proxy-server=localhost:8000", - - - //"--zf-log-cef-verbose", - //"--zf-log-internal", - }; - - /** - * WebResources used to resolve local requests. - * - * This may be replaced with an implementation of your choice, but be sure to set it up before requesting - * any URLs. - */ - public static WebResources webResources; - public static string LocalUrlPrefix { get { return "https://game.local/"; } } - - [MonoPInvokeCallback(typeof(MessageFunc))] - private static void LogCallback(string message) { - Debug.Log("ZFWeb: " + message); - } - - /// - /// Because AppDomain.CurrentDomain.IsFinalizingForUnload() doesn't work and we don't like crashing the - /// Unity Editor. - /// - private static bool isAppDomainUnloading = false; - - private static string _profilePath = null; - /** - * Where should we save the user's data and cookies? Leave null to not save them. - * Set before the browser system initializes. Also, restart the Editor to apply changes. - */ - public static string ProfilePath { - get { return _profilePath; } - set { - if (NativeLoaded) throw new InvalidOperationException("ProfilePath must be set before initializing the browser system."); - _profilePath = value; - } - } - - /** - * Loads the shared library and the function symbols so we can call zfb_* functions. - */ - public static void LoadSymbols() { - if (SymbolsLoaded) return; - - if (isAppDomainUnloading) { - throw new Exception("Tried to start up browser backend while unloading app domain."); - } - - var dirs = FileLocations.Dirs; - - HandLoadSymbols(dirs.binariesPath); - } - - - public static void LoadNative() { - if (NativeLoaded) return; - - Profiler.BeginSample("BrowserNative.LoadNative"); - - if (webResources == null) { - //if the user hasn't given us a WebResources to use, use the default -#if UNITY_EDITOR - webResources = new EditorWebResources(); -#else - var swr = new StandaloneWebResources(Application.dataPath + "/" + StandaloneWebResources.DefaultPath); - swr.LoadIndex(); - webResources = swr; -#endif - } - - - //For Editor/debug builds, we'll open a port you can just http:// to inspect pages. - //Don't do this for real builds, though. It makes it really, really easy for the end user to call - //random JS in the page, potentially affecting or bypassing game logic. - var debugPort = Debug.isDebugBuild ? DebugPort : 0; - - - var dirs = FileLocations.Dirs; - -#if UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX - FixProcessPermissions(dirs); -#endif - - -#if UNITY_STANDALONE_WIN && !UNITY_EDITOR - //make sure the child processes can be started (their dependent .dlls are next to the main .exe, not in the Plugins folder) - var loadDir = Directory.GetParent(Application.dataPath).FullName; - var path = Environment.GetEnvironmentVariable("PATH"); - path += ";" + loadDir; - Environment.SetEnvironmentVariable("PATH", path); -#elif UNITY_EDITOR_WIN - //help it find our .dlls - var path = Environment.GetEnvironmentVariable("PATH"); - path += ";" + dirs.binariesPath; - Environment.SetEnvironmentVariable("PATH", path); -#endif - - LoadSymbols(); - - StandaloneShutdown.Create(); - - //There never should be any, but just in case, destroy any existing browsers on a re-init - zfb_destroyAllBrowsers(); - - //Caution: Careful with these functions you pass to native. The Unity Editor will - //reload assemblies, leaving the function pointers dangling. If any native calls try to use them - //before we load back up and re-register them we can crash. - //To prevent this, we call zfb_setCallbacksEnabled to disable callbacks before we get unloaded. - zfb_setDebugFunc(LogCallback); - zfb_setLocalRequestHandler(NewRequestCallback); - zfb_setCallbacksEnabled(true); - - var settings = new ZFBInitialSettings() { - cefPath = dirs.resourcesPath, - localePath = dirs.localesPath, - subprocessFile = dirs.subprocessFile, - userAgent = UserAgent.GetUserAgent(), - logFile = dirs.logFile, - profilePath = _profilePath, - debugPort = debugPort, - multiThreadedMessageLoop = 0,//this argument is pretty much defunct, the slave just blocks on CefRunMessageLoop on all platforms - }; - - foreach (var arg in commandLineSwitches) zfb_addCLISwitch(arg); - - var initRes = zfb_init(settings); - if (!initRes) throw new Exception("Failed to initialize browser system."); - - NativeLoaded = true; - Profiler.EndSample(); - - AppDomain.CurrentDomain.DomainUnload += (sender, args) => { - isAppDomainUnloading = true; - - //Shutdown should happen StandaloneShutdown, but in some cases, like the Unity Editor - //reloading assemblies, we don't get OnApplicationQuit because we didn't "quit", even though - //everything gets shut down. - //Make sure the backend shuts down, in this case, or it will crash when we try to start it again. - UnloadNative(); - }; - } - - private static void FixProcessPermissions(FileLocations.CEFDirs dirs) { - /* - * The package we get from the Asset Store probably won't have the right executable permissions for - * ZFGameBrowser for OS X, so let's fix that for the user right now. - */ - - var attrs = (uint)File.GetAttributes(dirs.subprocessFile); - - //From https://github.com/mono/mono/blob/master/mono/io-layer/io.c under SetFileAttributes() (also noted in FileAttributes.cs): - //"Currently we only handle one *internal* case [...]: 0x80000000, which means `set executable bit'" - //Let's use that now. - attrs |= 0x80000000; - - //Make it executable. - File.SetAttributes(dirs.subprocessFile, unchecked((FileAttributes)attrs)); - } - - - private static IntPtr moduleHandle; - /// - /// Loads the browser symbols. - /// - /// We don't use DllImport for a few reasons, historically for DEEPBIND support and multiple CEF versions in the same process, - /// but now mostly so we can unload the .dll whenever we want and to simplify picking and loading our shared library how we want. - /// - /// - private static void HandLoadSymbols(string binariesPath) { - Profiler.BeginSample("BrowserNative.HandLoadSymbols"); - -#if PROXY_BROWSER_API - var coreType = "ZFProxyWeb"; -#else - var coreType = "ZFEmbedWeb"; -#endif - -#if UNITY_EDITOR_OSX || (!UNITY_EDITOR && UNITY_STANDALONE_OSX) - var libFile = binariesPath + "/lib" + coreType + ".dylib"; -#elif UNITY_EDITOR_LINUX || (!UNITY_EDITOR && UNITY_STANDALONE_LINUX) - var libFile = binariesPath + "/lib" + coreType + ".so"; -#elif UNITY_EDITOR_WIN || (!UNITY_EDITOR && UNITY_STANDALONE_WIN) - var libFile = binariesPath + "/" + coreType + ".dll"; -#else - #error Unknown OS. -#endif - - //Debug.Log("Loading " + libFile); - - moduleHandle = OpenLib(libFile); - - //Now go through and fill our functions with life. - int i = 0; - var fields = typeof(BrowserNative).GetFields(BindingFlags.Static | BindingFlags.Public); - foreach (var field in fields) { - if (!field.Name.StartsWith("zfb_")) continue; - - var fp = GetFunc(moduleHandle, field.Name); - - var func = Marshal.GetDelegateForFunctionPointer(fp, field.FieldType); - field.SetValue(null, func); - ++i; - } - - //Debug.Log("Loaded " + i + " symbols"); - - SymbolsLoaded = true; - - Profiler.EndSample(); - } - - /// - /// Clears out the symbols so, if the shared library has been unloaded, we get null exceptions instead - /// of crashes. - /// - private static void ClearSymbols() { - SymbolsLoaded = false; - - var fields = typeof(BrowserNative).GetFields(BindingFlags.Static | BindingFlags.Public); - foreach (var field in fields) { - if (!field.Name.StartsWith("zfb_")) continue; - field.SetValue(null, null); - } - } - - - private static string GetLibError() { -#if ZF_WINDOWS - return new System.ComponentModel.Win32Exception(Marshal.GetLastWin32Error()).Message; -#else - return Marshal.PtrToStringAnsi(dlerror()); -#endif - } - - private static IntPtr OpenLib(string name) { -#if ZF_WINDOWS - var handle = LoadLibraryW(name); - if (handle == IntPtr.Zero) { -// throw new DllNotFoundException("ZFBrowser failed to load " + name + ": " + Marshal.GetLastWin32Error()); - throw new DllNotFoundException("ZFBrowser failed to load " + name + ": " + - new System.ComponentModel.Win32Exception(Marshal.GetLastWin32Error()).Message - ); - } - return handle; -#else - //Call this now because running a DllImport method the first time will end up calling dlerror - //which will clear the error we were trying to get from dlerror. - dlerror(); - - var handle = dlopen(name, (int)(DLFlags.RTLD_LAZY)); - if (handle == IntPtr.Zero) { - throw new DllNotFoundException("ZFBrowser failed to load " + name + ": " + getDlError()); - } - return handle; -#endif - } - - private static void CloseLib() { - if (moduleHandle == IntPtr.Zero) return; - - ClearSymbols(); - -#if ZF_WINDOWS - var success = FreeLibrary(moduleHandle); -#else - var success = dlclose(moduleHandle) == 0; -#endif - - if (!success) { - throw new DllNotFoundException( - "Failed to unload library: " + - GetLibError() - ); - } - - //Debug.Log("Unloaded shared library"); - - moduleHandle = IntPtr.Zero; - } - - private static IntPtr GetFunc(IntPtr libHandle, string fnName) { -#if ZF_WINDOWS - var addr = GetProcAddress(libHandle, fnName); - if (addr == IntPtr.Zero) { - throw new DllNotFoundException("ZFBrowser failed to load method " + fnName + ": " + Marshal.GetLastWin32Error()); - } - return addr; -#else - var fp = dlsym(libHandle, fnName); - if (fp == IntPtr.Zero) { - throw new DllNotFoundException("ZFBrowser failed to load method " + fnName + ": " + getDlError()); - } - return fp; -#endif - } - -#if !ZF_WINDOWS - [Flags] - public enum DLFlags { - RTLD_LAZY = 1, - RTLD_NOW = 2, - RTLD_DEEPBIND = 8, - } - [DllImport("__Internal")] static extern IntPtr dlopen(string filename, int flags); - [DllImport("__Internal")] static extern IntPtr dlsym(IntPtr handle, string symbol); - [DllImport("__Internal")] static extern int dlclose(IntPtr handle); - [DllImport("__Internal")] static extern IntPtr dlerror(); - private static string getDlError() { - var err = dlerror(); - return Marshal.PtrToStringAnsi(err); - } - -#else - [DllImport("kernel32", SetLastError = true, CharSet = CharSet.Ansi)] - static extern IntPtr LoadLibraryW([MarshalAs(UnmanagedType.LPWStr)]string lpFileName); - [DllImport("kernel32", CharSet = CharSet.Ansi, ExactSpelling = true, SetLastError = true)] - static extern IntPtr GetProcAddress(IntPtr hModule, string procName); - [DllImport("kernel32", SetLastError = true)] - private static extern bool FreeLibrary(IntPtr hModule); -#endif - - [MonoPInvokeCallback(typeof(NewRequestFunc))] - private static void NewRequestCallback(int requestId, string url) { - webResources.HandleRequest(requestId, url); - } - - - /** Shuts down the native browser library and CEF. */ - public static void UnloadNative() { - if (!NativeLoaded) return; - - lock (symbolsLock) { - //Debug.Log("Stop CEF"); - - zfb_destroyAllBrowsers(); - zfb_shutdown(); - zfb_setCallbacksEnabled(false); - NativeLoaded = false; - CloseLib(); - } - } - - - /** Call this with a message to debug it to a console somewhere. */ - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void MessageFunc(string message); - - /** - * Callback for starting a new local request. - * url is the url requested - * At present only GET requests with no added headers are supported. - * After this is called, you are responsible for calling zfb_sendRequestHeaders (once) - * then zfb_sendRequestData (as much as needed) to finish up the request. - */ - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void NewRequestFunc(int requestId, string url); - - - /** Called when the native backend is ready to start receiving orders. */ - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void ReadyFunc(int browserId); - - /** Called on console.log, console.err, etc. */ - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void ConsoleFunc(int browserId, string message, string source, int line); - - /** - * Called when JS calls back to us. - * callbackId is the first argument, - * data (UTF-8 null-terminated string) (and its included size) are the second argument. - */ - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void ForwardJSCallFunc(int browserId, int callbackId, string data, int size); - - /** - * Called when a browser opens a new window. - * creatorBrowserId - id of the browser that cause the window to be created - * newBrowserId - a newly created (as if by zfb_createBrowser) browser tab - * - * May be called on any thread. - */ - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void NewWindowFunc(int creatorBrowserId, int newBrowserId, IntPtr initialURL); - - /** - * Called when an item from ChangeType happens. - * See the documentation for the given ChangeType for info on what the args mean or how to get more information. - */ - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void ChangeFunc(int browserId, ChangeType changeType, string arg1); - - /** - * This is called when the browser wants to display a dialog of some sort. - * dialogType - the type, or DLT_HIDE to hide any existing dialogs. - * dialogText - main text for the dialog, usually from in-page JavaScript - * initialPromptText - if we are doing a JavaScript prompt(), the default text to display - * sourceURL - the URL of the page that is causing the dialog - * - * Once the user has responded to the dialog (if we were showing one), call zfb_sendDialogResults - * with the user's input. - */ - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void DisplayDialogFunc( - int browserId, DialogType dialogType, IntPtr dialogText, - IntPtr initialPromptText, IntPtr sourceURL - ); - - /** - * Called by the backend when a context menu should be shown or hidden. - * If menuJSON is null, hide the context menu. - * If it's not, show the given menu and eventually call zfb_sendContextMenuResults. - * For more information on the menu format, look at BrowserDialogs.html - * - * x and y report the position the menu was summoned, relative to the top-left of the view. - * origin indicates on what type of item the context menu was created. - */ - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void ShowContextMenuFunc(int browserId, string menuJSON, int x, int y, ContextMenuOrigin origin); - - /** - * Used with zfb_getCookies, this will be called once for each cookie. - */ - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GetCookieFunc(NativeCookie cookie); - - /** - * Called when nav state (can go back/forward, loaded, url) changes. - */ - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void NavStateFunc(int browserId, bool canGoBack, bool canGoForward, bool lodaing, IntPtr url); - - /** - * Called by a native OS windows gets an event like mouse move click, etc. - * data contains json details on the event - */ - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void WindowCallbackFunc(int windowId, IntPtr data); - - - - public enum LoadChange : int { - LC_STOP = 1, - LC_RELOAD, - LC_FORCE_RELOAD, - } - - public enum MouseButton : int { - MBT_LEFT = 0, - MBT_MIDDLE, - MBT_RIGHT, - } - - public enum ChangeType : int { - /** The cursor has changed. Use zfb_getMouseCursor/zfb_getMouseCustomCursor to see what it is now. */ - CHT_CURSOR = 0, - /** The browser has been closed and can no longer receive commands. */ - CHT_BROWSER_CLOSE, - /** - * We have the HTML for the top-level page. - * arg1 (JSON) contains HTTP {status} code and the {url} - * Note that successfully fetching errors from a server (404, 500) are treated - * as successful, CHT_FETCH_FAILED won't be triggered. - */ - CHT_FETCH_FINISHED, - /** - * Failed to fetch a page (timeout, network issues, etc) - * arg1 (JSON) contains an {error} code and the {url} - */ - CHT_FETCH_FAILED, - /** - * The page has reached onload - * arg1 (JSON) contains HTTP {status} code and the {url} - */ - CHT_LOAD_FINISHED, - /** SSL certificate error. arg1 has some JSON about the issue. Often followed by a CHT_FETCH_FAILED */ - CHT_CERT_ERROR, - /** Renderer process crashed/was killed/etc. */ - CHT_SAD_TAB, - /** - * The user/page has initialized a download. - * arg1 (JSON) contains: - * download {id} - * {mimeType} - * {url} of the download - * {originalURL} of the download before redirection - * {suggestedName} you might save the file as - * {size} number of bytes in the download (if known) - * {contentDisposition} - * - * Call zfb_downloadCommand(browserId, download["id"], DownloadAction.xxyy, fileName) to cancel or save the file - * (and afterward control it). - */ - CHT_DOWNLOAD_STARTED, - /** - * Progress/status update on a download. - * arg1 (JSON) contains: - * download {id} - * {speed} in bytes/sec - * {percentComplete} int in [0, 100], or -1 if unknown - * {received} number of bytes received - * {statusStr} download status. One of: complete, canceled, working, unknown - * {fullPath} we are saving to. (If you had the user pick the destination you can get it here.) - * - * Call zfb_downloadCommand(browserId, download["id"], DownloadAction.xxyy, null) to cancel/pause/resume the download. - */ - CHT_DOWNLOAD_STATUS, - /** - * The element with keyboard focus has changed. - * You can use this to show/hide a keyboard when needed. - * arg1 (JSON) contains: - * {tagName} of the focused node, or empty of no node is focused (focus loss) - * {editable} true if it's some sort of editable text - * textual {value} of the node, if it's simple (doesn't work for things like ContentEditable nodes) - */ - CHT_FOCUSED_NODE, - } - - public enum DownloadAction { - Begin, - Cancel, - Pause, - Resume, - } - - /** @see cef_cursor_type_t in cef_types.h */ - public enum CursorType : int { - Pointer = 0, - Cross, - Hand, - IBeam, - Wait, - Help, - EastResize, - NorthResize, - NorthEastResize, - NorthWestResize, - SouthResize, - SouthEastResize, - SouthWestResize, - WestResize, - NorthSouthResize, - EastWestResize, - NorthEastSouthWestResize, - NorthWestSouthEastResize, - ColumnResize, - RowResize, - MiddlePanning, - EastPanning, - NorthPanning, - NorthEastPanning, - NorthWestPanning, - SouthPanning, - SouthEastPanning, - SouthWestPanning, - WestPanning, - Move, - VerticalText, - Cell, - ContextMenu, - Alias, - Progress, - NoDrop, - Copy, - None, - NotAllowed, - ZoomIn, - ZoomOut, - Grab, - Grabbing, - Custom, - } - - public enum DialogType { - DLT_HIDE = 0, - DLT_ALERT, - DLT_CONFIRM, - DLT_PROMPT, - DLT_PAGE_UNLOAD, - DLT_PAGE_RELOAD,//like unload, but the user is just refreshing the page - DLT_GET_AUTH, - }; - - public enum NewWindowAction { - NWA_IGNORE = 1, - NWA_REDIRECT, - NWA_NEW_BROWSER, - NWA_NEW_WINDOW, - }; - - [Flags] - public enum ContextMenuOrigin { - Editable = 1 << 1, - Image = 1 << 2, - Selection = 1 << 3, - Other = 1 << 0, - } - - public enum FrameCommand { - Undo, - Redo, - Cut, - Copy, - Paste, - Delete, - SelectAll, - ViewSource, - }; - - public enum CookieAction { - Delete, - Create, - }; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct ZFBInitialSettings { - public string cefPath, localePath, subprocessFile, userAgent, logFile, profilePath; - public int debugPort, multiThreadedMessageLoop; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct ZFBSettings { - public int bgR, bgG, bgB, bgA; - public int offscreen; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct RenderData { - public IntPtr pixels; - public int w, h; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public class NativeCookie { - public string name, value, domain, path; - public string creation, lastAccess, expires; - public byte secure, httpOnly; - } - - - - /* - * See HandLoadSymbols() for an explanation of what's going on here and why we use a bunch of delegates instead - * of DllImport. - * - * Don't use this API directly unless you want to deal with things breaking. - * Though it is accessible, it's not considered part of the public API for versioning purposes. - * That, and you can shoot yourself in the foot and crash your app. - * - * Also, if you want to call any of these functions off the main thread make sure: - * - It's documented as supporting such. - * - To acquire a lock on symbolsLock first. (See its docs for why.) - */ - - /** Does nothing. */ - public delegate void Calltype_zfb_noop(); - public static Calltype_zfb_noop zfb_noop; - - - /** - * Allocates and initializes a block of memory suitable for use with LoadRawTextureData to clear a texture - * to the given color. - * Call zfb_free on the pointer when your are done using it. - * Does not require the browser system to be initialized, thread safe. - */ - public delegate IntPtr Calltype_zfb_flatColorTexture(int pixelCount, int r, int g, int b, int a); - public static Calltype_zfb_flatColorTexture zfb_flatColorTexture; - - /** - * Copies from a zfb_getImage buffer to a Color32[] buffer. - * Does not require the browser system to be initialized, thread safe. - */ - public delegate void Calltype_zfb_copyToColor32(IntPtr src, IntPtr dest, int pixelCount); - public static Calltype_zfb_copyToColor32 zfb_copyToColor32; - - /** - * Some functions allocate memory to give you a response (see their docs). Call this to free it. - * Does not require the browser system to be initialized, thread safe. - */ - public delegate void Calltype_zfb_free(IntPtr mem); - public static Calltype_zfb_free zfb_free; - - - /** - * Plain old memcpy. Because sometimes Marshal.Copy falls short of our needs. - * Does not require the browser system to be initialized, thread safe. - */ - public delegate void Calltype_zfb_memcpy(IntPtr dst, IntPtr src, int size); - public static Calltype_zfb_memcpy zfb_memcpy; - - - /** - * Returns the Chrome(ium) version as a static C string. - * Does not require the browser system to be initialized, thread safe. - */ - public delegate IntPtr Calltype_zfb_getVersion(); - public static Calltype_zfb_getVersion zfb_getVersion; - - - /** Sets a function to call for Debug.Log-style messages. */ - public delegate void Calltype_zfb_setDebugFunc(MessageFunc debugFunc); - public static Calltype_zfb_setDebugFunc zfb_setDebugFunc; - - - /** Sets callbacks for when a local (https://game.local/) request is started. */ - public delegate void Calltype_zfb_setLocalRequestHandler(NewRequestFunc requestFunc); - public static Calltype_zfb_setLocalRequestHandler zfb_setLocalRequestHandler; - - /** - * Sends the headers for a response. - * responseLength should be the number of bytes in the response, or -1 if unknown. - * headersJSON should contain a string:string map of headers, JSON encoded - * - You should include a "Content-Type" header. - * - You may also include a ":status:" pseudoheader to set the status to a non-200 value - * - You may also include a ":statusText:" pseudoheader to set the status text - * After calling this, call zfb_sendRequestData to send the actual response body. - * - * May be called from any thread. - */ - public delegate void Calltype_zfb_sendRequestHeaders(int requestId, int responseLength, string headersJSON); - public static Calltype_zfb_sendRequestHeaders zfb_sendRequestHeaders; - - /** - * Sends the body for a response after calling zfb_sendRequestHeaders. - * - * You must always write at least one byte except as described below. - * - * If you sent a responseLength >= 0, make sure all calls to this function add up to exactly that value. - * If you sent a responseLength < 0, call this a final time with size = 0 to signify the - * end of the response. - * - * May be called from any thread. - */ - public delegate void Calltype_zfb_sendRequestData(int requestId, IntPtr data, int dataSize); - public static Calltype_zfb_sendRequestData zfb_sendRequestData; - - - - /** Enabled/disables user callbacks. Useful for disabling all callbacks when mono assemblies reload. */ - public delegate void Calltype_zfb_setCallbacksEnabled(bool enabled); - public static Calltype_zfb_setCallbacksEnabled zfb_setCallbacksEnabled; - - - /** Destroys all browser instances. */ - public delegate void Calltype_zfb_destroyAllBrowsers(); - public static Calltype_zfb_destroyAllBrowsers zfb_destroyAllBrowsers; - - - /** Adds a command-line switch to Chromium, must call before zfb_init */ - public delegate void Calltype_zfb_addCLISwitch(string value); - public static Calltype_zfb_addCLISwitch zfb_addCLISwitch; - - - /** Initializes the system so we can start making browsers. */ - public delegate bool Calltype_zfb_init(ZFBInitialSettings settings); - public static Calltype_zfb_init zfb_init; - - - /** Shuts down the system. It cannot be re-initialized. */ - public delegate void Calltype_zfb_shutdown(); - public static Calltype_zfb_shutdown zfb_shutdown; - - - /** - * Creates a new browser, returning the id. - * Call zfb_setReadyCallback and wait for it to fire before doing anything else. - */ - public delegate int Calltype_zfb_createBrowser(ZFBSettings settings); - public static Calltype_zfb_createBrowser zfb_createBrowser; - - - /** Reports the number of un-destroyed browsers. Slow. */ - public delegate int Calltype_zfb_numBrowsers(); - public static Calltype_zfb_numBrowsers zfb_numBrowsers; - - - /** - * Closes and cleans up a browser instance. - */ - public delegate void Calltype_zfb_destroyBrowser(int id); - public static Calltype_zfb_destroyBrowser zfb_destroyBrowser; - - - /** Call once per frame if the multi-threaded message loop isn't enabled. */ - public delegate void Calltype_zfb_tick(); - public static Calltype_zfb_tick zfb_tick; - - - /** - * Registers a function to call when the browser instance is ready to start taking orders. - * {cb} may be executed immediately or on any thread. - */ - public delegate void Calltype_zfb_setReadyCallback(int id, ReadyFunc cb); - public static Calltype_zfb_setReadyCallback zfb_setReadyCallback; - - - /** Resizes the browser. */ - public delegate void Calltype_zfb_resize(int id, int w, int h); - public static Calltype_zfb_resize zfb_resize; - - - /** - * Adds the given browser {overlayBrowserId} as an overlay of this browser {browserId}. - * The overlaid browser will appear transparently over the top of {browser}. - * {overlayBrowser} must not have an overlay and must be sized exactly the same as {browser}. - * Remove the overlay before closing either browser. - * - * While {overlayBrowser} is overlaying another browser, do not call zfb_getImage on it. - */ - public delegate void Calltype_zfb_setOverlay(int browserId, int overlayBrowserId); - public static Calltype_zfb_setOverlay zfb_setOverlay; - - - /** - * Gets the image data for the current frame. - * Do not hang onto the returned data across frames or resizes. - * - * If there are no changes since last call, the pixel data will be null (unless you specify forceDirty). - */ - public delegate RenderData Calltype_zfb_getImage(int id, bool forceDirty); - public static Calltype_zfb_getImage zfb_getImage; - - /** - * Registers a callback for nav state updates. - * Keep track of what it tells you to answer questions like what the current URL is and if we can go back/forward. - * (The URL overlaps a bit with CHT_FETCH_*, but this should fire earlier (when we start) as opposed to when it's done.) - */ - public delegate void Calltype_zfb_registerNavStateCallback(int id, NavStateFunc callback); - public static Calltype_zfb_registerNavStateCallback zfb_registerNavStateCallback; - - /** - * Navigates to the given URL. If force it ture, it will go there right away. - * If force is false, the pages that wish to can prompt the user and possibly cancel the - * navigation. - */ - public delegate void Calltype_zfb_goToURL(int id, string url, bool force); - public static Calltype_zfb_goToURL zfb_goToURL; - - /** - * Loads the given HTML string as if it were the given URL. - * Use http://-like porotocols or else things may not work right. - */ - public delegate void Calltype_zfb_goToHTML(int id, string html, string url); - public static Calltype_zfb_goToHTML zfb_goToHTML; - - /** Go back (-1) or forward (1) */ - public delegate void Calltype_zfb_doNav(int id, int direction); - public static Calltype_zfb_doNav zfb_doNav; - - - public delegate void Calltype_zfb_setZoom(int id, double zoom); - public static Calltype_zfb_setZoom zfb_setZoom; - - - /** Stop, refresh, or force-refresh */ - public delegate void Calltype_zfb_changeLoading(int id, LoadChange what); - public static Calltype_zfb_changeLoading zfb_changeLoading; - - - public delegate void Calltype_zfb_showDevTools(int id, bool show); - public static Calltype_zfb_showDevTools zfb_showDevTools; - - - /** - * Informs the browser if it's focused for keyboard input. - * Among other things, this controls if the blinking text cursor appears in an active text field. - */ - public delegate void Calltype_zfb_setFocused(int id, bool focused); - public static Calltype_zfb_setFocused zfb_setFocused; - - - /** - * Reports the mouse's current location. - * x and y are in the range [0,1]. (0, 0) is top-left, (1, 1) is bottom-right - */ - public delegate void Calltype_zfb_mouseMove(int id, float x, float y); - public static Calltype_zfb_mouseMove zfb_mouseMove; - - - public delegate void Calltype_zfb_mouseButton(int id, MouseButton button, bool down, int clickCount); - public static Calltype_zfb_mouseButton zfb_mouseButton; - - - /** Reports a mouse scroll. One "tick" of a scroll wheel is generally around 120 units. */ - public delegate void Calltype_zfb_mouseScroll(int id, int deltaX, int deltaY); - public static Calltype_zfb_mouseScroll zfb_mouseScroll; - - - /** - * Report a key down/up event. Repeated "virtual" keystrokes are simulated by repeating the down event without - * an interveneing up event. - */ - public delegate void Calltype_zfb_keyEvent(int id, bool down, int windowsKeyCode); - public static Calltype_zfb_keyEvent zfb_keyEvent; - - - /** - * Report a typed character. This typically interleaves with calls to zfb_keyEvent - */ - public delegate void Calltype_zfb_characterEvent(int id, int character, int windowsKeyCode); - public static Calltype_zfb_characterEvent zfb_characterEvent; - - - /** Register a function to call when console.log etc. is called in the browser. */ - public delegate void Calltype_zfb_registerConsoleCallback(int id, ConsoleFunc callback); - public static Calltype_zfb_registerConsoleCallback zfb_registerConsoleCallback; - - - public delegate void Calltype_zfb_evalJS(int id, string script, string scriptURL); - public static Calltype_zfb_evalJS zfb_evalJS; - - - /** Registers a callback to call when window._zfb_event(int, string) is called in the browser. */ - public delegate void Calltype_zfb_registerJSCallback(int id, ForwardJSCallFunc cb); - public static Calltype_zfb_registerJSCallback zfb_registerJSCallback; - - - /** Registers a callback that is called when something from ChangeType happens. */ - public delegate void Calltype_zfb_registerChangeCallback(int id, ChangeFunc cb); - public static Calltype_zfb_registerChangeCallback zfb_registerChangeCallback; - - - /** - * Gets the current mouse cursor. If the type is CursorType.Custom, width and height will be filled with - * the width and height of the custom cursor. - */ - public delegate CursorType Calltype_zfb_getMouseCursor(int id, out int width, out int height); - public static Calltype_zfb_getMouseCursor zfb_getMouseCursor; - - - /** - * Call this if zfb_getMouseCursor tells you there's a custom cursor. - * This will fill buffer (RGBA bottom-top, 4 bytes * width * height) with the contents of the cursor. - * Use the size you got from zfb_getMouseCursor. - * If width or height don't match the results from zfb_getMouseCursor, does nothing. - * - * {hotX} and {hoyY} will be filled with the cursor's hotspot. - */ - public delegate void Calltype_zfb_getMouseCustomCursor(int id, IntPtr buffer, int width, int height, out int hotX, out int hotY); - public static Calltype_zfb_getMouseCustomCursor zfb_getMouseCustomCursor; - - - /** Registers a DisplayDialogFunc for this browser. */ - public delegate void Calltype_zfb_registerDialogCallback(int id, DisplayDialogFunc cb); - public static Calltype_zfb_registerDialogCallback zfb_registerDialogCallback; - - - /** Callback for a dialog. See the docs on DisplayDialogFunc. */ - public delegate void Calltype_zfb_sendDialogResults(int id, bool affirmed, string text1, string text2); - public static Calltype_zfb_sendDialogResults zfb_sendDialogResults; - - - /** Registers a NewWindowFunc for pop ups. */ - public delegate void Calltype_zfb_registerPopupCallback(int id, NewWindowAction windowAction, ZFBSettings baseSettings, NewWindowFunc cb); - public static Calltype_zfb_registerPopupCallback zfb_registerPopupCallback; - - - /** Registers a ShowContextMenuFunc for the context menu. */ - public delegate void Calltype_zfb_registerContextMenuCallback(int id, ShowContextMenuFunc cb); - public static Calltype_zfb_registerContextMenuCallback zfb_registerContextMenuCallback; - - - /** - * After your ShowContextMenuFunc has been called, - * call this to report what item the user selected. - * If the menu was canceled, send -1. - */ - public delegate void Calltype_zfb_sendContextMenuResults(int id, int commandId); - public static Calltype_zfb_sendContextMenuResults zfb_sendContextMenuResults; - - - /** - * Sends a command, such as copy, paste, or select to the focused frame in the given browser. - */ - public delegate void Calltype_zfb_sendCommandToFocusedFrame(int id, FrameCommand command); - public static Calltype_zfb_sendCommandToFocusedFrame zfb_sendCommandToFocusedFrame; - - - /** Fetches all the cookies, calling the given callback for every cookie. */ - public delegate void Calltype_zfb_getCookies(int id, GetCookieFunc cb); - public static Calltype_zfb_getCookies zfb_getCookies; - - - /** Alters the given cookie as specified. */ - public delegate void Calltype_zfb_editCookie(int id, NativeCookie cookie, CookieAction action); - public static Calltype_zfb_editCookie zfb_editCookie; - - - /** - * Deletes all the cookies. - * (Though it takes a browser, this will typically clear all cookies for all browsers.) - */ - public delegate void Calltype_zfb_clearCookies(int id); - public static Calltype_zfb_clearCookies zfb_clearCookies; - - /** - * Take an action on a download. - * fileName is ignored except when beginning a download. - * At the outset: - * Begin: Starts the download. Saves to the given file if given. If fileName is null, the user will be prompted. - * Cancel: Does nothing with a download. - * After starting a download: - * Pause, Cancel, Resume: Does what it says on the tin. - * Once a download is finished or canceled it is not valid to call this function for that download any more. - */ - public delegate void Calltype_zfb_downloadCommand(int id, int downloadId, DownloadAction command, string fileName); - public static Calltype_zfb_downloadCommand zfb_downloadCommand; - - -#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX - /** - * Creates a new OS-native window in this process, returning an id. - */ - public delegate int Calltype_zfb_windowCreate(String title, WindowCallbackFunc eventHandler); - public static Calltype_zfb_windowCreate zfb_windowCreate; - - /** - * Renders the contents of the given browser into the given OS window. - */ - public delegate void Calltype_zfb_windowRender(int windowId, int browserId); - public static Calltype_zfb_windowRender zfb_windowRender; - - /** - * Closes the given window. - * Pass -1 for the id to close all windows. - */ - public delegate void Calltype_zfb_windowClose(int windowId); - public static Calltype_zfb_windowClose zfb_windowClose; -#endif -} - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserNative.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserNative.cs.meta deleted file mode 100644 index b9f6726f..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserNative.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 78ee81db88d224e40843c8e826697dee -timeCreated: 1447282504 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserSystemSettings.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserSystemSettings.cs deleted file mode 100644 index 079e1f5e..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserSystemSettings.cs +++ /dev/null @@ -1,28 +0,0 @@ -using UnityEngine; - -namespace ZenFulcrum.EmbeddedBrowser { - -/// -/// Helper class for setting options on the browser system as a whole berfore the -/// backend initalizes. -/// -public class BrowserSystemSettings : MonoBehaviour { - [Tooltip("Where should we save the user's web profile (cookies, localStorage, etc.)? Leave blank to forget every times we restart.")] - public string profilePath; - - [Tooltip("What user agent should we send to web pages when we request sites? Leave blank to use the default.")] - public string userAgent; - - public void Awake() { - if (!string.IsNullOrEmpty(profilePath)) { - BrowserNative.ProfilePath = profilePath; - } - - if (!string.IsNullOrEmpty(userAgent)) { - UserAgent.SetUserAgent(userAgent); - } - } - -} - -} \ No newline at end of file diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserSystemSettings.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserSystemSettings.cs.meta deleted file mode 100644 index ae455e95..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserSystemSettings.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 731482151f2ac2041ab65282156b1664 -timeCreated: 1510797762 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI.meta deleted file mode 100644 index a5523b95..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: e460e45c0d5976544a2af3c86b00bdb9 -folderAsset: yes -timeCreated: 1453258062 -licenseType: Store -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/CursorRendererBase.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/CursorRendererBase.cs deleted file mode 100644 index 79a7d014..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/CursorRendererBase.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Collections; -using UnityEngine; - -namespace ZenFulcrum.EmbeddedBrowser { - -/// -/// These classes handle rendering the cursor of a browser. -/// -/// Using one is optional. You can opt not to show a cursor. -/// -[RequireComponent(typeof(PointerUIBase))] -abstract public class CursorRendererBase : MonoBehaviour { - protected BrowserCursor cursor; - - public virtual void OnEnable() { - StartCoroutine(Setup()); - } - - private IEnumerator Setup() { - if (cursor != null) yield break; - - yield return null;//wait a frame to let the browser UI get set up - - cursor = GetComponent().UIHandler.BrowserCursor; - cursor.cursorChange += CursorChange; - } - - protected abstract void CursorChange(); -} - -} \ No newline at end of file diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/CursorRendererBase.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/CursorRendererBase.cs.meta deleted file mode 100644 index aab248a6..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/CursorRendererBase.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 30820dfc981b58e48a678a9b0e422fef -timeCreated: 1511217990 -licenseType: Store -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/CursorRendererOS.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/CursorRendererOS.cs deleted file mode 100644 index 0fb27fba..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/CursorRendererOS.cs +++ /dev/null @@ -1,42 +0,0 @@ -using UnityEngine; - -namespace ZenFulcrum.EmbeddedBrowser { - -/// -/// Handles rendering a browser's cursor by letting using t he OS-level mouse cursor -/// (and changing it as needed). -/// -public class CursorRendererOS : CursorRendererBase { - [Tooltip("If true, the mouse cursor should be visible when it's not on a browser.")] - public bool cursorNormallyVisible = true; - - protected override void CursorChange() { - if (!cursor.HasMouse) { - //no browser, do default - Cursor.visible = cursorNormallyVisible; - Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto); - } else { - if (cursor.Texture != null) { - //browser, show this cursor - Cursor.visible = true; - Cursor.SetCursor( - cursor.Texture, cursor.Hotspot, -#if UNITY_STANDALONE_OSX - //Not sure why, but we get really ugly looking "garbled" shadows around the mouse cursor. - //I hate latency, but a software cursor is probably less irritating than looking at - //that ugly stuff. - CursorMode.ForceSoftware -#else - CursorMode.Auto -#endif - ); - } else { - //browser, so no cursor - Cursor.visible = false; - Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto); - } - } - } -} - -} \ No newline at end of file diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/CursorRendererOS.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/CursorRendererOS.cs.meta deleted file mode 100644 index 03442dfb..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/CursorRendererOS.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: b27bad8d50722bb4083b964da1d1cae4 -timeCreated: 1511217990 -licenseType: Store -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/CursorRendererOverlay.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/CursorRendererOverlay.cs deleted file mode 100644 index 671685bd..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/CursorRendererOverlay.cs +++ /dev/null @@ -1,30 +0,0 @@ -using UnityEngine; - -namespace ZenFulcrum.EmbeddedBrowser { - -/// -/// Renders a browser's cursor by rendering something in the center of the screen. -/// -public class CursorRendererOverlay : CursorRendererBase { - - [Tooltip("How large should we render the cursor?")] - public float scale = .5f; - - protected override void CursorChange() {} - - public void OnGUI() { - if (cursor == null) return; - - if (!cursor.HasMouse || !cursor.Texture) return; - - var tex = cursor.Texture; - - var pos = new Rect(Screen.width / 2f, Screen.height / 2f, tex.width * scale, tex.height * scale); - pos.x -= cursor.Hotspot.x * scale; - pos.y -= cursor.Hotspot.y * scale; - - GUI.DrawTexture(pos, tex); - } -} - -} \ No newline at end of file diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/CursorRendererOverlay.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/CursorRendererOverlay.cs.meta deleted file mode 100644 index 282974ca..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/CursorRendererOverlay.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 62aba41510529884eaf9bdaa450168d7 -timeCreated: 1511217990 -licenseType: Store -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/CursorRendererWorldSpace.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/CursorRendererWorldSpace.cs deleted file mode 100644 index db947316..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/CursorRendererWorldSpace.cs +++ /dev/null @@ -1,81 +0,0 @@ -using UnityEngine; - -namespace ZenFulcrum.EmbeddedBrowser { - -/// -/// Renders a browser's cursor by add polygons to the scene offset from browser's face. -/// -public class CursorRendererWorldSpace : CursorRendererBase { - [Tooltip("How far to keep the cursor from the surface of the browser. Set it as low as you can without causing z-fighting." + -" (Note: The default cursor material will always render on top of everything, this is more useful if you use a different material.")] - public float zOffset = .005f; - [Tooltip("How large should the cursor be when rendered? (meters)")] - public float size = .1f; - - private GameObject cursorHolder, cursorImage; - private PointerUIBase pointerUI; - - private bool cursorVisible; - - public void Awake() { - - pointerUI = GetComponent(); - - cursorHolder = new GameObject("Cursor for " + name); - cursorHolder.transform.localScale = new Vector3(size, size, size); - - //If we place it in the parent, the scale can get wonky in some cases. - //so don't cursorHolder.transform.parent = transform; - - cursorImage = GameObject.CreatePrimitive(PrimitiveType.Quad); - cursorImage.name = "Cursor Image"; - cursorImage.transform.parent = cursorHolder.transform; - var mr = cursorImage.GetComponent(); - mr.sharedMaterial = Resources.Load("Browser/CursorDecal"); - Destroy(cursorImage.GetComponent()); - cursorImage.transform.SetParent(cursorHolder.transform, false); - cursorImage.transform.localScale = new Vector3(1, 1, 1); - - - cursorHolder.SetActive(false); - } - - protected override void CursorChange() { - if (cursor.HasMouse && cursor.Texture) { - cursorVisible = true; - - var cursorRenderer = cursorImage.GetComponent(); - cursorRenderer.material.mainTexture = cursor.Texture; - - var hs = cursor.Hotspot; - cursorRenderer.transform.localPosition = new Vector3( - .5f - hs.x / cursor.Texture.width, - -.5f + hs.y / cursor.Texture.height, - 0 - ); - } else { - cursorVisible = false; - } - } - - public void LateUpdate() { - Vector3 pos; - Quaternion rot; - pointerUI.GetCurrentHitLocation(out pos, out rot); - - if (float.IsNaN(pos.x)) { - cursorHolder.SetActive(false); - } else { - cursorHolder.SetActive(cursorVisible); - - cursorHolder.transform.position = pos + rot * new Vector3(0, 0, -zOffset); - cursorHolder.transform.rotation = rot; - } - } - - public void OnDestroy() { - Destroy(cursorHolder.gameObject); - } -} - -} \ No newline at end of file diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/CursorRendererWorldSpace.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/CursorRendererWorldSpace.cs.meta deleted file mode 100644 index 8d43c0fa..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/CursorRendererWorldSpace.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: b0f8a9c4898c5a644a048df52d9472fd -timeCreated: 1511217990 -licenseType: Store -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/IBrowserUI.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/IBrowserUI.cs deleted file mode 100644 index dd2d3d35..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/IBrowserUI.cs +++ /dev/null @@ -1,101 +0,0 @@ -using System; -using UnityEngine; -using System.Collections; -using System.Collections.Generic; - -namespace ZenFulcrum.EmbeddedBrowser { - -[Flags] -public enum MouseButton { - Left = 0x1, - Middle = 0x2, - Right = 0x4, -} - -public class BrowserInputSettings { - /** - * How fast do we scroll? - */ - public int scrollSpeed = 120; - - /** - * How far can the cursor wander from its position before won't consider another click as a double/triple click? - * Value is number of pixels in browser space. - */ - public float multiclickTolerance = 6; - - /** - * How long must we wait between clicks before we don't consider it a double/triple/etc. click? - * Measured in seconds. - */ - public float multiclickSpeed = .7f; - -} - -/** - * Proxy for browser input (and current mouse cursor). - * You can create your own implementation to take input however you'd like. To use your implementation, - * create a new instance and assign it to browser.UIHandler just after creating the browser. - */ -public interface IBrowserUI { - - /** Called once per frame by the browser before fetching properties. */ - void InputUpdate(); - - /** - * Returns true if the browser will be getting mouse events. Typically this is true when the mouse if over the browser. - * - * If this is false, the Mouse* properties will be ignored. - */ - bool MouseHasFocus { get; } - - /** - * Current mouse position. - * - * Returns the current position of the mouse with (0, 0) in the bottom-left corner and (1, 1) in the - * top-right corner. - */ - Vector2 MousePosition { get; } - - /** Bitmask of currently depressed mouse buttons */ - MouseButton MouseButtons { get; } - - /** - * Delta X and Y scroll values since the last time InputUpdate() was called. - * - * Return 1 for every "click" of the scroll wheel, or smaller numbers for more incremental scrolling. - */ - Vector2 MouseScroll { get; } - - /** - * Returns true when the browser will receive keyboard events. - * - * In the simplest case, return the same value as MouseHasFocus, but you can track focus yourself if desired. - * - * If this is false, the Key* properties will be ignored. - */ - bool KeyboardHasFocus { get; } - - /** - * List of key up/down events that have happened since the last InputUpdate() call. - * - * The returned list is not to be altered or retained. - */ - List KeyEvents { get; } - - /** - * Returns a BrowserCursor instance. The Browser will update the current cursor to reflect the - * mouse's position on the page. - * - * The IBrowserUI is responsible for changing the actual cursor, be it the mouse cursor or some in-game display. - */ - BrowserCursor BrowserCursor { get; } - - /** - * These settings are used to interpret the input data. - */ - BrowserInputSettings InputSettings { get; } - -} - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/IBrowserUI.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/IBrowserUI.cs.meta deleted file mode 100644 index e196cca6..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/IBrowserUI.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 387f33fa3a8867e4fad235ad24e7fc95 -timeCreated: 1448050780 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/KeyEvents.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/KeyEvents.cs deleted file mode 100644 index 56b9e980..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/KeyEvents.cs +++ /dev/null @@ -1,112 +0,0 @@ -#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX -#define ZF_OSX -#endif -using System.Collections.Generic; -using UnityEngine; - -namespace ZenFulcrum.EmbeddedBrowser { -/// -/// Helper class for IBrowserUI implementations for getting/generating keyboard events for sending to an IBrowserUI. -/// -public class KeyEvents { - - - /** Fills up with key events as they happen. */ - protected List keyEvents = new List(); - - /** Swaps with keyEvents on InputUpdate and is returned in the main getter. */ - protected List keyEventsLast = new List(); - - /// - /// After calling InputUpdate, contains the key events to send to the browser. - /// - public List Events { - get { return keyEventsLast; } - } - - /** List of keys Unity won't give us events for. So we have to poll. */ - static readonly KeyCode[] keysToCheck = { -#if ZF_OSX - //On windows you get GUI events for ctrl, super, alt. On mac...you don't! - KeyCode.LeftCommand, - KeyCode.RightCommand, - KeyCode.LeftControl, - KeyCode.RightControl, - KeyCode.LeftAlt, - KeyCode.RightAlt, - //KeyCode.CapsLock, unity refuses to inform us of this, so there's not much we can do -#endif - //Unity consistently doesn't send events for shift across all platforms. - KeyCode.LeftShift, - KeyCode.RightShift, - }; - - /// - /// Call once per frame before grabbing - /// - public void InputUpdate() { - //Note: keyEvents gets filled in OnGUI as things happen. InputUpdate get called just before it's read. - //To get the right events to the right place at the right time, swap the "double buffer" of key events. - var tmp = keyEvents; - keyEvents = keyEventsLast; - keyEventsLast = tmp; - keyEvents.Clear(); - - //Unity doesn't include events for some keys, so fake it by checking each frame. - for (int i = 0; i < keysToCheck.Length; i++) { - if (Input.GetKeyDown(keysToCheck[i])) { - //Prepend down, postpend up. We don't know which happened first, but pressing - //modifiers usually precedes other key presses and releasing tends to follow. - keyEventsLast.Insert(0, new Event() { type = EventType.KeyDown, keyCode = keysToCheck[i] }); - } else if (Input.GetKeyUp(keysToCheck[i])) { - keyEventsLast.Add(new Event() { type = EventType.KeyUp, keyCode = keysToCheck[i] }); - } - } - } - - /// - /// Call this with any GUI events you get from Unity that you want to have passed to the browser. - /// - /// - public void Feed(Event ev) { - if (ev.type != EventType.KeyDown && ev.type != EventType.KeyUp) return; - - // if (ev.character != 0) Debug.Log("ev >>> " + ev.character); - // else if (ev.type == EventType.KeyUp) Debug.Log("ev ^^^ " + ev.keyCode); - // else if (ev.type == EventType.KeyDown) Debug.Log("ev vvv " + ev.keyCode); - - keyEvents.Add(new Event(ev)); - } - - /// - /// Injects a key press. Call Release laster to let go. - /// If the key you are pressing represents a character this may not type that character. Use Type() instead. - /// - /// - public void Press(KeyCode key) { - keyEvents.Add(new Event { - type = EventType.KeyDown, keyCode = key - }); - } - - public void Release(KeyCode key) { - keyEvents.Add(new Event { - type = EventType.KeyUp, keyCode = key - }); - } - - /// - /// Types the given text in. THis does not simulate pressing each key and releasing it. - /// - /// - public void Type(string text) { - for (int i = 0; i < text.Length; i++) { - //fixme: multibyte chars >16 bits - keyEvents.Add(new Event { - type = EventType.KeyDown, character = text[i], - }); - } - } -} - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/KeyEvents.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/KeyEvents.cs.meta deleted file mode 100644 index 92ae586a..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/KeyEvents.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 34df8173f4fc89a4a94045d4973f1dac -timeCreated: 1495912815 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy.meta deleted file mode 100644 index f2e737f2..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: cab02f7db18ee9f41abc1d23c3818b09 -folderAsset: yes -timeCreated: 1511210876 -licenseType: Store -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy/ClickMeshBrowserUI.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy/ClickMeshBrowserUI.cs deleted file mode 100644 index 137aa5a1..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy/ClickMeshBrowserUI.cs +++ /dev/null @@ -1,200 +0,0 @@ -#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX -#define ZF_OSX -#endif - -using System; -using UnityEngine; -using System.Collections; -using System.Collections.Generic; -using UnityEngine.EventSystems; -using UnityEngine.UI; - -namespace ZenFulcrum.EmbeddedBrowser { - -/** - * This class will handle input to a browser based on the mouse position and a mesh collider on the browser. - * Mouse positions are looked up according to the UVs on the *collider* mesh. Generally, you will want to use - * the same or a visually similar (including UVs) mesh for the renderer. - */ -[Obsolete("Use PointerUIMesh instead.")] -public class ClickMeshBrowserUI : MonoBehaviour, IBrowserUI { - /** - * Creates a new UI handler. - * We will attach to {parent}, which must have the mesh we are interacting with. - * In most cases, this will also be the same object that has the Browser we will be fed to. (a la browser.UIHandler) - */ - public static ClickMeshBrowserUI Create(MeshCollider meshCollider) { - var ui = meshCollider.gameObject.AddComponent(); - ui.meshCollider = meshCollider; - return ui; - } - - public void Awake() { - BrowserCursor = new BrowserCursor(); - BrowserCursor.cursorChange += CursorUpdated; - - InputSettings = new BrowserInputSettings(); - } - - protected MeshCollider meshCollider; - - /** - * How far can we reach to touch a browser? - * - * HideInInspector: - * Showing it in the inspector would imply that changing the value would be used, but in most practical cases - * with FPSBrowserUI, the value will be overridden by the FPSCursorRenderer. - */ - [HideInInspector] - public float maxDistance = float.PositiveInfinity; - - /** Fills up with key events as they happen. */ - protected List keyEvents = new List(); - - /** Swaps with keyEvents on InputUpdate and is returned in the main getter. */ - protected List keyEventsLast = new List(); - - /** Returns the user's interacting ray, usually the mouse pointer in some form. */ - protected virtual Ray LookRay { - get { return Camera.main.ScreenPointToRay(Input.mousePosition); } - } - - /** List of keys Unity won't give us events for. So we have to poll. */ - static readonly KeyCode[] keysToCheck = { -#if ZF_OSX - //On windows you get GUI events for ctrl, super, alt. On mac...you don't! - KeyCode.LeftCommand, - KeyCode.RightCommand, - KeyCode.LeftControl, - KeyCode.RightControl, - KeyCode.LeftAlt, - KeyCode.RightAlt, - //KeyCode.CapsLock, unity refuses to inform us of this, so there's not much we can do -#endif - //Unity consistently doesn't send events for shift across all platforms. - KeyCode.LeftShift, - KeyCode.RightShift, - }; - - public virtual void InputUpdate() { - //Note: keyEvents gets filled in OnGUI as things happen. InputUpdate get called just before it's read. - //To get the right events to the right place at the right time, swap the "double buffer" of key events. - var tmp = keyEvents; - keyEvents = keyEventsLast; - keyEventsLast = tmp; - keyEvents.Clear(); - - - //Trace mouse from the main camera - var mouseRay = LookRay; - RaycastHit hit; - Physics.Raycast(mouseRay, out hit, maxDistance); - - if (hit.transform != meshCollider.transform) { - //not looking at it. - MousePosition = new Vector3(0, 0); - MouseButtons = 0; - MouseScroll = new Vector2(0, 0); - - MouseHasFocus = false; - KeyboardHasFocus = false; - - LookOff(); - return; - } - LookOn(); - MouseHasFocus = true; - KeyboardHasFocus = true; - - //convert ray hit to useful mouse position on page - var localPoint = hit.textureCoord; - MousePosition = localPoint; - - var buttons = (MouseButton)0; - if (Input.GetMouseButton(0)) buttons |= MouseButton.Left; - if (Input.GetMouseButton(1)) buttons |= MouseButton.Right; - if (Input.GetMouseButton(2)) buttons |= MouseButton.Middle; - MouseButtons = buttons; - - MouseScroll = Input.mouseScrollDelta; - - - //Unity doesn't include events for some keys, so fake it by checking each frame. - for (int i = 0; i < keysToCheck.Length; i++) { - if (Input.GetKeyDown(keysToCheck[i])) { - //Prepend down, postpend up. We don't know which happened first, but pressing - //modifiers usually precedes other key presses and releasing tends to follow. - keyEventsLast.Insert(0, new Event() {type = EventType.KeyDown, keyCode = keysToCheck[i]}); - } else if (Input.GetKeyUp(keysToCheck[i])) { - keyEventsLast.Add(new Event() {type = EventType.KeyUp, keyCode = keysToCheck[i]}); - } - } - } - - public void OnGUI() { - var ev = Event.current; - if (ev.type != EventType.KeyDown && ev.type != EventType.KeyUp) return; - -// if (ev.character != 0) Debug.Log("ev >>> " + ev.character); -// else if (ev.type == EventType.KeyUp) Debug.Log("ev ^^^ " + ev.keyCode); -// else if (ev.type == EventType.KeyDown) Debug.Log("ev vvv " + ev.keyCode); - - keyEvents.Add(new Event(ev)); - } - - protected bool mouseWasOver = false; - protected void LookOn() { - if (BrowserCursor != null) { - CursorUpdated(); - } - mouseWasOver = true; - } - - protected void LookOff() { - if (BrowserCursor != null && mouseWasOver) { - SetCursor(null); - } - mouseWasOver = false; - } - - protected void CursorUpdated() { - SetCursor(BrowserCursor); - } - - /** - * Sets the current mouse cursor. - * If the cursor is null we are not looking at this browser. - * - * This base implementation changes the mouse cursor, but you could change an in-game reticle, etc. - */ - protected virtual void SetCursor(BrowserCursor newCursor) { - //note that HandleKeyInputBrowserCursor can change while we don't have focus. - //In such a case, don't do anything - if (!MouseHasFocus && newCursor != null) return; - - if (newCursor == null) { - Cursor.visible = true; - Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto); - } else { - if (newCursor.Texture != null) { - Cursor.visible = true; - Cursor.SetCursor(newCursor.Texture, newCursor.Hotspot, CursorMode.Auto); - } else { - Cursor.visible = false; - Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto); - } - } - } - - public bool MouseHasFocus { get; protected set; } - public Vector2 MousePosition { get; protected set; } - public MouseButton MouseButtons { get; protected set; } - public Vector2 MouseScroll { get; protected set; } - public bool KeyboardHasFocus { get; protected set; } - public List KeyEvents { get { return keyEventsLast; } } - public BrowserCursor BrowserCursor { get; protected set; } - public BrowserInputSettings InputSettings { get; protected set; } - -} - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy/ClickMeshBrowserUI.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy/ClickMeshBrowserUI.cs.meta deleted file mode 100644 index 74ea6629..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy/ClickMeshBrowserUI.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: beafc338c0850714f8831f03b4ba9a67 -timeCreated: 1450133185 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy/FPSBrowserUI.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy/FPSBrowserUI.cs deleted file mode 100644 index f541b7c3..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy/FPSBrowserUI.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using UnityEngine; - -namespace ZenFulcrum.EmbeddedBrowser { -/** - * Works like ClickMeshBrowserUI, but assumes you are pointing at buttons with your nose - * (a camera or object's transform.forward) instead of with a visible mouse pointer. - * - * This relies on the given FPSCursorRenderer to render the cursor. - * - * Unlike MeshColliderBrowserUI, this won't be used by default. If you'd like to use it, - * call CursorCrosshair.SetUpBrowserInput. - * - * As with MeshColliderBrowserUI, pass in the mesh we interact on to {meshCollider}. - * - * {worldPointer} is the object we are pointing with. Usually you can use Camera.main.transsform. - * Its world-space forward direction will be used to get the user's interaction ray. - */ -[RequireComponent(typeof(Browser))] -[RequireComponent(typeof(MeshCollider))] -[Obsolete("Use PointerUIMesh instead.")] -public class FPSBrowserUI : ClickMeshBrowserUI { - protected Transform worldPointer; - protected FPSCursorRenderer cursorRenderer; - - public void Start() { - FPSCursorRenderer.SetUpBrowserInput(GetComponent(), GetComponent()); - } - - public static FPSBrowserUI Create(MeshCollider meshCollider, Transform worldPointer, FPSCursorRenderer cursorRenderer) { - var ui = meshCollider.gameObject.GetComponent(); - if (!ui) ui = meshCollider.gameObject.AddComponent(); - ui.meshCollider = meshCollider; - ui.worldPointer = worldPointer; - ui.cursorRenderer = cursorRenderer; - - return ui; - } - - protected override Ray LookRay { - get { return new Ray(worldPointer.position, worldPointer.forward); } - } - - protected override void SetCursor(BrowserCursor newCursor) { - if (newCursor != null && !MouseHasFocus) return; - - cursorRenderer.SetCursor(newCursor, this); - } - - public override void InputUpdate() { - if (!cursorRenderer.EnableInput) { - MouseHasFocus = false; - KeyboardHasFocus = false; - return; - } - - base.InputUpdate(); - } -} - - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy/FPSBrowserUI.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy/FPSBrowserUI.cs.meta deleted file mode 100644 index cc63df4f..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy/FPSBrowserUI.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: b336f8b13576fc5459369f2a394339d5 -timeCreated: 1452987345 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy/FPSCursorRenderer.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy/FPSCursorRenderer.cs deleted file mode 100644 index 05442aa1..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy/FPSCursorRenderer.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using UnityEngine; - -namespace ZenFulcrum.EmbeddedBrowser { - -/** - * Draws a crosshair in the middle of the screen which changes to cursors as you mouseover - * things in world-space browsers. - * - * Often, this will be created automatically. If you want to alter parameters, add this script - * to an object (such as the camera) and edit them there. - */ -[Obsolete("Use PointerUIMesh and CursorRendererOverlay instead.")] -public class FPSCursorRenderer : MonoBehaviour { - private static FPSCursorRenderer _instance; - public static FPSCursorRenderer Instance { - get { - if (!_instance) { - _instance = FindObjectOfType(); - if (!_instance) { - var go = new GameObject("Cursor Crosshair"); - _instance = go.AddComponent(); - } - } - return _instance; - } - } - - [Tooltip("How large should we render the cursor?")] - public float scale = .5f; - - [Tooltip("How far can we reach to push buttons and such?")] - public float maxDistance = 7f; - - [Tooltip("What are we using to point at things? Leave as null to use Camera.main")] - public Transform pointer; - - /** - * Toggle this to enable/disable input for all FPSBrowserUI objects. - * This is useful, for example, during plot sequences and pause menus. - */ - public bool EnableInput { get; set; } - - public static void SetUpBrowserInput(Browser browser, MeshCollider mesh) { - var crossHair = Instance; - - var pointer = crossHair.pointer; - if (!pointer) pointer = Camera.main.transform;//nb: don't use crossHair.pointer ?? camera, will incorrectly return null - var fpsUI = FPSBrowserUI.Create(mesh, pointer, crossHair); - fpsUI.maxDistance = crossHair.maxDistance; - browser.UIHandler = fpsUI; - } - - protected BrowserCursor baseCursor, currentCursor; - - public void Start() { - EnableInput = true; - baseCursor = new BrowserCursor(); - baseCursor.SetActiveCursor(BrowserNative.CursorType.Cross); - } - - public void OnGUI() { - if (!EnableInput) return; - - var cursor = currentCursor ?? baseCursor; - var tex = cursor.Texture; - - if (tex == null) return;//hidden cursor - - var pos = new Rect(Screen.width / 2f, Screen.height / 2f, tex.width * scale, tex.height * scale); - pos.x -= cursor.Hotspot.x * scale; - pos.y -= cursor.Hotspot.y * scale; - - GUI.DrawTexture(pos, tex); - } - - public void SetCursor(BrowserCursor newCursor, FPSBrowserUI ui) { - currentCursor = newCursor; - } -} - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy/FPSCursorRenderer.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy/FPSCursorRenderer.cs.meta deleted file mode 100644 index 384113d4..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy/FPSCursorRenderer.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 27abec923057368408f62c2ebf6d54b3 -timeCreated: 1453246003 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy/GUIBrowserUI.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy/GUIBrowserUI.cs deleted file mode 100644 index 7079ee60..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy/GUIBrowserUI.cs +++ /dev/null @@ -1,185 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.EventSystems; -using UnityEngine.UI; - -namespace ZenFulcrum.EmbeddedBrowser { - -/** Attach this script to a GUI Image to use a browser on it. */ -[RequireComponent(typeof(RawImage))] -[RequireComponent(typeof(Browser))] -[Obsolete("Use PointerUIGUI and CursorRendererOS instead.")] -public class GUIBrowserUI : - MonoBehaviour, - IBrowserUI, - ISelectHandler, IDeselectHandler, - IPointerEnterHandler, IPointerExitHandler, - IPointerDownHandler -{ - protected RawImage myImage; - protected Browser browser; - - public bool enableInput = true, autoResize = true; - - protected void Awake() { - BrowserCursor = new BrowserCursor(); - InputSettings = new BrowserInputSettings(); - - browser = GetComponent(); - myImage = GetComponent(); - - browser.afterResize += UpdateTexture; - browser.UIHandler = this; - BrowserCursor.cursorChange += () => { - SetCursor(BrowserCursor); - }; - - rTransform = GetComponent(); - } - - protected void OnEnable() { - if (autoResize) StartCoroutine(WatchResize()); - } - - /** Automatically resizes the browser to match the size of this object. */ - private IEnumerator WatchResize() { - Rect currentSize = new Rect(); - - while (enabled) { - var rect = rTransform.rect; - - if (rect.size.x <= 0 || rect.size.y <= 0) rect.size = new Vector2(512, 512); - if (rect.size != currentSize.size) { - browser.Resize((int)rect.size.x, (int)rect.size.y); - currentSize = rect; - } - - //yield return new WaitForSeconds(.5f); won't work if you pause the game, which, BTW, is a great time to resize the screen ;-) - yield return null; - } - } - - protected void UpdateTexture(Texture2D texture) { - myImage.texture = texture; - myImage.uvRect = new Rect(0, 0, 1, 1); - } - - protected List keyEvents = new List(); - protected List keyEventsLast = new List(); - protected BaseRaycaster raycaster; - protected RectTransform rTransform; -// protected List raycastResults = new List(); - - public virtual void InputUpdate() { - var tmp = keyEvents; - keyEvents = keyEventsLast; - keyEventsLast = tmp; - keyEvents.Clear(); - - if (MouseHasFocus) { - if (!raycaster) raycaster = GetComponentInParent(); - -// raycastResults.Clear(); - -// raycaster.Raycast(data, raycastResults); - -// if (raycastResults.Count != 0) { -// Vector2 pos = raycastResults[0].stuff - Vector2 pos; - RectTransformUtility.ScreenPointToLocalPointInRectangle( - (RectTransform)transform, Input.mousePosition, raycaster.eventCamera, out pos - ); - pos.x = pos.x / rTransform.rect.width + rTransform.pivot.x; - pos.y = pos.y / rTransform.rect.height + rTransform.pivot.y; - MousePosition = pos; - - - var buttons = (MouseButton)0; - if (Input.GetMouseButton(0)) buttons |= MouseButton.Left; - if (Input.GetMouseButton(1)) buttons |= MouseButton.Right; - if (Input.GetMouseButton(2)) buttons |= MouseButton.Middle; - MouseButtons = buttons; - - - - MouseScroll = Input.mouseScrollDelta; - } else { - MouseButtons = 0; - } - - - //Unity doesn't include events for some keys, so fake it. - if (Input.GetKeyDown(KeyCode.LeftShift) || Input.GetKeyDown(KeyCode.RightShift)) { - //Note: doesn't matter if left or right shift, the browser can't tell. - //(Prepend event. We don't know what happened first, but pressing shift usually precedes other key presses) - keyEventsLast.Insert(0, new Event() { type = EventType.KeyDown, keyCode = KeyCode.LeftShift }); - } - - if (Input.GetKeyUp(KeyCode.LeftShift) || Input.GetKeyUp(KeyCode.RightShift)) { - //Note: doesn't matter if left or right shift, the browser can't tell. - keyEventsLast.Add(new Event() { type = EventType.KeyUp, keyCode = KeyCode.LeftShift }); - } - } - - public void OnGUI() { - var ev = Event.current; - if (ev.type != EventType.KeyDown && ev.type != EventType.KeyUp) return; - - keyEvents.Add(new Event(ev)); - } - - protected virtual void SetCursor(BrowserCursor newCursor) { - if (!_mouseHasFocus && newCursor != null) return; - - if (newCursor == null) { - Cursor.visible = true; - Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto); - } else { - if (newCursor.Texture != null) { - Cursor.visible = true; - Cursor.SetCursor(newCursor.Texture, newCursor.Hotspot, CursorMode.Auto); - } else { - Cursor.visible = false; - Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto); - } - } - } - - protected bool _mouseHasFocus; - public bool MouseHasFocus { get { return _mouseHasFocus && enableInput; } } - public Vector2 MousePosition { get; private set; } - public MouseButton MouseButtons { get; private set; } - public Vector2 MouseScroll { get; private set; } - protected bool _keyboardHasFocus; - public bool KeyboardHasFocus { get { return _keyboardHasFocus && enableInput; } } - public List KeyEvents { get { return keyEventsLast; } } - public BrowserCursor BrowserCursor { get; private set; } - public BrowserInputSettings InputSettings { get; private set; } - - public void OnSelect(BaseEventData eventData) { - _keyboardHasFocus = true; - } - - public void OnDeselect(BaseEventData eventData) { - _keyboardHasFocus = false; - } - - public void OnPointerEnter(PointerEventData eventData) { - _mouseHasFocus = true; - SetCursor(BrowserCursor); - } - - public void OnPointerExit(PointerEventData eventData) { - _mouseHasFocus = false; - SetCursor(null); - } - - - public void OnPointerDown(PointerEventData eventData) { - EventSystem.current.SetSelectedGameObject(gameObject); - } -} - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy/GUIBrowserUI.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy/GUIBrowserUI.cs.meta deleted file mode 100644 index 8d1ff6f1..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/Legacy/GUIBrowserUI.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 312e08c685ba1ee4e96f0ff4128d6e49 -timeCreated: 1453317757 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/PointerUIBase.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/PointerUIBase.cs deleted file mode 100644 index f6c02ff5..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/PointerUIBase.cs +++ /dev/null @@ -1,434 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; -#if UNITY_2017_2_OR_NEWER -using UnityEngine.XR; -#endif - -namespace ZenFulcrum.EmbeddedBrowser { - -/// -/// Base class that handles input for mouse/touch/pointer/VR/nose inputs. -/// The concept is thus: -/// You have an arbitrary number of 3D (FPS player, VR pointer, and world ray) and -/// 2D (mouse, touch, and screen position) pointers and you want any of them -/// to be able to interact with the Browser. -/// -/// Concrete implementations of this class handle interacting with different rendered mediums -/// (such as a mesh or a GUI renderer). -/// -[RequireComponent(typeof(Browser))] -public abstract class PointerUIBase : MonoBehaviour, IBrowserUI { - public readonly KeyEvents keyEvents = new KeyEvents(); - - - protected Browser browser; - protected bool appFocused = true; - - /// - /// Called once per tick. Handlers registered here should look at the pointers they have - /// and tell us about them. - /// - public event Action onHandlePointers = () => {}; - - protected int currentPointerId; - - protected readonly List currentPointers = new List(); - - [Tooltip( - "When clicking, how far (in browser-space pixels) must the cursor be moved before we send this movement to the browser backend? " + - "This helps keep us from unintentionally dragging when we meant to just click, esp. under VR where it's hard to hold the cursor still." - )] - public float dragMovementThreshold = 0; - /// - /// Cursor location when we most recently went from 0 buttons to any buttons down. - /// - protected Vector2 mouseDownPosition; - /// - /// True when we have the any mouse button down AND we've moved at least dragMovementThreshold after that. - /// - protected bool dragging = false; - -#region Pointer Core - - public struct PointerState { - /// - /// Unique value for this pointer, to distinguish it by. Must be > 0. - /// - public int id; - /// - /// Is the pointer a 2d or 3d pointer? - /// - public bool is2D; - public Vector2 position2D; - public Ray position3D; - /// - /// Currently depressed "buttons" on this pointer. - /// - public MouseButton activeButtons; - /// - /// If the pointer can scroll, delta scrolling values since last frame. - /// - public Vector2 scrollDelta; - } - - /// - /// Called when the browser gets clicked with any mouse button. - /// (More precisely, when we go from having no buttons down to 1+ buttons down.) - /// - public event Action onClick = () => {}; - - - public virtual void Awake() { - BrowserCursor = new BrowserCursor(); - BrowserCursor.cursorChange += CursorUpdated; - - InputSettings = new BrowserInputSettings(); - - browser = GetComponent(); - browser.UIHandler = this; - - - onHandlePointers += OnHandlePointers; - - if (disableMouseEmulation) Input.simulateMouseWithTouches = false; - } - - public virtual void InputUpdate() { - keyEvents.InputUpdate(); - - p_currentDown = p_anyDown = p_currentOver = p_anyOver = -1; - currentPointers.Clear(); - - onHandlePointers(); - - CalculatePointer(); - } - - public void OnApplicationFocus(bool focused) { - appFocused = focused; - } - - - /// - /// Converts a 2D screen-space coordinate to browser-space coordinates. - /// If the given point doesn't map to the browser, return float.NaN for the position. - /// - /// - /// - /// - protected abstract Vector2 MapPointerToBrowser(Vector2 screenPosition, int pointerId); - - /// - /// Converts a 3D world-space ray to a browser-space coordinate. - /// If the given ray doesn't map to the browser, return float.NaN for the position. - /// - /// - /// - /// - protected abstract Vector2 MapRayToBrowser(Ray worldRay, int pointerId); - - /// - /// Returns the current position+rotation of the active pointer in world space. - /// If there is none, or it doesn't make sense to map to world space, position will - /// be NaNs. - /// - /// Coordinates are in world space. The rotation should point up in the direction the browser sees as up. - /// Z+ should go "into" the browser surface. - /// - /// - /// - public abstract void GetCurrentHitLocation(out Vector3 pos, out Quaternion rot); - - /** Indexes into currentPointers for useful items this frame. -1 if N/A. */ - protected int p_currentDown, p_anyDown, p_currentOver, p_anyOver; - - /// - /// Feeds the state of the given pointer into the handler. - /// - /// - public virtual void FeedPointerState(PointerState state) { - if (state.is2D) state.position2D = MapPointerToBrowser(state.position2D, state.id); - else { - Debug.DrawRay(state.position3D.origin, state.position3D.direction * (Mathf.Min(500, maxDistance)), Color.cyan); - state.position2D = MapRayToBrowser(state.position3D, state.id); - //Debug.Log("Pointer " + state.id + " at " + state.position3D.origin + " pointing " + state.position3D.direction + " maps to " + state.position2D); - } - - if (float.IsNaN(state.position2D.x)) return; - - if (state.id == currentPointerId) { - p_currentOver = currentPointers.Count; - - if (state.activeButtons != 0) p_currentDown = currentPointers.Count; - } else { - p_anyOver = currentPointers.Count; - - if (state.activeButtons != 0) p_anyDown = currentPointers.Count; - } - - currentPointers.Add(state); - } - - protected virtual void CalculatePointer() { -// if (!appFocused) { -// MouseIsOff(); -// return; -// } - - /* - * The position/priority we feed to the browser is determined in this order: - * - Pointer we used earlier with a button down - * - Pointer with a button down - * - Pointer we used earlier - * - Any pointer that is over the browser - * Pointers that aren't over the browser are ignored. - * If multiple pointers meet the criteria we may pick any that qualify. - */ - - PointerState stateToUse; - if (p_currentDown >= 0) { - //last frame's pointer with a button down - stateToUse = currentPointers[p_currentDown]; - } else if (p_anyDown >= 0) { - //mouse button count became > 0 this frame - stateToUse = currentPointers[p_anyDown]; - } else if (p_currentOver >= 0) { - //just hovering (use the pointer from last frame) - stateToUse = currentPointers[p_currentOver]; - } else if (p_anyOver >= 0) { - //just hovering (use any pointer over us) - stateToUse = currentPointers[p_anyOver]; - } else { - //no pointers over us - MouseIsOff(); - return; - } - - MouseIsOver(); - - if (MouseButtons == 0 && stateToUse.activeButtons != 0) { - //no buttons -> 1+ buttons - onClick(); - //start drag prevention - dragging = false; - mouseDownPosition = stateToUse.position2D; - } - - if (float.IsNaN(stateToUse.position2D.x)) Debug.LogError("Using an invalid pointer");// "shouldn't happen" - - if (stateToUse.activeButtons != 0 || MouseButtons != 0) { - //Button(s) held or being released, do some extra logic to prevent unintentional dragging during clicks. - - if (!dragging && stateToUse.activeButtons != 0) {//only check distance if buttons(s) held and not already dragging - //Check to see if we passed the drag threshold. - var size = browser.Size; - var distance = Vector2.Distance( - Vector2.Scale(stateToUse.position2D, size),//convert from [0, 1] to pixels - Vector2.Scale(mouseDownPosition, size)//convert from [0, 1] to pixels - ); - - if (distance > dragMovementThreshold) { - dragging = true; - } - } - - if (dragging) MousePosition = stateToUse.position2D; - else MousePosition = mouseDownPosition; - } else { - //no buttons held (or being release), no need to fiddle with the position - MousePosition = stateToUse.position2D; - } - - MouseButtons = stateToUse.activeButtons; - MouseScroll = stateToUse.scrollDelta; - currentPointerId = stateToUse.id; - } - - - public void OnGUI() { - keyEvents.Feed(Event.current); - } - - protected bool mouseWasOver = false; - protected void MouseIsOver() { - MouseHasFocus = true; - KeyboardHasFocus = true; - - if (BrowserCursor != null) { - CursorUpdated(); - } - - mouseWasOver = true; - } - - protected void MouseIsOff() { -// if (BrowserCursor != null && mouseWasOver) { -// SetCursor(null); -// } - mouseWasOver = false; - - MouseHasFocus = false; - if (focusForceCount <= 0) KeyboardHasFocus = false; - MouseButtons = 0; - MouseScroll = Vector2.zero; - - currentPointerId = 0; - } - - protected void CursorUpdated() { -// SetCursor(BrowserCursor); - } - - private int focusForceCount = 0; - - /// - /// Sets a flag to keep the keyboard focus on this browser, even if it has no pointers. - /// Useful for focusing it to type things in via external keyboard. - /// - /// Call again with force = false to return to the default behavior. (You must call force - /// on and force off an equal number of times to revert to the default behavior.) - /// - /// - /// - public void ForceKeyboardHasFocus(bool force) { - if (force) ++focusForceCount; - else --focusForceCount; - if (focusForceCount == 1) KeyboardHasFocus = true; - else if (focusForceCount == 0) KeyboardHasFocus = false; - } - -#endregion - -#region Input Handlers - - [Tooltip("Camera to use to interpret 2D inputs and to originate FPS rays from. Defaults to Camera.main.")] - public Camera viewCamera; - - public bool enableMouseInput = true; - public bool enableTouchInput = true; - public bool enableFPSInput = false; - public bool enableVRInput = false; - - [Tooltip("(For ray-based interaction) How close must you be to the browser to be able to interact with it?")] - public float maxDistance = float.PositiveInfinity; - - [Space(5)] - [Tooltip("Disable Input.simulateMouseWithTouches globally. This will prevent touches from appearing as mouse events.")] - public bool disableMouseEmulation = false; - - protected virtual void OnHandlePointers() { - if (enableFPSInput) FeedFPS(); - - //special case to avoid duplicate pointer from the first touch (ignore mouse) - if (enableMouseInput && enableTouchInput && Input.simulateMouseWithTouches && Input.touchCount > 0) { - FeedTouchPointers(); - return; - } - - if (enableMouseInput) FeedMousePointer(); - if (enableTouchInput) FeedTouchPointers(); - #if UNITY_2017_2_OR_NEWER - if (enableVRInput) FeedVRPointers(); - #endif - } - - /// - /// Calls FeedPointerState with all the items in Input.touches. - /// (Does not happen automatically, call when desired.) - /// - protected virtual void FeedTouchPointers() { - for (int i = 0; i < Input.touchCount; i++) { - var touch = Input.GetTouch(i); - - FeedPointerState(new PointerState { - id = 10 + touch.fingerId, - is2D = true, - position2D = touch.position, - activeButtons = (touch.phase == TouchPhase.Began || touch.phase == TouchPhase.Moved || touch.phase == TouchPhase.Stationary) ? MouseButton.Left : 0, - }); - } - } - - /// - /// Calls FeedPointerState with the current mouse state. - /// (Does not happen automatically, call when desired.) - /// - protected virtual void FeedMousePointer() { - var buttons = (MouseButton)0; - if (Input.GetMouseButton(0)) buttons |= MouseButton.Left; - if (Input.GetMouseButton(1)) buttons |= MouseButton.Right; - if (Input.GetMouseButton(2)) buttons |= MouseButton.Middle; - - FeedPointerState(new PointerState { - id = 1, - is2D = true, - position2D = Input.mousePosition, - activeButtons = buttons, - scrollDelta = Input.mouseScrollDelta, - }); - } - - - protected virtual void FeedFPS() { - var buttons = - (Input.GetButton("Fire1") ? MouseButton.Left : 0) | - (Input.GetButton("Fire2") ? MouseButton.Right : 0) | - (Input.GetButton("Fire3") ? MouseButton.Middle : 0) - ; - - var camera = viewCamera ? viewCamera : Camera.main; - - var scrollDelta = Input.mouseScrollDelta; - - //Don't double-count scrolling if we are processing the mouse too. - if (enableMouseInput) scrollDelta = Vector2.zero; - - FeedPointerState(new PointerState { - id = 2, - is2D = false, - position3D = new Ray(camera.transform.position, camera.transform.forward), - activeButtons = buttons, - scrollDelta = scrollDelta, - }); - } - -#if UNITY_2017_2_OR_NEWER - protected VRBrowserHand[] vrHands = null; - protected virtual void FeedVRPointers() { - if (vrHands == null) { - vrHands = FindObjectsOfType(); - if (vrHands.Length == 0 && XRSettings.enabled) { - Debug.LogWarning("VR input is enabled, but no VRBrowserHands were found in the scene", this); - } - } - - for (int i = 0; i < vrHands.Length; i++) { - if (!vrHands[i].Tracked) continue; - - FeedPointerState(new PointerState { - id = 100 + i, - is2D = false, - position3D = new Ray(vrHands[i].transform.position, vrHands[i].transform.forward), - activeButtons = vrHands[i].DepressedButtons, - scrollDelta = vrHands[i].ScrollDelta, - }); - } - - } -#endif - -#endregion - - public virtual bool MouseHasFocus { get; protected set; } - public virtual Vector2 MousePosition { get; protected set; } - public virtual MouseButton MouseButtons { get; protected set; } - public virtual Vector2 MouseScroll { get; protected set; } - public virtual bool KeyboardHasFocus { get; protected set; } - public virtual List KeyEvents { get { return keyEvents.Events; } } - public virtual BrowserCursor BrowserCursor { get; protected set; } - public virtual BrowserInputSettings InputSettings { get; protected set; } - -} - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/PointerUIBase.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/PointerUIBase.cs.meta deleted file mode 100644 index 8ea15838..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/PointerUIBase.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 7bd56d627d06bc64382a847aa240ae1d -timeCreated: 1495912815 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/PointerUIGUI.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/PointerUIGUI.cs deleted file mode 100644 index ee059c19..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/PointerUIGUI.cs +++ /dev/null @@ -1,126 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.EventSystems; -using UnityEngine.UI; - -namespace ZenFulcrum.EmbeddedBrowser { - -/** Attach this script to a GUI Image to use a browser on it. */ -[RequireComponent(typeof(RawImage))] -public class PointerUIGUI : - PointerUIBase, - IBrowserUI, - ISelectHandler, IDeselectHandler, - IPointerEnterHandler, IPointerExitHandler, - IPointerDownHandler -{ - protected RawImage myImage; - - public bool enableInput = true; - public bool automaticResize = true; - - public override void Awake() { - base.Awake(); - myImage = GetComponent(); - - browser.afterResize += UpdateTexture; -// BrowserCursor.cursorChange += () => { -// SetCursor(BrowserCursor); -// }; - - rTransform = GetComponent(); - } - - protected void OnEnable() { - if (automaticResize) StartCoroutine(WatchResize()); - } - - /** Automatically resizes the browser to match the size of this object. */ - private IEnumerator WatchResize() { - Rect currentSize = new Rect(); - - while (enabled) { - var rect = rTransform.rect; - - if (rect.size.x <= 0 || rect.size.y <= 0) rect.size = new Vector2(512, 512); - if (rect.size != currentSize.size) { - browser.Resize((int)rect.size.x, (int)rect.size.y); - currentSize = rect; - } - - yield return null; - } - } - - protected void UpdateTexture(Texture2D texture) { - myImage.texture = texture; - myImage.uvRect = new Rect(0, 0, 1, 1); - } - - protected BaseRaycaster raycaster; - protected RectTransform rTransform; -// protected List raycastResults = new List(); - - protected override Vector2 MapPointerToBrowser(Vector2 screenPosition, int pointerId) { - if (!raycaster) raycaster = GetComponentInParent(); - - Vector2 pos; - RectTransformUtility.ScreenPointToLocalPointInRectangle( - (RectTransform)transform, screenPosition, raycaster.eventCamera, out pos - ); - pos.x = pos.x / rTransform.rect.width + rTransform.pivot.x; - pos.y = pos.y / rTransform.rect.height + rTransform.pivot.y; - return pos; - } - - protected override Vector2 MapRayToBrowser(Ray worldRay, int pointerId) { - var evs = EventSystem.current; - if (!evs) return new Vector2(float.NaN, float.NaN); - - //todo: world-space GUI - return new Vector2(float.NaN, float.NaN); - } - - public override void GetCurrentHitLocation(out Vector3 pos, out Quaternion rot) { - //todo: world space GUI - pos = new Vector3(float.NaN, float.NaN, float.NaN); - rot = Quaternion.identity; - } - - - protected bool _mouseHasFocus; - public override bool MouseHasFocus { - get { return _mouseHasFocus && enableInput; } - protected set { _mouseHasFocus = value; } - } - protected bool _keyboardHasFocus; - public override bool KeyboardHasFocus { get { return _keyboardHasFocus && enableInput; } } - - public void OnSelect(BaseEventData eventData) { - _keyboardHasFocus = true; - Input.imeCompositionMode = IMECompositionMode.Off;//CEF will handle the IME - } - - public void OnDeselect(BaseEventData eventData) { - _keyboardHasFocus = false; - Input.imeCompositionMode = IMECompositionMode.Auto; - } - - public void OnPointerEnter(PointerEventData eventData) { - _mouseHasFocus = true; -// SetCursor(BrowserCursor); - } - - public void OnPointerExit(PointerEventData eventData) { - _mouseHasFocus = false; -// SetCursor(null); - } - - - public void OnPointerDown(PointerEventData eventData) { - EventSystem.current.SetSelectedGameObject(gameObject); - } -} - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/PointerUIGUI.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/PointerUIGUI.cs.meta deleted file mode 100644 index 58f152e8..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/PointerUIGUI.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 9f0449828438f1c4eb0712205cc11bb7 -timeCreated: 1495924470 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/PointerUIMesh.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/PointerUIMesh.cs deleted file mode 100644 index 054cc2b2..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/PointerUIMesh.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -namespace ZenFulcrum.EmbeddedBrowser { - -/// -/// A BrowserUI that tracks pointer interaction through a camera to a mesh of some sort. -/// -[RequireComponent(typeof(MeshCollider))] -public class PointerUIMesh : PointerUIBase { - protected MeshCollider meshCollider; - - protected Dictionary rayHits = new Dictionary(); - - [Tooltip("Which layers should UI rays collide with (and be able to hit)?")] - public LayerMask layerMask = -1; - - public override void Awake() { - base.Awake(); - meshCollider = GetComponent(); - } - - protected override Vector2 MapPointerToBrowser(Vector2 screenPosition, int pointerId) { - var camera = viewCamera ? viewCamera : Camera.main; - return MapRayToBrowser(camera.ScreenPointToRay(screenPosition), pointerId); - } - - protected override Vector2 MapRayToBrowser(Ray worldRay, int pointerId) { - RaycastHit hit; - var rayHit = Physics.Raycast(worldRay, out hit, maxDistance, layerMask); - - //store hit data for GetCurrentHitLocation - rayHits[pointerId] = hit; - - if (!rayHit || hit.collider.transform != meshCollider.transform) { - //not aimed at it - return new Vector3(float.NaN, float.NaN); - } else { - return hit.textureCoord; - } - } - - public override void GetCurrentHitLocation(out Vector3 pos, out Quaternion rot) { - if (currentPointerId == 0) { - //no pointer - pos = new Vector3(float.NaN, float.NaN, float.NaN); - rot = Quaternion.identity; - return; - } - - var hitInfo = rayHits[currentPointerId]; - - //We need to know which way is up, so the cursor has the correct "up". - //There's a couple ways to do this: - //1. Use the barycentric coordinates and some math to figure out what direction the collider's - // v (from the uv) is getting bigger/smaller, then do some math to find out what direction - // that is in world space. - //2. Just use the collider's local orientation's up. This isn't accurate on highly - // distorted meshes, but is much simpler to calculate. - //For now, we use method 2. - var up = hitInfo.collider.transform.up; - - pos = hitInfo.point; - rot = Quaternion.LookRotation(-hitInfo.normal, up); - } - -} - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/PointerUIMesh.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/PointerUIMesh.cs.meta deleted file mode 100644 index d5e55592..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/BrowserUI/PointerUIMesh.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 70425c8c18e6a674da5c39ca0c09003c -timeCreated: 1495915500 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Cookie.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Cookie.cs deleted file mode 100644 index 19b807fc..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Cookie.cs +++ /dev/null @@ -1,100 +0,0 @@ -using System; -using System.Text.RegularExpressions; -using UnityEngine; -using NativeCookie = ZenFulcrum.EmbeddedBrowser.BrowserNative.NativeCookie; - -namespace ZenFulcrum.EmbeddedBrowser { - public class Cookie { - - public static void Init() { - //Empty function on this class to call so we can get the cctor to call on the correct thread. - //(Regex construction tends to crash if it tries to run from certain threads.) - } - - - private CookieManager cookies; - - private NativeCookie original; - - public string name = "", value = "", domain = "", path = ""; - /** Creation/access time of the cookie. Mostly untested/unsupported at present. */ - public DateTime creation, lastAccess; - /** Null for normal cookies, a time for cookies that expire. Mostly untested/unsupported at present. */ - public DateTime? expires; - public bool secure, httpOnly; - - public Cookie(CookieManager cookies) { - this.cookies = cookies; - } - - internal Cookie(CookieManager cookies, NativeCookie cookie) { - this.cookies = cookies; - original = cookie; - Copy(original, this); - } - - /** Deletes this cookie from the browser. */ - public void Delete() { - if (original == null) return; - - BrowserNative.zfb_editCookie(cookies.browser.browserId, original, BrowserNative.CookieAction.Delete); - original = null; - } - - /** Updates any changes to this cookie in the browser, creating the cookie if it's new. */ - public void Update() { - if (original != null) Delete(); - - original = new NativeCookie(); - Copy(this, original); - - BrowserNative.zfb_editCookie(cookies.browser.browserId, original, BrowserNative.CookieAction.Create); - } - - static readonly Regex dateRegex = new Regex(@"(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2}).(\d{3})"); - - public static void Copy(NativeCookie src, Cookie dest) { - dest.name = src.name; - dest.value = src.value; - dest.domain = src.domain; - dest.path = src.path; - - Func convert = s => { - var m = dateRegex.Match(s); - - return new DateTime( - int.Parse(m.Groups[1].ToString()), - int.Parse(m.Groups[2].ToString()), - int.Parse(m.Groups[3].ToString()), - int.Parse(m.Groups[4].ToString()), - int.Parse(m.Groups[5].ToString()), - int.Parse(m.Groups[6].ToString()), - int.Parse(m.Groups[7].ToString()) - ); - }; - - dest.creation = convert(src.creation); - dest.expires = src.expires == null ? (DateTime?)null : convert(src.expires); - dest.lastAccess = convert(src.lastAccess); - - dest.secure = src.secure != 0; - dest.httpOnly = src.httpOnly != 0; - } - - public static void Copy(Cookie src, NativeCookie dest) { - dest.name = src.name; - dest.value = src.value; - dest.domain = src.domain; - dest.path = src.path; - - Func convert = s => s.ToString("yyyy-MM-dd hh:mm:ss.fff"); - - dest.creation = convert(src.creation); - dest.expires = src.expires == null ? null : convert(src.expires.Value); - dest.lastAccess = convert(src.lastAccess); - - dest.secure = src.secure ? (byte)1 : (byte)0; - dest.httpOnly = src.httpOnly ? (byte)1 : (byte)0; - } - } -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Cookie.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Cookie.cs.meta deleted file mode 100644 index fb1ec2d7..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Cookie.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: f7a2a645481f96e4682c86cc9b22dff9 -timeCreated: 1478892646 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/CookieManager.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/CookieManager.cs deleted file mode 100644 index ed4622de..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/CookieManager.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using AOT; -using UnityEngine; - -namespace ZenFulcrum.EmbeddedBrowser { - -public class CookieManager { - internal readonly Browser browser; - - - public CookieManager(Browser browser) { - this.browser = browser; - } - - private class CookieFetch { - public BrowserNative.GetCookieFunc nativeCB; - public Promise> promise; - public CookieManager manager; - public List result; - } - - private static CookieFetch currentFetch; - - /** - * Returns a list of all cookies in the browser across all domains. - * - * Note that cookies are shared between browser instances. - * - * If the browser is not ready yet (browser.IsReady or WhenReady()) this will return an empty list. - * - * This method is not reentrant! You must wait for the returned promise to resolve before calling it again, - * even on a differnet object. - */ - public IPromise> GetCookies() { - if (currentFetch != null) { - //This method Wait for the previous promise to resolve, then make your call. - //If this limitation actually affects you, let me know. - throw new InvalidOperationException("GetCookies is not reentrant"); - } - - Cookie.Init(); - - var result = new List(); - if (!browser.IsReady || !browser.enabled) return Promise>.Resolved(result); - var promise = new Promise>(); - - BrowserNative.GetCookieFunc cookieFunc = CB_GetCookieFunc; - BrowserNative.zfb_getCookies(browser.browserId, cookieFunc); - - currentFetch = new CookieFetch { - promise = promise, - nativeCB = cookieFunc, - manager = this, - result = result, - }; - - return promise; - } - - [MonoPInvokeCallback(typeof(BrowserNative.GetCookieFunc))] - private static void CB_GetCookieFunc(BrowserNative.NativeCookie cookie) { - try { - if (cookie == null) { - var result = currentFetch.result; - var promise = currentFetch.promise; - currentFetch.manager.browser.RunOnMainThread(() => promise.Resolve(result)); - currentFetch = null; - return; - } - - currentFetch.result.Add(new Cookie(currentFetch.manager, cookie)); - - } catch (Exception ex) { - Debug.LogException(ex); - } - } - - /** - * Deletes all cookies in the browser. - */ - public void ClearAll() { - if (browser.DeferUnready(ClearAll)) return; - - BrowserNative.zfb_clearCookies(browser.browserId); - } - - - - -} - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/CookieManager.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/CookieManager.cs.meta deleted file mode 100644 index 76bf489c..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/CookieManager.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 536726be6d65c4f4fa53116569aa4be5 -timeCreated: 1478910267 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/DialogHandler.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/DialogHandler.cs deleted file mode 100644 index 0ab7cc50..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/DialogHandler.cs +++ /dev/null @@ -1,121 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; - -namespace ZenFulcrum.EmbeddedBrowser { - -/** - * Helper for browser dialog boxes, like alert(). You don't need to use this directly, it will - * automatically be added where it's needed. - */ -[RequireComponent(typeof(Browser))] -public class DialogHandler : MonoBehaviour { - protected static string dialogPage; - - public delegate void DialogCallback(bool affirm, string text1, string text2); - public delegate void MenuCallback(int commandId); - - public static DialogHandler Create(Browser parent, DialogCallback dialogCallback, MenuCallback contextCallback) { - if (dialogPage == null) { - dialogPage = Resources.Load("Browser/Dialogs").text; - } - - - var go = new GameObject("Browser Dialog for " + parent.name); - var handler = go.AddComponent(); - - handler.parentBrowser = parent; - handler.dialogCallback = dialogCallback; - - - var db = handler.dialogBrowser = handler.GetComponent(); - - db.UIHandler = parent.UIHandler; - db.EnableRendering = false; - db.EnableInput = false; - db.allowContextMenuOn = BrowserNative.ContextMenuOrigin.Editable; - //Use the parent texture. Except, we don't actually use it. So - //mostly we just mimic the size and don't consume more texture memory. - db.Resize(parent.Texture); - db.LoadHTML(dialogPage, "zfb://dialog"); - db.UIHandler = parent.UIHandler; - - db.RegisterFunction("reportDialogResult", args => { - dialogCallback(args[0], args[1], args[2]); - handler.Hide(); - }); - db.RegisterFunction("reportContextMenuResult", args => { - contextCallback(args[0]); - handler.Hide(); - }); - - return handler; - } - - protected Browser parentBrowser; - protected Browser dialogBrowser; - protected DialogCallback dialogCallback; - protected MenuCallback contextCallback; - - public void HandleDialog(BrowserNative.DialogType type, string text, string promptDefault = null) { - if (type == BrowserNative.DialogType.DLT_HIDE) { - Hide(); - return; - } - - Show(); - - //Debug.Log("HandleDialog " + type + " text " + text + " prompt " + promptDefault); - - switch (type) { - case BrowserNative.DialogType.DLT_ALERT: - dialogBrowser.CallFunction("showAlert", text); - break; - case BrowserNative.DialogType.DLT_CONFIRM: - dialogBrowser.CallFunction("showConfirm", text); - break; - case BrowserNative.DialogType.DLT_PROMPT: - dialogBrowser.CallFunction("showPrompt", text, promptDefault); - break; - case BrowserNative.DialogType.DLT_PAGE_UNLOAD: - dialogBrowser.CallFunction("showConfirmNav", text); - break; - case BrowserNative.DialogType.DLT_PAGE_RELOAD: - dialogBrowser.CallFunction("showConfirmReload", text); - break; - case BrowserNative.DialogType.DLT_GET_AUTH: - dialogBrowser.CallFunction("showAuthPrompt", text); - break; - default: - throw new ArgumentOutOfRangeException("type", type, null); - } - } - - public void Show() { - parentBrowser.SetOverlay(dialogBrowser); - parentBrowser.EnableInput = false; - dialogBrowser.EnableInput = true; - dialogBrowser.UpdateCursor(); - } - - public void Hide() { - parentBrowser.SetOverlay(null); - parentBrowser.EnableInput = true; - dialogBrowser.EnableInput = false; - parentBrowser.UpdateCursor(); - if (dialogBrowser.IsLoaded) dialogBrowser.CallFunction("reset"); - } - - public void HandleContextMenu(string menuJSON, int x, int y) { - if (menuJSON == null) { - Hide(); - return; - } - - Show(); - - dialogBrowser.CallFunction("showContextMenu", menuJSON, x, y); - } -} - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/DialogHandler.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/DialogHandler.cs.meta deleted file mode 100644 index 4dc50376..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/DialogHandler.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 8c5bf0b11246b1f42a262f8a64026d33 -timeCreated: 1449001312 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/DownloadManager.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/DownloadManager.cs deleted file mode 100644 index ac1a738a..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/DownloadManager.cs +++ /dev/null @@ -1,226 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Runtime.InteropServices; -using System.Text; -using UnityEngine; -using UnityEngine.UI; - -namespace ZenFulcrum.EmbeddedBrowser { - -/** - * Helper class for tracking and managing downloads. - * You can manage and handle downloads without this, but you may find it useful for dealing with the more - * common file downloading use cases. - * - * Usage: create one and call manager.ManageDownloads(browser) on a browser you want it to handle. - * or throw one in the scene and set "manageAllBrowsers" to true (before loading the scene) for it - * to automatically hook into all browsers that start in the scene. - */ -public class DownloadManager : MonoBehaviour { - - [Tooltip("If true, this will find all the browser in the scene at startup and take control of their downloads.")] - public bool manageAllBrowsers = false; - - [Tooltip("If true, a \"Save as\" style dialog will be given for all downloads.")] - public bool promptForFileNames; - - [Tooltip("Where to save files. If null or blank, defaults to the user's downloads directory.")] - public string saveFolder; - - [Tooltip("If given this text element will be updated with download status info.")] - public Text statusBar; - - public class Download { - public Browser browser; - public int downloadId; - public string name; - public string path; - public int speed; - public int percent; - public string status; - } - - public List downloads = new List(); - - public void Awake() { - if (manageAllBrowsers) { - foreach (var browser in FindObjectsOfType()) { - ManageDownloads(browser); - } - } - } - - public void ManageDownloads(Browser browser) { - browser.onDownloadStarted = (id, info) => { - HandleDownloadStarted(browser, id, info); - }; - browser.onDownloadStatus += (id, info) => { - HandleDownloadStatus(browser, id, info); - }; - } - - - private void HandleDownloadStarted(Browser browser, int downloadId, JSONNode info) { - //Debug.Log("Download requested: " + info.AsJSON); - - var download = new Download { - browser = browser, - downloadId = downloadId, - name = info["suggestedName"], - }; - - - if (promptForFileNames) { - browser.DownloadCommand(downloadId, BrowserNative.DownloadAction.Begin, null); - } else { - DirectoryInfo downloadFolder; - if (string.IsNullOrEmpty(saveFolder)) { - downloadFolder = new DirectoryInfo(GetUserDownloadFolder()); - } else { - downloadFolder = new DirectoryInfo(saveFolder); - if (!downloadFolder.Exists) downloadFolder.Create(); - } - - var filePath = downloadFolder.FullName + "/" + new FileInfo(info["suggestedName"]).Name; - while (File.Exists(filePath)) { - var ext = Path.GetExtension(filePath); - var left = Path.GetFileNameWithoutExtension(filePath); - - var time = DateTime.Now.ToString("yyyy-MM-dd hh_mm_ss"); - filePath = downloadFolder.FullName + "/" + left + " " + time + ext; - } - browser.DownloadCommand(downloadId, BrowserNative.DownloadAction.Begin, filePath); - } - - downloads.Add(download); - } - - private void HandleDownloadStatus(Browser browser, int downloadId, JSONNode info) { - //Debug.Log("Download status: " + info.AsJSON); - - for (int i = 0; i < downloads.Count; i++) { - if (downloads[i].browser != browser || downloads[i].downloadId != downloadId) continue; - - var download = downloads[i]; - - download.status = info["status"]; - download.speed = info["speed"]; - download.percent = info["percentComplete"]; - if (!string.IsNullOrEmpty(info["fullPath"])) download.name = Path.GetFileName(info["fullPath"]); - - break; - } - } - - public void Update() { - if (statusBar) { - statusBar.text = Status; - } - } - - public void PauseAll() { - for (int i = 0; i < downloads.Count; i++) { - if (downloads[i].status == "working") { - downloads[i].browser.DownloadCommand(downloads[i].downloadId, BrowserNative.DownloadAction.Pause); - } - } - } - - - public void ResumeAll() { - for (int i = 0; i < downloads.Count; i++) { - if (downloads[i].status == "working") { - downloads[i].browser.DownloadCommand(downloads[i].downloadId, BrowserNative.DownloadAction.Resume); - } - } - } - - public void CancelAll() { - for (int i = 0; i < downloads.Count; i++) { - if (downloads[i].status == "working") { - downloads[i].browser.DownloadCommand(downloads[i].downloadId, BrowserNative.DownloadAction.Cancel); - } - } - } - - public void ClearAll() { - CancelAll(); - downloads.Clear(); - } - - private StringBuilder sb = new StringBuilder(); - /** Returns a string summarizing things that are downloading. */ - public string Status { - get { - if (downloads.Count == 0) return ""; - - sb.Length = 0; - var rate = 0; - for (int i = downloads.Count - 1; i >= 0; i--) { - if (sb.Length > 0) sb.Append(", "); - sb.Append(downloads[i].name); - - if (downloads[i].status == "working") { - if (downloads[i].percent >= 0) sb.Append(" (").Append(downloads[i].percent).Append("%)"); - else sb.Append(" (??%)"); - rate += downloads[i].speed; - } else { - sb.Append(" (").Append(downloads[i].status).Append(")"); - } - } - - var ret = "Downloads"; - if (rate > 0) { - ret += " (" + Mathf.Round(rate / (1024f * 1024) * 100) / 100f + "MiB/s)"; - } - - return ret + ": " + sb.ToString(); - } - } - - /** Gets the user's download folder, creating it if needed. */ - public static string GetUserDownloadFolder() { - switch (System.Environment.OSVersion.Platform) { - case PlatformID.Win32NT: { - - IntPtr path; - var r = SHGetKnownFolderPath( - new Guid("{374DE290-123F-4565-9164-39C4925E467B}"), //downloads - 0x8000, //KF_FLAG_CREATE - IntPtr.Zero, //current user - out path - ); - - if (r == 0) { - var ret = Marshal.PtrToStringUni(path); - Marshal.FreeCoTaskMem(path); - return ret; - } else { - throw new Exception( - "Failed to get user download directory", - new System.ComponentModel.Win32Exception(Marshal.GetLastWin32Error()) - ); - } - } - case PlatformID.Unix: { - var path = System.Environment.GetEnvironmentVariable("HOME") + "/Downloads"; - var di = new DirectoryInfo(path); - if (!di.Exists) di.Create(); - return path; - } - case PlatformID.MacOSX: - throw new NotImplementedException(); - default: - throw new NotImplementedException(); - } - } - - [DllImport("Shell32.dll")] - private static extern int SHGetKnownFolderPath( - [MarshalAs(UnmanagedType.LPStruct)]Guid rfid, uint dwFlags, IntPtr hToken, - out IntPtr ppszPath - ); -} - -} \ No newline at end of file diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/DownloadManager.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/DownloadManager.cs.meta deleted file mode 100644 index 08e10d89..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/DownloadManager.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 7d247427dfff6304db2b292811004b23 -timeCreated: 1510867277 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor.meta deleted file mode 100644 index a36f078c..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 4c5a65551ba9c9949a3b3fefeb7fc1bd -folderAsset: yes -timeCreated: 1447281187 -licenseType: Store -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/BrowserEditor.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/BrowserEditor.cs deleted file mode 100644 index c34cea39..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/BrowserEditor.cs +++ /dev/null @@ -1,133 +0,0 @@ -using System; -using UnityEngine; -using System.Collections; -using System.Collections.Generic; -using UnityEditor; - -namespace ZenFulcrum.EmbeddedBrowser { - -[CustomEditor(typeof(Browser))] -[CanEditMultipleObjects] -public class BrowserEditor : Editor { - - private static string script = "document.body.style.background = 'red';\n"; - private static string html = "Hello, world!\n"; - - private static string[] commandNames; - private static BrowserNative.FrameCommand[] commandValues; - - - static BrowserEditor() { - var els = Enum.GetValues(typeof(BrowserNative.FrameCommand)); - commandNames = new string[els.Length]; - commandValues = new BrowserNative.FrameCommand[els.Length]; - int i = 0; - foreach (BrowserNative.FrameCommand cmd in els) { - commandNames[i] = cmd.ToString(); - commandValues[i] = cmd; - ++i; - } - - } - - public override bool RequiresConstantRepaint() { - //The buttons get stale if we don't keep repainting them. - return Application.isPlaying; - } - - public override void OnInspectorGUI() { - base.OnInspectorGUI(); - - if (Application.isPlaying && !serializedObject.isEditingMultipleObjects) { - RenderActions(); - } else if (!Application.isPlaying) { - GUILayout.Label("Additional options available in play mode"); - } - - } - - private void RenderActions() { - var browser = (Browser)target; - - if (!browser.IsReady) { - GUILayout.Label("Starting..."); - return; - } - - GUILayout.BeginVertical("box"); - GUILayout.Label("Apply items above:"); - - GUILayout.BeginHorizontal("box"); - { - if (GUILayout.Button("Go to URL")) browser.LoadURL(serializedObject.FindProperty("_url").stringValue, false); - if (GUILayout.Button("Force to URL")) browser.Url = serializedObject.FindProperty("_url").stringValue; - if (GUILayout.Button("Resize")) { - browser.Resize( - serializedObject.FindProperty("_width").intValue, - serializedObject.FindProperty("_height").intValue - ); - } - - if (GUILayout.Button("Set Zoom")) browser.Zoom = serializedObject.FindProperty("_zoom").floatValue; - } - GUILayout.EndHorizontal(); - - GUILayout.Label("Actions:"); - - GUILayout.BeginHorizontal(); - { - GUI.enabled = browser.CanGoBack; - if (GUILayout.Button("Go back")) browser.GoBack(); - GUI.enabled = browser.CanGoForward; - if (GUILayout.Button("Go forward")) browser.GoForward(); - GUI.enabled = true; - - - if (browser.IsLoadingRaw) { - if (GUILayout.Button("Stop")) browser.Stop(); - } else { - if (GUILayout.Button("Reload")) browser.Reload(); - } - if (GUILayout.Button("Force Reload")) browser.Reload(true); - } - GUILayout.EndHorizontal(); - - - GUILayout.BeginHorizontal(); - { - if (GUILayout.Button("Show Dev Tools")) browser.ShowDevTools(); - if (GUILayout.Button("Hide Dev Tools")) browser.ShowDevTools(false); - } - GUILayout.EndHorizontal(); - - - GUILayout.Label("Script:"); - script = EditorGUILayout.TextArea(script); - GUILayout.BeginHorizontal(); - if (GUILayout.Button("Eval JavaScript")) { - browser.EvalJS(script, "editor command"); - } - if (GUILayout.Button("Eval JavaScript CSP")) { - browser.EvalJSCSP(script, "editor command"); - } - GUILayout.EndHorizontal(); - - int pVal = EditorGUILayout.Popup("Send Command:", -1, commandNames); - if (pVal != -1) { - browser.SendFrameCommand(commandValues[pVal]); - } - - GUILayout.Label("HTML:"); - html = EditorGUILayout.TextArea(html); - if (GUILayout.Button("Load HTML")) { - browser.LoadHTML(html); - } - - - GUILayout.EndVertical(); - } - - -} - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/BrowserEditor.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/BrowserEditor.cs.meta deleted file mode 100644 index 10754e83..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/BrowserEditor.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 28d4a442795171f4b92b03a99fcbdc6f -timeCreated: 1447280847 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/FlagsEditor.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/FlagsEditor.cs deleted file mode 100644 index f8a876de..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/FlagsEditor.cs +++ /dev/null @@ -1,13 +0,0 @@ -using UnityEditor; -using UnityEngine; - -namespace ZenFulcrum.EmbeddedBrowser { - -[CustomPropertyDrawer(typeof(FlagsFieldAttribute))] -public class FlagsEditor : PropertyDrawer { - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { - property.intValue = EditorGUI.MaskField(position, label, property.intValue, property.enumNames); - } -} - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/FlagsEditor.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/FlagsEditor.cs.meta deleted file mode 100644 index 7d96dbfc..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/FlagsEditor.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 4846ded01fb9d6b489529816869b1d20 -timeCreated: 1450462477 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/IconGenerator.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/IconGenerator.cs deleted file mode 100644 index ad5ce103..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/IconGenerator.cs +++ /dev/null @@ -1,332 +0,0 @@ -//This file is partially subject to Chromium's BSD license, read the class notes for more details. - - -using System; -using UnityEngine; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using UnityEditor; -using CursorType = ZenFulcrum.EmbeddedBrowser.BrowserNative.CursorType; - -/** - * Utility for generating the cursor icons. - * - * This isn't really here for general usage, but if you're willing to read the source and - * fiddle with things this may give you a head start from starting with nothing. - * - * The default icons are pulled from - * https://chromium.googlesource.com/chromium/src.git/+/master/ui/resources/default_100_percent/common/pointers/ - * https://chromium.googlesource.com/chromium/src.git/+/master/ui/resources/ui_resources.grd - * and - * https://chromium.googlesource.com/chromium/src.git/+/master/ui/base/cursor/cursors_aura.cc - * This tool is used with a local directory, {IconGenerator.path}, filled with those icons. - * - * You also need to add a "loading.png" to the folder. - * - * To use this script, update the local path to your icons, define ZF_ICON_GENERATOR, and run it in - * from Assets->ZF Browser->Generate Icons. - */ -[ExecuteInEditMode] -public class IconGenerator { - private const string path = @"/my/path/to/chromium/ui-resources/default_100_percent/common/pointers"; - private const string destAsset = "ZFBrowser/Resources/Browser/Cursors"; - - public static bool useBig = false; - -#if ZF_ICON_GENERATOR - [MenuItem("Assets/ZF Browser/Generate Icons")] -#endif - public static void GenerateIcons() { - var icons = new SortedDictionary(); - - var w = -1; - var h = -1; - - foreach (var file in Directory.GetFiles(path)) { - if (useBig && !file.Contains("_big.png")) continue; - if (!useBig && file.Contains("_big.png")) continue; - - var tex = new Texture2D(0, 0); - tex.LoadImage(File.ReadAllBytes(file)); - - if (w < 0) { - w = tex.width; - h = tex.height; - } else if (w != tex.width || h != tex.height) { - throw new Exception("Icons are not all the same size. This differs: " + file); - } - - var name = Path.GetFileNameWithoutExtension(file); - if (useBig) name = name.Substring(0, name.Length - 4); - icons[name] = tex; - } - - //Also add one for "cursor: none" - icons["_none_"] = null; - - var res = new Texture2D(w * icons.Count, h, TextureFormat.ARGB32, false); - - var descData = new StringBuilder(); - var namesToPositions = new Dictionary(); - var i = 0; - foreach (var kvp in icons) { - if (kvp.Value == null) { - Fill(new Color(0, 0, 0, 0), res, i * w, 0, w, h); - } else { - Copy(kvp.Value, res, i * w, 0); - } - namesToPositions[kvp.Key] = i++; - } - - foreach (var kvp in mapping) { - var pos = -1; - try { - if (kvp.Value.name != "_custom_") pos = namesToPositions[kvp.Value.name]; - } catch (KeyNotFoundException) { - throw new KeyNotFoundException("No file found for " + kvp.Value.name); - } - - if (descData.Length != 0) descData.Append("\n"); - - var hotspot = kvp.Value.hotspot; - if (!useBig) { - hotspot.x = Mathf.Round(hotspot.x * .5f) - 3; - hotspot.y = Mathf.Round(kvp.Value.hotspot.y * .5f) - 4; - } - - descData - .Append(kvp.Key).Append(",") - .Append(pos).Append(",") - .Append(hotspot.x).Append(",") - .Append(hotspot.y) - ; - - } - - var resName = Application.dataPath + "/" + destAsset; - File.WriteAllBytes( - resName + ".png", - res.EncodeToPNG() - ); - File.WriteAllText( - resName + ".csv", - descData.ToString() - ); - - AssetDatabase.Refresh(); - - Debug.Log("Wrote icons files to " + resName + ".(png|csv) size: " + w + "x" + h); - } - - private static void Fill(Color color, Texture2D dest, int sx, int sy, int w, int h) { - for (int x = sx; x < w; ++x) { - for (int y = sy; y < h; ++y) { - dest.SetPixel(x, y, color); - } - } - } - - private static void Copy(Texture2D src, Texture2D dest, int destX, int destY) { - //slow, but fine for a utility - for (int x = 0; x < src.width; ++x) { - for (int y = 0; y < src.height; ++y) { - dest.SetPixel(x + destX, y + destY, src.GetPixel(x, y)); - } - } - } - - private struct CursorInfo { - public CursorInfo(string name, Vector2 hotspot) { - this.name = name; - this.hotspot = hotspot; - } - public string name; - public Vector2 hotspot; - } - - private static Dictionary mapping = new Dictionary() { - //Hotspots in for the default Chromium cursors can be found in ui/base/cursor/cursors_aura.cc, this is adapted - //from there. - //Note that we are always using the 2x (_big) icons. - { - //{19, 11}, {38, 22}} alias kCursorAlias IDR_AURA_CURSOR_ALIAS CT_ALIAS - CursorType.Alias, - new CursorInfo("alias", new Vector2(19, 11)) - }, { - //{30, 30}, {60, 60}} cell kCursorCell IDR_AURA_CURSOR_CELL CT_CELL - CursorType.Cell, - new CursorInfo("cell", new Vector2(30, 30)) - }, { - //{35, 29}, {70, 58}} sb_h_double_arrow kCursorColumnResize IDR_AURA_CURSOR_COL_RESIZE CT_COLUMNRESIZE - CursorType.ColumnResize, - new CursorInfo("sb_h_double_arrow", new Vector2(35, 29)) - }, { - //{11, 11}, {22, 22}} context_menu kCursorContextMenu IDR_AURA_CURSOR_CONTEXT_MENU CT_CONTEXTMENU - CursorType.ContextMenu, - new CursorInfo("context_menu", new Vector2(11, 11)) - }, { - //{10, 10}, {20, 20}} copy kCursorCopy IDR_AURA_CURSOR_COPY CT_COPY - CursorType.Copy, - new CursorInfo("copy", new Vector2(10, 10)) - }, { - //{31, 30}, {62, 60}} crosshair kCursorCross IDR_AURA_CURSOR_CROSSHAIR CT_CROSS - CursorType.Cross, - new CursorInfo("crosshair", new Vector2(31, 30)) - }, { - //{??, ??}, {??, ??}} custom kCursorCustom IDR_NONE CT_CUSTOM - CursorType.Custom, - new CursorInfo("_custom_", new Vector2(-1, -1)) - }, { - //{??, ??}, {??, ??}} _unknown_ kCursorEastPanning IDR_NONE CT_EASTPANNING - CursorType.EastPanning, - new CursorInfo("move", new Vector2(32, 31)) - }, { - //{35, 29}, {70, 58}} sb_h_double_arrow kCursorEastResize IDR_AURA_CURSOR_EAST_RESIZE CT_EASTRESIZE - CursorType.EastResize, - new CursorInfo("sb_h_double_arrow", new Vector2(35, 29)) - }, { - //{35, 29}, {70, 58}} sb_h_double_arrow kCursorEastWestResize IDR_AURA_CURSOR_EAST_WEST_RESIZE CT_EASTWESTRESIZE - CursorType.EastWestResize, - new CursorInfo("sb_h_double_arrow", new Vector2(35, 29)) - }, { - //{21, 11}, {42, 22}} fleur kCursorGrab IDR_AURA_CURSOR_GRAB CT_GRAB - CursorType.Grab, - new CursorInfo("fleur", new Vector2(21, 11)) - }, { - //{20, 12}, {40, 24}} hand3 kCursorGrabbing IDR_AURA_CURSOR_GRABBING CT_GRABBING - CursorType.Grabbing, - new CursorInfo("hand3", new Vector2(20, 12)) - }, { - //{25, 7}, {50, 14}} hand2 kCursorHand IDR_AURA_CURSOR_HAND CT_HAND - CursorType.Hand, - new CursorInfo("hand2", new Vector2(25, 7)) - }, { - //{10, 11}, {20, 22}} help kCursorHelp IDR_AURA_CURSOR_HELP CT_HELP - CursorType.Help, - new CursorInfo("help", new Vector2(10, 11)) - }, { - //{30, 32}, {60, 64}} xterm kCursorIBeam IDR_AURA_CURSOR_IBEAM CT_IBEAM - CursorType.IBeam, - new CursorInfo("xterm", new Vector2(30, 32)) - }, { - //{??, ??}, {??, ??}} _unknown_ kCursorMiddlePanning IDR_NONE CT_MIDDLEPANNING - CursorType.MiddlePanning, - new CursorInfo("move", new Vector2(32, 31)) - }, { - //{32, 31}, {64, 62}} move kCursorMove IDR_AURA_CURSOR_MOVE CT_MOVE - CursorType.Move, - new CursorInfo("move", new Vector2(32, 31)) - }, { - //{10, 10}, {20, 20}} nodrop kCursorNoDrop IDR_AURA_CURSOR_NO_DROP CT_NODROP - CursorType.NoDrop, - new CursorInfo("nodrop", new Vector2(10, 10)) - }, { - //{??, ??}, {??, ??}} _unknown_ kCursorNone IDR_NONE CT_NONE - CursorType.None, - new CursorInfo("_none_", new Vector2(0, 0)) - }, { - //{??, ??}, {??, ??}} _unknown_ kCursorNorthEastPanning IDR_NONE CT_NORTHEASTPANNING - CursorType.NorthEastPanning, - new CursorInfo("move", new Vector2(32, 31)) - }, { - //{31, 28}, {62, 56}} top_right_corner kCursorNorthEastResize IDR_AURA_CURSOR_NORTH_EAST_RESIZE CT_NORTHEASTRESIZE - CursorType.NorthEastResize, - new CursorInfo("top_right_corner", new Vector2(31, 28)) - }, { - //{32, 30}, {64, 60}} top_right_corner kCursorNorthEastSouthWestResize IDR_AURA_CURSOR_NORTH_EAST_SOUTH_WEST_RESIZE CT_NORTHEASTSOUTHWESTRESIZE - CursorType.NorthEastSouthWestResize, - new CursorInfo("top_right_corner", new Vector2(32, 30)) - }, { - //{??, ??}, {??, ??}} _unknown_ kCursorNorthPanning IDR_NONE CT_NORTHPANNING - CursorType.NorthPanning, - new CursorInfo("move", new Vector2(32, 31)) - }, { - //{29, 32}, {58, 64}} sb_v_double_arrow kCursorNorthResize IDR_AURA_CURSOR_NORTH_RESIZE CT_NORTHRESIZE - CursorType.NorthResize, - new CursorInfo("sb_v_double_arrow", new Vector2(29, 32)) - }, { - //{29, 32}, {58, 64}} sb_v_double_arrow kCursorNorthSouthResize IDR_AURA_CURSOR_NORTH_SOUTH_RESIZE CT_NORTHSOUTHRESIZE - CursorType.NorthSouthResize, - new CursorInfo("sb_v_double_arrow", new Vector2(29, 32)) - }, { - //{??, ??}, {??, ??}} _unknown_ kCursorNorthWestPanning IDR_NONE CT_NORTHWESTPANNING - CursorType.NorthWestPanning, - new CursorInfo("move", new Vector2(32, 31)) - }, { - //{28, 28}, {56, 56}} top_left_corner kCursorNorthWestResize IDR_AURA_CURSOR_NORTH_WEST_RESIZE CT_NORTHWESTRESIZE - CursorType.NorthWestResize, - new CursorInfo("top_left_corner", new Vector2(28, 28)) - }, { - //{32, 31}, {64, 62}} top_left_corner kCursorNorthWestSouthEastResize IDR_AURA_CURSOR_NORTH_WEST_SOUTH_EAST_RESIZE CT_NORTHWESTSOUTHEASTRESIZE - CursorType.NorthWestSouthEastResize, - new CursorInfo("top_left_corner", new Vector2(32, 31)) - }, { - //{10, 10}, {20, 20}} nodrop kCursorNotAllowed IDR_AURA_CURSOR_NO_DROP CT_NOTALLOWED - CursorType.NotAllowed, - new CursorInfo("nodrop", new Vector2(10, 10)) - }, { - //{10, 10}, {20, 20}} left_ptr kCursorPointer IDR_AURA_CURSOR_PTR CT_POINTER - CursorType.Pointer, - new CursorInfo("left_ptr", new Vector2(10, 10)) - }, { - //{??, ??}, {??, ??}} _unknown_ kCursorProgress IDR_NONE CT_PROGRESS - CursorType.Progress, - new CursorInfo("loading", new Vector2(32, 32)) - }, { - //{29, 32}, {58, 64}} sb_v_double_arrow kCursorRowResize IDR_AURA_CURSOR_ROW_RESIZE CT_ROWRESIZE - CursorType.RowResize, - new CursorInfo("sb_v_double_arrow", new Vector2(29, 32)) - }, { - //{??, ??}, {??, ??}} _unknown_ kCursorSouthEastPanning IDR_NONE CT_SOUTHEASTPANNING - CursorType.SouthEastPanning, - new CursorInfo("move", new Vector2(32, 31)) - }, { - //{28, 28}, {56, 56}} top_left_corner kCursorSouthEastResize IDR_AURA_CURSOR_SOUTH_EAST_RESIZE CT_SOUTHEASTRESIZE - CursorType.SouthEastResize, - new CursorInfo("top_left_corner", new Vector2(28, 28)) - }, { - //{??, ??}, {??, ??}} _unknown_ kCursorSouthPanning IDR_NONE CT_SOUTHPANNING - CursorType.SouthPanning, - new CursorInfo("move", new Vector2(32, 31)) - }, { - //{29, 32}, {58, 64}} sb_v_double_arrow kCursorSouthResize IDR_AURA_CURSOR_SOUTH_RESIZE CT_SOUTHRESIZE - CursorType.SouthResize, - new CursorInfo("sb_v_double_arrow", new Vector2(29, 32)) - }, { - //{??, ??}, {??, ??}} _unknown_ kCursorSouthWestPanning IDR_NONE CT_SOUTHWESTPANNING - CursorType.SouthWestPanning, - new CursorInfo("move", new Vector2(32, 31)) - }, { - //{31, 28}, {62, 56}} top_right_corner kCursorSouthWestResize IDR_AURA_CURSOR_SOUTH_WEST_RESIZE CT_SOUTHWESTRESIZE - CursorType.SouthWestResize, - new CursorInfo("top_right_corner", new Vector2(31, 28)) - }, { - //{32, 30}, {64, 60}} xterm_horiz kCursorVerticalText IDR_AURA_CURSOR_XTERM_HORIZ CT_VERTICALTEXT - CursorType.VerticalText, - new CursorInfo("xterm_horiz", new Vector2(32, 30)) - }, { - //{??, ??}, {??, ??}} _unknown_ kCursorWait IDR_NONE CT_WAIT - CursorType.Wait, - new CursorInfo("loading", new Vector2(32, 32)) - }, { - //{??, ??}, {??, ??}} _unknown_ kCursorWestPanning IDR_NONE CT_WESTPANNING - CursorType.WestPanning, - new CursorInfo("move", new Vector2(32, 31)) - }, { - //{35, 29}, {70, 58}} sb_h_double_arrow kCursorWestResize IDR_AURA_CURSOR_WEST_RESIZE CT_WESTRESIZE - CursorType.WestResize, - new CursorInfo("sb_h_double_arrow", new Vector2(35, 29)) - }, { - //{25, 26}, {50, 52}} zoom_in kCursorZoomIn IDR_AURA_CURSOR_ZOOM_IN CT_ZOOMIN - CursorType.ZoomIn, - new CursorInfo("zoom_in", new Vector2(25, 26)) - }, { - //{26, 26}, {52, 52}} zoom_out kCursorZoomOut IDR_AURA_CURSOR_ZOOM_OUT CT_ZOOMOUT - CursorType.ZoomOut, - new CursorInfo("zoom_out", new Vector2(26, 26)) - }, - }; -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/IconGenerator.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/IconGenerator.cs.meta deleted file mode 100644 index 1020a6bf..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/IconGenerator.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 7924e40fd70097143810a7ad82727b47 -timeCreated: 1447967713 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/PostBuildStandalone.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/PostBuildStandalone.cs deleted file mode 100644 index a3d7f6a6..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/PostBuildStandalone.cs +++ /dev/null @@ -1,200 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text.RegularExpressions; -using UnityEditor; -using UnityEditor.Callbacks; -using UnityEngine; -using System.Runtime.InteropServices; - -namespace ZenFulcrum.EmbeddedBrowser { - -/** - * Getting CEF running on a build result requires some fiddling to get all the files in the right place. - */ -class PostBuildStandalone { - - static readonly List byBinFiles = new List() { - "natives_blob.bin", - "snapshot_blob.bin", - "v8_context_snapshot.bin", - "icudtl.dat", - }; - - [PostProcessBuild(10)] - public static void PostprocessLinuxOrWindowsBuild(BuildTarget target, string buildFile) { - //prereq - var windows = target == BuildTarget.StandaloneWindows || target == BuildTarget.StandaloneWindows64; - var linux = target == BuildTarget.StandaloneLinux || target == BuildTarget.StandaloneLinuxUniversal || target == BuildTarget.StandaloneLinux64; - - if (!windows && !linux) return; - - if (target == BuildTarget.StandaloneLinux || target == BuildTarget.StandaloneLinuxUniversal) { - throw new Exception("ZFBrowser: Only x86_64 Linux is supported"); - } - - - //base info - string buildType; - if (windows) buildType = "w" + (target == BuildTarget.StandaloneWindows64 ? "64" : "32"); - else buildType = "l64"; - - Debug.Log("ZFBrowser: Post processing " + buildFile + " as " + buildType); - - string buildName; - if (windows) buildName = Regex.Match(buildFile, @"/([^/]+)\.exe$").Groups[1].Value; - else buildName = Regex.Match(buildFile, @"\/([^\/]+?)(\.x86(_64)?)?$").Groups[1].Value; - - var buildPath = Directory.GetParent(buildFile); - var dataPath = buildPath + "/" + buildName + "_Data"; - var pluginsPath = dataPath + "/Plugins/"; - - - //start copying - - - //can't use FileLocations because we may not be building the same type as the editor - var platformPluginsSrc = ZFFolder + "/Plugins/" + buildType; - - //(Unity will copy the .dll and .so files for us) - - //Copy "root" .bin files - foreach (var file in byBinFiles) { - File.Copy(platformPluginsSrc + "/" + file, pluginsPath + file, true); - } - - File.Copy(ZFFolder + "/ThirdPartyNotices.txt", pluginsPath + "/ThirdPartyNotices.txt", true); - - //Copy the needed resources - var resSrcDir = platformPluginsSrc + "/CEFResources"; - foreach (var filePath in Directory.GetFiles(resSrcDir)) { - var fileName = new FileInfo(filePath).Name; - if (fileName.EndsWith(".meta")) continue; - - File.Copy(filePath, pluginsPath + fileName, true); - } - - //Slave process (doesn't get automatically copied by Unity like the shared libs) - var exeExt = windows ? ".exe" : ""; - File.Copy( - platformPluginsSrc + "/" + FileLocations.SlaveExecutable + exeExt, - pluginsPath + FileLocations.SlaveExecutable + exeExt, - true - ); - if (linux) MakeExecutable(pluginsPath + FileLocations.SlaveExecutable + exeExt); - - //Locales - var localesSrcDir = platformPluginsSrc + "/CEFResources/locales"; - var localesDestDir = dataPath + "/Plugins/locales"; - Directory.CreateDirectory(localesDestDir); - foreach (var filePath in Directory.GetFiles(localesSrcDir)) { - var fileName = new FileInfo(filePath).Name; - if (fileName.EndsWith(".meta")) continue; - File.Copy(filePath, localesDestDir + "/" + fileName, true); - } - - //Newer versions of Unity put the shared libs in the wrong place. Move them to where we expect them. - if (linux && File.Exists(pluginsPath + "x86_64/zf_cef.so")) { - foreach (var libFile in new[] {"zf_cef.so", "libEGL.so", "libGLESv2.so", "libwidevinecdmadapter.so", "libZFProxyWeb.so"}) { - ForceMove(pluginsPath + "x86_64/" + libFile, pluginsPath + libFile); - } - } - - WriteBrowserAssets(dataPath + "/" + StandaloneWebResources.DefaultPath); - } - - [PostProcessBuild(10)] - public static void PostprocessMacBuild(BuildTarget target, string buildFile) { -#if UNITY_2017_3_OR_NEWER - if (target != BuildTarget.StandaloneOSX) return; -#else - if (target == BuildTarget.StandaloneOSXUniversal || target == BuildTarget.StandaloneOSXIntel) { - throw new Exception("Only x86_64 is supported"); - } - if (target != BuildTarget.StandaloneOSXIntel64) return; -#endif - - Debug.Log("Post processing " + buildFile); - - //var buildName = Regex.Match(buildFile, @"\/([^\/]+?)\.app$").Groups[1].Value; - var buildPath = buildFile; - var platformPluginsSrc = ZFFolder + "/Plugins/m64"; - - //Copy app bits - CopyDirectory( - platformPluginsSrc + "/BrowserLib.app/Contents/Frameworks/Chromium Embedded Framework.framework", - buildPath + "/Contents/Frameworks/Chromium Embedded Framework.framework" - ); - CopyDirectory( - platformPluginsSrc + "/BrowserLib.app/Contents/Frameworks/ZFGameBrowser.app", - buildPath + "/Contents/Frameworks/ZFGameBrowser.app" - ); - - MakeExecutable(buildPath + "/BrowserLib.app/Contents/Frameworks/ZFGameBrowser.app/Contents/MacOS/ZFGameBrowser"); - - if (!Directory.Exists(buildPath + "/Contents/Plugins")) Directory.CreateDirectory(buildPath + "/Contents/Plugins"); - File.Copy(platformPluginsSrc + "/libZFProxyWeb.dylib", buildPath + "/Contents/Plugins/libZFProxyWeb.dylib", true); - - File.Copy(ZFFolder + "/ThirdPartyNotices.txt", buildPath + "/ThirdPartyNotices.txt", true); - - //BrowserAssets - WriteBrowserAssets(buildPath + "/Contents/" + StandaloneWebResources.DefaultPath); - } - - - private static void WriteBrowserAssets(string path) { - //Debug.Log("Writing browser assets to " + path); - - var htmlDir = Application.dataPath + "/../BrowserAssets"; - var allData = new Dictionary(); - if (Directory.Exists(htmlDir)) { - foreach (var file in Directory.GetFiles(htmlDir, "*", SearchOption.AllDirectories)) { - var localPath = file.Substring(htmlDir.Length).Replace("\\", "/"); - allData[localPath] = File.ReadAllBytes(file); - } - } - - var wr = new StandaloneWebResources(path); - wr.WriteData(allData); - } - - private static void ForceMove(string src, string dest) { - if (File.Exists(dest)) File.Delete(dest); - File.Move(src, dest); - } - - private static string ZFFolder { - get { - var path = new System.Diagnostics.StackTrace(true).GetFrame(0).GetFileName(); - path = Directory.GetParent(path).Parent.Parent.FullName; - return path; - } - } - - private static void CopyDirectory(string src, string dest) { - foreach (var dir in Directory.GetDirectories(src, "*", SearchOption.AllDirectories)) { - Directory.CreateDirectory(dir.Replace(src, dest)); - } - - foreach (var file in Directory.GetFiles(src, "*", SearchOption.AllDirectories)) { - if (file.EndsWith(".meta")) continue; - File.Copy(file, file.Replace(src, dest), true); - } - } - - private static void MakeExecutable(string fileName) { -#if UNITY_EDITOR_WIN - Debug.LogWarning("ZFBrowser: Be sure to mark the file \"" + fileName + "\" as executable (chmod +x) when you distribute it. If it's not executable the browser won't work."); -#else - //dec 493 = oct 755 = -rwxr-xr-x - chmod(fileName, 493); -#endif - } - - - [DllImport("__Internal")] static extern int symlink(string destStr, string symFile); - [DllImport("__Internal")] static extern int chmod(string file, int mode); - -} - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/PostBuildStandalone.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/PostBuildStandalone.cs.meta deleted file mode 100644 index 23484380..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/PostBuildStandalone.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 821c048fda6531349be543e9b923a328 -timeCreated: 1449181504 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/ZFBrowser-Editor.asmdef b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/ZFBrowser-Editor.asmdef deleted file mode 100644 index 1b0eb911..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/ZFBrowser-Editor.asmdef +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "ZFBrowser-Editor", - "references": [ - "ZFBrowser" - ], - "includePlatforms": [ - "Editor" - ], - "excludePlatforms": [] -} \ No newline at end of file diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/ZFBrowser-Editor.asmdef.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/ZFBrowser-Editor.asmdef.meta deleted file mode 100644 index 56b218e4..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Editor/ZFBrowser-Editor.asmdef.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: fe934ebeb18e2174a8b814db25fbce70 -timeCreated: 1518479097 -licenseType: Store -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/EditorWebResources.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/EditorWebResources.cs deleted file mode 100644 index 1dcb37bf..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/EditorWebResources.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Text.RegularExpressions; -using UnityEngine; -#if UNITY_2017_3_OR_NEWER -using UnityEngine.Networking; -#endif - -namespace ZenFulcrum.EmbeddedBrowser { - -/** - * WebResources implementation that grabs resources directly from Assets/../BrowserAssets. - */ -class EditorWebResources : WebResources { - protected string basePath; - - public EditorWebResources() { - //NB: If you try to read Application.dataPath later you may not be on the main thread and it won't work. - basePath = Path.GetDirectoryName(Application.dataPath) + "/BrowserAssets"; - } - - /// - /// Looks for "../asdf", "asdf/..\asdf", etc. - /// - private readonly Regex matchDots = new Regex(@"(^|[/\\])\.[2,]($|[/\\])"); - - public override void HandleRequest(int id, string url) { - var parsedURL = new Uri(url); - - #if UNITY_2017_3_OR_NEWER - var path = UnityWebRequest.UnEscapeURL(parsedURL.AbsolutePath); - #else - var path = WWW.UnEscapeURL(parsedURL.AbsolutePath); - #endif - - if (matchDots.IsMatch(path)) { - SendError(id, "Invalid path", 400); - return; - } - - var file = new FileInfo(Application.dataPath + "/../BrowserAssets/" + path); - - if (!file.Exists) { - SendError(id, "Not found", 404); - return; - } - - //fixme: send 404 if file capitalization doesn't match. (Unfortunately, not a quick one-liner) - - SendFile(id, file); - } - -} -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/EditorWebResources.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/EditorWebResources.cs.meta deleted file mode 100644 index 41345fbd..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/EditorWebResources.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 59d86905d3bcefc4586e70747332bb6f -timeCreated: 1449617902 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/ExternalKeyboard.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/ExternalKeyboard.cs deleted file mode 100644 index eb68cc34..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/ExternalKeyboard.cs +++ /dev/null @@ -1,238 +0,0 @@ -#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX -#define ZF_OSX -#endif -using System; -using System.Collections; -using UnityEngine; - -namespace ZenFulcrum.EmbeddedBrowser { - -/// -/// Helper/worker class for displaying an external keyboard and -/// sending the input to a browser. -/// -/// Don't put this script on your target browser directly, add a separate browser -/// to the scene and attach it to that instead. -/// -/// -[RequireComponent(typeof(Browser))] -[RequireComponent(typeof(PointerUIBase))] -public class ExternalKeyboard : MonoBehaviour { - - [Tooltip("Set to true before startup to have the keyboard automatically hook to the browser with the most recently focused text field.")] - public bool automaticFocus; - - [Tooltip("Browser to start as the focused browser for this keyboard. Not really needed if automaticFocus is on.")] - public Browser initialBrowser; - - [Tooltip("Set to true to have the keyboard automatically hide when we don't have a text entry box to type into.")] - public bool hideWhenUnneeded = true; - - protected PointerUIBase activeBrowserUI; - protected Browser keyboardBrowser; - protected bool forcingFocus; - - protected Browser _activeBrowser; - /// - /// Browser that gets input if we press keys on the keyboard. - /// - protected virtual Browser ActiveBrowser { - get { return _activeBrowser; } - set { - _SetActiveBrowser(value); - DoFocus(_activeBrowser); - } - } - - protected void _SetActiveBrowser(Browser browser) { - if (ActiveBrowser) { - if (activeBrowserUI && forcingFocus) { - activeBrowserUI.ForceKeyboardHasFocus(false); - forcingFocus = false; - } - } - - _activeBrowser = browser; - activeBrowserUI = ActiveBrowser.GetComponent(); - if (!activeBrowserUI) { - //We can't focus the browser when we type, so the typed letters won't appear as we type. - Debug.LogWarning("Browser does not haver a PointerUI, external keyboard may not work properly."); - } - } - - /// - /// Called when the focus of the keyboard changes. - /// The browser is the browser we are focused on (may or may not be different), editable will be true if we - /// are expected to type in the new focus, false if not. - /// - public event Action onFocusChange = (browser, editable) => {}; - - public void Awake() { - var keyboardPage = Resources.Load("Browser/Keyboard").text; - - keyboardBrowser = GetComponent(); - - keyboardBrowser.onBrowserFocus += OnBrowserFocus; - keyboardBrowser.LoadHTML(keyboardPage); - keyboardBrowser.RegisterFunction("textTyped", TextTyped); - keyboardBrowser.RegisterFunction("commandEntered", CommandEntered); - - if (initialBrowser) ActiveBrowser = initialBrowser; - - if (automaticFocus) { - StartCoroutine(FindAndListenForBrowsers()); - } - } - - protected IEnumerator FindAndListenForBrowsers() { - yield return null; - foreach (var browser in FindObjectsOfType()) { - if (browser == keyboardBrowser) continue; - ObserveBrowser(browser); - } - Browser.onAnyBrowserCreated += ObserveBrowser; - //in theory we shouldn't need to deal with browsers being destroyed since the whole callback chain should get cleaned up - //(might need some more work if you repeatedly destroy and recreate keyboards, though) - } - - protected void ObserveBrowser(Browser browser) { - browser.onNodeFocus += (tagName, editable, value) => { - if (!this) return; - if (!browser.focusState.hasMouseFocus) return; - - DoFocus(browser); - }; - - var pointerUI = browser.GetComponent(); - if (pointerUI) { - pointerUI.onClick += () => { - DoFocus(browser); - }; - } - } - - protected void DoFocus(Browser browser) { - if (browser != ActiveBrowser) { - _SetActiveBrowser(browser); - } - - bool visible; - if (browser) visible = browser.focusState.focusedNodeEditable; - else visible = false; - SetVisible(visible); - - onFocusChange(_activeBrowser, visible); - } - - protected void SetVisible(bool visible) { - var renderer = GetComponent(); - if (renderer) renderer.enabled = visible; - var collider = GetComponent(); - if (collider) collider.enabled = visible; - } - - protected void OnBrowserFocus(bool mouseFocused, bool kbFocused) { - //when our keyboard is focused, focus the browser we will be typing into. - if (!activeBrowserUI) return; - - if ((mouseFocused || kbFocused) && !forcingFocus) { - activeBrowserUI.ForceKeyboardHasFocus(true); - forcingFocus = true; - } - - if (!(mouseFocused || kbFocused) && forcingFocus) { - activeBrowserUI.ForceKeyboardHasFocus(false); - forcingFocus = false; - } - } - - protected void CommandEntered(JSONNode args) { - if (!ActiveBrowser) return; - - string command = args[0]; - bool shiftPressed = args[1]; - - if (shiftPressed) ActiveBrowser.PressKey(KeyCode.LeftShift, KeyAction.Press); - - -#if ZF_OSX - const KeyCode wordShifter = KeyCode.LeftAlt; -#else - const KeyCode wordShifter = KeyCode.LeftControl; -#endif - - switch (command) { - case "backspace": - ActiveBrowser.PressKey(KeyCode.Backspace); - break; - case "copy": - ActiveBrowser.SendFrameCommand(BrowserNative.FrameCommand.Copy); - break; - case "cut": - ActiveBrowser.SendFrameCommand(BrowserNative.FrameCommand.Cut); - break; - case "delete": - ActiveBrowser.PressKey(KeyCode.Delete); - break; - case "down": - ActiveBrowser.PressKey(KeyCode.DownArrow); - break; - case "end": - ActiveBrowser.PressKey(KeyCode.End); - break; - case "home": - ActiveBrowser.PressKey(KeyCode.Home); - break; - case "insert": - ActiveBrowser.PressKey(KeyCode.Insert); - break; - case "left": - ActiveBrowser.PressKey(KeyCode.LeftArrow); - break; - case "pageDown": - ActiveBrowser.PressKey(KeyCode.PageDown); - break; - case "pageUp": - ActiveBrowser.PressKey(KeyCode.PageUp); - break; - case "paste": - ActiveBrowser.SendFrameCommand(BrowserNative.FrameCommand.Paste); - break; - case "redo": - ActiveBrowser.SendFrameCommand(BrowserNative.FrameCommand.Redo); - break; - case "right": - ActiveBrowser.PressKey(KeyCode.RightArrow); - break; - case "selectAll": - ActiveBrowser.SendFrameCommand(BrowserNative.FrameCommand.SelectAll); - break; - case "undo": - ActiveBrowser.SendFrameCommand(BrowserNative.FrameCommand.Undo); - break; - case "up": - ActiveBrowser.PressKey(KeyCode.UpArrow); - break; - case "wordLeft": - ActiveBrowser.PressKey(wordShifter, KeyAction.Press); - ActiveBrowser.PressKey(KeyCode.LeftArrow); - ActiveBrowser.PressKey(wordShifter, KeyAction.Release); - break; - case "wordRight": - ActiveBrowser.PressKey(wordShifter, KeyAction.Press); - ActiveBrowser.PressKey(KeyCode.RightArrow); - ActiveBrowser.PressKey(wordShifter, KeyAction.Release); - break; - } - - if (shiftPressed) ActiveBrowser.PressKey(KeyCode.LeftShift, KeyAction.Release); - } - - protected void TextTyped(JSONNode args) { - if (!ActiveBrowser) return; - - ActiveBrowser.TypeText(args[0]); - } -} - -} \ No newline at end of file diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/ExternalKeyboard.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/ExternalKeyboard.cs.meta deleted file mode 100644 index 386179c2..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/ExternalKeyboard.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: faa68da6a73a843439bee4b722ce18b4 -timeCreated: 1511320118 -licenseType: Store -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/FileLocations.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/FileLocations.cs deleted file mode 100644 index d1a1f56e..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/FileLocations.cs +++ /dev/null @@ -1,144 +0,0 @@ -using System; -using System.IO; -using UnityEngine; -#if UNITY_EDITOR -using UnityEditor; -#endif - -namespace ZenFulcrum.EmbeddedBrowser { - -public static class FileLocations { - public const string SlaveExecutable = "ZFGameBrowser"; - - private static CEFDirs _dirs; - public static CEFDirs Dirs { - get { return _dirs ?? (_dirs = GetCEFDirs()); } - } - - public class CEFDirs { - /** Where to find cef.pak, et al */ - public string resourcesPath; - /** Where to find .dll, .so, natives_blob.bin, etc */ - public string binariesPath; - /** Where to find en-US.pak et al */ - public string localesPath; - /** The executable to run for browser processes. */ - public string subprocessFile; - /** Editor/application log file */ - public string logFile; - } - - private static CEFDirs GetCEFDirs() { -#if UNITY_EDITOR - //In the editor we don't know exactly where we are at, but we can look up one of our scripts and move from there - var guids = AssetDatabase.FindAssets("EditorWebResources"); - if (guids.Length != 1) throw new FileNotFoundException("Failed to locate a single EditorWebResources file"); - string scriptPath = AssetDatabase.GUIDToAssetPath(guids[0]); - - // ReSharper disable once PossibleNullReferenceException - var baseDir = Directory.GetParent(scriptPath).Parent.FullName + "/Plugins"; - string resourcesPath, localesDir; - var platformDir = baseDir; - - #if UNITY_EDITOR_WIN - #if UNITY_EDITOR_64 - platformDir += "/w64"; - #else - platformDir += "/w32"; - #endif - - resourcesPath = platformDir + "/CEFResources"; - localesDir = resourcesPath + "/locales"; - - //Silly MS. - resourcesPath = resourcesPath.Replace("/", "\\"); - localesDir = localesDir.Replace("/", "\\"); - platformDir = platformDir.Replace("/", "\\"); - - var subprocessFile = platformDir + "/" + SlaveExecutable + ".exe"; - var logFile = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "/Unity/Editor/Editor.log"; - - #elif UNITY_EDITOR_LINUX - #if UNITY_EDITOR_64 - platformDir += "/l64"; - #else - platformDir += "/w32"; - #endif - - resourcesPath = platformDir + "/CEFResources"; - localesDir = resourcesPath + "/locales"; - - var subprocessFile = platformDir + "/" + SlaveExecutable; - var logFile = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "/unity3d/Editor.log"; - - #elif UNITY_EDITOR_OSX - platformDir += "/m64"; - - resourcesPath = platformDir + "/BrowserLib.app/Contents/Frameworks/Chromium Embedded Framework.framework/Resources"; - localesDir = resourcesPath; - - //Chromium's base::mac::GetAppBundlePath will walk up the tree until it finds an ".app" folder and start - //looking for pieces from there. That's why everything is hidden in a fake "BrowserLib.app" - //folder that's not actually an app. - var subprocessFile = platformDir + "/BrowserLib.app/Contents/Frameworks/" + SlaveExecutable + ".app/Contents/MacOS/" + SlaveExecutable; - - var logFile = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "/Library/Logs/Unity/Editor.log"; - #else - //If you want to build your app without ZFBrowser on some platforms change this to an exception or - //tweak the .asmdef - #error ZFBrowser is not supported on this platform - #endif - - - return new CEFDirs() { - resourcesPath = resourcesPath, - binariesPath = platformDir, - localesPath = localesDir, - subprocessFile = subprocessFile, - logFile = logFile, - }; - -#elif UNITY_STANDALONE_WIN - var resourcesPath = Application.dataPath + "/Plugins"; - - var logFile = Application.dataPath + "/output_log.txt"; - #if UNITY_2017_2_OR_NEWER - var appLowDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "Low/" + Application.companyName + "/" + Application.productName; - if (Directory.Exists(appLowDir)) { - logFile = appLowDir + "/output_log.txt"; - } - #endif - - return new CEFDirs() { - resourcesPath = resourcesPath, - binariesPath = resourcesPath, - localesPath = resourcesPath + "/locales", - subprocessFile = resourcesPath + "/" + SlaveExecutable + ".exe", - logFile = logFile, - }; -#elif UNITY_STANDALONE_LINUX - var resourcesPath = Application.dataPath + "/Plugins"; - return new CEFDirs() { - resourcesPath = resourcesPath, - binariesPath = resourcesPath, - localesPath = resourcesPath + "/locales", - subprocessFile = resourcesPath + "/" + SlaveExecutable, - logFile = "/dev/null", - // Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "/unity3d/" + - // Application.companyName + "/" + Application.productName + "/Player.log", - }; -#elif UNITY_STANDALONE_OSX - return new CEFDirs() { - resourcesPath = Application.dataPath + "/Frameworks/Chromium Embedded Framework.framework/Resources", - binariesPath = Application.dataPath + "/Plugins", - localesPath = Application.dataPath + "/Frameworks/Chromium Embedded Framework.framework/Resources", - subprocessFile = Application.dataPath + "/Frameworks/ZFGameBrowser.app/Contents/MacOS/" + SlaveExecutable, - logFile = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "/Library/Logs/Unity/Player.log", - }; -#else - #error Web textures are not supported on this platform -#endif - } -} - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/FileLocations.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/FileLocations.cs.meta deleted file mode 100644 index df07d38d..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/FileLocations.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 6fee78664a3055740bb2c20fa9c2d38a -timeCreated: 1454001980 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/INewWindowHandler.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/INewWindowHandler.cs deleted file mode 100644 index bec78e12..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/INewWindowHandler.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace ZenFulcrum.EmbeddedBrowser { - -/// -/// Handler for creating new windows. (See Browser.NewWindowAction.NewBrowser) -/// -/// When the browser needs to open a new window, myHandler.CreateBrowser will be called. Create a -/// new browser how and where you will, then return it. The new Browser will be filled with -/// the new page. -/// -/// Call browser.SetNewWindowHandler(NewWindowAction.NewBrowser, myClass) to have a browser use it. -/// -public interface INewWindowHandler { - - /** - * Creates a new Browser object to hold a new page. - * The returned Browser object will then be linked and load the new page. - */ - Browser CreateBrowser(Browser parent); -} - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/INewWindowHandler.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/INewWindowHandler.cs.meta deleted file mode 100644 index a1b8a749..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/INewWindowHandler.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 3ee8fedccb68f1a46965dec4d88bd321 -timeCreated: 1449697159 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/JSONNode.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/JSONNode.cs deleted file mode 100644 index d0c6549b..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/JSONNode.cs +++ /dev/null @@ -1,269 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace ZenFulcrum.EmbeddedBrowser { - -/** - * Stand-in class for a JavaScript value that can be one of many different types. - * - * Bad lookups are safe. That is, if you try to look up something that doesn't exist you will not get an exception, - * but an "invalid" node. Use Check() if you want an exception on invalid lookups: - * - * var node = JSONNode.Parse(@"{""a"":1}"); - * node["a"].IsValid == true; - * node["bob"].IsValid == false - * node["bob"]["foo"].IsValid == false //but doesn't throw an exception - * node["a"].Check() //okay - * node["bob"].Check() //throw exception - * - * Values can be implicitly converted to JSONNodes and back. That means you don't have to use properties like - * "IntValue" and "StringValue". Simply try to use the node as that type and it will convert to the value - * if it's that type or return a default value if it isn't: - * - * var node = JSONNode.Parse(@"{""a"":1, ""b"": ""apples""}"); - * int a = node["a"]; - * a == 1; - * string b = node["b"]; - * b == "apples"; - * string str = node["a"]; - * str == null; //null is the default value for a string. - * - * You can also use new JSONNode(value) for many different types, though often it's easier to just assign a - * value and let it auto-convert. - * - * Because they act a little special, use node.IsNull and node.IsValid to check for null and invalid values. - * Real null still acts like null, though, so use JSONNode.NullNode to create a "null" JSONNode. - * You can also use JSONNode.InvalidNode to get an invalid JSONNode outright. - * - * Note that, while reading blind is safe, assignment is not. Attempting to assign object keys to an integer, for example, - * will throw an exception. To append to an array, call .Add() or assign to -1. To remove an object key or array element, - * assign JSONNode.InvalidNode to it. - * - */ -public class JSONNode { - /** Parses the given JSON document to a JSONNode. Throws a SerializationException on parse error. */ - public static JSONNode Parse(string json) { - return JSONParser.Parse(json); - } - - public static readonly JSONNode InvalidNode = new JSONNode(NodeType.Invalid); - public static readonly JSONNode NullNode = new JSONNode(NodeType.Null); - - public enum NodeType { - /** Getting this value would result in undefined or ordinarily throw some type of exception trying to fetch it. */ - Invalid, - String, - Number, - Object, - Array, - Bool, - Null, - } - - public NodeType _type = NodeType.Invalid; - private string _stringValue; - private double _numberValue; - private Dictionary _objectValue; - private List _arrayValue; - private bool _boolValue; - - public JSONNode(NodeType type = NodeType.Null) { - this._type = type; - if (type == NodeType.Object) _objectValue = new Dictionary(); - else if (type == NodeType.Array) _arrayValue = new List(); - } - - public JSONNode(string value) { - this._type = NodeType.String; - _stringValue = value; - } - - public JSONNode(double value) { - this._type = NodeType.Number; - _numberValue = value; - } - - public JSONNode(Dictionary value) { - this._type = NodeType.Object; - _objectValue = value; - } - - public JSONNode(List value) { - this._type = NodeType.Array; - _arrayValue = value; - } - - public JSONNode(bool value) { - this._type = NodeType.Bool; - _boolValue = value; - } - - public NodeType Type { get { return _type; } } - - public bool IsValid { - get { return _type != NodeType.Invalid; } - } - - /** - * Checks if the node is valid. If not, throws an exception. - * Returns {this}, which allows you to add this statement inline in you expressions. - * - * Example: - * var node = data["key1"][1].Check(); - * int val = data["maxSize"].Check()["elements"][3]; - */ - public JSONNode Check() { - if (_type == NodeType.Invalid) throw new InvalidJSONNodeException(); - return this; - } - - - public static implicit operator string(JSONNode n) { - return n._type == NodeType.String ? n._stringValue : null; - } - public static implicit operator JSONNode(string v) { - return new JSONNode(v); - } - - public static implicit operator int(JSONNode n) { - return n._type == NodeType.Number ? (int)n._numberValue : 0; - } - public static implicit operator JSONNode(int v) { - return new JSONNode(v); - } - - public static implicit operator float(JSONNode n) { - return n._type == NodeType.Number ? (float)n._numberValue : 0; - } - public static implicit operator JSONNode(float v) { - return new JSONNode(v); - } - - public static implicit operator double(JSONNode n) { - return n._type == NodeType.Number ? n._numberValue : 0; - } - public static implicit operator JSONNode(double v) { - return new JSONNode(v); - } - - /** - * Setter/getter for keys on an object. All keys are strings. - * Assign JSONNode.InvalidValue to delete a key. - */ - public JSONNode this[string k] { - get { - if (_type == NodeType.Object) { - JSONNode ret; - if (_objectValue.TryGetValue(k, out ret)) return ret; - } - return InvalidNode; - } - set { - if (_type != NodeType.Object) throw new InvalidJSONNodeException(); - if (value._type == NodeType.Invalid) _objectValue.Remove(k); - else _objectValue[k] = value; - } - } - public static implicit operator Dictionary(JSONNode n) { - return n._type == NodeType.Object ? n._objectValue : null; - } - - /** - * Setter/getter for indicies on an array. - * Assign JSONNode.InvalidValue to delete a key. - * Assign to "-1" to append to the end. - */ - public JSONNode this[int idx] { - get { - if (_type == NodeType.Array && idx >= 0 && idx < _arrayValue.Count) { - return _arrayValue[idx]; - } - return InvalidNode; - } - set { - if (_type != NodeType.Array) throw new InvalidJSONNodeException(); - - if (idx == -1) { - if (value._type == NodeType.Invalid) { - _arrayValue.RemoveAt(_arrayValue.Count - 1); - } else { - _arrayValue.Add(value); - } - } else { - if (value._type == NodeType.Invalid) { - _arrayValue.RemoveAt(idx); - } else { - _arrayValue[idx] = value; - } - } - } - } - public static implicit operator List(JSONNode n) { - return n._type == NodeType.Array ? n._arrayValue : null; - } - - /** Adds an items if the node is an array. */ - public void Add(JSONNode item) { - if (_type != NodeType.Array) throw new InvalidJSONNodeException(); - _arrayValue.Add(item); - } - - /** If we are an array or object, returns the size, otherwise returns 0. */ - public int Count { - get { - switch (_type) { - case NodeType.Array: return _arrayValue.Count; - case NodeType.Object: return _objectValue.Count; - default: return 0; - } - } - } - - /** True if the value of this node is exactly null. */ - public bool IsNull { - get { return _type == NodeType.Null; } - } - - public static implicit operator bool(JSONNode n) { - return n._type == NodeType.Bool ? n._boolValue : false; - } - public static implicit operator JSONNode(bool v) { - return new JSONNode(v); - } - - /** Returns a native value representation of our value. */ - public object Value { - get { - switch (_type) { - case NodeType.Invalid: - Check(); - return null;//we don't get here. - case NodeType.String: - return _stringValue; - case NodeType.Number: - return _numberValue; - case NodeType.Object: - return _objectValue; - case NodeType.Array: - return _arrayValue; - case NodeType.Bool: - return _boolValue; - case NodeType.Null: - return null; - default: - throw new ArgumentOutOfRangeException(); - } - } - } - - /** Serializes the JSON node and returns a JSON string. */ - public string AsJSON { - get { - return JSONParser.Serialize(this); - } - } -} - - public class InvalidJSONNodeException : Exception {} -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/JSONNode.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/JSONNode.cs.meta deleted file mode 100644 index 6ca9ff39..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/JSONNode.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 0ae4f653ec4655d47b160575a231ddc9 -timeCreated: 1447780609 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/JSONParser.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/JSONParser.cs deleted file mode 100644 index 227d4ec2..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/JSONParser.cs +++ /dev/null @@ -1,541 +0,0 @@ -/* - * This is a customized parser, based on "SimpleJson.cs", for JSONNode - * - * SimpleJson.cs is open source software and this entire file may be dealt with as described below: - */ -//----------------------------------------------------------------------- -// -// Copyright (c) 2011, The Outercurve Foundation, 2015 Zen Fulcrum LLC -// -// Licensed under the MIT License (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.opensource.org/licenses/mit-license.php -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me) -// https://github.com/facebook-csharp-sdk/simple-json -//----------------------------------------------------------------------- - -// ReSharper disable InconsistentNaming - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Runtime.Serialization; -using System.Text; - -namespace ZenFulcrum.EmbeddedBrowser { - /// - /// This class encodes and decodes JSON strings. - /// Spec. details, see http://www.json.org/ - /// - /// JSON uses Arrays and Objects. These correspond here to the datatypes JsonArray(IList<object>) and JsonObject(IDictionary<string,object>). - /// All numbers are parsed to doubles. - /// - internal static class JSONParser { - private const int TOKEN_NONE = 0; - private const int TOKEN_CURLY_OPEN = 1; - private const int TOKEN_CURLY_CLOSE = 2; - private const int TOKEN_SQUARED_OPEN = 3; - private const int TOKEN_SQUARED_CLOSE = 4; - private const int TOKEN_COLON = 5; - private const int TOKEN_COMMA = 6; - private const int TOKEN_STRING = 7; - private const int TOKEN_NUMBER = 8; - private const int TOKEN_TRUE = 9; - private const int TOKEN_FALSE = 10; - private const int TOKEN_NULL = 11; - private const int BUILDER_CAPACITY = 2000; - private static readonly char[] EscapeTable; - private static readonly char[] EscapeCharacters = new char[] { '"', '\\', '\b', '\f', '\n', '\r', '\t' }; -// private static readonly string EscapeCharactersString = new string(EscapeCharacters); - static JSONParser() { - EscapeTable = new char[93]; - EscapeTable['"'] = '"'; - EscapeTable['\\'] = '\\'; - EscapeTable['\b'] = 'b'; - EscapeTable['\f'] = 'f'; - EscapeTable['\n'] = 'n'; - EscapeTable['\r'] = 'r'; - EscapeTable['\t'] = 't'; - } - - /// - /// Parses the string json into a value - /// - /// A JSON string. - /// An IList<object>, a IDictionary<string,object>, a double, a string, null, true, or false - public static JSONNode Parse(string json) { - JSONNode obj; - if (TryDeserializeObject(json, out obj)) - return obj; - throw new SerializationException("Invalid JSON string"); - } - /// - /// Try parsing the json string into a value. - /// - /// - /// A JSON string. - /// - /// - /// The object. - /// - /// - /// Returns true if successfull otherwise false. - /// - public static bool TryDeserializeObject(string json, out JSONNode obj) { - bool success = true; - if (json != null) { - char[] charArray = json.ToCharArray(); - int index = 0; - obj = ParseValue(charArray, ref index, ref success); - } else - obj = null; - return success; - } - - public static string EscapeToJavascriptString(string jsonString) { - if (string.IsNullOrEmpty(jsonString)) - return jsonString; - StringBuilder sb = new StringBuilder(); - char c; - for (int i = 0; i < jsonString.Length; ) { - c = jsonString[i++]; - if (c == '\\') { - int remainingLength = jsonString.Length - i; - if (remainingLength >= 2) { - char lookahead = jsonString[i]; - if (lookahead == '\\') { - sb.Append('\\'); - ++i; - } else if (lookahead == '"') { - sb.Append("\""); - ++i; - } else if (lookahead == 't') { - sb.Append('\t'); - ++i; - } else if (lookahead == 'b') { - sb.Append('\b'); - ++i; - } else if (lookahead == 'n') { - sb.Append('\n'); - ++i; - } else if (lookahead == 'r') { - sb.Append('\r'); - ++i; - } - } - } else { - sb.Append(c); - } - } - return sb.ToString(); - } - - static JSONNode ParseObject(char[] json, ref int index, ref bool success) { - JSONNode table = new JSONNode(JSONNode.NodeType.Object); - int token; - // { - NextToken(json, ref index); - bool done = false; - while (!done) { - token = LookAhead(json, index); - if (token == TOKEN_NONE) { - success = false; - return null; - } else if (token == TOKEN_COMMA) - NextToken(json, ref index); - else if (token == TOKEN_CURLY_CLOSE) { - NextToken(json, ref index); - return table; - } else { - // name - string name = ParseString(json, ref index, ref success); - if (!success) { - success = false; - return null; - } - // : - token = NextToken(json, ref index); - if (token != TOKEN_COLON) { - success = false; - return null; - } - // value - JSONNode value = ParseValue(json, ref index, ref success); - if (!success) { - success = false; - return null; - } - table[name] = value; - } - } - return table; - } - - static JSONNode ParseArray(char[] json, ref int index, ref bool success) { - JSONNode array = new JSONNode(JSONNode.NodeType.Array); - // [ - NextToken(json, ref index); - bool done = false; - while (!done) { - int token = LookAhead(json, index); - if (token == TOKEN_NONE) { - success = false; - return null; - } else if (token == TOKEN_COMMA) - NextToken(json, ref index); - else if (token == TOKEN_SQUARED_CLOSE) { - NextToken(json, ref index); - break; - } else { - JSONNode value = ParseValue(json, ref index, ref success); - if (!success) - return null; - array.Add(value); - } - } - return array; - } - - static JSONNode ParseValue(char[] json, ref int index, ref bool success) { - switch (LookAhead(json, index)) { - case TOKEN_STRING: - return ParseString(json, ref index, ref success); - case TOKEN_NUMBER: - return ParseNumber(json, ref index, ref success); - case TOKEN_CURLY_OPEN: - return ParseObject(json, ref index, ref success); - case TOKEN_SQUARED_OPEN: - return ParseArray(json, ref index, ref success); - case TOKEN_TRUE: - NextToken(json, ref index); - return true; - case TOKEN_FALSE: - NextToken(json, ref index); - return false; - case TOKEN_NULL: - NextToken(json, ref index); - return JSONNode.NullNode; - case TOKEN_NONE: - break; - } - success = false; - return JSONNode.InvalidNode; - } - - static JSONNode ParseString(char[] json, ref int index, ref bool success) { - StringBuilder s = new StringBuilder(BUILDER_CAPACITY); - char c; - EatWhitespace(json, ref index); - // " - c = json[index++]; - bool complete = false; - while (!complete) { - if (index == json.Length) - break; - c = json[index++]; - if (c == '"') { - complete = true; - break; - } else if (c == '\\') { - if (index == json.Length) - break; - c = json[index++]; - if (c == '"') - s.Append('"'); - else if (c == '\\') - s.Append('\\'); - else if (c == '/') - s.Append('/'); - else if (c == 'b') - s.Append('\b'); - else if (c == 'f') - s.Append('\f'); - else if (c == 'n') - s.Append('\n'); - else if (c == 'r') - s.Append('\r'); - else if (c == 't') - s.Append('\t'); - else if (c == 'u') { - int remainingLength = json.Length - index; - if (remainingLength >= 4) { - // parse the 32 bit hex into an integer codepoint - uint codePoint; - if (!(success = UInt32.TryParse(new string(json, index, 4), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out codePoint))) - return ""; - // convert the integer codepoint to a unicode char and add to string - if (0xD800 <= codePoint && codePoint <= 0xDBFF) // if high surrogate -{ - index += 4; // skip 4 chars - remainingLength = json.Length - index; - if (remainingLength >= 6) { - uint lowCodePoint; - if (new string(json, index, 2) == "\\u" && UInt32.TryParse(new string(json, index + 2, 4), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out lowCodePoint)) { - if (0xDC00 <= lowCodePoint && lowCodePoint <= 0xDFFF) // if low surrogate -{ - s.Append((char)codePoint); - s.Append((char)lowCodePoint); - index += 6; // skip 6 chars - continue; - } - } - } - success = false; // invalid surrogate pair - return ""; - } - s.Append(ConvertFromUtf32((int)codePoint)); - // skip 4 chars - index += 4; - } else - break; - } - } else - s.Append(c); - } - if (!complete) { - success = false; - return null; - } - return s.ToString(); - } - - private static string ConvertFromUtf32(int utf32) { - // http://www.java2s.com/Open-Source/CSharp/2.6.4-mono-.net-core/System/System/Char.cs.htm - if (utf32 < 0 || utf32 > 0x10FFFF) - throw new ArgumentOutOfRangeException("utf32", "The argument must be from 0 to 0x10FFFF."); - if (0xD800 <= utf32 && utf32 <= 0xDFFF) - throw new ArgumentOutOfRangeException("utf32", "The argument must not be in surrogate pair range."); - if (utf32 < 0x10000) - return new string((char)utf32, 1); - utf32 -= 0x10000; - return new string(new char[] { (char)((utf32 >> 10) + 0xD800), (char)(utf32 % 0x0400 + 0xDC00) }); - } - - static JSONNode ParseNumber(char[] json, ref int index, ref bool success) { - EatWhitespace(json, ref index); - int lastIndex = GetLastIndexOfNumber(json, index); - int charLength = (lastIndex - index) + 1; - JSONNode returnNumber; - string str = new string(json, index, charLength); - if (str.IndexOf(".", StringComparison.OrdinalIgnoreCase) != -1 || str.IndexOf("e", StringComparison.OrdinalIgnoreCase) != -1) { - double number; - success = double.TryParse(new string(json, index, charLength), NumberStyles.Any, CultureInfo.InvariantCulture, out number); - returnNumber = number; - } else { - long number; - success = long.TryParse(new string(json, index, charLength), NumberStyles.Any, CultureInfo.InvariantCulture, out number); - returnNumber = number; - } - index = lastIndex + 1; - return returnNumber; - } - - static int GetLastIndexOfNumber(char[] json, int index) { - int lastIndex; - for (lastIndex = index; lastIndex < json.Length; lastIndex++) - if ("0123456789+-.eE".IndexOf(json[lastIndex]) == -1) break; - return lastIndex - 1; - } - - static void EatWhitespace(char[] json, ref int index) { - for (; index < json.Length; index++) - if (" \t\n\r\b\f".IndexOf(json[index]) == -1) break; - } - static int LookAhead(char[] json, int index) { - int saveIndex = index; - return NextToken(json, ref saveIndex); - } - - static int NextToken(char[] json, ref int index) { - EatWhitespace(json, ref index); - if (index == json.Length) - return TOKEN_NONE; - char c = json[index]; - index++; - switch (c) { - case '{': - return TOKEN_CURLY_OPEN; - case '}': - return TOKEN_CURLY_CLOSE; - case '[': - return TOKEN_SQUARED_OPEN; - case ']': - return TOKEN_SQUARED_CLOSE; - case ',': - return TOKEN_COMMA; - case '"': - return TOKEN_STRING; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '-': - return TOKEN_NUMBER; - case ':': - return TOKEN_COLON; - } - index--; - int remainingLength = json.Length - index; - // false - if (remainingLength >= 5) { - if (json[index] == 'f' && json[index + 1] == 'a' && json[index + 2] == 'l' && json[index + 3] == 's' && json[index + 4] == 'e') { - index += 5; - return TOKEN_FALSE; - } - } - // true - if (remainingLength >= 4) { - if (json[index] == 't' && json[index + 1] == 'r' && json[index + 2] == 'u' && json[index + 3] == 'e') { - index += 4; - return TOKEN_TRUE; - } - } - // null - if (remainingLength >= 4) { - if (json[index] == 'n' && json[index + 1] == 'u' && json[index + 2] == 'l' && json[index + 3] == 'l') { - index += 4; - return TOKEN_NULL; - } - } - return TOKEN_NONE; - } - - public static string Serialize(JSONNode node) { - StringBuilder sb = new StringBuilder(); - var success = SerializeValue(node, sb); - if (!success) throw new SerializationException("Failed to serialize JSON"); - return sb.ToString(); - } - - static bool SerializeValue(JSONNode value, StringBuilder builder) { - bool success = true; - -// if (value == null) { -// builder.Append("null"); -// return success; -// } - - switch (value.Type) { - case JSONNode.NodeType.String: - success = SerializeString(value, builder); - break; - case JSONNode.NodeType.Object: { - Dictionary dict = value; - success = SerializeObject(dict.Keys, dict.Values, builder); - break; - } - case JSONNode.NodeType.Array: - success = SerializeArray((List)value, builder); - break; - case JSONNode.NodeType.Number: - success = SerializeNumber(value, builder); - break; - case JSONNode.NodeType.Bool: - builder.Append(value ? "true" : "false"); - break; - case JSONNode.NodeType.Null: - builder.Append("null"); - break; - case JSONNode.NodeType.Invalid: - throw new SerializationException("Cannot serialize invalid JSONNode"); - default: - throw new SerializationException("Unknown JSONNode type"); - } - return success; - } - - static bool SerializeObject(IEnumerable keys, IEnumerable values, StringBuilder builder) { - builder.Append("{"); - var ke = keys.GetEnumerator(); - var ve = values.GetEnumerator(); - bool first = true; - while (ke.MoveNext() && ve.MoveNext()) { - var key = ke.Current; - var value = ve.Current; - if (!first) - builder.Append(","); - string stringKey = key; - if (stringKey != null) - SerializeString(stringKey, builder); - else - if (!SerializeValue(value, builder)) return false; - builder.Append(":"); - if (!SerializeValue(value, builder)) - return false; - first = false; - } - builder.Append("}"); - return true; - } - - static bool SerializeArray(IEnumerable anArray, StringBuilder builder) { - builder.Append("["); - bool first = true; - foreach (var value in anArray) { - if (!first) - builder.Append(","); - if (!SerializeValue(value, builder)) - return false; - first = false; - } - builder.Append("]"); - return true; - } - - static bool SerializeString(string aString, StringBuilder builder) { - // Happy path if there's nothing to be escaped. IndexOfAny is highly optimized (and unmanaged) - if (aString.IndexOfAny(EscapeCharacters) == -1) { - builder.Append('"'); - builder.Append(aString); - builder.Append('"'); - return true; - } - builder.Append('"'); - int safeCharacterCount = 0; - char[] charArray = aString.ToCharArray(); - for (int i = 0; i < charArray.Length; i++) { - char c = charArray[i]; - // Non ascii characters are fine, buffer them up and send them to the builder - // in larger chunks if possible. The escape table is a 1:1 translation table - // with \0 [default(char)] denoting a safe character. - if (c >= EscapeTable.Length || EscapeTable[c] == default(char)) { - safeCharacterCount++; - } else { - if (safeCharacterCount > 0) { - builder.Append(charArray, i - safeCharacterCount, safeCharacterCount); - safeCharacterCount = 0; - } - builder.Append('\\'); - builder.Append(EscapeTable[c]); - } - } - if (safeCharacterCount > 0) { - builder.Append(charArray, charArray.Length - safeCharacterCount, safeCharacterCount); - } - builder.Append('"'); - return true; - } - - static bool SerializeNumber(double number, StringBuilder builder) { - builder.Append(Convert.ToDouble(number, CultureInfo.InvariantCulture).ToString("r", CultureInfo.InvariantCulture)); - return true; - } - - } - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/JSONParser.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/JSONParser.cs.meta deleted file mode 100644 index aaea9bfd..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/JSONParser.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 8cb978759cbdf48468bc42a00fe0e849 -timeCreated: 1447780610 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/KeyMappings.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/KeyMappings.cs deleted file mode 100644 index 04530792..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/KeyMappings.cs +++ /dev/null @@ -1,156 +0,0 @@ - -using System.Collections.Generic; -using UnityEngine; - -namespace ZenFulcrum.EmbeddedBrowser { -static class KeyMappings { - private static Dictionary mappings = new Dictionary() { - //I'm not gonna lie. I just opened http://www.w3.org/2002/09/tests/keys.html - //and copied down the values my keyboard produced. >_< - {KeyCode.Escape, 27}, - {KeyCode.F1, 112}, - {KeyCode.F2, 113}, - {KeyCode.F3, 114}, - {KeyCode.F4, 115}, - {KeyCode.F5, 116}, - {KeyCode.F6, 117}, - {KeyCode.F7, 118}, - {KeyCode.F8, 119}, - {KeyCode.F9, 120}, - {KeyCode.F10, 121}, - {KeyCode.F11, 122}, - {KeyCode.F12, 123}, - {KeyCode.SysReq, 44}, {KeyCode.Print, 44}, - {KeyCode.ScrollLock, 145}, - {KeyCode.Pause, 19}, - {KeyCode.BackQuote, 192}, - - - {KeyCode.Alpha0, 48}, - {KeyCode.Alpha1, 49}, - {KeyCode.Alpha2, 50}, - {KeyCode.Alpha3, 51}, - {KeyCode.Alpha4, 52}, - {KeyCode.Alpha5, 53}, - {KeyCode.Alpha6, 54}, - {KeyCode.Alpha7, 55}, - {KeyCode.Alpha8, 56}, - {KeyCode.Alpha9, 57}, - {KeyCode.Minus, 189}, - {KeyCode.Equals, 187}, - {KeyCode.Backspace, 8}, - - {KeyCode.Tab, 9}, - //char keys - {KeyCode.LeftBracket, 219}, - {KeyCode.RightBracket, 221}, - {KeyCode.Backslash, 220}, - - {KeyCode.CapsLock, 20}, - //char keys - {KeyCode.Semicolon, 186}, - {KeyCode.Quote, 222}, - {KeyCode.Return, 13}, - - {KeyCode.LeftShift, 16}, - //char keys - {KeyCode.Comma, 188}, - {KeyCode.Period, 190}, - {KeyCode.Slash, 191}, - {KeyCode.RightShift, 16}, - - {KeyCode.LeftControl, 17}, - {KeyCode.LeftCommand, 91}, {KeyCode.LeftWindows, 91}, - {KeyCode.LeftAlt, 18}, - {KeyCode.Space, 32}, - {KeyCode.RightAlt, 18}, - {KeyCode.RightCommand, 92}, {KeyCode.RightWindows, 92}, - {KeyCode.Menu, 93}, - {KeyCode.RightControl, 17}, - - - {KeyCode.Insert, 45}, - {KeyCode.Home, 36}, - {KeyCode.PageUp, 33}, - - {KeyCode.Delete, 46}, - {KeyCode.End, 35}, - {KeyCode.PageDown, 34}, - - {KeyCode.UpArrow, 38}, - {KeyCode.LeftArrow, 37}, - {KeyCode.DownArrow, 40}, - {KeyCode.RightArrow, 39}, - - - {KeyCode.Numlock, 144}, - {KeyCode.KeypadDivide, 111}, - {KeyCode.KeypadMultiply, 106}, - {KeyCode.KeypadMinus, 109}, - - {KeyCode.Keypad7, 103}, - {KeyCode.Keypad8, 104}, - {KeyCode.Keypad9, 105}, - {KeyCode.KeypadPlus, 107}, - - {KeyCode.Keypad4, 100}, - {KeyCode.Keypad5, 101}, - {KeyCode.Keypad6, 102}, - - {KeyCode.Keypad1, 97}, - {KeyCode.Keypad2, 98}, - {KeyCode.Keypad3, 99}, - {KeyCode.KeypadEnter, 13}, - - {KeyCode.Keypad0, 96}, - {KeyCode.KeypadPeriod, 110}, - }; - - private static Dictionary reverseMappings = new Dictionary(); - - static KeyMappings() { - foreach (var kvp in mappings) { - reverseMappings[kvp.Value] = kvp.Key; - } - - for (int i = (int)KeyCode.A; i <= (int)KeyCode.Z; i++) { - var key = (KeyCode)i; - var keyCode = i - (int)KeyCode.A + 65; - mappings[key] = keyCode; - reverseMappings[keyCode] = key; - } - } - - public static int GetWindowsKeyCode(Event ev) { - int ukc = (int)ev.keyCode;//unity key code - - //When dealing with characters return the Unicode char as the keycode. - if (ukc == 0) { - //enter is special. - if (ev.character == 10) return 13; - - return ev.character; - } - -// if (ukc >= (int)KeyCode.A && ukc <= (int)KeyCode.Z) { -// return ukc - (int)KeyCode.A + 65; -// } - - int ret; - if (mappings.TryGetValue(ev.keyCode, out ret)) { - return ret; - } - - - //Don't recognize it, we'll just have to return something, but it's almost sure to be wrong. - Debug.LogWarning("Unknown key mapping: " + ev); - return ukc; - } - - public static KeyCode GetUnityKeyCode(int windowsKeyCode) { - KeyCode ret; - if (reverseMappings.TryGetValue(windowsKeyCode, out ret)) return ret; - return 0; - } -} -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/KeyMappings.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/KeyMappings.cs.meta deleted file mode 100644 index 4756f593..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/KeyMappings.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: de63d991f0c0f0b41a32bebdc64b329a -timeCreated: 1447440809 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/PopUpBrowser.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/PopUpBrowser.cs deleted file mode 100644 index 55366edc..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/PopUpBrowser.cs +++ /dev/null @@ -1,203 +0,0 @@ -#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace ZenFulcrum.EmbeddedBrowser { - -/// -/// Manages a browser that's been opened in an OS-native window outside the game's main window. -/// (Presently only used for OS X.) -/// -public class PopUpBrowser : MonoBehaviour, IBrowserUI { - private int windowId; - private int browserId; - - private List messages = new List(); - private Browser browser; - private BrowserNative.WindowCallbackFunc callbackRef;//don't let this get GC'd - private Vector2 delayedResize; - - public static void Create(int possibleBrowserId) { - var go = new GameObject("Pop up browser"); - var browser = go.AddComponent(); - browser.RequestNativeBrowser(possibleBrowserId); - - var pop = go.AddComponent(); - pop.callbackRef = pop.HandleWindowMessage; - pop.windowId = BrowserNative.zfb_windowCreate("", pop.callbackRef); - pop.browserId = possibleBrowserId; - pop.BrowserCursor = new BrowserCursor(); - pop.KeyEvents = new List(); - pop.browser = browser; - - pop.StartCoroutine(pop.FixFocus()); - - pop.InputSettings = new BrowserInputSettings(); - - browser.UIHandler = pop; - browser.EnableRendering = false;//rendering is done differently, so don't run the usual code - } - - private void HandleWindowMessage(int windowId, IntPtr data) { - var msgJSON = Util.PtrToStringUTF8(data); - //if (!msgJSON.Contains("mouseMove")) Debug.Log("Window message: " + msgJSON); - - lock (messages) messages.Add(msgJSON); - } - - public void OnDestroy() { - if (!BrowserNative.SymbolsLoaded) return; - BrowserNative.zfb_windowClose(windowId); - } - - - private IEnumerator FixFocus() { - //OS X: Magically, new browser windows that are focused don't think they are focused, even though we told them so. - //Hack workaround. - yield return null; - BrowserNative.zfb_setFocused(browserId, false); - yield return null; - BrowserNative.zfb_setFocused(browserId, true); - yield return null; - BrowserNative.zfb_setFocused(browserId, KeyboardHasFocus); - } - - public void InputUpdate() { - MouseScroll = Vector2.zero; - KeyEvents.Clear(); - delayedResize = new Vector2(float.NaN, float.NaN); - - lock (messages) { - for (int i = 0; i < messages.Count; i++) { - HandleMessage(messages[i]); - } - messages.Clear(); - } - - if (!float.IsNaN(delayedResize.x)) { - browser.Resize((int)delayedResize.x, (int)delayedResize.y); - } - } - - private void HandleMessage(string message) { - var msg = JSONNode.Parse(message); - - - switch ((string)msg["type"]) { - case "mouseDown": - case "mouseUp": { - int button = msg["button"]; - MouseButton flag = 0; - if (button == 0) flag = MouseButton.Left; - else if (button == 1) flag = MouseButton.Right; - else if (button == 2) flag = MouseButton.Middle; - - if (msg["type"] == "mouseDown") MouseButtons |= flag; - else MouseButtons &= ~flag; - - break; - } - case "mouseMove": { - var screenPos = new Vector2(msg["x"], msg["y"]); - screenPos.x = screenPos.x / browser.Size.x; - screenPos.y = screenPos.y / browser.Size.y; - MousePosition = screenPos; - //Debug.Log("mouse now at " + screenPos); - break; - } - case "mouseFocus": - MouseHasFocus = msg["focus"]; - break; - case "keyboardFocus": - KeyboardHasFocus = msg["focus"]; - break; - case "mouseScroll": { - const float mult = 1 / 3f; - MouseScroll += new Vector2(msg["x"], msg["y"]) * mult; - break; - } - case "keyDown": - case "keyUp": { - var ev = new Event(); - ev.type = msg["type"] == "keyDown" ? EventType.KeyDown : EventType.KeyUp; - ev.character = (char)0; - ev.keyCode = KeyMappings.GetUnityKeyCode(msg["code"]); - SetMods(ev); - - //Debug.Log("Convert wkc " + (int)msg["code"] + " to ukc " + ev.keyCode); - - KeyEvents.Add(ev); - break; - } - case "keyPress": { - string characters = msg["characters"]; - foreach (char c in characters) { - var ev = new Event(); - ev.type = EventType.KeyDown; - SetMods(ev); - ev.character = c; - ev.keyCode = 0; - - KeyEvents.Add(ev); - } - break; - } - case "resize": - //on OS X (editor at least), resizing hangs the update loop, so we suddenly end up with a bajillion resize - //messages we were unable to process. Just record it here and when we've processed everything we'll resize - delayedResize.x = msg["w"]; - delayedResize.y = msg["h"]; - break; - case "close": - Destroy(gameObject); - break; - default: - Debug.LogWarning("Unknown window event: " + msg.AsJSON); - break; - } - } - - - private bool shiftDown, controlDown, altDown, commandDown; - private void SetMods(Event ev) { - switch (ev.keyCode) { - case KeyCode.LeftShift: case KeyCode.RightShift: - shiftDown = ev.type == EventType.KeyDown; - break; - case KeyCode.LeftControl: case KeyCode.RightControl: - controlDown = ev.type == EventType.KeyDown; - break; - case KeyCode.LeftAlt: case KeyCode.RightAlt: - altDown = ev.type == EventType.KeyDown; - break; - case KeyCode.LeftCommand: case KeyCode.RightCommand: - case KeyCode.LeftWindows: case KeyCode.RightWindows: - commandDown = ev.type == EventType.KeyDown; - break; - } - - ev.shift = shiftDown; - ev.control = controlDown; - ev.alt = altDown; - ev.command = commandDown; - } - - public void Update() { - if (!BrowserNative.SymbolsLoaded) return; - BrowserNative.zfb_windowRender(windowId, browserId); - } - - public bool MouseHasFocus { get; private set; } - public Vector2 MousePosition { get; private set; } - public MouseButton MouseButtons { get; private set; } - public Vector2 MouseScroll { get; private set; } - public bool KeyboardHasFocus { get; private set; } - public List KeyEvents { get; private set; } - public BrowserCursor BrowserCursor { get; private set; } - public BrowserInputSettings InputSettings { get; private set; } -} - -} -#endif \ No newline at end of file diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/PopUpBrowser.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/PopUpBrowser.cs.meta deleted file mode 100644 index d9a3a978..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/PopUpBrowser.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 6172fca72ca9adf4da2ac4b4e3136708 -timeCreated: 1517329102 -licenseType: Store -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise.meta deleted file mode 100644 index b3dfa9cb..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 48b908734323b95409dfd20950349e02 -folderAsset: yes -timeCreated: 1479581013 -licenseType: Store -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise/EnumerableExt.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise/EnumerableExt.cs deleted file mode 100644 index 02913e41..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise/EnumerableExt.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace ZenFulcrum.EmbeddedBrowser.Promises -{ - /// - /// General extensions to LINQ. - /// - public static class EnumerableExt - { - public static IEnumerable Empty() - { - return new T[0]; - } - - public static IEnumerable LazyEach(this IEnumerable source, Action fn) - { - foreach (var item in source) - { - fn.Invoke(item); - - yield return item; - } - } - - public static void Each(this IEnumerable source, Action fn) - { - foreach (var item in source) - { - fn.Invoke(item); - } - } - - public static void Each(this IEnumerable source, Action fn) - { - int index = 0; - - foreach (T item in source) - { - fn.Invoke(item, index); - index++; - } - } - } -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise/EnumerableExt.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise/EnumerableExt.cs.meta deleted file mode 100644 index 3099b1d2..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise/EnumerableExt.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: b77f44a328c5e2c40ba15d0fc85741fc -timeCreated: 1479581013 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise/Promise.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise/Promise.cs deleted file mode 100644 index 884dbaad..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise/Promise.cs +++ /dev/null @@ -1,842 +0,0 @@ -using ZenFulcrum.EmbeddedBrowser.Promises; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace ZenFulcrum.EmbeddedBrowser -{ - /// - /// Implements a C# promise. - /// https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise - /// - /// This can also be waited on in a Unity coroutine and queried for its value. - /// - public interface IPromise - { - /// - /// Set the name of the promise, useful for debugging. - /// - IPromise WithName(string name); - - /// - /// Completes the promise. - /// onResolved is called on successful completion. - /// onRejected is called on error. - /// - void Done(Action onResolved, Action onRejected); - - /// - /// Completes the promise. - /// onResolved is called on successful completion. - /// Adds a default error handler. - /// - void Done(Action onResolved); - - /// - /// Complete the promise. Adds a default error handler. - /// - void Done(); - - /// - /// Handle errors for the promise. - /// - IPromise Catch(Action onRejected); - - /// - /// Add a resolved callback that chains a value promise (optionally converting to a different value type). - /// - IPromise Then(Func> onResolved); - - /// - /// Add a resolved callback that chains a non-value promise. - /// - IPromise Then(Func onResolved); - - /// - /// Add a resolved callback. - /// - IPromise Then(Action onResolved); - - /// - /// Add a resolved callback and a rejected callback. - /// The resolved callback chains a value promise (optionally converting to a different value type). - /// - IPromise Then(Func> onResolved, Action onRejected); - - /// - /// Add a resolved callback and a rejected callback. - /// The resolved callback chains a non-value promise. - /// - IPromise Then(Func onResolved, Action onRejected); - - /// - /// Add a resolved callback and a rejected callback. - /// - IPromise Then(Action onResolved, Action onRejected); - - /// - /// Return a new promise with a different value. - /// May also change the type of the value. - /// - IPromise Then(Func transform); - - /// - /// Return a new promise with a different value. - /// May also change the type of the value. - /// - [Obsolete("Use Then instead")] - IPromise Transform(Func transform); - - /// - /// Chain an enumerable of promises, all of which must resolve. - /// Returns a promise for a collection of the resolved results. - /// The resulting promise is resolved when all of the promises have resolved. - /// It is rejected as soon as any of the promises have been rejected. - /// - IPromise> ThenAll(Func>> chain); - - /// - /// Chain an enumerable of promises, all of which must resolve. - /// Converts to a non-value promise. - /// The resulting promise is resolved when all of the promises have resolved. - /// It is rejected as soon as any of the promises have been rejected. - /// - IPromise ThenAll(Func> chain); - - /// - /// Takes a function that yields an enumerable of promises. - /// Returns a promise that resolves when the first of the promises has resolved. - /// Yields the value from the first promise that has resolved. - /// - IPromise ThenRace(Func>> chain); - - /// - /// Takes a function that yields an enumerable of promises. - /// Converts to a non-value promise. - /// Returns a promise that resolves when the first of the promises has resolved. - /// Yields the value from the first promise that has resolved. - /// - IPromise ThenRace(Func> chain); - - /// - /// Returns the resulting value if resolved. - /// Throws the rejection if rejected. - /// Throws an exception if not settled. - /// - PromisedT Value { get; } - - /// - /// Returns an enumerable that yields null until the promise is settled. - /// ("To WaitFor" like the WaitForXXYY functions Unity provides.) - /// Suitable for use with a Unity coroutine's "yield return promise.ToWaitFor()" - /// Once it finishes, use promise.Value to retrieve the value/error. - /// - /// If throwOnFail is true, the coroutine will abort on promise rejection. - /// - /// - IEnumerator ToWaitFor(bool abortOnFail = false); - } - - /// - /// Interface for a promise that can be rejected. - /// - public interface IRejectable - { - /// - /// Reject the promise with an exception. - /// - void Reject(Exception ex); - } - - /// - /// Interface for a promise that can be rejected or resolved. - /// - public interface IPendingPromise : IRejectable - { - /// - /// Resolve the promise with a particular value. - /// - void Resolve(PromisedT value); - } - - /// - /// Specifies the state of a promise. - /// - public enum PromiseState - { - Pending, // The promise is in-flight. - Rejected, // The promise has been rejected. - Resolved // The promise has been resolved. - }; - - /// - /// Implements a C# promise. - /// https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise - /// - public class Promise : IPromise, IPendingPromise, IPromiseInfo - { - /// - /// The exception when the promise is rejected. - /// - private Exception rejectionException; - - /// - /// The value when the promises is resolved. - /// - private PromisedT resolveValue; - - /// - /// Error handler. - /// - private List rejectHandlers; - - /// - /// Completed handlers that accept a value. - /// - private List> resolveCallbacks; - private List resolveRejectables; - - /// - /// ID of the promise, useful for debugging. - /// - public int Id { get; private set; } - - /// - /// Name of the promise, when set, useful for debugging. - /// - public string Name { get; private set; } - - /// - /// Tracks the current state of the promise. - /// - public PromiseState CurState { get; private set; } - - public Promise() - { - this.CurState = PromiseState.Pending; - this.Id = ++Promise.nextPromiseId; - - if (Promise.EnablePromiseTracking) - { - Promise.pendingPromises.Add(this); - } - } - - public Promise(Action, Action> resolver) - { - this.CurState = PromiseState.Pending; - this.Id = ++Promise.nextPromiseId; - - if (Promise.EnablePromiseTracking) - { - Promise.pendingPromises.Add(this); - } - - try - { - resolver( - // Resolve - value => Resolve(value), - - // Reject - ex => Reject(ex) - ); - } - catch (Exception ex) - { - Reject(ex); - } - } - - /// - /// Add a rejection handler for this promise. - /// - private void AddRejectHandler(Action onRejected, IRejectable rejectable) - { - if (rejectHandlers == null) - { - rejectHandlers = new List(); - } - - rejectHandlers.Add(new RejectHandler() { callback = onRejected, rejectable = rejectable }); ; - } - - /// - /// Add a resolve handler for this promise. - /// - private void AddResolveHandler(Action onResolved, IRejectable rejectable) - { - if (resolveCallbacks == null) - { - resolveCallbacks = new List>(); - } - - if (resolveRejectables == null) - { - resolveRejectables = new List(); - } - - resolveCallbacks.Add(onResolved); - resolveRejectables.Add(rejectable); - } - - /// - /// Invoke a single handler. - /// - private void InvokeHandler(Action callback, IRejectable rejectable, T value) - { -// Argument.NotNull(() => callback); -// Argument.NotNull(() => rejectable); - - try - { - callback(value); - } - catch (Exception ex) - { - rejectable.Reject(ex); - } - } - - /// - /// Helper function clear out all handlers after resolution or rejection. - /// - private void ClearHandlers() - { - rejectHandlers = null; - resolveCallbacks = null; - resolveRejectables = null; - } - - /// - /// Invoke all reject handlers. - /// - private void InvokeRejectHandlers(Exception ex) - { -// Argument.NotNull(() => ex); - - if (rejectHandlers != null) - { - rejectHandlers.Each(handler => InvokeHandler(handler.callback, handler.rejectable, ex)); - } - - ClearHandlers(); - } - - /// - /// Invoke all resolve handlers. - /// - private void InvokeResolveHandlers(PromisedT value) - { - if (resolveCallbacks != null) - { - for (int i = 0, maxI = resolveCallbacks.Count; i < maxI; i++) { - InvokeHandler(resolveCallbacks[i], resolveRejectables[i], value); - } - } - - ClearHandlers(); - } - - /// - /// Reject the promise with an exception. - /// - public void Reject(Exception ex) - { -// Argument.NotNull(() => ex); - - if (CurState != PromiseState.Pending) - { - throw new ApplicationException("Attempt to reject a promise that is already in state: " + CurState + ", a promise can only be rejected when it is still in state: " + PromiseState.Pending); - } - - rejectionException = ex; - CurState = PromiseState.Rejected; - - if (Promise.EnablePromiseTracking) - { - Promise.pendingPromises.Remove(this); - } - - InvokeRejectHandlers(ex); - } - - /// - /// Resolve the promise with a particular value. - /// - public void Resolve(PromisedT value) - { - if (CurState != PromiseState.Pending) - { - throw new ApplicationException("Attempt to resolve a promise that is already in state: " + CurState + ", a promise can only be resolved when it is still in state: " + PromiseState.Pending); - } - - resolveValue = value; - CurState = PromiseState.Resolved; - - if (Promise.EnablePromiseTracking) - { - Promise.pendingPromises.Remove(this); - } - - InvokeResolveHandlers(value); - } - - /// - /// Completes the promise. - /// onResolved is called on successful completion. - /// onRejected is called on error. - /// - public void Done(Action onResolved, Action onRejected) - { - Then(onResolved, onRejected) - .Catch(ex => - Promise.PropagateUnhandledException(this, ex) - ); - } - - /// - /// Completes the promise. - /// onResolved is called on successful completion. - /// Adds a default error handler. - /// - public void Done(Action onResolved) - { - Then(onResolved) - .Catch(ex => - Promise.PropagateUnhandledException(this, ex) - ); - } - - /// - /// Complete the promise. Adds a default error handler. - /// - public void Done() - { - Catch(ex => - Promise.PropagateUnhandledException(this, ex) - ); - } - - /// - /// Set the name of the promise, useful for debugging. - /// - public IPromise WithName(string name) - { - this.Name = name; - return this; - } - - /// - /// Handle errors for the promise. - /// - public IPromise Catch(Action onRejected) - { -// Argument.NotNull(() => onRejected); - - var resultPromise = new Promise(); - resultPromise.WithName(Name); - - Action resolveHandler = v => - { - resultPromise.Resolve(v); - }; - - Action rejectHandler = ex => - { - onRejected(ex); - - resultPromise.Reject(ex); - }; - - ActionHandlers(resultPromise, resolveHandler, rejectHandler); - - return resultPromise; - } - - /// - /// Add a resolved callback that chains a value promise (optionally converting to a different value type). - /// - public IPromise Then(Func> onResolved) - { - return Then(onResolved, null); - } - - /// - /// Add a resolved callback that chains a non-value promise. - /// - public IPromise Then(Func onResolved) - { - return Then(onResolved, null); - } - - /// - /// Add a resolved callback. - /// - public IPromise Then(Action onResolved) - { - return Then(onResolved, null); - } - - /// - /// Add a resolved callback and a rejected callback. - /// The resolved callback chains a value promise (optionally converting to a different value type). - /// - public IPromise Then(Func> onResolved, Action onRejected) - { - // This version of the function must supply an onResolved. - // Otherwise there is now way to get the converted value to pass to the resulting promise. -// Argument.NotNull(() => onResolved); - - var resultPromise = new Promise(); - resultPromise.WithName(Name); - - Action resolveHandler = v => - { - onResolved(v) - .Then( - // Should not be necessary to specify the arg type on the next line, but Unity (mono) has an internal compiler error otherwise. - (ConvertedT chainedValue) => resultPromise.Resolve(chainedValue), - ex => resultPromise.Reject(ex) - ); - }; - - Action rejectHandler = ex => - { - if (onRejected != null) - { - onRejected(ex); - } - - resultPromise.Reject(ex); - }; - - ActionHandlers(resultPromise, resolveHandler, rejectHandler); - - return resultPromise; - } - - /// - /// Add a resolved callback and a rejected callback. - /// The resolved callback chains a non-value promise. - /// - public IPromise Then(Func onResolved, Action onRejected) - { - var resultPromise = new Promise(); - resultPromise.WithName(Name); - - Action resolveHandler = v => - { - if (onResolved != null) - { - onResolved(v) - .Then( - () => resultPromise.Resolve(), - ex => resultPromise.Reject(ex) - ); - } - else - { - resultPromise.Resolve(); - } - }; - - Action rejectHandler = ex => - { - if (onRejected != null) - { - onRejected(ex); - } - - resultPromise.Reject(ex); - }; - - ActionHandlers(resultPromise, resolveHandler, rejectHandler); - - return resultPromise; - } - - /// - /// Add a resolved callback and a rejected callback. - /// - public IPromise Then(Action onResolved, Action onRejected) - { - var resultPromise = new Promise(); - resultPromise.WithName(Name); - - Action resolveHandler = v => - { - if (onResolved != null) - { - onResolved(v); - } - - resultPromise.Resolve(v); - }; - - Action rejectHandler = ex => - { - if (onRejected != null) - { - onRejected(ex); - } - - resultPromise.Reject(ex); - }; - - ActionHandlers(resultPromise, resolveHandler, rejectHandler); - - return resultPromise; - } - - /// - /// Return a new promise with a different value. - /// May also change the type of the value. - /// - public IPromise Then(Func transform) - { -// Argument.NotNull(() => transform); - return Then(value => Promise.Resolved(transform(value))); - } - - /// - /// Return a new promise with a different value. - /// May also change the type of the value. - /// - [Obsolete("Use Then instead")] - public IPromise Transform(Func transform) - { -// Argument.NotNull(() => transform); - return Then(value => Promise.Resolved(transform(value))); - } - - /// - /// Helper function to invoke or register resolve/reject handlers. - /// - private void ActionHandlers(IRejectable resultPromise, Action resolveHandler, Action rejectHandler) - { - if (CurState == PromiseState.Resolved) - { - InvokeHandler(resolveHandler, resultPromise, resolveValue); - } - else if (CurState == PromiseState.Rejected) - { - InvokeHandler(rejectHandler, resultPromise, rejectionException); - } - else - { - AddResolveHandler(resolveHandler, resultPromise); - AddRejectHandler(rejectHandler, resultPromise); - } - } - - /// - /// Chain an enumerable of promises, all of which must resolve. - /// Returns a promise for a collection of the resolved results. - /// The resulting promise is resolved when all of the promises have resolved. - /// It is rejected as soon as any of the promises have been rejected. - /// - public IPromise> ThenAll(Func>> chain) - { - return Then(value => Promise.All(chain(value))); - } - - /// - /// Chain an enumerable of promises, all of which must resolve. - /// Converts to a non-value promise. - /// The resulting promise is resolved when all of the promises have resolved. - /// It is rejected as soon as any of the promises have been rejected. - /// - public IPromise ThenAll(Func> chain) - { - return Then(value => Promise.All(chain(value))); - } - - /// - /// Returns a promise that resolves when all of the promises in the enumerable argument have resolved. - /// Returns a promise of a collection of the resolved results. - /// - public static IPromise> All(params IPromise[] promises) - { - return All((IEnumerable>)promises); // Cast is required to force use of the other All function. - } - - /// - /// Returns a promise that resolves when all of the promises in the enumerable argument have resolved. - /// Returns a promise of a collection of the resolved results. - /// - public static IPromise> All(IEnumerable> promises) - { - var promisesArray = promises.ToArray(); - if (promisesArray.Length == 0) - { - return Promise>.Resolved(EnumerableExt.Empty()); - } - - var remainingCount = promisesArray.Length; - var results = new PromisedT[remainingCount]; - var resultPromise = new Promise>(); - resultPromise.WithName("All"); - - promisesArray.Each((promise, index) => - { - promise - .Catch(ex => - { - if (resultPromise.CurState == PromiseState.Pending) - { - // If a promise errorred and the result promise is still pending, reject it. - resultPromise.Reject(ex); - } - }) - .Then(result => - { - results[index] = result; - - --remainingCount; - if (remainingCount <= 0) - { - // This will never happen if any of the promises errorred. - resultPromise.Resolve(results); - } - }) - .Done(); - }); - - return resultPromise; - } - - /// - /// Takes a function that yields an enumerable of promises. - /// Returns a promise that resolves when the first of the promises has resolved. - /// Yields the value from the first promise that has resolved. - /// - public IPromise ThenRace(Func>> chain) - { - return Then(value => Promise.Race(chain(value))); - } - - /// - /// Takes a function that yields an enumerable of promises. - /// Converts to a non-value promise. - /// Returns a promise that resolves when the first of the promises has resolved. - /// Yields the value from the first promise that has resolved. - /// - public IPromise ThenRace(Func> chain) - { - return Then(value => Promise.Race(chain(value))); - } - - public PromisedT Value - { - get - { - if (CurState == PromiseState.Pending) throw new InvalidOperationException("Promise not settled"); - else if (CurState == PromiseState.Rejected) throw rejectionException; - return resolveValue; - } - } - - class Enumerated : IEnumerator { - private Promise promise; - private bool abortOnFail; - - public Enumerated(Promise promise, bool abortOnFail) { - this.promise = promise; - this.abortOnFail = abortOnFail; - } - - public bool MoveNext() { - if (abortOnFail && promise.CurState == PromiseState.Rejected) { - throw promise.rejectionException; - } - return promise.CurState == PromiseState.Pending; - } - - public void Reset() { } - - public object Current { get { return null; } } - } - - public IEnumerator ToWaitFor(bool abortOnFail) { - var ret = new Enumerated(this, abortOnFail); - //someone will poll for completion, so act like we've been terminated - Done(x => {}, ex => {}); - return ret; - } - - - /// - /// Returns a promise that resolves when the first of the promises in the enumerable argument have resolved. - /// Returns the value from the first promise that has resolved. - /// - public static IPromise Race(params IPromise[] promises) - { - return Race((IEnumerable>)promises); // Cast is required to force use of the other function. - } - - /// - /// Returns a promise that resolves when the first of the promises in the enumerable argument have resolved. - /// Returns the value from the first promise that has resolved. - /// - public static IPromise Race(IEnumerable> promises) - { - var promisesArray = promises.ToArray(); - if (promisesArray.Length == 0) - { - throw new ApplicationException("At least 1 input promise must be provided for Race"); - } - - var resultPromise = new Promise(); - resultPromise.WithName("Race"); - - promisesArray.Each((promise, index) => - { - promise - .Catch(ex => - { - if (resultPromise.CurState == PromiseState.Pending) - { - // If a promise errorred and the result promise is still pending, reject it. - resultPromise.Reject(ex); - } - }) - .Then(result => - { - if (resultPromise.CurState == PromiseState.Pending) - { - resultPromise.Resolve(result); - } - }) - .Done(); - }); - - return resultPromise; - } - - /// - /// Convert a simple value directly into a resolved promise. - /// - public static IPromise Resolved(PromisedT promisedValue) - { - var promise = new Promise(); - promise.Resolve(promisedValue); - return promise; - } - - /// - /// Convert an exception directly into a rejected promise. - /// - public static IPromise Rejected(Exception ex) - { -// Argument.NotNull(() => ex); - - var promise = new Promise(); - promise.Reject(ex); - return promise; - } - - } -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise/Promise.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise/Promise.cs.meta deleted file mode 100644 index b93c408f..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise/Promise.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 56222919992acdd489a2deff63c33981 -timeCreated: 1479581013 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise/PromiseTimer.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise/PromiseTimer.cs deleted file mode 100644 index cebf3393..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise/PromiseTimer.cs +++ /dev/null @@ -1,162 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace ZenFulcrum.EmbeddedBrowser -{ - /// - /// A class that wraps a pending promise with it's predicate and time data - /// - internal class PredicateWait - { - /// - /// Predicate for resolving the promise - /// - public Func predicate; - - /// - /// The time the promise was started - /// - public float timeStarted; - - /// - /// The pending promise which is an interface for a promise that can be rejected or resolved. - /// - public IPendingPromise pendingPromise; - - /// - /// The time data specific to this pending promise. Includes elapsed time and delta time. - /// - public TimeData timeData; - } - - /// - /// Time data specific to a particular pending promise. - /// - public struct TimeData - { - /// - /// The amount of time that has elapsed since the pending promise started running - /// - public float elapsedTime; - - /// - /// The amount of time since the last time the pending promise was updated. - /// - public float deltaTime; - } - - public interface IPromiseTimer - { - /// - /// Resolve the returned promise once the time has elapsed - /// - IPromise WaitFor(float seconds); - - /// - /// Resolve the returned promise once the predicate evaluates to true - /// - IPromise WaitUntil(Func predicate); - - /// - /// Resolve the returned promise once the predicate evaluates to false - /// - IPromise WaitWhile(Func predicate); - - /// - /// Update all pending promises. Must be called for the promises to progress and resolve at all. - /// - void Update(float deltaTime); - } - - public class PromiseTimer : IPromiseTimer - { - /// - /// The current running total for time that this PromiseTimer has run for - /// - private float curTime; - - /// - /// Currently pending promises - /// - private List waiting = new List(); - - /// - /// Resolve the returned promise once the time has elapsed - /// - public IPromise WaitFor(float seconds) - { - return WaitUntil(t => t.elapsedTime >= seconds); - } - - /// - /// Resolve the returned promise once the predicate evaluates to false - /// - public IPromise WaitWhile(Func predicate) - { - return WaitUntil(t => !predicate(t)); - } - - /// - /// Resolve the returned promise once the predicate evalutes to true - /// - public IPromise WaitUntil(Func predicate) - { - var promise = new Promise(); - - var wait = new PredicateWait() - { - timeStarted = curTime, - pendingPromise = promise, - timeData = new TimeData(), - predicate = predicate - }; - - waiting.Add(wait); - - return promise; - } - - /// - /// Update all pending promises. Must be called for the promises to progress and resolve at all. - /// - public void Update(float deltaTime) - { - curTime += deltaTime; - - int i = 0; - while (i < waiting.Count) - { - var wait = waiting[i]; - - var newElapsedTime = curTime - wait.timeStarted; - wait.timeData.deltaTime = newElapsedTime - wait.timeData.elapsedTime; - wait.timeData.elapsedTime = newElapsedTime; - - bool result; - try - { - result = wait.predicate(wait.timeData); - } - catch (Exception ex) - { - wait.pendingPromise.Reject(ex); - waiting.RemoveAt(i); - continue; - } - - if (result) - { - wait.pendingPromise.Resolve(); - waiting.RemoveAt(i); - } - else - { - i++; - } - } - } - } -} - diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise/PromiseTimer.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise/PromiseTimer.cs.meta deleted file mode 100644 index 592fae93..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise/PromiseTimer.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: bab6d12600d36db4b81c0aa04f0fd685 -timeCreated: 1479581013 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise/Promise_NonGeneric.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise/Promise_NonGeneric.cs deleted file mode 100644 index 6c123186..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise/Promise_NonGeneric.cs +++ /dev/null @@ -1,930 +0,0 @@ -using ZenFulcrum.EmbeddedBrowser.Promises; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace ZenFulcrum.EmbeddedBrowser -{ - /// - /// Implements a non-generic C# promise, this is a promise that simply resolves without delivering a value. - /// https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise - /// - /// This can also be waited on in a Unity coroutine. - /// - public interface IPromise - { - /// - /// Set the name of the promise, useful for debugging. - /// - IPromise WithName(string name); - - /// - /// Completes the promise. - /// onResolved is called on successful completion. - /// onRejected is called on error. - /// - void Done(Action onResolved, Action onRejected); - - /// - /// Completes the promise. - /// onResolved is called on successful completion. - /// Adds a default error handler. - /// - void Done(Action onResolved); - - /// - /// Complete the promise. Adds a default error handler. - /// - void Done(); - - /// - /// Handle errors for the promise. - /// - IPromise Catch(Action onRejected); - - /// - /// Add a resolved callback that chains a value promise (optionally converting to a different value type). - /// - IPromise Then(Func> onResolved); - - /// - /// Add a resolved callback that chains a non-value promise. - /// - IPromise Then(Func onResolved); - - /// - /// Add a resolved callback. - /// - IPromise Then(Action onResolved); - - /// - /// Add a resolved callback and a rejected callback. - /// The resolved callback chains a value promise (optionally converting to a different value type). - /// - IPromise Then(Func> onResolved, Action onRejected); - - /// - /// Add a resolved callback and a rejected callback. - /// The resolved callback chains a non-value promise. - /// - IPromise Then(Func onResolved, Action onRejected); - - /// - /// Add a resolved callback and a rejected callback. - /// - IPromise Then(Action onResolved, Action onRejected); - - /// - /// Chain an enumerable of promises, all of which must resolve. - /// The resulting promise is resolved when all of the promises have resolved. - /// It is rejected as soon as any of the promises have been rejected. - /// - IPromise ThenAll(Func> chain); - - /// - /// Chain an enumerable of promises, all of which must resolve. - /// Converts to a non-value promise. - /// The resulting promise is resolved when all of the promises have resolved. - /// It is rejected as soon as any of the promises have been rejected. - /// - IPromise> ThenAll(Func>> chain); - - /// - /// Chain a sequence of operations using promises. - /// Reutrn a collection of functions each of which starts an async operation and yields a promise. - /// Each function will be called and each promise resolved in turn. - /// The resulting promise is resolved after each promise is resolved in sequence. - /// - IPromise ThenSequence(Func>> chain); - - /// - /// Takes a function that yields an enumerable of promises. - /// Returns a promise that resolves when the first of the promises has resolved. - /// - IPromise ThenRace(Func> chain); - - /// - /// Takes a function that yields an enumerable of promises. - /// Converts to a value promise. - /// Returns a promise that resolves when the first of the promises has resolved. - /// - IPromise ThenRace(Func>> chain); - - /// - /// Returns an enumerable that yields null until the promise is settled. - /// ("To WaitFor" like the WaitForXXYY functions Unity provides.) - /// Suitable for use with a Unity coroutine's "yield return promise.ToWaitFor()" - /// - /// If throwOnFail is true, the coroutine will abort on promise rejection. - /// - /// - IEnumerator ToWaitFor(bool abortOnFail = false); - } - - /// - /// Interface for a promise that can be rejected or resolved. - /// - public interface IPendingPromise : IRejectable - { - /// - /// Resolve the promise with a particular value. - /// - void Resolve(); - } - - /// - /// Used to list information of pending promises. - /// - public interface IPromiseInfo - { - /// - /// Id of the promise. - /// - int Id { get; } - - /// - /// Human-readable name for the promise. - /// - string Name { get; } - } - - /// - /// Arguments to the UnhandledError event. - /// - public class ExceptionEventArgs : EventArgs - { - internal ExceptionEventArgs(Exception exception) - { -// Argument.NotNull(() => exception); - - this.Exception = exception; - } - - public Exception Exception - { - get; - private set; - } - } - - /// - /// Represents a handler invoked when the promise is rejected. - /// - public struct RejectHandler - { - /// - /// Callback fn. - /// - public Action callback; - - /// - /// The promise that is rejected when there is an error while invoking the handler. - /// - public IRejectable rejectable; - } - - /// - /// Implements a non-generic C# promise, this is a promise that simply resolves without delivering a value. - /// https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise - /// - public class Promise : IPromise, IPendingPromise, IPromiseInfo - { - static Promise() - { - UnhandledException += (sender, args) => { - UnityEngine.Debug.LogWarning("Rejection: " + args.Exception.Message + "\n" + args.Exception.StackTrace); - }; - } - - /// - /// Set to true to enable tracking of promises. - /// - public static bool EnablePromiseTracking = false; - - /// - /// Event raised for unhandled errors. - /// For this to work you have to complete your promises with a call to Done(). - /// - public static event EventHandler UnhandledException - { - add { unhandlerException += value; } - remove { unhandlerException -= value; } - } - private static EventHandler unhandlerException; - - /// - /// Id for the next promise that is created. - /// - internal static int nextPromiseId = 0; - - /// - /// Information about pending promises. - /// - internal static HashSet pendingPromises = new HashSet(); - - /// - /// Information about pending promises, useful for debugging. - /// This is only populated when 'EnablePromiseTracking' is set to true. - /// - public static IEnumerable GetPendingPromises() - { - return pendingPromises; - } - - /// - /// The exception when the promise is rejected. - /// - private Exception rejectionException; - - /// - /// Error handlers. - /// - private List rejectHandlers; - - /// - /// Represents a handler invoked when the promise is resolved. - /// - public struct ResolveHandler - { - /// - /// Callback fn. - /// - public Action callback; - - /// - /// The promise that is rejected when there is an error while invoking the handler. - /// - public IRejectable rejectable; - } - - /// - /// Completed handlers that accept no value. - /// - private List resolveHandlers; - - /// - /// ID of the promise, useful for debugging. - /// - public int Id { get; private set; } - - /// - /// Name of the promise, when set, useful for debugging. - /// - public string Name { get; private set; } - - /// - /// Tracks the current state of the promise. - /// - public PromiseState CurState { get; private set; } - - public Promise() - { - this.CurState = PromiseState.Pending; - if (EnablePromiseTracking) - { - pendingPromises.Add(this); - } - } - - public Promise(Action> resolver) - { - this.CurState = PromiseState.Pending; - if (EnablePromiseTracking) - { - pendingPromises.Add(this); - } - - try - { - resolver( - // Resolve - () => Resolve(), - - // Reject - ex => Reject(ex) - ); - } - catch (Exception ex) - { - Reject(ex); - } - } - - /// - /// Add a rejection handler for this promise. - /// - private void AddRejectHandler(Action onRejected, IRejectable rejectable) - { - if (rejectHandlers == null) - { - rejectHandlers = new List(); - } - - rejectHandlers.Add(new RejectHandler() - { - callback = onRejected, - rejectable = rejectable - }); - } - - /// - /// Add a resolve handler for this promise. - /// - private void AddResolveHandler(Action onResolved, IRejectable rejectable) - { - if (resolveHandlers == null) - { - resolveHandlers = new List(); - } - - resolveHandlers.Add(new ResolveHandler() - { - callback = onResolved, - rejectable = rejectable - }); - } - - /// - /// Invoke a single error handler. - /// - private void InvokeRejectHandler(Action callback, IRejectable rejectable, Exception value) - { -// Argument.NotNull(() => callback); -// Argument.NotNull(() => rejectable); - - try - { - callback(value); - } - catch (Exception ex) - { - rejectable.Reject(ex); - } - } - - /// - /// Invoke a single resolve handler. - /// - private void InvokeResolveHandler(Action callback, IRejectable rejectable) - { -// Argument.NotNull(() => callback); -// Argument.NotNull(() => rejectable); - - try - { - callback(); - } - catch (Exception ex) - { - rejectable.Reject(ex); - } - } - - /// - /// Helper function clear out all handlers after resolution or rejection. - /// - private void ClearHandlers() - { - rejectHandlers = null; - resolveHandlers = null; - } - - /// - /// Invoke all reject handlers. - /// - private void InvokeRejectHandlers(Exception ex) - { -// Argument.NotNull(() => ex); - - if (rejectHandlers != null) - { - rejectHandlers.Each(handler => InvokeRejectHandler(handler.callback, handler.rejectable, ex)); - } - - ClearHandlers(); - } - - /// - /// Invoke all resolve handlers. - /// - private void InvokeResolveHandlers() - { - if (resolveHandlers != null) - { - resolveHandlers.Each(handler => InvokeResolveHandler(handler.callback, handler.rejectable)); - } - - ClearHandlers(); - } - - /// - /// Reject the promise with an exception. - /// - public void Reject(Exception ex) - { -// Argument.NotNull(() => ex); - - if (CurState != PromiseState.Pending) - { - throw new ApplicationException("Attempt to reject a promise that is already in state: " + CurState + ", a promise can only be rejected when it is still in state: " + PromiseState.Pending); - } - - rejectionException = ex; - CurState = PromiseState.Rejected; - - if (EnablePromiseTracking) - { - pendingPromises.Remove(this); - } - - InvokeRejectHandlers(ex); - } - - - /// - /// Resolve the promise with a particular value. - /// - public void Resolve() - { - if (CurState != PromiseState.Pending) - { - throw new ApplicationException("Attempt to resolve a promise that is already in state: " + CurState + ", a promise can only be resolved when it is still in state: " + PromiseState.Pending); - } - - CurState = PromiseState.Resolved; - - if (EnablePromiseTracking) - { - pendingPromises.Remove(this); - } - - InvokeResolveHandlers(); - } - - /// - /// Completes the promise. - /// onResolved is called on successful completion. - /// onRejected is called on error. - /// - public void Done(Action onResolved, Action onRejected) - { - Then(onResolved, onRejected) - .Catch(ex => - Promise.PropagateUnhandledException(this, ex) - ); - } - - /// - /// Completes the promise. - /// onResolved is called on successful completion. - /// Adds a default error handler. - /// - public void Done(Action onResolved) - { - Then(onResolved) - .Catch(ex => - Promise.PropagateUnhandledException(this, ex) - ); - } - - /// - /// Complete the promise. Adds a defualt error handler. - /// - public void Done() - { - Catch(ex => - Promise.PropagateUnhandledException(this, ex) - ); - } - - /// - /// Set the name of the promise, useful for debugging. - /// - public IPromise WithName(string name) - { - this.Name = name; - return this; - } - - /// - /// Handle errors for the promise. - /// - public IPromise Catch(Action onRejected) - { -// Argument.NotNull(() => onRejected); - - var resultPromise = new Promise(); - resultPromise.WithName(Name); - - Action resolveHandler = () => - { - resultPromise.Resolve(); - }; - - Action rejectHandler = ex => - { - onRejected(ex); - - resultPromise.Reject(ex); - }; - - ActionHandlers(resultPromise, resolveHandler, rejectHandler); - - return resultPromise; - } - - /// - /// Add a resolved callback that chains a value promise (optionally converting to a different value type). - /// - public IPromise Then(Func> onResolved) - { - return Then(onResolved, null); - } - - /// - /// Add a resolved callback that chains a non-value promise. - /// - public IPromise Then(Func onResolved) - { - return Then(onResolved, null); - } - - /// - /// Add a resolved callback. - /// - public IPromise Then(Action onResolved) - { - return Then(onResolved, null); - } - - /// - /// Add a resolved callback and a rejected callback. - /// The resolved callback chains a value promise (optionally converting to a different value type). - /// - public IPromise Then(Func> onResolved, Action onRejected) - { - // This version of the function must supply an onResolved. - // Otherwise there is now way to get the converted value to pass to the resulting promise. -// Argument.NotNull(() => onResolved); - - var resultPromise = new Promise(); - resultPromise.WithName(Name); - - Action resolveHandler = () => - { - onResolved() - .Then( - // Should not be necessary to specify the arg type on the next line, but Unity (mono) has an internal compiler error otherwise. - (ConvertedT chainedValue) => resultPromise.Resolve(chainedValue), - ex => resultPromise.Reject(ex) - ); - }; - - Action rejectHandler = ex => - { - if (onRejected != null) - { - onRejected(ex); - } - - resultPromise.Reject(ex); - }; - - ActionHandlers(resultPromise, resolveHandler, rejectHandler); - - return resultPromise; - } - - /// - /// Add a resolved callback and a rejected callback. - /// The resolved callback chains a non-value promise. - /// - public IPromise Then(Func onResolved, Action onRejected) - { - var resultPromise = new Promise(); - resultPromise.WithName(Name); - - Action resolveHandler = () => - { - if (onResolved != null) - { - onResolved() - .Then( - () => resultPromise.Resolve(), - ex => resultPromise.Reject(ex) - ); - } - else - { - resultPromise.Resolve(); - } - }; - - Action rejectHandler = ex => - { - if (onRejected != null) - { - onRejected(ex); - } - - resultPromise.Reject(ex); - }; - - ActionHandlers(resultPromise, resolveHandler, rejectHandler); - - return resultPromise; - } - - /// - /// Add a resolved callback and a rejected callback. - /// - public IPromise Then(Action onResolved, Action onRejected) - { - var resultPromise = new Promise(); - resultPromise.WithName(Name); - - Action resolveHandler = () => - { - if (onResolved != null) - { - onResolved(); - } - - resultPromise.Resolve(); - }; - - Action rejectHandler = ex => - { - if (onRejected != null) - { - onRejected(ex); - } - - resultPromise.Reject(ex); - }; - - ActionHandlers(resultPromise, resolveHandler, rejectHandler); - - return resultPromise; - } - - /// - /// Helper function to invoke or register resolve/reject handlers. - /// - private void ActionHandlers(IRejectable resultPromise, Action resolveHandler, Action rejectHandler) - { - if (CurState == PromiseState.Resolved) - { - InvokeResolveHandler(resolveHandler, resultPromise); - } - else if (CurState == PromiseState.Rejected) - { - InvokeRejectHandler(rejectHandler, resultPromise, rejectionException); - } - else - { - AddResolveHandler(resolveHandler, resultPromise); - AddRejectHandler(rejectHandler, resultPromise); - } - } - - /// - /// Chain an enumerable of promises, all of which must resolve. - /// The resulting promise is resolved when all of the promises have resolved. - /// It is rejected as soon as any of the promises have been rejected. - /// - public IPromise ThenAll(Func> chain) - { - return Then(() => Promise.All(chain())); - } - - /// - /// Chain an enumerable of promises, all of which must resolve. - /// Converts to a non-value promise. - /// The resulting promise is resolved when all of the promises have resolved. - /// It is rejected as soon as any of the promises have been rejected. - /// - public IPromise> ThenAll(Func>> chain) - { - return Then(() => Promise.All(chain())); - } - - /// - /// Returns a promise that resolves when all of the promises in the enumerable argument have resolved. - /// Returns a promise of a collection of the resolved results. - /// - public static IPromise All(params IPromise[] promises) - { - return All((IEnumerable)promises); // Cast is required to force use of the other All function. - } - - /// - /// Returns a promise that resolves when all of the promises in the enumerable argument have resolved. - /// Returns a promise of a collection of the resolved results. - /// - public static IPromise All(IEnumerable promises) - { - var promisesArray = promises.ToArray(); - if (promisesArray.Length == 0) - { - return Promise.Resolved(); - } - - var remainingCount = promisesArray.Length; - var resultPromise = new Promise(); - resultPromise.WithName("All"); - - promisesArray.Each((promise, index) => - { - promise - .Catch(ex => - { - if (resultPromise.CurState == PromiseState.Pending) - { - // If a promise errorred and the result promise is still pending, reject it. - resultPromise.Reject(ex); - } - }) - .Then(() => - { - --remainingCount; - if (remainingCount <= 0) - { - // This will never happen if any of the promises errorred. - resultPromise.Resolve(); - } - }) - .Done(); - }); - - return resultPromise; - } - - /// - /// Chain a sequence of operations using promises. - /// Reutrn a collection of functions each of which starts an async operation and yields a promise. - /// Each function will be called and each promise resolved in turn. - /// The resulting promise is resolved after each promise is resolved in sequence. - /// - public IPromise ThenSequence(Func>> chain) - { - return Then(() => Sequence(chain())); - } - - /// - /// Chain a number of operations using promises. - /// Takes a number of functions each of which starts an async operation and yields a promise. - /// - public static IPromise Sequence(params Func[] fns) - { - return Sequence((IEnumerable>)fns); - } - - /// - /// Chain a sequence of operations using promises. - /// Takes a collection of functions each of which starts an async operation and yields a promise. - /// - public static IPromise Sequence(IEnumerable> fns) - { - return fns.Aggregate( - Promise.Resolved(), - (prevPromise, fn) => - { - return prevPromise.Then(() => fn()); - } - ); - } - - /// - /// Takes a function that yields an enumerable of promises. - /// Returns a promise that resolves when the first of the promises has resolved. - /// - public IPromise ThenRace(Func> chain) - { - return Then(() => Promise.Race(chain())); - } - - /// - /// Takes a function that yields an enumerable of promises. - /// Converts to a value promise. - /// Returns a promise that resolves when the first of the promises has resolved. - /// - public IPromise ThenRace(Func>> chain) - { - return Then(() => Promise.Race(chain())); - } - - /// - /// Returns a promise that resolves when the first of the promises in the enumerable argument have resolved. - /// Returns the value from the first promise that has resolved. - /// - public static IPromise Race(params IPromise[] promises) - { - return Race((IEnumerable)promises); // Cast is required to force use of the other function. - } - - /// - /// Returns a promise that resolves when the first of the promises in the enumerable argument have resolved. - /// Returns the value from the first promise that has resolved. - /// - public static IPromise Race(IEnumerable promises) - { - var promisesArray = promises.ToArray(); - if (promisesArray.Length == 0) - { - throw new ApplicationException("At least 1 input promise must be provided for Race"); - } - - var resultPromise = new Promise(); - resultPromise.WithName("Race"); - - promisesArray.Each((promise, index) => - { - promise - .Catch(ex => - { - if (resultPromise.CurState == PromiseState.Pending) - { - // If a promise errorred and the result promise is still pending, reject it. - resultPromise.Reject(ex); - } - }) - .Then(() => - { - if (resultPromise.CurState == PromiseState.Pending) - { - resultPromise.Resolve(); - } - }) - .Done(); - }); - - return resultPromise; - } - - /// - /// Convert a simple value directly into a resolved promise. - /// - public static IPromise Resolved() - { - var promise = new Promise(); - promise.Resolve(); - return promise; - } - - /// - /// Convert an exception directly into a rejected promise. - /// - public static IPromise Rejected(Exception ex) - { -// Argument.NotNull(() => ex); - - var promise = new Promise(); - promise.Reject(ex); - return promise; - } - - /// - /// Raises the UnhandledException event. - /// - internal static void PropagateUnhandledException(object sender, Exception ex) - { - if (unhandlerException != null) - { - unhandlerException(sender, new ExceptionEventArgs(ex)); - } - } - - class Enumerated : IEnumerator { - private Promise promise; - private bool abortOnFail; - - public Enumerated(Promise promise, bool abortOnFail) { - this.promise = promise; - this.abortOnFail = abortOnFail; - } - - public bool MoveNext() { - if (abortOnFail && promise.CurState == PromiseState.Rejected) { - throw promise.rejectionException; - } - return promise.CurState == PromiseState.Pending; - } - - public void Reset() { } - - public object Current { get { return null; } } - } - - - public IEnumerator ToWaitFor(bool abortOnFail = false) { - var ret = new Enumerated(this, abortOnFail); - //someone will poll for completion, so act like we've been terminated - Done(() => {}, ex => {}); - return ret; - } - - } -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise/Promise_NonGeneric.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise/Promise_NonGeneric.cs.meta deleted file mode 100644 index 62397f7d..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Promise/Promise_NonGeneric.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 8c0ade0b4d4a8704baa1b214a700ed50 -timeCreated: 1479581013 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/StandaloneShutdown.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/StandaloneShutdown.cs deleted file mode 100644 index faf52a00..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/StandaloneShutdown.cs +++ /dev/null @@ -1,22 +0,0 @@ -using UnityEngine; - -namespace ZenFulcrum.EmbeddedBrowser { - -/** - * Hooks to ensure that zfb gets shut down on app (or playmode) exit. - * (This used to be used only for builds, but now that we can cleanly shut down the browser - * system after every playmode run it's used in the Editor too.) - */ -class StandaloneShutdown : MonoBehaviour { - public static void Create() { - var go = new GameObject("ZFB Shutdown"); - go.AddComponent(); - DontDestroyOnLoad(go); - } - - public void OnApplicationQuit() { - BrowserNative.UnloadNative(); - } -} - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/StandaloneShutdown.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/StandaloneShutdown.cs.meta deleted file mode 100644 index 4433afa7..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/StandaloneShutdown.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 88efef500fce2a24b96f9f6a661a15fb -timeCreated: 1449682818 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/StandaloneWebResources.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/StandaloneWebResources.cs deleted file mode 100644 index 71f0aed0..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/StandaloneWebResources.cs +++ /dev/null @@ -1,151 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.IO.Compression; -using System.Text; -using System.Threading; -using UnityEngine; -#if UNITY_2017_3_OR_NEWER -using UnityEngine.Networking; -#endif - -namespace ZenFulcrum.EmbeddedBrowser { - -/** - * Implements fetching BrowserAssets for standalone builds. - * - * During build, everything in BrowserAssets is packaged into a single file with the following format: - * brString {FileHeader} - * i32 numEntries - * {numEntries} IndexEntry objects - * data //The data section is a series of filedata chunks, as laid out in the index. - */ -public class StandaloneWebResources : WebResources { - public struct IndexEntry { - public string name; - public long offset; - public int length; - } - - private const string FileHeader = "zfbRes_v1"; - - protected Dictionary toc = new Dictionary(); - protected string dataFile; - - public StandaloneWebResources(string dataFile) { - this.dataFile = dataFile; - } - - public const string DefaultPath = "Resources/browser_assets"; - - public void LoadIndex() { - using (var data = new BinaryReader(File.OpenRead(dataFile))) { - var header = data.ReadString(); - if (header != FileHeader) throw new Exception("Invalid web resource file"); - - var num = data.ReadInt32(); - - for (int i = 0; i < num; ++i) { - var entry = new IndexEntry() { - name = data.ReadString(), - offset = data.ReadInt64(), - length = data.ReadInt32(), - }; - toc[entry.name] = entry; - } - } - } - - public override void HandleRequest(int id, string url) { - var parsedURL = new Uri(url); - - #if UNITY_2017_3_OR_NEWER - var path = UnityWebRequest.UnEscapeURL(parsedURL.AbsolutePath); - #else - var path = WWW.UnEscapeURL(parsedURL.AbsolutePath); - #endif - - IndexEntry entry; - if (!toc.TryGetValue(path, out entry)) { - SendError(id, "Not found", 404); - return; - } - - new Thread(() => { - try { - var ext = Path.GetExtension(entry.name); - if (ext.Length > 0) ext = ext.Substring(1); - - string mimeType; - if (!extensionMimeTypes.TryGetValue(ext, out mimeType)) { - mimeType = extensionMimeTypes["*"]; - } - - using (var file = File.OpenRead(dataFile)) { - var pre = new ResponsePreamble { - headers = null, - length = entry.length, - mimeType = mimeType, - statusCode = 200, - }; - SendPreamble(id, pre); - - file.Seek(entry.offset, SeekOrigin.Begin); - var data = new byte[entry.length]; - var readLen = file.Read(data, 0, entry.length); - if (readLen != data.Length) throw new Exception("Insufficient data for file"); - - SendData(id, data); - } - } catch (Exception ex) { - Debug.LogException(ex); - } - - }).Start(); - - } - - public void WriteData(Dictionary files) { - var entries = new Dictionary(); - - using (var file = File.OpenWrite(dataFile)) { - var writer = new BinaryWriter(file, Encoding.UTF8 /*, true (Mono too old)*/); - writer.Write(FileHeader); - writer.Write(files.Count); - - var tocStart = file.Position; - - foreach (var kvp in files) { - writer.Write(kvp.Key); - writer.Write(0L); - writer.Write(0); - } - //we'll come back and fill it in right later - - foreach (var kvp in files) { - var data = kvp.Value; - var entry = new IndexEntry { - name = kvp.Key, - length = kvp.Value.Length, - offset = file.Position, - }; - - writer.Write(data); - entries[kvp.Key] = entry; - } - - //now go back and write the correct data. - writer.Seek((int)tocStart, SeekOrigin.Begin); - - foreach (var kvp in files) { - var entry = entries[kvp.Key]; - writer.Write(kvp.Key); - writer.Write(entry.offset); - writer.Write(entry.length); - } - } - } - -} - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/StandaloneWebResources.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/StandaloneWebResources.cs.meta deleted file mode 100644 index 7ef5d50e..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/StandaloneWebResources.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 116a67bb616e372428beb4db63fa0591 -timeCreated: 1449617902 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/UserAgent.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/UserAgent.cs deleted file mode 100644 index 80ecd24d..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/UserAgent.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.Text.RegularExpressions; -using UnityEngine; - -namespace ZenFulcrum.EmbeddedBrowser { - -/** - * Cooks up the user agent to use for the browser. - * - * Ideally, we'd just say a little bit and let websites feature-detect, but many websites (sadly) - * still use UA sniffing to decide what version of the page to give us. - * - * Notably, **Google** does this (for example, maps.google.com), which I find rather strange considering - * that I'd expect them to be among those telling us to feature-detect. - * - * So, use this class to generate a pile of turd that looks like every other browser out there acting like - * every browser that came before it so we get the "real" version of pages when we browse. - */ -public class UserAgent { - - private static string agentOverride; - - /** - * Returns a user agent that, hopefully, tricks legacy, stupid, non-feature-detection websites - * into giving us their actual content. - * - * If you change this, the Editor will usually need to be restarted for changes to take effect. - */ - public static string GetUserAgent() { - if (agentOverride != null) return agentOverride; - - var chromeVersion = Marshal.PtrToStringAnsi(BrowserNative.zfb_getVersion()); - - //(Note: I don't care what version of the OS you have, we're telling the website you have this - //version so you get a good site.) - string osStr = "Windows NT 6.1"; -#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX - osStr = "Macintosh; Intel Mac OS X 10_7_0"; -#elif UNITY_EDITOR_LINUX || UNITY_STANDALONE_LINUX - osStr = "X11; Linux x86_64"; -#endif - - var userAgent = - "Mozilla/5.0 " + - "(" + osStr + "; Unity 3D; ZFBrowser 2.1.0; " + Application.productName + " " + Application.version + ") " + - "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/" + chromeVersion + " Safari/537.36" - ; - - //Chromium has issues with non-ASCII user agents. - userAgent = Regex.Replace(userAgent, @"[^\u0020-\u007E]", "?"); - - return userAgent; - } - - public static void SetUserAgent(string userAgent) { - if (BrowserNative.NativeLoaded) { - throw new InvalidOperationException("User Agent can only be changed before native backend is initialized."); - } - - agentOverride = userAgent; - } -} -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/UserAgent.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/UserAgent.cs.meta deleted file mode 100644 index 9853f2c8..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/UserAgent.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: fd7ecd3989cd6dd4e8cf983f4829d97f -timeCreated: 1456246764 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Util.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Util.cs deleted file mode 100644 index bedb2a99..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Util.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.Text; - -namespace ZenFulcrum.EmbeddedBrowser { - -public static class Util { - - /** - * Sometimes creating a culture in a different thread causes Mono to crash - * with mono_class_vtable_full. - * - * This variant of StartsWith won't try to use a culture. - */ - public static bool SafeStartsWith(this string check, string starter) { - if (check == null || starter == null) return false; - - if (check.Length < starter.Length) return false; - - for (int i = 0; i < starter.Length; ++i) { - if (check[i] != starter[i]) return false; - } - - return true; - } - - /// - /// Converts a UTF8-encoded null-terminated string to a CLR string. - /// - /// - /// - public static string PtrToStringUTF8(IntPtr strIn) { - if (strIn == IntPtr.Zero) return null; - int strLen = 0; - while (Marshal.ReadByte(strIn, strLen) != 0) ++strLen; - var buffer = new byte[strLen]; - Marshal.Copy(strIn, buffer, 0, strLen); - return Encoding.UTF8.GetString(buffer); - } -} - -public class JSException : Exception { - public JSException(string what) : base(what) {} -} - -public enum KeyAction { - Press, Release, PressAndRelease -} - -public class BrowserFocusState { - public bool hasKeyboardFocus; - public bool hasMouseFocus; - - public string focusedTagName; - public bool focusedNodeEditable; -} - -public class BrowserNavState { - public bool canGoForward, canGoBack, loading; - public string url = ""; -} - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Util.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/Util.cs.meta deleted file mode 100644 index aeb6fc53..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/Util.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 6b8101d35cb5dd149bd00dc81dff0262 -timeCreated: 1454553765 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/VR.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/VR.meta deleted file mode 100644 index 62594fb7..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/VR.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 700b927cab691a449bd94222d6724dab -folderAsset: yes -timeCreated: 1510959402 -licenseType: Store -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/VR/VRInput.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/VR/VRInput.cs deleted file mode 100644 index 74392659..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/VR/VRInput.cs +++ /dev/null @@ -1,279 +0,0 @@ -//#define OCULUS_SDK //<-- define this in your project settings if you have the OVR API -#if UNITY_2017_2_OR_NEWER - -using System; -using System.Collections.Generic; -using System.Text; -using UnityEngine; -using UnityEngine.XR; -using ZenFulcrum.VR.OpenVRBinding; - - -namespace ZenFulcrum.EmbeddedBrowser.VR { - -public enum InputAxis { - MainTrigger,//main index finger trigger - Grip,//Vive squeeze/Oculus hand trigger - JoypadX, JoypadY,//touchpad/joystick x/y position - Joypad,//touchpad/joystick click/press - Application,//application meanu/start button -} - -public enum JoyPadType { - None, - Joystick, - TouchPad, -} - - -/// -/// Unity's VR input system is sorely lacking in usefulness. -/// We can finally get pose data in a more-or-less straightforward manner (InputTracking.GetNodeStates, -/// state.TryGetPosition, etc.), but getting the axis and buttons is an awful mess. -/// -/// This page https://docs.unity3d.com/Manual/OpenVRControllers.html says we can access the inputs via -/// the input system! And, you can look at (of all things) the Joystick names to see which joystick -/// is a VR controller at runtime. But guess what? There's no Unity API to fetch the value of a given -/// axis on a given controller! Extra-stupid, right? You can define a specific input in the input menu, -/// but that doesn't help when you switch to a different computer and the joystick numbers change! -/// Short of defining an "input" for every possible controller * every axis you use, there's not a -/// way to get the controller axis inputs in a way that will work reliably across different machines. -/// -/// (We can fetch buttons manually via Input.GetKey(KeyCode.Joystick1Button0 + buttonId + joystickIdx * 20), -/// but this don't address the axis issue at all.) -/// -/// Anyway, this is a workaround. Around another Unity problem. Implemented by hooking into backend APIs directly. -/// -public class VRInput { - private static VRInput impl; - - public static void Init() { - if (impl == null) impl = GetImpl(); - } - - /// - /// Returns the state of the given button/axis. - /// - /// - /// - /// - public static float GetAxis(XRNodeState node, InputAxis axis) { - if (impl == null) impl = GetImpl(); - return impl.GetAxisValue(node, axis); - } - - /// - /// If the controller is capable, returns if (and sometimes how closely) the player is touching - /// the given control. - /// - /// - /// - /// - public static float GetTouch(XRNodeState node, InputAxis axis) { - if (impl == null) impl = GetImpl(); - return impl.GetTouchValue(node, axis); - } - - protected virtual float GetAxisValue(XRNodeState node, InputAxis axis) { - return 0; - } - - protected virtual float GetTouchValue(XRNodeState node, InputAxis axis) { - return 0; - } - - private static Dictionary nodeTypes = new Dictionary(); - public static JoyPadType GetJoypadType(XRNodeState node) { - JoyPadType ret; - if (!nodeTypes.TryGetValue(node.uniqueID, out ret)) { - ret = JoyPadType.None; - - if (impl == null) impl = GetImpl(); - var name = impl.GetNodeName(node); - - if (name.Contains("Oculus Touch Controller") || name.StartsWith("Oculus Rift CV1")) { - //OpenVR gives us "Oculus Rift CV1 (Left Controller)" etc. where I wish it would mention the type of controller (Touch) - ret = JoyPadType.Joystick; - } else if (name.StartsWith("Vive Controller")) { - ret = JoyPadType.TouchPad; - } else { - Debug.LogWarning("Unknown controller type: " + name); - } - - nodeTypes[node.uniqueID] = ret; - } - return ret; - } - - public virtual string GetNodeName(XRNodeState node) { - return InputTracking.GetNodeName(node.uniqueID); - } - - -// public virtual JoyPadType JoypadTypeValue(XRNodeState node) { return JoyPadType.None; } - - private static VRInput GetImpl() { - if (XRSettings.loadedDeviceName == "OpenVR") { - return new OpenVRInput(); - } else if (XRSettings.loadedDeviceName == "Oculus") { -#if OCULUS_SDK - return new OculusVRInput(); -#else - Debug.LogError("To use the Oculus API for input, import the Oculus SDK and define OCULUS_SDK"); - return new VRInput(); -#endif - - } else { - Debug.LogError("Unknown VR input system: " + XRSettings.loadedDeviceName); - return new VRInput(); - } - } -} - -class OpenVRInput : VRInput { - - protected VRControllerState_t lastState; - - public static string GetStringProperty(uint deviceId, ETrackedDeviceProperty prop) { - var buffer = new StringBuilder((int)OpenVR.k_unMaxPropertyStringSize); - ETrackedPropertyError err = ETrackedPropertyError.TrackedProp_Success; - - OpenVR.System.GetStringTrackedDeviceProperty( - deviceId, prop, - buffer, OpenVR.k_unMaxPropertyStringSize, ref err - ); - - if (err != ETrackedPropertyError.TrackedProp_Success) { - throw new Exception("Failed to get property " + prop + " on device " + deviceId + ": " + err); - } - - return buffer.ToString(); - } - - public override string GetNodeName(XRNodeState node) { - var deviceId = (uint)GetDeviceId(node); - - try { - return GetStringProperty(deviceId, ETrackedDeviceProperty.Prop_ModelNumber_String); - } catch (Exception ex) { - Debug.LogError("Failed to get device name for device " + deviceId + ": " + ex.Message); - return base.GetNodeName(node); - } - } - - - protected void ReadState(XRNodeState node) { - if (OpenVR.System == null) { - Debug.LogWarning("OpenVR not active"); - lastState = default(VRControllerState_t); - return; - } - - var controllerId = GetDeviceId(node); - if (controllerId < 0) { - lastState = default(VRControllerState_t); - return; - } - - //Debug.Log("Id is " + controllerId); - - var res = OpenVR.System.GetControllerState( - (uint)controllerId, ref lastState, - (uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(VRControllerState_t)) - ); - - if (!res) { - Debug.LogWarning("Failed to get controller state"); - } - } - - protected override float GetAxisValue(XRNodeState node, InputAxis axis) { - ReadState(node); - - switch (axis) { - case InputAxis.MainTrigger: - return lastState.rAxis1.x; - case InputAxis.Grip: - return (lastState.ulButtonPressed & (1ul << (int)EVRButtonId.k_EButton_Grip)) != 0 ? 1 : 0; - case InputAxis.JoypadX: - return lastState.rAxis0.x; - case InputAxis.JoypadY: - return lastState.rAxis0.y; - case InputAxis.Joypad: - return (lastState.ulButtonPressed & (1ul << (int)EVRButtonId.k_EButton_SteamVR_Touchpad)) != 0 ? 1 : 0; - case InputAxis.Application: - return (lastState.ulButtonPressed & (1ul << (int)EVRButtonId.k_EButton_ApplicationMenu)) != 0 ? 1 : 0; - default: - throw new ArgumentOutOfRangeException("axis", axis, null); - } - } - - protected override float GetTouchValue(XRNodeState node, InputAxis axis) { - ReadState(node); - - switch (axis) { - case InputAxis.Joypad: - return (lastState.ulButtonTouched & (1ul << (int)EVRButtonId.k_EButton_SteamVR_Touchpad)) != 0 ? 1 : 0; - default: - return 0; - } - } - - private int GetDeviceId(XRNodeState node) { - var targetRole = node.nodeType == XRNode.LeftHand ? ETrackedControllerRole.LeftHand : ETrackedControllerRole.RightHand; - for (uint i = 0; i < OpenVR.k_unMaxTrackedDeviceCount; i++) { - var role = OpenVR.System.GetControllerRoleForTrackedDeviceIndex(i); - if (role == targetRole) return (int)i; - } - - return -1; - } -} - -#if OCULUS_SDK -class OculusVRInput : VRInput { - - protected override float GetAxisValue(XRNodeState node, InputAxis axis) { - var controller = GetController(node); - OVRPlugin.ControllerState4 state = OVRPlugin.GetControllerState4((uint)controller); - - switch (axis) { - case InputAxis.MainTrigger: - return controller == OVRInput.Controller.LTouch ? state.LIndexTrigger : state.RIndexTrigger; - case InputAxis.Grip: - return controller == OVRInput.Controller.LTouch ? state.LHandTrigger : state.RHandTrigger; - case InputAxis.JoypadX: - case InputAxis.JoypadY: { - var joy = controller == OVRInput.Controller.LTouch ? state.LThumbstick : state.RThumbstick; - return axis == InputAxis.JoypadX ? joy.x : joy.y; - } - case InputAxis.Joypad: { - var buttonId = controller == OVRInput.Controller.LTouch ? 0x00000400 : 0x00000004; //see enum ovrButton_ in OVER_CAPI.h - return (state.Buttons & buttonId) != 0 ? 1 : 0; - } - default: - return 0; - } - } - - private OVRInput.Controller GetController(XRNodeState node) { - switch (node.nodeType) { - case XRNode.LeftHand: - return OVRInput.Controller.LTouch; - case XRNode.RightHand: - return OVRInput.Controller.RTouch; - default: - return OVRInput.Controller.None; - } - } - - protected override float GetTouchValue(XRNodeState node, InputAxis axis) { - //nothing touch-related is presently used for Oculus Touch controllers, so nothing is all we need here - return 0; - } -} -#endif - -} - -#endif \ No newline at end of file diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/VR/VRInput.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/VR/VRInput.cs.meta deleted file mode 100644 index d8324217..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/VR/VRInput.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 9a740e9fb5a3b4f49b1074b056b4f38d -timeCreated: 1510961690 -licenseType: Store -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/VR/openvr_api.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/VR/openvr_api.cs deleted file mode 100644 index 8cb8ab67..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/VR/openvr_api.cs +++ /dev/null @@ -1,5056 +0,0 @@ -//======= Copyright (c) Valve Corporation, All rights reserved. =============== -// -// Purpose: This file contains C#/managed code bindings for the OpenVR interfaces -// This file is auto-generated, do not edit it. -// -//============================================================================= -/* - * This is a modified version of - * https://github.com/ValveSoftware/openvr/blob/master/headers/openvr_api.cs - * The namespace has been changed to avoid potential conflicts. - */ - -using System; -using System.Runtime.InteropServices; - -namespace ZenFulcrum.VR.OpenVRBinding -{ - -[StructLayout(LayoutKind.Sequential)] -public struct IVRSystem -{ - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _GetRecommendedRenderTargetSize(ref uint pnWidth, ref uint pnHeight); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetRecommendedRenderTargetSize GetRecommendedRenderTargetSize; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate HmdMatrix44_t _GetProjectionMatrix(EVREye eEye, float fNearZ, float fFarZ); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetProjectionMatrix GetProjectionMatrix; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _GetProjectionRaw(EVREye eEye, ref float pfLeft, ref float pfRight, ref float pfTop, ref float pfBottom); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetProjectionRaw GetProjectionRaw; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _ComputeDistortion(EVREye eEye, float fU, float fV, ref DistortionCoordinates_t pDistortionCoordinates); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ComputeDistortion ComputeDistortion; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate HmdMatrix34_t _GetEyeToHeadTransform(EVREye eEye); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetEyeToHeadTransform GetEyeToHeadTransform; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetTimeSinceLastVsync(ref float pfSecondsSinceLastVsync, ref ulong pulFrameCounter); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetTimeSinceLastVsync GetTimeSinceLastVsync; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate int _GetD3D9AdapterIndex(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetD3D9AdapterIndex GetD3D9AdapterIndex; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _GetDXGIOutputInfo(ref int pnAdapterIndex); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetDXGIOutputInfo GetDXGIOutputInfo; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _GetOutputDevice(ref ulong pnDevice, ETextureType textureType, IntPtr pInstance); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOutputDevice GetOutputDevice; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _IsDisplayOnDesktop(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _IsDisplayOnDesktop IsDisplayOnDesktop; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _SetDisplayVisibility(bool bIsVisibleOnDesktop); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetDisplayVisibility SetDisplayVisibility; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _GetDeviceToAbsoluteTrackingPose(ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, [In, Out] TrackedDevicePose_t[] pTrackedDevicePoseArray, uint unTrackedDevicePoseArrayCount); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetDeviceToAbsoluteTrackingPose GetDeviceToAbsoluteTrackingPose; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _ResetSeatedZeroPose(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ResetSeatedZeroPose ResetSeatedZeroPose; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate HmdMatrix34_t _GetSeatedZeroPoseToStandingAbsoluteTrackingPose(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetSeatedZeroPoseToStandingAbsoluteTrackingPose GetSeatedZeroPoseToStandingAbsoluteTrackingPose; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate HmdMatrix34_t _GetRawZeroPoseToStandingAbsoluteTrackingPose(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetRawZeroPoseToStandingAbsoluteTrackingPose GetRawZeroPoseToStandingAbsoluteTrackingPose; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetSortedTrackedDeviceIndicesOfClass(ETrackedDeviceClass eTrackedDeviceClass, [In, Out] uint[] punTrackedDeviceIndexArray, uint unTrackedDeviceIndexArrayCount, uint unRelativeToTrackedDeviceIndex); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetSortedTrackedDeviceIndicesOfClass GetSortedTrackedDeviceIndicesOfClass; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EDeviceActivityLevel _GetTrackedDeviceActivityLevel(uint unDeviceId); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetTrackedDeviceActivityLevel GetTrackedDeviceActivityLevel; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _ApplyTransform(ref TrackedDevicePose_t pOutputPose, ref TrackedDevicePose_t pTrackedDevicePose, ref HmdMatrix34_t pTransform); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ApplyTransform ApplyTransform; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetTrackedDeviceIndexForControllerRole(ETrackedControllerRole unDeviceType); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetTrackedDeviceIndexForControllerRole GetTrackedDeviceIndexForControllerRole; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate ETrackedControllerRole _GetControllerRoleForTrackedDeviceIndex(uint unDeviceIndex); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetControllerRoleForTrackedDeviceIndex GetControllerRoleForTrackedDeviceIndex; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate ETrackedDeviceClass _GetTrackedDeviceClass(uint unDeviceIndex); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetTrackedDeviceClass GetTrackedDeviceClass; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _IsTrackedDeviceConnected(uint unDeviceIndex); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _IsTrackedDeviceConnected IsTrackedDeviceConnected; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetBoolTrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetBoolTrackedDeviceProperty GetBoolTrackedDeviceProperty; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate float _GetFloatTrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetFloatTrackedDeviceProperty GetFloatTrackedDeviceProperty; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate int _GetInt32TrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetInt32TrackedDeviceProperty GetInt32TrackedDeviceProperty; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate ulong _GetUint64TrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetUint64TrackedDeviceProperty GetUint64TrackedDeviceProperty; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate HmdMatrix34_t _GetMatrix34TrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetMatrix34TrackedDeviceProperty GetMatrix34TrackedDeviceProperty; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetStringTrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, System.Text.StringBuilder pchValue, uint unBufferSize, ref ETrackedPropertyError pError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetStringTrackedDeviceProperty GetStringTrackedDeviceProperty; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate IntPtr _GetPropErrorNameFromEnum(ETrackedPropertyError error); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetPropErrorNameFromEnum GetPropErrorNameFromEnum; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _PollNextEvent(ref VREvent_t pEvent, uint uncbVREvent); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _PollNextEvent PollNextEvent; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _PollNextEventWithPose(ETrackingUniverseOrigin eOrigin, ref VREvent_t pEvent, uint uncbVREvent, ref TrackedDevicePose_t pTrackedDevicePose); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _PollNextEventWithPose PollNextEventWithPose; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate IntPtr _GetEventTypeNameFromEnum(EVREventType eType); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetEventTypeNameFromEnum GetEventTypeNameFromEnum; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate HiddenAreaMesh_t _GetHiddenAreaMesh(EVREye eEye, EHiddenAreaMeshType type); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetHiddenAreaMesh GetHiddenAreaMesh; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetControllerState(uint unControllerDeviceIndex, ref VRControllerState_t pControllerState, uint unControllerStateSize); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetControllerState GetControllerState; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetControllerStateWithPose(ETrackingUniverseOrigin eOrigin, uint unControllerDeviceIndex, ref VRControllerState_t pControllerState, uint unControllerStateSize, ref TrackedDevicePose_t pTrackedDevicePose); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetControllerStateWithPose GetControllerStateWithPose; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _TriggerHapticPulse(uint unControllerDeviceIndex, uint unAxisId, char usDurationMicroSec); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _TriggerHapticPulse TriggerHapticPulse; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate IntPtr _GetButtonIdNameFromEnum(EVRButtonId eButtonId); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetButtonIdNameFromEnum GetButtonIdNameFromEnum; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate IntPtr _GetControllerAxisTypeNameFromEnum(EVRControllerAxisType eAxisType); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetControllerAxisTypeNameFromEnum GetControllerAxisTypeNameFromEnum; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _CaptureInputFocus(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _CaptureInputFocus CaptureInputFocus; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _ReleaseInputFocus(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ReleaseInputFocus ReleaseInputFocus; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _IsInputFocusCapturedByAnotherProcess(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _IsInputFocusCapturedByAnotherProcess IsInputFocusCapturedByAnotherProcess; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _DriverDebugRequest(uint unDeviceIndex, string pchRequest, string pchResponseBuffer, uint unResponseBufferSize); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _DriverDebugRequest DriverDebugRequest; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRFirmwareError _PerformFirmwareUpdate(uint unDeviceIndex); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _PerformFirmwareUpdate PerformFirmwareUpdate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _AcknowledgeQuit_Exiting(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _AcknowledgeQuit_Exiting AcknowledgeQuit_Exiting; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _AcknowledgeQuit_UserPrompt(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _AcknowledgeQuit_UserPrompt AcknowledgeQuit_UserPrompt; - -} - -[StructLayout(LayoutKind.Sequential)] -public struct IVRExtendedDisplay -{ - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _GetWindowBounds(ref int pnX, ref int pnY, ref uint pnWidth, ref uint pnHeight); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetWindowBounds GetWindowBounds; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _GetEyeOutputViewport(EVREye eEye, ref uint pnX, ref uint pnY, ref uint pnWidth, ref uint pnHeight); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetEyeOutputViewport GetEyeOutputViewport; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _GetDXGIOutputInfo(ref int pnAdapterIndex, ref int pnAdapterOutputIndex); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetDXGIOutputInfo GetDXGIOutputInfo; - -} - -[StructLayout(LayoutKind.Sequential)] -public struct IVRTrackedCamera -{ - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate IntPtr _GetCameraErrorNameFromEnum(EVRTrackedCameraError eCameraError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetCameraErrorNameFromEnum GetCameraErrorNameFromEnum; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRTrackedCameraError _HasCamera(uint nDeviceIndex, ref bool pHasCamera); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _HasCamera HasCamera; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRTrackedCameraError _GetCameraFrameSize(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref uint pnWidth, ref uint pnHeight, ref uint pnFrameBufferSize); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetCameraFrameSize GetCameraFrameSize; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRTrackedCameraError _GetCameraIntrinsics(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref HmdVector2_t pFocalLength, ref HmdVector2_t pCenter); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetCameraIntrinsics GetCameraIntrinsics; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRTrackedCameraError _GetCameraProjection(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, ref HmdMatrix44_t pProjection); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetCameraProjection GetCameraProjection; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRTrackedCameraError _AcquireVideoStreamingService(uint nDeviceIndex, ref ulong pHandle); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _AcquireVideoStreamingService AcquireVideoStreamingService; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRTrackedCameraError _ReleaseVideoStreamingService(ulong hTrackedCamera); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ReleaseVideoStreamingService ReleaseVideoStreamingService; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRTrackedCameraError _GetVideoStreamFrameBuffer(ulong hTrackedCamera, EVRTrackedCameraFrameType eFrameType, IntPtr pFrameBuffer, uint nFrameBufferSize, ref CameraVideoStreamFrameHeader_t pFrameHeader, uint nFrameHeaderSize); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetVideoStreamFrameBuffer GetVideoStreamFrameBuffer; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRTrackedCameraError _GetVideoStreamTextureSize(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref VRTextureBounds_t pTextureBounds, ref uint pnWidth, ref uint pnHeight); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetVideoStreamTextureSize GetVideoStreamTextureSize; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRTrackedCameraError _GetVideoStreamTextureD3D11(ulong hTrackedCamera, EVRTrackedCameraFrameType eFrameType, IntPtr pD3D11DeviceOrResource, ref IntPtr ppD3D11ShaderResourceView, ref CameraVideoStreamFrameHeader_t pFrameHeader, uint nFrameHeaderSize); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetVideoStreamTextureD3D11 GetVideoStreamTextureD3D11; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRTrackedCameraError _GetVideoStreamTextureGL(ulong hTrackedCamera, EVRTrackedCameraFrameType eFrameType, ref uint pglTextureId, ref CameraVideoStreamFrameHeader_t pFrameHeader, uint nFrameHeaderSize); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetVideoStreamTextureGL GetVideoStreamTextureGL; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRTrackedCameraError _ReleaseVideoStreamTextureGL(ulong hTrackedCamera, uint glTextureId); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ReleaseVideoStreamTextureGL ReleaseVideoStreamTextureGL; - -} - -[StructLayout(LayoutKind.Sequential)] -public struct IVRApplications -{ - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRApplicationError _AddApplicationManifest(string pchApplicationManifestFullPath, bool bTemporary); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _AddApplicationManifest AddApplicationManifest; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRApplicationError _RemoveApplicationManifest(string pchApplicationManifestFullPath); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _RemoveApplicationManifest RemoveApplicationManifest; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _IsApplicationInstalled(string pchAppKey); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _IsApplicationInstalled IsApplicationInstalled; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetApplicationCount(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetApplicationCount GetApplicationCount; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRApplicationError _GetApplicationKeyByIndex(uint unApplicationIndex, System.Text.StringBuilder pchAppKeyBuffer, uint unAppKeyBufferLen); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetApplicationKeyByIndex GetApplicationKeyByIndex; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRApplicationError _GetApplicationKeyByProcessId(uint unProcessId, string pchAppKeyBuffer, uint unAppKeyBufferLen); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetApplicationKeyByProcessId GetApplicationKeyByProcessId; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRApplicationError _LaunchApplication(string pchAppKey); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _LaunchApplication LaunchApplication; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRApplicationError _LaunchTemplateApplication(string pchTemplateAppKey, string pchNewAppKey, [In, Out] AppOverrideKeys_t[] pKeys, uint unKeys); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _LaunchTemplateApplication LaunchTemplateApplication; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRApplicationError _LaunchApplicationFromMimeType(string pchMimeType, string pchArgs); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _LaunchApplicationFromMimeType LaunchApplicationFromMimeType; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRApplicationError _LaunchDashboardOverlay(string pchAppKey); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _LaunchDashboardOverlay LaunchDashboardOverlay; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _CancelApplicationLaunch(string pchAppKey); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _CancelApplicationLaunch CancelApplicationLaunch; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRApplicationError _IdentifyApplication(uint unProcessId, string pchAppKey); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _IdentifyApplication IdentifyApplication; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetApplicationProcessId(string pchAppKey); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetApplicationProcessId GetApplicationProcessId; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate IntPtr _GetApplicationsErrorNameFromEnum(EVRApplicationError error); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetApplicationsErrorNameFromEnum GetApplicationsErrorNameFromEnum; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetApplicationPropertyString(string pchAppKey, EVRApplicationProperty eProperty, System.Text.StringBuilder pchPropertyValueBuffer, uint unPropertyValueBufferLen, ref EVRApplicationError peError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetApplicationPropertyString GetApplicationPropertyString; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetApplicationPropertyBool(string pchAppKey, EVRApplicationProperty eProperty, ref EVRApplicationError peError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetApplicationPropertyBool GetApplicationPropertyBool; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate ulong _GetApplicationPropertyUint64(string pchAppKey, EVRApplicationProperty eProperty, ref EVRApplicationError peError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetApplicationPropertyUint64 GetApplicationPropertyUint64; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRApplicationError _SetApplicationAutoLaunch(string pchAppKey, bool bAutoLaunch); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetApplicationAutoLaunch SetApplicationAutoLaunch; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetApplicationAutoLaunch(string pchAppKey); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetApplicationAutoLaunch GetApplicationAutoLaunch; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRApplicationError _SetDefaultApplicationForMimeType(string pchAppKey, string pchMimeType); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetDefaultApplicationForMimeType SetDefaultApplicationForMimeType; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetDefaultApplicationForMimeType(string pchMimeType, string pchAppKeyBuffer, uint unAppKeyBufferLen); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetDefaultApplicationForMimeType GetDefaultApplicationForMimeType; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetApplicationSupportedMimeTypes(string pchAppKey, string pchMimeTypesBuffer, uint unMimeTypesBuffer); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetApplicationSupportedMimeTypes GetApplicationSupportedMimeTypes; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetApplicationsThatSupportMimeType(string pchMimeType, string pchAppKeysThatSupportBuffer, uint unAppKeysThatSupportBuffer); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetApplicationsThatSupportMimeType GetApplicationsThatSupportMimeType; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetApplicationLaunchArguments(uint unHandle, string pchArgs, uint unArgs); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetApplicationLaunchArguments GetApplicationLaunchArguments; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRApplicationError _GetStartingApplication(string pchAppKeyBuffer, uint unAppKeyBufferLen); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetStartingApplication GetStartingApplication; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRApplicationTransitionState _GetTransitionState(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetTransitionState GetTransitionState; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRApplicationError _PerformApplicationPrelaunchCheck(string pchAppKey); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _PerformApplicationPrelaunchCheck PerformApplicationPrelaunchCheck; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate IntPtr _GetApplicationsTransitionStateNameFromEnum(EVRApplicationTransitionState state); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetApplicationsTransitionStateNameFromEnum GetApplicationsTransitionStateNameFromEnum; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _IsQuitUserPromptRequested(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _IsQuitUserPromptRequested IsQuitUserPromptRequested; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRApplicationError _LaunchInternalProcess(string pchBinaryPath, string pchArguments, string pchWorkingDirectory); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _LaunchInternalProcess LaunchInternalProcess; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetCurrentSceneProcessId(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetCurrentSceneProcessId GetCurrentSceneProcessId; - -} - -[StructLayout(LayoutKind.Sequential)] -public struct IVRChaperone -{ - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate ChaperoneCalibrationState _GetCalibrationState(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetCalibrationState GetCalibrationState; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetPlayAreaSize(ref float pSizeX, ref float pSizeZ); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetPlayAreaSize GetPlayAreaSize; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetPlayAreaRect(ref HmdQuad_t rect); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetPlayAreaRect GetPlayAreaRect; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _ReloadInfo(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ReloadInfo ReloadInfo; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _SetSceneColor(HmdColor_t color); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetSceneColor SetSceneColor; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _GetBoundsColor(ref HmdColor_t pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, ref HmdColor_t pOutputCameraColor); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetBoundsColor GetBoundsColor; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _AreBoundsVisible(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _AreBoundsVisible AreBoundsVisible; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _ForceBoundsVisible(bool bForce); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ForceBoundsVisible ForceBoundsVisible; - -} - -[StructLayout(LayoutKind.Sequential)] -public struct IVRChaperoneSetup -{ - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _CommitWorkingCopy(EChaperoneConfigFile configFile); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _CommitWorkingCopy CommitWorkingCopy; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _RevertWorkingCopy(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _RevertWorkingCopy RevertWorkingCopy; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetWorkingPlayAreaSize(ref float pSizeX, ref float pSizeZ); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetWorkingPlayAreaSize GetWorkingPlayAreaSize; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetWorkingPlayAreaRect(ref HmdQuad_t rect); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetWorkingPlayAreaRect GetWorkingPlayAreaRect; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetWorkingCollisionBoundsInfo([In, Out] HmdQuad_t[] pQuadsBuffer, ref uint punQuadsCount); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetWorkingCollisionBoundsInfo GetWorkingCollisionBoundsInfo; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetLiveCollisionBoundsInfo([In, Out] HmdQuad_t[] pQuadsBuffer, ref uint punQuadsCount); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetLiveCollisionBoundsInfo GetLiveCollisionBoundsInfo; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetWorkingSeatedZeroPoseToRawTrackingPose GetWorkingSeatedZeroPoseToRawTrackingPose; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetWorkingStandingZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatStandingZeroPoseToRawTrackingPose); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetWorkingStandingZeroPoseToRawTrackingPose GetWorkingStandingZeroPoseToRawTrackingPose; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _SetWorkingPlayAreaSize(float sizeX, float sizeZ); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetWorkingPlayAreaSize SetWorkingPlayAreaSize; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _SetWorkingCollisionBoundsInfo([In, Out] HmdQuad_t[] pQuadsBuffer, uint unQuadsCount); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetWorkingCollisionBoundsInfo SetWorkingCollisionBoundsInfo; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _SetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pMatSeatedZeroPoseToRawTrackingPose); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetWorkingSeatedZeroPoseToRawTrackingPose SetWorkingSeatedZeroPoseToRawTrackingPose; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _SetWorkingStandingZeroPoseToRawTrackingPose(ref HmdMatrix34_t pMatStandingZeroPoseToRawTrackingPose); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetWorkingStandingZeroPoseToRawTrackingPose SetWorkingStandingZeroPoseToRawTrackingPose; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _ReloadFromDisk(EChaperoneConfigFile configFile); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ReloadFromDisk ReloadFromDisk; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetLiveSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetLiveSeatedZeroPoseToRawTrackingPose GetLiveSeatedZeroPoseToRawTrackingPose; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _SetWorkingCollisionBoundsTagsInfo([In, Out] byte[] pTagsBuffer, uint unTagCount); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetWorkingCollisionBoundsTagsInfo SetWorkingCollisionBoundsTagsInfo; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetLiveCollisionBoundsTagsInfo([In, Out] byte[] pTagsBuffer, ref uint punTagCount); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetLiveCollisionBoundsTagsInfo GetLiveCollisionBoundsTagsInfo; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _SetWorkingPhysicalBoundsInfo([In, Out] HmdQuad_t[] pQuadsBuffer, uint unQuadsCount); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetWorkingPhysicalBoundsInfo SetWorkingPhysicalBoundsInfo; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetLivePhysicalBoundsInfo([In, Out] HmdQuad_t[] pQuadsBuffer, ref uint punQuadsCount); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetLivePhysicalBoundsInfo GetLivePhysicalBoundsInfo; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _ExportLiveToBuffer(System.Text.StringBuilder pBuffer, ref uint pnBufferLength); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ExportLiveToBuffer ExportLiveToBuffer; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _ImportFromBufferToWorking(string pBuffer, uint nImportFlags); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ImportFromBufferToWorking ImportFromBufferToWorking; - -} - -[StructLayout(LayoutKind.Sequential)] -public struct IVRCompositor -{ - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _SetTrackingSpace(ETrackingUniverseOrigin eOrigin); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetTrackingSpace SetTrackingSpace; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate ETrackingUniverseOrigin _GetTrackingSpace(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetTrackingSpace GetTrackingSpace; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRCompositorError _WaitGetPoses([In, Out] TrackedDevicePose_t[] pRenderPoseArray, uint unRenderPoseArrayCount, [In, Out] TrackedDevicePose_t[] pGamePoseArray, uint unGamePoseArrayCount); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _WaitGetPoses WaitGetPoses; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRCompositorError _GetLastPoses([In, Out] TrackedDevicePose_t[] pRenderPoseArray, uint unRenderPoseArrayCount, [In, Out] TrackedDevicePose_t[] pGamePoseArray, uint unGamePoseArrayCount); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetLastPoses GetLastPoses; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRCompositorError _GetLastPoseForTrackedDeviceIndex(uint unDeviceIndex, ref TrackedDevicePose_t pOutputPose, ref TrackedDevicePose_t pOutputGamePose); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetLastPoseForTrackedDeviceIndex GetLastPoseForTrackedDeviceIndex; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRCompositorError _Submit(EVREye eEye, ref Texture_t pTexture, ref VRTextureBounds_t pBounds, EVRSubmitFlags nSubmitFlags); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _Submit Submit; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _ClearLastSubmittedFrame(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ClearLastSubmittedFrame ClearLastSubmittedFrame; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _PostPresentHandoff(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _PostPresentHandoff PostPresentHandoff; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetFrameTiming(ref Compositor_FrameTiming pTiming, uint unFramesAgo); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetFrameTiming GetFrameTiming; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetFrameTimings(ref Compositor_FrameTiming pTiming, uint nFrames); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetFrameTimings GetFrameTimings; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate float _GetFrameTimeRemaining(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetFrameTimeRemaining GetFrameTimeRemaining; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _GetCumulativeStats(ref Compositor_CumulativeStats pStats, uint nStatsSizeInBytes); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetCumulativeStats GetCumulativeStats; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _FadeToColor(float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _FadeToColor FadeToColor; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate HmdColor_t _GetCurrentFadeColor(bool bBackground); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetCurrentFadeColor GetCurrentFadeColor; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _FadeGrid(float fSeconds, bool bFadeIn); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _FadeGrid FadeGrid; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate float _GetCurrentGridAlpha(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetCurrentGridAlpha GetCurrentGridAlpha; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRCompositorError _SetSkyboxOverride([In, Out] Texture_t[] pTextures, uint unTextureCount); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetSkyboxOverride SetSkyboxOverride; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _ClearSkyboxOverride(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ClearSkyboxOverride ClearSkyboxOverride; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _CompositorBringToFront(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _CompositorBringToFront CompositorBringToFront; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _CompositorGoToBack(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _CompositorGoToBack CompositorGoToBack; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _CompositorQuit(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _CompositorQuit CompositorQuit; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _IsFullscreen(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _IsFullscreen IsFullscreen; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetCurrentSceneFocusProcess(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetCurrentSceneFocusProcess GetCurrentSceneFocusProcess; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetLastFrameRenderer(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetLastFrameRenderer GetLastFrameRenderer; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _CanRenderScene(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _CanRenderScene CanRenderScene; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _ShowMirrorWindow(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ShowMirrorWindow ShowMirrorWindow; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _HideMirrorWindow(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _HideMirrorWindow HideMirrorWindow; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _IsMirrorWindowVisible(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _IsMirrorWindowVisible IsMirrorWindowVisible; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _CompositorDumpImages(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _CompositorDumpImages CompositorDumpImages; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _ShouldAppRenderWithLowResources(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ShouldAppRenderWithLowResources ShouldAppRenderWithLowResources; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _ForceInterleavedReprojectionOn(bool bOverride); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ForceInterleavedReprojectionOn ForceInterleavedReprojectionOn; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _ForceReconnectProcess(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ForceReconnectProcess ForceReconnectProcess; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _SuspendRendering(bool bSuspend); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SuspendRendering SuspendRendering; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRCompositorError _GetMirrorTextureD3D11(EVREye eEye, IntPtr pD3D11DeviceOrResource, ref IntPtr ppD3D11ShaderResourceView); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetMirrorTextureD3D11 GetMirrorTextureD3D11; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _ReleaseMirrorTextureD3D11(IntPtr pD3D11ShaderResourceView); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ReleaseMirrorTextureD3D11 ReleaseMirrorTextureD3D11; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRCompositorError _GetMirrorTextureGL(EVREye eEye, ref uint pglTextureId, IntPtr pglSharedTextureHandle); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetMirrorTextureGL GetMirrorTextureGL; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _ReleaseSharedGLTexture(uint glTextureId, IntPtr glSharedTextureHandle); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ReleaseSharedGLTexture ReleaseSharedGLTexture; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _LockGLSharedTextureForAccess(IntPtr glSharedTextureHandle); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _LockGLSharedTextureForAccess LockGLSharedTextureForAccess; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _UnlockGLSharedTextureForAccess(IntPtr glSharedTextureHandle); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _UnlockGLSharedTextureForAccess UnlockGLSharedTextureForAccess; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetVulkanInstanceExtensionsRequired(System.Text.StringBuilder pchValue, uint unBufferSize); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetVulkanInstanceExtensionsRequired GetVulkanInstanceExtensionsRequired; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetVulkanDeviceExtensionsRequired(IntPtr pPhysicalDevice, System.Text.StringBuilder pchValue, uint unBufferSize); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetVulkanDeviceExtensionsRequired GetVulkanDeviceExtensionsRequired; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _SetExplicitTimingMode(bool bExplicitTimingMode); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetExplicitTimingMode SetExplicitTimingMode; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRCompositorError _SubmitExplicitTimingData(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SubmitExplicitTimingData SubmitExplicitTimingData; - -} - -[StructLayout(LayoutKind.Sequential)] -public struct IVROverlay -{ - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _FindOverlay(string pchOverlayKey, ref ulong pOverlayHandle); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _FindOverlay FindOverlay; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _CreateOverlay(string pchOverlayKey, string pchOverlayName, ref ulong pOverlayHandle); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _CreateOverlay CreateOverlay; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _DestroyOverlay(ulong ulOverlayHandle); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _DestroyOverlay DestroyOverlay; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetHighQualityOverlay(ulong ulOverlayHandle); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetHighQualityOverlay SetHighQualityOverlay; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate ulong _GetHighQualityOverlay(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetHighQualityOverlay GetHighQualityOverlay; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetOverlayKey(ulong ulOverlayHandle, System.Text.StringBuilder pchValue, uint unBufferSize, ref EVROverlayError pError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayKey GetOverlayKey; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetOverlayName(ulong ulOverlayHandle, System.Text.StringBuilder pchValue, uint unBufferSize, ref EVROverlayError pError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayName GetOverlayName; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayName(ulong ulOverlayHandle, string pchName); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayName SetOverlayName; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetOverlayImageData(ulong ulOverlayHandle, IntPtr pvBuffer, uint unBufferSize, ref uint punWidth, ref uint punHeight); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayImageData GetOverlayImageData; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate IntPtr _GetOverlayErrorNameFromEnum(EVROverlayError error); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayErrorNameFromEnum GetOverlayErrorNameFromEnum; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayRenderingPid(ulong ulOverlayHandle, uint unPID); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayRenderingPid SetOverlayRenderingPid; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetOverlayRenderingPid(ulong ulOverlayHandle); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayRenderingPid GetOverlayRenderingPid; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayFlag(ulong ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayFlag SetOverlayFlag; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetOverlayFlag(ulong ulOverlayHandle, VROverlayFlags eOverlayFlag, ref bool pbEnabled); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayFlag GetOverlayFlag; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayColor(ulong ulOverlayHandle, float fRed, float fGreen, float fBlue); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayColor SetOverlayColor; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetOverlayColor(ulong ulOverlayHandle, ref float pfRed, ref float pfGreen, ref float pfBlue); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayColor GetOverlayColor; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayAlpha(ulong ulOverlayHandle, float fAlpha); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayAlpha SetOverlayAlpha; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetOverlayAlpha(ulong ulOverlayHandle, ref float pfAlpha); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayAlpha GetOverlayAlpha; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayTexelAspect(ulong ulOverlayHandle, float fTexelAspect); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayTexelAspect SetOverlayTexelAspect; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetOverlayTexelAspect(ulong ulOverlayHandle, ref float pfTexelAspect); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayTexelAspect GetOverlayTexelAspect; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlaySortOrder(ulong ulOverlayHandle, uint unSortOrder); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlaySortOrder SetOverlaySortOrder; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetOverlaySortOrder(ulong ulOverlayHandle, ref uint punSortOrder); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlaySortOrder GetOverlaySortOrder; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayWidthInMeters(ulong ulOverlayHandle, float fWidthInMeters); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayWidthInMeters SetOverlayWidthInMeters; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetOverlayWidthInMeters(ulong ulOverlayHandle, ref float pfWidthInMeters); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayWidthInMeters GetOverlayWidthInMeters; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayAutoCurveDistanceRangeInMeters(ulong ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayAutoCurveDistanceRangeInMeters SetOverlayAutoCurveDistanceRangeInMeters; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetOverlayAutoCurveDistanceRangeInMeters(ulong ulOverlayHandle, ref float pfMinDistanceInMeters, ref float pfMaxDistanceInMeters); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayAutoCurveDistanceRangeInMeters GetOverlayAutoCurveDistanceRangeInMeters; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayTextureColorSpace(ulong ulOverlayHandle, EColorSpace eTextureColorSpace); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayTextureColorSpace SetOverlayTextureColorSpace; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetOverlayTextureColorSpace(ulong ulOverlayHandle, ref EColorSpace peTextureColorSpace); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayTextureColorSpace GetOverlayTextureColorSpace; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayTextureBounds(ulong ulOverlayHandle, ref VRTextureBounds_t pOverlayTextureBounds); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayTextureBounds SetOverlayTextureBounds; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetOverlayTextureBounds(ulong ulOverlayHandle, ref VRTextureBounds_t pOverlayTextureBounds); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayTextureBounds GetOverlayTextureBounds; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetOverlayRenderModel(ulong ulOverlayHandle, string pchValue, uint unBufferSize, ref HmdColor_t pColor, ref EVROverlayError pError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayRenderModel GetOverlayRenderModel; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayRenderModel(ulong ulOverlayHandle, string pchRenderModel, ref HmdColor_t pColor); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayRenderModel SetOverlayRenderModel; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetOverlayTransformType(ulong ulOverlayHandle, ref VROverlayTransformType peTransformType); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayTransformType GetOverlayTransformType; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayTransformAbsolute(ulong ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayTransformAbsolute SetOverlayTransformAbsolute; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetOverlayTransformAbsolute(ulong ulOverlayHandle, ref ETrackingUniverseOrigin peTrackingOrigin, ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayTransformAbsolute GetOverlayTransformAbsolute; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayTransformTrackedDeviceRelative(ulong ulOverlayHandle, uint unTrackedDevice, ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayTransformTrackedDeviceRelative SetOverlayTransformTrackedDeviceRelative; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetOverlayTransformTrackedDeviceRelative(ulong ulOverlayHandle, ref uint punTrackedDevice, ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayTransformTrackedDeviceRelative GetOverlayTransformTrackedDeviceRelative; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayTransformTrackedDeviceComponent(ulong ulOverlayHandle, uint unDeviceIndex, string pchComponentName); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayTransformTrackedDeviceComponent SetOverlayTransformTrackedDeviceComponent; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetOverlayTransformTrackedDeviceComponent(ulong ulOverlayHandle, ref uint punDeviceIndex, string pchComponentName, uint unComponentNameSize); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayTransformTrackedDeviceComponent GetOverlayTransformTrackedDeviceComponent; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetOverlayTransformOverlayRelative(ulong ulOverlayHandle, ref ulong ulOverlayHandleParent, ref HmdMatrix34_t pmatParentOverlayToOverlayTransform); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayTransformOverlayRelative GetOverlayTransformOverlayRelative; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayTransformOverlayRelative(ulong ulOverlayHandle, ulong ulOverlayHandleParent, ref HmdMatrix34_t pmatParentOverlayToOverlayTransform); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayTransformOverlayRelative SetOverlayTransformOverlayRelative; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _ShowOverlay(ulong ulOverlayHandle); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ShowOverlay ShowOverlay; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _HideOverlay(ulong ulOverlayHandle); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _HideOverlay HideOverlay; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _IsOverlayVisible(ulong ulOverlayHandle); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _IsOverlayVisible IsOverlayVisible; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetTransformForOverlayCoordinates(ulong ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, ref HmdMatrix34_t pmatTransform); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetTransformForOverlayCoordinates GetTransformForOverlayCoordinates; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _PollNextOverlayEvent(ulong ulOverlayHandle, ref VREvent_t pEvent, uint uncbVREvent); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _PollNextOverlayEvent PollNextOverlayEvent; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetOverlayInputMethod(ulong ulOverlayHandle, ref VROverlayInputMethod peInputMethod); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayInputMethod GetOverlayInputMethod; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayInputMethod(ulong ulOverlayHandle, VROverlayInputMethod eInputMethod); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayInputMethod SetOverlayInputMethod; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetOverlayMouseScale(ulong ulOverlayHandle, ref HmdVector2_t pvecMouseScale); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayMouseScale GetOverlayMouseScale; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayMouseScale(ulong ulOverlayHandle, ref HmdVector2_t pvecMouseScale); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayMouseScale SetOverlayMouseScale; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _ComputeOverlayIntersection(ulong ulOverlayHandle, ref VROverlayIntersectionParams_t pParams, ref VROverlayIntersectionResults_t pResults); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ComputeOverlayIntersection ComputeOverlayIntersection; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _HandleControllerOverlayInteractionAsMouse(ulong ulOverlayHandle, uint unControllerDeviceIndex); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _HandleControllerOverlayInteractionAsMouse HandleControllerOverlayInteractionAsMouse; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _IsHoverTargetOverlay(ulong ulOverlayHandle); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _IsHoverTargetOverlay IsHoverTargetOverlay; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate ulong _GetGamepadFocusOverlay(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetGamepadFocusOverlay GetGamepadFocusOverlay; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetGamepadFocusOverlay(ulong ulNewFocusOverlay); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetGamepadFocusOverlay SetGamepadFocusOverlay; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayNeighbor(EOverlayDirection eDirection, ulong ulFrom, ulong ulTo); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayNeighbor SetOverlayNeighbor; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _MoveGamepadFocusToNeighbor(EOverlayDirection eDirection, ulong ulFrom); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _MoveGamepadFocusToNeighbor MoveGamepadFocusToNeighbor; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayTexture(ulong ulOverlayHandle, ref Texture_t pTexture); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayTexture SetOverlayTexture; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _ClearOverlayTexture(ulong ulOverlayHandle); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ClearOverlayTexture ClearOverlayTexture; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayRaw(ulong ulOverlayHandle, IntPtr pvBuffer, uint unWidth, uint unHeight, uint unDepth); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayRaw SetOverlayRaw; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayFromFile(ulong ulOverlayHandle, string pchFilePath); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayFromFile SetOverlayFromFile; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetOverlayTexture(ulong ulOverlayHandle, ref IntPtr pNativeTextureHandle, IntPtr pNativeTextureRef, ref uint pWidth, ref uint pHeight, ref uint pNativeFormat, ref ETextureType pAPIType, ref EColorSpace pColorSpace, ref VRTextureBounds_t pTextureBounds); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayTexture GetOverlayTexture; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _ReleaseNativeOverlayHandle(ulong ulOverlayHandle, IntPtr pNativeTextureHandle); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ReleaseNativeOverlayHandle ReleaseNativeOverlayHandle; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetOverlayTextureSize(ulong ulOverlayHandle, ref uint pWidth, ref uint pHeight); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayTextureSize GetOverlayTextureSize; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _CreateDashboardOverlay(string pchOverlayKey, string pchOverlayFriendlyName, ref ulong pMainHandle, ref ulong pThumbnailHandle); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _CreateDashboardOverlay CreateDashboardOverlay; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _IsDashboardVisible(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _IsDashboardVisible IsDashboardVisible; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _IsActiveDashboardOverlay(ulong ulOverlayHandle); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _IsActiveDashboardOverlay IsActiveDashboardOverlay; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetDashboardOverlaySceneProcess(ulong ulOverlayHandle, uint unProcessId); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetDashboardOverlaySceneProcess SetDashboardOverlaySceneProcess; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetDashboardOverlaySceneProcess(ulong ulOverlayHandle, ref uint punProcessId); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetDashboardOverlaySceneProcess GetDashboardOverlaySceneProcess; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _ShowDashboard(string pchOverlayToShow); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ShowDashboard ShowDashboard; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetPrimaryDashboardDevice(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetPrimaryDashboardDevice GetPrimaryDashboardDevice; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _ShowKeyboard(int eInputMode, int eLineInputMode, string pchDescription, uint unCharMax, string pchExistingText, bool bUseMinimalMode, ulong uUserValue); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ShowKeyboard ShowKeyboard; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _ShowKeyboardForOverlay(ulong ulOverlayHandle, int eInputMode, int eLineInputMode, string pchDescription, uint unCharMax, string pchExistingText, bool bUseMinimalMode, ulong uUserValue); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ShowKeyboardForOverlay ShowKeyboardForOverlay; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetKeyboardText(System.Text.StringBuilder pchText, uint cchText); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetKeyboardText GetKeyboardText; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _HideKeyboard(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _HideKeyboard HideKeyboard; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _SetKeyboardTransformAbsolute(ETrackingUniverseOrigin eTrackingOrigin, ref HmdMatrix34_t pmatTrackingOriginToKeyboardTransform); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetKeyboardTransformAbsolute SetKeyboardTransformAbsolute; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _SetKeyboardPositionForOverlay(ulong ulOverlayHandle, HmdRect2_t avoidRect); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetKeyboardPositionForOverlay SetKeyboardPositionForOverlay; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayIntersectionMask(ulong ulOverlayHandle, ref VROverlayIntersectionMaskPrimitive_t pMaskPrimitives, uint unNumMaskPrimitives, uint unPrimitiveSize); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetOverlayIntersectionMask SetOverlayIntersectionMask; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetOverlayFlags(ulong ulOverlayHandle, ref uint pFlags); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetOverlayFlags GetOverlayFlags; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate VRMessageOverlayResponse _ShowMessageOverlay(string pchText, string pchCaption, string pchButton0Text, string pchButton1Text, string pchButton2Text, string pchButton3Text); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _ShowMessageOverlay ShowMessageOverlay; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _CloseMessageOverlay(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _CloseMessageOverlay CloseMessageOverlay; - -} - -[StructLayout(LayoutKind.Sequential)] -public struct IVRRenderModels -{ - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRRenderModelError _LoadRenderModel_Async(string pchRenderModelName, ref IntPtr ppRenderModel); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _LoadRenderModel_Async LoadRenderModel_Async; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _FreeRenderModel(IntPtr pRenderModel); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _FreeRenderModel FreeRenderModel; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRRenderModelError _LoadTexture_Async(int textureId, ref IntPtr ppTexture); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _LoadTexture_Async LoadTexture_Async; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _FreeTexture(IntPtr pTexture); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _FreeTexture FreeTexture; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRRenderModelError _LoadTextureD3D11_Async(int textureId, IntPtr pD3D11Device, ref IntPtr ppD3D11Texture2D); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _LoadTextureD3D11_Async LoadTextureD3D11_Async; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRRenderModelError _LoadIntoTextureD3D11_Async(int textureId, IntPtr pDstTexture); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _LoadIntoTextureD3D11_Async LoadIntoTextureD3D11_Async; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _FreeTextureD3D11(IntPtr pD3D11Texture2D); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _FreeTextureD3D11 FreeTextureD3D11; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetRenderModelName(uint unRenderModelIndex, System.Text.StringBuilder pchRenderModelName, uint unRenderModelNameLen); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetRenderModelName GetRenderModelName; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetRenderModelCount(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetRenderModelCount GetRenderModelCount; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetComponentCount(string pchRenderModelName); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetComponentCount GetComponentCount; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetComponentName(string pchRenderModelName, uint unComponentIndex, System.Text.StringBuilder pchComponentName, uint unComponentNameLen); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetComponentName GetComponentName; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate ulong _GetComponentButtonMask(string pchRenderModelName, string pchComponentName); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetComponentButtonMask GetComponentButtonMask; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetComponentRenderModelName(string pchRenderModelName, string pchComponentName, System.Text.StringBuilder pchComponentRenderModelName, uint unComponentRenderModelNameLen); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetComponentRenderModelName GetComponentRenderModelName; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetComponentState(string pchRenderModelName, string pchComponentName, ref VRControllerState_t pControllerState, ref RenderModel_ControllerMode_State_t pState, ref RenderModel_ComponentState_t pComponentState); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetComponentState GetComponentState; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _RenderModelHasComponent(string pchRenderModelName, string pchComponentName); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _RenderModelHasComponent RenderModelHasComponent; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetRenderModelThumbnailURL(string pchRenderModelName, System.Text.StringBuilder pchThumbnailURL, uint unThumbnailURLLen, ref EVRRenderModelError peError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetRenderModelThumbnailURL GetRenderModelThumbnailURL; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetRenderModelOriginalPath(string pchRenderModelName, System.Text.StringBuilder pchOriginalPath, uint unOriginalPathLen, ref EVRRenderModelError peError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetRenderModelOriginalPath GetRenderModelOriginalPath; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate IntPtr _GetRenderModelErrorNameFromEnum(EVRRenderModelError error); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetRenderModelErrorNameFromEnum GetRenderModelErrorNameFromEnum; - -} - -[StructLayout(LayoutKind.Sequential)] -public struct IVRNotifications -{ - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRNotificationError _CreateNotification(ulong ulOverlayHandle, ulong ulUserValue, EVRNotificationType type, string pchText, EVRNotificationStyle style, ref NotificationBitmap_t pImage, ref uint pNotificationId); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _CreateNotification CreateNotification; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRNotificationError _RemoveNotification(uint notificationId); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _RemoveNotification RemoveNotification; - -} - -[StructLayout(LayoutKind.Sequential)] -public struct IVRSettings -{ - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate IntPtr _GetSettingsErrorNameFromEnum(EVRSettingsError eError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetSettingsErrorNameFromEnum GetSettingsErrorNameFromEnum; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _Sync(bool bForce, ref EVRSettingsError peError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _Sync Sync; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _SetBool(string pchSection, string pchSettingsKey, bool bValue, ref EVRSettingsError peError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetBool SetBool; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _SetInt32(string pchSection, string pchSettingsKey, int nValue, ref EVRSettingsError peError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetInt32 SetInt32; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _SetFloat(string pchSection, string pchSettingsKey, float flValue, ref EVRSettingsError peError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetFloat SetFloat; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _SetString(string pchSection, string pchSettingsKey, string pchValue, ref EVRSettingsError peError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SetString SetString; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetBool(string pchSection, string pchSettingsKey, ref EVRSettingsError peError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetBool GetBool; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate int _GetInt32(string pchSection, string pchSettingsKey, ref EVRSettingsError peError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetInt32 GetInt32; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate float _GetFloat(string pchSection, string pchSettingsKey, ref EVRSettingsError peError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetFloat GetFloat; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _GetString(string pchSection, string pchSettingsKey, System.Text.StringBuilder pchValue, uint unValueLen, ref EVRSettingsError peError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetString GetString; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _RemoveSection(string pchSection, ref EVRSettingsError peError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _RemoveSection RemoveSection; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _RemoveKeyInSection(string pchSection, string pchSettingsKey, ref EVRSettingsError peError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _RemoveKeyInSection RemoveKeyInSection; - -} - -[StructLayout(LayoutKind.Sequential)] -public struct IVRScreenshots -{ - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRScreenshotError _RequestScreenshot(ref uint pOutScreenshotHandle, EVRScreenshotType type, string pchPreviewFilename, string pchVRFilename); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _RequestScreenshot RequestScreenshot; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRScreenshotError _HookScreenshot([In, Out] EVRScreenshotType[] pSupportedTypes, int numTypes); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _HookScreenshot HookScreenshot; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRScreenshotType _GetScreenshotPropertyType(uint screenshotHandle, ref EVRScreenshotError pError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetScreenshotPropertyType GetScreenshotPropertyType; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetScreenshotPropertyFilename(uint screenshotHandle, EVRScreenshotPropertyFilenames filenameType, System.Text.StringBuilder pchFilename, uint cchFilename, ref EVRScreenshotError pError); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetScreenshotPropertyFilename GetScreenshotPropertyFilename; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRScreenshotError _UpdateScreenshotProgress(uint screenshotHandle, float flProgress); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _UpdateScreenshotProgress UpdateScreenshotProgress; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRScreenshotError _TakeStereoScreenshot(ref uint pOutScreenshotHandle, string pchPreviewFilename, string pchVRFilename); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _TakeStereoScreenshot TakeStereoScreenshot; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRScreenshotError _SubmitScreenshot(uint screenshotHandle, EVRScreenshotType type, string pchSourcePreviewFilename, string pchSourceVRFilename); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _SubmitScreenshot SubmitScreenshot; - -} - -[StructLayout(LayoutKind.Sequential)] -public struct IVRResources -{ - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _LoadSharedResource(string pchResourceName, string pchBuffer, uint unBufferLen); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _LoadSharedResource LoadSharedResource; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetResourceFullPath(string pchResourceName, string pchResourceTypeDirectory, string pchPathBuffer, uint unBufferLen); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetResourceFullPath GetResourceFullPath; - -} - -[StructLayout(LayoutKind.Sequential)] -public struct IVRDriverManager -{ - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetDriverCount(); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetDriverCount GetDriverCount; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _GetDriverName(uint nDriver, System.Text.StringBuilder pchValue, uint unBufferSize); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _GetDriverName GetDriverName; - -} - - -public class CVRSystem -{ - IVRSystem FnTable; - internal CVRSystem(IntPtr pInterface) - { - FnTable = (IVRSystem)Marshal.PtrToStructure(pInterface, typeof(IVRSystem)); - } - public void GetRecommendedRenderTargetSize(ref uint pnWidth,ref uint pnHeight) - { - pnWidth = 0; - pnHeight = 0; - FnTable.GetRecommendedRenderTargetSize(ref pnWidth,ref pnHeight); - } - public HmdMatrix44_t GetProjectionMatrix(EVREye eEye,float fNearZ,float fFarZ) - { - HmdMatrix44_t result = FnTable.GetProjectionMatrix(eEye,fNearZ,fFarZ); - return result; - } - public void GetProjectionRaw(EVREye eEye,ref float pfLeft,ref float pfRight,ref float pfTop,ref float pfBottom) - { - pfLeft = 0; - pfRight = 0; - pfTop = 0; - pfBottom = 0; - FnTable.GetProjectionRaw(eEye,ref pfLeft,ref pfRight,ref pfTop,ref pfBottom); - } - public bool ComputeDistortion(EVREye eEye,float fU,float fV,ref DistortionCoordinates_t pDistortionCoordinates) - { - bool result = FnTable.ComputeDistortion(eEye,fU,fV,ref pDistortionCoordinates); - return result; - } - public HmdMatrix34_t GetEyeToHeadTransform(EVREye eEye) - { - HmdMatrix34_t result = FnTable.GetEyeToHeadTransform(eEye); - return result; - } - public bool GetTimeSinceLastVsync(ref float pfSecondsSinceLastVsync,ref ulong pulFrameCounter) - { - pfSecondsSinceLastVsync = 0; - pulFrameCounter = 0; - bool result = FnTable.GetTimeSinceLastVsync(ref pfSecondsSinceLastVsync,ref pulFrameCounter); - return result; - } - public int GetD3D9AdapterIndex() - { - int result = FnTable.GetD3D9AdapterIndex(); - return result; - } - public void GetDXGIOutputInfo(ref int pnAdapterIndex) - { - pnAdapterIndex = 0; - FnTable.GetDXGIOutputInfo(ref pnAdapterIndex); - } - public void GetOutputDevice(ref ulong pnDevice,ETextureType textureType,IntPtr pInstance) - { - pnDevice = 0; - FnTable.GetOutputDevice(ref pnDevice,textureType,pInstance); - } - public bool IsDisplayOnDesktop() - { - bool result = FnTable.IsDisplayOnDesktop(); - return result; - } - public bool SetDisplayVisibility(bool bIsVisibleOnDesktop) - { - bool result = FnTable.SetDisplayVisibility(bIsVisibleOnDesktop); - return result; - } - public void GetDeviceToAbsoluteTrackingPose(ETrackingUniverseOrigin eOrigin,float fPredictedSecondsToPhotonsFromNow,TrackedDevicePose_t [] pTrackedDevicePoseArray) - { - FnTable.GetDeviceToAbsoluteTrackingPose(eOrigin,fPredictedSecondsToPhotonsFromNow,pTrackedDevicePoseArray,(uint) pTrackedDevicePoseArray.Length); - } - public void ResetSeatedZeroPose() - { - FnTable.ResetSeatedZeroPose(); - } - public HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() - { - HmdMatrix34_t result = FnTable.GetSeatedZeroPoseToStandingAbsoluteTrackingPose(); - return result; - } - public HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() - { - HmdMatrix34_t result = FnTable.GetRawZeroPoseToStandingAbsoluteTrackingPose(); - return result; - } - public uint GetSortedTrackedDeviceIndicesOfClass(ETrackedDeviceClass eTrackedDeviceClass,uint [] punTrackedDeviceIndexArray,uint unRelativeToTrackedDeviceIndex) - { - uint result = FnTable.GetSortedTrackedDeviceIndicesOfClass(eTrackedDeviceClass,punTrackedDeviceIndexArray,(uint) punTrackedDeviceIndexArray.Length,unRelativeToTrackedDeviceIndex); - return result; - } - public EDeviceActivityLevel GetTrackedDeviceActivityLevel(uint unDeviceId) - { - EDeviceActivityLevel result = FnTable.GetTrackedDeviceActivityLevel(unDeviceId); - return result; - } - public void ApplyTransform(ref TrackedDevicePose_t pOutputPose,ref TrackedDevicePose_t pTrackedDevicePose,ref HmdMatrix34_t pTransform) - { - FnTable.ApplyTransform(ref pOutputPose,ref pTrackedDevicePose,ref pTransform); - } - public uint GetTrackedDeviceIndexForControllerRole(ETrackedControllerRole unDeviceType) - { - uint result = FnTable.GetTrackedDeviceIndexForControllerRole(unDeviceType); - return result; - } - public ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex(uint unDeviceIndex) - { - ETrackedControllerRole result = FnTable.GetControllerRoleForTrackedDeviceIndex(unDeviceIndex); - return result; - } - public ETrackedDeviceClass GetTrackedDeviceClass(uint unDeviceIndex) - { - ETrackedDeviceClass result = FnTable.GetTrackedDeviceClass(unDeviceIndex); - return result; - } - public bool IsTrackedDeviceConnected(uint unDeviceIndex) - { - bool result = FnTable.IsTrackedDeviceConnected(unDeviceIndex); - return result; - } - public bool GetBoolTrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError) - { - bool result = FnTable.GetBoolTrackedDeviceProperty(unDeviceIndex,prop,ref pError); - return result; - } - public float GetFloatTrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError) - { - float result = FnTable.GetFloatTrackedDeviceProperty(unDeviceIndex,prop,ref pError); - return result; - } - public int GetInt32TrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError) - { - int result = FnTable.GetInt32TrackedDeviceProperty(unDeviceIndex,prop,ref pError); - return result; - } - public ulong GetUint64TrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError) - { - ulong result = FnTable.GetUint64TrackedDeviceProperty(unDeviceIndex,prop,ref pError); - return result; - } - public HmdMatrix34_t GetMatrix34TrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError) - { - HmdMatrix34_t result = FnTable.GetMatrix34TrackedDeviceProperty(unDeviceIndex,prop,ref pError); - return result; - } - public uint GetStringTrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,System.Text.StringBuilder pchValue,uint unBufferSize,ref ETrackedPropertyError pError) - { - uint result = FnTable.GetStringTrackedDeviceProperty(unDeviceIndex,prop,pchValue,unBufferSize,ref pError); - return result; - } - public string GetPropErrorNameFromEnum(ETrackedPropertyError error) - { - IntPtr result = FnTable.GetPropErrorNameFromEnum(error); - return Marshal.PtrToStringAnsi(result); - } -// This is a terrible hack to workaround the fact that VRControllerState_t and VREvent_t were -// originally mis-compiled with the wrong packing for Linux and OSX. - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _PollNextEventPacked(ref VREvent_t_Packed pEvent,uint uncbVREvent); - [StructLayout(LayoutKind.Explicit)] - struct PollNextEventUnion - { - [FieldOffset(0)] - public IVRSystem._PollNextEvent pPollNextEvent; - [FieldOffset(0)] - public _PollNextEventPacked pPollNextEventPacked; - } - public bool PollNextEvent(ref VREvent_t pEvent,uint uncbVREvent) - { -#if !UNITY_METRO - if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) || - (System.Environment.OSVersion.Platform == System.PlatformID.Unix)) - { - PollNextEventUnion u; - VREvent_t_Packed event_packed = new VREvent_t_Packed(); - u.pPollNextEventPacked = null; - u.pPollNextEvent = FnTable.PollNextEvent; - bool packed_result = u.pPollNextEventPacked(ref event_packed,(uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(VREvent_t_Packed))); - - event_packed.Unpack(ref pEvent); - return packed_result; - } -#endif - bool result = FnTable.PollNextEvent(ref pEvent,uncbVREvent); - return result; - } - public bool PollNextEventWithPose(ETrackingUniverseOrigin eOrigin,ref VREvent_t pEvent,uint uncbVREvent,ref TrackedDevicePose_t pTrackedDevicePose) - { - bool result = FnTable.PollNextEventWithPose(eOrigin,ref pEvent,uncbVREvent,ref pTrackedDevicePose); - return result; - } - public string GetEventTypeNameFromEnum(EVREventType eType) - { - IntPtr result = FnTable.GetEventTypeNameFromEnum(eType); - return Marshal.PtrToStringAnsi(result); - } - public HiddenAreaMesh_t GetHiddenAreaMesh(EVREye eEye,EHiddenAreaMeshType type) - { - HiddenAreaMesh_t result = FnTable.GetHiddenAreaMesh(eEye,type); - return result; - } -// This is a terrible hack to workaround the fact that VRControllerState_t and VREvent_t were -// originally mis-compiled with the wrong packing for Linux and OSX. - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetControllerStatePacked(uint unControllerDeviceIndex,ref VRControllerState_t_Packed pControllerState,uint unControllerStateSize); - [StructLayout(LayoutKind.Explicit)] - struct GetControllerStateUnion - { - [FieldOffset(0)] - public IVRSystem._GetControllerState pGetControllerState; - [FieldOffset(0)] - public _GetControllerStatePacked pGetControllerStatePacked; - } - public bool GetControllerState(uint unControllerDeviceIndex,ref VRControllerState_t pControllerState,uint unControllerStateSize) - { -#if !UNITY_METRO - if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) || - (System.Environment.OSVersion.Platform == System.PlatformID.Unix)) - { - GetControllerStateUnion u; - VRControllerState_t_Packed state_packed = new VRControllerState_t_Packed(pControllerState); - u.pGetControllerStatePacked = null; - u.pGetControllerState = FnTable.GetControllerState; - bool packed_result = u.pGetControllerStatePacked(unControllerDeviceIndex,ref state_packed,(uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(VRControllerState_t_Packed))); - - state_packed.Unpack(ref pControllerState); - return packed_result; - } -#endif - bool result = FnTable.GetControllerState(unControllerDeviceIndex,ref pControllerState,unControllerStateSize); - return result; - } -// This is a terrible hack to workaround the fact that VRControllerState_t and VREvent_t were -// originally mis-compiled with the wrong packing for Linux and OSX. - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetControllerStateWithPosePacked(ETrackingUniverseOrigin eOrigin,uint unControllerDeviceIndex,ref VRControllerState_t_Packed pControllerState,uint unControllerStateSize,ref TrackedDevicePose_t pTrackedDevicePose); - [StructLayout(LayoutKind.Explicit)] - struct GetControllerStateWithPoseUnion - { - [FieldOffset(0)] - public IVRSystem._GetControllerStateWithPose pGetControllerStateWithPose; - [FieldOffset(0)] - public _GetControllerStateWithPosePacked pGetControllerStateWithPosePacked; - } - public bool GetControllerStateWithPose(ETrackingUniverseOrigin eOrigin,uint unControllerDeviceIndex,ref VRControllerState_t pControllerState,uint unControllerStateSize,ref TrackedDevicePose_t pTrackedDevicePose) - { -#if !UNITY_METRO - if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) || - (System.Environment.OSVersion.Platform == System.PlatformID.Unix)) - { - GetControllerStateWithPoseUnion u; - VRControllerState_t_Packed state_packed = new VRControllerState_t_Packed(pControllerState); - u.pGetControllerStateWithPosePacked = null; - u.pGetControllerStateWithPose = FnTable.GetControllerStateWithPose; - bool packed_result = u.pGetControllerStateWithPosePacked(eOrigin,unControllerDeviceIndex,ref state_packed,(uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(VRControllerState_t_Packed)),ref pTrackedDevicePose); - - state_packed.Unpack(ref pControllerState); - return packed_result; - } -#endif - bool result = FnTable.GetControllerStateWithPose(eOrigin,unControllerDeviceIndex,ref pControllerState,unControllerStateSize,ref pTrackedDevicePose); - return result; - } - public void TriggerHapticPulse(uint unControllerDeviceIndex,uint unAxisId,char usDurationMicroSec) - { - FnTable.TriggerHapticPulse(unControllerDeviceIndex,unAxisId,usDurationMicroSec); - } - public string GetButtonIdNameFromEnum(EVRButtonId eButtonId) - { - IntPtr result = FnTable.GetButtonIdNameFromEnum(eButtonId); - return Marshal.PtrToStringAnsi(result); - } - public string GetControllerAxisTypeNameFromEnum(EVRControllerAxisType eAxisType) - { - IntPtr result = FnTable.GetControllerAxisTypeNameFromEnum(eAxisType); - return Marshal.PtrToStringAnsi(result); - } - public bool CaptureInputFocus() - { - bool result = FnTable.CaptureInputFocus(); - return result; - } - public void ReleaseInputFocus() - { - FnTable.ReleaseInputFocus(); - } - public bool IsInputFocusCapturedByAnotherProcess() - { - bool result = FnTable.IsInputFocusCapturedByAnotherProcess(); - return result; - } - public uint DriverDebugRequest(uint unDeviceIndex,string pchRequest,string pchResponseBuffer,uint unResponseBufferSize) - { - uint result = FnTable.DriverDebugRequest(unDeviceIndex,pchRequest,pchResponseBuffer,unResponseBufferSize); - return result; - } - public EVRFirmwareError PerformFirmwareUpdate(uint unDeviceIndex) - { - EVRFirmwareError result = FnTable.PerformFirmwareUpdate(unDeviceIndex); - return result; - } - public void AcknowledgeQuit_Exiting() - { - FnTable.AcknowledgeQuit_Exiting(); - } - public void AcknowledgeQuit_UserPrompt() - { - FnTable.AcknowledgeQuit_UserPrompt(); - } -} - - -public class CVRExtendedDisplay -{ - IVRExtendedDisplay FnTable; - internal CVRExtendedDisplay(IntPtr pInterface) - { - FnTable = (IVRExtendedDisplay)Marshal.PtrToStructure(pInterface, typeof(IVRExtendedDisplay)); - } - public void GetWindowBounds(ref int pnX,ref int pnY,ref uint pnWidth,ref uint pnHeight) - { - pnX = 0; - pnY = 0; - pnWidth = 0; - pnHeight = 0; - FnTable.GetWindowBounds(ref pnX,ref pnY,ref pnWidth,ref pnHeight); - } - public void GetEyeOutputViewport(EVREye eEye,ref uint pnX,ref uint pnY,ref uint pnWidth,ref uint pnHeight) - { - pnX = 0; - pnY = 0; - pnWidth = 0; - pnHeight = 0; - FnTable.GetEyeOutputViewport(eEye,ref pnX,ref pnY,ref pnWidth,ref pnHeight); - } - public void GetDXGIOutputInfo(ref int pnAdapterIndex,ref int pnAdapterOutputIndex) - { - pnAdapterIndex = 0; - pnAdapterOutputIndex = 0; - FnTable.GetDXGIOutputInfo(ref pnAdapterIndex,ref pnAdapterOutputIndex); - } -} - - -public class CVRTrackedCamera -{ - IVRTrackedCamera FnTable; - internal CVRTrackedCamera(IntPtr pInterface) - { - FnTable = (IVRTrackedCamera)Marshal.PtrToStructure(pInterface, typeof(IVRTrackedCamera)); - } - public string GetCameraErrorNameFromEnum(EVRTrackedCameraError eCameraError) - { - IntPtr result = FnTable.GetCameraErrorNameFromEnum(eCameraError); - return Marshal.PtrToStringAnsi(result); - } - public EVRTrackedCameraError HasCamera(uint nDeviceIndex,ref bool pHasCamera) - { - pHasCamera = false; - EVRTrackedCameraError result = FnTable.HasCamera(nDeviceIndex,ref pHasCamera); - return result; - } - public EVRTrackedCameraError GetCameraFrameSize(uint nDeviceIndex,EVRTrackedCameraFrameType eFrameType,ref uint pnWidth,ref uint pnHeight,ref uint pnFrameBufferSize) - { - pnWidth = 0; - pnHeight = 0; - pnFrameBufferSize = 0; - EVRTrackedCameraError result = FnTable.GetCameraFrameSize(nDeviceIndex,eFrameType,ref pnWidth,ref pnHeight,ref pnFrameBufferSize); - return result; - } - public EVRTrackedCameraError GetCameraIntrinsics(uint nDeviceIndex,EVRTrackedCameraFrameType eFrameType,ref HmdVector2_t pFocalLength,ref HmdVector2_t pCenter) - { - EVRTrackedCameraError result = FnTable.GetCameraIntrinsics(nDeviceIndex,eFrameType,ref pFocalLength,ref pCenter); - return result; - } - public EVRTrackedCameraError GetCameraProjection(uint nDeviceIndex,EVRTrackedCameraFrameType eFrameType,float flZNear,float flZFar,ref HmdMatrix44_t pProjection) - { - EVRTrackedCameraError result = FnTable.GetCameraProjection(nDeviceIndex,eFrameType,flZNear,flZFar,ref pProjection); - return result; - } - public EVRTrackedCameraError AcquireVideoStreamingService(uint nDeviceIndex,ref ulong pHandle) - { - pHandle = 0; - EVRTrackedCameraError result = FnTable.AcquireVideoStreamingService(nDeviceIndex,ref pHandle); - return result; - } - public EVRTrackedCameraError ReleaseVideoStreamingService(ulong hTrackedCamera) - { - EVRTrackedCameraError result = FnTable.ReleaseVideoStreamingService(hTrackedCamera); - return result; - } - public EVRTrackedCameraError GetVideoStreamFrameBuffer(ulong hTrackedCamera,EVRTrackedCameraFrameType eFrameType,IntPtr pFrameBuffer,uint nFrameBufferSize,ref CameraVideoStreamFrameHeader_t pFrameHeader,uint nFrameHeaderSize) - { - EVRTrackedCameraError result = FnTable.GetVideoStreamFrameBuffer(hTrackedCamera,eFrameType,pFrameBuffer,nFrameBufferSize,ref pFrameHeader,nFrameHeaderSize); - return result; - } - public EVRTrackedCameraError GetVideoStreamTextureSize(uint nDeviceIndex,EVRTrackedCameraFrameType eFrameType,ref VRTextureBounds_t pTextureBounds,ref uint pnWidth,ref uint pnHeight) - { - pnWidth = 0; - pnHeight = 0; - EVRTrackedCameraError result = FnTable.GetVideoStreamTextureSize(nDeviceIndex,eFrameType,ref pTextureBounds,ref pnWidth,ref pnHeight); - return result; - } - public EVRTrackedCameraError GetVideoStreamTextureD3D11(ulong hTrackedCamera,EVRTrackedCameraFrameType eFrameType,IntPtr pD3D11DeviceOrResource,ref IntPtr ppD3D11ShaderResourceView,ref CameraVideoStreamFrameHeader_t pFrameHeader,uint nFrameHeaderSize) - { - EVRTrackedCameraError result = FnTable.GetVideoStreamTextureD3D11(hTrackedCamera,eFrameType,pD3D11DeviceOrResource,ref ppD3D11ShaderResourceView,ref pFrameHeader,nFrameHeaderSize); - return result; - } - public EVRTrackedCameraError GetVideoStreamTextureGL(ulong hTrackedCamera,EVRTrackedCameraFrameType eFrameType,ref uint pglTextureId,ref CameraVideoStreamFrameHeader_t pFrameHeader,uint nFrameHeaderSize) - { - pglTextureId = 0; - EVRTrackedCameraError result = FnTable.GetVideoStreamTextureGL(hTrackedCamera,eFrameType,ref pglTextureId,ref pFrameHeader,nFrameHeaderSize); - return result; - } - public EVRTrackedCameraError ReleaseVideoStreamTextureGL(ulong hTrackedCamera,uint glTextureId) - { - EVRTrackedCameraError result = FnTable.ReleaseVideoStreamTextureGL(hTrackedCamera,glTextureId); - return result; - } -} - - -public class CVRApplications -{ - IVRApplications FnTable; - internal CVRApplications(IntPtr pInterface) - { - FnTable = (IVRApplications)Marshal.PtrToStructure(pInterface, typeof(IVRApplications)); - } - public EVRApplicationError AddApplicationManifest(string pchApplicationManifestFullPath,bool bTemporary) - { - EVRApplicationError result = FnTable.AddApplicationManifest(pchApplicationManifestFullPath,bTemporary); - return result; - } - public EVRApplicationError RemoveApplicationManifest(string pchApplicationManifestFullPath) - { - EVRApplicationError result = FnTable.RemoveApplicationManifest(pchApplicationManifestFullPath); - return result; - } - public bool IsApplicationInstalled(string pchAppKey) - { - bool result = FnTable.IsApplicationInstalled(pchAppKey); - return result; - } - public uint GetApplicationCount() - { - uint result = FnTable.GetApplicationCount(); - return result; - } - public EVRApplicationError GetApplicationKeyByIndex(uint unApplicationIndex,System.Text.StringBuilder pchAppKeyBuffer,uint unAppKeyBufferLen) - { - EVRApplicationError result = FnTable.GetApplicationKeyByIndex(unApplicationIndex,pchAppKeyBuffer,unAppKeyBufferLen); - return result; - } - public EVRApplicationError GetApplicationKeyByProcessId(uint unProcessId,string pchAppKeyBuffer,uint unAppKeyBufferLen) - { - EVRApplicationError result = FnTable.GetApplicationKeyByProcessId(unProcessId,pchAppKeyBuffer,unAppKeyBufferLen); - return result; - } - public EVRApplicationError LaunchApplication(string pchAppKey) - { - EVRApplicationError result = FnTable.LaunchApplication(pchAppKey); - return result; - } - public EVRApplicationError LaunchTemplateApplication(string pchTemplateAppKey,string pchNewAppKey,AppOverrideKeys_t [] pKeys) - { - EVRApplicationError result = FnTable.LaunchTemplateApplication(pchTemplateAppKey,pchNewAppKey,pKeys,(uint) pKeys.Length); - return result; - } - public EVRApplicationError LaunchApplicationFromMimeType(string pchMimeType,string pchArgs) - { - EVRApplicationError result = FnTable.LaunchApplicationFromMimeType(pchMimeType,pchArgs); - return result; - } - public EVRApplicationError LaunchDashboardOverlay(string pchAppKey) - { - EVRApplicationError result = FnTable.LaunchDashboardOverlay(pchAppKey); - return result; - } - public bool CancelApplicationLaunch(string pchAppKey) - { - bool result = FnTable.CancelApplicationLaunch(pchAppKey); - return result; - } - public EVRApplicationError IdentifyApplication(uint unProcessId,string pchAppKey) - { - EVRApplicationError result = FnTable.IdentifyApplication(unProcessId,pchAppKey); - return result; - } - public uint GetApplicationProcessId(string pchAppKey) - { - uint result = FnTable.GetApplicationProcessId(pchAppKey); - return result; - } - public string GetApplicationsErrorNameFromEnum(EVRApplicationError error) - { - IntPtr result = FnTable.GetApplicationsErrorNameFromEnum(error); - return Marshal.PtrToStringAnsi(result); - } - public uint GetApplicationPropertyString(string pchAppKey,EVRApplicationProperty eProperty,System.Text.StringBuilder pchPropertyValueBuffer,uint unPropertyValueBufferLen,ref EVRApplicationError peError) - { - uint result = FnTable.GetApplicationPropertyString(pchAppKey,eProperty,pchPropertyValueBuffer,unPropertyValueBufferLen,ref peError); - return result; - } - public bool GetApplicationPropertyBool(string pchAppKey,EVRApplicationProperty eProperty,ref EVRApplicationError peError) - { - bool result = FnTable.GetApplicationPropertyBool(pchAppKey,eProperty,ref peError); - return result; - } - public ulong GetApplicationPropertyUint64(string pchAppKey,EVRApplicationProperty eProperty,ref EVRApplicationError peError) - { - ulong result = FnTable.GetApplicationPropertyUint64(pchAppKey,eProperty,ref peError); - return result; - } - public EVRApplicationError SetApplicationAutoLaunch(string pchAppKey,bool bAutoLaunch) - { - EVRApplicationError result = FnTable.SetApplicationAutoLaunch(pchAppKey,bAutoLaunch); - return result; - } - public bool GetApplicationAutoLaunch(string pchAppKey) - { - bool result = FnTable.GetApplicationAutoLaunch(pchAppKey); - return result; - } - public EVRApplicationError SetDefaultApplicationForMimeType(string pchAppKey,string pchMimeType) - { - EVRApplicationError result = FnTable.SetDefaultApplicationForMimeType(pchAppKey,pchMimeType); - return result; - } - public bool GetDefaultApplicationForMimeType(string pchMimeType,string pchAppKeyBuffer,uint unAppKeyBufferLen) - { - bool result = FnTable.GetDefaultApplicationForMimeType(pchMimeType,pchAppKeyBuffer,unAppKeyBufferLen); - return result; - } - public bool GetApplicationSupportedMimeTypes(string pchAppKey,string pchMimeTypesBuffer,uint unMimeTypesBuffer) - { - bool result = FnTable.GetApplicationSupportedMimeTypes(pchAppKey,pchMimeTypesBuffer,unMimeTypesBuffer); - return result; - } - public uint GetApplicationsThatSupportMimeType(string pchMimeType,string pchAppKeysThatSupportBuffer,uint unAppKeysThatSupportBuffer) - { - uint result = FnTable.GetApplicationsThatSupportMimeType(pchMimeType,pchAppKeysThatSupportBuffer,unAppKeysThatSupportBuffer); - return result; - } - public uint GetApplicationLaunchArguments(uint unHandle,string pchArgs,uint unArgs) - { - uint result = FnTable.GetApplicationLaunchArguments(unHandle,pchArgs,unArgs); - return result; - } - public EVRApplicationError GetStartingApplication(string pchAppKeyBuffer,uint unAppKeyBufferLen) - { - EVRApplicationError result = FnTable.GetStartingApplication(pchAppKeyBuffer,unAppKeyBufferLen); - return result; - } - public EVRApplicationTransitionState GetTransitionState() - { - EVRApplicationTransitionState result = FnTable.GetTransitionState(); - return result; - } - public EVRApplicationError PerformApplicationPrelaunchCheck(string pchAppKey) - { - EVRApplicationError result = FnTable.PerformApplicationPrelaunchCheck(pchAppKey); - return result; - } - public string GetApplicationsTransitionStateNameFromEnum(EVRApplicationTransitionState state) - { - IntPtr result = FnTable.GetApplicationsTransitionStateNameFromEnum(state); - return Marshal.PtrToStringAnsi(result); - } - public bool IsQuitUserPromptRequested() - { - bool result = FnTable.IsQuitUserPromptRequested(); - return result; - } - public EVRApplicationError LaunchInternalProcess(string pchBinaryPath,string pchArguments,string pchWorkingDirectory) - { - EVRApplicationError result = FnTable.LaunchInternalProcess(pchBinaryPath,pchArguments,pchWorkingDirectory); - return result; - } - public uint GetCurrentSceneProcessId() - { - uint result = FnTable.GetCurrentSceneProcessId(); - return result; - } -} - - -public class CVRChaperone -{ - IVRChaperone FnTable; - internal CVRChaperone(IntPtr pInterface) - { - FnTable = (IVRChaperone)Marshal.PtrToStructure(pInterface, typeof(IVRChaperone)); - } - public ChaperoneCalibrationState GetCalibrationState() - { - ChaperoneCalibrationState result = FnTable.GetCalibrationState(); - return result; - } - public bool GetPlayAreaSize(ref float pSizeX,ref float pSizeZ) - { - pSizeX = 0; - pSizeZ = 0; - bool result = FnTable.GetPlayAreaSize(ref pSizeX,ref pSizeZ); - return result; - } - public bool GetPlayAreaRect(ref HmdQuad_t rect) - { - bool result = FnTable.GetPlayAreaRect(ref rect); - return result; - } - public void ReloadInfo() - { - FnTable.ReloadInfo(); - } - public void SetSceneColor(HmdColor_t color) - { - FnTable.SetSceneColor(color); - } - public void GetBoundsColor(ref HmdColor_t pOutputColorArray,int nNumOutputColors,float flCollisionBoundsFadeDistance,ref HmdColor_t pOutputCameraColor) - { - FnTable.GetBoundsColor(ref pOutputColorArray,nNumOutputColors,flCollisionBoundsFadeDistance,ref pOutputCameraColor); - } - public bool AreBoundsVisible() - { - bool result = FnTable.AreBoundsVisible(); - return result; - } - public void ForceBoundsVisible(bool bForce) - { - FnTable.ForceBoundsVisible(bForce); - } -} - - -public class CVRChaperoneSetup -{ - IVRChaperoneSetup FnTable; - internal CVRChaperoneSetup(IntPtr pInterface) - { - FnTable = (IVRChaperoneSetup)Marshal.PtrToStructure(pInterface, typeof(IVRChaperoneSetup)); - } - public bool CommitWorkingCopy(EChaperoneConfigFile configFile) - { - bool result = FnTable.CommitWorkingCopy(configFile); - return result; - } - public void RevertWorkingCopy() - { - FnTable.RevertWorkingCopy(); - } - public bool GetWorkingPlayAreaSize(ref float pSizeX,ref float pSizeZ) - { - pSizeX = 0; - pSizeZ = 0; - bool result = FnTable.GetWorkingPlayAreaSize(ref pSizeX,ref pSizeZ); - return result; - } - public bool GetWorkingPlayAreaRect(ref HmdQuad_t rect) - { - bool result = FnTable.GetWorkingPlayAreaRect(ref rect); - return result; - } - public bool GetWorkingCollisionBoundsInfo(out HmdQuad_t [] pQuadsBuffer) - { - uint punQuadsCount = 0; - bool result = FnTable.GetWorkingCollisionBoundsInfo(null,ref punQuadsCount); - pQuadsBuffer= new HmdQuad_t[punQuadsCount]; - result = FnTable.GetWorkingCollisionBoundsInfo(pQuadsBuffer,ref punQuadsCount); - return result; - } - public bool GetLiveCollisionBoundsInfo(out HmdQuad_t [] pQuadsBuffer) - { - uint punQuadsCount = 0; - bool result = FnTable.GetLiveCollisionBoundsInfo(null,ref punQuadsCount); - pQuadsBuffer= new HmdQuad_t[punQuadsCount]; - result = FnTable.GetLiveCollisionBoundsInfo(pQuadsBuffer,ref punQuadsCount); - return result; - } - public bool GetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose) - { - bool result = FnTable.GetWorkingSeatedZeroPoseToRawTrackingPose(ref pmatSeatedZeroPoseToRawTrackingPose); - return result; - } - public bool GetWorkingStandingZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatStandingZeroPoseToRawTrackingPose) - { - bool result = FnTable.GetWorkingStandingZeroPoseToRawTrackingPose(ref pmatStandingZeroPoseToRawTrackingPose); - return result; - } - public void SetWorkingPlayAreaSize(float sizeX,float sizeZ) - { - FnTable.SetWorkingPlayAreaSize(sizeX,sizeZ); - } - public void SetWorkingCollisionBoundsInfo(HmdQuad_t [] pQuadsBuffer) - { - FnTable.SetWorkingCollisionBoundsInfo(pQuadsBuffer,(uint) pQuadsBuffer.Length); - } - public void SetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pMatSeatedZeroPoseToRawTrackingPose) - { - FnTable.SetWorkingSeatedZeroPoseToRawTrackingPose(ref pMatSeatedZeroPoseToRawTrackingPose); - } - public void SetWorkingStandingZeroPoseToRawTrackingPose(ref HmdMatrix34_t pMatStandingZeroPoseToRawTrackingPose) - { - FnTable.SetWorkingStandingZeroPoseToRawTrackingPose(ref pMatStandingZeroPoseToRawTrackingPose); - } - public void ReloadFromDisk(EChaperoneConfigFile configFile) - { - FnTable.ReloadFromDisk(configFile); - } - public bool GetLiveSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose) - { - bool result = FnTable.GetLiveSeatedZeroPoseToRawTrackingPose(ref pmatSeatedZeroPoseToRawTrackingPose); - return result; - } - public void SetWorkingCollisionBoundsTagsInfo(byte [] pTagsBuffer) - { - FnTable.SetWorkingCollisionBoundsTagsInfo(pTagsBuffer,(uint) pTagsBuffer.Length); - } - public bool GetLiveCollisionBoundsTagsInfo(out byte [] pTagsBuffer) - { - uint punTagCount = 0; - bool result = FnTable.GetLiveCollisionBoundsTagsInfo(null,ref punTagCount); - pTagsBuffer= new byte[punTagCount]; - result = FnTable.GetLiveCollisionBoundsTagsInfo(pTagsBuffer,ref punTagCount); - return result; - } - public bool SetWorkingPhysicalBoundsInfo(HmdQuad_t [] pQuadsBuffer) - { - bool result = FnTable.SetWorkingPhysicalBoundsInfo(pQuadsBuffer,(uint) pQuadsBuffer.Length); - return result; - } - public bool GetLivePhysicalBoundsInfo(out HmdQuad_t [] pQuadsBuffer) - { - uint punQuadsCount = 0; - bool result = FnTable.GetLivePhysicalBoundsInfo(null,ref punQuadsCount); - pQuadsBuffer= new HmdQuad_t[punQuadsCount]; - result = FnTable.GetLivePhysicalBoundsInfo(pQuadsBuffer,ref punQuadsCount); - return result; - } - public bool ExportLiveToBuffer(System.Text.StringBuilder pBuffer,ref uint pnBufferLength) - { - pnBufferLength = 0; - bool result = FnTable.ExportLiveToBuffer(pBuffer,ref pnBufferLength); - return result; - } - public bool ImportFromBufferToWorking(string pBuffer,uint nImportFlags) - { - bool result = FnTable.ImportFromBufferToWorking(pBuffer,nImportFlags); - return result; - } -} - - -public class CVRCompositor -{ - IVRCompositor FnTable; - internal CVRCompositor(IntPtr pInterface) - { - FnTable = (IVRCompositor)Marshal.PtrToStructure(pInterface, typeof(IVRCompositor)); - } - public void SetTrackingSpace(ETrackingUniverseOrigin eOrigin) - { - FnTable.SetTrackingSpace(eOrigin); - } - public ETrackingUniverseOrigin GetTrackingSpace() - { - ETrackingUniverseOrigin result = FnTable.GetTrackingSpace(); - return result; - } - public EVRCompositorError WaitGetPoses(TrackedDevicePose_t [] pRenderPoseArray,TrackedDevicePose_t [] pGamePoseArray) - { - EVRCompositorError result = FnTable.WaitGetPoses(pRenderPoseArray,(uint) pRenderPoseArray.Length,pGamePoseArray,(uint) pGamePoseArray.Length); - return result; - } - public EVRCompositorError GetLastPoses(TrackedDevicePose_t [] pRenderPoseArray,TrackedDevicePose_t [] pGamePoseArray) - { - EVRCompositorError result = FnTable.GetLastPoses(pRenderPoseArray,(uint) pRenderPoseArray.Length,pGamePoseArray,(uint) pGamePoseArray.Length); - return result; - } - public EVRCompositorError GetLastPoseForTrackedDeviceIndex(uint unDeviceIndex,ref TrackedDevicePose_t pOutputPose,ref TrackedDevicePose_t pOutputGamePose) - { - EVRCompositorError result = FnTable.GetLastPoseForTrackedDeviceIndex(unDeviceIndex,ref pOutputPose,ref pOutputGamePose); - return result; - } - public EVRCompositorError Submit(EVREye eEye,ref Texture_t pTexture,ref VRTextureBounds_t pBounds,EVRSubmitFlags nSubmitFlags) - { - EVRCompositorError result = FnTable.Submit(eEye,ref pTexture,ref pBounds,nSubmitFlags); - return result; - } - public void ClearLastSubmittedFrame() - { - FnTable.ClearLastSubmittedFrame(); - } - public void PostPresentHandoff() - { - FnTable.PostPresentHandoff(); - } - public bool GetFrameTiming(ref Compositor_FrameTiming pTiming,uint unFramesAgo) - { - bool result = FnTable.GetFrameTiming(ref pTiming,unFramesAgo); - return result; - } - public uint GetFrameTimings(ref Compositor_FrameTiming pTiming,uint nFrames) - { - uint result = FnTable.GetFrameTimings(ref pTiming,nFrames); - return result; - } - public float GetFrameTimeRemaining() - { - float result = FnTable.GetFrameTimeRemaining(); - return result; - } - public void GetCumulativeStats(ref Compositor_CumulativeStats pStats,uint nStatsSizeInBytes) - { - FnTable.GetCumulativeStats(ref pStats,nStatsSizeInBytes); - } - public void FadeToColor(float fSeconds,float fRed,float fGreen,float fBlue,float fAlpha,bool bBackground) - { - FnTable.FadeToColor(fSeconds,fRed,fGreen,fBlue,fAlpha,bBackground); - } - public HmdColor_t GetCurrentFadeColor(bool bBackground) - { - HmdColor_t result = FnTable.GetCurrentFadeColor(bBackground); - return result; - } - public void FadeGrid(float fSeconds,bool bFadeIn) - { - FnTable.FadeGrid(fSeconds,bFadeIn); - } - public float GetCurrentGridAlpha() - { - float result = FnTable.GetCurrentGridAlpha(); - return result; - } - public EVRCompositorError SetSkyboxOverride(Texture_t [] pTextures) - { - EVRCompositorError result = FnTable.SetSkyboxOverride(pTextures,(uint) pTextures.Length); - return result; - } - public void ClearSkyboxOverride() - { - FnTable.ClearSkyboxOverride(); - } - public void CompositorBringToFront() - { - FnTable.CompositorBringToFront(); - } - public void CompositorGoToBack() - { - FnTable.CompositorGoToBack(); - } - public void CompositorQuit() - { - FnTable.CompositorQuit(); - } - public bool IsFullscreen() - { - bool result = FnTable.IsFullscreen(); - return result; - } - public uint GetCurrentSceneFocusProcess() - { - uint result = FnTable.GetCurrentSceneFocusProcess(); - return result; - } - public uint GetLastFrameRenderer() - { - uint result = FnTable.GetLastFrameRenderer(); - return result; - } - public bool CanRenderScene() - { - bool result = FnTable.CanRenderScene(); - return result; - } - public void ShowMirrorWindow() - { - FnTable.ShowMirrorWindow(); - } - public void HideMirrorWindow() - { - FnTable.HideMirrorWindow(); - } - public bool IsMirrorWindowVisible() - { - bool result = FnTable.IsMirrorWindowVisible(); - return result; - } - public void CompositorDumpImages() - { - FnTable.CompositorDumpImages(); - } - public bool ShouldAppRenderWithLowResources() - { - bool result = FnTable.ShouldAppRenderWithLowResources(); - return result; - } - public void ForceInterleavedReprojectionOn(bool bOverride) - { - FnTable.ForceInterleavedReprojectionOn(bOverride); - } - public void ForceReconnectProcess() - { - FnTable.ForceReconnectProcess(); - } - public void SuspendRendering(bool bSuspend) - { - FnTable.SuspendRendering(bSuspend); - } - public EVRCompositorError GetMirrorTextureD3D11(EVREye eEye,IntPtr pD3D11DeviceOrResource,ref IntPtr ppD3D11ShaderResourceView) - { - EVRCompositorError result = FnTable.GetMirrorTextureD3D11(eEye,pD3D11DeviceOrResource,ref ppD3D11ShaderResourceView); - return result; - } - public void ReleaseMirrorTextureD3D11(IntPtr pD3D11ShaderResourceView) - { - FnTable.ReleaseMirrorTextureD3D11(pD3D11ShaderResourceView); - } - public EVRCompositorError GetMirrorTextureGL(EVREye eEye,ref uint pglTextureId,IntPtr pglSharedTextureHandle) - { - pglTextureId = 0; - EVRCompositorError result = FnTable.GetMirrorTextureGL(eEye,ref pglTextureId,pglSharedTextureHandle); - return result; - } - public bool ReleaseSharedGLTexture(uint glTextureId,IntPtr glSharedTextureHandle) - { - bool result = FnTable.ReleaseSharedGLTexture(glTextureId,glSharedTextureHandle); - return result; - } - public void LockGLSharedTextureForAccess(IntPtr glSharedTextureHandle) - { - FnTable.LockGLSharedTextureForAccess(glSharedTextureHandle); - } - public void UnlockGLSharedTextureForAccess(IntPtr glSharedTextureHandle) - { - FnTable.UnlockGLSharedTextureForAccess(glSharedTextureHandle); - } - public uint GetVulkanInstanceExtensionsRequired(System.Text.StringBuilder pchValue,uint unBufferSize) - { - uint result = FnTable.GetVulkanInstanceExtensionsRequired(pchValue,unBufferSize); - return result; - } - public uint GetVulkanDeviceExtensionsRequired(IntPtr pPhysicalDevice,System.Text.StringBuilder pchValue,uint unBufferSize) - { - uint result = FnTable.GetVulkanDeviceExtensionsRequired(pPhysicalDevice,pchValue,unBufferSize); - return result; - } - public void SetExplicitTimingMode(bool bExplicitTimingMode) - { - FnTable.SetExplicitTimingMode(bExplicitTimingMode); - } - public EVRCompositorError SubmitExplicitTimingData() - { - EVRCompositorError result = FnTable.SubmitExplicitTimingData(); - return result; - } -} - - -public class CVROverlay -{ - IVROverlay FnTable; - internal CVROverlay(IntPtr pInterface) - { - FnTable = (IVROverlay)Marshal.PtrToStructure(pInterface, typeof(IVROverlay)); - } - public EVROverlayError FindOverlay(string pchOverlayKey,ref ulong pOverlayHandle) - { - pOverlayHandle = 0; - EVROverlayError result = FnTable.FindOverlay(pchOverlayKey,ref pOverlayHandle); - return result; - } - public EVROverlayError CreateOverlay(string pchOverlayKey,string pchOverlayName,ref ulong pOverlayHandle) - { - pOverlayHandle = 0; - EVROverlayError result = FnTable.CreateOverlay(pchOverlayKey,pchOverlayName,ref pOverlayHandle); - return result; - } - public EVROverlayError DestroyOverlay(ulong ulOverlayHandle) - { - EVROverlayError result = FnTable.DestroyOverlay(ulOverlayHandle); - return result; - } - public EVROverlayError SetHighQualityOverlay(ulong ulOverlayHandle) - { - EVROverlayError result = FnTable.SetHighQualityOverlay(ulOverlayHandle); - return result; - } - public ulong GetHighQualityOverlay() - { - ulong result = FnTable.GetHighQualityOverlay(); - return result; - } - public uint GetOverlayKey(ulong ulOverlayHandle,System.Text.StringBuilder pchValue,uint unBufferSize,ref EVROverlayError pError) - { - uint result = FnTable.GetOverlayKey(ulOverlayHandle,pchValue,unBufferSize,ref pError); - return result; - } - public uint GetOverlayName(ulong ulOverlayHandle,System.Text.StringBuilder pchValue,uint unBufferSize,ref EVROverlayError pError) - { - uint result = FnTable.GetOverlayName(ulOverlayHandle,pchValue,unBufferSize,ref pError); - return result; - } - public EVROverlayError SetOverlayName(ulong ulOverlayHandle,string pchName) - { - EVROverlayError result = FnTable.SetOverlayName(ulOverlayHandle,pchName); - return result; - } - public EVROverlayError GetOverlayImageData(ulong ulOverlayHandle,IntPtr pvBuffer,uint unBufferSize,ref uint punWidth,ref uint punHeight) - { - punWidth = 0; - punHeight = 0; - EVROverlayError result = FnTable.GetOverlayImageData(ulOverlayHandle,pvBuffer,unBufferSize,ref punWidth,ref punHeight); - return result; - } - public string GetOverlayErrorNameFromEnum(EVROverlayError error) - { - IntPtr result = FnTable.GetOverlayErrorNameFromEnum(error); - return Marshal.PtrToStringAnsi(result); - } - public EVROverlayError SetOverlayRenderingPid(ulong ulOverlayHandle,uint unPID) - { - EVROverlayError result = FnTable.SetOverlayRenderingPid(ulOverlayHandle,unPID); - return result; - } - public uint GetOverlayRenderingPid(ulong ulOverlayHandle) - { - uint result = FnTable.GetOverlayRenderingPid(ulOverlayHandle); - return result; - } - public EVROverlayError SetOverlayFlag(ulong ulOverlayHandle,VROverlayFlags eOverlayFlag,bool bEnabled) - { - EVROverlayError result = FnTable.SetOverlayFlag(ulOverlayHandle,eOverlayFlag,bEnabled); - return result; - } - public EVROverlayError GetOverlayFlag(ulong ulOverlayHandle,VROverlayFlags eOverlayFlag,ref bool pbEnabled) - { - pbEnabled = false; - EVROverlayError result = FnTable.GetOverlayFlag(ulOverlayHandle,eOverlayFlag,ref pbEnabled); - return result; - } - public EVROverlayError SetOverlayColor(ulong ulOverlayHandle,float fRed,float fGreen,float fBlue) - { - EVROverlayError result = FnTable.SetOverlayColor(ulOverlayHandle,fRed,fGreen,fBlue); - return result; - } - public EVROverlayError GetOverlayColor(ulong ulOverlayHandle,ref float pfRed,ref float pfGreen,ref float pfBlue) - { - pfRed = 0; - pfGreen = 0; - pfBlue = 0; - EVROverlayError result = FnTable.GetOverlayColor(ulOverlayHandle,ref pfRed,ref pfGreen,ref pfBlue); - return result; - } - public EVROverlayError SetOverlayAlpha(ulong ulOverlayHandle,float fAlpha) - { - EVROverlayError result = FnTable.SetOverlayAlpha(ulOverlayHandle,fAlpha); - return result; - } - public EVROverlayError GetOverlayAlpha(ulong ulOverlayHandle,ref float pfAlpha) - { - pfAlpha = 0; - EVROverlayError result = FnTable.GetOverlayAlpha(ulOverlayHandle,ref pfAlpha); - return result; - } - public EVROverlayError SetOverlayTexelAspect(ulong ulOverlayHandle,float fTexelAspect) - { - EVROverlayError result = FnTable.SetOverlayTexelAspect(ulOverlayHandle,fTexelAspect); - return result; - } - public EVROverlayError GetOverlayTexelAspect(ulong ulOverlayHandle,ref float pfTexelAspect) - { - pfTexelAspect = 0; - EVROverlayError result = FnTable.GetOverlayTexelAspect(ulOverlayHandle,ref pfTexelAspect); - return result; - } - public EVROverlayError SetOverlaySortOrder(ulong ulOverlayHandle,uint unSortOrder) - { - EVROverlayError result = FnTable.SetOverlaySortOrder(ulOverlayHandle,unSortOrder); - return result; - } - public EVROverlayError GetOverlaySortOrder(ulong ulOverlayHandle,ref uint punSortOrder) - { - punSortOrder = 0; - EVROverlayError result = FnTable.GetOverlaySortOrder(ulOverlayHandle,ref punSortOrder); - return result; - } - public EVROverlayError SetOverlayWidthInMeters(ulong ulOverlayHandle,float fWidthInMeters) - { - EVROverlayError result = FnTable.SetOverlayWidthInMeters(ulOverlayHandle,fWidthInMeters); - return result; - } - public EVROverlayError GetOverlayWidthInMeters(ulong ulOverlayHandle,ref float pfWidthInMeters) - { - pfWidthInMeters = 0; - EVROverlayError result = FnTable.GetOverlayWidthInMeters(ulOverlayHandle,ref pfWidthInMeters); - return result; - } - public EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters(ulong ulOverlayHandle,float fMinDistanceInMeters,float fMaxDistanceInMeters) - { - EVROverlayError result = FnTable.SetOverlayAutoCurveDistanceRangeInMeters(ulOverlayHandle,fMinDistanceInMeters,fMaxDistanceInMeters); - return result; - } - public EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters(ulong ulOverlayHandle,ref float pfMinDistanceInMeters,ref float pfMaxDistanceInMeters) - { - pfMinDistanceInMeters = 0; - pfMaxDistanceInMeters = 0; - EVROverlayError result = FnTable.GetOverlayAutoCurveDistanceRangeInMeters(ulOverlayHandle,ref pfMinDistanceInMeters,ref pfMaxDistanceInMeters); - return result; - } - public EVROverlayError SetOverlayTextureColorSpace(ulong ulOverlayHandle,EColorSpace eTextureColorSpace) - { - EVROverlayError result = FnTable.SetOverlayTextureColorSpace(ulOverlayHandle,eTextureColorSpace); - return result; - } - public EVROverlayError GetOverlayTextureColorSpace(ulong ulOverlayHandle,ref EColorSpace peTextureColorSpace) - { - EVROverlayError result = FnTable.GetOverlayTextureColorSpace(ulOverlayHandle,ref peTextureColorSpace); - return result; - } - public EVROverlayError SetOverlayTextureBounds(ulong ulOverlayHandle,ref VRTextureBounds_t pOverlayTextureBounds) - { - EVROverlayError result = FnTable.SetOverlayTextureBounds(ulOverlayHandle,ref pOverlayTextureBounds); - return result; - } - public EVROverlayError GetOverlayTextureBounds(ulong ulOverlayHandle,ref VRTextureBounds_t pOverlayTextureBounds) - { - EVROverlayError result = FnTable.GetOverlayTextureBounds(ulOverlayHandle,ref pOverlayTextureBounds); - return result; - } - public uint GetOverlayRenderModel(ulong ulOverlayHandle,string pchValue,uint unBufferSize,ref HmdColor_t pColor,ref EVROverlayError pError) - { - uint result = FnTable.GetOverlayRenderModel(ulOverlayHandle,pchValue,unBufferSize,ref pColor,ref pError); - return result; - } - public EVROverlayError SetOverlayRenderModel(ulong ulOverlayHandle,string pchRenderModel,ref HmdColor_t pColor) - { - EVROverlayError result = FnTable.SetOverlayRenderModel(ulOverlayHandle,pchRenderModel,ref pColor); - return result; - } - public EVROverlayError GetOverlayTransformType(ulong ulOverlayHandle,ref VROverlayTransformType peTransformType) - { - EVROverlayError result = FnTable.GetOverlayTransformType(ulOverlayHandle,ref peTransformType); - return result; - } - public EVROverlayError SetOverlayTransformAbsolute(ulong ulOverlayHandle,ETrackingUniverseOrigin eTrackingOrigin,ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform) - { - EVROverlayError result = FnTable.SetOverlayTransformAbsolute(ulOverlayHandle,eTrackingOrigin,ref pmatTrackingOriginToOverlayTransform); - return result; - } - public EVROverlayError GetOverlayTransformAbsolute(ulong ulOverlayHandle,ref ETrackingUniverseOrigin peTrackingOrigin,ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform) - { - EVROverlayError result = FnTable.GetOverlayTransformAbsolute(ulOverlayHandle,ref peTrackingOrigin,ref pmatTrackingOriginToOverlayTransform); - return result; - } - public EVROverlayError SetOverlayTransformTrackedDeviceRelative(ulong ulOverlayHandle,uint unTrackedDevice,ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform) - { - EVROverlayError result = FnTable.SetOverlayTransformTrackedDeviceRelative(ulOverlayHandle,unTrackedDevice,ref pmatTrackedDeviceToOverlayTransform); - return result; - } - public EVROverlayError GetOverlayTransformTrackedDeviceRelative(ulong ulOverlayHandle,ref uint punTrackedDevice,ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform) - { - punTrackedDevice = 0; - EVROverlayError result = FnTable.GetOverlayTransformTrackedDeviceRelative(ulOverlayHandle,ref punTrackedDevice,ref pmatTrackedDeviceToOverlayTransform); - return result; - } - public EVROverlayError SetOverlayTransformTrackedDeviceComponent(ulong ulOverlayHandle,uint unDeviceIndex,string pchComponentName) - { - EVROverlayError result = FnTable.SetOverlayTransformTrackedDeviceComponent(ulOverlayHandle,unDeviceIndex,pchComponentName); - return result; - } - public EVROverlayError GetOverlayTransformTrackedDeviceComponent(ulong ulOverlayHandle,ref uint punDeviceIndex,string pchComponentName,uint unComponentNameSize) - { - punDeviceIndex = 0; - EVROverlayError result = FnTable.GetOverlayTransformTrackedDeviceComponent(ulOverlayHandle,ref punDeviceIndex,pchComponentName,unComponentNameSize); - return result; - } - public EVROverlayError GetOverlayTransformOverlayRelative(ulong ulOverlayHandle,ref ulong ulOverlayHandleParent,ref HmdMatrix34_t pmatParentOverlayToOverlayTransform) - { - ulOverlayHandleParent = 0; - EVROverlayError result = FnTable.GetOverlayTransformOverlayRelative(ulOverlayHandle,ref ulOverlayHandleParent,ref pmatParentOverlayToOverlayTransform); - return result; - } - public EVROverlayError SetOverlayTransformOverlayRelative(ulong ulOverlayHandle,ulong ulOverlayHandleParent,ref HmdMatrix34_t pmatParentOverlayToOverlayTransform) - { - EVROverlayError result = FnTable.SetOverlayTransformOverlayRelative(ulOverlayHandle,ulOverlayHandleParent,ref pmatParentOverlayToOverlayTransform); - return result; - } - public EVROverlayError ShowOverlay(ulong ulOverlayHandle) - { - EVROverlayError result = FnTable.ShowOverlay(ulOverlayHandle); - return result; - } - public EVROverlayError HideOverlay(ulong ulOverlayHandle) - { - EVROverlayError result = FnTable.HideOverlay(ulOverlayHandle); - return result; - } - public bool IsOverlayVisible(ulong ulOverlayHandle) - { - bool result = FnTable.IsOverlayVisible(ulOverlayHandle); - return result; - } - public EVROverlayError GetTransformForOverlayCoordinates(ulong ulOverlayHandle,ETrackingUniverseOrigin eTrackingOrigin,HmdVector2_t coordinatesInOverlay,ref HmdMatrix34_t pmatTransform) - { - EVROverlayError result = FnTable.GetTransformForOverlayCoordinates(ulOverlayHandle,eTrackingOrigin,coordinatesInOverlay,ref pmatTransform); - return result; - } -// This is a terrible hack to workaround the fact that VRControllerState_t and VREvent_t were -// originally mis-compiled with the wrong packing for Linux and OSX. - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _PollNextOverlayEventPacked(ulong ulOverlayHandle,ref VREvent_t_Packed pEvent,uint uncbVREvent); - [StructLayout(LayoutKind.Explicit)] - struct PollNextOverlayEventUnion - { - [FieldOffset(0)] - public IVROverlay._PollNextOverlayEvent pPollNextOverlayEvent; - [FieldOffset(0)] - public _PollNextOverlayEventPacked pPollNextOverlayEventPacked; - } - public bool PollNextOverlayEvent(ulong ulOverlayHandle,ref VREvent_t pEvent,uint uncbVREvent) - { -#if !UNITY_METRO - if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) || - (System.Environment.OSVersion.Platform == System.PlatformID.Unix)) - { - PollNextOverlayEventUnion u; - VREvent_t_Packed event_packed = new VREvent_t_Packed(); - u.pPollNextOverlayEventPacked = null; - u.pPollNextOverlayEvent = FnTable.PollNextOverlayEvent; - bool packed_result = u.pPollNextOverlayEventPacked(ulOverlayHandle,ref event_packed,(uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(VREvent_t_Packed))); - - event_packed.Unpack(ref pEvent); - return packed_result; - } -#endif - bool result = FnTable.PollNextOverlayEvent(ulOverlayHandle,ref pEvent,uncbVREvent); - return result; - } - public EVROverlayError GetOverlayInputMethod(ulong ulOverlayHandle,ref VROverlayInputMethod peInputMethod) - { - EVROverlayError result = FnTable.GetOverlayInputMethod(ulOverlayHandle,ref peInputMethod); - return result; - } - public EVROverlayError SetOverlayInputMethod(ulong ulOverlayHandle,VROverlayInputMethod eInputMethod) - { - EVROverlayError result = FnTable.SetOverlayInputMethod(ulOverlayHandle,eInputMethod); - return result; - } - public EVROverlayError GetOverlayMouseScale(ulong ulOverlayHandle,ref HmdVector2_t pvecMouseScale) - { - EVROverlayError result = FnTable.GetOverlayMouseScale(ulOverlayHandle,ref pvecMouseScale); - return result; - } - public EVROverlayError SetOverlayMouseScale(ulong ulOverlayHandle,ref HmdVector2_t pvecMouseScale) - { - EVROverlayError result = FnTable.SetOverlayMouseScale(ulOverlayHandle,ref pvecMouseScale); - return result; - } - public bool ComputeOverlayIntersection(ulong ulOverlayHandle,ref VROverlayIntersectionParams_t pParams,ref VROverlayIntersectionResults_t pResults) - { - bool result = FnTable.ComputeOverlayIntersection(ulOverlayHandle,ref pParams,ref pResults); - return result; - } - public bool HandleControllerOverlayInteractionAsMouse(ulong ulOverlayHandle,uint unControllerDeviceIndex) - { - bool result = FnTable.HandleControllerOverlayInteractionAsMouse(ulOverlayHandle,unControllerDeviceIndex); - return result; - } - public bool IsHoverTargetOverlay(ulong ulOverlayHandle) - { - bool result = FnTable.IsHoverTargetOverlay(ulOverlayHandle); - return result; - } - public ulong GetGamepadFocusOverlay() - { - ulong result = FnTable.GetGamepadFocusOverlay(); - return result; - } - public EVROverlayError SetGamepadFocusOverlay(ulong ulNewFocusOverlay) - { - EVROverlayError result = FnTable.SetGamepadFocusOverlay(ulNewFocusOverlay); - return result; - } - public EVROverlayError SetOverlayNeighbor(EOverlayDirection eDirection,ulong ulFrom,ulong ulTo) - { - EVROverlayError result = FnTable.SetOverlayNeighbor(eDirection,ulFrom,ulTo); - return result; - } - public EVROverlayError MoveGamepadFocusToNeighbor(EOverlayDirection eDirection,ulong ulFrom) - { - EVROverlayError result = FnTable.MoveGamepadFocusToNeighbor(eDirection,ulFrom); - return result; - } - public EVROverlayError SetOverlayTexture(ulong ulOverlayHandle,ref Texture_t pTexture) - { - EVROverlayError result = FnTable.SetOverlayTexture(ulOverlayHandle,ref pTexture); - return result; - } - public EVROverlayError ClearOverlayTexture(ulong ulOverlayHandle) - { - EVROverlayError result = FnTable.ClearOverlayTexture(ulOverlayHandle); - return result; - } - public EVROverlayError SetOverlayRaw(ulong ulOverlayHandle,IntPtr pvBuffer,uint unWidth,uint unHeight,uint unDepth) - { - EVROverlayError result = FnTable.SetOverlayRaw(ulOverlayHandle,pvBuffer,unWidth,unHeight,unDepth); - return result; - } - public EVROverlayError SetOverlayFromFile(ulong ulOverlayHandle,string pchFilePath) - { - EVROverlayError result = FnTable.SetOverlayFromFile(ulOverlayHandle,pchFilePath); - return result; - } - public EVROverlayError GetOverlayTexture(ulong ulOverlayHandle,ref IntPtr pNativeTextureHandle,IntPtr pNativeTextureRef,ref uint pWidth,ref uint pHeight,ref uint pNativeFormat,ref ETextureType pAPIType,ref EColorSpace pColorSpace,ref VRTextureBounds_t pTextureBounds) - { - pWidth = 0; - pHeight = 0; - pNativeFormat = 0; - EVROverlayError result = FnTable.GetOverlayTexture(ulOverlayHandle,ref pNativeTextureHandle,pNativeTextureRef,ref pWidth,ref pHeight,ref pNativeFormat,ref pAPIType,ref pColorSpace,ref pTextureBounds); - return result; - } - public EVROverlayError ReleaseNativeOverlayHandle(ulong ulOverlayHandle,IntPtr pNativeTextureHandle) - { - EVROverlayError result = FnTable.ReleaseNativeOverlayHandle(ulOverlayHandle,pNativeTextureHandle); - return result; - } - public EVROverlayError GetOverlayTextureSize(ulong ulOverlayHandle,ref uint pWidth,ref uint pHeight) - { - pWidth = 0; - pHeight = 0; - EVROverlayError result = FnTable.GetOverlayTextureSize(ulOverlayHandle,ref pWidth,ref pHeight); - return result; - } - public EVROverlayError CreateDashboardOverlay(string pchOverlayKey,string pchOverlayFriendlyName,ref ulong pMainHandle,ref ulong pThumbnailHandle) - { - pMainHandle = 0; - pThumbnailHandle = 0; - EVROverlayError result = FnTable.CreateDashboardOverlay(pchOverlayKey,pchOverlayFriendlyName,ref pMainHandle,ref pThumbnailHandle); - return result; - } - public bool IsDashboardVisible() - { - bool result = FnTable.IsDashboardVisible(); - return result; - } - public bool IsActiveDashboardOverlay(ulong ulOverlayHandle) - { - bool result = FnTable.IsActiveDashboardOverlay(ulOverlayHandle); - return result; - } - public EVROverlayError SetDashboardOverlaySceneProcess(ulong ulOverlayHandle,uint unProcessId) - { - EVROverlayError result = FnTable.SetDashboardOverlaySceneProcess(ulOverlayHandle,unProcessId); - return result; - } - public EVROverlayError GetDashboardOverlaySceneProcess(ulong ulOverlayHandle,ref uint punProcessId) - { - punProcessId = 0; - EVROverlayError result = FnTable.GetDashboardOverlaySceneProcess(ulOverlayHandle,ref punProcessId); - return result; - } - public void ShowDashboard(string pchOverlayToShow) - { - FnTable.ShowDashboard(pchOverlayToShow); - } - public uint GetPrimaryDashboardDevice() - { - uint result = FnTable.GetPrimaryDashboardDevice(); - return result; - } - public EVROverlayError ShowKeyboard(int eInputMode,int eLineInputMode,string pchDescription,uint unCharMax,string pchExistingText,bool bUseMinimalMode,ulong uUserValue) - { - EVROverlayError result = FnTable.ShowKeyboard(eInputMode,eLineInputMode,pchDescription,unCharMax,pchExistingText,bUseMinimalMode,uUserValue); - return result; - } - public EVROverlayError ShowKeyboardForOverlay(ulong ulOverlayHandle,int eInputMode,int eLineInputMode,string pchDescription,uint unCharMax,string pchExistingText,bool bUseMinimalMode,ulong uUserValue) - { - EVROverlayError result = FnTable.ShowKeyboardForOverlay(ulOverlayHandle,eInputMode,eLineInputMode,pchDescription,unCharMax,pchExistingText,bUseMinimalMode,uUserValue); - return result; - } - public uint GetKeyboardText(System.Text.StringBuilder pchText,uint cchText) - { - uint result = FnTable.GetKeyboardText(pchText,cchText); - return result; - } - public void HideKeyboard() - { - FnTable.HideKeyboard(); - } - public void SetKeyboardTransformAbsolute(ETrackingUniverseOrigin eTrackingOrigin,ref HmdMatrix34_t pmatTrackingOriginToKeyboardTransform) - { - FnTable.SetKeyboardTransformAbsolute(eTrackingOrigin,ref pmatTrackingOriginToKeyboardTransform); - } - public void SetKeyboardPositionForOverlay(ulong ulOverlayHandle,HmdRect2_t avoidRect) - { - FnTable.SetKeyboardPositionForOverlay(ulOverlayHandle,avoidRect); - } - public EVROverlayError SetOverlayIntersectionMask(ulong ulOverlayHandle,ref VROverlayIntersectionMaskPrimitive_t pMaskPrimitives,uint unNumMaskPrimitives,uint unPrimitiveSize) - { - EVROverlayError result = FnTable.SetOverlayIntersectionMask(ulOverlayHandle,ref pMaskPrimitives,unNumMaskPrimitives,unPrimitiveSize); - return result; - } - public EVROverlayError GetOverlayFlags(ulong ulOverlayHandle,ref uint pFlags) - { - pFlags = 0; - EVROverlayError result = FnTable.GetOverlayFlags(ulOverlayHandle,ref pFlags); - return result; - } - public VRMessageOverlayResponse ShowMessageOverlay(string pchText,string pchCaption,string pchButton0Text,string pchButton1Text,string pchButton2Text,string pchButton3Text) - { - VRMessageOverlayResponse result = FnTable.ShowMessageOverlay(pchText,pchCaption,pchButton0Text,pchButton1Text,pchButton2Text,pchButton3Text); - return result; - } - public void CloseMessageOverlay() - { - FnTable.CloseMessageOverlay(); - } -} - - -public class CVRRenderModels -{ - IVRRenderModels FnTable; - internal CVRRenderModels(IntPtr pInterface) - { - FnTable = (IVRRenderModels)Marshal.PtrToStructure(pInterface, typeof(IVRRenderModels)); - } - public EVRRenderModelError LoadRenderModel_Async(string pchRenderModelName,ref IntPtr ppRenderModel) - { - EVRRenderModelError result = FnTable.LoadRenderModel_Async(pchRenderModelName,ref ppRenderModel); - return result; - } - public void FreeRenderModel(IntPtr pRenderModel) - { - FnTable.FreeRenderModel(pRenderModel); - } - public EVRRenderModelError LoadTexture_Async(int textureId,ref IntPtr ppTexture) - { - EVRRenderModelError result = FnTable.LoadTexture_Async(textureId,ref ppTexture); - return result; - } - public void FreeTexture(IntPtr pTexture) - { - FnTable.FreeTexture(pTexture); - } - public EVRRenderModelError LoadTextureD3D11_Async(int textureId,IntPtr pD3D11Device,ref IntPtr ppD3D11Texture2D) - { - EVRRenderModelError result = FnTable.LoadTextureD3D11_Async(textureId,pD3D11Device,ref ppD3D11Texture2D); - return result; - } - public EVRRenderModelError LoadIntoTextureD3D11_Async(int textureId,IntPtr pDstTexture) - { - EVRRenderModelError result = FnTable.LoadIntoTextureD3D11_Async(textureId,pDstTexture); - return result; - } - public void FreeTextureD3D11(IntPtr pD3D11Texture2D) - { - FnTable.FreeTextureD3D11(pD3D11Texture2D); - } - public uint GetRenderModelName(uint unRenderModelIndex,System.Text.StringBuilder pchRenderModelName,uint unRenderModelNameLen) - { - uint result = FnTable.GetRenderModelName(unRenderModelIndex,pchRenderModelName,unRenderModelNameLen); - return result; - } - public uint GetRenderModelCount() - { - uint result = FnTable.GetRenderModelCount(); - return result; - } - public uint GetComponentCount(string pchRenderModelName) - { - uint result = FnTable.GetComponentCount(pchRenderModelName); - return result; - } - public uint GetComponentName(string pchRenderModelName,uint unComponentIndex,System.Text.StringBuilder pchComponentName,uint unComponentNameLen) - { - uint result = FnTable.GetComponentName(pchRenderModelName,unComponentIndex,pchComponentName,unComponentNameLen); - return result; - } - public ulong GetComponentButtonMask(string pchRenderModelName,string pchComponentName) - { - ulong result = FnTable.GetComponentButtonMask(pchRenderModelName,pchComponentName); - return result; - } - public uint GetComponentRenderModelName(string pchRenderModelName,string pchComponentName,System.Text.StringBuilder pchComponentRenderModelName,uint unComponentRenderModelNameLen) - { - uint result = FnTable.GetComponentRenderModelName(pchRenderModelName,pchComponentName,pchComponentRenderModelName,unComponentRenderModelNameLen); - return result; - } -// This is a terrible hack to workaround the fact that VRControllerState_t and VREvent_t were -// originally mis-compiled with the wrong packing for Linux and OSX. - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _GetComponentStatePacked(string pchRenderModelName,string pchComponentName,ref VRControllerState_t_Packed pControllerState,ref RenderModel_ControllerMode_State_t pState,ref RenderModel_ComponentState_t pComponentState); - [StructLayout(LayoutKind.Explicit)] - struct GetComponentStateUnion - { - [FieldOffset(0)] - public IVRRenderModels._GetComponentState pGetComponentState; - [FieldOffset(0)] - public _GetComponentStatePacked pGetComponentStatePacked; - } - public bool GetComponentState(string pchRenderModelName,string pchComponentName,ref VRControllerState_t pControllerState,ref RenderModel_ControllerMode_State_t pState,ref RenderModel_ComponentState_t pComponentState) - { -#if !UNITY_METRO - if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) || - (System.Environment.OSVersion.Platform == System.PlatformID.Unix)) - { - GetComponentStateUnion u; - VRControllerState_t_Packed state_packed = new VRControllerState_t_Packed(pControllerState); - u.pGetComponentStatePacked = null; - u.pGetComponentState = FnTable.GetComponentState; - bool packed_result = u.pGetComponentStatePacked(pchRenderModelName,pchComponentName,ref state_packed,ref pState,ref pComponentState); - - state_packed.Unpack(ref pControllerState); - return packed_result; - } -#endif - bool result = FnTable.GetComponentState(pchRenderModelName,pchComponentName,ref pControllerState,ref pState,ref pComponentState); - return result; - } - public bool RenderModelHasComponent(string pchRenderModelName,string pchComponentName) - { - bool result = FnTable.RenderModelHasComponent(pchRenderModelName,pchComponentName); - return result; - } - public uint GetRenderModelThumbnailURL(string pchRenderModelName,System.Text.StringBuilder pchThumbnailURL,uint unThumbnailURLLen,ref EVRRenderModelError peError) - { - uint result = FnTable.GetRenderModelThumbnailURL(pchRenderModelName,pchThumbnailURL,unThumbnailURLLen,ref peError); - return result; - } - public uint GetRenderModelOriginalPath(string pchRenderModelName,System.Text.StringBuilder pchOriginalPath,uint unOriginalPathLen,ref EVRRenderModelError peError) - { - uint result = FnTable.GetRenderModelOriginalPath(pchRenderModelName,pchOriginalPath,unOriginalPathLen,ref peError); - return result; - } - public string GetRenderModelErrorNameFromEnum(EVRRenderModelError error) - { - IntPtr result = FnTable.GetRenderModelErrorNameFromEnum(error); - return Marshal.PtrToStringAnsi(result); - } -} - - -public class CVRNotifications -{ - IVRNotifications FnTable; - internal CVRNotifications(IntPtr pInterface) - { - FnTable = (IVRNotifications)Marshal.PtrToStructure(pInterface, typeof(IVRNotifications)); - } - public EVRNotificationError CreateNotification(ulong ulOverlayHandle,ulong ulUserValue,EVRNotificationType type,string pchText,EVRNotificationStyle style,ref NotificationBitmap_t pImage,ref uint pNotificationId) - { - pNotificationId = 0; - EVRNotificationError result = FnTable.CreateNotification(ulOverlayHandle,ulUserValue,type,pchText,style,ref pImage,ref pNotificationId); - return result; - } - public EVRNotificationError RemoveNotification(uint notificationId) - { - EVRNotificationError result = FnTable.RemoveNotification(notificationId); - return result; - } -} - - -public class CVRSettings -{ - IVRSettings FnTable; - internal CVRSettings(IntPtr pInterface) - { - FnTable = (IVRSettings)Marshal.PtrToStructure(pInterface, typeof(IVRSettings)); - } - public string GetSettingsErrorNameFromEnum(EVRSettingsError eError) - { - IntPtr result = FnTable.GetSettingsErrorNameFromEnum(eError); - return Marshal.PtrToStringAnsi(result); - } - public bool Sync(bool bForce,ref EVRSettingsError peError) - { - bool result = FnTable.Sync(bForce,ref peError); - return result; - } - public void SetBool(string pchSection,string pchSettingsKey,bool bValue,ref EVRSettingsError peError) - { - FnTable.SetBool(pchSection,pchSettingsKey,bValue,ref peError); - } - public void SetInt32(string pchSection,string pchSettingsKey,int nValue,ref EVRSettingsError peError) - { - FnTable.SetInt32(pchSection,pchSettingsKey,nValue,ref peError); - } - public void SetFloat(string pchSection,string pchSettingsKey,float flValue,ref EVRSettingsError peError) - { - FnTable.SetFloat(pchSection,pchSettingsKey,flValue,ref peError); - } - public void SetString(string pchSection,string pchSettingsKey,string pchValue,ref EVRSettingsError peError) - { - FnTable.SetString(pchSection,pchSettingsKey,pchValue,ref peError); - } - public bool GetBool(string pchSection,string pchSettingsKey,ref EVRSettingsError peError) - { - bool result = FnTable.GetBool(pchSection,pchSettingsKey,ref peError); - return result; - } - public int GetInt32(string pchSection,string pchSettingsKey,ref EVRSettingsError peError) - { - int result = FnTable.GetInt32(pchSection,pchSettingsKey,ref peError); - return result; - } - public float GetFloat(string pchSection,string pchSettingsKey,ref EVRSettingsError peError) - { - float result = FnTable.GetFloat(pchSection,pchSettingsKey,ref peError); - return result; - } - public void GetString(string pchSection,string pchSettingsKey,System.Text.StringBuilder pchValue,uint unValueLen,ref EVRSettingsError peError) - { - FnTable.GetString(pchSection,pchSettingsKey,pchValue,unValueLen,ref peError); - } - public void RemoveSection(string pchSection,ref EVRSettingsError peError) - { - FnTable.RemoveSection(pchSection,ref peError); - } - public void RemoveKeyInSection(string pchSection,string pchSettingsKey,ref EVRSettingsError peError) - { - FnTable.RemoveKeyInSection(pchSection,pchSettingsKey,ref peError); - } -} - - -public class CVRScreenshots -{ - IVRScreenshots FnTable; - internal CVRScreenshots(IntPtr pInterface) - { - FnTable = (IVRScreenshots)Marshal.PtrToStructure(pInterface, typeof(IVRScreenshots)); - } - public EVRScreenshotError RequestScreenshot(ref uint pOutScreenshotHandle,EVRScreenshotType type,string pchPreviewFilename,string pchVRFilename) - { - pOutScreenshotHandle = 0; - EVRScreenshotError result = FnTable.RequestScreenshot(ref pOutScreenshotHandle,type,pchPreviewFilename,pchVRFilename); - return result; - } - public EVRScreenshotError HookScreenshot(EVRScreenshotType [] pSupportedTypes) - { - EVRScreenshotError result = FnTable.HookScreenshot(pSupportedTypes,(int) pSupportedTypes.Length); - return result; - } - public EVRScreenshotType GetScreenshotPropertyType(uint screenshotHandle,ref EVRScreenshotError pError) - { - EVRScreenshotType result = FnTable.GetScreenshotPropertyType(screenshotHandle,ref pError); - return result; - } - public uint GetScreenshotPropertyFilename(uint screenshotHandle,EVRScreenshotPropertyFilenames filenameType,System.Text.StringBuilder pchFilename,uint cchFilename,ref EVRScreenshotError pError) - { - uint result = FnTable.GetScreenshotPropertyFilename(screenshotHandle,filenameType,pchFilename,cchFilename,ref pError); - return result; - } - public EVRScreenshotError UpdateScreenshotProgress(uint screenshotHandle,float flProgress) - { - EVRScreenshotError result = FnTable.UpdateScreenshotProgress(screenshotHandle,flProgress); - return result; - } - public EVRScreenshotError TakeStereoScreenshot(ref uint pOutScreenshotHandle,string pchPreviewFilename,string pchVRFilename) - { - pOutScreenshotHandle = 0; - EVRScreenshotError result = FnTable.TakeStereoScreenshot(ref pOutScreenshotHandle,pchPreviewFilename,pchVRFilename); - return result; - } - public EVRScreenshotError SubmitScreenshot(uint screenshotHandle,EVRScreenshotType type,string pchSourcePreviewFilename,string pchSourceVRFilename) - { - EVRScreenshotError result = FnTable.SubmitScreenshot(screenshotHandle,type,pchSourcePreviewFilename,pchSourceVRFilename); - return result; - } -} - - -public class CVRResources -{ - IVRResources FnTable; - internal CVRResources(IntPtr pInterface) - { - FnTable = (IVRResources)Marshal.PtrToStructure(pInterface, typeof(IVRResources)); - } - public uint LoadSharedResource(string pchResourceName,string pchBuffer,uint unBufferLen) - { - uint result = FnTable.LoadSharedResource(pchResourceName,pchBuffer,unBufferLen); - return result; - } - public uint GetResourceFullPath(string pchResourceName,string pchResourceTypeDirectory,string pchPathBuffer,uint unBufferLen) - { - uint result = FnTable.GetResourceFullPath(pchResourceName,pchResourceTypeDirectory,pchPathBuffer,unBufferLen); - return result; - } -} - - -public class CVRDriverManager -{ - IVRDriverManager FnTable; - internal CVRDriverManager(IntPtr pInterface) - { - FnTable = (IVRDriverManager)Marshal.PtrToStructure(pInterface, typeof(IVRDriverManager)); - } - public uint GetDriverCount() - { - uint result = FnTable.GetDriverCount(); - return result; - } - public uint GetDriverName(uint nDriver,System.Text.StringBuilder pchValue,uint unBufferSize) - { - uint result = FnTable.GetDriverName(nDriver,pchValue,unBufferSize); - return result; - } -} - - -public class OpenVRInterop -{ - [DllImportAttribute("openvr_api", EntryPoint = "VR_InitInternal", CallingConvention = CallingConvention.Cdecl)] - internal static extern uint InitInternal(ref EVRInitError peError, EVRApplicationType eApplicationType); - [DllImportAttribute("openvr_api", EntryPoint = "VR_ShutdownInternal", CallingConvention = CallingConvention.Cdecl)] - internal static extern void ShutdownInternal(); - [DllImportAttribute("openvr_api", EntryPoint = "VR_IsHmdPresent", CallingConvention = CallingConvention.Cdecl)] - internal static extern bool IsHmdPresent(); - [DllImportAttribute("openvr_api", EntryPoint = "VR_IsRuntimeInstalled", CallingConvention = CallingConvention.Cdecl)] - internal static extern bool IsRuntimeInstalled(); - [DllImportAttribute("openvr_api", EntryPoint = "VR_GetStringForHmdError", CallingConvention = CallingConvention.Cdecl)] - internal static extern IntPtr GetStringForHmdError(EVRInitError error); - [DllImportAttribute("openvr_api", EntryPoint = "VR_GetGenericInterface", CallingConvention = CallingConvention.Cdecl)] - internal static extern IntPtr GetGenericInterface([In, MarshalAs(UnmanagedType.LPStr)] string pchInterfaceVersion, ref EVRInitError peError); - [DllImportAttribute("openvr_api", EntryPoint = "VR_IsInterfaceVersionValid", CallingConvention = CallingConvention.Cdecl)] - internal static extern bool IsInterfaceVersionValid([In, MarshalAs(UnmanagedType.LPStr)] string pchInterfaceVersion); - [DllImportAttribute("openvr_api", EntryPoint = "VR_GetInitToken", CallingConvention = CallingConvention.Cdecl)] - internal static extern uint GetInitToken(); -} - - -public enum EVREye -{ - Eye_Left = 0, - Eye_Right = 1, -} -public enum ETextureType -{ - DirectX = 0, - OpenGL = 1, - Vulkan = 2, - IOSurface = 3, - DirectX12 = 4, -} -public enum EColorSpace -{ - Auto = 0, - Gamma = 1, - Linear = 2, -} -public enum ETrackingResult -{ - Uninitialized = 1, - Calibrating_InProgress = 100, - Calibrating_OutOfRange = 101, - Running_OK = 200, - Running_OutOfRange = 201, -} -public enum ETrackedDeviceClass -{ - Invalid = 0, - HMD = 1, - Controller = 2, - GenericTracker = 3, - TrackingReference = 4, - DisplayRedirect = 5, -} -public enum ETrackedControllerRole -{ - Invalid = 0, - LeftHand = 1, - RightHand = 2, -} -public enum ETrackingUniverseOrigin -{ - TrackingUniverseSeated = 0, - TrackingUniverseStanding = 1, - TrackingUniverseRawAndUncalibrated = 2, -} -public enum ETrackedDeviceProperty -{ - Prop_Invalid = 0, - Prop_TrackingSystemName_String = 1000, - Prop_ModelNumber_String = 1001, - Prop_SerialNumber_String = 1002, - Prop_RenderModelName_String = 1003, - Prop_WillDriftInYaw_Bool = 1004, - Prop_ManufacturerName_String = 1005, - Prop_TrackingFirmwareVersion_String = 1006, - Prop_HardwareRevision_String = 1007, - Prop_AllWirelessDongleDescriptions_String = 1008, - Prop_ConnectedWirelessDongle_String = 1009, - Prop_DeviceIsWireless_Bool = 1010, - Prop_DeviceIsCharging_Bool = 1011, - Prop_DeviceBatteryPercentage_Float = 1012, - Prop_StatusDisplayTransform_Matrix34 = 1013, - Prop_Firmware_UpdateAvailable_Bool = 1014, - Prop_Firmware_ManualUpdate_Bool = 1015, - Prop_Firmware_ManualUpdateURL_String = 1016, - Prop_HardwareRevision_Uint64 = 1017, - Prop_FirmwareVersion_Uint64 = 1018, - Prop_FPGAVersion_Uint64 = 1019, - Prop_VRCVersion_Uint64 = 1020, - Prop_RadioVersion_Uint64 = 1021, - Prop_DongleVersion_Uint64 = 1022, - Prop_BlockServerShutdown_Bool = 1023, - Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, - Prop_ContainsProximitySensor_Bool = 1025, - Prop_DeviceProvidesBatteryStatus_Bool = 1026, - Prop_DeviceCanPowerOff_Bool = 1027, - Prop_Firmware_ProgrammingTarget_String = 1028, - Prop_DeviceClass_Int32 = 1029, - Prop_HasCamera_Bool = 1030, - Prop_DriverVersion_String = 1031, - Prop_Firmware_ForceUpdateRequired_Bool = 1032, - Prop_ViveSystemButtonFixRequired_Bool = 1033, - Prop_ParentDriver_Uint64 = 1034, - Prop_ResourceRoot_String = 1035, - Prop_ReportsTimeSinceVSync_Bool = 2000, - Prop_SecondsFromVsyncToPhotons_Float = 2001, - Prop_DisplayFrequency_Float = 2002, - Prop_UserIpdMeters_Float = 2003, - Prop_CurrentUniverseId_Uint64 = 2004, - Prop_PreviousUniverseId_Uint64 = 2005, - Prop_DisplayFirmwareVersion_Uint64 = 2006, - Prop_IsOnDesktop_Bool = 2007, - Prop_DisplayMCType_Int32 = 2008, - Prop_DisplayMCOffset_Float = 2009, - Prop_DisplayMCScale_Float = 2010, - Prop_EdidVendorID_Int32 = 2011, - Prop_DisplayMCImageLeft_String = 2012, - Prop_DisplayMCImageRight_String = 2013, - Prop_DisplayGCBlackClamp_Float = 2014, - Prop_EdidProductID_Int32 = 2015, - Prop_CameraToHeadTransform_Matrix34 = 2016, - Prop_DisplayGCType_Int32 = 2017, - Prop_DisplayGCOffset_Float = 2018, - Prop_DisplayGCScale_Float = 2019, - Prop_DisplayGCPrescale_Float = 2020, - Prop_DisplayGCImage_String = 2021, - Prop_LensCenterLeftU_Float = 2022, - Prop_LensCenterLeftV_Float = 2023, - Prop_LensCenterRightU_Float = 2024, - Prop_LensCenterRightV_Float = 2025, - Prop_UserHeadToEyeDepthMeters_Float = 2026, - Prop_CameraFirmwareVersion_Uint64 = 2027, - Prop_CameraFirmwareDescription_String = 2028, - Prop_DisplayFPGAVersion_Uint64 = 2029, - Prop_DisplayBootloaderVersion_Uint64 = 2030, - Prop_DisplayHardwareVersion_Uint64 = 2031, - Prop_AudioFirmwareVersion_Uint64 = 2032, - Prop_CameraCompatibilityMode_Int32 = 2033, - Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034, - Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035, - Prop_DisplaySuppressed_Bool = 2036, - Prop_DisplayAllowNightMode_Bool = 2037, - Prop_DisplayMCImageWidth_Int32 = 2038, - Prop_DisplayMCImageHeight_Int32 = 2039, - Prop_DisplayMCImageNumChannels_Int32 = 2040, - Prop_DisplayMCImageData_Binary = 2041, - Prop_SecondsFromPhotonsToVblank_Float = 2042, - Prop_DriverDirectModeSendsVsyncEvents_Bool = 2043, - Prop_DisplayDebugMode_Bool = 2044, - Prop_GraphicsAdapterLuid_Uint64 = 2045, - Prop_DriverProvidedChaperonePath_String = 2048, - Prop_AttachedDeviceId_String = 3000, - Prop_SupportedButtons_Uint64 = 3001, - Prop_Axis0Type_Int32 = 3002, - Prop_Axis1Type_Int32 = 3003, - Prop_Axis2Type_Int32 = 3004, - Prop_Axis3Type_Int32 = 3005, - Prop_Axis4Type_Int32 = 3006, - Prop_ControllerRoleHint_Int32 = 3007, - Prop_FieldOfViewLeftDegrees_Float = 4000, - Prop_FieldOfViewRightDegrees_Float = 4001, - Prop_FieldOfViewTopDegrees_Float = 4002, - Prop_FieldOfViewBottomDegrees_Float = 4003, - Prop_TrackingRangeMinimumMeters_Float = 4004, - Prop_TrackingRangeMaximumMeters_Float = 4005, - Prop_ModeLabel_String = 4006, - Prop_IconPathName_String = 5000, - Prop_NamedIconPathDeviceOff_String = 5001, - Prop_NamedIconPathDeviceSearching_String = 5002, - Prop_NamedIconPathDeviceSearchingAlert_String = 5003, - Prop_NamedIconPathDeviceReady_String = 5004, - Prop_NamedIconPathDeviceReadyAlert_String = 5005, - Prop_NamedIconPathDeviceNotReady_String = 5006, - Prop_NamedIconPathDeviceStandby_String = 5007, - Prop_NamedIconPathDeviceAlertLow_String = 5008, - Prop_DisplayHiddenArea_Binary_Start = 5100, - Prop_DisplayHiddenArea_Binary_End = 5150, - Prop_UserConfigPath_String = 6000, - Prop_InstallPath_String = 6001, - Prop_HasDisplayComponent_Bool = 6002, - Prop_HasControllerComponent_Bool = 6003, - Prop_HasCameraComponent_Bool = 6004, - Prop_HasDriverDirectModeComponent_Bool = 6005, - Prop_HasVirtualDisplayComponent_Bool = 6006, - Prop_VendorSpecific_Reserved_Start = 10000, - Prop_VendorSpecific_Reserved_End = 10999, -} -public enum ETrackedPropertyError -{ - TrackedProp_Success = 0, - TrackedProp_WrongDataType = 1, - TrackedProp_WrongDeviceClass = 2, - TrackedProp_BufferTooSmall = 3, - TrackedProp_UnknownProperty = 4, - TrackedProp_InvalidDevice = 5, - TrackedProp_CouldNotContactServer = 6, - TrackedProp_ValueNotProvidedByDevice = 7, - TrackedProp_StringExceedsMaximumLength = 8, - TrackedProp_NotYetAvailable = 9, - TrackedProp_PermissionDenied = 10, - TrackedProp_InvalidOperation = 11, -} -public enum EVRSubmitFlags -{ - Submit_Default = 0, - Submit_LensDistortionAlreadyApplied = 1, - Submit_GlRenderBuffer = 2, - Submit_Reserved = 4, - Submit_TextureWithPose = 8, -} -public enum EVRState -{ - Undefined = -1, - Off = 0, - Searching = 1, - Searching_Alert = 2, - Ready = 3, - Ready_Alert = 4, - NotReady = 5, - Standby = 6, - Ready_Alert_Low = 7, -} -public enum EVREventType -{ - VREvent_None = 0, - VREvent_TrackedDeviceActivated = 100, - VREvent_TrackedDeviceDeactivated = 101, - VREvent_TrackedDeviceUpdated = 102, - VREvent_TrackedDeviceUserInteractionStarted = 103, - VREvent_TrackedDeviceUserInteractionEnded = 104, - VREvent_IpdChanged = 105, - VREvent_EnterStandbyMode = 106, - VREvent_LeaveStandbyMode = 107, - VREvent_TrackedDeviceRoleChanged = 108, - VREvent_WatchdogWakeUpRequested = 109, - VREvent_LensDistortionChanged = 110, - VREvent_PropertyChanged = 111, - VREvent_WirelessDisconnect = 112, - VREvent_WirelessReconnect = 113, - VREvent_ButtonPress = 200, - VREvent_ButtonUnpress = 201, - VREvent_ButtonTouch = 202, - VREvent_ButtonUntouch = 203, - VREvent_MouseMove = 300, - VREvent_MouseButtonDown = 301, - VREvent_MouseButtonUp = 302, - VREvent_FocusEnter = 303, - VREvent_FocusLeave = 304, - VREvent_Scroll = 305, - VREvent_TouchPadMove = 306, - VREvent_OverlayFocusChanged = 307, - VREvent_InputFocusCaptured = 400, - VREvent_InputFocusReleased = 401, - VREvent_SceneFocusLost = 402, - VREvent_SceneFocusGained = 403, - VREvent_SceneApplicationChanged = 404, - VREvent_SceneFocusChanged = 405, - VREvent_InputFocusChanged = 406, - VREvent_SceneApplicationSecondaryRenderingStarted = 407, - VREvent_HideRenderModels = 410, - VREvent_ShowRenderModels = 411, - VREvent_OverlayShown = 500, - VREvent_OverlayHidden = 501, - VREvent_DashboardActivated = 502, - VREvent_DashboardDeactivated = 503, - VREvent_DashboardThumbSelected = 504, - VREvent_DashboardRequested = 505, - VREvent_ResetDashboard = 506, - VREvent_RenderToast = 507, - VREvent_ImageLoaded = 508, - VREvent_ShowKeyboard = 509, - VREvent_HideKeyboard = 510, - VREvent_OverlayGamepadFocusGained = 511, - VREvent_OverlayGamepadFocusLost = 512, - VREvent_OverlaySharedTextureChanged = 513, - VREvent_DashboardGuideButtonDown = 514, - VREvent_DashboardGuideButtonUp = 515, - VREvent_ScreenshotTriggered = 516, - VREvent_ImageFailed = 517, - VREvent_DashboardOverlayCreated = 518, - VREvent_RequestScreenshot = 520, - VREvent_ScreenshotTaken = 521, - VREvent_ScreenshotFailed = 522, - VREvent_SubmitScreenshotToDashboard = 523, - VREvent_ScreenshotProgressToDashboard = 524, - VREvent_PrimaryDashboardDeviceChanged = 525, - VREvent_Notification_Shown = 600, - VREvent_Notification_Hidden = 601, - VREvent_Notification_BeginInteraction = 602, - VREvent_Notification_Destroyed = 603, - VREvent_Quit = 700, - VREvent_ProcessQuit = 701, - VREvent_QuitAborted_UserPrompt = 702, - VREvent_QuitAcknowledged = 703, - VREvent_DriverRequestedQuit = 704, - VREvent_ChaperoneDataHasChanged = 800, - VREvent_ChaperoneUniverseHasChanged = 801, - VREvent_ChaperoneTempDataHasChanged = 802, - VREvent_ChaperoneSettingsHaveChanged = 803, - VREvent_SeatedZeroPoseReset = 804, - VREvent_AudioSettingsHaveChanged = 820, - VREvent_BackgroundSettingHasChanged = 850, - VREvent_CameraSettingsHaveChanged = 851, - VREvent_ReprojectionSettingHasChanged = 852, - VREvent_ModelSkinSettingsHaveChanged = 853, - VREvent_EnvironmentSettingsHaveChanged = 854, - VREvent_PowerSettingsHaveChanged = 855, - VREvent_EnableHomeAppSettingsHaveChanged = 856, - VREvent_StatusUpdate = 900, - VREvent_MCImageUpdated = 1000, - VREvent_FirmwareUpdateStarted = 1100, - VREvent_FirmwareUpdateFinished = 1101, - VREvent_KeyboardClosed = 1200, - VREvent_KeyboardCharInput = 1201, - VREvent_KeyboardDone = 1202, - VREvent_ApplicationTransitionStarted = 1300, - VREvent_ApplicationTransitionAborted = 1301, - VREvent_ApplicationTransitionNewAppStarted = 1302, - VREvent_ApplicationListUpdated = 1303, - VREvent_ApplicationMimeTypeLoad = 1304, - VREvent_ApplicationTransitionNewAppLaunchComplete = 1305, - VREvent_ProcessConnected = 1306, - VREvent_ProcessDisconnected = 1307, - VREvent_Compositor_MirrorWindowShown = 1400, - VREvent_Compositor_MirrorWindowHidden = 1401, - VREvent_Compositor_ChaperoneBoundsShown = 1410, - VREvent_Compositor_ChaperoneBoundsHidden = 1411, - VREvent_TrackedCamera_StartVideoStream = 1500, - VREvent_TrackedCamera_StopVideoStream = 1501, - VREvent_TrackedCamera_PauseVideoStream = 1502, - VREvent_TrackedCamera_ResumeVideoStream = 1503, - VREvent_TrackedCamera_EditingSurface = 1550, - VREvent_PerformanceTest_EnableCapture = 1600, - VREvent_PerformanceTest_DisableCapture = 1601, - VREvent_PerformanceTest_FidelityLevel = 1602, - VREvent_MessageOverlay_Closed = 1650, - VREvent_MessageOverlayCloseRequested = 1651, - VREvent_VendorSpecific_Reserved_Start = 10000, - VREvent_VendorSpecific_Reserved_End = 19999, -} -public enum EDeviceActivityLevel -{ - k_EDeviceActivityLevel_Unknown = -1, - k_EDeviceActivityLevel_Idle = 0, - k_EDeviceActivityLevel_UserInteraction = 1, - k_EDeviceActivityLevel_UserInteraction_Timeout = 2, - k_EDeviceActivityLevel_Standby = 3, -} -public enum EVRButtonId -{ - k_EButton_System = 0, - k_EButton_ApplicationMenu = 1, - k_EButton_Grip = 2, - k_EButton_DPad_Left = 3, - k_EButton_DPad_Up = 4, - k_EButton_DPad_Right = 5, - k_EButton_DPad_Down = 6, - k_EButton_A = 7, - k_EButton_ProximitySensor = 31, - k_EButton_Axis0 = 32, - k_EButton_Axis1 = 33, - k_EButton_Axis2 = 34, - k_EButton_Axis3 = 35, - k_EButton_Axis4 = 36, - k_EButton_SteamVR_Touchpad = 32, - k_EButton_SteamVR_Trigger = 33, - k_EButton_Dashboard_Back = 2, - k_EButton_Max = 64, -} -public enum EVRMouseButton -{ - Left = 1, - Right = 2, - Middle = 4, -} -public enum EHiddenAreaMeshType -{ - k_eHiddenAreaMesh_Standard = 0, - k_eHiddenAreaMesh_Inverse = 1, - k_eHiddenAreaMesh_LineLoop = 2, - k_eHiddenAreaMesh_Max = 3, -} -public enum EVRControllerAxisType -{ - k_eControllerAxis_None = 0, - k_eControllerAxis_TrackPad = 1, - k_eControllerAxis_Joystick = 2, - k_eControllerAxis_Trigger = 3, -} -public enum EVRControllerEventOutputType -{ - ControllerEventOutput_OSEvents = 0, - ControllerEventOutput_VREvents = 1, -} -public enum ECollisionBoundsStyle -{ - COLLISION_BOUNDS_STYLE_BEGINNER = 0, - COLLISION_BOUNDS_STYLE_INTERMEDIATE = 1, - COLLISION_BOUNDS_STYLE_SQUARES = 2, - COLLISION_BOUNDS_STYLE_ADVANCED = 3, - COLLISION_BOUNDS_STYLE_NONE = 4, - COLLISION_BOUNDS_STYLE_COUNT = 5, -} -public enum EVROverlayError -{ - None = 0, - UnknownOverlay = 10, - InvalidHandle = 11, - PermissionDenied = 12, - OverlayLimitExceeded = 13, - WrongVisibilityType = 14, - KeyTooLong = 15, - NameTooLong = 16, - KeyInUse = 17, - WrongTransformType = 18, - InvalidTrackedDevice = 19, - InvalidParameter = 20, - ThumbnailCantBeDestroyed = 21, - ArrayTooSmall = 22, - RequestFailed = 23, - InvalidTexture = 24, - UnableToLoadFile = 25, - KeyboardAlreadyInUse = 26, - NoNeighbor = 27, - TooManyMaskPrimitives = 29, - BadMaskPrimitive = 30, -} -public enum EVRApplicationType -{ - VRApplication_Other = 0, - VRApplication_Scene = 1, - VRApplication_Overlay = 2, - VRApplication_Background = 3, - VRApplication_Utility = 4, - VRApplication_VRMonitor = 5, - VRApplication_SteamWatchdog = 6, - VRApplication_Bootstrapper = 7, - VRApplication_Max = 8, -} -public enum EVRFirmwareError -{ - None = 0, - Success = 1, - Fail = 2, -} -public enum EVRNotificationError -{ - OK = 0, - InvalidNotificationId = 100, - NotificationQueueFull = 101, - InvalidOverlayHandle = 102, - SystemWithUserValueAlreadyExists = 103, -} -public enum EVRInitError -{ - None = 0, - Unknown = 1, - Init_InstallationNotFound = 100, - Init_InstallationCorrupt = 101, - Init_VRClientDLLNotFound = 102, - Init_FileNotFound = 103, - Init_FactoryNotFound = 104, - Init_InterfaceNotFound = 105, - Init_InvalidInterface = 106, - Init_UserConfigDirectoryInvalid = 107, - Init_HmdNotFound = 108, - Init_NotInitialized = 109, - Init_PathRegistryNotFound = 110, - Init_NoConfigPath = 111, - Init_NoLogPath = 112, - Init_PathRegistryNotWritable = 113, - Init_AppInfoInitFailed = 114, - Init_Retry = 115, - Init_InitCanceledByUser = 116, - Init_AnotherAppLaunching = 117, - Init_SettingsInitFailed = 118, - Init_ShuttingDown = 119, - Init_TooManyObjects = 120, - Init_NoServerForBackgroundApp = 121, - Init_NotSupportedWithCompositor = 122, - Init_NotAvailableToUtilityApps = 123, - Init_Internal = 124, - Init_HmdDriverIdIsNone = 125, - Init_HmdNotFoundPresenceFailed = 126, - Init_VRMonitorNotFound = 127, - Init_VRMonitorStartupFailed = 128, - Init_LowPowerWatchdogNotSupported = 129, - Init_InvalidApplicationType = 130, - Init_NotAvailableToWatchdogApps = 131, - Init_WatchdogDisabledInSettings = 132, - Init_VRDashboardNotFound = 133, - Init_VRDashboardStartupFailed = 134, - Init_VRHomeNotFound = 135, - Init_VRHomeStartupFailed = 136, - Init_RebootingBusy = 137, - Init_FirmwareUpdateBusy = 138, - Init_FirmwareRecoveryBusy = 139, - Driver_Failed = 200, - Driver_Unknown = 201, - Driver_HmdUnknown = 202, - Driver_NotLoaded = 203, - Driver_RuntimeOutOfDate = 204, - Driver_HmdInUse = 205, - Driver_NotCalibrated = 206, - Driver_CalibrationInvalid = 207, - Driver_HmdDisplayNotFound = 208, - Driver_TrackedDeviceInterfaceUnknown = 209, - Driver_HmdDriverIdOutOfBounds = 211, - Driver_HmdDisplayMirrored = 212, - IPC_ServerInitFailed = 300, - IPC_ConnectFailed = 301, - IPC_SharedStateInitFailed = 302, - IPC_CompositorInitFailed = 303, - IPC_MutexInitFailed = 304, - IPC_Failed = 305, - IPC_CompositorConnectFailed = 306, - IPC_CompositorInvalidConnectResponse = 307, - IPC_ConnectFailedAfterMultipleAttempts = 308, - Compositor_Failed = 400, - Compositor_D3D11HardwareRequired = 401, - Compositor_FirmwareRequiresUpdate = 402, - Compositor_OverlayInitFailed = 403, - Compositor_ScreenshotsInitFailed = 404, - Compositor_UnableToCreateDevice = 405, - VendorSpecific_UnableToConnectToOculusRuntime = 1000, - VendorSpecific_HmdFound_CantOpenDevice = 1101, - VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, - VendorSpecific_HmdFound_NoStoredConfig = 1103, - VendorSpecific_HmdFound_ConfigTooBig = 1104, - VendorSpecific_HmdFound_ConfigTooSmall = 1105, - VendorSpecific_HmdFound_UnableToInitZLib = 1106, - VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, - VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, - VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, - VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, - VendorSpecific_HmdFound_UserDataAddressRange = 1111, - VendorSpecific_HmdFound_UserDataError = 1112, - VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, - Steam_SteamInstallationNotFound = 2000, -} -public enum EVRScreenshotType -{ - None = 0, - Mono = 1, - Stereo = 2, - Cubemap = 3, - MonoPanorama = 4, - StereoPanorama = 5, -} -public enum EVRScreenshotPropertyFilenames -{ - Preview = 0, - VR = 1, -} -public enum EVRTrackedCameraError -{ - None = 0, - OperationFailed = 100, - InvalidHandle = 101, - InvalidFrameHeaderVersion = 102, - OutOfHandles = 103, - IPCFailure = 104, - NotSupportedForThisDevice = 105, - SharedMemoryFailure = 106, - FrameBufferingFailure = 107, - StreamSetupFailure = 108, - InvalidGLTextureId = 109, - InvalidSharedTextureHandle = 110, - FailedToGetGLTextureId = 111, - SharedTextureFailure = 112, - NoFrameAvailable = 113, - InvalidArgument = 114, - InvalidFrameBufferSize = 115, -} -public enum EVRTrackedCameraFrameType -{ - Distorted = 0, - Undistorted = 1, - MaximumUndistorted = 2, - MAX_CAMERA_FRAME_TYPES = 3, -} -public enum EVRApplicationError -{ - None = 0, - AppKeyAlreadyExists = 100, - NoManifest = 101, - NoApplication = 102, - InvalidIndex = 103, - UnknownApplication = 104, - IPCFailed = 105, - ApplicationAlreadyRunning = 106, - InvalidManifest = 107, - InvalidApplication = 108, - LaunchFailed = 109, - ApplicationAlreadyStarting = 110, - LaunchInProgress = 111, - OldApplicationQuitting = 112, - TransitionAborted = 113, - IsTemplate = 114, - SteamVRIsExiting = 115, - BufferTooSmall = 200, - PropertyNotSet = 201, - UnknownProperty = 202, - InvalidParameter = 203, -} -public enum EVRApplicationProperty -{ - Name_String = 0, - LaunchType_String = 11, - WorkingDirectory_String = 12, - BinaryPath_String = 13, - Arguments_String = 14, - URL_String = 15, - Description_String = 50, - NewsURL_String = 51, - ImagePath_String = 52, - Source_String = 53, - IsDashboardOverlay_Bool = 60, - IsTemplate_Bool = 61, - IsInstanced_Bool = 62, - IsInternal_Bool = 63, - WantsCompositorPauseInStandby_Bool = 64, - LastLaunchTime_Uint64 = 70, -} -public enum EVRApplicationTransitionState -{ - VRApplicationTransition_None = 0, - VRApplicationTransition_OldAppQuitSent = 10, - VRApplicationTransition_WaitingForExternalLaunch = 11, - VRApplicationTransition_NewAppLaunched = 20, -} -public enum ChaperoneCalibrationState -{ - OK = 1, - Warning = 100, - Warning_BaseStationMayHaveMoved = 101, - Warning_BaseStationRemoved = 102, - Warning_SeatedBoundsInvalid = 103, - Error = 200, - Error_BaseStationUninitialized = 201, - Error_BaseStationConflict = 202, - Error_PlayAreaInvalid = 203, - Error_CollisionBoundsInvalid = 204, -} -public enum EChaperoneConfigFile -{ - Live = 1, - Temp = 2, -} -public enum EChaperoneImportFlags -{ - EChaperoneImport_BoundsOnly = 1, -} -public enum EVRCompositorError -{ - None = 0, - RequestFailed = 1, - IncompatibleVersion = 100, - DoNotHaveFocus = 101, - InvalidTexture = 102, - IsNotSceneApplication = 103, - TextureIsOnWrongDevice = 104, - TextureUsesUnsupportedFormat = 105, - SharedTexturesNotSupported = 106, - IndexOutOfRange = 107, - AlreadySubmitted = 108, - InvalidBounds = 109, -} -public enum VROverlayInputMethod -{ - None = 0, - Mouse = 1, -} -public enum VROverlayTransformType -{ - VROverlayTransform_Absolute = 0, - VROverlayTransform_TrackedDeviceRelative = 1, - VROverlayTransform_SystemOverlay = 2, - VROverlayTransform_TrackedComponent = 3, -} -public enum VROverlayFlags -{ - None = 0, - Curved = 1, - RGSS4X = 2, - NoDashboardTab = 3, - AcceptsGamepadEvents = 4, - ShowGamepadFocus = 5, - SendVRScrollEvents = 6, - SendVRTouchpadEvents = 7, - ShowTouchPadScrollWheel = 8, - TransferOwnershipToInternalProcess = 9, - SideBySide_Parallel = 10, - SideBySide_Crossed = 11, - Panorama = 12, - StereoPanorama = 13, - SortWithNonSceneOverlays = 14, - VisibleInDashboard = 15, -} -public enum VRMessageOverlayResponse -{ - ButtonPress_0 = 0, - ButtonPress_1 = 1, - ButtonPress_2 = 2, - ButtonPress_3 = 3, - CouldntFindSystemOverlay = 4, - CouldntFindOrCreateClientOverlay = 5, - ApplicationQuit = 6, -} -public enum EGamepadTextInputMode -{ - k_EGamepadTextInputModeNormal = 0, - k_EGamepadTextInputModePassword = 1, - k_EGamepadTextInputModeSubmit = 2, -} -public enum EGamepadTextInputLineMode -{ - k_EGamepadTextInputLineModeSingleLine = 0, - k_EGamepadTextInputLineModeMultipleLines = 1, -} -public enum EOverlayDirection -{ - Up = 0, - Down = 1, - Left = 2, - Right = 3, - Count = 4, -} -public enum EVROverlayIntersectionMaskPrimitiveType -{ - OverlayIntersectionPrimitiveType_Rectangle = 0, - OverlayIntersectionPrimitiveType_Circle = 1, -} -public enum EVRRenderModelError -{ - None = 0, - Loading = 100, - NotSupported = 200, - InvalidArg = 300, - InvalidModel = 301, - NoShapes = 302, - MultipleShapes = 303, - TooManyVertices = 304, - MultipleTextures = 305, - BufferTooSmall = 306, - NotEnoughNormals = 307, - NotEnoughTexCoords = 308, - InvalidTexture = 400, -} -public enum EVRComponentProperty -{ - IsStatic = 1, - IsVisible = 2, - IsTouched = 4, - IsPressed = 8, - IsScrolled = 16, -} -public enum EVRNotificationType -{ - Transient = 0, - Persistent = 1, - Transient_SystemWithUserValue = 2, -} -public enum EVRNotificationStyle -{ - None = 0, - Application = 100, - Contact_Disabled = 200, - Contact_Enabled = 201, - Contact_Active = 202, -} -public enum EVRSettingsError -{ - None = 0, - IPCFailed = 1, - WriteFailed = 2, - ReadFailed = 3, - JsonParseFailed = 4, - UnsetSettingHasNoDefault = 5, -} -public enum EVRScreenshotError -{ - None = 0, - RequestFailed = 1, - IncompatibleVersion = 100, - NotFound = 101, - BufferTooSmall = 102, - ScreenshotAlreadyInProgress = 108, -} - -[StructLayout(LayoutKind.Explicit)] public struct VREvent_Data_t -{ - [FieldOffset(0)] public VREvent_Reserved_t reserved; - [FieldOffset(0)] public VREvent_Controller_t controller; - [FieldOffset(0)] public VREvent_Mouse_t mouse; - [FieldOffset(0)] public VREvent_Scroll_t scroll; - [FieldOffset(0)] public VREvent_Process_t process; - [FieldOffset(0)] public VREvent_Notification_t notification; - [FieldOffset(0)] public VREvent_Overlay_t overlay; - [FieldOffset(0)] public VREvent_Status_t status; - [FieldOffset(0)] public VREvent_Ipd_t ipd; - [FieldOffset(0)] public VREvent_Chaperone_t chaperone; - [FieldOffset(0)] public VREvent_PerformanceTest_t performanceTest; - [FieldOffset(0)] public VREvent_TouchPadMove_t touchPadMove; - [FieldOffset(0)] public VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; - [FieldOffset(0)] public VREvent_Screenshot_t screenshot; - [FieldOffset(0)] public VREvent_ScreenshotProgress_t screenshotProgress; - [FieldOffset(0)] public VREvent_ApplicationLaunch_t applicationLaunch; - [FieldOffset(0)] public VREvent_EditingCameraSurface_t cameraSurface; - [FieldOffset(0)] public VREvent_MessageOverlay_t messageOverlay; - [FieldOffset(0)] public VREvent_Keyboard_t keyboard; // This has to be at the end due to a mono bug -} - - -[StructLayout(LayoutKind.Explicit)] public struct VROverlayIntersectionMaskPrimitive_Data_t -{ - [FieldOffset(0)] public IntersectionMaskRectangle_t m_Rectangle; - [FieldOffset(0)] public IntersectionMaskCircle_t m_Circle; -} - -[StructLayout(LayoutKind.Sequential)] public struct HmdMatrix34_t -{ - public float m0; //float[3][4] - public float m1; - public float m2; - public float m3; - public float m4; - public float m5; - public float m6; - public float m7; - public float m8; - public float m9; - public float m10; - public float m11; -} -[StructLayout(LayoutKind.Sequential)] public struct HmdMatrix44_t -{ - public float m0; //float[4][4] - public float m1; - public float m2; - public float m3; - public float m4; - public float m5; - public float m6; - public float m7; - public float m8; - public float m9; - public float m10; - public float m11; - public float m12; - public float m13; - public float m14; - public float m15; -} -[StructLayout(LayoutKind.Sequential)] public struct HmdVector3_t -{ - public float v0; //float[3] - public float v1; - public float v2; -} -[StructLayout(LayoutKind.Sequential)] public struct HmdVector4_t -{ - public float v0; //float[4] - public float v1; - public float v2; - public float v3; -} -[StructLayout(LayoutKind.Sequential)] public struct HmdVector3d_t -{ - public double v0; //double[3] - public double v1; - public double v2; -} -[StructLayout(LayoutKind.Sequential)] public struct HmdVector2_t -{ - public float v0; //float[2] - public float v1; -} -[StructLayout(LayoutKind.Sequential)] public struct HmdQuaternion_t -{ - public double w; - public double x; - public double y; - public double z; -} -[StructLayout(LayoutKind.Sequential)] public struct HmdColor_t -{ - public float r; - public float g; - public float b; - public float a; -} -[StructLayout(LayoutKind.Sequential)] public struct HmdQuad_t -{ - public HmdVector3_t vCorners0; //HmdVector3_t[4] - public HmdVector3_t vCorners1; - public HmdVector3_t vCorners2; - public HmdVector3_t vCorners3; -} -[StructLayout(LayoutKind.Sequential)] public struct HmdRect2_t -{ - public HmdVector2_t vTopLeft; - public HmdVector2_t vBottomRight; -} -[StructLayout(LayoutKind.Sequential)] public struct DistortionCoordinates_t -{ - public float rfRed0; //float[2] - public float rfRed1; - public float rfGreen0; //float[2] - public float rfGreen1; - public float rfBlue0; //float[2] - public float rfBlue1; -} -[StructLayout(LayoutKind.Sequential)] public struct Texture_t -{ - public IntPtr handle; // void * - public ETextureType eType; - public EColorSpace eColorSpace; -} -[StructLayout(LayoutKind.Sequential)] public struct TrackedDevicePose_t -{ - public HmdMatrix34_t mDeviceToAbsoluteTracking; - public HmdVector3_t vVelocity; - public HmdVector3_t vAngularVelocity; - public ETrackingResult eTrackingResult; - [MarshalAs(UnmanagedType.I1)] - public bool bPoseIsValid; - [MarshalAs(UnmanagedType.I1)] - public bool bDeviceIsConnected; -} -[StructLayout(LayoutKind.Sequential)] public struct VRTextureBounds_t -{ - public float uMin; - public float vMin; - public float uMax; - public float vMax; -} -[StructLayout(LayoutKind.Sequential)] public struct VRTextureWithPose_t -{ - public HmdMatrix34_t mDeviceToAbsoluteTracking; -} -[StructLayout(LayoutKind.Sequential)] public struct VRVulkanTextureData_t -{ - public ulong m_nImage; - public IntPtr m_pDevice; // struct VkDevice_T * - public IntPtr m_pPhysicalDevice; // struct VkPhysicalDevice_T * - public IntPtr m_pInstance; // struct VkInstance_T * - public IntPtr m_pQueue; // struct VkQueue_T * - public uint m_nQueueFamilyIndex; - public uint m_nWidth; - public uint m_nHeight; - public uint m_nFormat; - public uint m_nSampleCount; -} -[StructLayout(LayoutKind.Sequential)] public struct D3D12TextureData_t -{ - public IntPtr m_pResource; // struct ID3D12Resource * - public IntPtr m_pCommandQueue; // struct ID3D12CommandQueue * - public uint m_nNodeMask; -} -[StructLayout(LayoutKind.Sequential)] public struct VREvent_Controller_t -{ - public uint button; -} -[StructLayout(LayoutKind.Sequential)] public struct VREvent_Mouse_t -{ - public float x; - public float y; - public uint button; -} -[StructLayout(LayoutKind.Sequential)] public struct VREvent_Scroll_t -{ - public float xdelta; - public float ydelta; - public uint repeatCount; -} -[StructLayout(LayoutKind.Sequential)] public struct VREvent_TouchPadMove_t -{ - [MarshalAs(UnmanagedType.I1)] - public bool bFingerDown; - public float flSecondsFingerDown; - public float fValueXFirst; - public float fValueYFirst; - public float fValueXRaw; - public float fValueYRaw; -} -[StructLayout(LayoutKind.Sequential)] public struct VREvent_Notification_t -{ - public ulong ulUserValue; - public uint notificationId; -} -[StructLayout(LayoutKind.Sequential)] public struct VREvent_Process_t -{ - public uint pid; - public uint oldPid; - [MarshalAs(UnmanagedType.I1)] - public bool bForced; -} -[StructLayout(LayoutKind.Sequential)] public struct VREvent_Overlay_t -{ - public ulong overlayHandle; -} -[StructLayout(LayoutKind.Sequential)] public struct VREvent_Status_t -{ - public uint statusState; -} -[StructLayout(LayoutKind.Sequential)] public struct VREvent_Keyboard_t -{ - public byte cNewInput0,cNewInput1,cNewInput2,cNewInput3,cNewInput4,cNewInput5,cNewInput6,cNewInput7; - public ulong uUserValue; -} -[StructLayout(LayoutKind.Sequential)] public struct VREvent_Ipd_t -{ - public float ipdMeters; -} -[StructLayout(LayoutKind.Sequential)] public struct VREvent_Chaperone_t -{ - public ulong m_nPreviousUniverse; - public ulong m_nCurrentUniverse; -} -[StructLayout(LayoutKind.Sequential)] public struct VREvent_Reserved_t -{ - public ulong reserved0; - public ulong reserved1; -} -[StructLayout(LayoutKind.Sequential)] public struct VREvent_PerformanceTest_t -{ - public uint m_nFidelityLevel; -} -[StructLayout(LayoutKind.Sequential)] public struct VREvent_SeatedZeroPoseReset_t -{ - [MarshalAs(UnmanagedType.I1)] - public bool bResetBySystemMenu; -} -[StructLayout(LayoutKind.Sequential)] public struct VREvent_Screenshot_t -{ - public uint handle; - public uint type; -} -[StructLayout(LayoutKind.Sequential)] public struct VREvent_ScreenshotProgress_t -{ - public float progress; -} -[StructLayout(LayoutKind.Sequential)] public struct VREvent_ApplicationLaunch_t -{ - public uint pid; - public uint unArgsHandle; -} -[StructLayout(LayoutKind.Sequential)] public struct VREvent_EditingCameraSurface_t -{ - public ulong overlayHandle; - public uint nVisualMode; -} -[StructLayout(LayoutKind.Sequential)] public struct VREvent_MessageOverlay_t -{ - public uint unVRMessageOverlayResponse; -} -[StructLayout(LayoutKind.Sequential)] public struct VREvent_Property_t -{ - public ulong container; - public ETrackedDeviceProperty prop; -} -[StructLayout(LayoutKind.Sequential)] public struct VREvent_t -{ - public uint eventType; - public uint trackedDeviceIndex; - public float eventAgeSeconds; - public VREvent_Data_t data; -} -// This structure is for backwards binary compatibility on Linux and OSX only -[StructLayout(LayoutKind.Sequential, Pack = 4)] public struct VREvent_t_Packed -{ - public uint eventType; - public uint trackedDeviceIndex; - public float eventAgeSeconds; - public VREvent_Data_t data; - public VREvent_t_Packed(VREvent_t unpacked) - { - this.eventType = unpacked.eventType; - this.trackedDeviceIndex = unpacked.trackedDeviceIndex; - this.eventAgeSeconds = unpacked.eventAgeSeconds; - this.data = unpacked.data; - } - public void Unpack(ref VREvent_t unpacked) - { - unpacked.eventType = this.eventType; - unpacked.trackedDeviceIndex = this.trackedDeviceIndex; - unpacked.eventAgeSeconds = this.eventAgeSeconds; - unpacked.data = this.data; - } -} -[StructLayout(LayoutKind.Sequential)] public struct HiddenAreaMesh_t -{ - public IntPtr pVertexData; // const struct vr::HmdVector2_t * - public uint unTriangleCount; -} -[StructLayout(LayoutKind.Sequential)] public struct VRControllerAxis_t -{ - public float x; - public float y; -} -[StructLayout(LayoutKind.Sequential)] public struct VRControllerState_t -{ - public uint unPacketNum; - public ulong ulButtonPressed; - public ulong ulButtonTouched; - public VRControllerAxis_t rAxis0; //VRControllerAxis_t[5] - public VRControllerAxis_t rAxis1; - public VRControllerAxis_t rAxis2; - public VRControllerAxis_t rAxis3; - public VRControllerAxis_t rAxis4; -} -// This structure is for backwards binary compatibility on Linux and OSX only -[StructLayout(LayoutKind.Sequential, Pack = 4)] public struct VRControllerState_t_Packed -{ - public uint unPacketNum; - public ulong ulButtonPressed; - public ulong ulButtonTouched; - public VRControllerAxis_t rAxis0; //VRControllerAxis_t[5] - public VRControllerAxis_t rAxis1; - public VRControllerAxis_t rAxis2; - public VRControllerAxis_t rAxis3; - public VRControllerAxis_t rAxis4; - public VRControllerState_t_Packed(VRControllerState_t unpacked) - { - this.unPacketNum = unpacked.unPacketNum; - this.ulButtonPressed = unpacked.ulButtonPressed; - this.ulButtonTouched = unpacked.ulButtonTouched; - this.rAxis0 = unpacked.rAxis0; - this.rAxis1 = unpacked.rAxis1; - this.rAxis2 = unpacked.rAxis2; - this.rAxis3 = unpacked.rAxis3; - this.rAxis4 = unpacked.rAxis4; - } - public void Unpack(ref VRControllerState_t unpacked) - { - unpacked.unPacketNum = this.unPacketNum; - unpacked.ulButtonPressed = this.ulButtonPressed; - unpacked.ulButtonTouched = this.ulButtonTouched; - unpacked.rAxis0 = this.rAxis0; - unpacked.rAxis1 = this.rAxis1; - unpacked.rAxis2 = this.rAxis2; - unpacked.rAxis3 = this.rAxis3; - unpacked.rAxis4 = this.rAxis4; - } -} -[StructLayout(LayoutKind.Sequential)] public struct Compositor_OverlaySettings -{ - public uint size; - [MarshalAs(UnmanagedType.I1)] - public bool curved; - [MarshalAs(UnmanagedType.I1)] - public bool antialias; - public float scale; - public float distance; - public float alpha; - public float uOffset; - public float vOffset; - public float uScale; - public float vScale; - public float gridDivs; - public float gridWidth; - public float gridScale; - public HmdMatrix44_t transform; -} -[StructLayout(LayoutKind.Sequential)] public struct CameraVideoStreamFrameHeader_t -{ - public EVRTrackedCameraFrameType eFrameType; - public uint nWidth; - public uint nHeight; - public uint nBytesPerPixel; - public uint nFrameSequence; - public TrackedDevicePose_t standingTrackedDevicePose; -} -[StructLayout(LayoutKind.Sequential)] public struct AppOverrideKeys_t -{ - public IntPtr pchKey; // const char * - public IntPtr pchValue; // const char * -} -[StructLayout(LayoutKind.Sequential)] public struct Compositor_FrameTiming -{ - public uint m_nSize; - public uint m_nFrameIndex; - public uint m_nNumFramePresents; - public uint m_nNumMisPresented; - public uint m_nNumDroppedFrames; - public uint m_nReprojectionFlags; - public double m_flSystemTimeInSeconds; - public float m_flPreSubmitGpuMs; - public float m_flPostSubmitGpuMs; - public float m_flTotalRenderGpuMs; - public float m_flCompositorRenderGpuMs; - public float m_flCompositorRenderCpuMs; - public float m_flCompositorIdleCpuMs; - public float m_flClientFrameIntervalMs; - public float m_flPresentCallCpuMs; - public float m_flWaitForPresentCpuMs; - public float m_flSubmitFrameMs; - public float m_flWaitGetPosesCalledMs; - public float m_flNewPosesReadyMs; - public float m_flNewFrameReadyMs; - public float m_flCompositorUpdateStartMs; - public float m_flCompositorUpdateEndMs; - public float m_flCompositorRenderStartMs; - public TrackedDevicePose_t m_HmdPose; -} -[StructLayout(LayoutKind.Sequential)] public struct Compositor_CumulativeStats -{ - public uint m_nPid; - public uint m_nNumFramePresents; - public uint m_nNumDroppedFrames; - public uint m_nNumReprojectedFrames; - public uint m_nNumFramePresentsOnStartup; - public uint m_nNumDroppedFramesOnStartup; - public uint m_nNumReprojectedFramesOnStartup; - public uint m_nNumLoading; - public uint m_nNumFramePresentsLoading; - public uint m_nNumDroppedFramesLoading; - public uint m_nNumReprojectedFramesLoading; - public uint m_nNumTimedOut; - public uint m_nNumFramePresentsTimedOut; - public uint m_nNumDroppedFramesTimedOut; - public uint m_nNumReprojectedFramesTimedOut; -} -[StructLayout(LayoutKind.Sequential)] public struct VROverlayIntersectionParams_t -{ - public HmdVector3_t vSource; - public HmdVector3_t vDirection; - public ETrackingUniverseOrigin eOrigin; -} -[StructLayout(LayoutKind.Sequential)] public struct VROverlayIntersectionResults_t -{ - public HmdVector3_t vPoint; - public HmdVector3_t vNormal; - public HmdVector2_t vUVs; - public float fDistance; -} -[StructLayout(LayoutKind.Sequential)] public struct IntersectionMaskRectangle_t -{ - public float m_flTopLeftX; - public float m_flTopLeftY; - public float m_flWidth; - public float m_flHeight; -} -[StructLayout(LayoutKind.Sequential)] public struct IntersectionMaskCircle_t -{ - public float m_flCenterX; - public float m_flCenterY; - public float m_flRadius; -} -[StructLayout(LayoutKind.Sequential)] public struct VROverlayIntersectionMaskPrimitive_t -{ - public EVROverlayIntersectionMaskPrimitiveType m_nPrimitiveType; - public VROverlayIntersectionMaskPrimitive_Data_t m_Primitive; -} -[StructLayout(LayoutKind.Sequential)] public struct RenderModel_ComponentState_t -{ - public HmdMatrix34_t mTrackingToComponentRenderModel; - public HmdMatrix34_t mTrackingToComponentLocal; - public uint uProperties; -} -[StructLayout(LayoutKind.Sequential)] public struct RenderModel_Vertex_t -{ - public HmdVector3_t vPosition; - public HmdVector3_t vNormal; - public float rfTextureCoord0; //float[2] - public float rfTextureCoord1; -} -[StructLayout(LayoutKind.Sequential)] public struct RenderModel_TextureMap_t -{ - public char unWidth; - public char unHeight; - public IntPtr rubTextureMapData; // const uint8_t * -} -// This structure is for backwards binary compatibility on Linux and OSX only -[StructLayout(LayoutKind.Sequential, Pack = 4)] public struct RenderModel_TextureMap_t_Packed -{ - public char unWidth; - public char unHeight; - public IntPtr rubTextureMapData; // const uint8_t * - public RenderModel_TextureMap_t_Packed(RenderModel_TextureMap_t unpacked) - { - this.unWidth = unpacked.unWidth; - this.unHeight = unpacked.unHeight; - this.rubTextureMapData = unpacked.rubTextureMapData; - } - public void Unpack(ref RenderModel_TextureMap_t unpacked) - { - unpacked.unWidth = this.unWidth; - unpacked.unHeight = this.unHeight; - unpacked.rubTextureMapData = this.rubTextureMapData; - } -} -[StructLayout(LayoutKind.Sequential)] public struct RenderModel_t -{ - public IntPtr rVertexData; // const struct vr::RenderModel_Vertex_t * - public uint unVertexCount; - public IntPtr rIndexData; // const uint16_t * - public uint unTriangleCount; - public int diffuseTextureId; -} -// This structure is for backwards binary compatibility on Linux and OSX only -[StructLayout(LayoutKind.Sequential, Pack = 4)] public struct RenderModel_t_Packed -{ - public IntPtr rVertexData; // const struct vr::RenderModel_Vertex_t * - public uint unVertexCount; - public IntPtr rIndexData; // const uint16_t * - public uint unTriangleCount; - public int diffuseTextureId; - public RenderModel_t_Packed(RenderModel_t unpacked) - { - this.rVertexData = unpacked.rVertexData; - this.unVertexCount = unpacked.unVertexCount; - this.rIndexData = unpacked.rIndexData; - this.unTriangleCount = unpacked.unTriangleCount; - this.diffuseTextureId = unpacked.diffuseTextureId; - } - public void Unpack(ref RenderModel_t unpacked) - { - unpacked.rVertexData = this.rVertexData; - unpacked.unVertexCount = this.unVertexCount; - unpacked.rIndexData = this.rIndexData; - unpacked.unTriangleCount = this.unTriangleCount; - unpacked.diffuseTextureId = this.diffuseTextureId; - } -} -[StructLayout(LayoutKind.Sequential)] public struct RenderModel_ControllerMode_State_t -{ - [MarshalAs(UnmanagedType.I1)] - public bool bScrollWheelVisible; -} -[StructLayout(LayoutKind.Sequential)] public struct NotificationBitmap_t -{ - public IntPtr m_pImageData; // void * - public int m_nWidth; - public int m_nHeight; - public int m_nBytesPerPixel; -} -[StructLayout(LayoutKind.Sequential)] public struct COpenVRContext -{ - public IntPtr m_pVRSystem; // class vr::IVRSystem * - public IntPtr m_pVRChaperone; // class vr::IVRChaperone * - public IntPtr m_pVRChaperoneSetup; // class vr::IVRChaperoneSetup * - public IntPtr m_pVRCompositor; // class vr::IVRCompositor * - public IntPtr m_pVROverlay; // class vr::IVROverlay * - public IntPtr m_pVRResources; // class vr::IVRResources * - public IntPtr m_pVRRenderModels; // class vr::IVRRenderModels * - public IntPtr m_pVRExtendedDisplay; // class vr::IVRExtendedDisplay * - public IntPtr m_pVRSettings; // class vr::IVRSettings * - public IntPtr m_pVRApplications; // class vr::IVRApplications * - public IntPtr m_pVRTrackedCamera; // class vr::IVRTrackedCamera * - public IntPtr m_pVRScreenshots; // class vr::IVRScreenshots * - public IntPtr m_pVRDriverManager; // class vr::IVRDriverManager * -} - -public class OpenVR -{ - - public static uint InitInternal(ref EVRInitError peError, EVRApplicationType eApplicationType) - { - return OpenVRInterop.InitInternal(ref peError, eApplicationType); - } - - public static void ShutdownInternal() - { - OpenVRInterop.ShutdownInternal(); - } - - public static bool IsHmdPresent() - { - return OpenVRInterop.IsHmdPresent(); - } - - public static bool IsRuntimeInstalled() - { - return OpenVRInterop.IsRuntimeInstalled(); - } - - public static string GetStringForHmdError(EVRInitError error) - { - return Marshal.PtrToStringAnsi(OpenVRInterop.GetStringForHmdError(error)); - } - - public static IntPtr GetGenericInterface(string pchInterfaceVersion, ref EVRInitError peError) - { - return OpenVRInterop.GetGenericInterface(pchInterfaceVersion, ref peError); - } - - public static bool IsInterfaceVersionValid(string pchInterfaceVersion) - { - return OpenVRInterop.IsInterfaceVersionValid(pchInterfaceVersion); - } - - public static uint GetInitToken() - { - return OpenVRInterop.GetInitToken(); - } - - public const uint k_nDriverNone = 4294967295; - public const uint k_unMaxDriverDebugResponseSize = 32768; - public const uint k_unTrackedDeviceIndex_Hmd = 0; - public const uint k_unMaxTrackedDeviceCount = 16; - public const uint k_unTrackedDeviceIndexOther = 4294967294; - public const uint k_unTrackedDeviceIndexInvalid = 4294967295; - public const ulong k_ulInvalidPropertyContainer = 0; - public const uint k_unInvalidPropertyTag = 0; - public const uint k_unFloatPropertyTag = 1; - public const uint k_unInt32PropertyTag = 2; - public const uint k_unUint64PropertyTag = 3; - public const uint k_unBoolPropertyTag = 4; - public const uint k_unStringPropertyTag = 5; - public const uint k_unHmdMatrix34PropertyTag = 20; - public const uint k_unHmdMatrix44PropertyTag = 21; - public const uint k_unHmdVector3PropertyTag = 22; - public const uint k_unHmdVector4PropertyTag = 23; - public const uint k_unHiddenAreaPropertyTag = 30; - public const uint k_unOpenVRInternalReserved_Start = 1000; - public const uint k_unOpenVRInternalReserved_End = 10000; - public const uint k_unMaxPropertyStringSize = 32768; - public const uint k_unControllerStateAxisCount = 5; - public const ulong k_ulOverlayHandleInvalid = 0; - public const uint k_unScreenshotHandleInvalid = 0; - public const string IVRSystem_Version = "IVRSystem_017"; - public const string IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; - public const string IVRTrackedCamera_Version = "IVRTrackedCamera_003"; - public const uint k_unMaxApplicationKeyLength = 128; - public const string k_pch_MimeType_HomeApp = "vr/home"; - public const string k_pch_MimeType_GameTheater = "vr/game_theater"; - public const string IVRApplications_Version = "IVRApplications_006"; - public const string IVRChaperone_Version = "IVRChaperone_003"; - public const string IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; - public const string IVRCompositor_Version = "IVRCompositor_021"; - public const uint k_unVROverlayMaxKeyLength = 128; - public const uint k_unVROverlayMaxNameLength = 128; - public const uint k_unMaxOverlayCount = 64; - public const uint k_unMaxOverlayIntersectionMaskPrimitivesCount = 32; - public const string IVROverlay_Version = "IVROverlay_016"; - public const string k_pch_Controller_Component_GDC2015 = "gdc2015"; - public const string k_pch_Controller_Component_Base = "base"; - public const string k_pch_Controller_Component_Tip = "tip"; - public const string k_pch_Controller_Component_HandGrip = "handgrip"; - public const string k_pch_Controller_Component_Status = "status"; - public const string IVRRenderModels_Version = "IVRRenderModels_005"; - public const uint k_unNotificationTextMaxSize = 256; - public const string IVRNotifications_Version = "IVRNotifications_002"; - public const uint k_unMaxSettingsKeyLength = 128; - public const string IVRSettings_Version = "IVRSettings_002"; - public const string k_pch_SteamVR_Section = "steamvr"; - public const string k_pch_SteamVR_RequireHmd_String = "requireHmd"; - public const string k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; - public const string k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; - public const string k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; - public const string k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe"; - public const string k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; - public const string k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; - public const string k_pch_SteamVR_SendSystemButtonToAllApps_Bool = "sendSystemButtonToAllApps"; - public const string k_pch_SteamVR_LogLevel_Int32 = "loglevel"; - public const string k_pch_SteamVR_IPD_Float = "ipd"; - public const string k_pch_SteamVR_Background_String = "background"; - public const string k_pch_SteamVR_BackgroundUseDomeProjection_Bool = "backgroundUseDomeProjection"; - public const string k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight"; - public const string k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius"; - public const string k_pch_SteamVR_GridColor_String = "gridColor"; - public const string k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; - public const string k_pch_SteamVR_ShowStage_Bool = "showStage"; - public const string k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; - public const string k_pch_SteamVR_DirectMode_Bool = "directMode"; - public const string k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid"; - public const string k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid"; - public const string k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; - public const string k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees"; - public const string k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement"; - public const string k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses"; - public const string k_pch_SteamVR_SupersampleScale_Float = "supersampleScale"; - public const string k_pch_SteamVR_AllowAsyncReprojection_Bool = "allowAsyncReprojection"; - public const string k_pch_SteamVR_AllowReprojection_Bool = "allowInterleavedReprojection"; - public const string k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection"; - public const string k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; - public const string k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView"; - public const string k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView"; - public const string k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry"; - public const string k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch"; - public const string k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch"; - public const string k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch"; - public const string k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool = "startOverlayAppsFromDashboard"; - public const string k_pch_SteamVR_EnableHomeApp = "enableHomeApp"; - public const string k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBackgroundImageTimeSec"; - public const string k_pch_SteamVR_RetailDemo_Bool = "retailDemo"; - public const string k_pch_SteamVR_IpdOffset_Float = "ipdOffset"; - public const string k_pch_SteamVR_AllowSupersampleFiltering_Bool = "allowSupersampleFiltering"; - public const string k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulkanAsync"; - public const string k_pch_Lighthouse_Section = "driver_lighthouse"; - public const string k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; - public const string k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; - public const string k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; - public const string k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; - public const string k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; - public const string k_pch_Null_Section = "driver_null"; - public const string k_pch_Null_SerialNumber_String = "serialNumber"; - public const string k_pch_Null_ModelNumber_String = "modelNumber"; - public const string k_pch_Null_WindowX_Int32 = "windowX"; - public const string k_pch_Null_WindowY_Int32 = "windowY"; - public const string k_pch_Null_WindowWidth_Int32 = "windowWidth"; - public const string k_pch_Null_WindowHeight_Int32 = "windowHeight"; - public const string k_pch_Null_RenderWidth_Int32 = "renderWidth"; - public const string k_pch_Null_RenderHeight_Int32 = "renderHeight"; - public const string k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; - public const string k_pch_Null_DisplayFrequency_Float = "displayFrequency"; - public const string k_pch_UserInterface_Section = "userinterface"; - public const string k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; - public const string k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray"; - public const string k_pch_UserInterface_Screenshots_Bool = "screenshots"; - public const string k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; - public const string k_pch_Notifications_Section = "notifications"; - public const string k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; - public const string k_pch_Keyboard_Section = "keyboard"; - public const string k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; - public const string k_pch_Keyboard_ScaleX = "ScaleX"; - public const string k_pch_Keyboard_ScaleY = "ScaleY"; - public const string k_pch_Keyboard_OffsetLeftX = "OffsetLeftX"; - public const string k_pch_Keyboard_OffsetRightX = "OffsetRightX"; - public const string k_pch_Keyboard_OffsetY = "OffsetY"; - public const string k_pch_Keyboard_Smoothing = "Smoothing"; - public const string k_pch_Perf_Section = "perfcheck"; - public const string k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; - public const string k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; - public const string k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; - public const string k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore"; - public const string k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit"; - public const string k_pch_Perf_TestData_Float = "perfTestData"; - public const string k_pch_Perf_LinuxGPUProfiling_Bool = "linuxGPUProfiling"; - public const string k_pch_CollisionBounds_Section = "collisionBounds"; - public const string k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle"; - public const string k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn"; - public const string k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn"; - public const string k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn"; - public const string k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance"; - public const string k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR"; - public const string k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG"; - public const string k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB"; - public const string k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA"; - public const string k_pch_Camera_Section = "camera"; - public const string k_pch_Camera_EnableCamera_Bool = "enableCamera"; - public const string k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard"; - public const string k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds"; - public const string k_pch_Camera_EnableCameraForRoomView_Bool = "enableCameraForRoomView"; - public const string k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR"; - public const string k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG"; - public const string k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB"; - public const string k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA"; - public const string k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength"; - public const string k_pch_audio_Section = "audio"; - public const string k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice"; - public const string k_pch_audio_OnRecordDevice_String = "onRecordDevice"; - public const string k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; - public const string k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice"; - public const string k_pch_audio_OffRecordDevice_String = "offRecordDevice"; - public const string k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; - public const string k_pch_Power_Section = "power"; - public const string k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit"; - public const string k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout"; - public const string k_pch_Power_TurnOffControllersTimeout_Float = "turnOffControllersTimeout"; - public const string k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout"; - public const string k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress"; - public const string k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositorOnStandby"; - public const string k_pch_Dashboard_Section = "dashboard"; - public const string k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; - public const string k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; - public const string k_pch_modelskin_Section = "modelskins"; - public const string k_pch_Driver_Enable_Bool = "enable"; - public const string IVRScreenshots_Version = "IVRScreenshots_001"; - public const string IVRResources_Version = "IVRResources_001"; - public const string IVRDriverManager_Version = "IVRDriverManager_001"; - - static uint VRToken { get; set; } - - const string FnTable_Prefix = "FnTable:"; - - class COpenVRContext - { - public COpenVRContext() { Clear(); } - - public void Clear() - { - m_pVRSystem = null; - m_pVRChaperone = null; - m_pVRChaperoneSetup = null; - m_pVRCompositor = null; - m_pVROverlay = null; - m_pVRRenderModels = null; - m_pVRExtendedDisplay = null; - m_pVRSettings = null; - m_pVRApplications = null; - m_pVRScreenshots = null; - m_pVRTrackedCamera = null; - } - - void CheckClear() - { - if (VRToken != GetInitToken()) - { - Clear(); - VRToken = GetInitToken(); - } - } - - public CVRSystem VRSystem() - { - CheckClear(); - if (m_pVRSystem == null) - { - var eError = EVRInitError.None; - var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRSystem_Version, ref eError); - if (pInterface != IntPtr.Zero && eError == EVRInitError.None) - m_pVRSystem = new CVRSystem(pInterface); - } - return m_pVRSystem; - } - - public CVRChaperone VRChaperone() - { - CheckClear(); - if (m_pVRChaperone == null) - { - var eError = EVRInitError.None; - var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRChaperone_Version, ref eError); - if (pInterface != IntPtr.Zero && eError == EVRInitError.None) - m_pVRChaperone = new CVRChaperone(pInterface); - } - return m_pVRChaperone; - } - - public CVRChaperoneSetup VRChaperoneSetup() - { - CheckClear(); - if (m_pVRChaperoneSetup == null) - { - var eError = EVRInitError.None; - var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRChaperoneSetup_Version, ref eError); - if (pInterface != IntPtr.Zero && eError == EVRInitError.None) - m_pVRChaperoneSetup = new CVRChaperoneSetup(pInterface); - } - return m_pVRChaperoneSetup; - } - - public CVRCompositor VRCompositor() - { - CheckClear(); - if (m_pVRCompositor == null) - { - var eError = EVRInitError.None; - var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRCompositor_Version, ref eError); - if (pInterface != IntPtr.Zero && eError == EVRInitError.None) - m_pVRCompositor = new CVRCompositor(pInterface); - } - return m_pVRCompositor; - } - - public CVROverlay VROverlay() - { - CheckClear(); - if (m_pVROverlay == null) - { - var eError = EVRInitError.None; - var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVROverlay_Version, ref eError); - if (pInterface != IntPtr.Zero && eError == EVRInitError.None) - m_pVROverlay = new CVROverlay(pInterface); - } - return m_pVROverlay; - } - - public CVRRenderModels VRRenderModels() - { - CheckClear(); - if (m_pVRRenderModels == null) - { - var eError = EVRInitError.None; - var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRRenderModels_Version, ref eError); - if (pInterface != IntPtr.Zero && eError == EVRInitError.None) - m_pVRRenderModels = new CVRRenderModels(pInterface); - } - return m_pVRRenderModels; - } - - public CVRExtendedDisplay VRExtendedDisplay() - { - CheckClear(); - if (m_pVRExtendedDisplay == null) - { - var eError = EVRInitError.None; - var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRExtendedDisplay_Version, ref eError); - if (pInterface != IntPtr.Zero && eError == EVRInitError.None) - m_pVRExtendedDisplay = new CVRExtendedDisplay(pInterface); - } - return m_pVRExtendedDisplay; - } - - public CVRSettings VRSettings() - { - CheckClear(); - if (m_pVRSettings == null) - { - var eError = EVRInitError.None; - var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRSettings_Version, ref eError); - if (pInterface != IntPtr.Zero && eError == EVRInitError.None) - m_pVRSettings = new CVRSettings(pInterface); - } - return m_pVRSettings; - } - - public CVRApplications VRApplications() - { - CheckClear(); - if (m_pVRApplications == null) - { - var eError = EVRInitError.None; - var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRApplications_Version, ref eError); - if (pInterface != IntPtr.Zero && eError == EVRInitError.None) - m_pVRApplications = new CVRApplications(pInterface); - } - return m_pVRApplications; - } - - public CVRScreenshots VRScreenshots() - { - CheckClear(); - if (m_pVRScreenshots == null) - { - var eError = EVRInitError.None; - var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRScreenshots_Version, ref eError); - if (pInterface != IntPtr.Zero && eError == EVRInitError.None) - m_pVRScreenshots = new CVRScreenshots(pInterface); - } - return m_pVRScreenshots; - } - - public CVRTrackedCamera VRTrackedCamera() - { - CheckClear(); - if (m_pVRTrackedCamera == null) - { - var eError = EVRInitError.None; - var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRTrackedCamera_Version, ref eError); - if (pInterface != IntPtr.Zero && eError == EVRInitError.None) - m_pVRTrackedCamera = new CVRTrackedCamera(pInterface); - } - return m_pVRTrackedCamera; - } - - private CVRSystem m_pVRSystem; - private CVRChaperone m_pVRChaperone; - private CVRChaperoneSetup m_pVRChaperoneSetup; - private CVRCompositor m_pVRCompositor; - private CVROverlay m_pVROverlay; - private CVRRenderModels m_pVRRenderModels; - private CVRExtendedDisplay m_pVRExtendedDisplay; - private CVRSettings m_pVRSettings; - private CVRApplications m_pVRApplications; - private CVRScreenshots m_pVRScreenshots; - private CVRTrackedCamera m_pVRTrackedCamera; - }; - - private static COpenVRContext _OpenVRInternal_ModuleContext = null; - static COpenVRContext OpenVRInternal_ModuleContext - { - get - { - if (_OpenVRInternal_ModuleContext == null) - _OpenVRInternal_ModuleContext = new COpenVRContext(); - return _OpenVRInternal_ModuleContext; - } - } - - public static CVRSystem System { get { return OpenVRInternal_ModuleContext.VRSystem(); } } - public static CVRChaperone Chaperone { get { return OpenVRInternal_ModuleContext.VRChaperone(); } } - public static CVRChaperoneSetup ChaperoneSetup { get { return OpenVRInternal_ModuleContext.VRChaperoneSetup(); } } - public static CVRCompositor Compositor { get { return OpenVRInternal_ModuleContext.VRCompositor(); } } - public static CVROverlay Overlay { get { return OpenVRInternal_ModuleContext.VROverlay(); } } - public static CVRRenderModels RenderModels { get { return OpenVRInternal_ModuleContext.VRRenderModels(); } } - public static CVRExtendedDisplay ExtendedDisplay { get { return OpenVRInternal_ModuleContext.VRExtendedDisplay(); } } - public static CVRSettings Settings { get { return OpenVRInternal_ModuleContext.VRSettings(); } } - public static CVRApplications Applications { get { return OpenVRInternal_ModuleContext.VRApplications(); } } - public static CVRScreenshots Screenshots { get { return OpenVRInternal_ModuleContext.VRScreenshots(); } } - public static CVRTrackedCamera TrackedCamera { get { return OpenVRInternal_ModuleContext.VRTrackedCamera(); } } - - /** Finds the active installation of vrclient.dll and initializes it */ - public static CVRSystem Init(ref EVRInitError peError, EVRApplicationType eApplicationType = EVRApplicationType.VRApplication_Scene) - { - VRToken = InitInternal(ref peError, eApplicationType); - OpenVRInternal_ModuleContext.Clear(); - - if (peError != EVRInitError.None) - return null; - - bool bInterfaceValid = IsInterfaceVersionValid(IVRSystem_Version); - if (!bInterfaceValid) - { - ShutdownInternal(); - peError = EVRInitError.Init_InterfaceNotFound; - return null; - } - - return OpenVR.System; - } - - /** unloads vrclient.dll. Any interface pointers from the interface are - * invalid after this point */ - public static void Shutdown() - { - ShutdownInternal(); - } - -} - - - -} - diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/VR/openvr_api.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/VR/openvr_api.cs.meta deleted file mode 100644 index 8ec0f235..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/VR/openvr_api.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: bcf96c9375432ce40a269198b2c4d89c -timeCreated: 1510959402 -licenseType: Store -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/VRBrowserHand.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/VRBrowserHand.cs deleted file mode 100644 index e8ad0e18..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/VRBrowserHand.cs +++ /dev/null @@ -1,164 +0,0 @@ -#if UNITY_2017_2_OR_NEWER - -using System; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.XR; -using ZenFulcrum.EmbeddedBrowser.VR; - -namespace ZenFulcrum.EmbeddedBrowser { - -/// -/// Class for tracking (and optionally rendering) a tracked controller, usable for VR input to a browser. -/// -/// Put two VRHand objects in the scene, one for each controller. Make sure they have the same transform parent -/// as the main camera so they will correctly move with the player. -/// (Also, make sure your main camera is centered on its local origin to start.) -/// -/// If desired, you can also put some visible geometry under the VRHand. Set it as `visualization` and it will -/// move with the controller and disappear when untracked. -/// -public class VRBrowserHand : MonoBehaviour { - - [Tooltip("Which hand we should look to track.")] - public XRNode hand = XRNode.LeftHand; - - [Tooltip("Optional visualization of this hand. It should be a child of the VRHand object and will be set active when the controller is tracking.")] - public GameObject visualization; - - /// - /// Are we currently tracking? - /// - public bool Tracked { get; private set; } - /// - /// Currently depressed buttons. - /// - public MouseButton DepressedButtons { get; private set; } - /// - /// How much we've scrolled since the last frame. Same units as Input.mouseScrollDelta. - /// - public Vector2 ScrollDelta { get; private set; } - - public string Name { get; private set; } - - private XRNodeState nodeState; - - public void OnEnable() { - VRInput.Init(); - - //VR poses update after LateUpdate and before OnPreCull - Camera.onPreCull += UpdatePreCull; - if (visualization) visualization.SetActive(false); - } - - public void OnDisable() { - // ReSharper disable once DelegateSubtraction - Camera.onPreCull -= UpdatePreCull; - } - - public virtual void Update() { - ReadInput(); - } - - protected virtual void ReadInput() { - DepressedButtons = 0; - ScrollDelta = Vector2.zero; - - if (!nodeState.tracked) return; - - var leftClick = VRInput.GetAxis(nodeState, InputAxis.MainTrigger); - if (leftClick > .9f) DepressedButtons |= MouseButton.Left; - - var rightClick = VRInput.GetAxis(nodeState, InputAxis.Grip); - if (rightClick > .5f) DepressedButtons |= MouseButton.Right; - - switch (VRInput.GetJoypadType(nodeState)) { - case JoyPadType.Joystick: - ReadJoystick(); - break; - case JoyPadType.TouchPad: - ReadTouchpad(); - break; - } - } - - [Tooltip("How much we must slide a finger/joystick before we start scrolling.")] - public float scrollThreshold = .1f; - - [Tooltip(@"How fast the page moves as we move our finger across the touchpad. -Set to a negative number to enable that infernal ""natural scrolling"" that's been making so many trackpads unusable lately.")] - public float trackpadScrollSpeed = .05f; - [Tooltip("How fast the page moves as we scroll with a joystick.")] - public float joystickScrollSpeed = 75f; - - private Vector2 lastTouchPoint; - private bool touchIsScrolling; - - protected virtual void ReadTouchpad() { - var touchPoint = new Vector2(VRInput.GetAxis(nodeState, InputAxis.JoypadX), VRInput.GetAxis(nodeState, InputAxis.JoypadY)); - - var touchButton = VRInput.GetTouch(nodeState, InputAxis.Joypad) > .5f; - - if (touchButton) { - var delta = touchPoint - lastTouchPoint; - if (!touchIsScrolling) { - if (delta.magnitude * trackpadScrollSpeed > scrollThreshold) { - touchIsScrolling = true; - lastTouchPoint = touchPoint; - } else { - //don't start updating the touch point yet - } - } else { - ScrollDelta = new Vector2(-delta.x, delta.y) * trackpadScrollSpeed; - lastTouchPoint = touchPoint; - } - } else { - ScrollDelta = new Vector2(); - lastTouchPoint = touchPoint; - touchIsScrolling = false; - } - } - - protected virtual void ReadJoystick() { - ScrollDelta = new Vector2(); - - var offset = new Vector2( - -VRInput.GetAxis(nodeState, InputAxis.JoypadX), - VRInput.GetAxis(nodeState, InputAxis.JoypadY) - ); - - offset.x = Mathf.Abs(offset.x) > scrollThreshold ? offset.x - Mathf.Sign(offset.x) * scrollThreshold : 0; - offset.y = Mathf.Abs(offset.y) > scrollThreshold ? offset.y - Mathf.Sign(offset.y) * scrollThreshold : 0; - - offset = offset * offset.magnitude * joystickScrollSpeed * Time.deltaTime; - - ScrollDelta = offset; - } - - private int lastFrame; - private List states = new List(); - private bool hasTouchpad; - - private void UpdatePreCull(Camera cam) { - if (lastFrame == Time.frameCount) return; - lastFrame = Time.frameCount; - - InputTracking.GetNodeStates(states); - - for (int i = 0; i < states.Count; i++) { - //Debug.Log("A thing: " + states[i].nodeType + " and " + InputTracking.GetNodeName(states[i].uniqueID)); - if (states[i].nodeType != hand) continue; - - nodeState = states[i]; - - Vector3 pos; - if (states[i].TryGetPosition(out pos)) transform.localPosition = pos; - Quaternion rot; - if (states[i].TryGetRotation(out rot)) transform.localRotation = rot; - - if (visualization) visualization.SetActive(Tracked = states[i].tracked); - } - } -} -} -#endif \ No newline at end of file diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/VRBrowserHand.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/VRBrowserHand.cs.meta deleted file mode 100644 index 434266e3..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/VRBrowserHand.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 90563e5bb8b70484bb282d0f7597d699 -timeCreated: 1510968427 -licenseType: Store -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/WebResources.cs b/SXElectricalInspection/Assets/ZFBrowser/Scripts/WebResources.cs deleted file mode 100644 index 4caa458a..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/WebResources.cs +++ /dev/null @@ -1,320 +0,0 @@ -using System; -using UnityEngine; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Runtime.InteropServices; -using System.Text; -using System.Text.RegularExpressions; -using System.Threading; -using Debug = UnityEngine.Debug; - -namespace ZenFulcrum.EmbeddedBrowser { - -/// -/// Acts like a webserver for local files in Assets/../BrowserAssets. -/// To override this, extend the class and call `BrowserNative.webResources = myInstance` -/// before doing anything with Browsers. -/// -/// Basic workflow: -/// HandleRequest will get called when a browser needs something. From there you can either: -/// - Call SendPreamble, then SendData (any number of times), then SendEnd or -/// - Call one of the other Send* functions to send the whole response at once -/// Response sending is asynchronous, so you can do the above immediately, or after a delay. -/// -/// Additionally, the Send* methods may be called from any thread given they are called in the right -/// order and the right number of times. -/// -/// -public abstract class WebResources { - - /// - /// Mapping of file extension => HTTP mime type - /// Treated as immutable. - /// - public static readonly Dictionary extensionMimeTypes = new Dictionary() { - {"css", "text/css"}, - {"gif", "image/gif"}, - {"html", "text/html"}, - {"htm", "text/html"}, - {"jpeg", "image/jpeg"}, - {"jpg", "image/jpeg"}, - {"js", "application/javascript"}, - {"mp3", "audio/mpeg"}, - {"mpeg", "video/mpeg"}, - {"ogg", "application/ogg"}, - {"ogv", "video/ogg"}, - {"webm", "video/webm"}, - {"png", "image/png"}, - {"svg", "image/svg+xml"}, - {"txt", "text/plain"}, - {"xml", "application/xml"}, - - //Need to add something? Some resources: - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types - // http://www.iana.org/assignments/media-types/media-types.xhtml - - //Default/fallback - {"*", "application/octet-stream"}, - }; - - /// - /// Mapping of status code to status text. - /// Treated as immutable. - /// - public static readonly Dictionary statusTexts = new Dictionary() { - // https://tools.ietf.org/html/rfc2616#section-10 - {100, "Continue"}, - {101, "Switching Protocols"}, - {200, "OK"}, - {201, "Created"}, - {202, "Accepted"}, - {203, "Non-Authoritative Information"}, - {204, "No Content"}, - {205, "Reset Content"}, - {206, "Partial Content"}, - {300, "Multiple Choices"}, - {301, "Moved Permanently"}, - {302, "Found"}, - {303, "See Other"}, - {304, "Not Modified"}, - {305, "Use Proxy"}, - {307, "Temporary Redirect"}, - {400, "Bad Request"}, - {401, "Unauthorized"}, - {402, "Payment Required"}, - {403, "Forbidden"}, - {404, "Not Found"}, - {405, "Method Not Allowed"}, - {406, "Not Acceptable"}, - {407, "Proxy Authentication Required"}, - {408, "Request Timeout"}, - {409, "Conflict"}, - {410, "Gone"}, - {411, "Length Required"}, - {412, "Precondition Failed"}, - {413, "Request Entity Too Large"}, - {414, "Request-URI Too Long"}, - {415, "Unsupported Media Type"}, - {416, "Requested Range Not Satisfiable"}, - {417, "Expectation Failed"}, - {500, "Internal Server Error"}, - {501, "Not Implemented"}, - {502, "Bad Gateway"}, - {503, "Service Unavailable"}, - {504, "Gateway Timeout"}, - {505, "HTTP Version Not Supported"}, - - //Default/fallback - {-1, ""}, - }; - - public class ResponsePreamble { - /// - /// HTTP Status code (e.g. 200 for ok, 404 for not found) - /// - public int statusCode = 200; - /// - /// HTTP Status text ("OK", "Not Found", etc.) - /// - public string statusText = null; - /// - /// Content mime-type. - /// - public string mimeType = "text/plain; charset=UTF-8"; - /// - /// Number of bytes in the response. -1 if unknown. - /// If set >= 0, the number of bytes in the result need to match. - /// - public int length = -1; - /// - /// Any additional headers you'd like to send with the request - /// - public Dictionary headers = new Dictionary(); - } - - /// - /// Called when a resource is requested. (Only GET requests are supported at present.) - /// After this is called, eventually call one or more of the Send* functions with the given id - /// to send the response (see class docs). - /// - /// - /// - public abstract void HandleRequest(int id, string url); - - /// - /// Sends the full binary response to a request. - /// - /// - /// - /// - protected virtual void SendResponse(int id, byte[] data, string mimeType = "application/octet-stream") { - var pre = new ResponsePreamble { - headers = null, - length = data.Length, - mimeType = mimeType, - statusCode = 200, - }; - SendPreamble(id, pre); - SendData(id, data); - SendEnd(id); - } - - /// - /// Sends the full HTML or text response to a request. - /// - /// - /// - /// - protected virtual void SendResponse(int id, string text, string mimeType = "text/html; charset=UTF-8") { - var data = Encoding.UTF8.GetBytes(text); - - var pre = new ResponsePreamble { - headers = null, - length = data.Length, - mimeType = mimeType, - statusCode = 200, - }; - SendPreamble(id, pre); - SendData(id, data); - SendEnd(id); - } - - /// - /// Sends an HTML formatted error message. - /// - /// - /// - /// - protected virtual void SendError(int id, string html, int errorCode = 500) { - var data = Encoding.UTF8.GetBytes(html); - - var pre = new ResponsePreamble { - headers = null, - length = data.Length, - mimeType = "text/html; charset=UTF-8", - statusCode = errorCode, - }; - - SendPreamble(id, pre); - SendData(id, data); - SendEnd(id); - } - - protected virtual void SendFile(int id, FileInfo file, bool forceDownload = false) { - new Thread(() => { - try { - if (!file.Exists) { - SendError(id, "

File not found

", 404); - return; - } - - FileStream fileStream = null; - try { - fileStream = file.OpenRead(); - } catch (Exception ex) { - Debug.LogException(ex); - SendError(id, "

File unavailable

", 500); - return; - } - - string mimeType; - var ext = file.Extension; - if (ext.Length > 0) ext = ext.Substring(1).ToLowerInvariant(); - if (!extensionMimeTypes.TryGetValue(ext, out mimeType)) { - mimeType = extensionMimeTypes["*"]; - } - //Debug.Log("response type: " + mimeType + " extension " + file.Extension); - - var pre = new ResponsePreamble { - headers = new Dictionary(), - length = (int)file.Length, - mimeType = mimeType, - statusCode = 200, - }; - - if (forceDownload) { - pre.headers["Content-Disposition"] = "attachment; filename=\"" + file.Name.Replace("\"", "\\\"") + "\""; - } - - SendPreamble(id, pre); - - int readCount = -1; - byte[] buffer = new byte[Math.Min(pre.length, 32 * 1024)]; - while (readCount != 0) { - readCount = fileStream.Read(buffer, 0, buffer.Length); - SendData(id, buffer, readCount); - } - SendEnd(id); - - fileStream.Close(); - - } catch (Exception ex) { - Debug.LogException(ex); - } - }).Start(); - - } - - /// - /// Sends headers, status code, content-type, etc. for a request. - /// - /// - /// - protected void SendPreamble(int id, ResponsePreamble pre) { - var headers = new JSONNode(JSONNode.NodeType.Object); - if (pre.headers != null) { - foreach (var kvp in pre.headers) { - headers[kvp.Key] = kvp.Value; - } - } - - if (pre.statusText == null) { - if (!statusTexts.TryGetValue(pre.statusCode, out pre.statusText)) { - pre.statusText = statusTexts[-1]; - } - } - headers[":status:"] = pre.statusCode.ToString(); - headers[":statusText:"] = pre.statusText; - headers["Content-Type"] = pre.mimeType; - - //Debug.Log("response headers " + headers.AsJSON); - - lock (BrowserNative.symbolsLock) { - BrowserNative.zfb_sendRequestHeaders(id, pre.length, headers.AsJSON); - } - } - - /// - /// Sends response body for the request. - /// Call as many times as you'd like. - /// If you specified a length in the preamble make sure all writes add up to exactly that number of bytes. - /// - /// - /// - /// How much of data to write, or -1 to send it all - protected void SendData(int id, byte[] data, int length = -1) { - if (data == null || data.Length == 0 || length == 0) return; - if (length < 0) length = data.Length; - if (length > data.Length) throw new IndexOutOfRangeException(); - - var handle = GCHandle.Alloc(data, GCHandleType.Pinned); - lock (BrowserNative.symbolsLock) { - BrowserNative.zfb_sendRequestData(id, handle.AddrOfPinnedObject(), length); - } - handle.Free(); - } - - /// - /// Call this after you are done calling SendData and you are ready to complete the response. - /// - /// - protected void SendEnd(int id) { - lock (BrowserNative.symbolsLock) { - BrowserNative.zfb_sendRequestData(id, IntPtr.Zero, 0); - } - } - -} - -} diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/WebResources.cs.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/WebResources.cs.meta deleted file mode 100644 index f9e0f398..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/WebResources.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: b444127e6cd251d4f99cd0315125d33a -timeCreated: 1447457584 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/ZFBrowser.asmdef b/SXElectricalInspection/Assets/ZFBrowser/Scripts/ZFBrowser.asmdef deleted file mode 100644 index 3567eea9..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/ZFBrowser.asmdef +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "ZFBrowser", - "references": [], - "includePlatforms": [ - "Editor", - "LinuxStandalone64", - "macOSStandalone", - "WindowsStandalone32", - "WindowsStandalone64" - ], - "excludePlatforms": [] -} \ No newline at end of file diff --git a/SXElectricalInspection/Assets/ZFBrowser/Scripts/ZFBrowser.asmdef.meta b/SXElectricalInspection/Assets/ZFBrowser/Scripts/ZFBrowser.asmdef.meta deleted file mode 100644 index b4c256ce..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/Scripts/ZFBrowser.asmdef.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 8b34362e30924cc4c898574d4e3cbff3 -timeCreated: 1518478829 -licenseType: Store -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/SXElectricalInspection/Assets/ZFBrowser/ThirdPartyNotices.txt b/SXElectricalInspection/Assets/ZFBrowser/ThirdPartyNotices.txt deleted file mode 100644 index 48cc082c..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/ThirdPartyNotices.txt +++ /dev/null @@ -1,17412 +0,0 @@ -This production is brought to you, in part, by the following libraries. - -Most of the libraries listed below are parts of the Chromium web browser, -embedded using CEF: - https://www.chromium.org/Home - https://bitbucket.org/chromiumembedded/cef -The files that primarily contain code from Chromium are the zf_cef.dll/so -(normally named libcef.dll/so) and "Chromium Embedded Framework" shared -libraries. - -Note that some of the libraries listed below are only used as tools -during building and development and are not included with this product. -Check the Chromium source code for details. - ------------------------------------------------------------------------ -OpenVR C# Bindings 1.0.10 -https://github.com/ValveSoftware/openvr/blob/master/headers/openvr_api.cs ------------------------------------------------------------------------ -Copyright (c) 2015, Valve Corporation -All rights reserved. - ---- See BSD License (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -SimpleJson.cs -https://github.com/facebook-csharp-sdk/simple-json ------------------------------------------------------------------------ -Copyright (c) 2011, The Outercurve Foundation, 2015 Zen Fulcrum LLC - -Licensed under the MIT License (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.opensource.org/licenses/mit-license.php - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com), -Prabir Shrestha (prabir.me), Jonathan Stephens ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -C-Sharp-Promise -https://github.com/Real-Serious-Games/C-Sharp-Promise ------------------------------------------------------------------------ -The MIT License (MIT) - -Copyright (c) 2014 Real Serious Games - ---- See MIT License at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -libX11 -https://www.x.org/wiki/ ------------------------------------------------------------------------ -Copyright © 1985, 1986, 1987, 1988, 1989, 1991, 1994, 1996, 2002 The Open Group - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the “Software”), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not -be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from The -Open Group. - -Copyright © 1985, 1986, 1987, 1988, 1989, 1991 Digital Equipment -Corporation - -Permission to use, copy, modify and distribute this documentation for any -purpose and without fee is hereby granted, provided that the above -copyright notice appears in all copies and that both that copyright -notice and this permission notice appear in supporting documentation, -and that the names of Digital and Tetronix not be used in in advertising -or publicity pertaining to distribution of the software without specific, -written prior permission. Digital and Tetronix make no representations -about the suitability of the software described herein for any purpose. -It is provided “as is” without express or implied warranty. - -TekHVC is a trademark of Tektronix, Inc. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Chromium Embedded Framework -https://bitbucket.org/chromiumembedded/cef/ ------------------------------------------------------------------------ -Copyright (c) 2008-2014 Marshall A. Greenblatt. Portions Copyright (c) -2006-2009 Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the name Chromium Embedded -Framework nor the names of its contributors may be used to endorse -or promote products derived from this software without specific prior -written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -(Components of) Bazel -https://github.com/bazelbuild/bazel ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -AXE-CORE Accessibility Audit -https://github.com/dequelabs/axe-core/ ------------------------------------------------------------------------ - - ---- See Mozilla Public License (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Accessibility Audit library, from Accessibility Developer Tools -https://raw.githubusercontent.com/GoogleChrome/accessibility-developer-tools/master/dist/js/axs_testing.js ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Alliance for Open Media Video Codec -https://aomedia.googlesource.com/aom/ ------------------------------------------------------------------------ -Copyright (c) 2016, Alliance for Open Media. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Almost Native Graphics Layer Engine -http://code.google.com/p/angleproject/ ------------------------------------------------------------------------ -// Copyright (C) 2002-2013 The ANGLE Project Authors. - -// All rights reserved. - -// - -// Redistribution and use in source and binary forms, with or without - -// modification, are permitted provided that the following conditions - -// are met: - -// - -// Redistributions of source code must retain the above copyright - -// notice, this list of conditions and the following disclaimer. - -// - -// Redistributions in binary form must reproduce the above - -// copyright notice, this list of conditions and the following - -// disclaimer in the documentation and/or other materials provided - -// with the distribution. - -// - -// Neither the name of TransGaming Inc., Google Inc., 3DLabs Inc. - -// Ltd., nor the names of their contributors may be used to endorse - -// or promote products derived from this software without specific - -// prior written permission. - -// - -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - -// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - -// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - -// POSSIBILITY OF SUCH DAMAGE. - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -American Fuzzy Lop -http://lcamtuf.coredump.cx/afl/ ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Android -http://source.android.com/ ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Android Crazy Linker -https://chromium.googlesource.com/chromium/src.git/+/master/third_party/android_crazy_linker/ ------------------------------------------------------------------------ -// Copyright 2014 The Chromium Authors. All rights reserved. -// -// - ---- See BSD License (Google) at the end of this file --- - -Copyright (C) 2012 The Android Open Source Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Android Explicit Synchronization -http://source.android.com/ ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Android FloatProperty -https://developer.android.com/reference/android/util/FloatProperty.html ------------------------------------------------------------------------ -Copyright (c) 2005-2008, The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); you may not - use this file except in compliance with the License. - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - License for the specific language governing permissions and limitations under - the License. - ---- See Apache License (A) at the end of this file --- - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2011 Google Inc. All Rights Reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Android Open Source Project - App Compat Library -https://android.googlesource.com/platform/frameworks/support ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Android Open Source Project - Settings App -https://android.googlesource.com/platform/packages/apps/Settings/ ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Android Support Library Bottom Navigation Menu -https://developer.android.com/reference/android/support/design/widget/BottomNavigationView.html ------------------------------------------------------------------------ -Copyright (c) 2005-2008, The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); you may not - use this file except in compliance with the License. - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - License for the specific language governing permissions and limitations under - the License. - ---- See Apache License (A) at the end of this file --- - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2011 Google Inc. All Rights Reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Apple sample code -http://developer.apple.com/ ------------------------------------------------------------------------ -Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple -Inc. ("Apple") in consideration of your agreement to the following -terms, and your use, installation, modification or redistribution of -this Apple software constitutes acceptance of these terms. If you do -not agree with these terms, please do not use, install, modify or -redistribute this Apple software. - -In consideration of your agreement to abide by the following terms, and -subject to these terms, Apple grants you a personal, non-exclusive -license, under Apple's copyrights in this original Apple software (the -"Apple Software"), to use, reproduce, modify and redistribute the Apple -Software, with or without modifications, in source and/or binary forms; -provided that if you redistribute the Apple Software in its entirety and -without modifications, you must retain this notice and the following -text and disclaimers in all such redistributions of the Apple Software. -Neither the name, trademarks, service marks or logos of Apple Inc. may -be used to endorse or promote products derived from the Apple Software -without specific prior written permission from Apple. Except as -expressly stated in this notice, no other rights or licenses, express or -implied, are granted by Apple herein, including but not limited to any -patent rights that may be infringed by your derivative works or by other -works in which the Apple Software may be incorporated. - -The Apple Software is provided by Apple on an "AS IS" basis. APPLE -MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION -THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND -OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. - -IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL -OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, -MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED -AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), -STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -Copyright (C) 2009 Apple Inc. All Rights Reserved. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -AsyncTask -https://chromium.googlesource.com/android_tools.git/+/master/sdk/sources/android-23/android/os/AsyncTask.java ------------------------------------------------------------------------ -Notice for all the files in this folder. ------------------------------------------------------------- - - - - Copyright (c) 2005-2008, The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); you may not - use this file except in compliance with the License. - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - License for the specific language governing permissions and limitations under - the License. - ---- See Apache License (A) at the end of this file --- - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2011 Google Inc. All Rights Reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -BSDiff -http://www.daemonology.net/bsdiff/ ------------------------------------------------------------------------ -Copyright 2003-2005 Colin Percival -All rights reserved - -Redistribution and use in source and binary forms, with or without -modification, are permitted providing that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Blackmagic DeckLink SDK - Mac -http://software.blackmagicdesign.com/DeckLink/v10.7/Blackmagic_DeckLink_SDK_10.7.zip ------------------------------------------------------------------------ -Extracted from mac/include/DeckLinkAPI.h: - -** Copyright (c) 2014 Blackmagic Design -** -** Permission is hereby granted, free of charge, to any person or organization -** obtaining a copy of the software and accompanying documentation covered by -** this license (the "Software") to use, reproduce, display, distribute, -** execute, and transmit the Software, and to prepare derivative works of the -** Software, and to permit third-parties to whom the Software is furnished to -** do so, all subject to the following: -** -** The copyright notices in the Software and this entire statement, including -** the above license grant, this restriction and the following disclaimer, -** must be included in all copies of the Software, in whole or in part, and -** all derivative works of the Software, unless such copies or derivative -** works are solely in the form of machine-executable object code generated by -** a source language processor. -** -** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -** DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Braille Translation Library -https://github.com/liblouis/liblouis ------------------------------------------------------------------------ -(Copied from src/liblouis/liblouis.h.in) - -/* liblouis Braille Translation and Back-Translation Library - - Based on the Linux screenreader BRLTTY, copyright (C) 1999-2006 by - The BRLTTY Team - - Copyright (C) 2004, 2005, 2006, 2009 ViewPlus Technologies, Inc. - www.viewplus.com and JJB Software, Inc. www.jjb-software.com - - liblouis is free software: you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - liblouis is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program. If not, see - . - - Maintained by John J. Boyer john.boyer@abilitiessoft.com - */ - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Breakpad, An open-source multi-platform crash reporting system -https://chromium.googlesource.com/breakpad/breakpad ------------------------------------------------------------------------ -Copyright (c) 2006, Google Inc. -All rights reserved. - ---- See BSD License (Google) at the end of this file --- - -COPYRIGHT AND PERMISSION NOTICE - -Copyright (c) 1996 - 2011, Daniel Stenberg, . - -All rights reserved. - ---- See ISC License at the end of this file --- - -Except as contained in this notice, the name of a copyright holder shall not -be used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization of the copyright holder. - - -Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - -@APPLE_LICENSE_HEADER_START@ - -This file contains Original Code and/or Modifications of Original Code -as defined in and that are subject to the Apple Public Source License -Version 2.0 (the 'License'). You may not use this file except in -compliance with the License. Please obtain a copy of the License at -http://www.opensource.apple.com/apsl/ and read it before using this -file. - -The Original Code and all software distributed under the License are -distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER -EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, -INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. -Please see the License for the specific language governing rights and -limitations under the License. - -@APPLE_LICENSE_HEADER_END@ - - -Copyright 2007-2008 Google Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); you may not -use this file except in compliance with the License. You may obtain a copy -of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -License for the specific language governing permissions and limitations under -the License. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Brotli -https://github.com/google/brotli ------------------------------------------------------------------------ -Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. - ---- See MIT License at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -CRC32C -https://github.com/google/crc32c ------------------------------------------------------------------------ -Copyright 2017, The CRC32C Authors. - ---- See BSD License (Google) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Chrome Custom Tabs - Example and Usage -https://chromium.googlesource.com/external/github.com/GoogleChrome/custom-tabs-client ------------------------------------------------------------------------ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -ChromeVox -http://code.google.com/p/google-axs-chrome/ ------------------------------------------------------------------------ -// Copyright 2013 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Closure compiler -http://github.com/google/closure-compiler ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Cocoa extension code from Camino -http://caminobrowser.org/ ------------------------------------------------------------------------ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2002 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Compact Encoding Detection -https://github.com/google/compact_enc_det ------------------------------------------------------------------------ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// -// - ---- See BSD License (Google) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Compact Language Detector v3 -https://github.com/google/cld3 ------------------------------------------------------------------------ -Copyright 2016 Google Inc. All rights reserved. - ---- See Apache License (A) at the end of this file --- - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2016, Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Crashpad -https://crashpad.chromium.org/ ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Darwin -http://www.opensource.apple.com/ ------------------------------------------------------------------------ -APPLE PUBLIC SOURCE LICENSE Version 2.0 - August 6, 2003 - -Please read this License carefully before downloading this software. By -downloading or using this software, you are agreeing to be bound by the terms of -this License. If you do not or cannot agree to the terms of this License, -please do not download or use the software. - -Apple Note: In January 2007, Apple changed its corporate name from "Apple -Computer, Inc." to "Apple Inc." This change has been reflected below and -copyright years updated, but no other changes have been made to the APSL 2.0. - -1. General; Definitions. This License applies to any program or other work -which Apple Inc. ("Apple") makes publicly available and which contains a notice -placed by Apple identifying such program or work as "Original Code" and stating -that it is subject to the terms of this Apple Public Source License version 2.0 -("License"). As used in this License: - -1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is the -grantor of rights, (i) claims of patents that are now or hereafter acquired, -owned by or assigned to Apple and (ii) that cover subject matter contained in -the Original Code, but only to the extent necessary to use, reproduce and/or -distribute the Original Code without infringement; and (b) in the case where You -are the grantor of rights, (i) claims of patents that are now or hereafter -acquired, owned by or assigned to You and (ii) that cover subject matter in Your -Modifications, taken alone or in combination with Original Code. - -1.2 "Contributor" means any person or entity that creates or contributes to the -creation of Modifications. - -1.3 "Covered Code" means the Original Code, Modifications, the combination of -Original Code and any Modifications, and/or any respective portions thereof. - -1.4 "Externally Deploy" means: (a) to sublicense, distribute or otherwise make -Covered Code available, directly or indirectly, to anyone other than You; and/or -(b) to use Covered Code, alone or as part of a Larger Work, in any way to -provide a service, including but not limited to delivery of content, through -electronic communication with a client other than You. - -1.5 "Larger Work" means a work which combines Covered Code or portions thereof -with code not governed by the terms of this License. - -1.6 "Modifications" mean any addition to, deletion from, and/or change to, the -substance and/or structure of the Original Code, any previous Modifications, the -combination of Original Code and any previous Modifications, and/or any -respective portions thereof. When code is released as a series of files, a -Modification is: (a) any addition to or deletion from the contents of a file -containing Covered Code; and/or (b) any new file or other representation of -computer program statements that contains any part of Covered Code. - -1.7 "Original Code" means (a) the Source Code of a program or other work as -originally made available by Apple under this License, including the Source Code -of any updates or upgrades to such programs or works made available by Apple -under this License, and that has been expressly identified by Apple as such in -the header file(s) of such work; and (b) the object code compiled from such -Source Code and originally made available by Apple under this License - -1.8 "Source Code" means the human readable form of a program or other work that -is suitable for making modifications to it, including all modules it contains, -plus any associated interface definition files, scripts used to control -compilation and installation of an executable (object code). - -1.9 "You" or "Your" means an individual or a legal entity exercising rights -under this License. For legal entities, "You" or "Your" includes any entity -which controls, is controlled by, or is under common control with, You, where -"control" means (a) the power, direct or indirect, to cause the direction or -management of such entity, whether by contract or otherwise, or (b) ownership of -fifty percent (50%) or more of the outstanding shares or beneficial ownership of -such entity. - -2. Permitted Uses; Conditions & Restrictions. Subject to the terms and -conditions of this License, Apple hereby grants You, effective on the date You -accept this License and download the Original Code, a world-wide, royalty-free, -non-exclusive license, to the extent of Apple's Applicable Patent Rights and -copyrights covering the Original Code, to do the following: - -2.1 Unmodified Code. You may use, reproduce, display, perform, internally -distribute within Your organization, and Externally Deploy verbatim, unmodified -copies of the Original Code, for commercial or non-commercial purposes, provided -that in each instance: - -(a) You must retain and reproduce in all copies of Original Code the copyright -and other proprietary notices and disclaimers of Apple as they appear in the -Original Code, and keep intact all notices in the Original Code that refer to -this License; and - -(b) You must include a copy of this License with every copy of Source Code of -Covered Code and documentation You distribute or Externally Deploy, and You may -not offer or impose any terms on such Source Code that alter or restrict this -License or the recipients' rights hereunder, except as permitted under Section -6. - -2.2 Modified Code. You may modify Covered Code and use, reproduce, display, -perform, internally distribute within Your organization, and Externally Deploy -Your Modifications and Covered Code, for commercial or non-commercial purposes, -provided that in each instance You also meet all of these conditions: - -(a) You must satisfy all the conditions of Section 2.1 with respect to the -Source Code of the Covered Code; - -(b) You must duplicate, to the extent it does not already exist, the notice in -Exhibit A in each file of the Source Code of all Your Modifications, and cause -the modified files to carry prominent notices stating that You changed the files -and the date of any change; and - -(c) If You Externally Deploy Your Modifications, You must make Source Code of -all Your Externally Deployed Modifications either available to those to whom You -have Externally Deployed Your Modifications, or publicly available. Source Code -of Your Externally Deployed Modifications must be released under the terms set -forth in this License, including the license grants set forth in Section 3 -below, for as long as you Externally Deploy the Covered Code or twelve (12) -months from the date of initial External Deployment, whichever is longer. You -should preferably distribute the Source Code of Your Externally Deployed -Modifications electronically (e.g. download from a web site). - -2.3 Distribution of Executable Versions. In addition, if You Externally Deploy -Covered Code (Original Code and/or Modifications) in object code, executable -form only, You must include a prominent notice, in the code itself as well as in -related documentation, stating that Source Code of the Covered Code is available -under the terms of this License with information on how and where to obtain such -Source Code. - -2.4 Third Party Rights. You expressly acknowledge and agree that although -Apple and each Contributor grants the licenses to their respective portions of -the Covered Code set forth herein, no assurances are provided by Apple or any -Contributor that the Covered Code does not infringe the patent or other -intellectual property rights of any other entity. Apple and each Contributor -disclaim any liability to You for claims brought by any other entity based on -infringement of intellectual property rights or otherwise. As a condition to -exercising the rights and licenses granted hereunder, You hereby assume sole -responsibility to secure any other intellectual property rights needed, if any. -For example, if a third party patent license is required to allow You to -distribute the Covered Code, it is Your responsibility to acquire that license -before distributing the Covered Code. - -3. Your Grants. In consideration of, and as a condition to, the licenses -granted to You under this License, You hereby grant to any person or entity -receiving or distributing Covered Code under this License a non-exclusive, -royalty-free, perpetual, irrevocable license, under Your Applicable Patent -Rights and other intellectual property rights (other than patent) owned or -controlled by You, to use, reproduce, display, perform, modify, sublicense, -distribute and Externally Deploy Your Modifications of the same scope and extent -as Apple's licenses under Sections 2.1 and 2.2 above. - -4. Larger Works. You may create a Larger Work by combining Covered Code with -other code not governed by the terms of this License and distribute the Larger -Work as a single product. In each such instance, You must make sure the -requirements of this License are fulfilled for the Covered Code or any portion -thereof. - -5. Limitations on Patent License. Except as expressly stated in Section 2, no -other patent rights, express or implied, are granted by Apple herein. -Modifications and/or Larger Works may require additional patent licenses from -Apple which Apple may grant in its sole discretion. - -6. Additional Terms. You may choose to offer, and to charge a fee for, -warranty, support, indemnity or liability obligations and/or other rights -consistent with the scope of the license granted herein ("Additional Terms") to -one or more recipients of Covered Code. However, You may do so only on Your own -behalf and as Your sole responsibility, and not on behalf of Apple or any -Contributor. You must obtain the recipient's agreement that any such Additional -Terms are offered by You alone, and You hereby agree to indemnify, defend and -hold Apple and every Contributor harmless for any liability incurred by or -claims asserted against Apple or such Contributor by reason of any such -Additional Terms. - -7. Versions of the License. Apple may publish revised and/or new versions of -this License from time to time. Each version will be given a distinguishing -version number. Once Original Code has been published under a particular -version of this License, You may continue to use it under the terms of that -version. You may also choose to use such Original Code under the terms of any -subsequent version of this License published by Apple. No one other than Apple -has the right to modify the terms applicable to Covered Code created under this -License. - -8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in part -pre-release, untested, or not fully tested works. The Covered Code may contain -errors that could cause failures or loss of data, and may be incomplete or -contain inaccuracies. You expressly acknowledge and agree that use of the -Covered Code, or any portion thereof, is at Your sole and entire risk. THE -COVERED CODE IS PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT OF -ANY KIND AND APPLE AND APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "APPLE" -FOR THE PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM -ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF MERCHANTABILITY, OF SATISFACTORY -QUALITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF ACCURACY, OF QUIET ENJOYMENT, -AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. APPLE AND EACH CONTRIBUTOR DOES NOT -WARRANT AGAINST INTERFERENCE WITH YOUR ENJOYMENT OF THE COVERED CODE, THAT THE -FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR REQUIREMENTS, THAT THE -OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT -DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO ORAL OR WRITTEN INFORMATION -OR ADVICE GIVEN BY APPLE, AN APPLE AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR -SHALL CREATE A WARRANTY. You acknowledge that the Covered Code is not intended -for use in the operation of nuclear facilities, aircraft navigation, -communication systems, or air traffic control machines in which case the failure -of the Covered Code could lead to death, personal injury, or severe physical or -environmental damage. - -9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT -SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT -OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO THIS LICENSE OR YOUR USE -OR INABILITY TO USE THE COVERED CODE, OR ANY PORTION THEREOF, WHETHER UNDER A -THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR -OTHERWISE, EVEN IF APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY -REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF -INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY TO YOU. In -no event shall Apple's total liability to You for all damages (other than as may -be required by applicable law) under this License exceed the amount of fifty -dollars ($50.00). - -10. Trademarks. This License does not grant any rights to use the trademarks -or trade names "Apple", "Mac", "Mac OS", "QuickTime", "QuickTime Streaming -Server" or any other trademarks, service marks, logos or trade names belonging -to Apple (collectively "Apple Marks") or to any trademark, service mark, logo or -trade name belonging to any Contributor. You agree not to use any Apple Marks -in or as part of the name of products derived from the Original Code or to -endorse or promote products derived from the Original Code other than as -expressly permitted by and in strict compliance at all times with Apple's third -party trademark usage guidelines which are posted at -http://www.apple.com/legal/guidelinesfor3rdparties.html. - -11. Ownership. Subject to the licenses granted under this License, each -Contributor retains all rights, title and interest in and to any Modifications -made by such Contributor. Apple retains all rights, title and interest in and -to the Original Code and any Modifications made by or on behalf of Apple ("Apple -Modifications"), and such Apple Modifications will not be automatically subject -to this License. Apple may, at its sole discretion, choose to license such -Apple Modifications under this License, or on different terms from those -contained in this License or may choose not to license them at all. - -12. Termination. - -12.1 Termination. This License and the rights granted hereunder will -terminate: - -(a) automatically without notice from Apple if You fail to comply with any -term(s) of this License and fail to cure such breach within 30 days of becoming -aware of such breach; (b) immediately in the event of the circumstances -described in Section 13.5(b); or (c) automatically without notice from Apple if -You, at any time during the term of this License, commence an action for patent -infringement against Apple; provided that Apple did not first commence an action -for patent infringement against You in that instance. - -12.2 Effect of Termination. Upon termination, You agree to immediately stop -any further use, reproduction, modification, sublicensing and distribution of -the Covered Code. All sublicenses to the Covered Code which have been properly -granted prior to termination shall survive any termination of this License. -Provisions which, by their nature, should remain in effect beyond the -termination of this License shall survive, including but not limited to Sections -3, 5, 8, 9, 10, 11, 12.2 and 13. No party will be liable to any other for -compensation, indemnity or damages of any sort solely as a result of terminating -this License in accordance with its terms, and termination of this License will -be without prejudice to any other right or remedy of any party. - -13. Miscellaneous. - -13.1 Government End Users. The Covered Code is a "commercial item" as defined -in FAR 2.101. Government software and technical data rights in the Covered Code -include only those rights customarily provided to the public as defined in this -License. This customary commercial license in technical data and software is -provided in accordance with FAR 12.211 (Technical Data) and 12.212 (Computer -Software) and, for Department of Defense purchases, DFAR 252.227-7015 (Technical -Data -- Commercial Items) and 227.7202-3 (Rights in Commercial Computer Software -or Computer Software Documentation). Accordingly, all U.S. Government End Users -acquire Covered Code with only those rights set forth herein. - -13.2 Relationship of Parties. This License will not be construed as creating -an agency, partnership, joint venture or any other form of legal association -between or among You, Apple or any Contributor, and You will not represent to -the contrary, whether expressly, by implication, appearance or otherwise. - -13.3 Independent Development. Nothing in this License will impair Apple's -right to acquire, license, develop, have others develop for it, market and/or -distribute technology or products that perform the same or similar functions as, -or otherwise compete with, Modifications, Larger Works, technology or products -that You may develop, produce, market or distribute. - -13.4 Waiver; Construction. Failure by Apple or any Contributor to enforce any -provision of this License will not be deemed a waiver of future enforcement of -that or any other provision. Any law or regulation which provides that the -language of a contract shall be construed against the drafter will not apply to -this License. - -13.5 Severability. (a) If for any reason a court of competent jurisdiction -finds any provision of this License, or portion thereof, to be unenforceable, -that provision of the License will be enforced to the maximum extent permissible -so as to effect the economic benefits and intent of the parties, and the -remainder of this License will continue in full force and effect. (b) -Notwithstanding the foregoing, if applicable law prohibits or restricts You from -fully and/or specifically complying with Sections 2 and/or 3 or prevents the -enforceability of either of those Sections, this License will immediately -terminate and You must immediately discontinue any use of the Covered Code and -destroy all copies of it that are in your possession or control. - -13.6 Dispute Resolution. Any litigation or other dispute resolution between -You and Apple relating to this License shall take place in the Northern District -of California, and You and Apple hereby consent to the personal jurisdiction of, -and venue in, the state and federal courts within that District with respect to -this License. The application of the United Nations Convention on Contracts for -the International Sale of Goods is expressly excluded. - -13.7 Entire Agreement; Governing Law. This License constitutes the entire -agreement between the parties with respect to the subject matter hereof. This -License shall be governed by the laws of the United States and the State of -California, except that body of California law concerning conflicts of law. - -Where You are located in the province of Quebec, Canada, the following clause -applies: The parties hereby confirm that they have requested that this License -and all related documents be drafted in English. Les parties ont exigé que le -présent contrat et tous les documents connexes soient rédigés en anglais. - -EXHIBIT A. - -"Portions Copyright (c) 1999-2007 Apple Inc. All Rights Reserved. - -This file contains Original Code and/or Modifications of Original Code as -defined in and that are subject to the Apple Public Source License Version 2.0 -(the 'License'). You may not use this file except in compliance with the -License. Please obtain a copy of the License at -http://www.opensource.apple.com/apsl/ and read it before using this file. - -The Original Code and all software distributed under the License are distributed -on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, -AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, -ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET -ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the specific language -governing rights and limitations under the License." ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -David M. Gay's floating point routines -http://www.netlib.org/fp/ ------------------------------------------------------------------------ -/**************************************************************** - * - * The author of this software is David M. Gay. - * - * Copyright (c) 1991, 2000, 2001 by Lucent Technologies. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose without fee is hereby granted, provided that this entire notice - * is included in all copies of any software which is or includes a copy - * or modification of this software and in all copies of the supporting - * documentation for such software. - * - * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY - * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY - * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. - * - ***************************************************************/ ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Expat XML Parser -http://sourceforge.net/projects/expat/ ------------------------------------------------------------------------ -Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper -Copyright (c) 2001-2017 Expat maintainers - ---- See MIT License at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -FlatBuffers -https://github.com/google/flatbuffers ------------------------------------------------------------------------ - - ---- See Apache License (A) at the end of this file --- - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2014 Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Flot Javascript/JQuery library for creating graphs -http://www.flotcharts.org/ ------------------------------------------------------------------------ -Copyright (c) 2007-2013 IOLA and Ole Laursen - ---- See MIT License at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -FreeType -http://www.freetype.org/ ------------------------------------------------------------------------ - The FreeType Project LICENSE - ---------------------------- - - 2006-Jan-27 - - Copyright 1996-2002, 2006 by - David Turner, Robert Wilhelm, and Werner Lemberg - - - -Introduction -============ - - The FreeType Project is distributed in several archive packages; - some of them may contain, in addition to the FreeType font engine, - various tools and contributions which rely on, or relate to, the - FreeType Project. - - This license applies to all files found in such packages, and - which do not fall under their own explicit license. The license - affects thus the FreeType font engine, the test programs, - documentation and makefiles, at the very least. - - This license was inspired by the BSD, Artistic, and IJG - (Independent JPEG Group) licenses, which all encourage inclusion - and use of free software in commercial and freeware products - alike. As a consequence, its main points are that: - - o We don't promise that this software works. However, we will be - interested in any kind of bug reports. (`as is' distribution) - - o You can use this software for whatever you want, in parts or - full form, without having to pay us. (`royalty-free' usage) - - o You may not pretend that you wrote this software. If you use - it, or only parts of it, in a program, you must acknowledge - somewhere in your documentation that you have used the - FreeType code. (`credits') - - We specifically permit and encourage the inclusion of this - software, with or without modifications, in commercial products. - We disclaim all warranties covering The FreeType Project and - assume no liability related to The FreeType Project. - - - Finally, many people asked us for a preferred form for a - credit/disclaimer to use in compliance with this license. We thus - encourage you to use the following text: - - """ - Portions of this software are copyright © The FreeType - Project (www.freetype.org). All rights reserved. - """ - - Please replace with the value from the FreeType version you - actually use. - - -Legal Terms -=========== - -0. Definitions --------------- - - Throughout this license, the terms `package', `FreeType Project', - and `FreeType archive' refer to the set of files originally - distributed by the authors (David Turner, Robert Wilhelm, and - Werner Lemberg) as the `FreeType Project', be they named as alpha, - beta or final release. - - `You' refers to the licensee, or person using the project, where - `using' is a generic term including compiling the project's source - code as well as linking it to form a `program' or `executable'. - This program is referred to as `a program using the FreeType - engine'. - - This license applies to all files distributed in the original - FreeType Project, including all source code, binaries and - documentation, unless otherwise stated in the file in its - original, unmodified form as distributed in the original archive. - If you are unsure whether or not a particular file is covered by - this license, you must contact us to verify this. - - The FreeType Project is copyright (C) 1996-2000 by David Turner, - Robert Wilhelm, and Werner Lemberg. All rights reserved except as - specified below. - -1. No Warranty --------------- - - THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY - KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO - USE, OF THE FREETYPE PROJECT. - -2. Redistribution ------------------ - - This license grants a worldwide, royalty-free, perpetual and - irrevocable right and license to use, execute, perform, compile, - display, copy, create derivative works of, distribute and - sublicense the FreeType Project (in both source and object code - forms) and derivative works thereof for any purpose; and to - authorize others to exercise some or all of the rights granted - herein, subject to the following conditions: - - o Redistribution of source code must retain this license file - (`FTL.TXT') unaltered; any additions, deletions or changes to - the original files must be clearly indicated in accompanying - documentation. The copyright notices of the unaltered, - original files must be preserved in all copies of source - files. - - o Redistribution in binary form must provide a disclaimer that - states that the software is based in part of the work of the - FreeType Team, in the distribution documentation. We also - encourage you to put an URL to the FreeType web page in your - documentation, though this isn't mandatory. - - These conditions apply to any software derived from or based on - the FreeType Project, not just the unmodified files. If you use - our work, you must acknowledge us. However, no fee need be paid - to us. - -3. Advertising --------------- - - Neither the FreeType authors and contributors nor you shall use - the name of the other for commercial, advertising, or promotional - purposes without specific prior written permission. - - We suggest, but do not require, that you use one or more of the - following phrases to refer to this software in your documentation - or advertising materials: `FreeType Project', `FreeType Engine', - `FreeType library', or `FreeType Distribution'. - - As you have not signed this license, you are not required to - accept it. However, as the FreeType Project is copyrighted - material, only this license, or another one contracted with the - authors, grants you the right to use, distribute, and modify it. - Therefore, by using, distributing, or modifying the FreeType - Project, you indicate that you understand and accept all the terms - of this license. - -4. Contacts ------------ - - There are two mailing lists related to FreeType: - - o freetype@nongnu.org - - Discusses general use and applications of FreeType, as well as - future and wanted additions to the library and distribution. - If you are looking for support, start in this list if you - haven't found anything to help you in the documentation. - - o freetype-devel@nongnu.org - - Discusses bugs, as well as engine internals, design issues, - specific licenses, porting, etc. - - Our home page can be found at - - http://www.freetype.org - - ---- end of FTL.TXT --- ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -GVR Keyboard -chrome://credits/NA ------------------------------------------------------------------------ - - ---- See Apache License (A) at the end of this file --- - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2014 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -GifPlayer Animated GIF Library -http://android-gifview.googlecode.com/svn/!svn/bc/8/trunk/ ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Google Cache Invalidation API -https://chromium.googlesource.com/chromium/src/+/master/third_party/cacheinvalidation/README.chromium ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Google Input Tools -https://github.com/googlei18n/google-input-tools.git ------------------------------------------------------------------------ - - ---- See Apache License (A) at the end of this file --- - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2013 Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Google Toolbox for Mac -https://github.com/google/google-toolbox-for-mac ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Google VR SDK -https://github.com/googlevr/gvr-android-sdk ------------------------------------------------------------------------ -Copyright (c) 2015, Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---- See Apache License (A) at the end of this file --- - -==================== -Open Source Licenses -==================== - -This software may use portions of the following libraries subject to the accompanying licenses: - -**************************** -chromium_audio -**************************** -// Copyright 2014 The Chromium Authors. All rights reserved. -// -// - ---- See BSD License (Google) at the end of this file --- - -curl -**************************** -COPYRIGHT AND PERMISSION NOTICE - -Copyright (c) 1996 - 2014, Daniel Stenberg, . - -All rights reserved. - ---- See ISC License at the end of this file --- - -Except as contained in this notice, the name of a copyright holder shall not -be used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization of the copyright holder. - - -**************************** -dynamic_annotations -**************************** -Copyright (c) 2008-2009, Google Inc. -All rights reserved. - ---- See BSD License (Google) at the end of this file --- - -eigen3 -**************************** -Eigen is primarily MPL2 licensed. See COPYING.MPL2 and these links: - http://www.mozilla.org/MPL/2.0/ - http://www.mozilla.org/MPL/2.0/FAQ.html - -Some files contain third-party code under BSD or LGPL licenses, whence -the other COPYING.* files here. - -All the LGPL code is either LGPL 2.1-only, or LGPL 2.1-or-later. -For this reason, the COPYING.LGPL file contains the LGPL 2.1 text. - -If you want to guarantee that the Eigen code that you are #including -is licensed under the MPL2 and possibly more permissive licenses (like -BSD), #define this preprocessor symbol: EIGEN_MPL2_ONLY -For example, with most compilers, you could add this to your project - CXXFLAGS: -DEIGEN_MPL2_ONLY -This will cause a compilation error to be generated if you #include -any code that is LGPL licensed. - ----------------------------------------------------------------------- -Following applies to: -./test/mapstaticmethods.cpp -./test/schur_real.cpp -./test/prec_inverse_4x4.cpp -./test/smallvectors.cpp -./test/redux.cpp -./test/special_numbers.cpp -./test/adjoint.cpp -./test/resize.cpp -./test/mixingtypes.cpp -./test/product_trmv.cpp -./test/sparse_solvers.cpp -./test/cholesky.cpp -./test/geo_quaternion.cpp -./test/miscmatrices.cpp -./test/stddeque.cpp -./test/integer_types.cpp -./test/product_large.cpp -./test/eigensolver_generic.cpp -./test/householder.cpp -./test/geo_orthomethods.cpp -./test/array_for_matrix.cpp -./test/sparseLM.cpp -./test/upperbidiagonalization.cpp -./test/nomalloc.cpp -./test/packetmath.cpp -./test/jacobisvd.cpp -./test/geo_transformations.cpp -./test/swap.cpp -./test/eigensolver_selfadjoint.cpp -./test/inverse.cpp -./test/product_selfadjoint.cpp -./test/product_trsolve.cpp -./test/product_extra.cpp -./test/sparse_solver.h -./test/mapstride.cpp -./test/mapped_matrix.cpp -./test/geo_eulerangles.cpp -./test/eigen2support.cpp -./test/denseLM.cpp -./test/stdvector.cpp -./test/nesting_ops.cpp -./test/sparse_permutations.cpp -./test/zerosized.cpp -./test/exceptions.cpp -./test/vectorwiseop.cpp -./test/cwiseop.cpp -./test/basicstuff.cpp -./test/product_trmm.cpp -./test/linearstructure.cpp -./test/sparse_product.cpp -./test/stdvector_overload.cpp -./test/stable_norm.cpp -./test/umeyama.cpp -./test/unalignedcount.cpp -./test/triangular.cpp -./test/product_mmtr.cpp -./test/sparse_basic.cpp -./test/sparse_vector.cpp -./test/meta.cpp -./test/real_qz.cpp -./test/ref.cpp -./test/eigensolver_complex.cpp -./test/cholmod_support.cpp -./test/conjugate_gradient.cpp -./test/sparse.h -./test/simplicial_cholesky.cpp -./test/bicgstab.cpp -./test/dynalloc.cpp -./test/product_notemporary.cpp -./test/geo_hyperplane.cpp -./test/lu.cpp -./test/qr.cpp -./test/hessenberg.cpp -./test/sizeof.cpp -./test/main.h -./test/selfadjoint.cpp -./test/permutationmatrices.cpp -./test/superlu_support.cpp -./test/qtvector.cpp -./test/geo_homogeneous.cpp -./test/determinant.cpp -./test/array_reverse.cpp -./test/unalignedassert.cpp -./test/stdlist.cpp -./test/product_symm.cpp -./test/corners.cpp -./test/dontalign.cpp -./test/visitor.cpp -./test/geo_alignedbox.cpp -./test/diagonalmatrices.cpp -./test/product_small.cpp -./test/eigensolver_generalized_real.cpp -./test/umfpack_support.cpp -./test/first_aligned.cpp -./test/qr_fullpivoting.cpp -./test/array_replicate.cpp -./test/geo_parametrizedline.cpp -./test/eigen2/eigen2_unalignedassert.cpp -./test/eigen2/eigen2_prec_inverse_4x4.cpp -./test/eigen2/eigen2_alignedbox.cpp -./test/eigen2/eigen2_sparse_product.cpp -./test/eigen2/eigen2_meta.cpp -./test/eigen2/eigen2_nomalloc.cpp -./test/eigen2/eigen2_visitor.cpp -./test/eigen2/eigen2_packetmath.cpp -./test/eigen2/eigen2_svd.cpp -./test/eigen2/eigen2_mixingtypes.cpp -./test/eigen2/eigen2_qr.cpp -./test/eigen2/eigen2_cwiseop.cpp -./test/eigen2/eigen2_geometry_with_eigen2_prefix.cpp -./test/eigen2/eigen2_smallvectors.cpp -./test/eigen2/eigen2_commainitializer.cpp -./test/eigen2/eigen2_sparse_solvers.cpp -./test/eigen2/eigen2_hyperplane.cpp -./test/eigen2/eigen2_eigensolver.cpp -./test/eigen2/eigen2_linearstructure.cpp -./test/eigen2/eigen2_sizeof.cpp -./test/eigen2/eigen2_parametrizedline.cpp -./test/eigen2/eigen2_lu.cpp -./test/eigen2/eigen2_adjoint.cpp -./test/eigen2/eigen2_geometry.cpp -./test/eigen2/eigen2_stdvector.cpp -./test/eigen2/eigen2_newstdvector.cpp -./test/eigen2/eigen2_submatrices.cpp -./test/eigen2/sparse.h -./test/eigen2/eigen2_swap.cpp -./test/eigen2/eigen2_triangular.cpp -./test/eigen2/eigen2_basicstuff.cpp -./test/eigen2/gsl_helper.h -./test/eigen2/eigen2_dynalloc.cpp -./test/eigen2/eigen2_array.cpp -./test/eigen2/eigen2_map.cpp -./test/eigen2/main.h -./test/eigen2/eigen2_miscmatrices.cpp -./test/eigen2/eigen2_product_large.cpp -./test/eigen2/eigen2_first_aligned.cpp -./test/eigen2/eigen2_cholesky.cpp -./test/eigen2/eigen2_determinant.cpp -./test/eigen2/eigen2_sum.cpp -./test/eigen2/eigen2_inverse.cpp -./test/eigen2/eigen2_regression.cpp -./test/eigen2/eigen2_product_small.cpp -./test/eigen2/eigen2_qtvector.cpp -./test/eigen2/eigen2_sparse_vector.cpp -./test/eigen2/product.h -./test/eigen2/eigen2_sparse_basic.cpp -./test/eigen2/eigen2_bug_132.cpp -./test/array.cpp -./test/product_syrk.cpp -./test/commainitializer.cpp -./test/conservative_resize.cpp -./test/qr_colpivoting.cpp -./test/nullary.cpp -./test/bandmatrix.cpp -./test/pastix_support.cpp -./test/product.h -./test/block.cpp -./test/vectorization_logic.cpp -./test/jacobi.cpp -./test/diagonal.cpp -./test/schur_complex.cpp -./test/sizeoverflow.cpp -./bench/BenchTimer.h -./bench/benchFFT.cpp -./bench/eig33.cpp -./bench/spbench/spbenchsolver.h -./bench/spbench/spbenchstyle.h -./lapack/complex_double.cpp -./lapack/cholesky.cpp -./lapack/lapack_common.h -./lapack/eigenvalues.cpp -./lapack/single.cpp -./lapack/lu.cpp -./lapack/complex_single.cpp -./lapack/double.cpp -./demos/mix_eigen_and_c/binary_library.cpp -./demos/mix_eigen_and_c/binary_library.h -./demos/mix_eigen_and_c/example.c -./demos/mandelbrot/mandelbrot.cpp -./demos/mandelbrot/mandelbrot.h -./demos/opengl/icosphere.cpp -./demos/opengl/icosphere.h -./demos/opengl/camera.cpp -./demos/opengl/quaternion_demo.h -./demos/opengl/camera.h -./demos/opengl/trackball.h -./demos/opengl/gpuhelper.h -./demos/opengl/trackball.cpp -./demos/opengl/gpuhelper.cpp -./demos/opengl/quaternion_demo.cpp -./debug/gdb/printers.py -./unsupported/test/minres.cpp -./unsupported/test/openglsupport.cpp -./unsupported/test/jacobisvd.cpp -./unsupported/test/dgmres.cpp -./unsupported/test/matrix_square_root.cpp -./unsupported/test/bdcsvd.cpp -./unsupported/test/matrix_exponential.cpp -./unsupported/test/forward_adolc.cpp -./unsupported/test/polynomialsolver.cpp -./unsupported/test/matrix_function.cpp -./unsupported/test/sparse_extra.cpp -./unsupported/test/matrix_functions.h -./unsupported/test/svd_common.h -./unsupported/test/FFTW.cpp -./unsupported/test/alignedvector3.cpp -./unsupported/test/autodiff.cpp -./unsupported/test/gmres.cpp -./unsupported/test/BVH.cpp -./unsupported/test/levenberg_marquardt.cpp -./unsupported/test/matrix_power.cpp -./unsupported/test/kronecker_product.cpp -./unsupported/test/splines.cpp -./unsupported/test/polynomialutils.cpp -./unsupported/bench/bench_svd.cpp -./unsupported/Eigen/IterativeSolvers -./unsupported/Eigen/src/IterativeSolvers/DGMRES.h -./unsupported/Eigen/src/IterativeSolvers/IncompleteLU.h -./unsupported/Eigen/src/IterativeSolvers/GMRES.h -./unsupported/Eigen/src/IterativeSolvers/IncompleteCholesky.h -./unsupported/Eigen/src/IterativeSolvers/Scaling.h -./unsupported/Eigen/src/IterativeSolvers/MINRES.h -./unsupported/Eigen/src/SparseExtra/RandomSetter.h -./unsupported/Eigen/src/SparseExtra/MatrixMarketIterator.h -./unsupported/Eigen/src/SparseExtra/DynamicSparseMatrix.h -./unsupported/Eigen/src/SparseExtra/MarketIO.h -./unsupported/Eigen/src/SparseExtra/BlockOfDynamicSparseMatrix.h -./unsupported/Eigen/src/KroneckerProduct/KroneckerTensorProduct.h -./unsupported/Eigen/src/NonLinearOptimization/LevenbergMarquardt.h -./unsupported/Eigen/src/NonLinearOptimization/HybridNonLinearSolver.h -./unsupported/Eigen/src/BVH/BVAlgorithms.h -./unsupported/Eigen/src/BVH/KdBVH.h -./unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h -./unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h -./unsupported/Eigen/src/AutoDiff/AutoDiffVector.h -./unsupported/Eigen/src/Splines/Spline.h -./unsupported/Eigen/src/Splines/SplineFitting.h -./unsupported/Eigen/src/Splines/SplineFwd.h -./unsupported/Eigen/src/SVD/JacobiSVD.h -./unsupported/Eigen/src/SVD/BDCSVD.h -./unsupported/Eigen/src/SVD/SVDBase.h -./unsupported/Eigen/src/MatrixFunctions/MatrixFunction.h -./unsupported/Eigen/src/MatrixFunctions/MatrixSquareRoot.h -./unsupported/Eigen/src/MatrixFunctions/MatrixLogarithm.h -./unsupported/Eigen/src/MatrixFunctions/StemFunction.h -./unsupported/Eigen/src/MatrixFunctions/MatrixPower.h -./unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h -./unsupported/Eigen/src/MatrixFunctions/MatrixFunctionAtomic.h -./unsupported/Eigen/src/MoreVectorization/MathFunctions.h -./unsupported/Eigen/src/LevenbergMarquardt/LevenbergMarquardt.h -./unsupported/Eigen/src/FFT/ei_fftw_impl.h -./unsupported/Eigen/src/FFT/ei_kissfft_impl.h -./unsupported/Eigen/src/Polynomials/PolynomialSolver.h -./unsupported/Eigen/src/Polynomials/Companion.h -./unsupported/Eigen/src/Polynomials/PolynomialUtils.h -./unsupported/Eigen/src/NumericalDiff/NumericalDiff.h -./unsupported/Eigen/src/Skyline/SkylineProduct.h -./unsupported/Eigen/src/Skyline/SkylineMatrixBase.h -./unsupported/Eigen/src/Skyline/SkylineStorage.h -./unsupported/Eigen/src/Skyline/SkylineUtil.h -./unsupported/Eigen/src/Skyline/SkylineInplaceLU.h -./unsupported/Eigen/src/Skyline/SkylineMatrix.h -./unsupported/Eigen/SparseExtra -./unsupported/Eigen/AdolcForward -./unsupported/Eigen/KroneckerProduct -./unsupported/Eigen/NonLinearOptimization -./unsupported/Eigen/BVH -./unsupported/Eigen/OpenGLSupport -./unsupported/Eigen/ArpackSupport -./unsupported/Eigen/AutoDiff -./unsupported/Eigen/Splines -./unsupported/Eigen/MPRealSupport -./unsupported/Eigen/MatrixFunctions -./unsupported/Eigen/MoreVectorization -./unsupported/Eigen/LevenbergMarquardt -./unsupported/Eigen/AlignedVector3 -./unsupported/Eigen/FFT -./unsupported/Eigen/Polynomials -./unsupported/Eigen/NumericalDiff -./unsupported/Eigen/Skyline -./COPYING.README -./COPYING.README -./LICENSE -./LICENSE -./LICENSE -./Eigen/Eigen2Support -./Eigen/src/Eigen2Support/VectorBlock.h -./Eigen/src/Eigen2Support/Cwise.h -./Eigen/src/Eigen2Support/Minor.h -./Eigen/src/Eigen2Support/Lazy.h -./Eigen/src/Eigen2Support/Memory.h -./Eigen/src/Eigen2Support/MathFunctions.h -./Eigen/src/Eigen2Support/Geometry/AlignedBox.h -./Eigen/src/Eigen2Support/Geometry/Hyperplane.h -./Eigen/src/Eigen2Support/Geometry/Quaternion.h -./Eigen/src/Eigen2Support/Geometry/Rotation2D.h -./Eigen/src/Eigen2Support/Geometry/ParametrizedLine.h -./Eigen/src/Eigen2Support/Geometry/RotationBase.h -./Eigen/src/Eigen2Support/Geometry/Translation.h -./Eigen/src/Eigen2Support/Geometry/Scaling.h -./Eigen/src/Eigen2Support/Geometry/AngleAxis.h -./Eigen/src/Eigen2Support/Geometry/Transform.h -./Eigen/src/Eigen2Support/TriangularSolver.h -./Eigen/src/Eigen2Support/LU.h -./Eigen/src/Eigen2Support/QR.h -./Eigen/src/Eigen2Support/SVD.h -./Eigen/src/Eigen2Support/Meta.h -./Eigen/src/Eigen2Support/Block.h -./Eigen/src/Eigen2Support/Macros.h -./Eigen/src/Eigen2Support/LeastSquares.h -./Eigen/src/Eigen2Support/CwiseOperators.h -./Eigen/src/Jacobi/Jacobi.h -./Eigen/src/misc/Kernel.h -./Eigen/src/misc/SparseSolve.h -./Eigen/src/misc/Solve.h -./Eigen/src/misc/Image.h -./Eigen/src/SparseCore/SparseColEtree.h -./Eigen/src/SparseCore/SparseTranspose.h -./Eigen/src/SparseCore/SparseUtil.h -./Eigen/src/SparseCore/SparseCwiseBinaryOp.h -./Eigen/src/SparseCore/SparseDiagonalProduct.h -./Eigen/src/SparseCore/SparseProduct.h -./Eigen/src/SparseCore/SparseDot.h -./Eigen/src/SparseCore/SparseCwiseUnaryOp.h -./Eigen/src/SparseCore/SparseSparseProductWithPruning.h -./Eigen/src/SparseCore/SparseBlock.h -./Eigen/src/SparseCore/SparseDenseProduct.h -./Eigen/src/SparseCore/CompressedStorage.h -./Eigen/src/SparseCore/SparseMatrixBase.h -./Eigen/src/SparseCore/MappedSparseMatrix.h -./Eigen/src/SparseCore/SparseTriangularView.h -./Eigen/src/SparseCore/SparseView.h -./Eigen/src/SparseCore/SparseFuzzy.h -./Eigen/src/SparseCore/TriangularSolver.h -./Eigen/src/SparseCore/SparseSelfAdjointView.h -./Eigen/src/SparseCore/SparseMatrix.h -./Eigen/src/SparseCore/SparseVector.h -./Eigen/src/SparseCore/AmbiVector.h -./Eigen/src/SparseCore/ConservativeSparseSparseProduct.h -./Eigen/src/SparseCore/SparseRedux.h -./Eigen/src/SparseCore/SparsePermutation.h -./Eigen/src/Eigenvalues/RealSchur.h -./Eigen/src/Eigenvalues/ComplexEigenSolver.h -./Eigen/src/Eigenvalues/GeneralizedEigenSolver.h -./Eigen/src/Eigenvalues/ComplexSchur.h -./Eigen/src/Eigenvalues/RealQZ.h -./Eigen/src/Eigenvalues/EigenSolver.h -./Eigen/src/Eigenvalues/HessenbergDecomposition.h -./Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h -./Eigen/src/Eigenvalues/Tridiagonalization.h -./Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h -./Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h -./Eigen/src/SuperLUSupport/SuperLUSupport.h -./Eigen/src/StlSupport/StdDeque.h -./Eigen/src/StlSupport/StdVector.h -./Eigen/src/StlSupport/StdList.h -./Eigen/src/StlSupport/details.h -./Eigen/src/SparseQR/SparseQR.h -./Eigen/src/LU/Inverse.h -./Eigen/src/LU/arch/Inverse_SSE.h -./Eigen/src/LU/Determinant.h -./Eigen/src/LU/PartialPivLU.h -./Eigen/src/LU/FullPivLU.h -./Eigen/src/UmfPackSupport/UmfPackSupport.h -./Eigen/src/OrderingMethods/Ordering.h -./Eigen/src/OrderingMethods/Eigen_Colamd.h -./Eigen/src/QR/HouseholderQR.h -./Eigen/src/QR/ColPivHouseholderQR.h -./Eigen/src/QR/FullPivHouseholderQR.h -./Eigen/src/SVD/JacobiSVD.h -./Eigen/src/SVD/UpperBidiagonalization.h -./Eigen/src/Geometry/OrthoMethods.h -./Eigen/src/Geometry/AlignedBox.h -./Eigen/src/Geometry/Hyperplane.h -./Eigen/src/Geometry/Quaternion.h -./Eigen/src/Geometry/EulerAngles.h -./Eigen/src/Geometry/Rotation2D.h -./Eigen/src/Geometry/ParametrizedLine.h -./Eigen/src/Geometry/RotationBase.h -./Eigen/src/Geometry/arch/Geometry_SSE.h -./Eigen/src/Geometry/Umeyama.h -./Eigen/src/Geometry/Homogeneous.h -./Eigen/src/Geometry/Translation.h -./Eigen/src/Geometry/Scaling.h -./Eigen/src/Geometry/AngleAxis.h -./Eigen/src/Geometry/Transform.h -./Eigen/src/plugins/BlockMethods.h -./Eigen/src/plugins/CommonCwiseUnaryOps.h -./Eigen/src/plugins/CommonCwiseBinaryOps.h -./Eigen/src/plugins/MatrixCwiseUnaryOps.h -./Eigen/src/plugins/MatrixCwiseBinaryOps.h -./Eigen/src/Householder/Householder.h -./Eigen/src/Householder/HouseholderSequence.h -./Eigen/src/Householder/BlockHouseholder.h -./Eigen/src/Core/VectorBlock.h -./Eigen/src/Core/Matrix.h -./Eigen/src/Core/Ref.h -./Eigen/src/Core/SelfAdjointView.h -./Eigen/src/Core/MathFunctions.h -./Eigen/src/Core/GlobalFunctions.h -./Eigen/src/Core/MapBase.h -./Eigen/src/Core/EigenBase.h -./Eigen/src/Core/GenericPacketMath.h -./Eigen/src/Core/NestByValue.h -./Eigen/src/Core/CwiseUnaryOp.h -./Eigen/src/Core/SolveTriangular.h -./Eigen/src/Core/Fuzzy.h -./Eigen/src/Core/Visitor.h -./Eigen/src/Core/Map.h -./Eigen/src/Core/NoAlias.h -./Eigen/src/Core/Diagonal.h -./Eigen/src/Core/StableNorm.h -./Eigen/src/Core/CoreIterators.h -./Eigen/src/Core/products/Parallelizer.h -./Eigen/src/Core/products/SelfadjointMatrixVector.h -./Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h -./Eigen/src/Core/products/TriangularSolverMatrix.h -./Eigen/src/Core/products/GeneralMatrixMatrix.h -./Eigen/src/Core/products/SelfadjointProduct.h -./Eigen/src/Core/products/CoeffBasedProduct.h -./Eigen/src/Core/products/TriangularMatrixVector.h -./Eigen/src/Core/products/SelfadjointMatrixMatrix.h -./Eigen/src/Core/products/TriangularSolverVector.h -./Eigen/src/Core/products/SelfadjointRank2Update.h -./Eigen/src/Core/products/GeneralBlockPanelKernel.h -./Eigen/src/Core/products/GeneralMatrixVector.h -./Eigen/src/Core/products/TriangularMatrixMatrix.h -./Eigen/src/Core/Reverse.h -./Eigen/src/Core/BooleanRedux.h -./Eigen/src/Core/Replicate.h -./Eigen/src/Core/arch/AltiVec/PacketMath.h -./Eigen/src/Core/arch/AltiVec/Complex.h -./Eigen/src/Core/arch/SSE/PacketMath.h -./Eigen/src/Core/arch/SSE/Complex.h -./Eigen/src/Core/arch/SSE/MathFunctions.h -./Eigen/src/Core/arch/NEON/PacketMath.h -./Eigen/src/Core/arch/NEON/Complex.h -./Eigen/src/Core/arch/Default/Settings.h -./Eigen/src/Core/CwiseUnaryView.h -./Eigen/src/Core/Array.h -./Eigen/src/Core/ArrayWrapper.h -./Eigen/src/Core/Swap.h -./Eigen/src/Core/Transpositions.h -./Eigen/src/Core/Random.h -./Eigen/src/Core/IO.h -./Eigen/src/Core/SelfCwiseBinaryOp.h -./Eigen/src/Core/VectorwiseOp.h -./Eigen/src/Core/Select.h -./Eigen/src/Core/ArrayBase.h -./Eigen/src/Core/DenseCoeffsBase.h -./Eigen/src/Core/DiagonalProduct.h -./Eigen/src/Core/Assign.h -./Eigen/src/Core/Redux.h -./Eigen/src/Core/ForceAlignedAccess.h -./Eigen/src/Core/BandMatrix.h -./Eigen/src/Core/PlainObjectBase.h -./Eigen/src/Core/DenseBase.h -./Eigen/src/Core/Flagged.h -./Eigen/src/Core/CwiseBinaryOp.h -./Eigen/src/Core/ProductBase.h -./Eigen/src/Core/TriangularMatrix.h -./Eigen/src/Core/Transpose.h -./Eigen/src/Core/DiagonalMatrix.h -./Eigen/src/Core/Dot.h -./Eigen/src/Core/Functors.h -./Eigen/src/Core/PermutationMatrix.h -./Eigen/src/Core/NumTraits.h -./Eigen/src/Core/MatrixBase.h -./Eigen/src/Core/DenseStorage.h -./Eigen/src/Core/util/Memory.h -./Eigen/src/Core/util/StaticAssert.h -./Eigen/src/Core/util/BlasUtil.h -./Eigen/src/Core/util/MatrixMapper.h -./Eigen/src/Core/util/XprHelper.h -./Eigen/src/Core/util/ForwardDeclarations.h -./Eigen/src/Core/util/Meta.h -./Eigen/src/Core/util/Macros.h -./Eigen/src/Core/util/Constants.h -./Eigen/src/Core/CwiseNullaryOp.h -./Eigen/src/Core/Block.h -./Eigen/src/Core/GeneralProduct.h -./Eigen/src/Core/CommaInitializer.h -./Eigen/src/Core/ReturnByValue.h -./Eigen/src/Core/Stride.h -./Eigen/src/SPQRSupport/SuiteSparseQRSupport.h -./Eigen/src/SparseLU/SparseLU_column_dfs.h -./Eigen/src/SparseLU/SparseLU_panel_dfs.h -./Eigen/src/SparseLU/SparseLU_relax_snode.h -./Eigen/src/SparseLU/SparseLU_panel_bmod.h -./Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h -./Eigen/src/SparseLU/SparseLU_Utils.h -./Eigen/src/SparseLU/SparseLU_gemm_kernel.h -./Eigen/src/SparseLU/SparseLU_kernel_bmod.h -./Eigen/src/SparseLU/SparseLU_pivotL.h -./Eigen/src/SparseLU/SparseLU_Memory.h -./Eigen/src/SparseLU/SparseLU_heap_relax_snode.h -./Eigen/src/SparseLU/SparseLUImpl.h -./Eigen/src/SparseLU/SparseLU_copy_to_ucol.h -./Eigen/src/SparseLU/SparseLU_Structs.h -./Eigen/src/SparseLU/SparseLU.h -./Eigen/src/SparseLU/SparseLU_column_bmod.h -./Eigen/src/SparseLU/SparseLU_pruneL.h -./Eigen/src/IterativeLinearSolvers/IncompleteLUT.h -./Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h -./Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h -./Eigen/src/IterativeLinearSolvers/ConjugateGradient.h -./Eigen/src/IterativeLinearSolvers/BiCGSTAB.h -./Eigen/src/SparseCholesky/SimplicialCholesky.h -./Eigen/src/Cholesky/LDLT.h -./Eigen/src/Cholesky/LLT.h -./Eigen/src/CholmodSupport/CholmodSupport.h -./Eigen/src/PaStiXSupport/PaStiXSupport.h -./Eigen/src/MetisSupport/MetisSupport.h -./Eigen/StdVector -./Eigen/Core -./Eigen/SparseLU -./Eigen/StdList -./Eigen/StdDeque -./Eigen/SparseCholesky -./scripts/relicense.py -./scripts/relicense.py -./blas/BandTriangularSolver.h -./blas/PackedTriangularMatrixVector.h -./blas/complex_double.cpp -./blas/level2_real_impl.h -./blas/level1_cplx_impl.h -./blas/level1_impl.h -./blas/level1_real_impl.h -./blas/level3_impl.h -./blas/single.cpp -./blas/level2_cplx_impl.h -./blas/PackedSelfadjointProduct.h -./blas/Rank2Update.h -./blas/complex_single.cpp -./blas/PackedTriangularSolverVector.h -./blas/double.cpp -./blas/common.h -./blas/level2_impl.h -./blas/GeneralRank1Update.h - ---- See Mozilla Public License (B) at the end of this file --- - -------------- -Following applies to: -./doc/UsingIntelMKL.dox -./doc/UsingIntelMKL.dox -./Eigen/src/Eigenvalues/ComplexSchur_MKL.h -./Eigen/src/Eigenvalues/ComplexSchur_MKL.h -./Eigen/src/Eigenvalues/SelfAdjointEigenSolver_MKL.h -./Eigen/src/Eigenvalues/SelfAdjointEigenSolver_MKL.h -./Eigen/src/Eigenvalues/RealSchur_MKL.h -./Eigen/src/Eigenvalues/RealSchur_MKL.h -./Eigen/src/LU/arch/Inverse_SSE.h -./Eigen/src/LU/arch/Inverse_SSE.h -./Eigen/src/LU/PartialPivLU_MKL.h -./Eigen/src/LU/PartialPivLU_MKL.h -./Eigen/src/QR/HouseholderQR_MKL.h -./Eigen/src/QR/HouseholderQR_MKL.h -./Eigen/src/QR/ColPivHouseholderQR_MKL.h -./Eigen/src/QR/ColPivHouseholderQR_MKL.h -./Eigen/src/SVD/JacobiSVD_MKL.h -./Eigen/src/SVD/JacobiSVD_MKL.h -./Eigen/src/PardisoSupport/PardisoSupport.h -./Eigen/src/PardisoSupport/PardisoSupport.h -./Eigen/src/Core/Assign_MKL.h -./Eigen/src/Core/Assign_MKL.h -./Eigen/src/Core/products/SelfadjointMatrixVector_MKL.h -./Eigen/src/Core/products/SelfadjointMatrixVector_MKL.h -./Eigen/src/Core/products/GeneralMatrixVector_MKL.h -./Eigen/src/Core/products/GeneralMatrixVector_MKL.h -./Eigen/src/Core/products/SelfadjointMatrixMatrix_MKL.h -./Eigen/src/Core/products/SelfadjointMatrixMatrix_MKL.h -./Eigen/src/Core/products/TriangularMatrixMatrix_MKL.h -./Eigen/src/Core/products/TriangularMatrixMatrix_MKL.h -./Eigen/src/Core/products/GeneralMatrixMatrix_MKL.h -./Eigen/src/Core/products/GeneralMatrixMatrix_MKL.h -./Eigen/src/Core/products/TriangularMatrixVector_MKL.h -./Eigen/src/Core/products/TriangularMatrixVector_MKL.h -./Eigen/src/Core/products/GeneralMatrixMatrixTriangular_MKL.h -./Eigen/src/Core/products/GeneralMatrixMatrixTriangular_MKL.h -./Eigen/src/Core/products/TriangularSolverMatrix_MKL.h -./Eigen/src/Core/products/TriangularSolverMatrix_MKL.h -./Eigen/src/Core/util/MKL_support.h -./Eigen/src/Core/util/MKL_support.h -./Eigen/src/Cholesky/LLT_MKL.h -./Eigen/src/Cholesky/LLT_MKL.h - -/* - Copyright (c) 2011, Intel Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the - distribution. * Neither the name of Intel Corporation nor the - names of its contributors may be used to endorse or promote - products derived from this software without specific prior written - permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - ----------------------------------------------------------------------- -Following applies to: - everything under ./bench/btl - -[bench/btl is covered under the GNU GENERAL PUBLIC LICENSE, but the code -is not used in Chromium/Chrome. (If it were, all of Chromium/Chrome -would be subjected too.)] - ----------------------------------------------------------------------- -Following applies to: -./test/metis_support.cpp -./test/sparselu.cpp -./unsupported/test/mpreal/mpreal.h -./unsupported/Eigen/src/IterativeSolvers/IterationController.h -./unsupported/Eigen/src/IterativeSolvers/ConstrainedConjGrad.h -./unsupported/Eigen/src/Eigenvalues/ArpackSelfAdjointEigenSolver.h -./Eigen/src/OrderingMethods/Amd.h -./Eigen/src/SparseCholesky/SimplicialCholesky_impl.h - ---- See GNU LESSER GENERAL PUBLIC LICENSE (C) at the end of this file --- - ----------------------------------------------------------------------- -Following applies to: -./unsupported/Eigen/src/LevenbergMarquardt/LevenbergMarquardt.h -./unsupported/Eigen/src/LevenbergMarquardt/LMcovar.h -./unsupported/Eigen/src/LevenbergMarquardt/LMonestep.h -./unsupported/Eigen/src/LevenbergMarquardt/LMpar.h -./unsupported/Eigen/src/LevenbergMarquardt/LMqrsolv.h - -Minpack Copyright Notice (1999) University of Chicago. All rights -reserved - -Redistribution and use in source and binary forms, with or -without modification, are permitted provided that the -following conditions are met: - -1. Redistributions of source code must retain the above -copyright notice, this list of conditions and the following -disclaimer. - -2. Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following -disclaimer in the documentation and/or other materials -provided with the distribution. - -3. The end-user documentation included with the -redistribution, if any, must include the following -acknowledgment: - - "This product includes software developed by the - University of Chicago, as Operator of Argonne National - Laboratory. - -Alternately, this acknowledgment may appear in the software -itself, if and wherever such third-party acknowledgments -normally appear. - -4. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" -WITHOUT WARRANTY OF ANY KIND. THE COPYRIGHT HOLDER, THE -UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND -THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE -OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY -OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR -USEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF -THE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4) -DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION -UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL -BE CORRECTED. - -5. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT -HOLDER, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF -ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT, -INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF -ANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS OF -PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER -SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT -(INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, -EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE -POSSIBILITY OF SUCH LOSS OR DAMAGES. - - -**************************** -freetype2 -**************************** -FreeType - -Quoth http://freetype.sourceforge.net/license.html: - -FreeType comes with two licenses from which you can choose the one -which fits your needs best. - - * The FreeType License is the most commonly used one. - It is a BSD-style license with a credit clause (and thus not - compatible with the GPL). - - * The GNU General Public License (GPL). - For all projects which use the GPL also or which need a license - compatible to the GPL. - -FTL.TXT: ---- - ---- See The FreeType Project LICENSE at the end of this file --- - ---- end of FTL.TXT --- - - -**************************** -GL -**************************** -Mesa Component Licenses - -Component Location Primary Author License ----------------------------------------------------------------------------- -Main Mesa code src/mesa/ Brian Paul Mesa (MIT) - -Device drivers src/mesa/drivers/* See drivers See drivers - -Ext headers include/GL/glext.h SGI SGI Free B - include/GL/glxext.h - -GLUT src/glut/ Mark Kilgard Mark's copyright - -GLEW src/glew-1.13.0 Nigel Stewart Modified BSD - -Mesa GLU library src/glu/mesa/ Brian Paul GNU-LGPL - -SGI GLU library src/glu/sgi/ SGI SGI Free B - -demo programs progs/demos/ various see source files - -X demos progs/xdemos/ Brian Paul see source files - -SGI demos progs/samples/ SGI SGI copyright - -RedBook demos progs/redbook/ SGI SGI copyright - ---------------------- -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----------------------------- - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation, and that the name of Alan Hourihane not be used in -advertising or publicity pertaining to distribution of the software without -specific, written prior permission. Alan Hourihane makes no representations -about the suitability of this software for any purpose. It is provided -"as is" without express or implied warranty. - -ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -EVENT SHALL ALAN HOURIHANE BE LIABLE FOR ANY SPECIAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - - ----------------------------------------------------------------------- - ---- See GNU LIBRARY GENERAL PUBLIC LICENSE (D) at the end of this file --- - ---------------------- - -The OpenGL Extension Wrangler Library -Copyright (C) 2002-2008, Milan Ikits -Copyright (C) 2002-2008, Marcelo E. Magallon -Copyright (C) 2002, Lev Povalahev -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. -* The name of the author may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -THE POSSIBILITY OF SUCH DAMAGE. - - -**************************** -gradle -**************************** - ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------------- -License for the slf4j package ------------------------------------------------------------------------------- -SLF4J License - -Copyright (c) 2004-2007 QOS.ch -All rights reserved. - ---- See MIT License at the end of this file --- - -These terms are identical to those of the MIT License, also called the X License or the X11 License, -which is a simple, permissive non-copyleft free software license. It is deemed compatible with virtually -all types of licenses, commercial or otherwise. In particular, the Free Software Foundation has declared it -compatible with GNU GPL. It is also known to be approved by the Apache Software Foundation as compatible -with Apache Software License. - - ------------------------------------------------------------------------------- -License for the JUnit package ------------------------------------------------------------------------------- -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC -LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM -CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and -documentation distributed under this Agreement, and - -b) in the case of each subsequent Contributor: - -i) changes to the Program, and - -ii) additions to the Program; - -where such changes and/or additions to the Program originate from and are -distributed by that particular Contributor. A Contribution 'originates' from a -Contributor if it was added to the Program by such Contributor itself or anyone -acting on such Contributor's behalf. Contributions do not include additions to -the Program which: (i) are separate modules of software distributed in -conjunction with the Program under their own license agreement, and (ii) are not -derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents " mean patent claims licensable by a Contributor which are -necessarily infringed by the use or sale of its Contribution alone or when -combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, -including all Contributors. - -2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free copyright license to -reproduce, prepare derivative works of, publicly display, publicly perform, -distribute and sublicense the Contribution of such Contributor, if any, and such -derivative works, in source code and object code form. - -b) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed -Patents to make, use, sell, offer to sell, import and otherwise transfer the -Contribution of such Contributor, if any, in source code and object code form. -This patent license shall apply to the combination of the Contribution and the -Program if, at the time the Contribution is added by the Contributor, such -addition of the Contribution causes such combination to be covered by the -Licensed Patents. The patent license shall not apply to any other combinations -which include the Contribution. No hardware per se is licensed hereunder. - -c) Recipient understands that although each Contributor grants the licenses -to its Contributions set forth herein, no assurances are provided by any -Contributor that the Program does not infringe the patent or other intellectual -property rights of any other entity. Each Contributor disclaims any liability to -Recipient for claims brought by any other entity based on infringement of -intellectual property rights or otherwise. As a condition to exercising the -rights and licenses granted hereunder, each Recipient hereby assumes sole -responsibility to secure any other intellectual property rights needed, if any. -For example, if a third party patent license is required to allow Recipient to -distribute the Program, it is Recipient's responsibility to acquire that license -before distributing the Program. - -d) Each Contributor represents that to its knowledge it has sufficient -copyright rights in its Contribution, if any, to grant the copyright license set -forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its -own license agreement, provided that: - -a) it complies with the terms and conditions of this Agreement; and - -b) its license agreement: - -i) effectively disclaims on behalf of all Contributors all warranties and -conditions, express and implied, including warranties or conditions of title and -non-infringement, and implied warranties or conditions of merchantability and -fitness for a particular purpose; - -ii) effectively excludes on behalf of all Contributors all liability for -damages, including direct, indirect, special, incidental and consequential -damages, such as lost profits; - -iii) states that any provisions which differ from this Agreement are offered -by that Contributor alone and not by any other party; and - -iv) states that source code for the Program is available from such -Contributor, and informs licensees how to obtain it in a reasonable manner on or -through a medium customarily used for software exchange. - -When the Program is made available in source code form: - -a) it must be made available under this Agreement; and - -b) a copy of this Agreement must be included with each copy of the Program. - -Contributors may not remove or alter any copyright notices contained within the -Program. - -Each Contributor must identify itself as the originator of its Contribution, if -any, in a manner that reasonably allows subsequent Recipients to identify the -originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with -respect to end users, business partners and the like. While this license is -intended to facilitate the commercial use of the Program, the Contributor who -includes the Program in a commercial product offering should do so in a manner -which does not create potential liability for other Contributors. Therefore, if -a Contributor includes the Program in a commercial product offering, such -Contributor ("Commercial Contributor") hereby agrees to defend and indemnify -every other Contributor ("Indemnified Contributor") against any losses, damages -and costs (collectively "Losses") arising from claims, lawsuits and other legal -actions brought by a third party against the Indemnified Contributor to the -extent caused by the acts or omissions of such Commercial Contributor in -connection with its distribution of the Program in a commercial product -offering. The obligations in this section do not apply to any claims or Losses -relating to any actual or alleged intellectual property infringement. In order -to qualify, an Indemnified Contributor must: a) promptly notify the Commercial -Contributor in writing of such claim, and b) allow the Commercial Contributor to -control, and cooperate with the Commercial Contributor in, the defense and any -related settlement negotiations. The Indemnified Contributor may participate in -any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product -offering, Product X. That Contributor is then a Commercial Contributor. If that -Commercial Contributor then makes performance claims, or offers warranties -related to Product X, those performance claims and warranties are such -Commercial Contributor's responsibility alone. Under this section, the -Commercial Contributor would have to defend claims against the other -Contributors related to those performance claims and warranties, and if a court -requires any other Contributor to pay any damages as a result, the Commercial -Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR -IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each -Recipient is solely responsible for determining the appropriateness of using and -distributing the Program and assumes all risks associated with its exercise of -rights under this Agreement, including but not limited to the risks and costs of -program errors, compliance with applicable laws, damage to or loss of data, -programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY -CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST -PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS -GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of the -terms of this Agreement, and without further action by the parties hereto, such -provision shall be reformed to the minimum extent necessary to make such -provision valid and enforceable. - -If Recipient institutes patent litigation against a Contributor with respect to -a patent applicable to software (including a cross-claim or counterclaim in a -lawsuit), then any patent licenses granted by that Contributor to such Recipient -under this Agreement shall terminate as of the date such litigation is filed. In -addition, if Recipient institutes patent litigation against any entity -(including a cross-claim or counterclaim in a lawsuit) alleging that the Program -itself (excluding combinations of the Program with other software or hardware) -infringes such Recipient's patent(s), then such Recipient's rights granted under -Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails to -comply with any of the material terms or conditions of this Agreement and does -not cure such failure in a reasonable period of time after becoming aware of -such noncompliance. If all Recipient's rights under this Agreement terminate, -Recipient agrees to cease use and distribution of the Program as soon as -reasonably practicable. However, Recipient's obligations under this Agreement -and any licenses granted by Recipient relating to the Program shall continue and -survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in -order to avoid inconsistency the Agreement is copyrighted and may only be -modified in the following manner. The Agreement Steward reserves the right to -publish new versions (including revisions) of this Agreement from time to time. -No one other than the Agreement Steward has the right to modify this Agreement. -IBM is the initial Agreement Steward. IBM may assign the responsibility to serve -as the Agreement Steward to a suitable separate entity. Each new version of the -Agreement will be given a distinguishing version number. The Program (including -Contributions) may always be distributed subject to the version of the Agreement -under which it was received. In addition, after a new version of the Agreement -is published, Contributor may elect to distribute the Program (including its -Contributions) under the new version. Except as expressly stated in Sections -2(a) and 2(b) above, Recipient receives no rights or licenses to the -intellectual property of any Contributor under this Agreement, whether -expressly, by implication, estoppel or otherwise. All rights in the Program not -expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the -intellectual property laws of the United States of America. No party to this -Agreement will bring a legal action under this Agreement more than one year -after the cause of action arose. Each party waives its rights to a jury trial in -any resulting litigation. - ------------------------------------------------------------------------------- -License for the JCIFS package ------------------------------------------------------------------------------- -JCIFS License - ---- See GNU LESSER GENERAL PUBLIC LICENSE (B) at the end of this file --- - -icu -**************************** -ICU - -There are two licenses here: -- ICU license -- Unicode Terms of Use ------------------------------------------------------------------------------- -ICU License - ICU 1.8.1 and later -From http://source.icu-project.org/repos/icu/icu/trunk/license.html -X License (old version). For license pedigree see the -ICU FAQ at http://icu-project.org/userguide/icufaq.html - -COPYRIGHT AND PERMISSION NOTICE - -Copyright (c) 1995-2006 International Business Machines Corporation and others - -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, and/or sell copies of the -Software, and to permit persons to whom the Software is furnished to do so, -provided that the above copyright notice(s) and this permission notice appear -in all copies of the Software and that both the above copyright notice(s) and -this permission notice appear in supporting documentation. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE -LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY -DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Except as contained in this notice, the name of a copyright holder shall not -be used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization of the copyright holder. - -All trademarks and registered trademarks mentioned herein are the property of their respective owners. - ------------------------------------------------------------------------------- -Unicode Terms of Use, from http://www.unicode.org/copyright.html - - For the general privacy policy governing access to this site, see the -Unicode Privacy Policy. For trademark usage, see the Unicode Consortium -Trademarks and Logo Policy. - Notice to End User: Terms of Use - Carefully read the following legal agreement ("Agreement"). Use or copying -of the software and/or codes provided with this agreement (The "Software") -constitutes your acceptance of these terms - - 1. Unicode Copyright. - 1. Copyright 1991-2007 Unicode, Inc. All rights reserved. - 2. Certain documents and files on this website contain a legend -indicating that "Modification is permitted." Any person is hereby authorized, -without fee, to modify such documents and files to create derivative works -conforming to the Unicode Standard, subject to Terms and Conditions herein. - 3. Any person is hereby authorized, without fee, to view, use, -reproduce, and distribute all documents and files solely for informational -purposes in the creation of products supporting the Unicode Standard, subject -to the Terms and Conditions herein. - 4. Further specifications of rights and restrictions pertaining -to the use of the particular set of data files known as the "Unicode Character -Database" can be found in Exhibit 1. - 5. Each version of the Unicode Standard has further specifications -of rights and restrictions of use. For the book editions, these are found on -the back of the title page. For the online edition, certain files (such as the -PDF files for book chapters and code charts) carry specific restrictions. All -other files are covered under these general Terms of Use. To request a -permission to reproduce any part of the Unicode Standard, please contact the -Unicode Consortium. - 6. No license is granted to "mirror" the Unicode website where a -fee is charged for access to the "mirror" site. - 7. Modification is not permitted with respect to this document. -All copies of this document must be verbatim. - 2. Restricted Rights Legend. Any technical data or software which is -licensed to the United States of America, its agencies and/or instrumentalities -under this Agreement is commercial technical data or commercial computer -software developed exclusively at private expense as defined in FAR 2.101, or -DFARS 252.227-7014 (June 1995), as applicable. For technical data, use, -duplication, or disclosure by the Government is subject to restrictions as set -forth in DFARS 202.227-7015 Technical Data, Commercial and Items (Nov 1995) -and this Agreement. For Software, in accordance with FAR 12-212 or -DFARS 227-7202, as applicable, use, duplication or disclosure by the Government -is subject to the restrictions set forth in this Agreement. - 3. Warranties and Disclaimers. - 1. This publication and/or website may include technical or -typographical errors or other inaccuracies . Changes are periodically added to -the information herein; these changes will be incorporated in new editions of -the publication and/or website. Unicode may make improvements and/or changes -in the product(s) and/or program(s) described in this publication and/or -website at any time. - 2. If this file has been purchased on magnetic or optical media -from Unicode, Inc. the sole and exclusive remedy for any claim will be exchange -of the defective media within ninety (90) days of original purchase. - 3. EXCEPT AS PROVIDED IN SECTION C.2, THIS PUBLICATION AND/OR -SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS, -IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. -UNICODE AND ITS LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR OMISSIONS IN -THIS PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH ARE REFERENCED BY OR -LINKED TO THIS PUBLICATION OR THE UNICODE WEBSITE. - 4. Waiver of Damages. In no event shall Unicode or its licensors be -liable for any special, incidental, indirect or consequential damages of any -kind, or any damages whatsoever, whether or not Unicode was advised of the -possibility of the damage, including, without limitation, those resulting from -the following: loss of use, data or profits, in connection with the use, -modification or distribution of this information or its derivatives. - 5. Trademarks. - 1. Unicode and the Unicode logo are registered trademarks of -Unicode, Inc. - 2. This site contains product names and corporate names of other -companies. All product names and company names and logos mentioned herein are -the trademarks or registered trademarks of their respective owners. Other -products and corporate names mentioned herein which are trademarks of a third -party are used only for explanation and for the owners' benefit and with no -intent to infringe. - 3. Use of third party products or information referred to herein -is at the user\x{2019}s risk. - 6. Miscellaneous. - 1. Jurisdiction and Venue. This server is operated from a location -in the State of California, United States of America. Unicode makes no -representation that the materials are appropriate for use in other locations. -If you access this server from other locations, you are responsible for -compliance with local laws. This Agreement, all use of this site and any -claims and damages resulting from use of this site are governed solely by the -laws of the State of California without regard to any principles which would -apply the laws of a different jurisdiction. The user agrees that any disputes -regarding this site shall be resolved solely in the courts located in Santa -Clara County, California. The user agrees said courts have personal -jurisdiction and agree to waive any right to transfer the dispute to any other -forum. - 2. Modification by Unicode Unicode shall have the right to modify -this Agreement at any time by posting it to this site. The user may not assign -any part of this Agreement without Unicode\x{2019}s prior written consent. - 3. Taxes. The user agrees to pay any taxes arising from access to -this website or use of the information herein, except for those based on -Unicode\x{2019}s net income. - 4. Severability. If any provision of this Agreement is declared -invalid or unenforceable, the remaining provisions of this Agreement shall -remain in effect. - 5. Entire Agreement. This Agreement constitutes the entire -agreement between the parties. - -EXHIBIT 1 -UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE - - Unicode Data Files include all data files under the directories -http://www.unicode.org/Public/, http://www.unicode.org/reports/, and -http://www.unicode.org/cldr/data/ . Unicode Software includes any source code -published in the Unicode Standard or under the directories -http://www.unicode.org/Public/, http://www.unicode.org/reports/, and -http://www.unicode.org/cldr/data/. - - NOTICE TO USER: Carefully read the following legal agreement. BY -DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA FILES -("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY ACCEPT, AND -AGREE TO BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF -YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA -FILES OR SOFTWARE. - - COPYRIGHT AND PERMISSION NOTICE - - Copyright 1991-2007 Unicode, Inc. All rights reserved. Distributed under -the Terms of Use in http://www.unicode.org/copyright.html. - - Permission is hereby granted, free of charge, to any person obtaining a -copy of the Unicode data files and any associated documentation (the "Data -Files") or Unicode software and any associated documentation (the "Software") -to deal in the Data Files or Software without restriction, including without -limitation the rights to use, copy, modify, merge, publish, distribute, and/or -sell copies of the Data Files or Software, and to permit persons to whom the -Data Files or Software are furnished to do so, provided that (a) the above -copyright notice(s) and this permission notice appear with all copies of the -Data Files or Software, (b) both the above copyright notice(s) and this -permission notice appear in associated documentation, and (c) there is clear -notice in each modified Data File or in the Software as well as in the -documentation associated with the Data File(s) or Software that the data or -software has been modified. - - THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD -PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN -THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL -DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING -OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR -SOFTWARE. - - Except as contained in this notice, the name of a copyright holder shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in these Data Files or Software without prior written authorization -of the copyright holder. - - Unicode and the Unicode logo are trademarks of Unicode, Inc., and may be -registered in some jurisdictions. All other trademarks and registered -trademarks mentioned herein are the property of their respective owners. - - -**************************** -icu -**************************** -ICU - -There are two licenses here: -- ICU license -- Unicode Terms of Use ------------------------------------------------------------------------------- -ICU License - ICU 1.8.1 and later -From http://source.icu-project.org/repos/icu/icu/trunk/license.html -X License (old version). For license pedigree see the -ICU FAQ at http://icu-project.org/userguide/icufaq.html - -COPYRIGHT AND PERMISSION NOTICE - -Copyright (c) 1995-2006 International Business Machines Corporation and others - -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, and/or sell copies of the -Software, and to permit persons to whom the Software is furnished to do so, -provided that the above copyright notice(s) and this permission notice appear -in all copies of the Software and that both the above copyright notice(s) and -this permission notice appear in supporting documentation. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE -LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY -DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Except as contained in this notice, the name of a copyright holder shall not -be used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization of the copyright holder. - -All trademarks and registered trademarks mentioned herein are the property of their respective owners. - ------------------------------------------------------------------------------- -Unicode Terms of Use, from http://www.unicode.org/copyright.html - - For the general privacy policy governing access to this site, see the -Unicode Privacy Policy. For trademark usage, see the Unicode Consortium -Trademarks and Logo Policy. - Notice to End User: Terms of Use - Carefully read the following legal agreement ("Agreement"). Use or copying -of the software and/or codes provided with this agreement (The "Software") -constitutes your acceptance of these terms - - 1. Unicode Copyright. - 1. Copyright 1991-2007 Unicode, Inc. All rights reserved. - 2. Certain documents and files on this website contain a legend -indicating that "Modification is permitted." Any person is hereby authorized, -without fee, to modify such documents and files to create derivative works -conforming to the Unicode Standard, subject to Terms and Conditions herein. - 3. Any person is hereby authorized, without fee, to view, use, -reproduce, and distribute all documents and files solely for informational -purposes in the creation of products supporting the Unicode Standard, subject -to the Terms and Conditions herein. - 4. Further specifications of rights and restrictions pertaining -to the use of the particular set of data files known as the "Unicode Character -Database" can be found in Exhibit 1. - 5. Each version of the Unicode Standard has further specifications -of rights and restrictions of use. For the book editions, these are found on -the back of the title page. For the online edition, certain files (such as the -PDF files for book chapters and code charts) carry specific restrictions. All -other files are covered under these general Terms of Use. To request a -permission to reproduce any part of the Unicode Standard, please contact the -Unicode Consortium. - 6. No license is granted to "mirror" the Unicode website where a -fee is charged for access to the "mirror" site. - 7. Modification is not permitted with respect to this document. -All copies of this document must be verbatim. - 2. Restricted Rights Legend. Any technical data or software which is -licensed to the United States of America, its agencies and/or instrumentalities -under this Agreement is commercial technical data or commercial computer -software developed exclusively at private expense as defined in FAR 2.101, or -DFARS 252.227-7014 (June 1995), as applicable. For technical data, use, -duplication, or disclosure by the Government is subject to restrictions as set -forth in DFARS 202.227-7015 Technical Data, Commercial and Items (Nov 1995) -and this Agreement. For Software, in accordance with FAR 12-212 or -DFARS 227-7202, as applicable, use, duplication or disclosure by the Government -is subject to the restrictions set forth in this Agreement. - 3. Warranties and Disclaimers. - 1. This publication and/or website may include technical or -typographical errors or other inaccuracies . Changes are periodically added to -the information herein; these changes will be incorporated in new editions of -the publication and/or website. Unicode may make improvements and/or changes -in the product(s) and/or program(s) described in this publication and/or -website at any time. - 2. If this file has been purchased on magnetic or optical media -from Unicode, Inc. the sole and exclusive remedy for any claim will be exchange -of the defective media within ninety (90) days of original purchase. - 3. EXCEPT AS PROVIDED IN SECTION C.2, THIS PUBLICATION AND/OR -SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS, -IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. -UNICODE AND ITS LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR OMISSIONS IN -THIS PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH ARE REFERENCED BY OR -LINKED TO THIS PUBLICATION OR THE UNICODE WEBSITE. - 4. Waiver of Damages. In no event shall Unicode or its licensors be -liable for any special, incidental, indirect or consequential damages of any -kind, or any damages whatsoever, whether or not Unicode was advised of the -possibility of the damage, including, without limitation, those resulting from -the following: loss of use, data or profits, in connection with the use, -modification or distribution of this information or its derivatives. - 5. Trademarks. - 1. Unicode and the Unicode logo are registered trademarks of -Unicode, Inc. - 2. This site contains product names and corporate names of other -companies. All product names and company names and logos mentioned herein are -the trademarks or registered trademarks of their respective owners. Other -products and corporate names mentioned herein which are trademarks of a third -party are used only for explanation and for the owners' benefit and with no -intent to infringe. - 3. Use of third party products or information referred to herein -is at the user\x{2019}s risk. - 6. Miscellaneous. - 1. Jurisdiction and Venue. This server is operated from a location -in the State of California, United States of America. Unicode makes no -representation that the materials are appropriate for use in other locations. -If you access this server from other locations, you are responsible for -compliance with local laws. This Agreement, all use of this site and any -claims and damages resulting from use of this site are governed solely by the -laws of the State of California without regard to any principles which would -apply the laws of a different jurisdiction. The user agrees that any disputes -regarding this site shall be resolved solely in the courts located in Santa -Clara County, California. The user agrees said courts have personal -jurisdiction and agree to waive any right to transfer the dispute to any other -forum. - 2. Modification by Unicode Unicode shall have the right to modify -this Agreement at any time by posting it to this site. The user may not assign -any part of this Agreement without Unicode\x{2019}s prior written consent. - 3. Taxes. The user agrees to pay any taxes arising from access to -this website or use of the information herein, except for those based on -Unicode\x{2019}s net income. - 4. Severability. If any provision of this Agreement is declared -invalid or unenforceable, the remaining provisions of this Agreement shall -remain in effect. - 5. Entire Agreement. This Agreement constitutes the entire -agreement between the parties. - -EXHIBIT 1 -UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE - - Unicode Data Files include all data files under the directories -http://www.unicode.org/Public/, http://www.unicode.org/reports/, and -http://www.unicode.org/cldr/data/ . Unicode Software includes any source code -published in the Unicode Standard or under the directories -http://www.unicode.org/Public/, http://www.unicode.org/reports/, and -http://www.unicode.org/cldr/data/. - - NOTICE TO USER: Carefully read the following legal agreement. BY -DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA FILES -("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY ACCEPT, AND -AGREE TO BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF -YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA -FILES OR SOFTWARE. - - COPYRIGHT AND PERMISSION NOTICE - - Copyright 1991-2007 Unicode, Inc. All rights reserved. Distributed under -the Terms of Use in http://www.unicode.org/copyright.html. - - Permission is hereby granted, free of charge, to any person obtaining a -copy of the Unicode data files and any associated documentation (the "Data -Files") or Unicode software and any associated documentation (the "Software") -to deal in the Data Files or Software without restriction, including without -limitation the rights to use, copy, modify, merge, publish, distribute, and/or -sell copies of the Data Files or Software, and to permit persons to whom the -Data Files or Software are furnished to do so, provided that (a) the above -copyright notice(s) and this permission notice appear with all copies of the -Data Files or Software, (b) both the above copyright notice(s) and this -permission notice appear in associated documentation, and (c) there is clear -notice in each modified Data File or in the Software as well as in the -documentation associated with the Data File(s) or Software that the data or -software has been modified. - - THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD -PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN -THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL -DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING -OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR -SOFTWARE. - - Except as contained in this notice, the name of a copyright holder shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in these Data Files or Software without prior written authorization -of the copyright holder. - - Unicode and the Unicode logo are trademarks of Unicode, Inc., and may be -registered in some jurisdictions. All other trademarks and registered -trademarks mentioned herein are the property of their respective owners. - - -**************************** -java/android_libs/exoplayer -**************************** - ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - -java/android_libs/protobuf_nano -**************************** -Copyright 2008, Google Inc. -All rights reserved. - ---- See BSD License (Google) at the end of this file --- - -Code generated by the Protocol Buffer compiler is owned by the owner -of the input file used when generating it. This code is not -standalone and requires a support library to be linked with it. This -support library is itself covered by the above license. - - -**************************** -javascript/jquery_ui -**************************** -The MIT License (MIT) - -Copyright (c) 2015 jQuery Foundation and other contributors - ---- See MIT License at the end of this file --- - -javascript/jquery/v2_0_1 -**************************** -Copyright 2013 jQuery Foundation and other contributors -http://jquery.com/ - -https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt -https://github.com/jquery/sizzle/blob/master/LICENSE - -jQuery and Sizzle are released under MIT Licence. - -The text is provided below. - -MIT License ----- - -Copyright 2013 jQuery Foundation and other contributors -http://jquery.com/ - ---- See MIT License at the end of this file --- - -javascript/tracing_framework -**************************** -Copyright 2012, Google Inc. -All rights reserved. - ---- See BSD License (Google) at the end of this file --- - -java_src/android_libs/exoplayer -**************************** - ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - -java_src/android_libs/protobuf_nano/v2 -**************************** -Copyright 2008, Google Inc. -All rights reserved. - ---- See BSD License (Google) at the end of this file --- - -Code generated by the Protocol Buffer compiler is owned by the owner -of the input file used when generating it. This code is not -standalone and requires a support library to be linked with it. This -support library is itself covered by the above license. - - -**************************** -jpeg -**************************** -(extracted from src/README) - -LEGAL ISSUES -============ - -In plain English: - -1. We don't promise that this software works. (But if you find any bugs, - please let us know!) -2. You can use this software for whatever you want. You don't have to pay us. -3. You may not pretend that you wrote this software. If you use it in a - program, you must acknowledge somewhere in your documentation that - you've used the IJG code. - -In legalese: - -The authors make NO WARRANTY or representation, either express or implied, -with respect to this software, its quality, accuracy, merchantability, or -fitness for a particular purpose. This software is provided "AS IS", and you, -its user, assume the entire risk as to its quality and accuracy. - -This software is copyright (C) 1991-1998, Thomas G. Lane. -All Rights Reserved except as specified below. - -Permission is hereby granted to use, copy, modify, and distribute this -software (or portions thereof) for any purpose, without fee, subject to these -conditions: -(1) If any part of the source code for this software is distributed, then this -README file must be included, with this copyright and no-warranty notice -unaltered; and any additions, deletions, or changes to the original files -must be clearly indicated in accompanying documentation. -(2) If only executable code is distributed, then the accompanying -documentation must state that "this software is based in part on the work of -the Independent JPEG Group". -(3) Permission for use of this software is granted only if the user accepts -full responsibility for any undesirable consequences; the authors accept -NO LIABILITY for damages of any kind. - -These conditions apply to any software derived from or based on the IJG code, -not just to the unmodified library. If you use our work, you ought to -acknowledge us. - -Permission is NOT granted for the use of any IJG author's name or company name -in advertising or publicity relating to this software or products derived from -it. This software may be referred to only as "the Independent JPEG Group's -software". - -We specifically permit and encourage the use of this software as the basis of -commercial products, provided that all warranty or liability claims are -assumed by the product vendor. - - -ansi2knr.c is included in this distribution by permission of L. Peter Deutsch, -sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA. -ansi2knr.c is NOT covered by the above copyright and conditions, but instead -by the usual distribution terms of the Free Software Foundation; principally, -that you must include source code if you redistribute it. (See the file -ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part -of any program generated from the IJG code, this does not limit you more than -the foregoing paragraphs do. - -The Unix configuration script "configure" was produced with GNU Autoconf. -It is copyright by the Free Software Foundation but is freely distributable. -The same holds for its supporting scripts (config.guess, config.sub, -ltconfig, ltmain.sh). Another support script, install-sh, is copyright -by M.I.T. but is also freely distributable. - -It appears that the arithmetic coding option of the JPEG spec is covered by -patents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot -legally be used without obtaining one or more licenses. For this reason, -support for arithmetic coding has been removed from the free JPEG software. -(Since arithmetic coding provides only a marginal gain over the unpatented -Huffman mode, it is unlikely that very many implementations will support it.) -So far as we are aware, there are no patent restrictions on the remaining -code. - -The IJG distribution formerly included code to read and write GIF files. -To avoid entanglement with the Unisys LZW patent, GIF reading support has -been removed altogether, and the GIF writer has been simplified to produce -"uncompressed GIFs". This technique does not use the LZW algorithm; the -resulting GIF files are larger than usual, but are readable by all standard -GIF decoders. - -We are required to state that - "The Graphics Interchange Format(c) is the Copyright property of - CompuServe Incorporated. GIF(sm) is a Service Mark property of - CompuServe Incorporated." - - -**************************** -libogg -**************************** -Copyright (c) 2002, Xiph.org Foundation - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -- Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -- Neither the name of the Xiph.org Foundation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -**************************** -libunwind -**************************** -Copyright (c) 2002 Hewlett-Packard Co. - ---- See MIT License at the end of this file --- - -libvorbis -**************************** -Copyright (c) 2002-2008 Xiph.org Foundation - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -- Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -- Neither the name of the Xiph.org Foundation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -**************************** -libxcb -**************************** -Copyright (C) 2001-2006 Bart Massey, Jamey Sharp, and Josh Triplett. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, -sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall -be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the authors -or their institutions shall not be used in advertising or -otherwise to promote the sale, use or other dealings in this -Software without prior written authorization from the -authors. - - -**************************** -libxml -**************************** -Libxml2, an XML C Parser - -Except where otherwise noted in the source code (e.g. the files hash.c, -list.c and the trio files, which are covered by a similar licence but -with different Copyright notices) all the files are: - - Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is fur- -nished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- -NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - --------------------------------------------------------------------- - -Copyright (C) 2000,2012 Bjorn Reese and Daniel Veillard. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF -MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND -CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. - -Author: breese@users.sourceforge.net - -(taken from hash.c) - --------------------------------------------------------------------- - - Copyright (C) 2000 Gary Pennington and Daniel Veillard. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF -MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND -CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. - -Author: Gary.Pennington@uk.sun.com - -(taken from list.c) - --------------------------------------------------------------------- - -Copyright (C) 1998 Bjorn Reese and Daniel Stenberg. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF -MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND -CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. - -(taken from trio.h and trio.c) - --------------------------------------------------------------------- - -Copyright (C) 2001 Bjorn Reese - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF -MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND -CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. - -(taken from triodef.h, trionan.h, and trionan.c) - --------------------------------------------------------------------- - -Copyright (C) 2000 Bjorn Reese and Daniel Stenberg. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF -MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND -CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. - -(taken from triop.h) - --------------------------------------------------------------------- - -Copyright (C) 2001 Bjorn Reese and Daniel Stenberg. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF -MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND -CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. - -(taken from triostr.h and triostr.c) - -************************************************************************* - -http://ctrio.sourceforge.net/ - -************************************************************************* - - -**************************** -lodepng -**************************** -LodePNG - -Copyright (c) 2005-2013 Lode Vandevenne - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source - distribution. - - -**************************** -minizip -**************************** -zlib - -(extracted from README, except for match.S) - -Copyright notice: - - (C) 1995-2004 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - - -(extracted from match.S, for match.S only) - - Copyright (C) 1998, 2007 Brian Raiter - - This software is provided 'as-is', without any express or implied - warranty. In no event will the author be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - -**************************** -mongoose -**************************** -Copyright (c) 2004-2013 Sergey Lyubka - ---- See MIT License at the end of this file --- - -objective_c/gtm_session_fetcher -**************************** - ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - -openctm -**************************** -Copyright (c) 2009-2010 Marcus Geelnard - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must not - be misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source - distribution. - - -**************************** -OpenCV -**************************** -IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. - -By downloading, copying, installing or using the software you agree to this license. -If you do not agree to this license, do not download, install, -copy or use the software. - - - Intel License Agreement - For Open Source Computer Vision Library - -Copyright (C) 2000, 2001, Intel Corporation, all rights reserved. -Copyright (C) 2013, OpenCV Foundation, all rights reserved. -Third party copyrights are property of their respective owners. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistribution's of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - * Redistribution's in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * The name of Intel Corporation may not be used to endorse or promote products - derived from this software without specific prior written permission. - -This software is provided by the copyright holders and contributors "as is" and -any express or implied warranties, including, but not limited to, the implied -warranties of merchantability and fitness for a particular purpose are disclaimed. -In no event shall the Intel Corporation or contributors be liable for any direct, -indirect, incidental, special, exemplary, or consequential damages -(including, but not limited to, procurement of substitute goods or services; -loss of use, data, or profits; or business interruption) however caused -and on any theory of liability, whether in contract, strict liability, -or tort (including negligence or otherwise) arising in any way out of -the use of this software, even if advised of the possibility of such damage. - -**************************** -openssl -**************************** -BoringSSL is a fork of OpenSSL. As such, large parts of it fall under OpenSSL -licensing. Files that are completely new have a Google copyright and an ISC -license. This license is reproduced at the bottom of this file. - -Contributors to BoringSSL are required to follow the CLA rules for Chromium: -https://cla.developers.google.com/clas - -Some files from Intel are under yet another license, which is also included -underneath. - -The OpenSSL toolkit stays under a dual license, i.e. both the conditions of the -OpenSSL License and the original SSLeay license apply to the toolkit. See below -for the actual license texts. Actually both licenses are BSD-style Open Source -licenses. In case of any license issues related to OpenSSL please contact -openssl-core@openssl.org. - - OpenSSL License - --------------- - -/* ==================================================================== - * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - - Original SSLeay License - ----------------------- - -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - - -ISC license used for completely new code in BoringSSL: - -/* Copyright (c) 2015, Google Inc. - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ - - -Some files from Intel carry the following license: - -# Copyright (c) 2012, Intel Corporation -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the -# distribution. -# -# * Neither the name of the Intel Corporation nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# -# THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION ""AS IS"" AND ANY -# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -**************************** -openssl/boringssl -**************************** -BoringSSL is a fork of OpenSSL. As such, large parts of it fall under OpenSSL -licensing. Files that are completely new have a Google copyright and an ISC -license. This license is reproduced at the bottom of this file. - -Contributors to BoringSSL are required to follow the CLA rules for Chromium: -https://cla.developers.google.com/clas - -Some files from Intel are under yet another license, which is also included -underneath. - -The OpenSSL toolkit stays under a dual license, i.e. both the conditions of the -OpenSSL License and the original SSLeay license apply to the toolkit. See below -for the actual license texts. Actually both licenses are BSD-style Open Source -licenses. In case of any license issues related to OpenSSL please contact -openssl-core@openssl.org. - - OpenSSL License - --------------- - -/* ==================================================================== - * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - - Original SSLeay License - ----------------------- - -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - - -ISC license used for completely new code in BoringSSL: - -/* Copyright (c) 2015, Google Inc. - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ - - -Some files from Intel carry the following license: - -# Copyright (c) 2012, Intel Corporation -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the -# distribution. -# -# * Neither the name of the Intel Corporation nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# -# THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION ""AS IS"" AND ANY -# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -**************************** -pcre -**************************** -PCRE LICENCE ------------- - -PCRE is a library of functions to support regular expressions whose syntax -and semantics are as close as possible to those of the Perl 5 language. - -Release 8 of PCRE is distributed under the terms of the "BSD" licence, as -specified below. The documentation for PCRE, supplied in the "doc" -directory, is distributed under the same terms as the software itself. The data -in the testdata directory is not copyrighted and is in the public domain. - -The basic library functions are written in C and are freestanding. Also -included in the distribution is a set of C++ wrapper functions, and a -just-in-time compiler that can be used to optimize pattern matching. These -are both optional features that can be omitted when the library is built. - - -THE BASIC LIBRARY FUNCTIONS ---------------------------- - -Written by: Philip Hazel -Email local part: ph10 -Email domain: cam.ac.uk - -University of Cambridge Computing Service, -Cambridge, England. - -Copyright (c) 1997-2015 University of Cambridge -All rights reserved. - - -PCRE JUST-IN-TIME COMPILATION SUPPORT -------------------------------------- - -Written by: Zoltan Herczeg -Email local part: hzmester -Emain domain: freemail.hu - -Copyright(c) 2010-2015 Zoltan Herczeg -All rights reserved. - - -STACK-LESS JUST-IN-TIME COMPILER --------------------------------- - -Written by: Zoltan Herczeg -Email local part: hzmester -Emain domain: freemail.hu - -Copyright(c) 2009-2015 Zoltan Herczeg -All rights reserved. - - -THE C++ WRAPPER FUNCTIONS -------------------------- - -Contributed by: Google Inc. - -Copyright (c) 2007-2012, Google Inc. -All rights reserved. - - -THE "BSD" LICENCE ------------------ - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * Neither the name of the University of Cambridge nor the name of Google - Inc. nor the names of their contributors may be used to endorse or - promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -End - - -**************************** -pffft -**************************** -Copyright (c) 2013 Julien Pommier ( pommier@modartt.com ) - -Based on original fortran 77 code from FFTPACKv4 from NETLIB, -authored by Dr Paul Swarztrauber of NCAR, in 1985. - -As confirmed by the NCAR fftpack software curators, the following -FFTPACKv5 license applies to FFTPACKv4 sources. My changes are -released under the same terms. - -FFTPACK license: - -http://www.cisl.ucar.edu/css/software/fftpack5/ftpk.html - -Copyright (c) 2004 the University Corporation for Atmospheric -Research ("UCAR"). All rights reserved. Developed by NCAR's -Computational and Information Systems Laboratory, UCAR, -www.cisl.ucar.edu. - -Redistribution and use of the Software in source and binary forms, -with or without modification, is permitted provided that the -following conditions are met: - -- Neither the names of NCAR's Computational and Information Systems -Laboratory, the University Corporation for Atmospheric Research, -nor the names of its sponsors or contributors may be used to -endorse or promote products derived from this Software without -specific prior written permission. - -- Redistributions of source code must retain the above copyright -notices, this list of conditions, and the disclaimer below. - -- Redistributions in binary form must reproduce the above copyright -notice, this list of conditions, and the disclaimer below in the -documentation and/or other materials provided with the -distribution. - -THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE -SOFTWARE. - - -**************************** -png -**************************** -libpng - -This copy of the libpng notices is provided for your convenience. In case of -any discrepancy between this copy and the notices in the file png.h that is -included in the libpng distribution, the latter shall prevail. - -COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: - -If you modify libpng you may insert additional notices immediately following -this sentence. - -libpng versions 1.2.6, August 15, 2004, through 1.2.27, April 29, 2008, are -Copyright (c) 2004, 2006-2008 Glenn Randers-Pehrson, and are -distributed according to the same disclaimer and license as libpng-1.2.5 -with the following individual added to the list of Contributing Authors - - Cosmin Truta - -libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are -Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are -distributed according to the same disclaimer and license as libpng-1.0.6 -with the following individuals added to the list of Contributing Authors - - Simon-Pierre Cadieux - Eric S. Raymond - Gilles Vollant - -and with the following additions to the disclaimer: - - There is no warranty against interference with your enjoyment of the - library or against infringement. There is no warranty that our - efforts or the library will fulfill any of your particular purposes - or needs. This library is provided with all faults, and the entire - risk of satisfactory quality, performance, accuracy, and effort is with - the user. - -libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are -Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are -distributed according to the same disclaimer and license as libpng-0.96, -with the following individuals added to the list of Contributing Authors: - - Tom Lane - Glenn Randers-Pehrson - Willem van Schaik - -libpng versions 0.89, June 1996, through 0.96, May 1997, are -Copyright (c) 1996, 1997 Andreas Dilger -Distributed according to the same disclaimer and license as libpng-0.88, -with the following individuals added to the list of Contributing Authors: - - John Bowler - Kevin Bracey - Sam Bushell - Magnus Holmgren - Greg Roelofs - Tom Tanner - -libpng versions 0.5, May 1995, through 0.88, January 1996, are -Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - -For the purposes of this copyright and license, "Contributing Authors" -is defined as the following set of individuals: - - Andreas Dilger - Dave Martindale - Guy Eric Schalnat - Paul Schmidt - Tim Wegner - -The PNG Reference Library is supplied "AS IS". The Contributing Authors -and Group 42, Inc. disclaim all warranties, expressed or implied, -including, without limitation, the warranties of merchantability and of -fitness for any purpose. The Contributing Authors and Group 42, Inc. -assume no liability for direct, indirect, incidental, special, exemplary, -or consequential damages, which may result from the use of the PNG -Reference Library, even if advised of the possibility of such damage. - -Permission is hereby granted to use, copy, modify, and distribute this -source code, or portions hereof, for any purpose, without fee, subject -to the following restrictions: - -1. The origin of this source code must not be misrepresented. - -2. Altered versions must be plainly marked as such and must not - be misrepresented as being the original source. - -3. This Copyright notice may not be removed or altered from any - source or altered source distribution. - -The Contributing Authors and Group 42, Inc. specifically permit, without -fee, and encourage the use of this source code as a component to -supporting the PNG file format in commercial products. If you use this -source code in a product, acknowledgment is not required but would be -appreciated. - - -A "png_get_copyright" function is available, for convenient use in "about" -boxes and the like: - - printf("%s",png_get_copyright(NULL)); - -Also, the PNG logo (in PNG format, of course) is supplied in the -files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). - -Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a -certification mark of the Open Source Initiative. - -Glenn Randers-Pehrson -glennrp at users.sourceforge.net -April 29, 2008 - - -**************************** -protobuf -**************************** -Copyright 2008, Google Inc. -All rights reserved. - ---- See BSD License (Google) at the end of this file --- - -Code generated by the Protocol Buffer compiler is owned by the owner -of the input file used when generating it. This code is not -standalone and requires a support library to be linked with it. This -support library is itself covered by the above license. - - -**************************** -re2 -**************************** -// Copyright (c) 2009 The RE2 Authors. All rights reserved. -// -// - ---- See BSD License (Google) at the end of this file --- - -stblib -**************************** - License for STBLIB - A collection of public-domain single-file C/C++ - libraries, primarily aimed at game developers. - -The compilation and test files are licensed under the MIT license, but the -single-file libraries themselves are in the public domain (free for use and -modification for any purpose without legal friction). - -The MIT License (MIT) - ---- See MIT License at the end of this file --- - -stl -**************************** -SGI STL - -The STL portion of GNU libstdc++ that is used with gcc3 and gcc4 is licensed -under the GPL, with the following exception: - -# As a special exception, you may use this file as part of a free software -# library without restriction. Specifically, if other files instantiate -# templates or use macros or inline functions from this file, or you compile -# this file and link it with other files to produce an executable, this -# file does not by itself cause the resulting executable to be covered by -# the GNU General Public License. This exception does not however -# invalidate any other reasons why the executable file might be covered by -# the GNU General Public License. - - - -**************************** -tinyxml -**************************** -TinyXml is released under the zlib license: - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any -damages arising from the use of this software. - -Permission is granted to anyone to use this software for any -purpose, including commercial applications, and to alter it and -redistribute it freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must -not claim that you wrote the original software. If you use this -software in a product, an acknowledgment in the product documentation -would be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and -must not be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source -distribution. - - - -**************************** -tz -**************************** -With a few exceptions, all files in the tz code and data (including -this one) are in the public domain. The exceptions are tzcode's -date.c, newstrftime.3, and strftime.c, which contain material derived -from BSD and which use the BSD 3-clause license. - - -**************************** -utf -**************************** -UTF-8 Library - -The authors of this software are Rob Pike and Ken Thompson. - Copyright (c) 1998-2002 by Lucent Technologies. -Permission to use, copy, modify, and distribute this software for any -purpose without fee is hereby granted, provided that this entire notice -is included in all copies of any software which is or includes a copy -or modification of this software and in all copies of the supporting -documentation for such software. -THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED -WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE ANY -REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY -OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. - - -**************************** -xmpmeta -**************************** -xmpmeta. A fast XMP metadata parsing and writing library. -Copyright 2016 Google Inc. All rights reserved. - ---- See BSD License (Google) at the end of this file --- - -Xorg -**************************** -The following is the 'standard copyright' agreed upon by most contributors, -and is currently the canonical license preferred by the X.Org Foundation. -This is a slight variant of the common MIT license form published by the -Open Source Initiative at http://www.opensource.org/licenses/mit-license.php - -Copyright holders of new code should use this license statement where -possible, and insert their name to this list. Please sort by surname -for people, and by the full name for other entities (e.g. Juliusz -Chroboczek sorts before Intel Corporation sorts before Daniel Stone). - -See each individual source file or directory for the license that applies -to that file. - -Copyright (C) 2003-2006,2008 Jamey Sharp, Josh Triplett -Copyright © 2009 Red Hat, Inc. -Copyright 1990-1992,1999,2000,2004,2009,2010 Oracle and/or its affiliates. -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice (including the next -paragraph) shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - - ---------------------------------------------------------------------- - -The following licenses are 'legacy' - usually MIT/X11 licenses with the name -of the copyright holder(s) in the license statement: - -Copyright 1984-1994, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -X Window System is a trademark of The Open Group. - - ---------------------------------------- - -Copyright 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium -Copyright 2000 The XFree86 Project, Inc. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the X Consortium. - -Copyright 1985, 1986, 1987, 1988, 1989, 1990, 1991 by -Digital Equipment Corporation - -Portions Copyright 1990, 1991 by Tektronix, Inc. - -Permission to use, copy, modify and distribute this documentation for -any purpose and without fee is hereby granted, provided that the above -copyright notice appears in all copies and that both that copyright notice -and this permission notice appear in all copies, and that the names of -Digital and Tektronix not be used in in advertising or publicity pertaining -to this documentation without specific, written prior permission. -Digital and Tektronix makes no representations about the suitability -of this documentation for any purpose. -It is provided ``as is'' without express or implied warranty. - - ---------------------------------------- - -Copyright (c) 1999-2000 Free Software Foundation, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -FREE SOFTWARE FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the Free Software Foundation -shall not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization from the -Free Software Foundation. - - ---------------------------------------- - -Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. - All Rights Reserved - -This file is a component of an X Window System-specific implementation -of Xcms based on the TekColor Color Management System. TekColor is a -trademark of Tektronix, Inc. The term "TekHVC" designates a particular -color space that is the subject of U.S. Patent No. 4,985,853 (equivalent -foreign patents pending). Permission is hereby granted to use, copy, -modify, sell, and otherwise distribute this software and its -documentation for any purpose and without fee, provided that: - -1. This copyright, permission, and disclaimer notice is reproduced in - all copies of this software and any modification thereof and in - supporting documentation; -2. Any color-handling application which displays TekHVC color - cooordinates identifies these as TekHVC color coordinates in any - interface that displays these coordinates and in any associated - documentation; -3. The term "TekHVC" is always used, and is only used, in association - with the mathematical derivations of the TekHVC Color Space, - including those provided in this file and any equivalent pathways and - mathematical derivations, regardless of digital (e.g., floating point - or integer) representation. - -Tektronix makes no representation about the suitability of this software -for any purpose. It is provided "as is" and with all faults. - -TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, -INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER -RESULTING FROM LOSS OF USE, DATA, OR PROFITS, WHETHER IN AN ACTION OF -CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR THE PERFORMANCE OF THIS SOFTWARE. - - ---------------------------------------- - -(c) Copyright 1995 FUJITSU LIMITED -This is source code modified by FUJITSU LIMITED under the Joint -Development Agreement for the CDE/Motif PST. - - ---------------------------------------- - -Copyright 1992 by Oki Technosystems Laboratory, Inc. -Copyright 1992 by Fuji Xerox Co., Ltd. - -Permission to use, copy, modify, distribute, and sell this software -and its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and -that both that copyright notice and this permission notice appear -in supporting documentation, and that the name of Oki Technosystems -Laboratory and Fuji Xerox not be used in advertising or publicity -pertaining to distribution of the software without specific, written -prior permission. -Oki Technosystems Laboratory and Fuji Xerox make no representations -about the suitability of this software for any purpose. It is provided -"as is" without express or implied warranty. - -OKI TECHNOSYSTEMS LABORATORY AND FUJI XEROX DISCLAIM ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL OKI TECHNOSYSTEMS -LABORATORY AND FUJI XEROX BE LIABLE FOR ANY SPECIAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE -OR PERFORMANCE OF THIS SOFTWARE. - - ---------------------------------------- - -Copyright 1990, 1991, 1992, 1993, 1994 by FUJITSU LIMITED - -Permission to use, copy, modify, distribute, and sell this software -and its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and -that both that copyright notice and this permission notice appear -in supporting documentation, and that the name of FUJITSU LIMITED -not be used in advertising or publicity pertaining to distribution -of the software without specific, written prior permission. -FUJITSU LIMITED makes no representations about the suitability of -this software for any purpose. -It is provided "as is" without express or implied warranty. - -FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -EVENT SHALL FUJITSU LIMITED BE LIABLE FOR ANY SPECIAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF -USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - - ---------------------------------------- - - -Copyright (c) 1995 David E. Wexelblat. All rights reserved - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL DAVID E. WEXELBLAT BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of David E. Wexelblat shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from David E. Wexelblat. - - ---------------------------------------- - -Copyright 1990, 1991 by OMRON Corporation - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation, and that the name OMRON not be used in -advertising or publicity pertaining to distribution of the software without -specific, written prior permission. OMRON makes no representations -about the suitability of this software for any purpose. It is provided -"as is" without express or implied warranty. - -OMRON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -EVENT SHALL OMRON BE LIABLE FOR ANY SPECIAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - - ---------------------------------------- - -Copyright 1985, 1986, 1987, 1988, 1989, 1990, 1991 by -Digital Equipment Corporation - -Portions Copyright 1990, 1991 by Tektronix, Inc - -Rewritten for X.org by Chris Lee - -Permission to use, copy, modify, distribute, and sell this documentation -for any purpose and without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. -Chris Lee makes no representations about the suitability for any purpose -of the information in this document. It is provided \`\`as-is'' without -express or implied warranty. - - ---------------------------------------- - -Copyright 1993 by Digital Equipment Corporation, Maynard, Massachusetts, -Copyright 1994 by FUJITSU LIMITED -Copyright 1994 by Sony Corporation - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the names of Digital, FUJITSU -LIMITED and Sony Corporation not be used in advertising or publicity -pertaining to distribution of the software without specific, written -prior permission. - -DIGITAL, FUJITSU LIMITED AND SONY CORPORATION DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL, FUJITSU LIMITED -AND SONY CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF -USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - - ---------------------------------------- - - -Copyright 1991 by the Open Software Foundation - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation, and that the name of Open Software Foundation -not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. Open Software -Foundation makes no representations about the suitability of this -software for any purpose. It is provided "as is" without express or -implied warranty. - -OPEN SOFTWARE FOUNDATION DISCLAIMS ALL WARRANTIES WITH REGARD TO -THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS, IN NO EVENT SHALL OPEN SOFTWARE FOUNDATIONN BE -LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ---------------------------------------- - -Copyright 1990, 1991, 1992,1993, 1994 by FUJITSU LIMITED -Copyright 1993, 1994 by Sony Corporation - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, provided -that the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation, and that the name of FUJITSU LIMITED and Sony Corporation -not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. FUJITSU LIMITED and -Sony Corporation makes no representations about the suitability of this -software for any purpose. It is provided "as is" without express or -implied warranty. - -FUJITSU LIMITED AND SONY CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD -TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS, IN NO EVENT SHALL FUJITSU LIMITED OR SONY CORPORATION BE LIABLE -FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER -RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, -NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE -USE OR PERFORMANCE OF THIS SOFTWARE. - - ---------------------------------------- - -Copyright (c) 1993, 1995 by Silicon Graphics Computer Systems, Inc. - -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, provided that the above copyright -notice appear in all copies and that both that copyright -notice and this permission notice appear in supporting -documentation, and that the name of Silicon Graphics not be -used in advertising or publicity pertaining to distribution -of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability -of this software for any purpose. It is provided "as is" -without any express or implied warranty. - -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH -THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ---------------------------------------- - -Copyright 1991, 1992, 1993, 1994 by FUJITSU LIMITED -Copyright 1993 by Digital Equipment Corporation - -Permission to use, copy, modify, distribute, and sell this software -and its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of FUJITSU LIMITED and -Digital Equipment Corporation not be used in advertising or publicity -pertaining to distribution of the software without specific, written -prior permission. FUJITSU LIMITED and Digital Equipment Corporation -makes no representations about the suitability of this software for -any purpose. It is provided "as is" without express or implied -warranty. - -FUJITSU LIMITED AND DIGITAL EQUIPMENT CORPORATION DISCLAIM ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -FUJITSU LIMITED AND DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR -ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. - - ---------------------------------------- - -Copyright 1992, 1993 by FUJITSU LIMITED -Copyright 1993 by Fujitsu Open Systems Solutions, Inc. -Copyright 1994 by Sony Corporation - -Permission to use, copy, modify, distribute and sell this software -and its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and -that both that copyright notice and this permission notice appear -in supporting documentation, and that the name of FUJITSU LIMITED, -Fujitsu Open Systems Solutions, Inc. and Sony Corporation not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. -FUJITSU LIMITED, Fujitsu Open Systems Solutions, Inc. and -Sony Corporation make no representations about the suitability of -this software for any purpose. It is provided "as is" without -express or implied warranty. - -FUJITSU LIMITED, FUJITSU OPEN SYSTEMS SOLUTIONS, INC. AND SONY -CORPORATION DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, -IN NO EVENT SHALL FUJITSU OPEN SYSTEMS SOLUTIONS, INC., FUJITSU LIMITED -AND SONY CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE -OR PERFORMANCE OF THIS SOFTWARE. - - ---------------------------------------- - -Copyright 1987, 1988, 1990, 1993 by Digital Equipment Corporation, -Maynard, Massachusetts, - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - - ---------------------------------------- - -Copyright 1993 by SunSoft, Inc. -Copyright 1999-2000 by Bruno Haible - -Permission to use, copy, modify, distribute, and sell this software -and its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and -that both that copyright notice and this permission notice appear -in supporting documentation, and that the names of SunSoft, Inc. and -Bruno Haible not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. SunSoft, Inc. and Bruno Haible make no representations -about the suitability of this software for any purpose. It is -provided "as is" without express or implied warranty. - -SunSoft Inc. AND Bruno Haible DISCLAIM ALL WARRANTIES WITH REGARD -TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS, IN NO EVENT SHALL SunSoft, Inc. OR Bruno Haible BE LIABLE -FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ---------------------------------------- - -Copyright 1991 by the Open Software Foundation -Copyright 1993 by the TOSHIBA Corp. - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation, and that the names of Open Software Foundation and TOSHIBA -not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. Open Software -Foundation and TOSHIBA make no representations about the suitability of this -software for any purpose. It is provided "as is" without express or -implied warranty. - -OPEN SOFTWARE FOUNDATION AND TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO -THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS, IN NO EVENT SHALL OPEN SOFTWARE FOUNDATIONN OR TOSHIBA BE -LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ---------------------------------------- - -Copyright 1988 by Wyse Technology, Inc., San Jose, Ca., - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name Wyse not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -WYSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - - ---------------------------------------- - - -Copyright 1991 by the Open Software Foundation -Copyright 1993, 1994 by the Sony Corporation - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation, and that the names of Open Software Foundation and -Sony Corporation not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior permission. -Open Software Foundation and Sony Corporation make no -representations about the suitability of this software for any purpose. -It is provided "as is" without express or implied warranty. - -OPEN SOFTWARE FOUNDATION AND SONY CORPORATION DISCLAIM ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL OPEN -SOFTWARE FOUNDATIONN OR SONY CORPORATION BE LIABLE FOR ANY SPECIAL, -INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - - ---------------------------------------- - -Copyright 1992, 1993 by FUJITSU LIMITED -Copyright 1993 by Fujitsu Open Systems Solutions, Inc. - -Permission to use, copy, modify, distribute and sell this software -and its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and -that both that copyright notice and this permission notice appear -in supporting documentation, and that the name of FUJITSU LIMITED and -Fujitsu Open Systems Solutions, Inc. not be used in advertising or -publicity pertaining to distribution of the software without specific, -written prior permission. -FUJITSU LIMITED and Fujitsu Open Systems Solutions, Inc. makes no -representations about the suitability of this software for any purpose. -It is provided "as is" without express or implied warranty. - -FUJITSU LIMITED AND FUJITSU OPEN SYSTEMS SOLUTIONS, INC. DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL FUJITSU OPEN SYSTEMS -SOLUTIONS, INC. AND FUJITSU LIMITED BE LIABLE FOR ANY SPECIAL, INDIRECT -OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF -USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -OF THIS SOFTWARE. - - ---------------------------------------- - -Copyright 1993, 1994 by Sony Corporation - -Permission to use, copy, modify, distribute, and sell this software -and its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and -that both that copyright notice and this permission notice appear -in supporting documentation, and that the name of Sony Corporation -not be used in advertising or publicity pertaining to distribution -of the software without specific, written prior permission. -Sony Corporation makes no representations about the suitability of -this software for any purpose. It is provided "as is" without -express or implied warranty. - -SONY CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -EVENT SHALL SONY CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF -USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - - ---------------------------------------- - -Copyright 1986, 1998 The Open Group -Copyright (c) 2000 The XFree86 Project, Inc. - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM OR THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -Except as contained in this notice, the name of the X Consortium or of the -XFree86 Project shall not be used in advertising or otherwise to promote the -sale, use or other dealings in this Software without prior written -authorization from the X Consortium and the XFree86 Project. - - ---------------------------------------- - -Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation, - and Nippon Telegraph and Telephone Corporation -Copyright 1991 by the Open Software Foundation -Copyright 1993 by the FUJITSU LIMITED - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation, and that the names of OMRON, NTT Software, NTT, and -Open Software Foundation not be used in advertising or publicity -pertaining to distribution of the software without specific, -written prior permission. OMRON, NTT Software, NTT, and Open Software -Foundation make no representations about the suitability of this -software for any purpose. It is provided "as is" without express or -implied warranty. - -OMRON, NTT SOFTWARE, NTT, AND OPEN SOFTWARE FOUNDATION -DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT -SHALL OMRON, NTT SOFTWARE, NTT, OR OPEN SOFTWARE FOUNDATION BE -LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ---------------------------------------- - -Copyright 1988 by Wyse Technology, Inc., San Jose, Ca, -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL AND WYSE DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -EVENT SHALL DIGITAL OR WYSE BE LIABLE FOR ANY SPECIAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF -USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - - ---------------------------------------- - - -Copyright 1991, 1992 by Fuji Xerox Co., Ltd. -Copyright 1992, 1993, 1994 by FUJITSU LIMITED - -Permission to use, copy, modify, distribute, and sell this software -and its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and -that both that copyright notice and this permission notice appear -in supporting documentation, and that the name of Fuji Xerox, -FUJITSU LIMITED not be used in advertising or publicity pertaining -to distribution of the software without specific, written prior -permission. Fuji Xerox, FUJITSU LIMITED make no representations -about the suitability of this software for any purpose. -It is provided "as is" without express or implied warranty. - -FUJI XEROX, FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL FUJI XEROX, -FUJITSU LIMITED BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA -OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - - ---------------------------------------- - -Copyright 2006 Josh Triplett - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - - ---------------------------------------- - -(c) Copyright 1996 by Sebastien Marineau and Holger Veit - - - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -HOLGER VEIT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -Except as contained in this notice, the name of Sebastien Marineau or Holger Veit -shall not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from Holger Veit or -Sebastien Marineau. - - ---------------------------------------- - -Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation, - and Nippon Telegraph and Telephone Corporation -Copyright 1991 by the Open Software Foundation -Copyright 1993 by the TOSHIBA Corp. -Copyright 1993, 1994 by Sony Corporation -Copyright 1993, 1994 by the FUJITSU LIMITED - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation, and that the names of OMRON, NTT Software, NTT, Open -Software Foundation, and Sony Corporation not be used in advertising -or publicity pertaining to distribution of the software without specific, -written prior permission. OMRON, NTT Software, NTT, Open Software -Foundation, and Sony Corporation make no representations about the -suitability of this software for any purpose. It is provided "as is" -without express or implied warranty. - -OMRON, NTT SOFTWARE, NTT, OPEN SOFTWARE FOUNDATION, AND SONY -CORPORATION DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT -SHALL OMRON, NTT SOFTWARE, NTT, OPEN SOFTWARE FOUNDATION, OR SONY -CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ---------------------------------------- - -Copyright 2000 by Bruno Haible - -Permission to use, copy, modify, distribute, and sell this software -and its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and -that both that copyright notice and this permission notice appear -in supporting documentation, and that the name of Bruno Haible not -be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. Bruno Haible -makes no representations about the suitability of this software for -any purpose. It is provided "as is" without express or implied -warranty. - -Bruno Haible DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN -NO EVENT SHALL Bruno Haible BE LIABLE FOR ANY SPECIAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE -OR PERFORMANCE OF THIS SOFTWARE. - - ---------------------------------------- - -Copyright © 2003 Keith Packard - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation, and that the name of Keith Packard not be used in -advertising or publicity pertaining to distribution of the software without -specific, written prior permission. Keith Packard makes no -representations about the suitability of this software for any purpose. It -is provided "as is" without express or implied warranty. - -KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - - ---------------------------------------- - -Copyright (c) 2007-2009, Troy D. Hanson -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ---------------------------------------- - -Copyright 1992, 1993 by TOSHIBA Corp. - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, provided -that the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation, and that the name of TOSHIBA not be used in advertising -or publicity pertaining to distribution of the software without specific, -written prior permission. TOSHIBA make no representations about the -suitability of this software for any purpose. It is provided "as is" -without express or implied warranty. - -TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - - - ---------------------------------------- - -Copyright IBM Corporation 1993 - -All Rights Reserved - -License to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of IBM not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS, AND -NONINFRINGEMENT OF THIRD PARTY RIGHTS, IN NO EVENT SHALL -IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - - ---------------------------------------- - -Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation, - and Nippon Telegraph and Telephone Corporation - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation, and that the names of OMRON, NTT Software, and NTT -not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. OMRON, NTT Software, -and NTT make no representations about the suitability of this -software for any purpose. It is provided "as is" without express or -implied warranty. - -OMRON, NTT SOFTWARE, AND NTT, DISCLAIM ALL WARRANTIES WITH REGARD -TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS, IN NO EVENT SHALL OMRON, NTT SOFTWARE, OR NTT, BE -LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -**************************** -zlib -**************************** -(extracted from README, except for match.S) - -Copyright notice: - - (C) 1995-2013 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - -If you use the zlib library in a product, we would appreciate *not* receiving -lengthy legal documents to sign. The sources are provided for free but without -warranty of any kind. The library has been entirely written by Jean-loup -Gailly and Mark Adler; it does not include third-party code. - -If you redistribute modified sources, we would appreciate that you include in -the file ChangeLog history information documenting your changes. Please read -the FAQ for more information on the distribution of modified source versions. - -(extracted from match.S, for match.S only) - -Copyright (C) 1998, 2007 Brian Raiter - -This software is provided 'as-is', without any express or implied -warranty. In no event will the author be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. - - -**************************** -googleurl -**************************** -Copyright 2007, Google Inc. -All rights reserved. - ---- See BSD License (Google) at the end of this file --- - -------------------------------------------------------------------------------- - -The file url_parse.cc is based on nsURLParsers.cc from Mozilla. This file is -licensed separately as follows: - -The contents of this file are subject to the Mozilla Public License Version -1.1 (the "License"); you may not use this file except in compliance with -the License. You may obtain a copy of the License at -http://www.mozilla.org/MPL/ - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -for the specific language governing rights and limitations under the -License. - -The Original Code is mozilla.org code. - -The Initial Developer of the Original Code is -Netscape Communications Corporation. -Portions created by the Initial Developer are Copyright (C) 1998 -the Initial Developer. All Rights Reserved. - -Contributor(s): - Darin Fisher (original author) - -Alternatively, the contents of this file may be used under the terms of -either the GNU General Public License Version 2 or later (the "GPL"), or -the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -in which case the provisions of the GPL or the LGPL are applicable instead -of those above. If you wish to allow use of your version of this file only -under the terms of either the GPL or the LGPL, and not to allow others to -use your version of this file under the terms of the MPL, indicate your -decision by deleting the provisions above and replace them with the notice -and other provisions required by the GPL or the LGPL. If you do not delete -the provisions above, a recipient may use your version of this file under -the terms of any one of the MPL, the GPL or the LGPL. - -------------------------------------------------------------------------------- - -The file icu_utf.cc is from IBM. This file is licensed separately as follows: - -ICU License - ICU 1.8.1 and later - -COPYRIGHT AND PERMISSION NOTICE - -Copyright (c) 1995-2009 International Business Machines Corporation and others - -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, and/or sell copies of the Software, and to permit persons -to whom the Software is furnished to do so, provided that the above -copyright notice(s) and this permission notice appear in all copies of -the Software and that both the above copyright notice(s) and this -permission notice appear in supporting documentation. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY -SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER -RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF -CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -of the copyright holder. - - -**************************** - ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - -jsoncpp -**************************** -The JsonCpp library's source code, including accompanying documentation, -tests and demonstration applications, are licensed under the following -conditions... - -The author (Baptiste Lepilleur) explicitly disclaims copyright in all -jurisdictions which recognize such a disclaimer. In such jurisdictions, -this software is released into the Public Domain. - -In jurisdictions which do not recognize Public Domain property (e.g. Germany as of -2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is -released under the terms of the MIT License (see below). - -In jurisdictions which recognize Public Domain property, the user of this -software may choose to accept it either as 1) Public Domain, 2) under the -conditions of the MIT License (see below), or 3) under the terms of dual -Public Domain/MIT License conditions described here, as they choose. - -The MIT License is about as close to Public Domain as a license can get, and is -described in clear, concise terms at: - - http://en.wikipedia.org/wiki/MIT_License - -The full text of the MIT License follows: - -======================================================================== -Copyright (c) 2007-2010 Baptiste Lepilleur - ---- See MIT License at the end of this file --- - -======================================================================== -(END LICENSE TEXT) - -The MIT license is compatible with both the GPL and commercial -software, affording one all of the rights of Public Domain with the -minor nuisance of being required to keep the above copyright notice -and license text in the source code. Note also that by accepting the -Public Domain "license" you can re-license your copy using whatever -license you like. - - -**************************** -libwebp -**************************** -Copyright (c) 2010, Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - * Neither the name of Google nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Google fork of Khronos reference front-end for GLSL and ESSL -https://github.com/google/glslang ------------------------------------------------------------------------ -Copyright (c) 2015-2016 The Khronos Group Inc. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and/or associated documentation files (the -"Materials"), to deal in the Materials without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Materials, and to -permit persons to whom the Materials are furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Materials. - -MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS -KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS -SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT - https://www.khronos.org/registry/ - -THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Headless Android Heap Analyzer -https://github.com/square/haha ------------------------------------------------------------------------ -perflib, guava: - ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - -================================================================================ -trove4j: - -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 2.1 of the License, or (at your option) any -later version. This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License -for more details. You should have received a copy of the GNU Lesser General -Public License along with this library; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - -Two classes (HashFunctions and PrimeFinder) included in Trove are licensed -under the following terms: - -Copyright (c) 1999 CERN - European Organization for Nuclear Research. -Permission to use, copy, modify, distribute and sell this software and its -documentation for any purpose is hereby granted without fee, provided that the -above copyright notice appear in all copies and that both that copyright notice -and this permission notice appear in supporting documentation. CERN makes no -representations about the suitability of this software for any purpose. It is -provided "as is" without expressed or implied warranty. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -IAccessible2 COM interfaces for accessibility -http://www.linuxfoundation.org/collaborate/workgroups/accessibility/iaccessible2 ------------------------------------------------------------------------ -/************************************************************************* - * - * IAccessible2 IDL Specification - * - * Copyright (c) 2007, 2010 Linux Foundation - * Copyright (c) 2006 IBM Corporation - * Copyright (c) 2000, 2006 Sun Microsystems, Inc. - * All rights reserved. - * - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * 3. Neither the name of the Linux Foundation nor the names of its - * contributors may be used to endorse or promote products - * derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * This BSD License conforms to the Open Source Initiative "Simplified - * BSD License" as published at: - * http://www.opensource.org/licenses/bsd-license.php - * - * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2 - * mark may be used in accordance with the Linux Foundation Trademark - * Policy to indicate compliance with the IAccessible2 specification. - * - ************************************************************************/ ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -ICU -http://site.icu-project.org/ ------------------------------------------------------------------------ -COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later) - -Copyright © 1991-2017 Unicode, Inc. All rights reserved. -Distributed under the Terms of Use in http://www.unicode.org/copyright.html - -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Unicode data files and any associated documentation -(the "Data Files") or Unicode software and any associated documentation -(the "Software") to deal in the Data Files or Software -without restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, and/or sell copies of -the Data Files or Software, and to permit persons to whom the Data Files -or Software are furnished to do so, provided that either -(a) this copyright and permission notice appear with all copies -of the Data Files or Software, or -(b) this copyright and permission notice appear in associated -Documentation. - -THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT OF THIRD PARTY RIGHTS. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS -NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL -DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THE DATA FILES OR SOFTWARE. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, -use or other dealings in these Data Files or Software without prior -written authorization of the copyright holder. - ---------------------- - -Third-Party Software Licenses - -This section contains third-party software notices and/or additional -terms for licensed third-party software components included within ICU -libraries. - -1. ICU License - ICU 1.8.1 to ICU 57.1 - -COPYRIGHT AND PERMISSION NOTICE - -Copyright (c) 1995-2016 International Business Machines Corporation and others -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, and/or sell copies of the Software, and to permit persons -to whom the Software is furnished to do so, provided that the above -copyright notice(s) and this permission notice appear in all copies of -the Software and that both the above copyright notice(s) and this -permission notice appear in supporting documentation. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY -SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER -RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF -CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -of the copyright holder. - -All trademarks and registered trademarks mentioned herein are the -property of their respective owners. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -ISimpleDOM COM interfaces for accessibility -http://developer.mozilla.org/en-US/docs/Accessibility/AT-APIs ------------------------------------------------------------------------ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2002 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -International Phone Number Library -https://github.com/googlei18n/libphonenumber/ ------------------------------------------------------------------------ - - ---- See Apache License (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Khronos header files -http://www.khronos.org/registry ------------------------------------------------------------------------ -Copyright (c) 2007-2010 The Khronos Group Inc. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and/or associated documentation files (the -"Materials"), to deal in the Materials without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Materials, and to -permit persons to whom the Materials are furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Materials. - -THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. - - -SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) - -Copyright (C) 1992 Silicon Graphics, Inc. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice including the dates of first publication and either -this permission notice or a reference to http://oss.sgi.com/projects/FreeB/ -shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL SILICON -GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of Silicon Graphics, Inc. shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from Silicon -Graphics, Inc. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -LZMA SDK -http://www.7-zip.org/sdk.html ------------------------------------------------------------------------ -LZMA SDK is placed in the public domain. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -LeakCanary -https://github.com/square/leakcanary ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -LevelDB: A Fast Persistent Key-Value Store -https://github.com/google/leveldb.git ------------------------------------------------------------------------ -Copyright (c) 2011 The LevelDB Authors. All rights reserved. - ---- See BSD License (Google) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Material Components for iOS -https://github.com/material-components/material-components-ios ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Material Design Icons -https://github.com/google/material-design-icons ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Material Font Disk Loader iOS -https://github.com/material-foundation/material-font-disk-loader-ios ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Material Internationalization for iOS -https://github.com/material-foundation/material-internationalization-ios ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Material Roboto Font Loader iOS -https://github.com/material-foundation/material-roboto-font-loader-ios ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Material Sprited Animation View -https://github.com/material-foundation/material-sprited-animation-view-ios ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Material Text Accessibility iOS -https://github.com/material-foundation/material-text-accessibility-ios ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -MediaController Android sample. -https://android.googlesource.com/platform/development/+/b356564/samples/Support4Demos/src/com/example/android/supportv4/media/MediaController.java ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Motion Interchange for Objective-C -https://github.com/material-motion/motion-interchange-objc ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Mozilla Personal Security Manager -https://dxr.mozilla.org/mozilla-central/source/security/manager/ ------------------------------------------------------------------------ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape security libraries. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -NSBezierPath additions from Sean Patrick O'Brien -http://www.seanpatrickobrien.com/journal/posts/3 ------------------------------------------------------------------------ -Copyright 2008 MolokoCacao -All rights reserved - -Redistribution and use in source and binary forms, with or without -modification, are permitted providing that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -NVidia Control X Extension Library -http://cgit.freedesktop.org/~aplattner/nvidia-settings/ ------------------------------------------------------------------------ -/* - * Copyright (c) 2008 NVIDIA, Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Netscape Portable Runtime (NSPR) -http://www.mozilla.org/projects/nspr/ ------------------------------------------------------------------------ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Network Security Services (NSS) -http://www.mozilla.org/projects/security/pki/nss/ ------------------------------------------------------------------------ -NSS is available under the Mozilla Public License, version 2, a copy of which -is below. - -Note on GPL Compatibility -------------------------- - -The MPL 2, section 3.3, permits you to combine NSS with code under the GNU -General Public License (GPL) version 2, or any later version of that -license, to make a Larger Work, and distribute the result under the GPL. -The only condition is that you must also make NSS, and any changes you -have made to it, available to recipients under the terms of the MPL 2 also. - -Anyone who receives the combined code from you does not have to continue -to dual licence in this way, and may, if they wish, distribute under the -terms of either of the two licences - either the MPL alone or the GPL -alone. However, we discourage people from distributing copies of NSS under -the GPL alone, because it means that any improvements they make cannot be -reincorporated into the main version of NSS. There is never a need to do -this for license compatibility reasons. - -Note on LGPL Compatibility --------------------------- - -The above also applies to combining MPLed code in a single library with -code under the GNU Lesser General Public License (LGPL) version 2.1, or -any later version of that license. If the LGPLed code and the MPLed code -are not in the same library, then the copyleft coverage of the two -licences does not overlap, so no issues arise. - - -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -OTS (OpenType Sanitizer) -https://github.com/khaledhosny/ots.git ------------------------------------------------------------------------ -Copyright (c) 2009-2017 The OTS Authors. All rights reserved. - ---- See BSD License (Google) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -OpenH264 -http://www.openh264.org/ ------------------------------------------------------------------------ -Copyright (c) 2013, Cisco Systems -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, this - list of conditions and the following disclaimer in the documentation and/or - other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -OpenMAX DL -https://silver.arm.com/download/Software/Graphics/OX000-BU-00010-r1p0-00bet0/OX000-BU-00010-r1p0-00bet0.tgz ------------------------------------------------------------------------ -Use of this source code is governed by a BSD-style license that can be -found in the LICENSE file in the root of the source tree. All -contributing project authors may be found in the AUTHORS file in the -root of the source tree. - -The files were originally licensed by ARM Limited. - -The following files: - - * dl/api/omxtypes.h - * dl/sp/api/omxSP.h - -are licensed by Khronos: - -Copyright © 2005-2008 The Khronos Group Inc. All Rights Reserved. - -These materials are protected by copyright laws and contain material -proprietary to the Khronos Group, Inc. You may use these materials -for implementing Khronos specifications, without altering or removing -any trademark, copyright or other notice from the specification. - -Khronos Group makes no, and expressly disclaims any, representations -or warranties, express or implied, regarding these materials, including, -without limitation, any implied warranties of merchantability or fitness -for a particular purpose or non-infringement of any intellectual property. -Khronos Group makes no, and expressly disclaims any, warranties, express -or implied, regarding the correctness, accuracy, completeness, timeliness, -and reliability of these materials. - -Under no circumstances will the Khronos Group, or any of its Promoters, -Contributors or Members or their respective partners, officers, directors, -employees, agents or representatives be liable for any damages, whether -direct, indirect, special or consequential damages for lost revenues, -lost profits, or otherwise, arising from or in connection with these -materials. - -Khronos and OpenMAX are trademarks of the Khronos Group Inc. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -OpenVR SDK -https://github.com/ValveSoftware/openvr ------------------------------------------------------------------------ -Copyright (c) 2015, Valve Corporation -All rights reserved. - ---- See BSD License (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -PDFium -http://code.google.com/p/pdfium/ ------------------------------------------------------------------------ -// Copyright 2014 PDFium Authors. All rights reserved. -// -// - ---- See BSD License (Google) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -PLY (Python Lex-Yacc) -http://www.dabeaz.com/ply/ply-3.4.tar.gz ------------------------------------------------------------------------ -PLY (Python Lex-Yacc) Version 3.4 - -Copyright (C) 2001-2011, -David M. Beazley (Dabeaz LLC) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. -* Neither the name of the David Beazley or Dabeaz LLC may be used to - endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Paul Hsieh's SuperFastHash -http://www.azillionmonkeys.com/qed/hash.html ------------------------------------------------------------------------ -Paul Hsieh OLD BSD license - -Copyright (c) 2010, Paul Hsieh -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice, this - list of conditions and the following disclaimer in the documentation and/or - other materials provided with the distribution. -* Neither my name, Paul Hsieh, nor the names of any other contributors to the - code use may not be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Perfetto -https://android.googlesource.com/platform/external/perfetto/ ------------------------------------------------------------------------ - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Polymer -http://www.polymer-project.org/ ------------------------------------------------------------------------ -// Copyright (c) 2012 The Polymer Authors. All rights reserved. -// -// - ---- See BSD License (Google) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Protocol Buffers -https://github.com/google/protobuf ------------------------------------------------------------------------ -This license applies to all parts of Protocol Buffers except the following: - - - Atomicops support for generic gcc, located in - src/google/protobuf/stubs/atomicops_internals_generic_gcc.h. - This file is copyrighted by Red Hat Inc. - - - Atomicops support for AIX/POWER, located in - src/google/protobuf/stubs/atomicops_internals_power.h. - This file is copyrighted by Bloomberg Finance LP. - -Copyright 2014, Google Inc. All rights reserved. - ---- See BSD License (Google) at the end of this file --- - -Code generated by the Protocol Buffer compiler is owned by the owner -of the input file used when generating it. This code is not -standalone and requires a support library to be linked with it. This -support library is itself covered by the above license. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Quick Color Management System -https://github.com/jrmuizel/qcms/tree/v4 ------------------------------------------------------------------------ -qcms -Copyright (C) 2009 Mozilla Corporation -Copyright (C) 1998-2007 Marti Maria - ---- See MIT License at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -SMHasher -http://code.google.com/p/smhasher/ ------------------------------------------------------------------------ -All MurmurHash source files are placed in the public domain. - -The license below applies to all other code in SMHasher: - -Copyright (c) 2011 Google, Inc. - ---- See MIT License at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -SPIR-V Tools -https://github.com/KhronosGroup/SPIRV-Tools.git ------------------------------------------------------------------------ -Copyright (c) 2015-2016 The Khronos Group Inc. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and/or associated documentation files (the -"Materials"), to deal in the Materials without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Materials, and to -permit persons to whom the Materials are furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Materials. - -MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS -KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS -SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT - https://www.khronos.org/registry/ - -THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Shaderc -https://github.com/google/shaderc ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Skia -https://skia.org/ ------------------------------------------------------------------------ -// Copyright (c) 2011 Google Inc. All rights reserved. -// -// - ---- See BSD License (Google) at the end of this file --- - --------------------------------------------------------------------------------- ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Snappy: A fast compressor/decompressor -http://google.github.io/snappy/ ------------------------------------------------------------------------ -Copyright 2011, Google Inc. -All rights reserved. - ---- See BSD License (Google) at the end of this file --- - -=== - -Some of the benchmark data in testdata/ is licensed differently: - - - fireworks.jpeg is Copyright 2013 Steinar H. Gunderson, and - is licensed under the Creative Commons Attribution 3.0 license - (CC-BY-3.0). See https://creativecommons.org/licenses/by/3.0/ - for more information. - - - kppkn.gtb is taken from the Gaviota chess tablebase set, and - is licensed under the MIT License. See - https://sites.google.com/site/gaviotachessengine/Home/endgame-tablebases-1 - for more information. - - - paper-100k.pdf is an excerpt (bytes 92160 to 194560) from the paper - “Combinatorial Modeling of Chromatin Features Quantitatively Predicts DNA - Replication Timing in _Drosophila_” by Federico Comoglio and Renato Paro, - which is licensed under the CC-BY license. See - http://www.ploscompbiol.org/static/license for more ifnormation. - - - alice29.txt, asyoulik.txt, plrabn12.txt and lcet10.txt are from Project - Gutenberg. The first three have expired copyrights and are in the public - domain; the latter does not have expired copyright, but is still in the - public domain according to the license information - (http://www.gutenberg.org/ebooks/53). ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Speech Dispatcher -http://devel.freebsoft.org/speechd ------------------------------------------------------------------------ - - ---- See GNU LESSER GENERAL PUBLIC LICENSE (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Strongtalk -http://www.strongtalk.org/ ------------------------------------------------------------------------ -Copyright (c) 1994-2006 Sun Microsystems Inc. -All Rights Reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -- Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -- Redistribution in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -- Neither the name of Sun Microsystems or the names of contributors may -be used to endorse or promote products derived from this software without -specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Sudden Motion Sensor library -http://www.suitable.com/tools/smslib.html ------------------------------------------------------------------------ -SMSLib Sudden Motion Sensor Access Library -Copyright (c) 2010 Suitable Systems -All rights reserved. - -Developed by: Daniel Griscom - Suitable Systems - http://www.suitable.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal with the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -- Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimers. - -- Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimers in the -documentation and/or other materials provided with the distribution. - -- Neither the names of Suitable Systems nor the names of its -contributors may be used to endorse or promote products derived from -this Software without specific prior written permission. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. - -For more information about SMSLib, see - -or contact - Daniel Griscom - Suitable Systems - 1 Centre Street, Suite 204 - Wakefield, MA 01880 - (781) 665-0053 ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -SwiftShader -https://swiftshader.googlesource.com/SwiftShader ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -The Chromium Project -http://www.chromium.org/ ------------------------------------------------------------------------ -// Copyright 2015 The Chromium Authors. All rights reserved. -// -// - ---- See BSD License (Google) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -The USB ID Repository -http://www.linux-usb.org/usb-ids.html ------------------------------------------------------------------------ -Copyright (c) 2012, Linux USB Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -o Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -o Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -o Neither the name of the Linux USB Project nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -The library to input, validate, and display addresses. -https://github.com/googlei18n/libaddressinput ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -V8 JavaScript Engine -http://code.google.com/p/v8 ------------------------------------------------------------------------ -This license applies to all parts of V8 that are not externally -maintained libraries. The externally maintained libraries used by V8 -are: - - - PCRE test suite, located in - test/mjsunit/third_party/regexp-pcre/regexp-pcre.js. This is based on the - test suite from PCRE-7.3, which is copyrighted by the University - of Cambridge and Google, Inc. The copyright notice and license - are embedded in regexp-pcre.js. - - - Layout tests, located in test/mjsunit/third_party/object-keys. These are - based on layout tests from webkit.org which are copyrighted by - Apple Computer, Inc. and released under a 3-clause BSD license. - - - Strongtalk assembler, the basis of the files assembler-arm-inl.h, - assembler-arm.cc, assembler-arm.h, assembler-ia32-inl.h, - assembler-ia32.cc, assembler-ia32.h, assembler-x64-inl.h, - assembler-x64.cc, assembler-x64.h, assembler-mips-inl.h, - assembler-mips.cc, assembler-mips.h, assembler.cc and assembler.h. - This code is copyrighted by Sun Microsystems Inc. and released - under a 3-clause BSD license. - - - Valgrind client API header, located at third_party/valgrind/valgrind.h - This is release under the BSD license. - -These libraries have their own licenses; we recommend you read them, -as their terms may differ from the terms below. - -Further license information can be found in LICENSE files located in -sub-directories. - -Copyright 2014, the V8 project authors. All rights reserved. - ---- See BSD License (Google) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Vulkan API headers -https://github.com/LunarG/VulkanTools/tree/master/include/vulkan ------------------------------------------------------------------------ -Copyright (C) 2015 Valve Corporation - ---- See MIT License at the end of this file --- - -Copyright (C) 2016 Valve Corporation -Copyright (C) 2016 Google Inc. - ---- See MIT License at the end of this file --- - -stb_trutype.h: -stb_truetype.h - v1.07 - public domain -authored from 2009-2015 by Sean Barrett / RAD Game Tools - -LICENSE - -This software is in the public domain. Where that dedication is not -recognized, you are granted a perpetual, irrevocable license to copy, -distribute, and modify this file as you see fit. - - - -glm: -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) -/// - ---- See MIT License at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Web Animations JS -https://github.com/web-animations/web-animations-js ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -WebKit -http://webkit.org/ ------------------------------------------------------------------------ -(WebKit doesn't distribute an explicit license. This LICENSE is derived from -license text in the source.) - -Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -2006, 2007 Alexander Kellett, Alexey Proskuryakov, Alex Mathews, Allan -Sandfeld Jensen, Alp Toker, Anders Carlsson, Andrew Wellington, Antti -Koivisto, Apple Inc., Arthur Langereis, Baron Schwartz, Bjoern Graf, -Brent Fulgham, Cameron Zwarich, Charles Samuels, Christian Dywan, -Collabora Ltd., Cyrus Patel, Daniel Molkentin, Dave Maclachlan, David -Smith, Dawit Alemayehu, Dirk Mueller, Dirk Schulze, Don Gibson, Enrico -Ros, Eric Seidel, Frederik Holljen, Frerich Raabe, Friedmann Kleint, -George Staikos, Google Inc., Graham Dennis, Harri Porten, Henry Mason, -Hiroyuki Ikezoe, Holger Hans Peter Freyther, IBM, James G. Speth, Jan -Alonzo, Jean-Loup Gailly, John Reis, Jonas Witt, Jon Shier, Jonas -Witt, Julien Chaffraix, Justin Haygood, Kevin Ollivier, Kevin Watters, -Kimmo Kinnunen, Kouhei Sutou, Krzysztof Kowalczyk, Lars Knoll, Luca -Bruno, Maks Orlovich, Malte Starostik, Mark Adler, Martin Jones, -Marvin Decker, Matt Lilek, Michael Emmel, Mitz Pettel, mozilla.org, -Netscape Communications Corporation, Nicholas Shanks, Nikolas -Zimmermann, Nokia, Oliver Hunt, Opened Hand, Paul Johnston, Peter -Kelly, Pioneer Research Center USA, Rich Moore, Rob Buis, Robin Dunn, -Ronald Tschalär, Samuel Weinig, Simon Hausmann, Staikos Computing -Services Inc., Stefan Schimanski, Symantec Corporation, The Dojo -Foundation, The Karbon Developers, Thomas Boyer, Tim Copperfield, -Tobias Anton, Torben Weis, Trolltech, University of Cambridge, Vaclav -Slavik, Waldo Bastian, Xan Lopez, Zack Rusin - -The terms and conditions vary from file to file, but are one of: - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the - distribution. - -*OR* - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the - distribution. -3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - its contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - GNU LIBRARY GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the library GPL. It is - numbered 2 because it goes with version 2 of the ordinary GPL.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Library General Public License, applies to some -specially designated Free Software Foundation software, and to any -other libraries whose authors decide to use it. You can use it for -your libraries, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if -you distribute copies of the library, or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide -complete object files to the recipients so that they can relink them -with the library, after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - Our method of protecting your rights has two steps: (1) copyright -the library, and (2) offer you this license which gives you legal -permission to copy, distribute and/or modify the library. - - Also, for each distributor's protection, we want to make certain -that everyone understands that there is no warranty for this free -library. If the library is modified by someone else and passed on, we -want its recipients to know that what they have is not the original -version, so that any problems introduced by others will not reflect on -the original authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that companies distributing free -software will individually obtain patent licenses, thus in effect -transforming the program into proprietary software. To prevent this, -we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - - Most GNU software, including some libraries, is covered by the ordinary -GNU General Public License, which was designed for utility programs. This -license, the GNU Library General Public License, applies to certain -designated libraries. This license is quite different from the ordinary -one; be sure to read it in full, and don't assume that anything in it is -the same as in the ordinary license. - - The reason we have a separate public license for some libraries is that -they blur the distinction we usually make between modifying or adding to a -program and simply using it. Linking a program with a library, without -changing the library, is in some sense simply using the library, and is -analogous to running a utility program or application program. However, in -a textual and legal sense, the linked executable is a combined work, a -derivative of the original library, and the ordinary General Public License -treats it as such. - - Because of this blurred distinction, using the ordinary General -Public License for libraries did not effectively promote software -sharing, because most developers did not use the libraries. We -concluded that weaker conditions might promote sharing better. - - However, unrestricted linking of non-free programs would deprive the -users of those programs of all benefit from the free status of the -libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while -preserving your freedom as a user of such programs to change the free -libraries that are incorporated in them. (We have not seen how to achieve -this as regards changes in header files, but we have achieved it as regards -changes in the actual functions of the Library.) The hope is that this -will lead to faster development of free libraries. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, while the latter only -works together with the library. - - Note that it is possible for a library to be covered by the ordinary -General Public License rather than by this special one. - - GNU LIBRARY GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library which -contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Library -General Public License (also called "this License"). Each licensee is -addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also compile or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - c) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - d) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the source code distributed need not include anything that is normally -distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Library General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -WebM container parser and writer. -http://www.webmproject.org/code/ ------------------------------------------------------------------------ -Copyright (c) 2010, Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - * Neither the name of Google nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -WebP image encoder/decoder -http://developers.google.com/speed/webp ------------------------------------------------------------------------ -Copyright (c) 2010, Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - * Neither the name of Google nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Additional IP Rights Grant (Patents) ------------------------------------- - -"These implementations" means the copyrightable works that implement the WebM -codecs distributed by Google as part of the WebM Project. - -Google hereby grants to you a perpetual, worldwide, non-exclusive, no-charge, -royalty-free, irrevocable (except as stated in this section) patent license to -make, have made, use, offer to sell, sell, import, transfer, and otherwise -run, modify and propagate the contents of these implementations of WebM, where -such license applies only to those patent claims, both currently owned by -Google and acquired in the future, licensable by Google that are necessarily -infringed by these implementations of WebM. This grant does not include claims -that would be infringed only as a consequence of further modification of these -implementations. If you or your agent or exclusive licensee institute or order -or agree to the institution of patent litigation or any other patent -enforcement activity against any entity (including a cross-claim or -counterclaim in a lawsuit) alleging that any of these implementations of WebM -or any code incorporated within any of these implementations of WebM -constitute direct or contributory patent infringement, or inducement of -patent infringement, then any patent rights granted to you under this License -for these implementations of WebM shall terminate as of the date such -litigation is filed. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -WebRTC -http://www.webrtc.org/ ------------------------------------------------------------------------ -Copyright (c) 2011, The WebRTC project authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - * Neither the name of Google nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Windows Template Library (WTL) -http://wtl.sourceforge.net/ ------------------------------------------------------------------------ -Microsoft Permissive License (Ms-PL) -Published: October 12, 2006 - - -This license governs use of the accompanying software. If you use the software, -you accept this license. If you do not accept the license, do not use the -software. - - -1. Definitions - -The terms "reproduce," "reproduction," "derivative works," and "distribution" -have the same meaning here as under U.S. copyright law. - -A "contribution" is the original software, or any additions or changes to the -software. - -A "contributor" is any person that distributes its contribution under this -license. - -"Licensed patents" are a contributor’s patent claims that read directly on its -contribution. - - -2. Grant of Rights - -(A) Copyright Grant- Subject to the terms of this license, including the -license conditions and limitations in section 3, each contributor grants you a -non-exclusive, worldwide, royalty-free copyright license to reproduce its -contribution, prepare derivative works of its contribution, and distribute its -contribution or any derivative works that you create. - -(B) Patent Grant- Subject to the terms of this license, including the license -conditions and limitations in section 3, each contributor grants you a -non-exclusive, worldwide, royalty-free license under its licensed patents to -make, have made, use, sell, offer for sale, import, and/or otherwise dispose of -its contribution in the software or derivative works of the contribution in the -software. - - -3. Conditions and Limitations - -(A) No Trademark License- This license does not grant you rights to use any -contributors’ name, logo, or trademarks. - -(B) If you bring a patent claim against any contributor over patents that you -claim are infringed by the software, your patent license from such contributor -to the software ends automatically. - -(C) If you distribute any portion of the software, you must retain all -copyright, patent, trademark, and attribution notices that are present in the -software. - -(D) If you distribute any portion of the software in source code form, you may -do so only under this license by including a complete copy of this license with -your distribution. If you distribute any portion of the software in compiled or -object code form, you may only do so under a license that complies with this -license. - -(E) The software is licensed "as-is." You bear the risk of using it. The -contributors give no express warranties, guarantees or conditions. You may have -additional consumer rights under your local laws which this license cannot -change. To the extent permitted under your local laws, the contributors exclude -the implied warranties of merchantability, fitness for a particular purpose and -non-infringement. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -XZ Utils -http://tukaani.org/xz/ ------------------------------------------------------------------------ -See http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/xz/COPYING ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -Yara -https://github.com/virustotal/yara ------------------------------------------------------------------------ -Copyright (c) 2007-2016. The YARA Authors. All Rights Reserved. - ---- See BSD License (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -blink HTMLTokenizer -http://www.chromium.org/blink ------------------------------------------------------------------------ -Copyright (C) 2008 Apple Inc. All Rights Reserved. -Copyright (C) 2009 Torch Mobile, Inc. http://www.torchmobile.com/ -Copyright (C) 2010 Google, Inc. All Rights Reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * -THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -boringssl -https://boringssl.googlesource.com/boringssl ------------------------------------------------------------------------ -BoringSSL is a fork of OpenSSL. As such, large parts of it fall under OpenSSL -licensing. Files that are completely new have a Google copyright and an ISC -license. This license is reproduced at the bottom of this file. - -Contributors to BoringSSL are required to follow the CLA rules for Chromium: -https://cla.developers.google.com/clas - -Some files from Intel are under yet another license, which is also included -underneath. Files in third_party/ have their own licenses, as described -therein. The MIT license, for third_party/fiat, which, unlike other third_party -directories, is compiled into non-test libraries, is included below. - -The OpenSSL toolkit stays under a dual license, i.e. both the conditions of the -OpenSSL License and the original SSLeay license apply to the toolkit. See below -for the actual license texts. Actually both licenses are BSD-style Open Source -licenses. In case of any license issues related to OpenSSL please contact -openssl-core@openssl.org. - -The following are Google-internal bug numbers where explicit permission from -some authors is recorded for use of their work. (This is purely for our own -record keeping.) - 27287199 - 27287880 - 27287883 - - OpenSSL License - --------------- - -/* ==================================================================== - * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - - Original SSLeay License - ----------------------- - -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - - -ISC license used for completely new code in BoringSSL: - -/* Copyright (c) 2015, Google Inc. - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ - - -Some files from Intel carry the following license: - -# Copyright (c) 2012, Intel Corporation -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the -# distribution. -# -# * Neither the name of the Intel Corporation nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# -# THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION ""AS IS"" AND ANY -# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -The code in third_party/fiat carries the MIT license: - -Copyright (c) 2015-2016 the fiat-crypto authors (see -https://github.com/mit-plv/fiat-crypto/blob/master/AUTHORS). - ---- See MIT License at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -bsdiff -http://www.daemonology.net/bsdiff/ ------------------------------------------------------------------------ -BSD Protection License -February 2002 - -Preamble --------- - -The Berkeley Software Distribution ("BSD") license has proven very effective -over the years at allowing for a wide spread of work throughout both -commercial and non-commercial products. For programmers whose primary -intention is to improve the general quality of available software, it is -arguable that there is no better license than the BSD license, as it -permits improvements to be used wherever they will help, without idealogical -or metallic constraint. - -This is of particular value to those who produce reference implementations -of proposed standards: The case of TCP/IP clearly illustrates that freely -and universally available implementations leads the rapid acceptance of -standards -- often even being used instead of a de jure standard (eg, OSI -network models). - -With the rapid proliferation of software licensed under the GNU General -Public License, however, the continued success of this role is called into -question. Given that the inclusion of a few lines of "GPL-tainted" work -into a larger body of work will result in restricted distribution -- and -given that further work will likely build upon the "tainted" portions, -making them difficult to remove at a future date -- there are inevitable -circumstances where authors would, in order to protect their goal of -providing for the widespread usage of their work, wish to guard against -such "GPL-taint". - -In addition, one can imagine that companies which operate by producing and -selling (possibly closed-source) code would wish to protect themselves -against the rise of a GPL-licensed competitor. While under existing -licenses this would mean not releasing their code under any form of open -license, if a license existed under which they could incorporate any -improvements back into their own (commercial) products then they might be -far more willing to provide for non-closed distribution. - -For the above reasons, we put forth this "BSD Protection License": A -license designed to retain the freedom granted by the BSD license to use -licensed works in a wide variety of settings, both non-commercial and -commercial, while protecting the work from having future contributors -restrict that freedom. - -The precise terms and conditions for copying, distribution, and -modification follow. - -BSD PROTECTION LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION, AND MODIFICATION ----------------------------------------------------------------- - -0. Definitions. - a) "Program", below, refers to any program or work distributed under - the terms of this license. - b) A "work based on the Program", below, refers to either the Program - or any derivative work under copyright law. - c) "Modification", below, refers to the act of creating derivative works. - d) "You", below, refers to each licensee. - -1. Scope. - This license governs the copying, distribution, and modification of the - Program. Other activities are outside the scope of this license; The - act of running the Program is not restricted, and the output from the - Program is covered only if its contents constitute a work based on the - Program. - -2. Verbatim copies. - You may copy and distribute verbatim copies of the Program as you - receive it, in any medium, provided that you conspicuously and - appropriately publish on each copy an appropriate copyright notice; keep - intact all the notices that refer to this License and to the absence of - any warranty; and give any other recipients of the Program a copy of this - License along with the Program. - -3. Modification and redistribution under closed license. - You may modify your copy or copies of the Program, and distribute - the resulting derivative works, provided that you meet the - following conditions: - a) The copyright notice and disclaimer on the Program must be reproduced - and included in the source code, documentation, and/or other materials - provided in a manner in which such notices are normally distributed. - b) The derivative work must be clearly identified as such, in order that - it may not be confused with the original work. - c) The license under which the derivative work is distributed must - expressly prohibit the distribution of further derivative works. - -4. Modification and redistribution under open license. - You may modify your copy or copies of the Program, and distribute - the resulting derivative works, provided that you meet the - following conditions: - a) The copyright notice and disclaimer on the Program must be reproduced - and included in the source code, documentation, and/or other materials - provided in a manner in which such notices are normally distributed. - b) You must clearly indicate the nature and date of any changes made - to the Program. The full details need not necessarily be included in - the individual modified files, provided that each modified file is - clearly marked as such and instructions are included on where the - full details of the modifications may be found. - c) You must cause any work that you distribute or publish, that in whole - or in part contains or is derived from the Program or any part - thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - -5. Implied acceptance. - You may not copy or distribute the Program or any derivative works except - as expressly provided under this license. Consequently, any such action - will be taken as implied acceptance of the terms of this license. - -6. NO WARRANTY. - THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - THE COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR - REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING, BUT - NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT, EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE - POSSIBILITY OF SUCH DAMAGES. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -bspatch -http://lxr.mozilla.org/mozilla/source/toolkit/mozapps/update/src/updater/ ------------------------------------------------------------------------ -Copyright 2003,2004 Colin Percival -All rights reserved - -Redistribution and use in source and binary forms, with or without -modification, are permitted providing that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -d3 -https://github.com/mbostock/d3 ------------------------------------------------------------------------ -Copyright (c) 2010-2014, Michael Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* The name Michael Bostock may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -divsufsort -https://github.com/y-256/libdivsufsort ------------------------------------------------------------------------ -The MIT License (MIT) - -Copyright (c) 2003 Yuta Mori All rights reserved. - ---- See MIT License at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -dom-distiller-js -https://github.com/chromium/dom-distiller ------------------------------------------------------------------------ -Copyright 2014 The Chromium Authors. All rights reserved. - ---- See BSD License (Google) at the end of this file --- - -Parts of the following directories are available under Apache v2.0 - -src/de -Copyright (c) 2009-2011 Christian Kohlschütter - -third_party/gwt_exporter -Copyright 2007 Timepedia.org - -third_party/gwt-2.5.1 -Copyright 2008 Google - -java/org/chromium/distiller/dev -Copyright 2008 Google - -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and -You must cause any modified files to carry prominent notices stating that You changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. - -You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -drawElements Quality Program -https://source.android.com/devices/graphics/testing.html ------------------------------------------------------------------------ - - ---- See Apache License (A) at the end of this file --- - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2014 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -dynamic annotations -http://code.google.com/p/data-race-test/wiki/DynamicAnnotations ------------------------------------------------------------------------ -/* Copyright (c) 2008-2009, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * --- - * Author: Kostya Serebryany - */ ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -etc1 -https://source.android.com/ ------------------------------------------------------------------------ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -fdlibm -http://www.netlib.org/fdlibm/ ------------------------------------------------------------------------ -Copyright (C) 1993-2004 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunSoft, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -ffmpeg -http://ffmpeg.org/ ------------------------------------------------------------------------ -# License - -Most files in FFmpeg are under the GNU Lesser General Public License version 2.1 -or later (LGPL v2.1+). Read the file `COPYING.LGPLv2.1` for details. Some other -files have MIT/X11/BSD-style licenses. In combination the LGPL v2.1+ applies to -FFmpeg. - -Some optional parts of FFmpeg are licensed under the GNU General Public License -version 2 or later (GPL v2+). See the file `COPYING.GPLv2` for details. None of -these parts are used by default, you have to explicitly pass `--enable-gpl` to -configure to activate them. In this case, FFmpeg's license changes to GPL v2+. - -Specifically, the GPL parts of FFmpeg are: - -- libpostproc -- optional x86 optimization in the files - - `libavcodec/x86/flac_dsp_gpl.asm` - - `libavcodec/x86/idct_mmx.c` - - `libavfilter/x86/vf_removegrain.asm` -- the following building and testing tools - - `compat/solaris/make_sunver.pl` - - `doc/t2h.pm` - - `doc/texi2pod.pl` - - `libswresample/swresample-test.c` - - `tests/checkasm/*` - - `tests/tiny_ssim.c` -- the following filters in libavfilter: - - `vf_blackframe.c` - - `vf_boxblur.c` - - `vf_colormatrix.c` - - `vf_cover_rect.c` - - `vf_cropdetect.c` - - `vf_delogo.c` - - `vf_eq.c` - - `vf_find_rect.c` - - `vf_fspp.c` - - `vf_geq.c` - - `vf_histeq.c` - - `vf_hqdn3d.c` - - `vf_interlace.c` - - `vf_kerndeint.c` - - `vf_mcdeint.c` - - `vf_mpdecimate.c` - - `vf_owdenoise.c` - - `vf_perspective.c` - - `vf_phase.c` - - `vf_pp.c` - - `vf_pp7.c` - - `vf_pullup.c` - - `vf_repeatfields.c` - - `vf_sab.c` - - `vf_smartblur.c` - - `vf_spp.c` - - `vf_stereo3d.c` - - `vf_super2xsai.c` - - `vf_tinterlace.c` - - `vf_uspp.c` - - `vsrc_mptestsrc.c` - -Should you, for whatever reason, prefer to use version 3 of the (L)GPL, then -the configure parameter `--enable-version3` will activate this licensing option -for you. Read the file `COPYING.LGPLv3` or, if you have enabled GPL parts, -`COPYING.GPLv3` to learn the exact legal terms that apply in this case. - -There are a handful of files under other licensing terms, namely: - -* The files `libavcodec/jfdctfst.c`, `libavcodec/jfdctint_template.c` and - `libavcodec/jrevdct.c` are taken from libjpeg, see the top of the files for - licensing details. Specifically note that you must credit the IJG in the - documentation accompanying your program if you only distribute executables. - You must also indicate any changes including additions and deletions to - those three files in the documentation. -* `tests/reference.pnm` is under the expat license. - - -## External libraries - -FFmpeg can be combined with a number of external libraries, which sometimes -affect the licensing of binaries resulting from the combination. - -### Compatible libraries - -The following libraries are under GPL: -- frei0r -- libcdio -- librubberband -- libvidstab -- libx264 -- libx265 -- libxavs -- libxvid - -When combining them with FFmpeg, FFmpeg needs to be licensed as GPL as well by -passing `--enable-gpl` to configure. - -The OpenCORE and VisualOn libraries are under the Apache License 2.0. That -license is incompatible with the LGPL v2.1 and the GPL v2, but not with -version 3 of those licenses. So to combine these libraries with FFmpeg, the -license version needs to be upgraded by passing `--enable-version3` to configure. - -### Incompatible libraries - -There are certain libraries you can combine with FFmpeg whose licenses are not -compatible with the GPL and/or the LGPL. If you wish to enable these -libraries, even in circumstances that their license may be incompatible, pass -`--enable-nonfree` to configure. But note that if you enable any of these -libraries the resulting binary will be under a complex license mix that is -more restrictive than the LGPL and that may result in additional obligations. -It is possible that these restrictions cause the resulting binary to be -unredistributable. - -The Fraunhofer FDK AAC and OpenSSL libraries are under licenses which are -incompatible with the GPLv2 and v3. To the best of our knowledge, they are -compatible with the LGPL. - -The NVENC library, while its header file is licensed under the compatible MIT -license, requires a proprietary binary blob at run time, and is deemed to be -incompatible with the GPL. We are not certain if it is compatible with the -LGPL, but we require `--enable-nonfree` even with LGPL configurations in case -it is not. - - -******************************************************************************** - -libavcodec/arm/vp8dsp_armv6.S - -VP8 ARMv6 optimisations - -Copyright (c) 2010 Google Inc. -Copyright (c) 2010 Rob Clark -Copyright (c) 2011 Mans Rullgard - -This file is part of FFmpeg. - -FFmpeg is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -FFmpeg is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with FFmpeg; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -This code was partially ported from libvpx, which uses this license: - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in -the documentation and/or other materials provided with the -distribution. - -* Neither the name of Google nor the names of its contributors may -be used to endorse or promote products derived from this software -without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -******************************************************************************** - -libavcodec/x86/xvididct.asm - -XVID MPEG-4 VIDEO CODEC - - Conversion from gcc syntax to x264asm syntax with modifications - by Christophe Gisquet - - =========== SSE2 inverse discrete cosine transform =========== - - Copyright(C) 2003 Pascal Massimino - - Conversion to gcc syntax with modifications - by Alexander Strange - - Originally from dct/x86_asm/fdct_sse2_skal.asm in Xvid. - - Vertical pass is an implementation of the scheme: - Loeffler C., Ligtenberg A., and Moschytz C.S.: - Practical Fast 1D DCT Algorithm with Eleven Multiplications, - Proc. ICASSP 1989, 988-991. - - Horizontal pass is a double 4x4 vector/matrix multiplication, - (see also Intel's Application Note 922: - http://developer.intel.com/vtune/cbts/strmsimd/922down.htm - Copyright (C) 1999 Intel Corporation) - - More details at http://skal.planet-d.net/coding/dct.html - - ======= MMX and XMM forward discrete cosine transform ======= - - Copyright(C) 2001 Peter Ross - - Originally provided by Intel at AP-922 - http://developer.intel.com/vtune/cbts/strmsimd/922down.htm - (See more app notes at http://developer.intel.com/vtune/cbts/strmsimd/appnotes.htm) - but in a limited edition. - New macro implements a column part for precise iDCT - The routine precision now satisfies IEEE standard 1180-1990. - - Copyright(C) 2000-2001 Peter Gubanov - Rounding trick Copyright(C) 2000 Michel Lespinasse - - http://www.elecard.com/peter/idct.html - http://www.linuxvideo.org/mpeg2dec/ - - These examples contain code fragments for first stage iDCT 8x8 - (for rows) and first stage DCT 8x8 (for columns) - - conversion to gcc syntax by Michael Niedermayer - - ====================================================================== - - This file is part of FFmpeg. - - FFmpeg is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - FFmpeg is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with FFmpeg; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -******************************************************************************** - -libavcodec/arm/jrevdct_arm.S - -C-like prototype : - void j_rev_dct_arm(DCTBLOCK data) - - With DCTBLOCK being a pointer to an array of 64 'signed shorts' - - Copyright (c) 2001 Lionel Ulmer (lionel.ulmer@free.fr / bbrox@bbrox.org) - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -******************************************************************************** - -libswresample/version.h - -Version macros. - -This file is part of libswresample - -libswresample is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -libswresample is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with libswresample; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -******************************************************************************** - -libavcodec/mips/amrwbdec_mips.c - -Copyright (c) 2012 -MIPS Technologies, Inc., California. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -Author: Nedeljko Babic (nbabic@mips.com) - -This file is part of FFmpeg. - -FFmpeg is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -FFmpeg is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with FFmpeg; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -******************************************************************************** - -libavcodec/mips/celp_math_mips.c - -Copyright (c) 2012 -MIPS Technologies, Inc., California. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -Author: Nedeljko Babic (nbabic@mips.com) - -Math operations optimized for MIPS - -This file is part of FFmpeg. - -FFmpeg is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -FFmpeg is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with FFmpeg; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -******************************************************************************** - -libavcodec/mips/mpegaudiodsp_mips_float.c - -Copyright (c) 2012 -MIPS Technologies, Inc., California. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -Author: Bojan Zivkovic (bojan@mips.com) - -MPEG Audio decoder optimized for MIPS floating-point architecture - -This file is part of FFmpeg. - -FFmpeg is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -FFmpeg is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with FFmpeg; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -******************************************************************************** - -libavcodec/mips/fft_mips.c - -Copyright (c) 2012 -MIPS Technologies, Inc., California. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -Author: Stanislav Ocovaj (socovaj@mips.com) -Author: Zoran Lukic (zoranl@mips.com) - -Optimized MDCT/IMDCT and FFT transforms - -This file is part of FFmpeg. - -FFmpeg is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -FFmpeg is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with FFmpeg; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -******************************************************************************** - -libavcodec/mips/acelp_filters_mips.c - -Copyright (c) 2012 -MIPS Technologies, Inc., California. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -Author: Nedeljko Babic (nbabic@mips.com) - -various filters for ACELP-based codecs optimized for MIPS - -This file is part of FFmpeg. - -FFmpeg is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -FFmpeg is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with FFmpeg; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -******************************************************************************** - -libavformat/oggparsetheora.c - -Copyright (C) 2005 Matthieu CASTET, Alex Beregszaszi - ---- See MIT License at the end of this file --- - -libavcodec/mips/acelp_vectors_mips.c - -Copyright (c) 2012 -MIPS Technologies, Inc., California. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -Author: Nedeljko Babic (nbabic@mips.com) - -adaptive and fixed codebook vector operations for ACELP-based codecs -optimized for MIPS - -This file is part of FFmpeg. - -FFmpeg is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -FFmpeg is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with FFmpeg; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -******************************************************************************** - -libavcodec/mips/celp_filters_mips.c - -Copyright (c) 2012 -MIPS Technologies, Inc., California. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -Author: Nedeljko Babic (nbabic@mips.com) - -various filters for CELP-based codecs optimized for MIPS - -This file is part of FFmpeg. - -FFmpeg is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -FFmpeg is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with FFmpeg; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -******************************************************************************** - -libswresample/swresample.h - -Copyright (C) 2011-2013 Michael Niedermayer (michaelni@gmx.at) - -This file is part of libswresample - -libswresample is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -libswresample is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with libswresample; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -******************************************************************************** - -libavcodec/jfdctfst.c -libavcodec/jfdctint_template.c -libavcodec/jrevdct.c - -This file is part of the Independent JPEG Group's software. - -The authors make NO WARRANTY or representation, either express or implied, -with respect to this software, its quality, accuracy, merchantability, or -fitness for a particular purpose. This software is provided "AS IS", and -you, its user, assume the entire risk as to its quality and accuracy. - -This software is copyright (C) 1994-1996, Thomas G. Lane. -All Rights Reserved except as specified below. - -Permission is hereby granted to use, copy, modify, and distribute this -software (or portions thereof) for any purpose, without fee, subject to -these conditions: -(1) If any part of the source code for this software is distributed, then -this README file must be included, with this copyright and no-warranty -notice unaltered; and any additions, deletions, or changes to the original -files must be clearly indicated in accompanying documentation. -(2) If only executable code is distributed, then the accompanying -documentation must state that "this software is based in part on the work -of the Independent JPEG Group". -(3) Permission for use of this software is granted only if the user accepts -full responsibility for any undesirable consequences; the authors accept -NO LIABILITY for damages of any kind. - -These conditions apply to any software derived from or based on the IJG -code, not just to the unmodified library. If you use our work, you ought -to acknowledge us. - -Permission is NOT granted for the use of any IJG author's name or company -name in advertising or publicity relating to this software or products -derived from it. This software may be referred to only as "the Independent -JPEG Group's software". - -We specifically permit and encourage the use of this software as the basis -of commercial products, provided that all warranty or liability claims are -assumed by the product vendor. - -******************************************************************************** - -libavcodec/fft_fixed_32.c -libavcodec/fft_init_table.c -libavcodec/fft_table.h -libavcodec/mdct_fixed_32.c -libavcodec/mips/aacdec_mips.c -libavcodec/mips/aacdec_mips.h -libavcodec/mips/aacpsdsp_mips.c -libavcodec/mips/aacsbr_mips.c -libavcodec/mips/aacsbr_mips.h -libavcodec/mips/amrwbdec_mips.h -libavcodec/mips/compute_antialias_fixed.h -libavcodec/mips/compute_antialias_float.h -libavcodec/mips/lsp_mips.h -libavcodec/mips/sbrdsp_mips.c -libavutil/fixed_dsp.c -libavutil/fixed_dsp.h -libavutil/mips/float_dsp_mips.c -libavutil/mips/libm_mips.h -libavutil/softfloat_tables.h - -Copyright (c) 2012 -MIPS Technologies, Inc., California. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -Authors: -Branimir Vasic (bvasic@mips.com) -Darko Laus (darko@mips.com) -Djordje Pesut (djordje@mips.com) -Goran Cordasic (goran@mips.com) -Nedeljko Babic (nedeljko.babic imgtec com) -Mirjana Vulin (mvulin@mips.com) -Stanislav Ocovaj (socovaj@mips.com) -Zoran Lukic (zoranl@mips.com) - -******************************************************************************** - -libavformat/oggdec.c -libavformat/oggdec.h -libavformat/oggparseogm.c -libavformat/oggparsevorbis.c - -Copyright (C) 2005 Michael Ahlberg, MÃ¥ns RullgÃ¥rd - ---- See MIT License at the end of this file --- - -GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -fips181 -http://www.adel.nursat.kz/apg/ ------------------------------------------------------------------------ -Copyright (c) 1999, 2000, 2001, 2002 -Adel I. Mirzazhanov. All rights reserved - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - 1.Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - 2.Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3.The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -flac -http://downloads.xiph.org/releases/flac/flac-1.3.1.tar.xz ------------------------------------------------------------------------ -Copyright (C) 2000-2009 Josh Coalson -Copyright (C) 2011-2014 Xiph.Org Foundation - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -- Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -- Neither the name of the Xiph.org Foundation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -gestures -https://chromium.googlesource.com/chromiumos/platform/gestures ------------------------------------------------------------------------ -gestures/LICENSE - -// Copyright (c) 2011 The Chromium OS Authors. All rights reserved. -// -// - ---- See BSD License (Google) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -google-glog's symbolization library -https://github.com/google/glog ------------------------------------------------------------------------ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// - ---- See BSD License (Google) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -google-jstemplate -http://code.google.com/p/google-jstemplate/ ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -harfbuzz-ng -http://harfbuzz.org/ ------------------------------------------------------------------------ -HarfBuzz is licensed under the so-called "Old MIT" license. Details follow. -For parts of HarfBuzz that are licensed under different licenses see individual -files names COPYING in subdirectories where applicable. - -Copyright © 2010,2011,2012 Google, Inc. -Copyright © 2012 Mozilla Foundation -Copyright © 2011 Codethink Limited -Copyright © 2008,2010 Nokia Corporation and/or its subsidiary(-ies) -Copyright © 2009 Keith Stribley -Copyright © 2009 Martin Hosken and SIL International -Copyright © 2007 Chris Wilson -Copyright © 2006 Behdad Esfahbod -Copyright © 2005 David Turner -Copyright © 2004,2007,2008,2009,2010 Red Hat, Inc. -Copyright © 1998-2004 David Turner and Werner Lemberg - -For full copyright notices consult the individual files in the package. - - -Permission is hereby granted, without written agreement and without -license or royalty fees, to use, copy, modify, and distribute this -software and its documentation for any purpose, provided that the -above copyright notice and the following two paragraphs appear in -all copies of this software. - -IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR -DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES -ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN -IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - -THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS -ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO -PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -hunspell -http://hunspell.sourceforge.net/ ------------------------------------------------------------------------ - MOZILLA PUBLIC LICENSE - Version 1.1 - - --------------- - -1. Definitions. - - 1.0.1. "Commercial Use" means distribution or otherwise making the - Covered Code available to a third party. - - 1.1. "Contributor" means each entity that creates or contributes to - the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the Original - Code, prior Modifications used by a Contributor, and the Modifications - made by that particular Contributor. - - 1.3. "Covered Code" means the Original Code or Modifications or the - combination of the Original Code and Modifications, in each case - including portions thereof. - - 1.4. "Electronic Distribution Mechanism" means a mechanism generally - accepted in the software development community for the electronic - transfer of data. - - 1.5. "Executable" means Covered Code in any form other than Source - Code. - - 1.6. "Initial Developer" means the individual or entity identified - as the Initial Developer in the Source Code notice required by Exhibit - A. - - 1.7. "Larger Work" means a work which combines Covered Code or - portions thereof with code not governed by the terms of this License. - - 1.8. "License" means this document. - - 1.8.1. "Licensable" means having the right to grant, to the maximum - extent possible, whether at the time of the initial grant or - subsequently acquired, any and all of the rights conveyed herein. - - 1.9. "Modifications" means any addition to or deletion from the - substance or structure of either the Original Code or any previous - Modifications. When Covered Code is released as a series of files, a - Modification is: - A. Any addition to or deletion from the contents of a file - containing Original Code or previous Modifications. - - B. Any new file that contains any part of the Original Code or - previous Modifications. - - 1.10. "Original Code" means Source Code of computer software code - which is described in the Source Code notice required by Exhibit A as - Original Code, and which, at the time of its release under this - License is not already Covered Code governed by this License. - - 1.10.1. "Patent Claims" means any patent claim(s), now owned or - hereafter acquired, including without limitation, method, process, - and apparatus claims, in any patent Licensable by grantor. - - 1.11. "Source Code" means the preferred form of the Covered Code for - making modifications to it, including all modules it contains, plus - any associated interface definition files, scripts used to control - compilation and installation of an Executable, or source code - differential comparisons against either the Original Code or another - well known, available Covered Code of the Contributor's choice. The - Source Code can be in a compressed or archival form, provided the - appropriate decompression or de-archiving software is widely available - for no charge. - - 1.12. "You" (or "Your") means an individual or a legal entity - exercising rights under, and complying with all of the terms of, this - License or a future version of this License issued under Section 6.1. - For legal entities, "You" includes any entity which controls, is - controlled by, or is under common control with You. For purposes of - this definition, "control" means (a) the power, direct or indirect, - to cause the direction or management of such entity, whether by - contract or otherwise, or (b) ownership of more than fifty percent - (50%) of the outstanding shares or beneficial ownership of such - entity. - -2. Source Code License. - - 2.1. The Initial Developer Grant. - The Initial Developer hereby grants You a world-wide, royalty-free, - non-exclusive license, subject to third party intellectual property - claims: - (a) under intellectual property rights (other than patent or - trademark) Licensable by Initial Developer to use, reproduce, - modify, display, perform, sublicense and distribute the Original - Code (or portions thereof) with or without Modifications, and/or - as part of a Larger Work; and - - (b) under Patents Claims infringed by the making, using or - selling of Original Code, to make, have made, use, practice, - sell, and offer for sale, and/or otherwise dispose of the - Original Code (or portions thereof). - - (c) the licenses granted in this Section 2.1(a) and (b) are - effective on the date Initial Developer first distributes - Original Code under the terms of this License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is - granted: 1) for code that You delete from the Original Code; 2) - separate from the Original Code; or 3) for infringements caused - by: i) the modification of the Original Code or ii) the - combination of the Original Code with other software or devices. - - 2.2. Contributor Grant. - Subject to third party intellectual property claims, each Contributor - hereby grants You a world-wide, royalty-free, non-exclusive license - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Contributor, to use, reproduce, modify, - display, perform, sublicense and distribute the Modifications - created by such Contributor (or portions thereof) either on an - unmodified basis, with other Modifications, as Covered Code - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or - selling of Modifications made by that Contributor either alone - and/or in combination with its Contributor Version (or portions - of such combination), to make, use, sell, offer for sale, have - made, and/or otherwise dispose of: 1) Modifications made by that - Contributor (or portions thereof); and 2) the combination of - Modifications made by that Contributor with its Contributor - Version (or portions of such combination). - - (c) the licenses granted in Sections 2.2(a) and 2.2(b) are - effective on the date Contributor first makes Commercial Use of - the Covered Code. - - (d) Notwithstanding Section 2.2(b) above, no patent license is - granted: 1) for any code that Contributor has deleted from the - Contributor Version; 2) separate from the Contributor Version; - 3) for infringements caused by: i) third party modifications of - Contributor Version or ii) the combination of Modifications made - by that Contributor with other software (except as part of the - Contributor Version) or other devices; or 4) under Patent Claims - infringed by Covered Code in the absence of Modifications made by - that Contributor. - -3. Distribution Obligations. - - 3.1. Application of License. - The Modifications which You create or to which You contribute are - governed by the terms of this License, including without limitation - Section 2.2. The Source Code version of Covered Code may be - distributed only under the terms of this License or a future version - of this License released under Section 6.1, and You must include a - copy of this License with every copy of the Source Code You - distribute. You may not offer or impose any terms on any Source Code - version that alters or restricts the applicable version of this - License or the recipients' rights hereunder. However, You may include - an additional document offering the additional rights described in - Section 3.5. - - 3.2. Availability of Source Code. - Any Modification which You create or to which You contribute must be - made available in Source Code form under the terms of this License - either on the same media as an Executable version or via an accepted - Electronic Distribution Mechanism to anyone to whom you made an - Executable version available; and if made available via Electronic - Distribution Mechanism, must remain available for at least twelve (12) - months after the date it initially became available, or at least six - (6) months after a subsequent version of that particular Modification - has been made available to such recipients. You are responsible for - ensuring that the Source Code version remains available even if the - Electronic Distribution Mechanism is maintained by a third party. - - 3.3. Description of Modifications. - You must cause all Covered Code to which You contribute to contain a - file documenting the changes You made to create that Covered Code and - the date of any change. You must include a prominent statement that - the Modification is derived, directly or indirectly, from Original - Code provided by the Initial Developer and including the name of the - Initial Developer in (a) the Source Code, and (b) in any notice in an - Executable version or related documentation in which You describe the - origin or ownership of the Covered Code. - - 3.4. Intellectual Property Matters - (a) Third Party Claims. - If Contributor has knowledge that a license under a third party's - intellectual property rights is required to exercise the rights - granted by such Contributor under Sections 2.1 or 2.2, - Contributor must include a text file with the Source Code - distribution titled "LEGAL" which describes the claim and the - party making the claim in sufficient detail that a recipient will - know whom to contact. If Contributor obtains such knowledge after - the Modification is made available as described in Section 3.2, - Contributor shall promptly modify the LEGAL file in all copies - Contributor makes available thereafter and shall take other steps - (such as notifying appropriate mailing lists or newsgroups) - reasonably calculated to inform those who received the Covered - Code that new knowledge has been obtained. - - (b) Contributor APIs. - If Contributor's Modifications include an application programming - interface and Contributor has knowledge of patent licenses which - are reasonably necessary to implement that API, Contributor must - also include this information in the LEGAL file. - - (c) Representations. - Contributor represents that, except as disclosed pursuant to - Section 3.4(a) above, Contributor believes that Contributor's - Modifications are Contributor's original creation(s) and/or - Contributor has sufficient rights to grant the rights conveyed by - this License. - - 3.5. Required Notices. - You must duplicate the notice in Exhibit A in each file of the Source - Code. If it is not possible to put such notice in a particular Source - Code file due to its structure, then You must include such notice in a - location (such as a relevant directory) where a user would be likely - to look for such a notice. If You created one or more Modification(s) - You may add your name as a Contributor to the notice described in - Exhibit A. You must also duplicate this License in any documentation - for the Source Code where You describe recipients' rights or ownership - rights relating to Covered Code. You may choose to offer, and to - charge a fee for, warranty, support, indemnity or liability - obligations to one or more recipients of Covered Code. However, You - may do so only on Your own behalf, and not on behalf of the Initial - Developer or any Contributor. You must make it absolutely clear than - any such warranty, support, indemnity or liability obligation is - offered by You alone, and You hereby agree to indemnify the Initial - Developer and every Contributor for any liability incurred by the - Initial Developer or such Contributor as a result of warranty, - support, indemnity or liability terms You offer. - - 3.6. Distribution of Executable Versions. - You may distribute Covered Code in Executable form only if the - requirements of Section 3.1-3.5 have been met for that Covered Code, - and if You include a notice stating that the Source Code version of - the Covered Code is available under the terms of this License, - including a description of how and where You have fulfilled the - obligations of Section 3.2. The notice must be conspicuously included - in any notice in an Executable version, related documentation or - collateral in which You describe recipients' rights relating to the - Covered Code. You may distribute the Executable version of Covered - Code or ownership rights under a license of Your choice, which may - contain terms different from this License, provided that You are in - compliance with the terms of this License and that the license for the - Executable version does not attempt to limit or alter the recipient's - rights in the Source Code version from the rights set forth in this - License. If You distribute the Executable version under a different - license You must make it absolutely clear that any terms which differ - from this License are offered by You alone, not by the Initial - Developer or any Contributor. You hereby agree to indemnify the - Initial Developer and every Contributor for any liability incurred by - the Initial Developer or such Contributor as a result of any such - terms You offer. - - 3.7. Larger Works. - You may create a Larger Work by combining Covered Code with other code - not governed by the terms of this License and distribute the Larger - Work as a single product. In such a case, You must make sure the - requirements of this License are fulfilled for the Covered Code. - -4. Inability to Comply Due to Statute or Regulation. - - If it is impossible for You to comply with any of the terms of this - License with respect to some or all of the Covered Code due to - statute, judicial order, or regulation then You must: (a) comply with - the terms of this License to the maximum extent possible; and (b) - describe the limitations and the code they affect. Such description - must be included in the LEGAL file described in Section 3.4 and must - be included with all distributions of the Source Code. Except to the - extent prohibited by statute or regulation, such description must be - sufficiently detailed for a recipient of ordinary skill to be able to - understand it. - -5. Application of this License. - - This License applies to code to which the Initial Developer has - attached the notice in Exhibit A and to related Covered Code. - -6. Versions of the License. - - 6.1. New Versions. - Netscape Communications Corporation ("Netscape") may publish revised - and/or new versions of the License from time to time. Each version - will be given a distinguishing version number. - - 6.2. Effect of New Versions. - Once Covered Code has been published under a particular version of the - License, You may always continue to use it under the terms of that - version. You may also choose to use such Covered Code under the terms - of any subsequent version of the License published by Netscape. No one - other than Netscape has the right to modify the terms applicable to - Covered Code created under this License. - - 6.3. Derivative Works. - If You create or use a modified version of this License (which you may - only do in order to apply it to code which is not already Covered Code - governed by this License), You must (a) rename Your license so that - the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", - "MPL", "NPL" or any confusingly similar phrase do not appear in your - license (except to note that your license differs from this License) - and (b) otherwise make it clear that Your version of the license - contains terms which differ from the Mozilla Public License and - Netscape Public License. (Filling in the name of the Initial - Developer, Original Code or Contributor in the notice described in - Exhibit A shall not of themselves be deemed to be modifications of - this License.) - -7. DISCLAIMER OF WARRANTY. - - COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, - WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF - DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. - THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE - IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, - YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE - COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER - OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF - ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -8. TERMINATION. - - 8.1. This License and the rights granted hereunder will terminate - automatically if You fail to comply with terms herein and fail to cure - such breach within 30 days of becoming aware of the breach. All - sublicenses to the Covered Code which are properly granted shall - survive any termination of this License. Provisions which, by their - nature, must remain in effect beyond the termination of this License - shall survive. - - 8.2. If You initiate litigation by asserting a patent infringement - claim (excluding declatory judgment actions) against Initial Developer - or a Contributor (the Initial Developer or Contributor against whom - You file such action is referred to as "Participant") alleging that: - - (a) such Participant's Contributor Version directly or indirectly - infringes any patent, then any and all rights granted by such - Participant to You under Sections 2.1 and/or 2.2 of this License - shall, upon 60 days notice from Participant terminate prospectively, - unless if within 60 days after receipt of notice You either: (i) - agree in writing to pay Participant a mutually agreeable reasonable - royalty for Your past and future use of Modifications made by such - Participant, or (ii) withdraw Your litigation claim with respect to - the Contributor Version against such Participant. If within 60 days - of notice, a reasonable royalty and payment arrangement are not - mutually agreed upon in writing by the parties or the litigation claim - is not withdrawn, the rights granted by Participant to You under - Sections 2.1 and/or 2.2 automatically terminate at the expiration of - the 60 day notice period specified above. - - (b) any software, hardware, or device, other than such Participant's - Contributor Version, directly or indirectly infringes any patent, then - any rights granted to You by such Participant under Sections 2.1(b) - and 2.2(b) are revoked effective as of the date You first made, used, - sold, distributed, or had made, Modifications made by that - Participant. - - 8.3. If You assert a patent infringement claim against Participant - alleging that such Participant's Contributor Version directly or - indirectly infringes any patent where such claim is resolved (such as - by license or settlement) prior to the initiation of patent - infringement litigation, then the reasonable value of the licenses - granted by such Participant under Sections 2.1 or 2.2 shall be taken - into account in determining the amount or value of any payment or - license. - - 8.4. In the event of termination under Sections 8.1 or 8.2 above, - all end user license agreements (excluding distributors and resellers) - which have been validly granted by You or any distributor hereunder - prior to termination shall survive termination. - -9. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL - DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, - OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR - ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY - CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, - WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER - COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN - INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF - LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY - RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW - PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE - EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO - THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - -10. U.S. GOVERNMENT END USERS. - - The Covered Code is a "commercial item," as that term is defined in - 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer - software" and "commercial computer software documentation," as such - terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 - C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), - all U.S. Government End Users acquire Covered Code with only those - rights set forth herein. - -11. MISCELLANEOUS. - - This License represents the complete agreement concerning subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. This License shall be governed by - California law provisions (except to the extent applicable law, if - any, provides otherwise), excluding its conflict-of-law provisions. - With respect to disputes in which at least one party is a citizen of, - or an entity chartered or registered to do business in the United - States of America, any litigation relating to this License shall be - subject to the jurisdiction of the Federal Courts of the Northern - District of California, with venue lying in Santa Clara County, - California, with the losing party responsible for costs, including - without limitation, court costs and reasonable attorneys' fees and - expenses. The application of the United Nations Convention on - Contracts for the International Sale of Goods is expressly excluded. - Any law or regulation which provides that the language of a contract - shall be construed against the drafter shall not apply to this - License. - -12. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or indirectly, - out of its utilization of rights under this License and You agree to - work with Initial Developer and Contributors to distribute such - responsibility on an equitable basis. Nothing herein is intended or - shall be deemed to constitute any admission of liability. - -13. MULTIPLE-LICENSED CODE. - - Initial Developer may designate portions of the Covered Code as - "Multiple-Licensed". "Multiple-Licensed" means that the Initial - Developer permits you to utilize portions of the Covered Code under - Your choice of the NPL or the alternative licenses, if any, specified - by the Initial Developer in the file described in Exhibit A. - -EXHIBIT A -Mozilla Public License. - - ``The contents of this file are subject to the Mozilla Public License - Version 1.1 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - License for the specific language governing rights and limitations - under the License. - - The Original Code is ______________________________________. - - The Initial Developer of the Original Code is ________________________. - Portions created by ______________________ are Copyright (C) ______ - _______________________. All Rights Reserved. - - Contributor(s): ______________________________________. - - Alternatively, the contents of this file may be used under the terms - of the _____ license (the "[___] License"), in which case the - provisions of [______] License are applicable instead of those - above. If you wish to allow use of your version of this file only - under the terms of the [____] License and not to allow others to use - your version of this file under the MPL, indicate your decision by - deleting the provisions above and replace them with the notice and - other provisions required by the [___] License. If you do not delete - the provisions above, a recipient may use your version of this file - under either the MPL or the [___] License." - - [NOTE: The text of this Exhibit A may differ slightly from the text of - the notices in the Source Code files of the Original Code. You should - use the text of this Exhibit A rather than the text found in the - Original Code Source Code for Your Modifications.] - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -hunspell dictionaries -http://bgoffice.sourceforge.net/ ------------------------------------------------------------------------ -GPL 2.0/LGPL 2.1/MPL 1.1 tri-license - -The contents of this software may be used under the terms of -the GNU General Public License Version 2 or later (the "GPL"), or -the GNU Lesser General Public License Version 2.1 or later (the "LGPL", -see COPYING.LGPL) or (excepting the LGPLed GNU gettext library in the -intl/ directory) the Mozilla Public License Version 1.1 or later -(the "MPL", see COPYING.MPL). - -Software distributed under these licenses is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the licences -for the specific language governing rights and limitations under the licenses. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -iccjpeg -http://www.ijg.org/ ------------------------------------------------------------------------ -(Copied from the README.) - --------------------------------------------------------------------------------- - -LICENSE extracted from IJG's jpeg distribution: ------------------------------------------------ - -In plain English: - -1. We don't promise that this software works. (But if you find any bugs, - please let us know!) -2. You can use this software for whatever you want. You don't have to pay us. -3. You may not pretend that you wrote this software. If you use it in a - program, you must acknowledge somewhere in your documentation that - you've used the IJG code. - -In legalese: - -The authors make NO WARRANTY or representation, either express or implied, -with respect to this software, its quality, accuracy, merchantability, or -fitness for a particular purpose. This software is provided "AS IS", and you, -its user, assume the entire risk as to its quality and accuracy. - -This software is copyright (C) 1991-1998, Thomas G. Lane. -All Rights Reserved except as specified below. - -Permission is hereby granted to use, copy, modify, and distribute this -software (or portions thereof) for any purpose, without fee, subject to these -conditions: -(1) If any part of the source code for this software is distributed, then this -README file must be included, with this copyright and no-warranty notice -unaltered; and any additions, deletions, or changes to the original files -must be clearly indicated in accompanying documentation. -(2) If only executable code is distributed, then the accompanying -documentation must state that "this software is based in part on the work of -the Independent JPEG Group". -(3) Permission for use of this software is granted only if the user accepts -full responsibility for any undesirable consequences; the authors accept -NO LIABILITY for damages of any kind. - -These conditions apply to any software derived from or based on the IJG code, -not just to the unmodified library. If you use our work, you ought to -acknowledge us. - -Permission is NOT granted for the use of any IJG author's name or company name -in advertising or publicity relating to this software or products derived from -it. This software may be referred to only as "the Independent JPEG Group's -software". - -We specifically permit and encourage the use of this software as the basis of -commercial products, provided that all warranty or liability claims are -assumed by the product vendor. - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -icu -http://site.icu-project.org/ ------------------------------------------------------------------------ -COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later) - -Copyright © 1991-2017 Unicode, Inc. All rights reserved. -Distributed under the Terms of Use in http://www.unicode.org/copyright.html - -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Unicode data files and any associated documentation -(the "Data Files") or Unicode software and any associated documentation -(the "Software") to deal in the Data Files or Software -without restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, and/or sell copies of -the Data Files or Software, and to permit persons to whom the Data Files -or Software are furnished to do so, provided that either -(a) this copyright and permission notice appear with all copies -of the Data Files or Software, or -(b) this copyright and permission notice appear in associated -Documentation. - -THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT OF THIRD PARTY RIGHTS. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS -NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL -DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THE DATA FILES OR SOFTWARE. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, -use or other dealings in these Data Files or Software without prior -written authorization of the copyright holder. - ---------------------- - -Third-Party Software Licenses - -This section contains third-party software notices and/or additional -terms for licensed third-party software components included within ICU -libraries. - -1. ICU License - ICU 1.8.1 to ICU 57.1 - -COPYRIGHT AND PERMISSION NOTICE - -Copyright (c) 1995-2016 International Business Machines Corporation and others -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, and/or sell copies of the Software, and to permit persons -to whom the Software is furnished to do so, provided that the above -copyright notice(s) and this permission notice appear in all copies of -the Software and that both the above copyright notice(s) and this -permission notice appear in supporting documentation. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY -SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER -RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF -CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -of the copyright holder. - -All trademarks and registered trademarks mentioned herein are the -property of their respective owners. - -2. Chinese/Japanese Word Break Dictionary Data (cjdict.txt) - - # The Google Chrome software developed by Google is licensed under - # the BSD license. Other software included in this distribution is - # provided under other licenses, as set forth below. - # - # The BSD License - # http://opensource.org/licenses/bsd-license.php - # Copyright (C) 2006-2008, Google Inc. - # - # All rights reserved. - # - # Redistribution and use in source and binary forms, with or without - # modification, are permitted provided that the following conditions are met: - # - # Redistributions of source code must retain the above copyright notice, - # this list of conditions and the following disclaimer. - # Redistributions in binary form must reproduce the above - # copyright notice, this list of conditions and the following - # disclaimer in the documentation and/or other materials provided with - # the distribution. - # Neither the name of Google Inc. nor the names of its - # contributors may be used to endorse or promote products derived from - # this software without specific prior written permission. - # - # - # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - # - # - # The word list in cjdict.txt are generated by combining three word lists - # listed below with further processing for compound word breaking. The - # frequency is generated with an iterative training against Google web - # corpora. - # - # * Libtabe (Chinese) - # - https://sourceforge.net/project/?group_id=1519 - # - Its license terms and conditions are shown below. - # - # * IPADIC (Japanese) - # - http://chasen.aist-nara.ac.jp/chasen/distribution.html - # - Its license terms and conditions are shown below. - # - # ---------COPYING.libtabe ---- BEGIN-------------------- - # - # /* - # * Copyright (c) 1999 TaBE Project. - # * Copyright (c) 1999 Pai-Hsiang Hsiao. - # * All rights reserved. - # * - # * Redistribution and use in source and binary forms, with or without - # * modification, are permitted provided that the following conditions - # * are met: - # * - # * . Redistributions of source code must retain the above copyright - # * notice, this list of conditions and the following disclaimer. - # * . Redistributions in binary form must reproduce the above copyright - # * notice, this list of conditions and the following disclaimer in - # * the documentation and/or other materials provided with the - # * distribution. - # * . Neither the name of the TaBE Project nor the names of its - # * contributors may be used to endorse or promote products derived - # * from this software without specific prior written permission. - # * - # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - # * OF THE POSSIBILITY OF SUCH DAMAGE. - # */ - # - # /* - # * Copyright (c) 1999 Computer Systems and Communication Lab, - # * Institute of Information Science, Academia - # * Sinica. All rights reserved. - # * - # * Redistribution and use in source and binary forms, with or without - # * modification, are permitted provided that the following conditions - # * are met: - # * - # * . Redistributions of source code must retain the above copyright - # * notice, this list of conditions and the following disclaimer. - # * . Redistributions in binary form must reproduce the above copyright - # * notice, this list of conditions and the following disclaimer in - # * the documentation and/or other materials provided with the - # * distribution. - # * . Neither the name of the Computer Systems and Communication Lab - # * nor the names of its contributors may be used to endorse or - # * promote products derived from this software without specific - # * prior written permission. - # * - # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - # * OF THE POSSIBILITY OF SUCH DAMAGE. - # */ - # - # Copyright 1996 Chih-Hao Tsai @ Beckman Institute, - # University of Illinois - # c-tsai4@uiuc.edu http://casper.beckman.uiuc.edu/~c-tsai4 - # - # ---------------COPYING.libtabe-----END-------------------------------- - # - # - # ---------------COPYING.ipadic-----BEGIN------------------------------- - # - # Copyright 2000, 2001, 2002, 2003 Nara Institute of Science - # and Technology. All Rights Reserved. - # - # Use, reproduction, and distribution of this software is permitted. - # Any copy of this software, whether in its original form or modified, - # must include both the above copyright notice and the following - # paragraphs. - # - # Nara Institute of Science and Technology (NAIST), - # the copyright holders, disclaims all warranties with regard to this - # software, including all implied warranties of merchantability and - # fitness, in no event shall NAIST be liable for - # any special, indirect or consequential damages or any damages - # whatsoever resulting from loss of use, data or profits, whether in an - # action of contract, negligence or other tortuous action, arising out - # of or in connection with the use or performance of this software. - # - # A large portion of the dictionary entries - # originate from ICOT Free Software. The following conditions for ICOT - # Free Software applies to the current dictionary as well. - # - # Each User may also freely distribute the Program, whether in its - # original form or modified, to any third party or parties, PROVIDED - # that the provisions of Section 3 ("NO WARRANTY") will ALWAYS appear - # on, or be attached to, the Program, which is distributed substantially - # in the same form as set out herein and that such intended - # distribution, if actually made, will neither violate or otherwise - # contravene any of the laws and regulations of the countries having - # jurisdiction over the User or the intended distribution itself. - # - # NO WARRANTY - # - # The program was produced on an experimental basis in the course of the - # research and development conducted during the project and is provided - # to users as so produced on an experimental basis. Accordingly, the - # program is provided without any warranty whatsoever, whether express, - # implied, statutory or otherwise. The term "warranty" used herein - # includes, but is not limited to, any warranty of the quality, - # performance, merchantability and fitness for a particular purpose of - # the program and the nonexistence of any infringement or violation of - # any right of any third party. - # - # Each user of the program will agree and understand, and be deemed to - # have agreed and understood, that there is no warranty whatsoever for - # the program and, accordingly, the entire risk arising from or - # otherwise connected with the program is assumed by the user. - # - # Therefore, neither ICOT, the copyright holder, or any other - # organization that participated in or was otherwise related to the - # development of the program and their respective officials, directors, - # officers and other employees shall be held liable for any and all - # damages, including, without limitation, general, special, incidental - # and consequential damages, arising out of or otherwise in connection - # with the use or inability to use the program or any product, material - # or result produced or otherwise obtained by using the program, - # regardless of whether they have been advised of, or otherwise had - # knowledge of, the possibility of such damages at any time during the - # project or thereafter. Each user will be deemed to have agreed to the - # foregoing by his or her commencement of use of the program. The term - # "use" as used herein includes, but is not limited to, the use, - # modification, copying and distribution of the program and the - # production of secondary products from the program. - # - # In the case where the program, whether in its original form or - # modified, was distributed or delivered to or received by a user from - # any person, organization or entity other than ICOT, unless it makes or - # grants independently of ICOT any specific warranty to the user in - # writing, such person, organization or entity, will also be exempted - # from and not be held liable to the user for any such damages as noted - # above as far as the program is concerned. - # - # ---------------COPYING.ipadic-----END---------------------------------- - -3. Lao Word Break Dictionary Data (laodict.txt) - - # Copyright (c) 2013 International Business Machines Corporation - # and others. All Rights Reserved. - # - # Project: http://code.google.com/p/lao-dictionary/ - # Dictionary: http://lao-dictionary.googlecode.com/git/Lao-Dictionary.txt - # License: http://lao-dictionary.googlecode.com/git/Lao-Dictionary-LICENSE.txt - # (copied below) - # - # This file is derived from the above dictionary, with slight - # modifications. - # ---------------------------------------------------------------------- - # Copyright (C) 2013 Brian Eugene Wilson, Robert Martin Campbell. - # All rights reserved. - # - # Redistribution and use in source and binary forms, with or without - # modification, - # are permitted provided that the following conditions are met: - # - # - # Redistributions of source code must retain the above copyright notice, this - # list of conditions and the following disclaimer. Redistributions in - # binary form must reproduce the above copyright notice, this list of - # conditions and the following disclaimer in the documentation and/or - # other materials provided with the distribution. - # - # - # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - # OF THE POSSIBILITY OF SUCH DAMAGE. - # -------------------------------------------------------------------------- - -4. Burmese Word Break Dictionary Data (burmesedict.txt) - - # Copyright (c) 2014 International Business Machines Corporation - # and others. All Rights Reserved. - # - # This list is part of a project hosted at: - # github.com/kanyawtech/myanmar-karen-word-lists - # - # -------------------------------------------------------------------------- - # Copyright (c) 2013, LeRoy Benjamin Sharon - # All rights reserved. - # - # Redistribution and use in source and binary forms, with or without - # modification, are permitted provided that the following conditions - # are met: Redistributions of source code must retain the above - # copyright notice, this list of conditions and the following - # disclaimer. Redistributions in binary form must reproduce the - # above copyright notice, this list of conditions and the following - # disclaimer in the documentation and/or other materials provided - # with the distribution. - # - # Neither the name Myanmar Karen Word Lists, nor the names of its - # contributors may be used to endorse or promote products derived - # from this software without specific prior written permission. - # - # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS - # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - # SUCH DAMAGE. - # -------------------------------------------------------------------------- - -5. Time Zone Database - - ICU uses the public domain data and code derived from Time Zone -Database for its time zone support. The ownership of the TZ database -is explained in BCP 175: Procedure for Maintaining the Time Zone -Database section 7. - - # 7. Database Ownership - # - # The TZ database itself is not an IETF Contribution or an IETF - # document. Rather it is a pre-existing and regularly updated work - # that is in the public domain, and is intended to remain in the - # public domain. Therefore, BCPs 78 [RFC5378] and 79 [RFC3979] do - # not apply to the TZ Database or contributions that individuals make - # to it. Should any claims be made and substantiated against the TZ - # Database, the organization that is providing the IANA - # Considerations defined in this RFC, under the memorandum of - # understanding with the IETF, currently ICANN, may act in accordance - # with all competent court orders. No ownership claims will be made - # by ICANN or the IETF Trust on the database or the code. Any person - # making a contribution to the database or code waives all rights to - # future claims in that contribution or in the TZ Database. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -inspector protocol -https://chromium.googlesource.com/deps/inspector_protocol/ ------------------------------------------------------------------------ -// Copyright 2016 The Chromium Authors. All rights reserved. -// -// - ---- See BSD License (Google) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -jsoncpp -https://github.com/open-source-parsers/jsoncpp ------------------------------------------------------------------------ -The JsonCpp library's source code, including accompanying documentation, -tests and demonstration applications, are licensed under the following -conditions... - -The author (Baptiste Lepilleur) explicitly disclaims copyright in all -jurisdictions which recognize such a disclaimer. In such jurisdictions, -this software is released into the Public Domain. - -In jurisdictions which do not recognize Public Domain property (e.g. Germany as of -2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is -released under the terms of the MIT License (see below). - -In jurisdictions which recognize Public Domain property, the user of this -software may choose to accept it either as 1) Public Domain, 2) under the -conditions of the MIT License (see below), or 3) under the terms of dual -Public Domain/MIT License conditions described here, as they choose. - -The MIT License is about as close to Public Domain as a license can get, and is -described in clear, concise terms at: - - http://en.wikipedia.org/wiki/MIT_License - -The full text of the MIT License follows: - -======================================================================== -Copyright (c) 2007-2010 Baptiste Lepilleur - ---- See MIT License at the end of this file --- - -======================================================================== -(END LICENSE TEXT) - -The MIT license is compatible with both the GPL and commercial -software, affording one all of the rights of Public Domain with the -minor nuisance of being required to keep the above copyright notice -and license text in the source code. Note also that by accepting the -Public Domain "license" you can re-license your copy using whatever -license you like. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -libFuzzer -http://llvm.org/docs/LibFuzzer.html ------------------------------------------------------------------------ -============================================================================== -LLVM Release License -============================================================================== -University of Illinois/NCSA -Open Source License - -Copyright (c) 2003-2015 University of Illinois at Urbana-Champaign. -All rights reserved. - -Developed by: - - LLVM Team - - University of Illinois at Urbana-Champaign - - http://llvm.org - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal with -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimers. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimers in the - documentation and/or other materials provided with the distribution. - - * Neither the names of the LLVM Team, University of Illinois at - Urbana-Champaign, nor the names of its contributors may be used to - endorse or promote products derived from this Software without specific - prior written permission. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE -SOFTWARE. - -============================================================================== -Copyrights and Licenses for Third Party Software Distributed with LLVM: -============================================================================== -The LLVM software contains code written by third parties. Such software will -have its own individual LICENSE.TXT file in the directory in which it appears. -This file will describe the copyrights, license, and restrictions which apply -to that code. - -The disclaimer of warranty in the University of Illinois Open Source License -applies to all code in the LLVM Distribution, and nothing in any of the -other licenses gives permission to use the names of the LLVM Team or the -University of Illinois to endorse or promote products derived from this -Software. - -The following pieces of software have additional or alternate copyrights, -licenses, and/or restrictions: - -Program Directory -------- --------- -Autoconf llvm/autoconf - llvm/projects/ModuleMaker/autoconf -Google Test llvm/utils/unittest/googletest -OpenBSD regex llvm/lib/Support/{reg*, COPYRIGHT.regex} -pyyaml tests llvm/test/YAMLParser/{*.data, LICENSE.TXT} -ARM contributions llvm/lib/Target/ARM/LICENSE.TXT -md5 contributions llvm/lib/Support/MD5.cpp llvm/include/llvm/Support/MD5.h ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -libcxx -http://libcxx.llvm.org/ ------------------------------------------------------------------------ -============================================================================== -libc++ License -============================================================================== - -The libc++ library is dual licensed under both the University of Illinois -"BSD-Like" license and the MIT license. As a user of this code you may choose -to use it under either license. As a contributor, you agree to allow your code -to be used under both. - -Full text of the relevant licenses is included below. - -============================================================================== - -University of Illinois/NCSA -Open Source License - -Copyright (c) 2009-2017 by the contributors listed in CREDITS.TXT - -All rights reserved. - -Developed by: - - LLVM Team - - University of Illinois at Urbana-Champaign - - http://llvm.org - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal with -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimers. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimers in the - documentation and/or other materials provided with the distribution. - - * Neither the names of the LLVM Team, University of Illinois at - Urbana-Champaign, nor the names of its contributors may be used to - endorse or promote products derived from this Software without specific - prior written permission. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE -SOFTWARE. - -============================================================================== - -Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT - ---- See MIT License at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -libcxxabi -http://libcxxabi.llvm.org/ ------------------------------------------------------------------------ -============================================================================== -libc++abi License -============================================================================== - -The libc++abi library is dual licensed under both the University of Illinois -"BSD-Like" license and the MIT license. As a user of this code you may choose -to use it under either license. As a contributor, you agree to allow your code -to be used under both. - -Full text of the relevant licenses is included below. - -============================================================================== - -University of Illinois/NCSA -Open Source License - -Copyright (c) 2009-2017 by the contributors listed in CREDITS.TXT - -All rights reserved. - -Developed by: - - LLVM Team - - University of Illinois at Urbana-Champaign - - http://llvm.org - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal with -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimers. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimers in the - documentation and/or other materials provided with the distribution. - - * Neither the names of the LLVM Team, University of Illinois at - Urbana-Champaign, nor the names of its contributors may be used to - endorse or promote products derived from this Software without specific - prior written permission. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE -SOFTWARE. - -============================================================================== - -Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT - ---- See MIT License at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -libevdev -https://chromium.googlesource.com/chromiumos/platform/libevdev ------------------------------------------------------------------------ -Copyright (c) 2011 The Chromium OS Authors. All rights reserved. -Use of this source code is governed by a BSD-style license that can be -found in the LICENSE file. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -libevent -http://libevent.org/ ------------------------------------------------------------------------ -Libevent is available for use under the following license, commonly known -as the 3-clause (or "modified") BSD license: - -============================== -Copyright (c) 2000-2007 Niels Provos -Copyright (c) 2007-2010 Niels Provos and Nick Mathewson - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -============================== - -Portions of Libevent are based on works by others, also made available by -them under the three-clause BSD license above. The copyright notices are -available in the corresponding source files; the license is as above. Here's -a list: - -log.c: - Copyright (c) 2000 Dug Song - Copyright (c) 1993 The Regents of the University of California. - -strlcpy.c: - Copyright (c) 1998 Todd C. Miller - -win32.c: - Copyright (c) 2003 Michael A. Davis - -evport.c: - Copyright (c) 2007 Sun Microsystems - -min_heap.h: - Copyright (c) 2006 Maxim Yegorushkin - -tree.h: - Copyright 2002 Niels Provos ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -libjingle XMPP and xmllite libraries -https://chromium.googlesource.com/external/webrtc ------------------------------------------------------------------------ -Copyright (c) 2011, The WebRTC project authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - * Neither the name of Google nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -libjpeg -http://www.ijg.org/ ------------------------------------------------------------------------ -(Copied from the README.) - --------------------------------------------------------------------------------- - -The authors make NO WARRANTY or representation, either express or implied, -with respect to this software, its quality, accuracy, merchantability, or -fitness for a particular purpose. This software is provided "AS IS", and you, -its user, assume the entire risk as to its quality and accuracy. - -This software is copyright (C) 1991-1998, Thomas G. Lane. -All Rights Reserved except as specified below. - -Permission is hereby granted to use, copy, modify, and distribute this -software (or portions thereof) for any purpose, without fee, subject to these -conditions: -(1) If any part of the source code for this software is distributed, then this -README file must be included, with this copyright and no-warranty notice -unaltered; and any additions, deletions, or changes to the original files -must be clearly indicated in accompanying documentation. -(2) If only executable code is distributed, then the accompanying -documentation must state that "this software is based in part on the work of -the Independent JPEG Group". -(3) Permission for use of this software is granted only if the user accepts -full responsibility for any undesirable consequences; the authors accept -NO LIABILITY for damages of any kind. - -These conditions apply to any software derived from or based on the IJG code, -not just to the unmodified library. If you use our work, you ought to -acknowledge us. - -Permission is NOT granted for the use of any IJG author's name or company name -in advertising or publicity relating to this software or products derived from -it. This software may be referred to only as "the Independent JPEG Group's -software". - -We specifically permit and encourage the use of this software as the basis of -commercial products, provided that all warranty or liability claims are -assumed by the product vendor. - - -ansi2knr.c is included in this distribution by permission of L. Peter Deutsch, -sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA. -ansi2knr.c is NOT covered by the above copyright and conditions, but instead -by the usual distribution terms of the Free Software Foundation; principally, -that you must include source code if you redistribute it. (See the file -ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part -of any program generated from the IJG code, this does not limit you more than -the foregoing paragraphs do. - -The Unix configuration script "configure" was produced with GNU Autoconf. -It is copyright by the Free Software Foundation but is freely distributable. -The same holds for its supporting scripts (config.guess, config.sub, -ltconfig, ltmain.sh). Another support script, install-sh, is copyright -by M.I.T. but is also freely distributable. - -It appears that the arithmetic coding option of the JPEG spec is covered by -patents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot -legally be used without obtaining one or more licenses. For this reason, -support for arithmetic coding has been removed from the free JPEG software. -(Since arithmetic coding provides only a marginal gain over the unpatented -Huffman mode, it is unlikely that very many implementations will support it.) -So far as we are aware, there are no patent restrictions on the remaining -code. - -The IJG distribution formerly included code to read and write GIF files. -To avoid entanglement with the Unisys LZW patent, GIF reading support has -been removed altogether, and the GIF writer has been simplified to produce -"uncompressed GIFs". This technique does not use the LZW algorithm; the -resulting GIF files are larger than usual, but are readable by all standard -GIF decoders. - -We are required to state that - "The Graphics Interchange Format(c) is the Copyright property of - CompuServe Incorporated. GIF(sm) is a Service Mark property of - CompuServe Incorporated." - --------------------------------------------------------------------------------- - -jconfig.h is distributed under the MPL 1.1/GPL 2.0/LGPL 2.1 tri-license. - -jmorecfg.h contains modifications, which are distributed under the Netscape -Public License. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -libjpeg-turbo -https://github.com/libjpeg-turbo/libjpeg-turbo/ ------------------------------------------------------------------------ -libjpeg-turbo Licenses -====================== - -libjpeg-turbo is covered by three compatible BSD-style open source licenses: - -- The IJG (Independent JPEG Group) License, which is listed in - [README.ijg](README.ijg) - - This license applies to the libjpeg API library and associated programs - (any code inherited from libjpeg, and any modifications to that code.) - -- The Modified (3-clause) BSD License, which is listed in - [turbojpeg.c](turbojpeg.c) - - This license covers the TurboJPEG API library and associated programs. - -- The zlib License, which is listed in [simd/jsimdext.inc](simd/jsimdext.inc) - - This license is a subset of the other two, and it covers the libjpeg-turbo - SIMD extensions. - - -Complying with the libjpeg-turbo Licenses -========================================= - -This section provides a roll-up of the libjpeg-turbo licensing terms, to the -best of our understanding. - -1. If you are distributing a modified version of the libjpeg-turbo source, - then: - - 1. You cannot alter or remove any existing copyright or license notices - from the source. - - **Origin** - - Clause 1 of the IJG License - - Clause 1 of the Modified BSD License - - Clauses 1 and 3 of the zlib License - - 2. You must add your own copyright notice to the header of each source - file you modified, so others can tell that you modified that file (if - there is not an existing copyright header in that file, then you can - simply add a notice stating that you modified the file.) - - **Origin** - - Clause 1 of the IJG License - - Clause 2 of the zlib License - - 3. You must include the IJG README file, and you must not alter any of the - copyright or license text in that file. - - **Origin** - - Clause 1 of the IJG License - -2. If you are distributing only libjpeg-turbo binaries without the source, or - if you are distributing an application that statically links with - libjpeg-turbo, then: - - 1. Your product documentation must include a message stating: - - This software is based in part on the work of the Independent JPEG - Group. - - **Origin** - - Clause 2 of the IJG license - - 2. If your binary distribution includes or uses the TurboJPEG API, then - your product documentation must include the text of the Modified BSD - License. - - **Origin** - - Clause 2 of the Modified BSD License - -3. You cannot use the name of the IJG or The libjpeg-turbo Project or the - contributors thereof in advertising, publicity, etc. - - **Origin** - - IJG License - - Clause 3 of the Modified BSD License - -4. The IJG and The libjpeg-turbo Project do not warrant libjpeg-turbo to be - free of defects, nor do we accept any liability for undesirable - consequences resulting from your use of the software. - - **Origin** - - IJG License - - Modified BSD License - - zlib License ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -libpng -http://libpng.org/ ------------------------------------------------------------------------ -This copy of the libpng notices is provided for your convenience. In case of -any discrepancy between this copy and the notices in the file png.h that is -included in the libpng distribution, the latter shall prevail. - -COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: - -If you modify libpng you may insert additional notices immediately following -this sentence. - -Using custom versions of pnglibconf.h and pngprefix.h for Chrome. - -This code is released under the libpng license. - -libpng versions 1.0.7, July 1, 2000 through 1.6.34, September 29, 2017 are -Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are -derived from libpng-1.0.6, and are distributed according to the same -disclaimer and license as libpng-1.0.6 with the following individuals -added to the list of Contributing Authors: - - Simon-Pierre Cadieux - Eric S. Raymond - Mans Rullgard - Cosmin Truta - Gilles Vollant - James Yu - Mandar Sahastrabuddhe - Google Inc. - Vadim Barkov - -and with the following additions to the disclaimer: - - There is no warranty against interference with your enjoyment of the - library or against infringement. There is no warranty that our - efforts or the library will fulfill any of your particular purposes - or needs. This library is provided with all faults, and the entire - risk of satisfactory quality, performance, accuracy, and effort is with - the user. - -Some files in the "contrib" directory and some configure-generated -files that are distributed with libpng have other copyright owners and -are released under other open source licenses. - -libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are -Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from -libpng-0.96, and are distributed according to the same disclaimer and -license as libpng-0.96, with the following individuals added to the list -of Contributing Authors: - - Tom Lane - Glenn Randers-Pehrson - Willem van Schaik - -libpng versions 0.89, June 1996, through 0.96, May 1997, are -Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88, -and are distributed according to the same disclaimer and license as -libpng-0.88, with the following individuals added to the list of -Contributing Authors: - - John Bowler - Kevin Bracey - Sam Bushell - Magnus Holmgren - Greg Roelofs - Tom Tanner - -Some files in the "scripts" directory have other copyright owners -but are released under this license. - -libpng versions 0.5, May 1995, through 0.88, January 1996, are -Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. - -For the purposes of this copyright and license, "Contributing Authors" -is defined as the following set of individuals: - - Andreas Dilger - Dave Martindale - Guy Eric Schalnat - Paul Schmidt - Tim Wegner - -The PNG Reference Library is supplied "AS IS". The Contributing Authors -and Group 42, Inc. disclaim all warranties, expressed or implied, -including, without limitation, the warranties of merchantability and of -fitness for any purpose. The Contributing Authors and Group 42, Inc. -assume no liability for direct, indirect, incidental, special, exemplary, -or consequential damages, which may result from the use of the PNG -Reference Library, even if advised of the possibility of such damage. - -Permission is hereby granted to use, copy, modify, and distribute this -source code, or portions hereof, for any purpose, without fee, subject -to the following restrictions: - - 1. The origin of this source code must not be misrepresented. - - 2. Altered versions must be plainly marked as such and must not - be misrepresented as being the original source. - - 3. This Copyright notice may not be removed or altered from any - source or altered source distribution. - -The Contributing Authors and Group 42, Inc. specifically permit, without -fee, and encourage the use of this source code as a component to -supporting the PNG file format in commercial products. If you use this -source code in a product, acknowledgment is not required but would be -appreciated. - -END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE. - -TRADEMARK: - -The name "libpng" has not been registered by the Copyright owner -as a trademark in any jurisdiction. However, because libpng has -been distributed and maintained world-wide, continually since 1995, -the Copyright owner claims "common-law trademark protection" in any -jurisdiction where common-law trademark is recognized. - -OSI CERTIFICATION: - -Libpng is OSI Certified Open Source Software. OSI Certified Open Source is -a certification mark of the Open Source Initiative. OSI has not addressed -the additional disclaimers inserted at version 1.0.7. - -EXPORT CONTROL: - -The Copyright owner believes that the Export Control Classification -Number (ECCN) for libpng is EAR99, which means not subject to export -controls or International Traffic in Arms Regulations (ITAR) because -it is open source, publicly available software, that does not contain -any encryption software. See the EAR, paragraphs 734.3(b)(3) and -734.7(b). - -Glenn Randers-Pehrson -glennrp at users.sourceforge.net -September 29, 2017 ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -libprotobuf-mutator -https://github.com/google/libprotobuf-mutator ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -libsecret -https://git.gnome.org/browse/libsecret/ ------------------------------------------------------------------------ - - ---- See GNU LESSER GENERAL PUBLIC LICENSE (B) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -libsrtp -https://github.com/cisco/libsrtp ------------------------------------------------------------------------ -/* - * - * Copyright (c) 2001-2017 Cisco Systems, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * - * Neither the name of the Cisco Systems, Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -libudev -http://www.freedesktop.org/wiki/Software/systemd/ ------------------------------------------------------------------------ - - ---- See GNU LESSER GENERAL PUBLIC LICENSE (B) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -libunwind -https://llvm.org/svn/llvm-project/libunwind/trunk/ ------------------------------------------------------------------------ -============================================================================== -libunwind License -============================================================================== - -The libunwind library is dual licensed under both the University of Illinois -"BSD-Like" license and the MIT license. As a user of this code you may choose -to use it under either license. As a contributor, you agree to allow your code -to be used under both. - -Full text of the relevant licenses is included below. - -============================================================================== - -University of Illinois/NCSA -Open Source License - -Copyright (c) 2009-2017 by the contributors listed in CREDITS.TXT - -All rights reserved. - -Developed by: - - LLVM Team - - University of Illinois at Urbana-Champaign - - http://llvm.org - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal with -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimers. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimers in the - documentation and/or other materials provided with the distribution. - - * Neither the names of the LLVM Team, University of Illinois at - Urbana-Champaign, nor the names of its contributors may be used to - endorse or promote products derived from this Software without specific - prior written permission. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE -SOFTWARE. - -============================================================================== - -Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT - ---- See MIT License at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -libusbx -http://libusb.org/ ------------------------------------------------------------------------ - - ---- See GNU LESSER GENERAL PUBLIC LICENSE (B) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -libvpx -http://www.webmproject.org/ ------------------------------------------------------------------------ -Copyright (c) 2010, The WebM Project authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - * Neither the name of Google, nor the WebM Project, nor the names - of its contributors may be used to endorse or promote products - derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -libxml -http://xmlsoft.org/ ------------------------------------------------------------------------ -Except where otherwise noted in the source code (e.g. the files hash.c, -list.c and the trio files, which are covered by a similar licence but -with different Copyright notices) all the files are: - - Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is fur- -nished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- -NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -libxslt -http://xmlsoft.org/XSLT ------------------------------------------------------------------------ -Licence for libxslt except libexslt ----------------------------------------------------------------------- - Copyright (C) 2001-2002 Daniel Veillard. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is fur- -nished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- -NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON- -NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of Daniel Veillard shall not -be used in advertising or otherwise to promote the sale, use or other deal- -ings in this Software without prior written authorization from him. - ----------------------------------------------------------------------- - -Licence for libexslt ----------------------------------------------------------------------- - Copyright (C) 2001-2002 Thomas Broyer, Charlie Bozeman and Daniel Veillard. - All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is fur- -nished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- -NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON- -NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the authors shall not -be used in advertising or otherwise to promote the sale, use or other deal- -ings in this Software without prior written authorization from him. ----------------------------------------------------------------------- ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -libyuv -http://code.google.com/p/libyuv/ ------------------------------------------------------------------------ -Copyright 2011 The LibYuv Project Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - * Neither the name of Google nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -mach_override -https://github.com/rentzsch/mach_override ------------------------------------------------------------------------ -Copyright (c) 2003-2012 Jonathan 'Wolf' Rentzsch: http://rentzsch.com -Some rights reserved: http://opensource.org/licenses/mit - -mach_override includes a copy of libudis86, licensed as follows: - -Copyright (c) 2002-2009 Vivek Thampi -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -mesa -http://www.mesa3d.org/ ------------------------------------------------------------------------ -The default Mesa license is as follows: - -Copyright (C) 1999-2007 Brian Paul All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - - -Some parts of Mesa are copyrighted under the GNU LGPL. See the -Mesa/docs/COPYRIGHT file for details. - -The following is the standard GNU copyright file. ----------------------------------------------------------------------- - ---- See GNU LIBRARY GENERAL PUBLIC LICENSE (D) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -minigbm -https://chromium.googlesource.com/chromiumos/platform/minigbm ------------------------------------------------------------------------ -// Copyright 2014 The Chromium OS Authors. All rights reserved. -// -// - ---- See BSD License (Google) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -modp base64 decoder -https://github.com/client9/stringencoders ------------------------------------------------------------------------ - * MODP_B64 - High performance base64 encoder/decoder - * Version 1.3 -- 17-Mar-2006 - * http://modp.com/release/base64 - * - * Copyright (c) 2005, 2006 Nick Galbreath -- nickg [at] modp [dot] com - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * Neither the name of the modp.com nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -mt19937ar -http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html ------------------------------------------------------------------------ - A C-program for MT19937, with initialization improved 2002/1/26. - Coded by Takuji Nishimura and Makoto Matsumoto. - - Before using, initialize the state by using init_genrand(seed) - or init_by_array(init_key, key_length). - - Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - 3. The names of its contributors may not be used to endorse or promote - products derived from this software without specific prior written - permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -native client -http://code.google.com/p/nativeclient ------------------------------------------------------------------------ -Copyright 2008, Google Inc. -All rights reserved. - ---- See BSD License (Google) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -newlib-extras -ftp://sourceware.org/pub/newlib/newlib-2.0.0.tar.gz ------------------------------------------------------------------------ - README for newlib-2.0.0 release - (mostly cribbed from the README in the gdb-4.13 release) - -This is `newlib', a simple ANSI C library, math library, and collection -of board support packages. - -The newlib and libgloss subdirectories are a collection of software from -several sources, each wi6h their own copyright and license. See the file -COPYING.NEWLIB for details. The rest of the release tree is under either -the GNU GPL or LGPL licenses. - -THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - -Unpacking and Installation -- quick overview -========================== - -When you unpack the newlib-2.0.0.tar.gz file, you'll find a directory -called `newlib-2.0.0', which contains: - -COPYING config/ install-sh* mpw-configure -COPYING.LIB config-ml.in libgloss/ mpw-install -COPYING.NEWLIB config.guess* mkinstalldirs* newlib/ -CYGNUS config.sub* move-if-change* symlink-tree* -ChangeLog configure* mpw-README texinfo/ -Makefile.in configure.in mpw-build.in -README etc/ mpw-config.in - -To build NEWLIB, you must follow the instructions in the section entitled -"Compiling NEWLIB". - -This will configure and build all the libraries and crt0 (if one exists). -If `configure' can't determine your host system type, specify one as its -argument, e.g., sun4 or sun4sol2. NEWLIB is most often used in cross -environments. - -NOTE THAT YOU MUST HAVE ALREADY BUILT AND INSTALLED GCC and BINUTILS. - - -More Documentation -================== - - Newlib documentation is available on the net via: - http://sourceware.org/newlib/docs.html - - All the documentation for NEWLIB comes as part of the machine-readable -distribution. The documentation is written in Texinfo format, which is -a documentation system that uses a single source file to produce both -on-line information and a printed manual. You can use one of the Info -formatting commands to create the on-line version of the documentation -and TeX (or `texi2roff') to typeset the printed version. - - If you want to format these Info files yourself, you need one of the -Info formatting programs, such as `texinfo-format-buffer' or `makeinfo'. - - If you want to typeset and print copies of this manual, you need TeX, -a program to print its DVI output files, and `texinfo.tex', the Texinfo -definitions file. - - TeX is a typesetting program; it does not print files directly, but -produces output files called DVI files. To print a typeset document, -you need a program to print DVI files. If your system has TeX -installed, chances are it has such a program. The precise command to -use depends on your system; `lpr -d' is common; another (for PostScript -devices) is `dvips'. The DVI print command may require a file name -without any extension or a `.dvi' extension. - - TeX also requires a macro definitions file called `texinfo.tex'. -This file tells TeX how to typeset a document written in Texinfo -format. On its own, TeX cannot read, much less typeset a Texinfo file. -`texinfo.tex' is distributed with NEWLIB and is located in the -`newlib-VERSION-NUMBER/texinfo' directory. - - - -Compiling NEWLIB -================ - - To compile NEWLIB, you must build it in a directory separate from -the source directory. If you want to run NEWLIB versions for several host -or target machines, you need a different `newlib' compiled for each combination -of host and target. `configure' is designed to make this easy by allowing -you to generate each configuration in a separate subdirectory. -If your `make' program handles the `VPATH' feature correctly (like GNU `make') -running `make' in each of these directories builds the `newlib' libraries -specified there. - - To build `newlib' in a specific directory, run `configure' with the -`--srcdir' option to specify where to find the source. (You also need -to specify a path to find `configure' itself from your working -directory. If the path to `configure' would be the same as the -argument to `--srcdir', you can leave out the `--srcdir' option; it -will be assumed.) - - For example, with version 2.0.0, you can build NEWLIB in a separate -directory for a Sun 4 cross m68k-aout environment like this: - - cd newlib-2.0.0 - mkdir ../newlib-m68k-aout - cd ../newlib-m68k-aout - ../newlib-2.0.0/configure --host=sun4 --target=m68k-aout - make - - When `configure' builds a configuration using a remote source -directory, it creates a tree for the binaries with the same structure -(and using the same names) as the tree under the source directory. In -the example, you'd find the Sun 4 library `libiberty.a' in the -directory `newlib-m68k-aout/libiberty', and NEWLIB itself in -`newlib-m68k-aout/newlib'. - - When you run `make' to build a program or library, you must run it -in a configured directory--whatever directory you were in when you -called `configure' (or one of its subdirectories). - - The `Makefile' that `configure' generates in each source directory -also runs recursively. If you type `make' in a source directory such -as `newlib-2.0.0' (or in a separate configured directory configured with -`--srcdir=PATH/newlib-2.0.0'), you will build all the required libraries. - - When you have multiple hosts or targets configured in separate -directories, you can run `make' on them in parallel (for example, if -they are NFS-mounted on each of the hosts); they will not interfere -with each other. - - -Specifying names for hosts and targets -====================================== - - The specifications used for hosts and targets in the `configure' -script are based on a three-part naming scheme, but some short -predefined aliases are also supported. The full naming scheme encodes -three pieces of information in the following pattern: - - ARCHITECTURE-VENDOR-OS - - For example, you can use the alias `sun4' as a HOST argument or in a -`--target=TARGET' option. The equivalent full name is -`sparc-sun-sunos4'. - - The `configure' script accompanying NEWLIB does not provide any query -facility to list all supported host and target names or aliases. -`configure' calls the Bourne shell script `config.sub' to map -abbreviations to full names; you can read the script, if you wish, or -you can use it to test your guesses on abbreviations--for example: - - % sh config.sub sun4 - sparc-sun-sunos4.1.1 - % sh config.sub sun3 - m68k-sun-sunos4.1.1 - % sh config.sub decstation - mips-dec-ultrix4.2 - % sh config.sub hp300bsd - m68k-hp-bsd - % sh config.sub i386v - i386-pc-sysv - % sh config.sub i786v - Invalid configuration `i786v': machine `i786v' not recognized - -The Build, Host and Target Concepts in newlib -============================================= - -The build, host and target concepts are defined for gcc as follows: - -build: the platform on which gcc is built. -host: the platform on which gcc is run. -target: the platform for which gcc generates code. - -Since newlib is a library, the target concept does not apply to it, and the -build, host, and target options given to the top-level configure script must -be changed for newlib's use. - -The options are shifted according to these correspondences: - -gcc's build platform has no equivalent in newlib. -gcc's host platform is newlib's build platform. -gcc's target platform is newlib's host platform. -and as mentioned before, newlib has no concept of target. - -`configure' options -=================== - - Here is a summary of the `configure' options and arguments that are -most often useful for building NEWLIB. `configure' also has several other -options not listed here. - - configure [--help] - [--prefix=DIR] - [--srcdir=PATH] - [--target=TARGET] HOST - -You may introduce options with a single `-' rather than `--' if you -prefer; but you may abbreviate option names if you use `--'. - -`--help' - Display a quick summary of how to invoke `configure'. - -`--prefix=DIR' - Configure the source to install programs and files in directory - `DIR'. - -`--exec-prefix=DIR' - Configure the source to install host-dependent files in directory - `DIR'. - -`--srcdir=PATH' - *Warning: using this option requires GNU `make', or another `make' - that compatibly implements the `VPATH' feature. - Use this option to make configurations in directories separate - from the NEWLIB source directories. Among other things, you can use - this to build (or maintain) several configurations simultaneously, - in separate directories. `configure' writes configuration - specific files in the current directory, but arranges for them to - use the source in the directory PATH. `configure' will create - directories under the working directory in parallel to the source - directories below PATH. - -`--norecursion' - Configure only the directory level where `configure' is executed; - do not propagate configuration to subdirectories. - -`--target=TARGET' - Configure NEWLIB for running on the specified TARGET. - - There is no convenient way to generate a list of all available - targets. - -`HOST ...' - Configure NEWLIB to be built using a cross compiler running on - the specified HOST. - - There is no convenient way to generate a list of all available - hosts. - -To fit diverse usage models, NEWLIB supports a group of configuration -options so that library features can be turned on/off according to -target system's requirements. - -One feature can be enabled by specifying `--enable-FEATURE=yes' or -`--enable-FEATURE'. Or it can be disable by `--enable-FEATURE=no' or -`--disable-FEATURE'. - -`--enable-newlib-io-pos-args' - Enable printf-family positional arg support. - Disabled by default, but some hosts enable it in configure.host. - -`--enable-newlib-io-c99-formats' - Enable C99 support in IO functions like printf/scanf. - Disabled by default, but some hosts enable it in configure.host. - -`--enable-newlib-register-fini' - Enable finalization function registration using atexit. - Disabled by default. - -`--enable-newlib-io-long-long' - Enable long long type support in IO functions like printf/scanf. - Disabled by default, but many hosts enable it in configure.host. - -`--enable-newlib-io-long-double' - Enable long double type support in IO functions printf/scanf. - Disabled by default, but some hosts enable it in configure.host. - -`--enable-newlib-mb' - Enable multibyte support. - Disabled by default. - -`--enable-newlib-iconv-encodings' - Enable specific comma-separated list of bidirectional iconv - encodings to be built-in. - Disabled by default. - -`--enable-newlib-iconv-from-encodings' - Enable specific comma-separated list of \"from\" iconv encodings - to be built-in. - Disabled by default. - -`--enable-newlib-iconv-to-encodings' - Enable specific comma-separated list of \"to\" iconv encodings - to be built-in. - Disabled by default. - -`--enable-newlib-iconv-external-ccs' - Enable capabilities to load external CCS files for iconv. - Disabled by default. - -`--disable-newlib-atexit-dynamic-alloc' - Disable dynamic allocation of atexit entries. - Most hosts and targets have it enabled in configure.host. - -`--enable-newlib-reent-small' - Enable small reentrant struct support. - Disabled by default. - -`--disable-newlib-fvwrite-in-streamio' - NEWLIB implements the vector buffer mechanism to support stream IO - buffering required by C standard. This feature is possibly - unnecessary for embedded systems which won't change file buffering - with functions like `setbuf' or `setvbuf'. The buffering mechanism - still acts as default for STDIN/STDOUT/STDERR even if this option - is specified. - Enabled by default. - -`--disable-newlib-fseek-optimization' - Disable fseek optimization. It can decrease code size of application - calling `fseek`. - Enabled by default. - -`--disable-newlib-wide-orient' - C99 states that each stream has an orientation, wide or byte. This - feature is possibly unnecessary for embedded systems which only do - byte input/output operations on stream. It can decrease code size - by disable the feature. - Enabled by default. - -`--enable-newlib-nano-malloc' - NEWLIB has two implementations of malloc family's functions, one in - `mallocr.c' and the other one in `nano-mallocr.c'. This options - enables the nano-malloc implementation, which is for small systems - with very limited memory. Note that this implementation does not - support `--enable-malloc-debugging' any more. - Disabled by default. - -`--disable-newlib-unbuf-stream-opt' - NEWLIB does optimization when `fprintf to write only unbuffered unix - file'. It creates a temorary buffer to do the optimization that - increases stack consumption by about `BUFSIZ' bytes. This option - disables the optimization and saves size of text and stack. - Enabled by default. - -`--enable-multilib' - Build many library versions. - Enabled by default. - -`--enable-target-optspace' - Optimize for space. - Disabled by default. - -`--enable-malloc-debugging' - Indicate malloc debugging requested. - Disabled by default. - -`--enable-newlib-multithread' - Enable support for multiple threads. - Enabled by default. - -`--enable-newlib-iconv' - Enable iconv library support. - Disabled by default. - -`--enable-newlib-elix-level' - Supply desired elix library level (1-4). Please refer to HOWTO for - more information about this option. - Set to level 0 by default. - -`--disable-newlib-io-float' - Disable printf/scanf family float support. - Enabled by default. - -`--disable-newlib-supplied-syscalls' - Disable newlib from supplying syscalls. - Enabled by default. - -`--enable-lite-exit' - Enable lite exit, a size-reduced implementation of exit that doesn't - invoke clean-up functions such as _fini or global destructors. - Disabled by default. - -Running the Testsuite -===================== - -To run newlib's testsuite, you'll need a site.exp in your home -directory which points dejagnu to the proper baseboards directory and -the proper exp file for your target. - -Before running make check-target-newlib, set the DEJAGNU environment -variable to point to ~/site.exp. - -Here is a sample site.exp: - -# Make sure we look in the right place for the board description files. -if ![info exists boards_dir] { - set boards_dir {} -} -lappend boards_dir "your dejagnu/baseboards here" - -verbose "Global Config File: target_triplet is $target_triplet" 2 - -global target_list -case "$target_triplet" in { - - { "mips-*elf*" } { - set target_list "mips-sim" - } - - default { - set target_list { "unix" } - } -} - -mips-sim refers to an exp file in the baseboards directory. You'll -need to add the other targets you're testing to the case statement. - -Now type make check-target-newlib in the top-level build directory to -run the testsuite. - -Shared newlib -============= - -newlib uses libtool when it is being compiled natively (with ---target=i[34567]86-pc-linux-gnu) on an i[34567]86-pc-linux-gnu -host. This allows newlib to be compiled as a shared library. - -To configure newlib, do the following from your build directory: - -$(source_dir)/src/configure --with-newlib --prefix=$(install_dir) - -configure will recognize that host == target == -i[34567]86-pc-linux-gnu, so it will tell newlib to compile itself using -libtool. By default, libtool will build shared and static versions of -newlib. - -To compile a program against shared newlib, do the following (where -target_install_dir = $(install_dir)/i[34567]86-pc-linux-gnu): - -gcc -nostdlib $(target_install_dir)/lib/crt0.o progname.c -I $(target_install_dir)/include -L $(target_install_dir)/lib -lc -lm -lgcc - -To run the program, make sure that $(target_install_dir)/lib is listed -in the LD_LIBRARY_PATH environment variable. - -To create a static binary linked against newlib, do the following: - -gcc -nostdlib -static $(target_install_dir)/lib/crt0.o progname.c -I $(target_install_dir)/include -L $(target_install_dir)/lib -lc -lm - -libtool can be instructed to produce only static libraries. To build -newlib as a static library only, do the following from your build -directory: - -$(source_dir)/src/configure --with-newlib --prefix=$(install_dir) --disable-shared - -Regenerating Configuration Files -================================ - -At times you will need to make changes to configure.in and Makefile.am files. -This will mean that configure and Makefile.in files will need to be -regenerated. - -At the top level of newlib is the file: acinclude.m4. This file contains -the definition of the NEWLIB_CONFIGURE macro which is used by all configure.in -files in newlib. You will notice that each directory in newlib containing -a configure.in file also contains an aclocal.m4 file. This file is -generated by issuing: aclocal -I${relative_path_to_toplevel_newlib_dir} --I${relative_path_to_toplevel_src_dir} -The first relative directory is to access acinclude.m4. The second relative -directory is to access libtool information in the top-level src directory. - -For example, to regenerate aclocal.m4 in newlib/libc/machine/arm: - - aclocal -I ../../.. -I ../../../.. - -Note that if the top level acinclude.m4 is altered, every aclocal.m4 file -in newlib should be regenerated. - -If the aclocal.m4 file is regenerated due to a change in acinclude.m4 or -if a configure.in file is modified, the corresponding configure file in the -directory must be regenerated using autoconf. No parameters are necessary. -In the previous example, we would issue: - - autoconf - -from the newlib/libc/machine/arm directory. - -If you have regenerated a configure file or if you have modified a Makefile.am -file, you will need to regenerate the appropriate Makefile.in file(s). -For newlib, automake is a bit trickier. First of all, all Makefile.in -files in newlib (and libgloss) are generated using the --cygnus option -of automake. - -Makefile.in files are generated from the nearest directory up the chain -which contains a configure.in file. In most cases, this is the same -directory containing configure.in, but there are exceptions. -For example, the newlib/libc directory has a number of -subdirectories that do not contain their own configure.in files (e.g. stdio). -For these directories, you must issue the automake command from newlib/libc -which is the nearest parent directory that contains a configure.in. -When you issue the automake command, you specify the subdirectory for -the Makefile.in you are regenerating. For example: - - automake --cygnus stdio/Makefile stdlib/Makefile - -Note how multiple Makefile.in files can be created in the same step. You -would not specify machine/Makefile or sys/Makefile in the previous example -because both of these subdirectories contain their own configure.in files. -One would change to each of these subdirectories and in turn issue: - - automake --cygnus Makefile - -Let's say you create a new machine directory XXXX off of newlib/libc/machine. -After creating a new configure.in and Makefile.am file, you would issue: - - aclocal -I ../../.. - autoconf - automake --cygnus Makefile - -from newlib/libc/machine/XXXX - -It is strongly advised that you use an adequate version of autotools. -For this latest release, the following were used: autoconf 2.68, aclocal 1.11.6, and -automake 1.11.6. - -Reporting Bugs -============== - -The correct address for reporting bugs found in NEWLIB is -"newlib@sourceware.org". Please email all bug reports to that -address. Please include the NEWLIB version number (e.g., newlib-2.0.0), -and how you configured it (e.g., "sun4 host and m68k-aout target"). -Since NEWLIB supports many different configurations, it is important -that you be precise about this. - -Archives of the newlib mailing list are on-line, see - http://sourceware.org/ml/newlib/ ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -opus -https://git.xiph.org/?p=opus.git;a=snapshot;h=3fe744ea04fdcc418fb85c2c133d13372ebb019b;sf=tgz ------------------------------------------------------------------------ -Copyright 2001-2011 Xiph.Org, Skype Limited, Octasic, - Jean-Marc Valin, Timothy B. Terriberry, - CSIRO, Gregory Maxwell, Mark Borgerding, - Erik de Castro Lopo - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -- Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -- Neither the name of Internet Society, IETF or IETF Trust, nor the -names of specific contributors, may be used to endorse or promote -products derived from this software without specific prior written -permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Opus is subject to the royalty-free patent licenses which are -specified at: - -Xiph.Org Foundation: -https://datatracker.ietf.org/ipr/1524/ - -Microsoft Corporation: -https://datatracker.ietf.org/ipr/1914/ - -Broadcom Corporation: -https://datatracker.ietf.org/ipr/1526/ ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -re2 - an efficient, principled regular expression library -https://github.com/google/re2 ------------------------------------------------------------------------ -// Copyright (c) 2009 The RE2 Authors. All rights reserved. -// -// - ---- See BSD License (Google) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -sfntly -https://github.com/googlei18n/sfntly ------------------------------------------------------------------------ - - ---- See Apache License (A) at the end of this file --- - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2011 Google Inc. All Rights Reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -simplejson -https://github.com/simplejson/simplejson ------------------------------------------------------------------------ -Copyright (c) 2006 Bob Ippolito - ---- See MIT License at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -sqlite -https://sqlite.org/ ------------------------------------------------------------------------ -The author disclaims copyright to this source code. In place of -a legal notice, here is a blessing: - - May you do good and not evil. - May you find forgiveness for yourself and forgive others. - May you share freely, never taking more than you give. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -tcmalloc -http://gperftools.googlecode.com/ ------------------------------------------------------------------------ -// Copyright (c) 2005, Google Inc. -// All rights reserved. -// -// - ---- See BSD License (Google) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -tlslite -http://trevp.net/tlslite/ ------------------------------------------------------------------------ -TLS Lite includes code from different sources. All code is either dedicated to -the public domain by its authors, or available under a BSD-style license. In -particular: - -- - -Code written by Trevor Perrin, Kees Bos, Sam Rushing, Dimitris Moraitis, -Marcelo Fernandez, Martin von Loewis, Dave Baggett, and Yngve Pettersen is -available under the following terms: - -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or distribute -this software, either in source code form or as a compiled binary, for any -purpose, commercial or non-commercial, and by any means. - -In jurisdictions that recognize copyright laws, the author or authors of this -software dedicate any and all copyright interest in the software to the public -domain. We make this dedication for the benefit of the public at large and to -the detriment of our heirs and successors. We intend this dedication to be an -overt act of relinquishment in perpetuity of all present and future rights to -this software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -- - -Code written by Bram Cohen (rijndael.py) was dedicated to the public domain by -its author. See rijndael.py for details. - -- - -Code written by Google is available under the following terms: - -Copyright (c) 2008, The Chromium Authors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the Google Inc. nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -url_parse -http://mxr.mozilla.org/comm-central/source/mozilla/netwerk/base/src/nsURLParsers.cpp ------------------------------------------------------------------------ -Copyright 2007, Google Inc. -All rights reserved. - ---- See BSD License (Google) at the end of this file --- - -------------------------------------------------------------------------------- - -The file url_parse.cc is based on nsURLParsers.cc from Mozilla. This file is -licensed separately as follows: - -The contents of this file are subject to the Mozilla Public License Version -1.1 (the "License"); you may not use this file except in compliance with -the License. You may obtain a copy of the License at -http://www.mozilla.org/MPL/ - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -for the specific language governing rights and limitations under the -License. - -The Original Code is mozilla.org code. - -The Initial Developer of the Original Code is -Netscape Communications Corporation. -Portions created by the Initial Developer are Copyright (C) 1998 -the Initial Developer. All Rights Reserved. - -Contributor(s): - Darin Fisher (original author) - -Alternatively, the contents of this file may be used under the terms of -either the GNU General Public License Version 2 or later (the "GPL"), or -the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -in which case the provisions of the GPL or the LGPL are applicable instead -of those above. If you wish to allow use of your version of this file only -under the terms of either the GPL or the LGPL, and not to allow others to -use your version of this file under the terms of the MPL, indicate your -decision by deleting the provisions above and replace them with the notice -and other provisions required by the GPL or the LGPL. If you do not delete -the provisions above, a recipient may use your version of this file under -the terms of any one of the MPL, the GPL or the LGPL. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -usrsctp -http://github.com/sctplab/usrsctp ------------------------------------------------------------------------ -(Copied from the COPYRIGHT file of -https://code.google.com/p/sctp-refimpl/source/browse/trunk/COPYRIGHT) --------------------------------------------------------------------------------- - -Copyright (c) 2001, 2002 Cisco Systems, Inc. -Copyright (c) 2002-12 Randall R. Stewart -Copyright (c) 2002-12 Michael Tuexen -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -v4l-utils -http://git.linuxtv.org/v4l-utils.git ------------------------------------------------------------------------ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations -below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it -becomes a de-facto standard. To achieve this, non-free programs must -be allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control -compilation and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at least - three years, to give the same user the materials specified in - Subsection 6a, above, for a charge no more than the cost of - performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply, and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License -may add an explicit geographical distribution limitation excluding those -countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms -of the ordinary General Public License). - - To apply these terms, attach the following notices to the library. -It is safest to attach them to the start of each source file to most -effectively convey the exclusion of warranty; and each file should -have at least the "copyright" line and a pointer to where the full -notice is found. - - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or -your school, if any, to sign a "copyright disclaimer" for the library, -if necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James - Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -valgrind -http://valgrind.org/ ------------------------------------------------------------------------ - Notice that the following BSD-style license applies to the Valgrind header - files used by Chromium (valgrind.h and memcheck.h). However, the rest of - Valgrind is licensed under the terms of the GNU General Public License, - version 2, unless otherwise indicated. - - ---------------------------------------------------------------- - - Copyright (C) 2000-2008 Julian Seward. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product - documentation would be appreciated but is not required. - - 3. Altered source versions must be plainly marked as such, and must - not be misrepresented as being the original software. - - 4. The name of the author may not be used to endorse or promote - products derived from this software without specific prior written - permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -woff2 -https://github.com/google/woff2 ------------------------------------------------------------------------ ---- See Apache License (A) at the end of this file --- - ---- See Apache License Appendix (A) at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -xdg-mime -http://freedesktop.org/ ------------------------------------------------------------------------ -Licensed under the Academic Free License version 2.0 (below) -Or under the following terms: - -This library is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2 of the License, or (at your option) any later version. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with this library; if not, write to the -Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. - - --------------------------------------------------------------------------------- -Academic Free License v. 2.0 --------------------------------------------------------------------------------- - -This Academic Free License (the "License") applies to any original work of -authorship (the "Original Work") whose owner (the "Licensor") has placed the -following notice immediately following the copyright notice for the Original -Work: - -Licensed under the Academic Free License version 2.0 -1) Grant of Copyright License. Licensor hereby grants You a world-wide, -royalty-free, non-exclusive, perpetual, sublicenseable license to do the -following: - -a) to reproduce the Original Work in copies; -b) to prepare derivative works ("Derivative Works") based upon the Original - Work; -c) to distribute copies of the Original Work and Derivative Works to the - public; -d) to perform the Original Work publicly; and -e) to display the Original Work publicly. - -2) Grant of Patent License. Licensor hereby grants You a world-wide, -royalty-free, non-exclusive, perpetual, sublicenseable license, under patent -claims owned or controlled by the Licensor that are embodied in the Original -Work as furnished by the Licensor, to make, use, sell and offer for sale the -Original Work and Derivative Works. - -3) Grant of Source Code License. The term "Source Code" means the preferred -form of the Original Work for making modifications to it and all available -documentation describing how to modify the Original Work. Licensor hereby -agrees to provide a machine-readable copy of the Source Code of the Original -Work along with each copy of the Original Work that Licensor distributes. -Licensor reserves the right to satisfy this obligation by placing a -machine-readable copy of the Source Code in an information repository -reasonably calculated to permit inexpensive and convenient access by You for as -long as Licensor continues to distribute the Original Work, and by publishing -the address of that information repository in a notice immediately following -the copyright notice that applies to the Original Work. - -4) Exclusions From License Grant. Neither the names of Licensor, nor the names -of any contributors to the Original Work, nor any of their trademarks or -service marks, may be used to endorse or promote products derived from this -Original Work without express prior written permission of the Licensor. Nothing -in this License shall be deemed to grant any rights to trademarks, copyrights, -patents, trade secrets or any other intellectual property of Licensor except as -expressly stated herein. No patent license is granted to make, use, sell or -offer to sell embodiments of any patent claims other than the licensed claims -defined in Section 2. No right is granted to the trademarks of Licensor even if -such marks are included in the Original Work. Nothing in this License shall be -interpreted to prohibit Licensor from licensing under different terms from this -License any Original Work that Licensor otherwise would have a right to -license. - -5) This section intentionally omitted. - -6) Attribution Rights. You must retain, in the Source Code of any Derivative -Works that You create, all copyright, patent or trademark notices from the -Source Code of the Original Work, as well as any notices of licensing and any -descriptive text identified therein as an "Attribution Notice." You must cause -the Source Code for any Derivative Works that You create to carry a prominent -Attribution Notice reasonably calculated to inform recipients that You have -modified the Original Work. - -7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that -the copyright in and to the Original Work and the patent rights granted herein -by Licensor are owned by the Licensor or are sublicensed to You under the terms -of this License with the permission of the contributor(s) of those copyrights -and patent rights. Except as expressly stated in the immediately proceeding -sentence, the Original Work is provided under this License on an "AS IS" BASIS -and WITHOUT WARRANTY, either express or implied, including, without limitation, -the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. -This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No -license to Original Work is granted hereunder except under this disclaimer. - -8) Limitation of Liability. Under no circumstances and under no legal theory, -whether in tort (including negligence), contract, or otherwise, shall the -Licensor be liable to any person for any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License -or the use of the Original Work including, without limitation, damages for loss -of goodwill, work stoppage, computer failure or malfunction, or any and all -other commercial damages or losses. This limitation of liability shall not -apply to liability for death or personal injury resulting from Licensor's -negligence to the extent applicable law prohibits such limitation. Some -jurisdictions do not allow the exclusion or limitation of incidental or -consequential damages, so this exclusion and limitation may not apply to You. - -9) Acceptance and Termination. If You distribute copies of the Original Work or -a Derivative Work, You must make a reasonable effort under the circumstances to -obtain the express assent of recipients to the terms of this License. Nothing -else but this License (or another written agreement between Licensor and You) -grants You permission to create Derivative Works based upon the Original Work -or to exercise any of the rights granted in Section 1 herein, and any attempt -to do so except under the terms of this License (or another written agreement -between Licensor and You) is expressly prohibited by U.S. copyright law, the -equivalent laws of other countries, and by international treaty. Therefore, by -exercising any of the rights granted to You in Section 1 herein, You indicate -Your acceptance of this License and all of its terms and conditions. - -10) Termination for Patent Action. This License shall terminate automatically -and You may no longer exercise any of the rights granted to You by this License -as of the date You commence an action, including a cross-claim or counterclaim, -for patent infringement (i) against Licensor with respect to a patent -applicable to software or (ii) against any entity with respect to a patent -applicable to the Original Work (but excluding combinations of the Original -Work with other software or hardware). - -11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this -License may be brought only in the courts of a jurisdiction wherein the -Licensor resides or in which Licensor conducts its primary business, and under -the laws of that jurisdiction excluding its conflict-of-law provisions. The -application of the United Nations Convention on Contracts for the International -Sale of Goods is expressly excluded. Any use of the Original Work outside the -scope of this License or after its termination shall be subject to the -requirements and penalties of the U.S. Copyright Act, 17 U.S.C. 101 et seq., -the equivalent laws of other countries, and international treaty. This section -shall survive the termination of this License. - -12) Attorneys Fees. In any action to enforce the terms of this License or -seeking damages relating thereto, the prevailing party shall be entitled to -recover its costs and expenses, including, without limitation, reasonable -attorneys' fees and costs incurred in connection with such action, including -any appeal of such action. This section shall survive the termination of this -License. - -13) Miscellaneous. This License represents the complete agreement concerning -the subject matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent necessary to -make it enforceable. - -14) Definition of "You" in This License. "You" throughout this License, whether -in upper or lower case, means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License. For legal -entities, "You" includes any entity that controls, is controlled by, or is -under common control with you. For purposes of this definition, "control" means -(i) the power, direct or indirect, to cause the direction or management of such -entity, whether by contract or otherwise, or (ii) ownership of fifty percent -(50%) or more of the outstanding shares, or (iii) beneficial ownership of such -entity. - -15) Right to Use. You may use the Original Work in all ways not otherwise -restricted or conditioned by this License or by law, and Licensor promises not -to interfere with or be responsible for such uses by You. - -This license is Copyright (C) 2003 Lawrence E. Rosen. All rights reserved. -Permission is hereby granted to copy and distribute this license without -modification. This license may not be modified without the express written -permission of its copyright owner. ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -xdg-user-dirs -http://www.freedesktop.org/wiki/Software/xdg-user-dirs ------------------------------------------------------------------------ -Copyright (c) 2007 Red Hat, inc - ---- See MIT License at the end of this file --- - ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -yasm -http://www.tortall.net/projects/yasm/ ------------------------------------------------------------------------ -Yasm is Copyright (c) 2001-2014 Peter Johnson and other Yasm developers. - -Yasm developers and/or contributors include: - Peter Johnson - Michael Urman - Brian Gladman (Visual Studio build files, other fixes) - Stanislav Karchebny (options parser) - Mathieu Monnier (SSE4 instruction patches, NASM preprocessor additions) - Anonymous "NASM64" developer (NASM preprocessor fixes) - Stephen Polkowski (x86 instruction patches) - Henryk Richter (Mach-O object format) - Ben Skeggs (patches, bug reports) - Alexei Svitkine (GAS preprocessor) - Samuel Thibault (TASM parser and frontend) - ------------------------------------ -Yasm licensing overview and summary ------------------------------------ - -Note: This document does not provide legal advice nor is it the actual -license of any part of Yasm. See the individual licenses for complete -details. Consult a lawyer for legal advice. - -The primary license of Yasm is the 2-clause BSD license. Please use this -license if you plan on submitting code to the project. - -Yasm has absolutely no warranty; not even for merchantibility or fitness -for a particular purpose. - -------- -Libyasm -------- -Libyasm is 2-clause or 3-clause BSD licensed, with the exception of -bitvect, which is triple-licensed under the Artistic license, GPL, and -LGPL. Libyasm is thus GPL and LGPL compatible. In addition, this also -means that libyasm is free for binary-only distribution as long as the -terms of the 3-clause BSD license and Artistic license (as it applies to -bitvect) are fulfilled. - -------- -Modules -------- -The modules are 2-clause or 3-clause BSD licensed. - ---------- -Frontends ---------- -The frontends are 2-clause BSD licensed. - -------------- -License Texts -------------- -The full text of all licenses are provided in separate files in the source -distribution. Each source file may include the entire license (in the case -of the BSD and Artistic licenses), or may reference the GPL or LGPL license -file. - -BSD.txt - 2-clause and 3-clause BSD licenses -Artistic.txt - Artistic license -GNU_GPL-2.0 - GNU General Public License -GNU_LGPL-2.0 - GNU Library General Public License ------------------------------------------------------------------------ - - ------------------------------------------------------------------------ -zlib -http://zlib.net/ ------------------------------------------------------------------------ -version 1.2.11, January 15th, 2017 - -Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. ------------------------------------------------------------------------ - - - - ------------------------------------------------------------------------ ------------------------------------------------------------------------ ------------------------------------------------------------------------ - - - ------------------------------------------------------------------------ ------------------------------------------------------------------------ -BSD License (A) ------------------------------------------------------------------------ ------------------------------------------------------------------------ -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors -may be used to endorse or promote products derived from this software without -specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - - ------------------------------------------------------------------------ ------------------------------------------------------------------------ -BSD License (Google) ------------------------------------------------------------------------ ------------------------------------------------------------------------ -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - - ------------------------------------------------------------------------ ------------------------------------------------------------------------ -ISC License ------------------------------------------------------------------------ ------------------------------------------------------------------------ -Permission to use, copy, modify, and distribute this software for any purpose -with or without fee is hereby granted, provided that the above copyright -notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -OR OTHER DEALINGS IN THE SOFTWARE. - - - - ------------------------------------------------------------------------ ------------------------------------------------------------------------ -MIT License ------------------------------------------------------------------------ ------------------------------------------------------------------------ -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - - ------------------------------------------------------------------------ ------------------------------------------------------------------------ -Apache License (A) ------------------------------------------------------------------------ ------------------------------------------------------------------------ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - - - ------------------------------------------------------------------------ ------------------------------------------------------------------------ -Apache License Appendix (A) ------------------------------------------------------------------------ ------------------------------------------------------------------------ - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - - ------------------------------------------------------------------------ ------------------------------------------------------------------------ -Mozilla Public License (A) ------------------------------------------------------------------------ ------------------------------------------------------------------------ -Mozilla Public License, version 2.0 - -1. Definitions - -1.1. "Contributor" - - means each individual or legal entity that creates, contributes to the - creation of, or owns Covered Software. - -1.2. "Contributor Version" - - means the combination of the Contributions of others (if any) used by a - Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - - means Source Code Form to which the initial Contributor has attached the - notice in Exhibit A, the Executable Form of such Source Code Form, and - Modifications of such Source Code Form, in each case including portions - thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - a. that the initial Contributor has attached the notice described in - Exhibit B to the Covered Software; or - - b. that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the terms of - a Secondary License. - -1.6. "Executable Form" - - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - - means a work that combines Covered Software with other material, in a - separate file or files, that is not Covered Software. - -1.8. "License" - - means this document. - -1.9. "Licensable" - - means having the right to grant, to the maximum extent possible, whether - at the time of the initial grant or subsequently, any and all of the - rights conveyed by this License. - -1.10. "Modifications" - - means any of the following: - - a. any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered Software; or - - b. any new file in Source Code Form that contains any Covered Software. - -1.11. "Patent Claims" of a Contributor - - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the License, - by the making, using, selling, offering for sale, having made, import, - or transfer of either its Contributions or its Contributor Version. - -1.12. "Secondary License" - - means either the GNU General Public License, Version 2.0, the GNU Lesser - General Public License, Version 2.1, the GNU Affero General Public - License, Version 3.0, or any later versions of those licenses. - -1.13. "Source Code Form" - - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that controls, is - controlled by, or is under common control with You. For purposes of this - definition, "control" means (a) the power, direct or indirect, to cause - the direction or management of such entity, whether by contract or - otherwise, or (b) ownership of more than fifty percent (50%) of the - outstanding shares or beneficial ownership of such entity. - - -2. License Grants and Conditions - -2.1. Grants - - Each Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - a. under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - - b. under Patent Claims of such Contributor to make, use, sell, offer for - sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - - The licenses granted in Section 2.1 with respect to any Contribution - become effective for each Contribution on the date the Contributor first - distributes such Contribution. - -2.3. Limitations on Grant Scope - - The licenses granted in this Section 2 are the only rights granted under - this License. No additional rights or licenses will be implied from the - distribution or licensing of Covered Software under this License. - Notwithstanding Section 2.1(b) above, no patent license is granted by a - Contributor: - - a. for any code that a Contributor has removed from Covered Software; or - - b. for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - - c. under Patent Claims infringed by Covered Software in the absence of - its Contributions. - - This License does not grant any rights in the trademarks, service marks, - or logos of any Contributor (except as may be necessary to comply with - the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - - No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this - License (see Section 10.2) or under the terms of a Secondary License (if - permitted under the terms of Section 3.3). - -2.5. Representation - - Each Contributor represents that the Contributor believes its - Contributions are its original creation(s) or it has sufficient rights to - grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - - This License is not intended to limit any rights You have under - applicable copyright doctrines of fair use, fair dealing, or other - equivalents. - -2.7. Conditions - - Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in - Section 2.1. - - -3. Responsibilities - -3.1. Distribution of Source Form - - All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under - the terms of this License. You must inform recipients that the Source - Code Form of the Covered Software is governed by the terms of this - License, and how they can obtain a copy of this License. You may not - attempt to alter or restrict the recipients' rights in the Source Code - Form. - -3.2. Distribution of Executable Form - - If You distribute Covered Software in Executable Form then: - - a. such Covered Software must also be made available in Source Code Form, - as described in Section 3.1, and You must inform recipients of the - Executable Form how they can obtain a copy of such Source Code Form by - reasonable means in a timely manner, at a charge no more than the cost - of distribution to the recipient; and - - b. You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter the - recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - - You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for - the Covered Software. If the Larger Work is a combination of Covered - Software with a work governed by one or more Secondary Licenses, and the - Covered Software is not Incompatible With Secondary Licenses, this - License permits You to additionally distribute such Covered Software - under the terms of such Secondary License(s), so that the recipient of - the Larger Work may, at their option, further distribute the Covered - Software under the terms of either this License or such Secondary - License(s). - -3.4. Notices - - You may not remove or alter the substance of any license notices - (including copyright notices, patent notices, disclaimers of warranty, or - limitations of liability) contained within the Source Code Form of the - Covered Software, except that You may alter any license notices to the - extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - - You may choose to offer, and to charge a fee for, warranty, support, - indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on - behalf of any Contributor. You must make it absolutely clear that any - such warranty, support, indemnity, or liability obligation is offered by - You alone, and You hereby agree to indemnify every Contributor for any - liability incurred by such Contributor as a result of warranty, support, - indemnity or liability terms You offer. You may include additional - disclaimers of warranty and limitations of liability specific to any - jurisdiction. - -4. Inability to Comply Due to Statute or Regulation - - If it is impossible for You to comply with any of the terms of this License - with respect to some or all of the Covered Software due to statute, - judicial order, or regulation then You must: (a) comply with the terms of - this License to the maximum extent possible; and (b) describe the - limitations and the code they affect. Such description must be placed in a - text file included with all distributions of the Covered Software under - this License. Except to the extent prohibited by statute or regulation, - such description must be sufficiently detailed for a recipient of ordinary - skill to be able to understand it. - -5. Termination - -5.1. The rights granted under this License will terminate automatically if You - fail to comply with any of its terms. However, if You become compliant, - then the rights granted under this License from a particular Contributor - are reinstated (a) provisionally, unless and until such Contributor - explicitly and finally terminates Your grants, and (b) on an ongoing - basis, if such Contributor fails to notify You of the non-compliance by - some reasonable means prior to 60 days after You have come back into - compliance. Moreover, Your grants from a particular Contributor are - reinstated on an ongoing basis if such Contributor notifies You of the - non-compliance by some reasonable means, this is the first time You have - received notice of non-compliance with this License from such - Contributor, and You become compliant prior to 30 days after Your receipt - of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, - counter-claims, and cross-claims) alleging that a Contributor Version - directly or indirectly infringes any patent, then the rights granted to - You by any and all Contributors for the Covered Software under Section - 2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user - license agreements (excluding distributors and resellers) which have been - validly granted by You or Your distributors under this License prior to - termination shall survive termination. - -6. Disclaimer of Warranty - - Covered Software is provided under this License on an "as is" basis, - without warranty of any kind, either expressed, implied, or statutory, - including, without limitation, warranties that the Covered Software is free - of defects, merchantable, fit for a particular purpose or non-infringing. - The entire risk as to the quality and performance of the Covered Software - is with You. Should any Covered Software prove defective in any respect, - You (not any Contributor) assume the cost of any necessary servicing, - repair, or correction. This disclaimer of warranty constitutes an essential - part of this License. No use of any Covered Software is authorized under - this License except under this disclaimer. - -7. Limitation of Liability - - Under no circumstances and under no legal theory, whether tort (including - negligence), contract, or otherwise, shall any Contributor, or anyone who - distributes Covered Software as permitted above, be liable to You for any - direct, indirect, special, incidental, or consequential damages of any - character including, without limitation, damages for lost profits, loss of - goodwill, work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses, even if such party shall have been - informed of the possibility of such damages. This limitation of liability - shall not apply to liability for death or personal injury resulting from - such party's negligence to the extent applicable law prohibits such - limitation. Some jurisdictions do not allow the exclusion or limitation of - incidental or consequential damages, so this exclusion and limitation may - not apply to You. - -8. Litigation - - Any litigation relating to this License may be brought only in the courts - of a jurisdiction where the defendant maintains its principal place of - business and such litigation shall be governed by laws of that - jurisdiction, without reference to its conflict-of-law provisions. Nothing - in this Section shall prevent a party's ability to bring cross-claims or - counter-claims. - -9. Miscellaneous - - This License represents the complete agreement concerning the subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. Any law or regulation which provides that - the language of a contract shall be construed against the drafter shall not - be used to construe this License against a Contributor. - - -10. Versions of the License - -10.1. New Versions - - Mozilla Foundation is the license steward. Except as provided in Section - 10.3, no one other than the license steward has the right to modify or - publish new versions of this License. Each version will be given a - distinguishing version number. - -10.2. Effect of New Versions - - You may distribute the Covered Software under the terms of the version - of the License under which You originally received the Covered Software, - or under the terms of any subsequent version published by the license - steward. - -10.3. Modified Versions - - If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a - modified version of this License if you rename the license and remove - any references to the name of the license steward (except to note that - such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary - Licenses If You choose to distribute Source Code Form that is - Incompatible With Secondary Licenses under the terms of this version of - the License, the notice described in Exhibit B of this License must be - attached. - -Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the - terms of the Mozilla Public License, v. - 2.0. If a copy of the MPL was not - distributed with this file, You can - obtain one at - http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular file, -then You may include the notice in a location (such as a LICENSE file in a -relevant directory) where a recipient would be likely to look for such a -notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice - - This Source Code Form is "Incompatible - With Secondary Licenses", as defined by - the Mozilla Public License, v. 2.0. - - - - ------------------------------------------------------------------------ ------------------------------------------------------------------------ -Mozilla Public License (B) ------------------------------------------------------------------------ ------------------------------------------------------------------------ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. - ---------------------------------------------------------- - - - - ------------------------------------------------------------------------ ------------------------------------------------------------------------ -GNU LESSER GENERAL PUBLIC LICENSE (A) ------------------------------------------------------------------------ ------------------------------------------------------------------------ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations -below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it -becomes a de-facto standard. To achieve this, non-free programs must -be allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control -compilation and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at least - three years, to give the same user the materials specified in - Subsection 6a, above, for a charge no more than the cost of - performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply, and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License -may add an explicit geographical distribution limitation excluding those -countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - - - ------------------------------------------------------------------------ ------------------------------------------------------------------------ -GNU LESSER GENERAL PUBLIC LICENSE (B) ------------------------------------------------------------------------ ------------------------------------------------------------------------ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - - - ------------------------------------------------------------------------ ------------------------------------------------------------------------ -GNU LESSER GENERAL PUBLIC LICENSE (C) ------------------------------------------------------------------------ ------------------------------------------------------------------------ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the -GNU General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this - license document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this - license document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of - this License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. - - - - ------------------------------------------------------------------------ ------------------------------------------------------------------------ -GNU LIBRARY GENERAL PUBLIC LICENSE (D) ------------------------------------------------------------------------ ------------------------------------------------------------------------ - GNU LIBRARY GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the library GPL. It is - numbered 2 because it goes with version 2 of the ordinary GPL.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Library General Public License, applies to some -specially designated Free Software Foundation software, and to any -other libraries whose authors decide to use it. You can use it for -your libraries, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if -you distribute copies of the library, or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide -complete object files to the recipients so that they can relink them -with the library, after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - Our method of protecting your rights has two steps: (1) copyright -the library, and (2) offer you this license which gives you legal -permission to copy, distribute and/or modify the library. - - Also, for each distributor's protection, we want to make certain -that everyone understands that there is no warranty for this free -library. If the library is modified by someone else and passed on, we -want its recipients to know that what they have is not the original -version, so that any problems introduced by others will not reflect on -the original authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that companies distributing free -software will individually obtain patent licenses, thus in effect -transforming the program into proprietary software. To prevent this, -we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - - Most GNU software, including some libraries, is covered by the ordinary -GNU General Public License, which was designed for utility programs. This -license, the GNU Library General Public License, applies to certain -designated libraries. This license is quite different from the ordinary -one; be sure to read it in full, and don't assume that anything in it is -the same as in the ordinary license. - - The reason we have a separate public license for some libraries is that -they blur the distinction we usually make between modifying or adding to a -program and simply using it. Linking a program with a library, without -changing the library, is in some sense simply using the library, and is -analogous to running a utility program or application program. However, in -a textual and legal sense, the linked executable is a combined work, a -derivative of the original library, and the ordinary General Public License -treats it as such. - - Because of this blurred distinction, using the ordinary General -Public License for libraries did not effectively promote software -sharing, because most developers did not use the libraries. We -concluded that weaker conditions might promote sharing better. - - However, unrestricted linking of non-free programs would deprive the -users of those programs of all benefit from the free status of the -libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while -preserving your freedom as a user of such programs to change the free -libraries that are incorporated in them. (We have not seen how to achieve -this as regards changes in header files, but we have achieved it as regards -changes in the actual functions of the Library.) The hope is that this -will lead to faster development of free libraries. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, while the latter only -works together with the library. - - Note that it is possible for a library to be covered by the ordinary -General Public License rather than by this special one. - - GNU LIBRARY GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library which -contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Library -General Public License (also called "this License"). Each licensee is -addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also compile or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - c) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - d) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the source code distributed need not include anything that is normally -distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Library General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - Appendix: How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - - - ------------------------------------------------------------------------ ------------------------------------------------------------------------ -The FreeType Project LICENSE ------------------------------------------------------------------------ ------------------------------------------------------------------------ - The FreeType Project LICENSE - ---------------------------- - - 2006-Jan-27 - - Copyright 1996-2002, 2006 by - David Turner, Robert Wilhelm, and Werner Lemberg - - - -Introduction -============ - - The FreeType Project is distributed in several archive packages; - some of them may contain, in addition to the FreeType font engine, - various tools and contributions which rely on, or relate to, the - FreeType Project. - - This license applies to all files found in such packages, and - which do not fall under their own explicit license. The license - affects thus the FreeType font engine, the test programs, - documentation and makefiles, at the very least. - - This license was inspired by the BSD, Artistic, and IJG - (Independent JPEG Group) licenses, which all encourage inclusion - and use of free software in commercial and freeware products - alike. As a consequence, its main points are that: - - o We don't promise that this software works. However, we will be - interested in any kind of bug reports. (`as is' distribution) - - o You can use this software for whatever you want, in parts or - full form, without having to pay us. (`royalty-free' usage) - - o You may not pretend that you wrote this software. If you use - it, or only parts of it, in a program, you must acknowledge - somewhere in your documentation that you have used the - FreeType code. (`credits') - - We specifically permit and encourage the inclusion of this - software, with or without modifications, in commercial products. - We disclaim all warranties covering The FreeType Project and - assume no liability related to The FreeType Project. - - - Finally, many people asked us for a preferred form for a - credit/disclaimer to use in compliance with this license. We thus - encourage you to use the following text: - - """ - Portions of this software are copyright (C) The FreeType - Project (www.freetype.org). All rights reserved. - """ - - Please replace with the value from the FreeType version you - actually use. - - -Legal Terms -=========== - -0. Definitions --------------- - - Throughout this license, the terms `package', `FreeType Project', - and `FreeType archive' refer to the set of files originally - distributed by the authors (David Turner, Robert Wilhelm, and - Werner Lemberg) as the `FreeType Project', be they named as alpha, - beta or final release. - - `You' refers to the licensee, or person using the project, where - `using' is a generic term including compiling the project's source - code as well as linking it to form a `program' or `executable'. - This program is referred to as `a program using the FreeType - engine'. - - This license applies to all files distributed in the original - FreeType Project, including all source code, binaries and - documentation, unless otherwise stated in the file in its - original, unmodified form as distributed in the original archive. - If you are unsure whether or not a particular file is covered by - this license, you must contact us to verify this. - - The FreeType Project is copyright (C) 1996-2000 by David Turner, - Robert Wilhelm, and Werner Lemberg. All rights reserved except as - specified below. - -1. No Warranty --------------- - - THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY - KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO - USE, OF THE FREETYPE PROJECT. - -2. Redistribution ------------------ - - This license grants a worldwide, royalty-free, perpetual and - irrevocable right and license to use, execute, perform, compile, - display, copy, create derivative works of, distribute and - sublicense the FreeType Project (in both source and object code - forms) and derivative works thereof for any purpose; and to - authorize others to exercise some or all of the rights granted - herein, subject to the following conditions: - - o Redistribution of source code must retain this license file - (`FTL.TXT') unaltered; any additions, deletions or changes to - the original files must be clearly indicated in accompanying - documentation. The copyright notices of the unaltered, - original files must be preserved in all copies of source - files. - - o Redistribution in binary form must provide a disclaimer that - states that the software is based in part of the work of the - FreeType Team, in the distribution documentation. We also - encourage you to put an URL to the FreeType web page in your - documentation, though this isn't mandatory. - - These conditions apply to any software derived from or based on - the FreeType Project, not just the unmodified files. If you use - our work, you must acknowledge us. However, no fee need be paid - to us. - -3. Advertising --------------- - - Neither the FreeType authors and contributors nor you shall use - the name of the other for commercial, advertising, or promotional - purposes without specific prior written permission. - - We suggest, but do not require, that you use one or more of the - following phrases to refer to this software in your documentation - or advertising materials: `FreeType Project', `FreeType Engine', - `FreeType library', or `FreeType Distribution'. - - As you have not signed this license, you are not required to - accept it. However, as the FreeType Project is copyrighted - material, only this license, or another one contracted with the - authors, grants you the right to use, distribute, and modify it. - Therefore, by using, distributing, or modifying the FreeType - Project, you indicate that you understand and accept all the terms - of this license. - -4. Contacts ------------ - - There are two mailing lists related to FreeType: - - o freetype@nongnu.org - - Discusses general use and applications of FreeType, as well as - future and wanted additions to the library and distribution. - If you are looking for support, start in this list if you - haven't found anything to help you in the documentation. - - o freetype-devel@nongnu.org - - Discusses bugs, as well as engine internals, design issues, - specific licenses, porting, etc. - - Our home page can be found at - - http://www.freetype.org - - - - diff --git a/SXElectricalInspection/Assets/ZFBrowser/ThirdPartyNotices.txt.meta b/SXElectricalInspection/Assets/ZFBrowser/ThirdPartyNotices.txt.meta deleted file mode 100644 index f4fbc4b0..00000000 --- a/SXElectricalInspection/Assets/ZFBrowser/ThirdPartyNotices.txt.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: fb7ca796644c46a469369a4ddec266c7 -timeCreated: 1449797752 -licenseType: Store -TextScriptImporter: - userData: - assetBundleName: - assetBundleVariant: