mono-uia-2.1/0000777000016200001670000000000011433571555013774 5ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationClient/0000777000016200001670000000000011433571554017510 5ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationClient/System.Windows.Automation.Text/0000777000016200001670000000000011433571554025467 5ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationClient/System.Windows.Automation.Text/TextPatternRange.cs0000644000016200001670000001074511433571545031260 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Brad Taylor // Mike Gorse // using System; using System.Runtime.InteropServices; using Mono.UIAutomation.Source; namespace System.Windows.Automation.Text { public class TextPatternRange { #region Private Fields private ITextPatternRange source; #endregion #region Public Properties public TextPattern TextPattern { get; private set; } internal ITextPatternRange Source { get { return source; } } #endregion #region Constructor private TextPatternRange () { } internal TextPatternRange (TextPattern textPattern, ITextPatternRange source) { TextPattern = textPattern; this.source = source; } #endregion #region Public Methods public void AddToSelection () { source.AddToSelection (); } public TextPatternRange Clone () { return new TextPatternRange (TextPattern, source.Clone ()); } public bool Compare (TextPatternRange range) { return source.Compare (range.Source); } public int CompareEndpoints (TextPatternRangeEndpoint endpoint, TextPatternRange targetRange, TextPatternRangeEndpoint targetEndpoint) { return source.CompareEndpoints (endpoint, targetRange.Source, targetEndpoint); } public void ExpandToEnclosingUnit (TextUnit unit) { source.ExpandToEnclosingUnit (unit); } public TextPatternRange FindAttribute (AutomationTextAttribute attribute, Object @value, bool backward) { ITextPatternRange range = source.FindAttribute (attribute, value, backward); if (range == null) return null; return new TextPatternRange (TextPattern, range); } public TextPatternRange FindText (string text, bool backward, bool ignoreCase) { ITextPatternRange range = source.FindText (text, backward, ignoreCase); if (range == null) return null; return new TextPatternRange (TextPattern, range); } public Object GetAttributeValue (AutomationTextAttribute attribute) { return source.GetAttributeValue (attribute); } public Rect[] GetBoundingRectangles () { return source.GetBoundingRectangles (); } public AutomationElement[] GetChildren () { return SourceManager.GetOrCreateAutomationElements (source.GetChildren ()); } public AutomationElement GetEnclosingElement () { return SourceManager.GetOrCreateAutomationElement (source.GetEnclosingElement ()); } public string GetText (int maxLength) { return source.GetText (maxLength); } public int Move (TextUnit unit, int count) { return source.Move (unit, count); } public void MoveEndpointByRange (TextPatternRangeEndpoint endpoint, TextPatternRange targetRange, TextPatternRangeEndpoint targetEndpoint) { source.MoveEndpointByRange (endpoint, targetRange.Source, targetEndpoint); } public int MoveEndpointByUnit (TextPatternRangeEndpoint endpoint, TextUnit unit, int count) { return source.MoveEndpointByUnit (endpoint, unit, count); } public void RemoveFromSelection () { source.RemoveFromSelection (); } public void ScrollIntoView (bool alignToTop) { source.ScrollIntoView (alignToTop); } public void Select () { source.Select (); } #endregion } } mono-uia-2.1/UIAutomationClient/Makefile.am0000644000016200001670000000722711433571545021550 0ustar00hudsonhudson00000000000000 EXTRA_DIST = ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_FLAGS = -lib:@expanded_libdir@/mono/2.0 -lib:../bin -lib:@expanded_libdir@/mono/accessibility -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" -d:NET_2_0 ASSEMBLY = ../bin/UIAutomationClient.dll ASSEMBLY_MDB = $(ASSEMBLY).mdb COMPILE_TARGET = library PROJECT_REFERENCES = \ ../bin/UIAutomationBridge.dll \ ../bin/UIAutomationTypes.dll \ ../bin/UIAutomationSource.dll \ ../bin/UIAutomationProvider.dll BUILD_DIR = ../bin PACKAGE_FLAG = /package accessibility UIAUTOMATIONCLIENT_DLL_MDB_SOURCE=../bin/UIAutomationClient.dll.mdb UIAUTOMATIONCLIENT_DLL_MDB=$(BUILD_DIR)/UIAutomationClient.dll.mdb AL=al2 SATELLITE_ASSEMBLY_NAME=Mono.UIAutomation.Client.resources.dll PROGRAMFILES = \ $(UIAUTOMATIONCLIENT_DLL_MDB) RESGEN=resgen2 all: $(ASSEMBLY) $(PROGRAMFILES) PROJECT_SOURCE_FILES = \ System.Windows.Automation.Text/TextPatternRange.cs \ System.Windows.Automation/AndCondition.cs \ System.Windows.Automation/Automation.cs \ System.Windows.Automation/AutomationElement.AutomationElementInformation.cs \ System.Windows.Automation/AutomationElement.cs \ System.Windows.Automation/AutomationElementCollection.cs \ System.Windows.Automation/AutomationElementMode.cs \ System.Windows.Automation/AutomationFocusChangedEventArgs.cs \ System.Windows.Automation/BasePattern.cs \ System.Windows.Automation/BoolCondition.cs \ System.Windows.Automation/CacheRequest.cs \ System.Windows.Automation/ClientSettings.cs \ System.Windows.Automation/ClientSideProviderDescription.cs \ System.Windows.Automation/Condition.cs \ System.Windows.Automation/DesktopElement.cs \ System.Windows.Automation/DockPattern.cs \ System.Windows.Automation/ExpandCollapsePattern.cs \ System.Windows.Automation/GridItemPattern.cs \ System.Windows.Automation/GridPattern.cs \ System.Windows.Automation/InvokePattern.cs \ System.Windows.Automation/MultipleViewPattern.cs \ System.Windows.Automation/NativeMethods.cs \ System.Windows.Automation/NotCondition.cs \ System.Windows.Automation/OrCondition.cs \ System.Windows.Automation/PropertyConditon.cs \ System.Windows.Automation/RangeValuePattern.cs \ System.Windows.Automation/ScrollItemPattern.cs \ System.Windows.Automation/ScrollPattern.cs \ System.Windows.Automation/SelectionItemPattern.cs \ System.Windows.Automation/SelectionPattern.cs \ System.Windows.Automation/SourceManager.cs \ System.Windows.Automation/TableItemPattern.cs \ System.Windows.Automation/TablePattern.cs \ System.Windows.Automation/TextPattern.cs \ System.Windows.Automation/TogglePattern.cs \ System.Windows.Automation/TransformPattern.cs \ System.Windows.Automation/TreeWalker.cs \ System.Windows.Automation/TreeWalker.TreeIterator.cs \ System.Windows.Automation/ValuePattern.cs \ System.Windows.Automation/WindowPattern.cs FILES = \ AssemblyInfo.cs \ ../build/common/*.cs \ $(PROJECT_SOURCE_FILES) DATA_FILES = RESOURCES = REFERENCES = \ WindowsBase \ System \ $(GTK_SHARP_20_LIBS) DLL_REFERENCES = CLEANFILES = $(PROGRAMFILES) install-data-local: gac-install uninstall-local: gac-uninstall include $(top_srcdir)/Makefile.include $(eval $(call emit_resgen_targets)) $(build_xamlg_list): %.xaml.g.cs: %.xaml xamlg '$<' $(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list) mkdir -p $(shell dirname $(ASSEMBLY)) $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) sn -q -R $(ASSEMBLY) $(top_srcdir)/mono.snk mono-uia-2.1/UIAutomationClient/AssemblyInfo.cs.in0000644000016200001670000000612211433571545023034 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Brad Taylor // using System; using System.Resources; using System.Reflection; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security; using System.Security.Permissions; // General Information about the UIAutomationClient assembly // v3.0 Assembly [assembly: AssemblyCompany (Consts.MonoCompany)] [assembly: AssemblyProduct (Consts.MonoProduct)] [assembly: AssemblyCopyright (Consts.MonoCopyright)] [assembly: AssemblyVersion (Consts.FxVersion)] [assembly: AssemblyFileVersion (Consts.WinFileVersion)] [assembly: NeutralResourcesLanguage ("en")] [assembly: CLSCompliant (true)] [assembly: AssemblyDelaySign (true)] [assembly: AssemblyKeyFile ("@abs_top_srcdir@/winfx3.pub")] [assembly: ComVisible (false)] [assembly: CompilationRelaxations (CompilationRelaxations.NoStringInterning)] [assembly: Debuggable (DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: RuntimeCompatibility (WrapNonExceptionThrows = true)] [assembly: PermissionSet (SecurityAction.RequestMinimum, Name = "FullTrust")] [assembly: InternalsVisibleTo ("UiaDbusSource, PublicKey=00240000048000009400000006020000002400005253413100040000110000004bb98b1af6c1df0df8c02c380e116b7a7f0c8c827aecfccddc6e29b7c754cd608b49dfcef4df9699ad182e50f66afa4e68dabc7b6aeeec0aa4719a5f8e0aae8c193080a706adc3443a8356b1f254142034995532ac176398e12a30f6a74a119a89ac47672c9ae24d7e90de686557166e3b873cd707884431a0451d9d6f7fe795")] [assembly: InternalsVisibleTo ("AtspiUiaSource, PublicKey=00240000048000009400000006020000002400005253413100040000110000004bb98b1af6c1df0df8c02c380e116b7a7f0c8c827aecfccddc6e29b7c754cd608b49dfcef4df9699ad182e50f66afa4e68dabc7b6aeeec0aa4719a5f8e0aae8c193080a706adc3443a8356b1f254142034995532ac176398e12a30f6a74a119a89ac47672c9ae24d7e90de686557166e3b873cd707884431a0451d9d6f7fe795")] [assembly: SecurityPermission (SecurityAction.RequestMinimum, SkipVerification = true)] mono-uia-2.1/UIAutomationClient/AssemblyInfo.cs0000644000016200001670000000617711433571553022440 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Brad Taylor // using System; using System.Resources; using System.Reflection; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security; using System.Security.Permissions; // General Information about the UIAutomationClient assembly // v3.0 Assembly [assembly: AssemblyCompany (Consts.MonoCompany)] [assembly: AssemblyProduct (Consts.MonoProduct)] [assembly: AssemblyCopyright (Consts.MonoCopyright)] [assembly: AssemblyVersion (Consts.FxVersion)] [assembly: AssemblyFileVersion (Consts.WinFileVersion)] [assembly: NeutralResourcesLanguage ("en")] [assembly: CLSCompliant (true)] [assembly: AssemblyDelaySign (true)] [assembly: AssemblyKeyFile ("/var/lib/hudson/jobs/_uia_tag_tarballs/workspace/UIAutomation/winfx3.pub")] [assembly: ComVisible (false)] [assembly: CompilationRelaxations (CompilationRelaxations.NoStringInterning)] [assembly: Debuggable (DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: RuntimeCompatibility (WrapNonExceptionThrows = true)] [assembly: PermissionSet (SecurityAction.RequestMinimum, Name = "FullTrust")] [assembly: InternalsVisibleTo ("UiaDbusSource, PublicKey=00240000048000009400000006020000002400005253413100040000110000004bb98b1af6c1df0df8c02c380e116b7a7f0c8c827aecfccddc6e29b7c754cd608b49dfcef4df9699ad182e50f66afa4e68dabc7b6aeeec0aa4719a5f8e0aae8c193080a706adc3443a8356b1f254142034995532ac176398e12a30f6a74a119a89ac47672c9ae24d7e90de686557166e3b873cd707884431a0451d9d6f7fe795")] [assembly: InternalsVisibleTo ("AtspiUiaSource, PublicKey=00240000048000009400000006020000002400005253413100040000110000004bb98b1af6c1df0df8c02c380e116b7a7f0c8c827aecfccddc6e29b7c754cd608b49dfcef4df9699ad182e50f66afa4e68dabc7b6aeeec0aa4719a5f8e0aae8c193080a706adc3443a8356b1f254142034995532ac176398e12a30f6a74a119a89ac47672c9ae24d7e90de686557166e3b873cd707884431a0451d9d6f7fe795")] [assembly: SecurityPermission (SecurityAction.RequestMinimum, SkipVerification = true)] mono-uia-2.1/UIAutomationClient/System.Windows.Automation/0000777000016200001670000000000011433571554024544 5ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationClient/System.Windows.Automation/NativeMethods.cs0000644000016200001670000001163311433571545027645 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Matt Guo // using System; using System.Collections.Generic; using System.Runtime.InteropServices; using Mono.UIAutomation.Services; namespace System.Windows.Automation { internal class NativeMethods { static NativeMethods() { string [] args = new string [0]; Gdk.Global.InitCheck (ref args); } private static bool IsWindowsSys { get { PlatformID os = Environment.OSVersion.Platform; return (os == PlatformID.Win32Windows || os == PlatformID.Win32NT || os == PlatformID.Win32S || os == PlatformID.WinCE); } } private static IntPtr [] GetChildWindowHandles (IntPtr rootWin) { IntPtr rootReturn; IntPtr parentReturn; IntPtr childrenReturn; int childrenReturnCount; try { IntPtr dpy = gdk_x11_display_get_xdisplay (Gdk.Display.Default.Handle); if (XQueryTree (dpy, rootWin, out rootReturn, out parentReturn, out childrenReturn, out childrenReturnCount) == 0) return new IntPtr [0]; IntPtr [] children = new IntPtr [childrenReturnCount]; if (childrenReturnCount > 0) Marshal.Copy (childrenReturn, children, 0, childrenReturnCount); return children; } catch (Exception ex) { Log.Error ("Error, probably due to calling GDK or XQueryTree: {0}", ex.Message); return new IntPtr [0]; } } private static IntPtr ChildWindowAtPosition (IntPtr root, int px, int py, bool checkRoot) { if (checkRoot) { var rootWin = Gdk.Window.ForeignNew ((uint) root.ToInt32()); if (!rootWin.IsViewable) return IntPtr.Zero; int x, y, w, h; rootWin.GetOrigin (out x, out y); rootWin.GetSize (out w, out h); if (x > px || x + w < px || y > py || y + h < py) return IntPtr.Zero; } foreach (var child in GetChildWindowHandles (root)) { var ret = ChildWindowAtPosition (child, px, py, true); if (ret != IntPtr.Zero) return ret; } return root; } public static void GetScreenBound (out int width, out int height) { var screen = Gdk.Screen.Default; width = screen.Width; height = screen.Height; } public static IntPtr WindowAtPosition (int px, int py) { var startHandle = IntPtr.Zero; var topWin = TopWindowAtPosition (px, py); if (topWin != null) startHandle = GetWindowHandle (topWin); if (startHandle == IntPtr.Zero) startHandle = RootWindowHandle; return ChildWindowAtPosition (startHandle, px, py, false); } public static Gdk.Window TopWindowAtPosition (int px, int py) { var windowStack = Gdk.Screen.Default.WindowStack; Gdk.Window ret = null; foreach (Gdk.Window win in windowStack) { //The latter item in "windowStack" has higher z-order if (win.IsViewable && win.FrameExtents.Contains (px, py)) ret = win; } return ret; } public static IntPtr GetWindowHandle (Gdk.Window win) { if (win == null) return IntPtr.Zero; try { if (IsWindowsSys) return gdk_win32_drawable_get_handle (win.Handle); else return gdk_x11_drawable_get_xid (win.Handle); } catch (Exception ex) { Log.Error ("Error calling libgdk: {0}", ex.Message); return IntPtr.Zero; } } public static IntPtr RootWindowHandle { get { return GetWindowHandle (Gdk.Screen.Default.RootWindow); } } [DllImport ("libgdk-x11-2.0.so.0")] internal static extern IntPtr gdk_x11_drawable_get_xid (IntPtr handle); [DllImport ("libgdk-win32-2.0-0.dll")] internal static extern IntPtr gdk_win32_drawable_get_handle (IntPtr handle); [DllImport ("libgdk-x11-2.0.so.0")] internal static extern IntPtr gdk_x11_display_get_xdisplay (IntPtr handle); [DllImport("libX11.so")] private static extern int XQueryTree(IntPtr display, IntPtr w, out IntPtr rootReturn, out IntPtr parentReturn, out IntPtr childrenReturn, out int childrenReturnCount); } }mono-uia-2.1/UIAutomationClient/System.Windows.Automation/BoolCondition.cs0000644000016200001670000000274411433571545027640 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; namespace System.Windows.Automation { internal class BoolCondition : Condition { private bool val; internal BoolCondition (bool val) { this.val = val; } internal override bool AppliesTo (AutomationElement element) { return val; } } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/AutomationFocusChangedEventArgs.cs0000644000016200001670000000353711433571545033310 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; namespace System.Windows.Automation { public delegate void AutomationFocusChangedEventHandler (Object sender, AutomationFocusChangedEventArgs e); public class AutomationFocusChangedEventArgs : AutomationEventArgs { int idObject; int idChild; public AutomationFocusChangedEventArgs (int idObject, int idChild) : base (AutomationElementIdentifiers.AutomationFocusChangedEvent) { this.idObject = idObject; this.idChild = idChild; } public int ObjectId { get { return idObject; } } public int ChildId { get { return idChild; } } } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/TableItemPattern.cs0000644000016200001670000000741011433571545030275 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // Mike Gorse // using System; using Mono.UIAutomation.Source; namespace System.Windows.Automation { public class TableItemPattern : GridItemPattern { public struct TableItemPatternInformation { private bool cache; private TableItemPattern pattern; internal TableItemPatternInformation (TableItemPattern pattern, bool cache) { this.pattern = pattern; this.cache = cache; } public int Row { get { return (int) pattern.element.GetPropertyValue (RowProperty, cache); } } public int Column { get { return (int) pattern.element.GetPropertyValue (ColumnProperty, cache); } } public int RowSpan { get { return (int) pattern.element.GetPropertyValue (RowSpanProperty, cache); } } public int ColumnSpan { get { return (int) pattern.element.GetPropertyValue (ColumnSpanProperty, cache); } } public AutomationElement ContainingGrid { get { return (AutomationElement) pattern.element.GetPropertyValue (ContainingGridProperty, cache); } } public AutomationElement [] GetRowHeaderItems () { return (AutomationElement []) pattern.element.GetPropertyValue (RowHeaderItemsProperty, cache); } public AutomationElement [] GetColumnHeaderItems () { return (AutomationElement []) pattern.element.GetPropertyValue (ColumnHeaderItemsProperty, cache); } } private AutomationElement element; private bool cached; private TableItemPatternInformation currentInfo; private TableItemPatternInformation cachedInfo; internal TableItemPattern () { } internal TableItemPattern (ITableItemPattern source, AutomationElement element, bool cached) { this.element = element; this.cached = cached; this.Source = source; currentInfo = new TableItemPatternInformation (this, false); if (cached) cachedInfo = new TableItemPatternInformation (this, true); } internal new ITableItemPattern Source { get; private set; } public new TableItemPatternInformation Cached { get { if (!cached) throw new InvalidOperationException ("Cannot request a property or pattern that is not cached"); return cachedInfo; } } public new TableItemPatternInformation Current { get { return currentInfo; } } public new static readonly AutomationPattern Pattern = TableItemPatternIdentifiers.Pattern; public static readonly AutomationProperty RowHeaderItemsProperty = TableItemPatternIdentifiers.RowHeaderItemsProperty; public static readonly AutomationProperty ColumnHeaderItemsProperty = TableItemPatternIdentifiers.ColumnHeaderItemsProperty; } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/TreeWalker.TreeIterator.cs0000644000016200001670000002503611433571545031552 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using System.Collections.Generic; using Mono.UIAutomation.Source; using Mono.UIAutomation.Services; namespace System.Windows.Automation { public sealed partial class TreeWalker { private class TreeIterator { #region Private Fields private List markedElements; private Condition condition; #endregion #region Constructor public TreeIterator (Condition condition) { this.condition = condition; markedElements = new List (); } #endregion #region Private Direct Navigation Methods private AutomationElement GetFirstDirectChild (AutomationElement element) { AutomationElement firstChild = null; if (element == AutomationElement.RootElement) lock (TreeWalker.RawViewWalker.directChildrenLock) { firstChild = TreeWalker.RawViewWalker.directChildren.Count > 0 ? TreeWalker.RawViewWalker.directChildren [0] : null; } else firstChild = SourceManager.GetOrCreateAutomationElement (element.SourceElement.FirstChild); return firstChild; } private AutomationElement GetLastDirectChild (AutomationElement element) { AutomationElement lastChild = null; if (element == AutomationElement.RootElement) lock (TreeWalker.RawViewWalker.directChildrenLock) { lastChild = TreeWalker.RawViewWalker.directChildren.Count > 0 ? TreeWalker.RawViewWalker.directChildren [TreeWalker.RawViewWalker.directChildren.Count - 1] : null; } else lastChild = SourceManager.GetOrCreateAutomationElement (element.SourceElement.LastChild); return lastChild; } private AutomationElement GetNextDirectSibling (AutomationElement element) { AutomationElement parent = TreeWalker.RawViewWalker.GetParent (element); AutomationElement nextSibling = null; if (parent == AutomationElement.RootElement) lock (TreeWalker.RawViewWalker.directChildrenLock) { int nextIndex = TreeWalker.RawViewWalker.directChildren.IndexOf (element) + 1; if (nextIndex > -1 && nextIndex < TreeWalker.RawViewWalker.directChildren.Count) nextSibling = TreeWalker.RawViewWalker.directChildren [nextIndex]; else nextSibling = null; } else nextSibling = SourceManager.GetOrCreateAutomationElement (element.SourceElement.NextSibling); return nextSibling; } private AutomationElement GetPreviousDirectSibling (AutomationElement element) { AutomationElement parent = TreeWalker.RawViewWalker.GetParent (element); AutomationElement prevSibling = null; if (parent == AutomationElement.RootElement) lock (TreeWalker.RawViewWalker.directChildrenLock) { int prevIndex = TreeWalker.RawViewWalker.directChildren.IndexOf (element) - 1; if (prevIndex > -1) prevSibling = TreeWalker.RawViewWalker.directChildren [prevIndex]; else prevSibling = null; } else prevSibling = SourceManager.GetOrCreateAutomationElement (element.SourceElement.PreviousSibling); return prevSibling; } #endregion #region Private Utility Methods private void AddMarkedElement (AutomationElement element) { markedElements.Add (element); } /// /// Iterate to the first matching child of an element /// *after* the specified child. /// /// /// The element whose children should be iterated. /// /// /// The direct child of /// after which to iterate, or null if the absolute first /// matching child is desired. /// /// /// The first matching /// after . /// private AutomationElement GetFirstChild (AutomationElement element, AutomationElement afterThisChild) { if (element == null) throw new ArgumentNullException ("element"); AddMarkedElement (element); AutomationElement child; if (afterThisChild == null) child = GetFirstDirectChild (element); else child = GetNextDirectSibling (afterThisChild); while (child != null && markedElements.Contains (child)) child = GetNextDirectSibling (child); if (child == null || markedElements.Contains (child)) return null; AutomationElement firstChild = null; if (!markedElements.Contains (child) && condition.AppliesTo (child)) firstChild = child; else { firstChild = GetFirstChild (child); } while (firstChild == null && child != null) { child = GetNextDirectSibling (child); if (child == null) return null; firstChild = GetFirstChild (child); } return firstChild; } /// /// Iterate to the last matching child of an element /// *before* the specified child. /// /// /// The element whose children should be iterated. /// /// /// The direct child of /// before which to iterate, or null if the absolute last /// matching child is desired. /// /// /// The last matching /// before . /// private AutomationElement GetLastChild (AutomationElement element, AutomationElement beforeThisChild) { if (element == null) throw new ArgumentNullException ("element"); AddMarkedElement (element); AutomationElement child; if (beforeThisChild == null) child = GetLastDirectChild (element); else child = GetPreviousDirectSibling (beforeThisChild); while (child != null && markedElements.Contains (child)) child = GetPreviousDirectSibling (child); if (child == null || markedElements.Contains (child)) return null; AutomationElement lastChild = null; if (!markedElements.Contains (child) && condition.AppliesTo (child)) lastChild = child; else { lastChild = GetLastChild (child); } while (lastChild == null && child != null) { child = GetPreviousDirectSibling (child); if (child == null) return null; lastChild = GetLastChild (child); } return lastChild; } #endregion #region Public Methods public AutomationElement GetParent (AutomationElement element) { if (element == null) throw new ArgumentNullException ("element"); else if (element == AutomationElement.RootElement) return null; AutomationElement ancestor = SourceManager.GetOrCreateAutomationElement (element.SourceElement.Parent); lock (TreeWalker.RawViewWalker.directChildrenLock) if (ancestor == null && RawViewWalker.directChildren.Contains (element)) ancestor = SourceManager.GetOrCreateAutomationElement (AutomationElement.RootElement.SourceElement); if (ancestor != null && !condition.AppliesTo (ancestor)) return GetParent (ancestor); return ancestor; } public AutomationElement GetFirstChild (AutomationElement element) { return GetFirstChild (element, null); } public AutomationElement GetLastChild (AutomationElement element) { return GetLastChild (element, null); } public AutomationElement GetNextSibling (AutomationElement element) { if (element == null) throw new ArgumentNullException ("element"); if (element == AutomationElement.RootElement) return null; AddMarkedElement (element); AutomationElement sibling = GetNextDirectSibling (element); AutomationElement previousParent = null; if (sibling == null && condition != Automation.RawViewCondition) { previousParent = TreeWalker.RawViewWalker.GetParent (element); markedElements.Add (previousParent); sibling = TreeWalker.RawViewWalker.GetParent (previousParent); } if (sibling == null) return null; AutomationElement nextSibling = null; if (!markedElements.Contains (sibling) && condition.AppliesTo (sibling)) nextSibling = sibling; else { while (sibling != null && nextSibling == null && sibling != AutomationElement.RootElement) { nextSibling = GetFirstChild (sibling, previousParent); previousParent = sibling; sibling = TreeWalker.RawViewWalker.GetParent (sibling); } } return nextSibling; } public AutomationElement GetPreviousSibling (AutomationElement element) { if (element == null) throw new ArgumentNullException ("element"); if (element == AutomationElement.RootElement) return null; AddMarkedElement (element); AutomationElement sibling = GetPreviousDirectSibling (element); AutomationElement previousParent = null; if (sibling == null && condition != Automation.RawViewCondition) { previousParent = TreeWalker.RawViewWalker.GetParent (element); markedElements.Add (previousParent); sibling = TreeWalker.RawViewWalker.GetParent (previousParent); } if (sibling == null) return null; AutomationElement prevSibling = null; if (!markedElements.Contains (sibling) && condition.AppliesTo (sibling)) prevSibling = sibling; else { while (sibling != null && prevSibling == null && sibling != AutomationElement.RootElement) { prevSibling = GetLastChild (sibling, previousParent); previousParent = sibling; sibling = TreeWalker.RawViewWalker.GetParent (sibling); } } return prevSibling; } #endregion } } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/TreeWalker.cs0000644000016200001670000002143011433571545027134 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using System.Linq; using System.Collections.Generic; using Mono.UIAutomation.Source; using Mono.UIAutomation.Services; namespace System.Windows.Automation { public sealed partial class TreeWalker { #region Private Fields private Object directChildrenLock = new Object (); private List directChildren; #endregion #region Static Constructor static TreeWalker () { RawViewWalker = new TreeWalker (Automation.RawViewCondition); InitializeRootElements (); ControlViewWalker = new TreeWalker (Automation.ControlViewCondition); ContentViewWalker = new TreeWalker (Automation.ContentViewCondition); } #endregion #region Public Constructor public TreeWalker (Condition condition) { if (condition == null) throw new ArgumentNullException ("condition"); Condition = condition; } #endregion #region Private Static Methods private static void InitializeRootElements () { lock (RawViewWalker.directChildrenLock) { var pidElementMapping = new Dictionary (); RawViewWalker.directChildren = new List (); foreach (IAutomationSource source in SourceManager.GetAutomationSources ()) { AddUniqueRootElements (RawViewWalker.directChildren, source, pidElementMapping); source.RootElementsChanged += (s, e) => OnSourceRootElementChanged (source); } } } private static void OnSourceRootElementChanged (IAutomationSource source) { lock (RawViewWalker.directChildrenLock) { List rootElements = new List (); var pidElementMapping = new Dictionary (); foreach (AutomationElement element in RawViewWalker.directChildren) { if (element.SourceElement.AutomationSource != source) { try { pidElementMapping [element.Current.ProcessId] = element.SourceElement; } catch { continue; } // TODO: ElementNotAvailableException rootElements.Add (element); } } // We don't handle the cleanup of AutomationElements here, they're // handled by each AutomationSource. // "Clean up" includes removing event handlers etc. AddUniqueRootElements (rootElements, source, pidElementMapping); RawViewWalker.directChildren = rootElements; } Log.Debug ("Root elements are refreshed, Count: {0}", RawViewWalker.directChildren.Count); } // TODO: This approach will completely break when the // MoonUiaDbusBridge work is committed. This code // will be replaced with proper source tree merging, // which requires updates to gtk-sharp. private static void AddUniqueRootElements (List rootElements, IAutomationSource source, Dictionary pidElementMapping) { const string at_spi = "at-spi"; foreach (IElement sourceElement in source.GetRootElements ()) { int pid; try { pid = sourceElement.ProcessId; } catch { continue; } // TODO: ElementNotAvailableException IElement found; // NOTE: This is not a complete mapping, since // one process could generate multiple root // elements. But it's sufficient to catch // that at least one element exists for // a given PID. if (pidElementMapping.TryGetValue (pid, out found)) { var sourceFid = sourceElement.FrameworkId; var foundFid = found.FrameworkId; // Ignore at-spi elements when elements // for this process from a preferred // framework exist if (sourceFid == at_spi && foundFid != at_spi) continue; // Remove at-spi elements when elements // for this process from a preferred // framework exist else if (sourceFid != at_spi && foundFid == at_spi) { // TODO: When we fix ElementNotAvailableException, // we'll need to mark these // elements as unavailable. rootElements.RemoveAll (e => e.Current.ProcessId == pid && e.Current.FrameworkId == at_spi); } } rootElements.Add ( SourceManager.GetOrCreateAutomationElement (sourceElement)); pidElementMapping [pid] = sourceElement; } } #endregion #region Public Methods public AutomationElement GetParent (AutomationElement element) { return new TreeIterator (Condition).GetParent (element); } public AutomationElement GetFirstChild (AutomationElement element) { return new TreeIterator (Condition).GetFirstChild (element); } public AutomationElement GetLastChild (AutomationElement element) { return new TreeIterator (Condition).GetLastChild (element); } public AutomationElement GetNextSibling (AutomationElement element) { return new TreeIterator (Condition).GetNextSibling (element); } public AutomationElement GetPreviousSibling (AutomationElement element) { return new TreeIterator (Condition).GetPreviousSibling (element); } public AutomationElement Normalize (AutomationElement element) { if (element == null) throw new ArgumentNullException ("element"); if (Condition.AppliesTo (element)) return element; if (element == AutomationElement.RootElement) // LAMESPEC: This is according to MSDN: // http://msdn.microsoft.com/en-us/library/system.windows.automation.treewalker.normalize.aspx // return element; // This is matching Microsoft's actual implementation: return null; return Normalize (RawViewWalker.GetParent (element)); } public AutomationElement GetParent (AutomationElement element, CacheRequest request) { if (request == null) throw new ArgumentNullException ("request"); var result = GetParent (element); if (result != null) return result.GetUpdatedCache (request); return result; } public AutomationElement GetFirstChild (AutomationElement element, CacheRequest request) { if (request == null) throw new ArgumentNullException ("request"); var result = GetFirstChild (element); if (result != null) return result.GetUpdatedCache (request); return result; } public AutomationElement GetLastChild (AutomationElement element, CacheRequest request) { if (request == null) throw new ArgumentNullException ("request"); var result = GetLastChild (element); if (result != null) return result.GetUpdatedCache (request); return result; } public AutomationElement GetNextSibling (AutomationElement element, CacheRequest request) { if (request == null) throw new ArgumentNullException ("request"); var result = GetNextSibling (element); if (result != null) return result.GetUpdatedCache (request); return result; } public AutomationElement GetPreviousSibling (AutomationElement element, CacheRequest request) { if (request == null) throw new ArgumentNullException ("request"); var result = GetPreviousSibling (element); if (result != null) return result.GetUpdatedCache (request); return result; } public AutomationElement Normalize (AutomationElement element, CacheRequest request) { if (request == null) throw new ArgumentNullException ("request"); var result = Normalize (element); if (result != null) return result.GetUpdatedCache (request); return result; } #endregion #region Public Properties public Condition Condition { get; private set; } #endregion #region Public Static Fields public static readonly TreeWalker RawViewWalker; public static readonly TreeWalker ControlViewWalker; public static readonly TreeWalker ContentViewWalker; #endregion } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/AutomationElementCollection.cs0000644000016200001670000000460611433571545032543 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Brad Taylor // Sandy Armstrong // using System; using System.Collections; using System.Collections.Generic; namespace System.Windows.Automation { public class AutomationElementCollection : ICollection, IEnumerable { #region Private Fields private List elements; #endregion #region Public Properties public int Count { get { return elements.Count; } } public virtual bool IsSynchronized { get { return ((ICollection) elements).IsSynchronized; } } public AutomationElement this [int index] { get { return elements [index]; } } public virtual object SyncRoot { get { return ((ICollection) elements).SyncRoot; } } #endregion #region Constructor internal AutomationElementCollection (IEnumerable elements) { this.elements = new List (elements); } #endregion #region Public Methods public virtual void CopyTo (Array array, int index) { ((ICollection) elements).CopyTo (array, index); } public void CopyTo (AutomationElement[] array, int index) { elements.CopyTo (array, index); } public IEnumerator GetEnumerator () { return elements.GetEnumerator (); } #endregion } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/AutomationElementMode.cs0000644000016200001670000000246411433571545031334 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Brad Taylor // using System; namespace System.Windows.Automation { public enum AutomationElementMode { None, Full } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/ScrollPattern.cs0000644000016200001670000001132011433571545027660 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // Mike Gorse // using System; using Mono.UIAutomation.Source; namespace System.Windows.Automation { public class ScrollPattern : BasePattern { public struct ScrollPatternInformation { private bool cache; private ScrollPattern pattern; internal ScrollPatternInformation (ScrollPattern pattern, bool cache) { this.pattern = pattern; this.cache = cache; } public double HorizontalScrollPercent { get { return (double) pattern.element.GetPropertyValue (HorizontalScrollPercentProperty, cache); } } public double VerticalScrollPercent { get { return (double) pattern.element.GetPropertyValue (VerticalScrollPercentProperty, cache); } } public double HorizontalViewSize { get { return (double) pattern.element.GetPropertyValue (HorizontalViewSizeProperty, cache); } } public double VerticalViewSize { get { return (double) pattern.element.GetPropertyValue (VerticalViewSizeProperty, cache); } } public bool HorizontallyScrollable { get { return (bool) pattern.element.GetPropertyValue (HorizontallyScrollableProperty, cache); } } public bool VerticallyScrollable { get { return (bool) pattern.element.GetPropertyValue (VerticallyScrollableProperty, cache); } } } private AutomationElement element; private bool cached; private ScrollPatternInformation currentInfo; private ScrollPatternInformation cachedInfo; internal ScrollPattern () { } internal ScrollPattern (IScrollPattern source, AutomationElement element, bool cached) { this.element = element; this.cached = cached; this.Source = source; currentInfo = new ScrollPatternInformation (this, false); if (cached) cachedInfo = new ScrollPatternInformation (this, true); } internal IScrollPattern Source { get; private set; } public ScrollPatternInformation Cached { get { if (!cached) throw new InvalidOperationException ("Cannot request a property or pattern that is not cached"); return cachedInfo; } } public ScrollPatternInformation Current { get { return currentInfo; } } public void SetScrollPercent (double horizontalPercent, double verticalPercent) { Source.SetScrollPercent (horizontalPercent, verticalPercent); } public void Scroll (ScrollAmount horizontalAmount, ScrollAmount verticalAmount) { Source.Scroll (horizontalAmount, verticalAmount); } public void ScrollHorizontal (ScrollAmount amount) { Source.Scroll (amount, ScrollAmount.NoAmount); } public void ScrollVertical (ScrollAmount amount) { Source.Scroll (ScrollAmount.NoAmount, amount); } public static readonly AutomationPattern Pattern = ScrollPatternIdentifiers.Pattern; public static readonly AutomationProperty HorizontalScrollPercentProperty = ScrollPatternIdentifiers.HorizontalScrollPercentProperty; public static readonly AutomationProperty VerticalScrollPercentProperty = ScrollPatternIdentifiers.VerticalScrollPercentProperty; public static readonly AutomationProperty HorizontalViewSizeProperty = ScrollPatternIdentifiers.HorizontalViewSizeProperty; public static readonly AutomationProperty VerticalViewSizeProperty = ScrollPatternIdentifiers.VerticalViewSizeProperty; public static readonly AutomationProperty HorizontallyScrollableProperty = ScrollPatternIdentifiers.HorizontallyScrollableProperty; public static readonly AutomationProperty VerticallyScrollableProperty = ScrollPatternIdentifiers.VerticallyScrollableProperty; public const double NoScroll = -1; } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/CacheRequest.cs0000644000016200001670000001425011433571545027445 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Brad Taylor // using System; using System.Collections.Generic; using System.Threading; namespace System.Windows.Automation { public sealed class CacheRequest { #region Private Fields private List disposables = new List (); private List cachedPatterns = new List (); private List cachedProperties = new List (); private AutomationElementMode mode; private Condition treeFilter; private TreeScope scope; #endregion #region Public Properties public AutomationElementMode AutomationElementMode { get { return mode; } set { if (IsContainedInAnyThreadStack ()) throw new InvalidOperationException ("Cannot modify a CacheRequest that is already on the stack"); mode = value; } } public Condition TreeFilter { get { return treeFilter; } set { if (IsContainedInAnyThreadStack ()) throw new InvalidOperationException ("Cannot modify a CacheRequest that is already on the stack"); treeFilter = value; } } public TreeScope TreeScope { get { return scope; } set { if ((value & TreeScope.Ancestors) == TreeScope.Ancestors || (value & TreeScope.Parent) == TreeScope.Parent) throw new ArgumentException ("TreeScope.Ancestors and TreeScope.Parent are invalid for CacheRequest.TreeScope"); if (IsContainedInAnyThreadStack ()) throw new InvalidOperationException ("Cannot modify a CacheRequest that is already on the stack"); scope = value; } } #endregion #region Public Static Properties public static CacheRequest Current { get { var requestStack = GetCurrentStack (); return requestStack.Peek (); // NOTE: We guarantee non-empty stack } } #endregion #region Internal Properties internal IList CachedProperties { get { return cachedProperties; } } internal IList CachedPatterns { get { return cachedPatterns; } } #endregion #region Constructor public CacheRequest () { mode = AutomationElementMode.Full; treeFilter = Automation.ControlViewCondition; scope = TreeScope.Element; } #endregion #region Public Methods public IDisposable Activate () { var requestStack = GetCurrentStack (); RequestToken disposable = new RequestToken (this); disposables.Add (disposable); requestStack.Push (this); return disposable; } public void Add (AutomationPattern pattern) { if (pattern == null) throw new ArgumentNullException ("pattern"); if (IsContainedInAnyThreadStack ()) throw new InvalidOperationException ("Cannot modify an active CacheRequest"); cachedPatterns.Add (pattern); } public void Add (AutomationProperty property) { if (property == null) throw new ArgumentNullException ("property"); if (IsContainedInAnyThreadStack ()) throw new InvalidOperationException ("Cannot modify an active CacheRequest"); cachedProperties.Add (property); } public CacheRequest Clone () { var clone = new CacheRequest (); clone.TreeFilter = TreeFilter; clone.TreeScope = TreeScope; clone.AutomationElementMode = AutomationElementMode; clone.cachedPatterns.AddRange (cachedPatterns); clone.cachedProperties.AddRange (cachedProperties); return clone; } public void Pop () { var requestStack = GetCurrentStack (); if (requestStack.Peek () != this || this == DefaultRequest) throw new InvalidOperationException ("Can only pop CacheRequest.Current"); requestStack.Pop (); } public void Push () { var requestStack = GetCurrentStack (); requestStack.Push (this); } #endregion #region Private Static Members private static Dictionary> requestStacks = new Dictionary> (); internal static readonly CacheRequest DefaultRequest = new CacheRequest (); static Object stackLock = new Object (); static Stack GetCurrentStack () { Stack requestStack; if (!requestStacks.TryGetValue (Thread.CurrentThread, out requestStack)) { lock (stackLock) { if (!requestStacks.TryGetValue (Thread.CurrentThread, out requestStack)) { requestStack = new Stack (); requestStack.Push (DefaultRequest); requestStacks [Thread.CurrentThread] = requestStack; } } } return requestStack; } #endregion #region Private Methods private bool IsContainedInAnyThreadStack () { lock (stackLock) { foreach (var stack in requestStacks.Values) if (stack.Contains (this)) return true; } return false; } #endregion #region Private Disposable RequestToken Class private class RequestToken : IDisposable { private CacheRequest request; public RequestToken (CacheRequest request) { this.request = request; } public void Dispose () { if (request.disposables.Count != 0) { //request.disposables.Peek () == this) { request.disposables.Remove (this); request.Pop (); } } } #endregion } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/TextPattern.cs0000644000016200001670000001552611433571545027362 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Brad Taylor // Mike Gorse // using System; using System.Windows.Automation.Text; using Mono.UIAutomation.Source; namespace System.Windows.Automation { public class TextPattern : BasePattern { #region Private Fields private ITextPattern source; #endregion #region Constructor private TextPattern () { } internal TextPattern (ITextPattern source) { this.source = source; } #endregion #region Public Properties public SupportedTextSelection SupportedTextSelection { get { return source.SupportedTextSelection; } } public TextPatternRange DocumentRange { get { return new TextPatternRange (this, source.DocumentRange); } } #endregion #region Public Methods public TextPatternRange[] GetSelection () { return RangeArray (source.GetSelection ()); } public TextPatternRange[] GetVisibleRanges () { return RangeArray (source.GetVisibleRanges ()); } public TextPatternRange RangeFromChild (AutomationElement childElement) { return new TextPatternRange (this, source.RangeFromChild (childElement.SourceElement)); } public TextPatternRange RangeFromPoint (Point screenLocation) { return new TextPatternRange (this, source.RangeFromPoint (screenLocation)); } #endregion #region Private Methods TextPatternRange [] RangeArray (ITextPatternRange [] source) { TextPatternRange [] ret = new TextPatternRange [source.Length]; for (int i = 0; i < source.Length; i++) ret [i] = new TextPatternRange (this, source [i]); return ret; } #endregion #region Public Fields public static readonly AutomationTextAttribute AnimationStyleAttribute = TextPatternIdentifiers.AnimationStyleAttribute; public static readonly AutomationTextAttribute BackgroundColorAttribute = TextPatternIdentifiers.BackgroundColorAttribute; public static readonly AutomationTextAttribute BulletStyleAttribute = TextPatternIdentifiers.BulletStyleAttribute; public static readonly AutomationTextAttribute CapStyleAttribute = TextPatternIdentifiers.CapStyleAttribute; public static readonly AutomationTextAttribute CultureAttribute = TextPatternIdentifiers.CultureAttribute; public static readonly AutomationTextAttribute FontNameAttribute = TextPatternIdentifiers.FontNameAttribute; public static readonly AutomationTextAttribute FontSizeAttribute = TextPatternIdentifiers.FontSizeAttribute; public static readonly AutomationTextAttribute FontWeightAttribute = TextPatternIdentifiers.FontWeightAttribute; public static readonly AutomationTextAttribute ForegroundColorAttribute = TextPatternIdentifiers.ForegroundColorAttribute; public static readonly AutomationTextAttribute HorizontalTextAlignmentAttribute = TextPatternIdentifiers.HorizontalTextAlignmentAttribute; public static readonly AutomationTextAttribute IndentationFirstLineAttribute = TextPatternIdentifiers.IndentationFirstLineAttribute; public static readonly AutomationTextAttribute IndentationLeadingAttribute = TextPatternIdentifiers.IndentationLeadingAttribute; public static readonly AutomationTextAttribute IndentationTrailingAttribute = TextPatternIdentifiers.IndentationTrailingAttribute; public static readonly AutomationTextAttribute IsHiddenAttribute = TextPatternIdentifiers.IsHiddenAttribute; public static readonly AutomationTextAttribute IsItalicAttribute = TextPatternIdentifiers.IsItalicAttribute; public static readonly AutomationTextAttribute IsReadOnlyAttribute = TextPatternIdentifiers.IsReadOnlyAttribute; public static readonly AutomationTextAttribute IsSubscriptAttribute = TextPatternIdentifiers.IsSubscriptAttribute; public static readonly AutomationTextAttribute IsSuperscriptAttribute = TextPatternIdentifiers.IsSuperscriptAttribute; public static readonly AutomationTextAttribute MarginBottomAttribute = TextPatternIdentifiers.MarginBottomAttribute; public static readonly AutomationTextAttribute MarginLeadingAttribute = TextPatternIdentifiers.MarginLeadingAttribute; public static readonly AutomationTextAttribute MarginTopAttribute = TextPatternIdentifiers.MarginTopAttribute; public static readonly AutomationTextAttribute MarginTrailingAttribute = TextPatternIdentifiers.MarginTrailingAttribute; public static readonly Object MixedAttributeValue = TextPatternIdentifiers.MixedAttributeValue; public static readonly AutomationTextAttribute OutlineStylesAttribute = TextPatternIdentifiers.OutlineStylesAttribute; public static readonly AutomationTextAttribute OverlineColorAttribute = TextPatternIdentifiers.OverlineColorAttribute; public static readonly AutomationTextAttribute OverlineStyleAttribute = TextPatternIdentifiers.OverlineStyleAttribute; public static readonly AutomationPattern Pattern = TextPatternIdentifiers.Pattern; public static readonly AutomationTextAttribute StrikethroughColorAttribute = TextPatternIdentifiers.StrikethroughColorAttribute; public static readonly AutomationTextAttribute StrikethroughStyleAttribute = TextPatternIdentifiers.StrikethroughStyleAttribute; public static readonly AutomationTextAttribute TabsAttribute = TextPatternIdentifiers.TabsAttribute; public static readonly AutomationTextAttribute TextFlowDirectionsAttribute = TextPatternIdentifiers.TextFlowDirectionsAttribute; public static readonly AutomationTextAttribute UnderlineColorAttribute = TextPatternIdentifiers.UnderlineColorAttribute; public static readonly AutomationTextAttribute UnderlineStyleAttribute = TextPatternIdentifiers.UnderlineStyleAttribute; public static readonly AutomationEvent TextChangedEvent = TextPatternIdentifiers.TextChangedEvent; public static readonly AutomationEvent TextSelectionChangedEvent = TextPatternIdentifiers.TextSelectionChangedEvent; #endregion } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/Condition.cs0000644000016200001670000000332111433571545027014 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Brad Taylor // Sandy Armstrong // using System; namespace System.Windows.Automation { public abstract class Condition { #region Constructor internal Condition () { } #endregion #region Internal Abstract Methods internal abstract bool AppliesTo (AutomationElement element); #endregion #region Public Static Fields public static readonly Condition FalseCondition = new BoolCondition (false); public static readonly Condition TrueCondition = new BoolCondition (true); #endregion } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/WindowPattern.cs0000644000016200001670000001101311433571545027670 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // Mike Gorse // using System; using Mono.UIAutomation.Source; namespace System.Windows.Automation { public class WindowPattern : BasePattern { public struct WindowPatternInformation { private bool cache; private WindowPattern pattern; internal WindowPatternInformation (WindowPattern pattern, bool cache) { this.pattern = pattern; this.cache = cache; } public bool CanMaximize { get { return (bool) pattern.element.GetPropertyValue (CanMaximizeProperty, cache); } } public bool CanMinimize { get { return (bool) pattern.element.GetPropertyValue (CanMinimizeProperty, cache); } } public bool IsModal { get { return (bool) pattern.element.GetPropertyValue (IsModalProperty, cache); } } public bool IsTopmost { get { return (bool) pattern.element.GetPropertyValue (IsTopmostProperty, cache); } } public WindowVisualState WindowVisualState { get { return (WindowVisualState) pattern.element.GetPropertyValue (WindowVisualStateProperty, cache); } } public WindowInteractionState WindowInteractionState { get { return (WindowInteractionState) pattern.element.GetPropertyValue (WindowInteractionStateProperty, cache); } } } private AutomationElement element; private bool cached; private WindowPatternInformation currentInfo; private WindowPatternInformation cachedInfo; internal WindowPattern () { } internal WindowPattern (IWindowPattern source, AutomationElement element, bool cached) { this.element = element; this.cached = cached; this.Source = source; currentInfo = new WindowPatternInformation (this, false); if (cached) cachedInfo = new WindowPatternInformation (this, true); } internal IWindowPattern Source { get; private set; } public WindowPatternInformation Cached { get { if (!cached) throw new InvalidOperationException ("Cannot request a property or pattern that is not cached"); return cachedInfo; } } public WindowPatternInformation Current { get { return currentInfo; } } public bool WaitForInputIdle (int milliseconds) { return Source.WaitForInputIdle (milliseconds); } public void Close () { Source.Close (); } public void SetWindowVisualState (WindowVisualState state) { Source.SetWindowVisualState (state); } public static readonly AutomationPattern Pattern = WindowPatternIdentifiers.Pattern; public static readonly AutomationProperty CanMaximizeProperty = WindowPatternIdentifiers.CanMaximizeProperty; public static readonly AutomationProperty CanMinimizeProperty = WindowPatternIdentifiers.CanMinimizeProperty; public static readonly AutomationProperty IsModalProperty = WindowPatternIdentifiers.IsModalProperty; public static readonly AutomationProperty IsTopmostProperty = WindowPatternIdentifiers.IsTopmostProperty; public static readonly AutomationProperty WindowVisualStateProperty = WindowPatternIdentifiers.WindowVisualStateProperty; public static readonly AutomationProperty WindowInteractionStateProperty = WindowPatternIdentifiers.WindowInteractionStateProperty; public static readonly AutomationEvent WindowOpenedEvent = WindowPatternIdentifiers.WindowOpenedEvent; public static readonly AutomationEvent WindowClosedEvent = WindowPatternIdentifiers.WindowClosedEvent; } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/PropertyConditon.cs0000644000016200001670000004147111433571545030420 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using System.Globalization; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; namespace System.Windows.Automation { [Flags] public enum PropertyConditionFlags { None, IgnoreCase } public class PropertyCondition : Condition { private AutomationProperty property; private object val; private PropertyConditionFlags flags; public PropertyCondition (AutomationProperty property, object value, PropertyConditionFlags flags) : base () { if (property == null) throw new ArgumentNullException ("property"); this.property = property; // NotSupported is handled the same way for all properties if (value == AutomationElement.NotSupported) { if ((flags & PropertyConditionFlags.IgnoreCase) == PropertyConditionFlags.IgnoreCase) throw new ArgumentException ("flags"); this.val = value; this.flags = flags; return; } if (property == AEIds.AcceleratorKeyProperty || property == AEIds.AccessKeyProperty || property == AEIds.AutomationIdProperty || property == AEIds.ClassNameProperty || property == AEIds.HelpTextProperty || property == AEIds.ItemStatusProperty || property == AEIds.ItemTypeProperty || property == AEIds.LocalizedControlTypeProperty || property == AEIds.NameProperty || property == AEIds.FrameworkIdProperty || property == ValuePatternIdentifiers.ValueProperty) { if (value != null && !(value is string)) throw new ArgumentException ("value"); if (value == null && (flags & PropertyConditionFlags.IgnoreCase) == PropertyConditionFlags.IgnoreCase) throw new ArgumentException ("flags"); val = value; } else if (property == AEIds.BoundingRectangleProperty) { Rect? rect = null; if (value == null || !(rect = value as Rect?).HasValue) throw new ArgumentException ("value"); if ((flags & PropertyConditionFlags.IgnoreCase) == PropertyConditionFlags.IgnoreCase) throw new ArgumentException ("flags"); val = new double [] { rect.Value.X, rect.Value.Y, rect.Value.Width, rect.Value.Height }; } else if (property == AEIds.ClickablePointProperty) { Point? point = null; if (value == null || !(point = value as Point?).HasValue) throw new ArgumentException ("value"); if ((flags & PropertyConditionFlags.IgnoreCase) == PropertyConditionFlags.IgnoreCase) throw new ArgumentException ("flags"); val = new double [] { point.Value.X, point.Value.Y }; } else if (property == AEIds.ControlTypeProperty) { ControlType controlType = null; if (value != null && (controlType = value as ControlType) == null) throw new ArgumentException ("value"); if ((flags & PropertyConditionFlags.IgnoreCase) == PropertyConditionFlags.IgnoreCase) throw new ArgumentException ("flags"); if (controlType != null) val = controlType.Id; } else if (property == AEIds.CultureProperty) { CultureInfo culture = null; if (value != null && (culture = value as CultureInfo) == null) throw new ArgumentException ("value"); if ((flags & PropertyConditionFlags.IgnoreCase) == PropertyConditionFlags.IgnoreCase) throw new ArgumentException ("flags"); if (culture != null) val = culture.LCID; } else if (property == AEIds.HasKeyboardFocusProperty || property == AEIds.IsContentElementProperty || property == AEIds.IsControlElementProperty || property == AEIds.IsDockPatternAvailableProperty || property == AEIds.IsEnabledProperty || property == AEIds.IsExpandCollapsePatternAvailableProperty || property == AEIds.IsGridItemPatternAvailableProperty || property == AEIds.IsGridPatternAvailableProperty || property == AEIds.IsInvokePatternAvailableProperty || property == AEIds.IsKeyboardFocusableProperty || property == AEIds.IsMultipleViewPatternAvailableProperty || property == AEIds.IsOffscreenProperty || property == AEIds.IsPasswordProperty || property == AEIds.IsRangeValuePatternAvailableProperty || property == AEIds.IsRequiredForFormProperty || property == AEIds.IsScrollItemPatternAvailableProperty || property == AEIds.IsScrollPatternAvailableProperty || property == AEIds.IsSelectionItemPatternAvailableProperty || property == AEIds.IsSelectionPatternAvailableProperty || property == AEIds.IsTableItemPatternAvailableProperty || property == AEIds.IsTablePatternAvailableProperty || property == AEIds.IsTextPatternAvailableProperty || property == AEIds.IsTogglePatternAvailableProperty || property == AEIds.IsTransformPatternAvailableProperty || property == AEIds.IsValuePatternAvailableProperty || property == AEIds.IsWindowPatternAvailableProperty || property == RangeValuePatternIdentifiers.IsReadOnlyProperty || property == ScrollPatternIdentifiers.HorizontallyScrollableProperty || property == ScrollPatternIdentifiers.VerticallyScrollableProperty || property == SelectionItemPatternIdentifiers.IsSelectedProperty || property == SelectionPatternIdentifiers.CanSelectMultipleProperty || property == SelectionPatternIdentifiers.IsSelectionRequiredProperty || property == TransformPatternIdentifiers.CanMoveProperty || property == TransformPatternIdentifiers.CanResizeProperty || property == TransformPatternIdentifiers.CanRotateProperty || property == ValuePatternIdentifiers.IsReadOnlyProperty || property == WindowPatternIdentifiers.CanMaximizeProperty || property == WindowPatternIdentifiers.CanMinimizeProperty || property == WindowPatternIdentifiers.IsModalProperty || property == WindowPatternIdentifiers.IsTopmostProperty) { bool? boolVal = null; if (value == null || !(boolVal = value as bool?).HasValue) throw new ArgumentException ("value"); if ((flags & PropertyConditionFlags.IgnoreCase) == PropertyConditionFlags.IgnoreCase) throw new ArgumentException ("flags"); val = boolVal.Value; } else if (property == AEIds.LabeledByProperty || property == GridItemPatternIdentifiers.ContainingGridProperty || property == SelectionItemPatternIdentifiers.SelectionContainerProperty) { AutomationElement element = null; if (value != null && (element = value as AutomationElement) == null) throw new ArgumentException ("value"); if ((flags & PropertyConditionFlags.IgnoreCase) == PropertyConditionFlags.IgnoreCase) throw new ArgumentException ("flags"); if (element != null) val = element.GetRuntimeId (); } else if (property == AEIds.NativeWindowHandleProperty || property == AEIds.ProcessIdProperty || property == GridItemPatternIdentifiers.ColumnProperty || property == GridItemPatternIdentifiers.ColumnSpanProperty || property == GridItemPatternIdentifiers.RowProperty || property == GridItemPatternIdentifiers.RowSpanProperty || property == GridPatternIdentifiers.ColumnCountProperty || property == GridPatternIdentifiers.RowCountProperty || property == MultipleViewPatternIdentifiers.CurrentViewProperty) { int? intVal = null; if (value == null || !(intVal = value as int?).HasValue) throw new ArgumentException ("value"); if ((flags & PropertyConditionFlags.IgnoreCase) == PropertyConditionFlags.IgnoreCase) throw new ArgumentException ("flags"); val = intVal.Value; } else if (property == AEIds.OrientationProperty) { OrientationType? orientation = null; if (value == null || !(orientation = value as OrientationType?).HasValue) throw new ArgumentException ("value"); if ((flags & PropertyConditionFlags.IgnoreCase) == PropertyConditionFlags.IgnoreCase) throw new ArgumentException ("flags"); val = orientation.Value; } else if (property == AEIds.RuntimeIdProperty || property == MultipleViewPatternIdentifiers.SupportedViewsProperty) { int [] runtimeId = null; if (value != null && (runtimeId = value as int []) == null) throw new ArgumentException ("value"); if ((flags & PropertyConditionFlags.IgnoreCase) == PropertyConditionFlags.IgnoreCase) throw new ArgumentException ("flags"); if (runtimeId != null) val = runtimeId; } else if (property == DockPatternIdentifiers.DockPositionProperty) { DockPosition? position = null; if (value == null || !(position = value as DockPosition?).HasValue) throw new ArgumentException ("value"); if ((flags & PropertyConditionFlags.IgnoreCase) == PropertyConditionFlags.IgnoreCase) throw new ArgumentException ("flags"); val = position.Value; } else if (property == ExpandCollapsePatternIdentifiers.ExpandCollapseStateProperty) { ExpandCollapseState? state = null; if (value == null || !(state = value as ExpandCollapseState?).HasValue) throw new ArgumentException ("value"); if ((flags & PropertyConditionFlags.IgnoreCase) == PropertyConditionFlags.IgnoreCase) throw new ArgumentException ("flags"); val = state.Value; } else if (property == RangeValuePatternIdentifiers.LargeChangeProperty || property == RangeValuePatternIdentifiers.SmallChangeProperty || property == RangeValuePatternIdentifiers.ValueProperty || property == ScrollPatternIdentifiers.HorizontalScrollPercentProperty || property == ScrollPatternIdentifiers.HorizontalViewSizeProperty || property == ScrollPatternIdentifiers.VerticalScrollPercentProperty || property == ScrollPatternIdentifiers.VerticalViewSizeProperty) { double? doubleVal = null; if (value == null || !(doubleVal = value as double?).HasValue) throw new ArgumentException ("value"); if ((flags & PropertyConditionFlags.IgnoreCase) == PropertyConditionFlags.IgnoreCase) throw new ArgumentException ("flags"); val = doubleVal.Value; } else if (property == RangeValuePatternIdentifiers.MaximumProperty || property == RangeValuePatternIdentifiers.MinimumProperty) { if ((flags & PropertyConditionFlags.IgnoreCase) == PropertyConditionFlags.IgnoreCase && !(value is string)) throw new ArgumentException ("flags"); val = value; } else if (property == SelectionPatternIdentifiers.SelectionProperty || property == TableItemPatternIdentifiers.ColumnHeaderItemsProperty || property == TableItemPatternIdentifiers.RowHeaderItemsProperty || property == TablePatternIdentifiers.ColumnHeadersProperty || property == TablePatternIdentifiers.RowHeadersProperty) { AutomationElement [] elements = null; if (value != null && (elements = value as AutomationElement []) == null) throw new ArgumentException ("value"); if ((flags & PropertyConditionFlags.IgnoreCase) == PropertyConditionFlags.IgnoreCase) throw new ArgumentException ("flags"); if (elements != null) val = elements; } else if (property == TablePatternIdentifiers.RowOrColumnMajorProperty) { RowOrColumnMajor? state = null; if (value == null || !(state = value as RowOrColumnMajor?).HasValue) throw new ArgumentException ("value"); if ((flags & PropertyConditionFlags.IgnoreCase) == PropertyConditionFlags.IgnoreCase) throw new ArgumentException ("flags"); val = state.Value; } else if (property == TogglePatternIdentifiers.ToggleStateProperty) { ToggleState? state = null; if (value == null || !(state = value as ToggleState?).HasValue) throw new ArgumentException ("value"); if ((flags & PropertyConditionFlags.IgnoreCase) == PropertyConditionFlags.IgnoreCase) throw new ArgumentException ("flags"); val = state.Value; } else if (property == WindowPatternIdentifiers.WindowInteractionStateProperty) { WindowInteractionState? state = null; if (value == null || !(state = value as WindowInteractionState?).HasValue) throw new ArgumentException ("value"); if ((flags & PropertyConditionFlags.IgnoreCase) == PropertyConditionFlags.IgnoreCase) throw new ArgumentException ("flags"); val = state.Value; } else if (property == WindowPatternIdentifiers.WindowVisualStateProperty) { WindowVisualState? state = null; if (value == null || !(state = value as WindowVisualState?).HasValue) throw new ArgumentException ("value"); if ((flags & PropertyConditionFlags.IgnoreCase) == PropertyConditionFlags.IgnoreCase) throw new ArgumentException ("flags"); val = state.Value; } this.flags = flags; } public PropertyCondition (AutomationProperty property, object value) : this (property, value, PropertyConditionFlags.None) { } public AutomationProperty Property { get { return property; } } public object Value { get { return val; } } public PropertyConditionFlags Flags { get { return flags; } } internal override bool AppliesTo (AutomationElement element) { // TODO: Test caching behavior object currentVal = element.GetCurrentPropertyValue (property); object conditionVal = val; if (currentVal == null || conditionVal == null) return currentVal == conditionVal; // Compare AutomationElements against Condition's // stored runtime ID array if (property == AEIds.LabeledByProperty || property == GridItemPatternIdentifiers.ContainingGridProperty || property == SelectionItemPatternIdentifiers.SelectionContainerProperty) { AutomationElement elementVal = currentVal as AutomationElement; int [] conditionId = conditionVal as int []; return currentVal != null && conditionId != null && Automation.Compare (conditionId, elementVal.GetRuntimeId ()); } // For some other properties, need to reconstruct proper // object for comparison if (property == AEIds.BoundingRectangleProperty) { double [] rectArray = (double []) val; conditionVal = new Rect (rectArray [0], rectArray [1], rectArray [2], rectArray [3]); } else if (property == AEIds.ClickablePointProperty) { double [] pointArray = (double []) val; conditionVal = new Point (pointArray [0], pointArray [1]); } else if (property == AEIds.ControlTypeProperty) conditionVal = ControlType.LookupById ((int) val); else if (property == AEIds.CultureProperty) conditionVal = new CultureInfo ((int) val); return ArePropertyValuesEqual (conditionVal, currentVal); } private bool ArePropertyValuesEqual (object val1, object val2) { if (val1 == null || val2 == null) return val1 == val2; if ((flags & PropertyConditionFlags.IgnoreCase) == PropertyConditionFlags.IgnoreCase) { string string1 = val1 as string; string string2 = val2 as string; if (string1 != null && string2 != null) return string1.Equals (string2, StringComparison.OrdinalIgnoreCase); } // Custom equality checking for certain types Array array1 = val1 as Array; Array array2 = val2 as Array; if (array1 != null && array2 != null) { if (array1.Length != array2.Length) return false; // NOTE: Assuming ordering requirement for (int i = 0; i < array1.Length; i++) if (!ArePropertyValuesEqual (array1.GetValue (i), array2.GetValue (i))) return false; return true; } return val1.Equals (val2); } } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/SelectionPattern.cs0000644000016200001670000000674011433571545030361 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // Mike Gorse // using System; using Mono.UIAutomation.Source; namespace System.Windows.Automation { public class SelectionPattern : BasePattern { public struct SelectionPatternInformation { private bool cache; private SelectionPattern pattern; internal SelectionPatternInformation (SelectionPattern pattern, bool cache) { this.pattern = pattern; this.cache = cache; } public bool CanSelectMultiple { get { return (bool) pattern.element.GetPropertyValue (CanSelectMultipleProperty, cache); } } public bool IsSelectionRequired { get { return (bool) pattern.element.GetPropertyValue (IsSelectionRequiredProperty, cache); } } public AutomationElement [] GetSelection () { return (AutomationElement []) pattern.element.GetPropertyValue (SelectionProperty, cache); } } private AutomationElement element; private bool cached; private SelectionPatternInformation currentInfo; private SelectionPatternInformation cachedInfo; internal SelectionPattern () { } internal SelectionPattern (ISelectionPattern source, AutomationElement element, bool cached) { this.element = element; this.cached = cached; this.Source = source; currentInfo = new SelectionPatternInformation (this, false); if (cached) cachedInfo = new SelectionPatternInformation (this, true); } internal ISelectionPattern Source { get; private set; } public SelectionPatternInformation Cached { get { if (!cached) throw new InvalidOperationException ("Cannot request a property or pattern that is not cached"); return cachedInfo; } } public SelectionPatternInformation Current { get { return currentInfo; } } public static readonly AutomationPattern Pattern = SelectionPatternIdentifiers.Pattern; public static readonly AutomationProperty SelectionProperty = SelectionPatternIdentifiers.SelectionProperty; public static readonly AutomationProperty CanSelectMultipleProperty = SelectionPatternIdentifiers.CanSelectMultipleProperty; public static readonly AutomationProperty IsSelectionRequiredProperty = SelectionPatternIdentifiers.IsSelectionRequiredProperty; public static readonly AutomationEvent InvalidatedEvent = SelectionPatternIdentifiers.InvalidatedEvent; } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/ScrollItemPattern.cs0000644000016200001670000000325511433571545030507 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // Mike Gorse // using System; using System.Windows.Automation.Provider; namespace System.Windows.Automation { public class ScrollItemPattern : BasePattern { private IScrollItemProvider source; internal ScrollItemPattern (IScrollItemProvider source) { this.source = source; } public void ScrollIntoView () { source.ScrollIntoView (); } public static readonly AutomationPattern Pattern = ScrollItemPatternIdentifiers.Pattern; } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/TogglePattern.cs0000644000016200001670000000553011433571545027651 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // Mike Gorse // using System; using System.Windows.Automation.Provider; namespace System.Windows.Automation { public class TogglePattern : BasePattern { public struct TogglePatternInformation { private bool cache; private TogglePattern pattern; internal TogglePatternInformation (TogglePattern pattern, bool cache) { this.pattern = pattern; this.cache = cache; } public ToggleState ToggleState { get { return (ToggleState) pattern.element.GetPropertyValue (ToggleStateProperty, cache); } } } private AutomationElement element; private bool cached; private TogglePatternInformation currentInfo; private TogglePatternInformation cachedInfo; internal TogglePattern () { } internal TogglePattern (IToggleProvider source, AutomationElement element, bool cached) { this.element = element; this.cached = cached; this.Source = source; currentInfo = new TogglePatternInformation (this, false); if (cached) cachedInfo = new TogglePatternInformation (this, true); } internal IToggleProvider Source { get; private set; } public TogglePatternInformation Cached { get { if (!cached) throw new InvalidOperationException ("Cannot request a property or pattern that is not cached"); return cachedInfo; } } public TogglePatternInformation Current { get { return currentInfo; } } public void Toggle () { Source.Toggle (); } public static readonly AutomationPattern Pattern = TogglePatternIdentifiers.Pattern; public static readonly AutomationProperty ToggleStateProperty = TogglePatternIdentifiers.ToggleStateProperty; } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/InvokePattern.cs0000644000016200001670000000334011433571545027660 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // Mike Gorse // using System; using Mono.UIAutomation.Source; namespace System.Windows.Automation { public class InvokePattern : BasePattern { private IInvokePattern source; internal InvokePattern (IInvokePattern source) { this.source = source; } public void Invoke () { source.Invoke (); } public static readonly AutomationPattern Pattern = InvokePatternIdentifiers.Pattern; public static readonly AutomationEvent InvokedEvent = InvokePatternIdentifiers.InvokedEvent; } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/ExpandCollapsePattern.cs0000644000016200001670000000611211433571545031327 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // Mike Gorse // using System; using System.Windows.Automation.Provider; namespace System.Windows.Automation { public class ExpandCollapsePattern : BasePattern { public struct ExpandCollapsePatternInformation { private bool cache; private ExpandCollapsePattern pattern; internal ExpandCollapsePatternInformation (ExpandCollapsePattern pattern, bool cache) { this.pattern = pattern; this.cache = cache; } public ExpandCollapseState ExpandCollapseState { get { return (ExpandCollapseState) pattern.element.GetPropertyValue (ExpandCollapseStateProperty, cache); } } } private AutomationElement element; private bool cached; private ExpandCollapsePatternInformation currentInfo; private ExpandCollapsePatternInformation cachedInfo; internal ExpandCollapsePattern () { } internal ExpandCollapsePattern (IExpandCollapseProvider source, AutomationElement element, bool cached) { this.element = element; this.cached = cached; this.Source = source; currentInfo = new ExpandCollapsePatternInformation (this, false); if (cached) cachedInfo = new ExpandCollapsePatternInformation (this, true); } internal IExpandCollapseProvider Source { get; private set; } public ExpandCollapsePatternInformation Cached { get { if (!cached) throw new InvalidOperationException ("Cannot request a property or pattern that is not cached"); return cachedInfo; } } public ExpandCollapsePatternInformation Current { get { return currentInfo; } } public void Expand () { Source.Expand (); } public void Collapse () { Source.Collapse (); } public static readonly AutomationPattern Pattern = ExpandCollapsePatternIdentifiers.Pattern; public static readonly AutomationProperty ExpandCollapseStateProperty = ExpandCollapsePatternIdentifiers.ExpandCollapseStateProperty; } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/SelectionItemPattern.cs0000644000016200001670000000741211433571545031175 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // Mike Gorse // using System; using Mono.UIAutomation.Source; namespace System.Windows.Automation { public class SelectionItemPattern : BasePattern { public struct SelectionItemPatternInformation { private bool cache; private SelectionItemPattern pattern; internal SelectionItemPatternInformation (SelectionItemPattern pattern, bool cache) { this.pattern = pattern; this.cache = cache; } public bool IsSelected { get { return (bool) pattern.element.GetPropertyValue (IsSelectedProperty, cache); } } public AutomationElement SelectionContainer { get { return (AutomationElement) pattern.element.GetPropertyValue (SelectionContainerProperty, cache); } } } private AutomationElement element; private bool cached; private SelectionItemPatternInformation currentInfo; private SelectionItemPatternInformation cachedInfo; internal SelectionItemPattern () { } internal SelectionItemPattern (ISelectionItemPattern source, AutomationElement element, bool cached) { this.element = element; this.cached = cached; this.Source = source; currentInfo = new SelectionItemPatternInformation (this, false); if (cached) cachedInfo = new SelectionItemPatternInformation (this, true); } internal ISelectionItemPattern Source { get; private set; } public SelectionItemPatternInformation Cached { get { if (!cached) throw new InvalidOperationException ("Cannot request a property or pattern that is not cached"); return cachedInfo; } } public SelectionItemPatternInformation Current { get { return currentInfo; } } public void Select () { Source.Select (); } public void AddToSelection () { Source.AddToSelection (); } public void RemoveFromSelection () { Source.RemoveFromSelection (); } public static readonly AutomationPattern Pattern = SelectionItemPatternIdentifiers.Pattern; public static readonly AutomationProperty IsSelectedProperty = SelectionItemPatternIdentifiers.IsSelectedProperty; public static readonly AutomationProperty SelectionContainerProperty = SelectionItemPatternIdentifiers.SelectionContainerProperty; public static readonly AutomationEvent ElementAddedToSelectionEvent = SelectionItemPatternIdentifiers.ElementAddedToSelectionEvent; public static readonly AutomationEvent ElementRemovedFromSelectionEvent = SelectionItemPatternIdentifiers.ElementRemovedFromSelectionEvent; public static readonly AutomationEvent ElementSelectedEvent = SelectionItemPatternIdentifiers.ElementSelectedEvent; } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/AutomationElement.cs0000644000016200001670000011263611433571545030532 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Brad Taylor // Sandy Armstrong // using System; using System.Collections.Generic; using System.Windows.Automation.Provider; using Mono.UIAutomation.Services; using Mono.UIAutomation.Source; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; namespace System.Windows.Automation { public sealed partial class AutomationElement { #region Private Members private AutomationElementInformation current; private AutomationElementInformation cached; private IElement sourceElement; private Dictionary propertyCache; private AutomationElementMode mode; private List cachedChildren; private AutomationElement cachedParent; #endregion #region Private Static Members private static AutomationElement rootElement; private static AutomationElement focusedElement; private static bool isFocusedElementInitialized = false; internal static void OnFocusChanged (object sender, AutomationFocusChangedEventArgs e) { AutomationElement ae = sender as AutomationElement; if (ae == null) return; bool hasFocus = false; try { hasFocus = ae.Current.HasKeyboardFocus; if ((!hasFocus) && ae == focusedElement) focusedElement = null; else focusedElement = ae; } catch (ElementNotAvailableException) { focusedElement = null; } catch (Exception ex) { Log.Error ("[OnFocusChanged] Unknown Error: {0}", ex); focusedElement = null; } } #endregion #region Internal Properties internal IElement SourceElement { get { return sourceElement; } } internal CacheRequest CacheRequest { get; private set; } #endregion #region Public Properties public AutomationElementInformation Cached { get { return cached; } } public AutomationElementCollection CachedChildren { get { if (cachedChildren == null) throw new InvalidOperationException ("Cannot request a property or pattern that is not cached"); return new AutomationElementCollection (cachedChildren); } } public AutomationElement CachedParent { get { if (cachedParent == null) throw new InvalidOperationException ("Cannot request a property or pattern that is not cached"); return cachedParent; } } public AutomationElementInformation Current { get { return current; } } #endregion #region Public Static Properties public static AutomationElement FocusedElement { get { if (!isFocusedElementInitialized) { foreach (var source in SourceManager.GetAutomationSources ()) { var element = source.GetFocusedElement (); if (element != null) { focusedElement = SourceManager.GetOrCreateAutomationElement (element); break; } } Automation.AddAutomationFocusChangedEventHandler (OnFocusChanged); isFocusedElementInitialized = true; } return focusedElement; } } public static AutomationElement RootElement { get { return rootElement; } } #endregion #region Static Constructor static AutomationElement () { rootElement = new AutomationElement (new DesktopElement ()); } #endregion #region Constructor internal AutomationElement (IElement sourceElement) { this.sourceElement = sourceElement; current = new AutomationElementInformation (this, false); cached = new AutomationElementInformation (this, true); propertyCache = new Dictionary (); mode = AutomationElementMode.Full; } #endregion #region Public Methods public override bool Equals (Object obj) { AutomationElement other = obj as AutomationElement; if (null == other) return false; return Automation.Compare (this, other); } public AutomationElementCollection FindAll (TreeScope scope, Condition condition) { List found = Find (scope, condition, false); return new AutomationElementCollection (found); } public AutomationElement FindFirst (TreeScope scope, Condition condition) { List found = Find (scope, condition, true); if (found.Count > 0) return found [0]; return null; } public Object GetCachedPattern (AutomationPattern pattern) { return GetPattern (pattern, true); } public Object GetCachedPropertyValue (AutomationProperty property) { return GetCachedPropertyValue (property, false); } public Object GetCachedPropertyValue (AutomationProperty property, bool ignoreDefaultValue) { CachedValue val = null; bool found = propertyCache.TryGetValue (property.Id, out val); if (!found) throw new InvalidOperationException ("Cannot request a property or pattern that is not cached"); if (ignoreDefaultValue && !val.IsSupported) return NotSupported; return val.Value; } public override int GetHashCode () { int code = 1; foreach (int i in GetRuntimeId ()) code = 31 * code + i; return code; } public Point GetClickablePoint () { return sourceElement.ClickablePoint; } public Object GetCurrentPattern (AutomationPattern pattern) { return GetPattern (pattern, false); } public Object GetCurrentPropertyValue (AutomationProperty property) { // TODO: Throw ElementNotAvailableException if element no longer exists return GetCurrentPropertyValue (property, false); } public Object GetCurrentPropertyValue (AutomationProperty property, bool ignoreDefaultValue) { // TODO: Is this tested? Also, add message if (mode == AutomationElementMode.None) throw new InvalidOperationException ("Cannot request a property or pattern that is not cached"); object pattern; // TODO: Throw ElementNotAvailableException if element no longer exists // Default values already handled in IElement implementation if (ignoreDefaultValue && !sourceElement.SupportsProperty (property)) return NotSupported; if (property == AEIds.AcceleratorKeyProperty) return sourceElement.AcceleratorKey; else if (property == AEIds.AccessKeyProperty) return sourceElement.AccessKey; else if (property == AEIds.AutomationIdProperty) return sourceElement.AutomationId; else if (property == AEIds.BoundingRectangleProperty) return sourceElement.BoundingRectangle; else if (property == AEIds.ClassNameProperty) return sourceElement.ClassName; else if (property == AEIds.ClickablePointProperty) { Point clickablePoint; if (TryGetClickablePoint (out clickablePoint)) return clickablePoint; return null; } else if (property == AEIds.ControlTypeProperty) return sourceElement.ControlType; else if (property == AEIds.CultureProperty) return null; // TODO: Implement (new IElement member? not used in UIAutomationWinforms) else if (property == AEIds.FrameworkIdProperty) return sourceElement.FrameworkId; else if (property == AEIds.HasKeyboardFocusProperty) return sourceElement.HasKeyboardFocus; else if (property == AEIds.HelpTextProperty) return sourceElement.HelpText; else if (property == AEIds.IsContentElementProperty) return sourceElement.IsContentElement; else if (property == AEIds.IsControlElementProperty) return sourceElement.IsControlElement; else if (property == AEIds.IsDockPatternAvailableProperty) return TryGetCurrentPattern (DockPatternIdentifiers.Pattern, out pattern); else if (property == AEIds.IsEnabledProperty) return sourceElement.IsEnabled; else if (property == AEIds.IsExpandCollapsePatternAvailableProperty) return TryGetCurrentPattern (ExpandCollapsePatternIdentifiers.Pattern, out pattern); else if (property == AEIds.IsGridItemPatternAvailableProperty) return TryGetCurrentPattern (GridItemPatternIdentifiers.Pattern, out pattern); else if (property == AEIds.IsGridPatternAvailableProperty) return TryGetCurrentPattern (GridPatternIdentifiers.Pattern, out pattern); else if (property == AEIds.IsInvokePatternAvailableProperty) return TryGetCurrentPattern (InvokePatternIdentifiers.Pattern, out pattern); else if (property == AEIds.IsKeyboardFocusableProperty) return sourceElement.IsKeyboardFocusable; else if (property == AEIds.IsMultipleViewPatternAvailableProperty) return TryGetCurrentPattern (MultipleViewPatternIdentifiers.Pattern, out pattern); else if (property == AEIds.IsOffscreenProperty) return sourceElement.IsOffscreen; else if (property == AEIds.IsPasswordProperty) return sourceElement.IsPassword; else if (property == AEIds.IsRangeValuePatternAvailableProperty) return TryGetCurrentPattern (RangeValuePatternIdentifiers.Pattern, out pattern); else if (property == AEIds.IsRequiredForFormProperty) return sourceElement.IsRequiredForForm; else if (property == AEIds.IsScrollItemPatternAvailableProperty) return TryGetCurrentPattern (ScrollItemPatternIdentifiers.Pattern, out pattern); else if (property == AEIds.IsScrollPatternAvailableProperty) return TryGetCurrentPattern (ScrollPatternIdentifiers.Pattern, out pattern); else if (property == AEIds.IsSelectionItemPatternAvailableProperty) return TryGetCurrentPattern (SelectionItemPatternIdentifiers.Pattern, out pattern); else if (property == AEIds.IsSelectionPatternAvailableProperty) return TryGetCurrentPattern (SelectionPatternIdentifiers.Pattern, out pattern); else if (property == AEIds.IsTableItemPatternAvailableProperty) return TryGetCurrentPattern (TableItemPatternIdentifiers.Pattern, out pattern); else if (property == AEIds.IsTablePatternAvailableProperty) return TryGetCurrentPattern (TablePatternIdentifiers.Pattern, out pattern); else if (property == AEIds.IsTextPatternAvailableProperty) return TryGetCurrentPattern (TextPatternIdentifiers.Pattern, out pattern); else if (property == AEIds.IsTogglePatternAvailableProperty) return TryGetCurrentPattern (TogglePatternIdentifiers.Pattern, out pattern); else if (property == AEIds.IsTransformPatternAvailableProperty) return TryGetCurrentPattern (TransformPatternIdentifiers.Pattern, out pattern); else if (property == AEIds.IsValuePatternAvailableProperty) return TryGetCurrentPattern (ValuePatternIdentifiers.Pattern, out pattern); else if (property == AEIds.IsWindowPatternAvailableProperty) return TryGetCurrentPattern (WindowPatternIdentifiers.Pattern, out pattern); else if (property == AEIds.ItemStatusProperty) return sourceElement.ItemStatus; else if (property == AEIds.ItemTypeProperty) return sourceElement.ItemType; else if (property == AEIds.LabeledByProperty) // TODO: Caching behavior here should be tested more return SourceManager.GetOrCreateAutomationElement (sourceElement.LabeledBy); else if (property == AEIds.LocalizedControlTypeProperty) return sourceElement.LocalizedControlType; else if (property == AEIds.NameProperty) return sourceElement.Name; else if (property == AEIds.NativeWindowHandleProperty) return sourceElement.NativeWindowHandle; else if (property == AEIds.OrientationProperty) return sourceElement.Orientation; else if (property == AEIds.ProcessIdProperty) return sourceElement.ProcessId; else if (property == AEIds.RuntimeIdProperty) return GetRuntimeId (); else if (property == DockPatternIdentifiers.DockPositionProperty) return (TryGetCurrentPattern (DockPatternIdentifiers.Pattern, out pattern)? ((DockPattern)pattern).Source.DockPosition: DockPosition.None); else if (property == ExpandCollapsePatternIdentifiers.ExpandCollapseStateProperty) return (TryGetCurrentPattern (ExpandCollapsePatternIdentifiers.Pattern, out pattern)? ((ExpandCollapsePattern)pattern).Source.ExpandCollapseState: ExpandCollapseState.LeafNode); else if (property == GridItemPatternIdentifiers.ColumnProperty) return (TryGetCurrentPattern (GridItemPatternIdentifiers.Pattern, out pattern)? ((GridItemPattern)pattern).Source.Column: 0); else if (property == GridItemPatternIdentifiers.ColumnSpanProperty) return (TryGetCurrentPattern (GridItemPatternIdentifiers.Pattern, out pattern)? ((GridItemPattern)pattern).Source.ColumnSpan: 1); else if (property == GridItemPatternIdentifiers.ContainingGridProperty) return (TryGetCurrentPattern (GridItemPatternIdentifiers.Pattern, out pattern)? SourceManager.GetOrCreateAutomationElement (((GridItemPattern)pattern).Source.ContainingGrid): null); else if (property == GridItemPatternIdentifiers.RowProperty) return (TryGetCurrentPattern (GridItemPatternIdentifiers.Pattern, out pattern)? ((GridItemPattern)pattern).Source.Row: 0); else if (property == GridItemPatternIdentifiers.RowSpanProperty) return (TryGetCurrentPattern (GridItemPatternIdentifiers.Pattern, out pattern)? ((GridItemPattern)pattern).Source.RowSpan: 1); else if (property == GridPatternIdentifiers.ColumnCountProperty) return (TryGetCurrentPattern (GridPatternIdentifiers.Pattern, out pattern)? ((GridPattern)pattern).Source.ColumnCount: 0); else if (property == GridPatternIdentifiers.RowCountProperty) return (TryGetCurrentPattern (GridPatternIdentifiers.Pattern, out pattern)? ((GridPattern)pattern).Source.RowCount: 0); else if (property == MultipleViewPatternIdentifiers.CurrentViewProperty) return (TryGetCurrentPattern (MultipleViewPatternIdentifiers.Pattern, out pattern)? ((MultipleViewPattern)pattern).Source.CurrentView: 0); else if (property == MultipleViewPatternIdentifiers.SupportedViewsProperty) return (TryGetCurrentPattern (MultipleViewPatternIdentifiers.Pattern, out pattern)? ((MultipleViewPattern)pattern).Source.GetSupportedViews (): new int [0]); else if (property == RangeValuePatternIdentifiers.IsReadOnlyProperty) return (TryGetCurrentPattern (RangeValuePatternIdentifiers.Pattern, out pattern)? ((RangeValuePattern)pattern).Source.IsReadOnly: true); else if (property == RangeValuePatternIdentifiers.LargeChangeProperty) return (TryGetCurrentPattern (RangeValuePatternIdentifiers.Pattern, out pattern)? ((RangeValuePattern)pattern).Source.LargeChange: 0); else if (property == RangeValuePatternIdentifiers.MaximumProperty) return (TryGetCurrentPattern (RangeValuePatternIdentifiers.Pattern, out pattern)? ((RangeValuePattern)pattern).Source.Maximum: 0); else if (property == RangeValuePatternIdentifiers.MinimumProperty) return (TryGetCurrentPattern (RangeValuePatternIdentifiers.Pattern, out pattern)? ((RangeValuePattern)pattern).Source.Minimum: 0); else if (property == RangeValuePatternIdentifiers.SmallChangeProperty) return (TryGetCurrentPattern (RangeValuePatternIdentifiers.Pattern, out pattern)? ((RangeValuePattern)pattern).Source.SmallChange: 0); else if (property == RangeValuePatternIdentifiers.ValueProperty) return (TryGetCurrentPattern (RangeValuePatternIdentifiers.Pattern, out pattern)? ((RangeValuePattern)pattern).Source.Value: 0); else if (property == ScrollPatternIdentifiers.HorizontallyScrollableProperty) return (TryGetCurrentPattern (ScrollPatternIdentifiers.Pattern, out pattern)? ((ScrollPattern)pattern).Source.HorizontallyScrollable: false); else if (property == ScrollPatternIdentifiers.HorizontalScrollPercentProperty) return (TryGetCurrentPattern (ScrollPatternIdentifiers.Pattern, out pattern)? ((ScrollPattern)pattern).Source.HorizontalScrollPercent: 0); else if (property == ScrollPatternIdentifiers.HorizontalViewSizeProperty) return (TryGetCurrentPattern (ScrollPatternIdentifiers.Pattern, out pattern)? ((ScrollPattern)pattern).Source.HorizontalViewSize: 100); else if (property == ScrollPatternIdentifiers.VerticallyScrollableProperty) return (TryGetCurrentPattern (ScrollPatternIdentifiers.Pattern, out pattern)? ((ScrollPattern)pattern).Source.VerticallyScrollable: false); else if (property == ScrollPatternIdentifiers.VerticalScrollPercentProperty) return (TryGetCurrentPattern (ScrollPatternIdentifiers.Pattern, out pattern)? ((ScrollPattern)pattern).Source.VerticalScrollPercent: 0); else if (property == ScrollPatternIdentifiers.VerticalViewSizeProperty) return (TryGetCurrentPattern (ScrollPatternIdentifiers.Pattern, out pattern)? ((ScrollPattern)pattern).Source.VerticalViewSize: 100); else if (property == SelectionItemPatternIdentifiers.IsSelectedProperty) return (TryGetCurrentPattern (SelectionItemPatternIdentifiers.Pattern, out pattern)? ((SelectionItemPattern)pattern).Source.IsSelected: false); else if (property == SelectionItemPatternIdentifiers.SelectionContainerProperty) return (TryGetCurrentPattern (SelectionItemPatternIdentifiers.Pattern, out pattern)? SourceManager.GetOrCreateAutomationElement (((SelectionItemPattern)pattern).Source.SelectionContainer): null); else if (property == SelectionPatternIdentifiers.CanSelectMultipleProperty) return (TryGetCurrentPattern (SelectionPatternIdentifiers.Pattern, out pattern)? ((SelectionPattern)pattern).Source.CanSelectMultiple: false); else if (property == SelectionPatternIdentifiers.IsSelectionRequiredProperty) return (TryGetCurrentPattern (SelectionPatternIdentifiers.Pattern, out pattern)? ((SelectionPattern)pattern).Source.IsSelectionRequired: false); else if (property == SelectionPatternIdentifiers.SelectionProperty) return (TryGetCurrentPattern (SelectionPatternIdentifiers.Pattern, out pattern)? SourceManager.GetOrCreateAutomationElements (((SelectionPattern)pattern).Source.GetSelection ()): new AutomationElement [0]); else if (property == TableItemPatternIdentifiers.ColumnHeaderItemsProperty) return (TryGetCurrentPattern (TableItemPatternIdentifiers.Pattern, out pattern)? SourceManager.GetOrCreateAutomationElements (((TableItemPattern)pattern).Source.GetColumnHeaderItems ()): new AutomationElement [0]); else if (property == TableItemPatternIdentifiers.RowHeaderItemsProperty) return (TryGetCurrentPattern (TableItemPatternIdentifiers.Pattern, out pattern)? SourceManager.GetOrCreateAutomationElements (((TableItemPattern)pattern).Source.GetRowHeaderItems ()): new AutomationElement [0]); else if (property == TablePatternIdentifiers.ColumnHeadersProperty) return (TryGetCurrentPattern (TablePatternIdentifiers.Pattern, out pattern)? SourceManager.GetOrCreateAutomationElements (((TablePattern)pattern).Source.GetColumnHeaders ()): new AutomationElement [0]); else if (property == TablePatternIdentifiers.RowHeadersProperty) return (TryGetCurrentPattern (TablePatternIdentifiers.Pattern, out pattern)? SourceManager.GetOrCreateAutomationElements (((TablePattern)pattern).Source.GetRowHeaders ()): new AutomationElement [0]); else if (property == TablePatternIdentifiers.RowOrColumnMajorProperty) return (TryGetCurrentPattern (TablePatternIdentifiers.Pattern, out pattern)? ((TablePattern)pattern).Source.RowOrColumnMajor: RowOrColumnMajor.Indeterminate); else if (property == TogglePatternIdentifiers.ToggleStateProperty) return (TryGetCurrentPattern (TogglePatternIdentifiers.Pattern, out pattern)? ((TogglePattern)pattern).Source.ToggleState: ToggleState.Indeterminate); else if (property == TransformPatternIdentifiers.CanMoveProperty) return (TryGetCurrentPattern (TransformPatternIdentifiers.Pattern, out pattern)? (bool)((TransformPattern)pattern).Source.CanMove: false); else if (property == TransformPatternIdentifiers.CanResizeProperty) return (TryGetCurrentPattern (TransformPatternIdentifiers.Pattern, out pattern)? ((TransformPattern)pattern).Source.CanResize: false); else if (property == TransformPatternIdentifiers.CanRotateProperty) return (TryGetCurrentPattern (TransformPatternIdentifiers.Pattern, out pattern)? ((TransformPattern)pattern).Source.CanRotate: false); else if (property == ValuePatternIdentifiers.IsReadOnlyProperty) return (TryGetCurrentPattern (ValuePatternIdentifiers.Pattern, out pattern)? ((ValuePattern)pattern).Source.IsReadOnly: true); else if (property == ValuePatternIdentifiers.ValueProperty) return (TryGetCurrentPattern (ValuePatternIdentifiers.Pattern, out pattern)? ((ValuePattern)pattern).Source.Value: String.Empty); else if (property == WindowPatternIdentifiers.CanMaximizeProperty) return (TryGetCurrentPattern (WindowPatternIdentifiers.Pattern, out pattern)? (bool)((WindowPattern)pattern).Source.CanMaximize: false); else if (property == WindowPatternIdentifiers.CanMinimizeProperty) return (TryGetCurrentPattern (WindowPatternIdentifiers.Pattern, out pattern)? (bool)((WindowPattern)pattern).Source.CanMinimize: false); else if (property == WindowPatternIdentifiers.IsModalProperty) return (TryGetCurrentPattern (WindowPatternIdentifiers.Pattern, out pattern)? ((WindowPattern)pattern).Source.IsModal: false); else if (property == WindowPatternIdentifiers.IsTopmostProperty) return (TryGetCurrentPattern (WindowPatternIdentifiers.Pattern, out pattern)? ((WindowPattern)pattern).Source.IsTopmost: false); else if (property == WindowPatternIdentifiers.WindowInteractionStateProperty) return (TryGetCurrentPattern (WindowPatternIdentifiers.Pattern, out pattern)? ((WindowPattern)pattern).Source.WindowInteractionState: WindowInteractionState.Running); else if (property == WindowPatternIdentifiers.WindowVisualStateProperty) return (TryGetCurrentPattern (WindowPatternIdentifiers.Pattern, out pattern)? ((WindowPattern)pattern).Source.WindowVisualState: WindowVisualState.Normal); Log.Debug ("GetCurrentPropertyValue not implemented for: " + property.ProgrammaticName); return NotSupported; } public int [] GetRuntimeId () { return sourceElement.RuntimeId; } public AutomationPattern [] GetSupportedPatterns () { return sourceElement.GetSupportedPatterns (); } public AutomationProperty [] GetSupportedProperties () { return sourceElement.GetSupportedProperties (); } public AutomationElement GetUpdatedCache (CacheRequest request) { if (request == null) throw new ArgumentNullException ("request"); var updated = SourceManager.GetOrCreateAutomationElement (sourceElement); if (request == CacheRequest.DefaultRequest) return updated; if ((request.TreeScope & TreeScope.Element) == TreeScope.Element) { foreach (var property in request.CachedProperties) { updated.propertyCache [property.Id ] = new CachedValue (updated.GetCurrentPropertyValue (property), updated.sourceElement.SupportsProperty (property)); } updated.mode = request.AutomationElementMode; updated.CacheRequest = request.Clone (); } if ((request.TreeScope & TreeScope.Children) == TreeScope.Children || (request.TreeScope & TreeScope.Descendants) == TreeScope.Descendants) { // Modify scope to make sure children include // themselves, and only include their own // children if specified by original scope var childRequest = request.Clone (); childRequest.TreeScope |= TreeScope.Element; if ((request.TreeScope & TreeScope.Descendants) != TreeScope.Descendants) childRequest.TreeScope ^= TreeScope.Children; updated.cachedChildren = new List (); var child = TreeWalker.RawViewWalker.GetFirstChild (updated, childRequest); while (child != null) { if (childRequest.TreeFilter.AppliesTo (child)) { child.cachedParent = updated; updated.cachedChildren.Add (child); } child = TreeWalker.RawViewWalker.GetNextSibling (child, childRequest); } } return updated; } public void SetFocus () { sourceElement.SetFocus (); } public bool TryGetCachedPattern (AutomationPattern pattern, out Object patternObject) { try { patternObject = GetCachedPattern (pattern); return true; } catch (Exception) { patternObject = null; return false; } } public bool TryGetClickablePoint (out Point pt) { // TODO: Use this as sentinel value on dbus? pt = new Point (double.NegativeInfinity, double.NegativeInfinity); return false; } public bool TryGetCurrentPattern (AutomationPattern pattern, out Object patternObject) { try { patternObject = GetCurrentPattern (pattern); return true; } catch (Exception) { patternObject = null; return false; } } #endregion #region Public Static Methods public static AutomationElement FromHandle (IntPtr hwnd) { if (hwnd == (IntPtr) null || hwnd == IntPtr.Zero) throw new ArgumentException ("hwnd"); if (hwnd == NativeMethods.RootWindowHandle) return RootElement; AutomationElement element = null; foreach (var source in SourceManager.GetAutomationSources ()) { var sourceElement = source.GetElementFromHandle (hwnd); if (sourceElement != null) { element = SourceManager.GetOrCreateAutomationElement (sourceElement); break; } } if (element == null) throw new ElementNotAvailableException (); return element; } public static AutomationElement FromLocalProvider (IRawElementProviderSimple localImpl) { throw new NotImplementedException (); } public static AutomationElement FromPoint (Point pt) { IntPtr handle = NativeMethods.WindowAtPosition ((int) pt.X, (int) pt.Y); if (handle == IntPtr.Zero) return RootElement; AutomationElement startElement = FromHandle (handle); if (startElement == RootElement) return RootElement; //Keep searching the descendant element which are not native window var sourceElement = startElement.SourceElement. GetDescendantFromPoint (pt.X, pt.Y); return SourceManager.GetOrCreateAutomationElement (sourceElement); } public static bool operator == (AutomationElement left, AutomationElement right) { return object.Equals (left, right); } public static bool operator != (AutomationElement left, AutomationElement right) { return !(left == right); } #endregion #region Internal Methods internal object GetPropertyValue (AutomationProperty property, bool cached) { if (cached) return GetCachedPropertyValue (property); else return GetCurrentPropertyValue (property); } #endregion #region Private Methods private Object GetPattern (AutomationPattern pattern, bool cached) { if (pattern == null) throw new ArgumentNullException ("pattern"); if (cached && (CacheRequest == null || !CacheRequest.CachedPatterns.Contains (pattern))) throw new InvalidOperationException ("Cannot request a property or pattern that is not cached"); object source = sourceElement.GetCurrentPattern (pattern); if (source == null) throw new InvalidOperationException ("Cannot request an unsupported pattern"); if (pattern == DockPatternIdentifiers.Pattern) return new DockPattern ((IDockProvider) source, this, cached); else if (pattern == ExpandCollapsePatternIdentifiers.Pattern) return new ExpandCollapsePattern ((IExpandCollapseProvider) source, this, cached); else if (pattern == GridItemPatternIdentifiers.Pattern) return new GridItemPattern ((IGridItemPattern) source, this, cached); else if (pattern == GridPatternIdentifiers.Pattern) return new GridPattern ((IGridPattern) source, this, cached); else if (pattern == InvokePatternIdentifiers.Pattern) return new InvokePattern ((IInvokePattern) source); else if (pattern == MultipleViewPatternIdentifiers.Pattern) return new MultipleViewPattern ((IMultipleViewPattern) source, this, cached); else if (pattern == RangeValuePatternIdentifiers.Pattern) return new RangeValuePattern ((IRangeValuePattern) source, this, cached); else if (pattern == ScrollItemPatternIdentifiers.Pattern) return new ScrollItemPattern ((IScrollItemProvider) source); else if (pattern == ScrollPatternIdentifiers.Pattern) return new ScrollPattern ((IScrollPattern) source, this, cached); else if (pattern == SelectionItemPatternIdentifiers.Pattern) return new SelectionItemPattern ((ISelectionItemPattern) source, this, cached); else if (pattern == SelectionPatternIdentifiers.Pattern) return new SelectionPattern ((ISelectionPattern) source, this, cached); else if (pattern == TableItemPatternIdentifiers.Pattern) return new TableItemPattern ((ITableItemPattern) source, this, cached); else if (pattern == TablePatternIdentifiers.Pattern) return new TablePattern ((ITablePattern) source, this, cached); else if (pattern == TextPatternIdentifiers.Pattern) return new TextPattern ((ITextPattern) source); else if (pattern == TogglePatternIdentifiers.Pattern) return new TogglePattern ((IToggleProvider) source, this, cached); else if (pattern == TransformPatternIdentifiers.Pattern) return new TransformPattern ((ITransformPattern) source, this, cached); else if (pattern == ValuePatternIdentifiers.Pattern) return new ValuePattern ((IValuePattern) source, this, cached); else if (pattern == WindowPatternIdentifiers.Pattern) return new WindowPattern ((IWindowPattern) source, this, cached); else throw new ArgumentException (); } private List Find (TreeScope scope, Condition condition, bool findFirst) { // Parent and Ancestors scopes are not supported on // Windows (this is specified in MSDN, too). if ((scope & TreeScope.Parent) == TreeScope.Parent || (scope & TreeScope.Ancestors) == TreeScope.Ancestors) throw new ArgumentException ("scope"); List found = new List (); if ((!findFirst || found.Count == 0) && (scope & TreeScope.Element) == TreeScope.Element && condition.AppliesTo (this) && (CacheRequest.Current == CacheRequest.DefaultRequest || CacheRequest.Current.TreeFilter.AppliesTo (this))) { // TODO: Need to check request's TreeScope, too? found.Add (GetUpdatedCache (CacheRequest.Current)); } if ((!findFirst || found.Count == 0) && ((scope & TreeScope.Children) == TreeScope.Children || (scope & TreeScope.Descendants) == TreeScope.Descendants)) { TreeScope childScope = TreeScope.Element; if ((scope & TreeScope.Descendants) == TreeScope.Descendants) childScope = TreeScope.Subtree; AutomationElement current = TreeWalker.RawViewWalker.GetFirstChild (this); while (current != null) { //Log.Debug ("Inspecting child: " + current.Current.Name); found.AddRange (current.Find (childScope, condition, findFirst)); if (findFirst && found.Count > 0) break; current = TreeWalker.RawViewWalker.GetNextSibling (current); } } return found; } // private static string PrintRuntimeId (int [] runtimeId) // { // string output = "{"; // for (int i = 0; i < runtimeId.Length; i++) { // output += runtimeId [i].ToString (); // if ((i+1) < runtimeId.Length) // output += ","; // } // return output + "}"; // } class CachedValue { public bool IsSupported { get; private set; } public Object Value { get; private set; } public CachedValue (object val, bool isSupported) { Value = val; IsSupported = isSupported; } } #endregion #region Public Static ReadOnly Fields public static readonly Object NotSupported = AEIds.NotSupported; public static readonly AutomationProperty AcceleratorKeyProperty = AEIds.AcceleratorKeyProperty; public static readonly AutomationProperty AccessKeyProperty = AEIds.AccessKeyProperty; public static readonly AutomationProperty AutomationIdProperty = AEIds.AutomationIdProperty; public static readonly AutomationProperty BoundingRectangleProperty = AEIds.BoundingRectangleProperty; public static readonly AutomationProperty ClassNameProperty = AEIds.ClassNameProperty; public static readonly AutomationProperty ClickablePointProperty = AEIds.ClickablePointProperty; public static readonly AutomationProperty ControlTypeProperty = AEIds.ControlTypeProperty; public static readonly AutomationProperty CultureProperty = AEIds.CultureProperty; public static readonly AutomationProperty FrameworkIdProperty = AEIds.FrameworkIdProperty; public static readonly AutomationProperty HasKeyboardFocusProperty = AEIds.HasKeyboardFocusProperty; public static readonly AutomationProperty HelpTextProperty = AEIds.HelpTextProperty; public static readonly AutomationProperty IsContentElementProperty = AEIds.IsContentElementProperty; public static readonly AutomationProperty IsControlElementProperty = AEIds.IsControlElementProperty; public static readonly AutomationProperty IsDockPatternAvailableProperty = AEIds.IsDockPatternAvailableProperty; public static readonly AutomationProperty IsEnabledProperty = AEIds.IsEnabledProperty; public static readonly AutomationProperty IsExpandCollapsePatternAvailableProperty = AEIds.IsExpandCollapsePatternAvailableProperty; public static readonly AutomationProperty IsGridItemPatternAvailableProperty = AEIds.IsGridItemPatternAvailableProperty; public static readonly AutomationProperty IsGridPatternAvailableProperty = AEIds.IsGridPatternAvailableProperty; public static readonly AutomationProperty IsInvokePatternAvailableProperty = AEIds.IsInvokePatternAvailableProperty; public static readonly AutomationProperty IsKeyboardFocusableProperty = AEIds.IsKeyboardFocusableProperty; public static readonly AutomationProperty IsMultipleViewPatternAvailableProperty = AEIds.IsMultipleViewPatternAvailableProperty; public static readonly AutomationProperty IsOffscreenProperty = AEIds.IsOffscreenProperty; public static readonly AutomationProperty IsPasswordProperty = AEIds.IsPasswordProperty; public static readonly AutomationProperty IsRangeValuePatternAvailableProperty = AEIds.IsRangeValuePatternAvailableProperty; public static readonly AutomationProperty IsRequiredForFormProperty = AEIds.IsRequiredForFormProperty; public static readonly AutomationProperty IsScrollItemPatternAvailableProperty = AEIds.IsScrollItemPatternAvailableProperty; public static readonly AutomationProperty IsScrollPatternAvailableProperty = AEIds.IsScrollPatternAvailableProperty; public static readonly AutomationProperty IsSelectionItemPatternAvailableProperty = AEIds.IsSelectionItemPatternAvailableProperty; public static readonly AutomationProperty IsSelectionPatternAvailableProperty = AEIds.IsSelectionPatternAvailableProperty; public static readonly AutomationProperty IsTableItemPatternAvailableProperty = AEIds.IsTableItemPatternAvailableProperty; public static readonly AutomationProperty IsTablePatternAvailableProperty = AEIds.IsTablePatternAvailableProperty; public static readonly AutomationProperty IsTextPatternAvailableProperty = AEIds.IsTextPatternAvailableProperty; public static readonly AutomationProperty IsTogglePatternAvailableProperty = AEIds.IsTogglePatternAvailableProperty; public static readonly AutomationProperty IsTransformPatternAvailableProperty = AEIds.IsTransformPatternAvailableProperty; public static readonly AutomationProperty IsValuePatternAvailableProperty = AEIds.IsValuePatternAvailableProperty; public static readonly AutomationProperty IsWindowPatternAvailableProperty = AEIds.IsWindowPatternAvailableProperty; public static readonly AutomationProperty ItemStatusProperty = AEIds.ItemStatusProperty; public static readonly AutomationProperty ItemTypeProperty = AEIds.ItemTypeProperty; public static readonly AutomationProperty LabeledByProperty = AEIds.LabeledByProperty; public static readonly AutomationProperty LocalizedControlTypeProperty = AEIds.LocalizedControlTypeProperty; public static readonly AutomationProperty NameProperty = AEIds.NameProperty; public static readonly AutomationProperty NativeWindowHandleProperty = AEIds.NativeWindowHandleProperty; public static readonly AutomationProperty OrientationProperty = AEIds.OrientationProperty; public static readonly AutomationProperty ProcessIdProperty = AEIds.ProcessIdProperty; public static readonly AutomationProperty RuntimeIdProperty = AEIds.RuntimeIdProperty; public static readonly AutomationEvent AsyncContentLoadedEvent = AEIds.AsyncContentLoadedEvent; public static readonly AutomationEvent AutomationFocusChangedEvent = AEIds.AutomationFocusChangedEvent; public static readonly AutomationEvent AutomationPropertyChangedEvent = AEIds.AutomationPropertyChangedEvent; public static readonly AutomationEvent LayoutInvalidatedEvent = AEIds.LayoutInvalidatedEvent; public static readonly AutomationEvent MenuClosedEvent = AEIds.MenuClosedEvent; public static readonly AutomationEvent MenuOpenedEvent = AEIds.MenuOpenedEvent; public static readonly AutomationEvent StructureChangedEvent = AEIds.StructureChangedEvent; public static readonly AutomationEvent ToolTipClosedEvent = AEIds.ToolTipClosedEvent; public static readonly AutomationEvent ToolTipOpenedEvent = AEIds.ToolTipOpenedEvent; #endregion } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/OrCondition.cs0000644000016200001670000000326111433571545027320 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; namespace System.Windows.Automation { public class OrCondition : Condition { private Condition [] conditions; public OrCondition (params Condition [] conditions) { this.conditions = conditions; } public Condition [] GetConditions () { return conditions; } internal override bool AppliesTo (AutomationElement element) { foreach (Condition cond in conditions) if (cond.AppliesTo (element)) return true; return false; } } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/MultipleViewPattern.cs0000644000016200001670000000644211433571545031061 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // Mike Gorse // using System; using Mono.UIAutomation.Source; namespace System.Windows.Automation { public class MultipleViewPattern : BasePattern { public struct MultipleViewPatternInformation { private bool cache; private MultipleViewPattern pattern; internal MultipleViewPatternInformation (MultipleViewPattern pattern, bool cache) { this.pattern = pattern; this.cache = cache; } public int CurrentView { get { return (int) pattern.element.GetPropertyValue (CurrentViewProperty, cache); } } public int [] GetSupportedViews () { return (int []) pattern.element.GetPropertyValue (SupportedViewsProperty, cache); } } private AutomationElement element; private bool cached; private MultipleViewPatternInformation currentInfo; private MultipleViewPatternInformation cachedInfo; internal MultipleViewPattern () { } internal MultipleViewPattern (IMultipleViewPattern source, AutomationElement element, bool cached) { this.element = element; this.cached = cached; this.Source = source; currentInfo = new MultipleViewPatternInformation (this, false); if (cached) cachedInfo = new MultipleViewPatternInformation (this, true); } internal IMultipleViewPattern Source { get; private set; } public MultipleViewPatternInformation Cached { get { if (!cached) throw new InvalidOperationException ("Cannot request a property or pattern that is not cached"); return cachedInfo; } } public MultipleViewPatternInformation Current { get { return currentInfo; } } public string GetViewName (int viewId) { return Source.GetViewName (viewId); } public void SetCurrentView (int viewId) { Source.SetCurrentView (viewId); } public static readonly AutomationPattern Pattern = MultipleViewPatternIdentifiers.Pattern; public static readonly AutomationProperty CurrentViewProperty = MultipleViewPatternIdentifiers.CurrentViewProperty; public static readonly AutomationProperty SupportedViewsProperty = MultipleViewPatternIdentifiers.SupportedViewsProperty; } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/AndCondition.cs0000644000016200001670000000326411433571545027445 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; namespace System.Windows.Automation { public class AndCondition : Condition { private Condition [] conditions; public AndCondition (params Condition [] conditions) { this.conditions = conditions; } public Condition [] GetConditions () { return conditions; } internal override bool AppliesTo (AutomationElement element) { foreach (Condition cond in conditions) if (!cond.AppliesTo (element)) return false; return true; } } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/ClientSideProviderDescription.cs0000644000016200001670000000467211433571545033042 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2010 Novell, Inc. (http://www.novell.com) // // Authors: // Matt Guo // using System; using System.Windows.Automation.Provider; namespace System.Windows.Automation { public struct ClientSideProviderDescription { public ClientSideProviderDescription ( ClientSideProviderFactoryCallback clientSideProviderFactoryCallback, string className) : this (clientSideProviderFactoryCallback, className, null, ClientSideProviderMatchIndicator.None) { } public ClientSideProviderDescription ( ClientSideProviderFactoryCallback clientSideProviderFactoryCallback, string className, string imageName, ClientSideProviderMatchIndicator flags) { this.ClientSideProviderFactoryCallback = clientSideProviderFactoryCallback; this.ClassName = className; this.ImageName = imageName; this.Flags = flags; } public string ClassName { get; private set; } public ClientSideProviderMatchIndicator Flags { get; private set; } public string ImageName { get; private set; } public ClientSideProviderFactoryCallback ClientSideProviderFactoryCallback { get; private set; } } [Flags] public enum ClientSideProviderMatchIndicator { None, AllowSubstringMatch, DisallowBaseClassNameMatch } public delegate IRawElementProviderSimple ClientSideProviderFactoryCallback (IntPtr hwnd, int idChild, int idObject); } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/TransformPattern.cs0000644000016200001670000000676211433571545030413 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // Mike Gorse // using System; using Mono.UIAutomation.Source; namespace System.Windows.Automation { public class TransformPattern : BasePattern { public struct TransformPatternInformation { private bool cache; private TransformPattern pattern; internal TransformPatternInformation (TransformPattern pattern, bool cache) { this.pattern = pattern; this.cache = cache; } public bool CanMove { get { return (bool) pattern.element.GetPropertyValue (CanMoveProperty, cache); } } public bool CanResize { get { return (bool) pattern.element.GetPropertyValue (CanResizeProperty, cache); } } public bool CanRotate { get { return (bool) pattern.element.GetPropertyValue (CanRotateProperty, cache); } } } private AutomationElement element; private bool cached; private TransformPatternInformation currentInfo; private TransformPatternInformation cachedInfo; internal TransformPattern () { } internal TransformPattern (ITransformPattern source, AutomationElement element, bool cached) { this.element = element; this.cached = cached; this.Source = source; currentInfo = new TransformPatternInformation (this, false); if (cached) cachedInfo = new TransformPatternInformation (this, true); } internal ITransformPattern Source { get; private set; } public TransformPatternInformation Cached { get { if (!cached) throw new InvalidOperationException ("Cannot request a property or pattern that is not cached"); return cachedInfo; } } public TransformPatternInformation Current { get { return currentInfo; } } public void Move (double x, double y) { Source.Move (x, y); } public void Resize (double width, double height) { Source.Resize (width, height); } public void Rotate (double degrees) { Source.Rotate (degrees); } public static readonly AutomationPattern Pattern = TransformPatternIdentifiers.Pattern; public static readonly AutomationProperty CanMoveProperty = TransformPatternIdentifiers.CanMoveProperty; public static readonly AutomationProperty CanResizeProperty = TransformPatternIdentifiers.CanResizeProperty; public static readonly AutomationProperty CanRotateProperty = TransformPatternIdentifiers.CanRotateProperty; } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/RangeValuePattern.cs0000644000016200001670000001006311433571545030456 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // Mike Gorse // using System; using Mono.UIAutomation.Source; namespace System.Windows.Automation { public class RangeValuePattern : BasePattern { public struct RangeValuePatternInformation { private bool cache; private RangeValuePattern pattern; internal RangeValuePatternInformation (RangeValuePattern pattern, bool cache) { this.pattern = pattern; this.cache = cache; } public double Value { get { return (double) pattern.element.GetPropertyValue (ValueProperty, cache); } } public bool IsReadOnly { get { return (bool) pattern.element.GetPropertyValue (IsReadOnlyProperty, cache); } } public double Maximum { get { return (double) pattern.element.GetPropertyValue (MaximumProperty, cache); } } public double Minimum { get { return (double) pattern.element.GetPropertyValue (MinimumProperty, cache); } } public double LargeChange { get { return (double) pattern.element.GetPropertyValue (LargeChangeProperty, cache); } } public double SmallChange { get { return (double) pattern.element.GetPropertyValue (SmallChangeProperty, cache); } } } private AutomationElement element; private bool cached; private RangeValuePatternInformation currentInfo; private RangeValuePatternInformation cachedInfo; internal RangeValuePattern () { } internal RangeValuePattern (IRangeValuePattern source, AutomationElement element, bool cached) { this.element = element; this.cached = cached; this.Source = source; currentInfo = new RangeValuePatternInformation (this, false); if (cached) cachedInfo = new RangeValuePatternInformation (this, true); } internal IRangeValuePattern Source { get; private set; } public RangeValuePatternInformation Cached { get { if (!cached) throw new InvalidOperationException ("Cannot request a property or pattern that is not cached"); return cachedInfo; } } public RangeValuePatternInformation Current { get { return currentInfo; } } public void SetValue (double value) { Source.SetValue (value); } public static readonly AutomationPattern Pattern = RangeValuePatternIdentifiers.Pattern; public static readonly AutomationProperty ValueProperty = RangeValuePatternIdentifiers.ValueProperty; public static readonly AutomationProperty IsReadOnlyProperty = RangeValuePatternIdentifiers.IsReadOnlyProperty; public static readonly AutomationProperty MinimumProperty = RangeValuePatternIdentifiers.MinimumProperty; public static readonly AutomationProperty MaximumProperty = RangeValuePatternIdentifiers.MaximumProperty; public static readonly AutomationProperty LargeChangeProperty = RangeValuePatternIdentifiers.LargeChangeProperty; public static readonly AutomationProperty SmallChangeProperty = RangeValuePatternIdentifiers.SmallChangeProperty; } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/NotCondition.cs0000644000016200001670000000313711433571545027502 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; namespace System.Windows.Automation { public class NotCondition : Condition { private Condition condition; public NotCondition (Condition condition) { this.condition = condition; } public Condition Condition { get { return condition; } } internal override bool AppliesTo (AutomationElement element) { return !condition.AppliesTo (element); } } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/ClientSettings.cs0000644000016200001670000000537611433571545030041 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2010 Novell, Inc. (http://www.novell.com) // // Authors: // Matt Guo // using System; using System.Reflection; using System.IO; namespace System.Windows.Automation { public static class ClientSettings { public static void RegisterClientSideProviderAssembly (AssemblyName assemblyName) { if (assemblyName == null) throw new ArgumentNullException ("assemblyName"); Assembly assembly = null; // TODO, wrap exception messages into Catalog.GetString try { assembly = Assembly.Load (assemblyName); } catch (FileNotFoundException) { throw new ProxyAssemblyNotLoadedException ( string.Format ("'{0}' assembly not found.", assemblyName)); } string typeName = assemblyName.Name + ".UIAutomationClientSideProviders"; Type type = assembly.GetType(typeName); if (type == null) throw new ProxyAssemblyNotLoadedException ( string.Format ("Cannot find type {0} in assembly {1}", typeName, assemblyName)); FieldInfo field = type.GetField("ClientSideProviderDescriptionTable", BindingFlags.Public | BindingFlags.Static); if ((field == null) || (field.FieldType != typeof(ClientSideProviderDescription[]))) throw new ProxyAssemblyNotLoadedException ( string.Format ("Cannot find Register method on type {0} in assembly {1}", typeName, assemblyName)); var description = field.GetValue(null) as ClientSideProviderDescription []; if (description != null) ClientSettings.RegisterClientSideProviders (description); } public static void RegisterClientSideProviders ( ClientSideProviderDescription [] clientSideProviderDescription) { throw new NotImplementedException (); } } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/BasePattern.cs0000644000016200001670000000247611433571545027310 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Brad Taylor // using System; namespace System.Windows.Automation { public class BasePattern { internal BasePattern () { } } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/DesktopElement.cs0000644000016200001670000001351111433571545030013 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using Mono.UIAutomation.Source; namespace System.Windows.Automation { internal class DesktopElement : IElement { #region IElement implementation public bool SupportsProperty (AutomationProperty property) { // TODO: Implement return true; } public string AcceleratorKey { get { return string.Empty; } } public string AccessKey { get { return string.Empty; } } public string AutomationId { get { return string.Empty; } } public Rect BoundingRectangle { get { int width, height; NativeMethods.GetScreenBound (out width, out height); return new Rect (0, 0, width, height); } } public string ClassName { get { return string.Empty; } } public Point ClickablePoint { get { return new Point (double.NegativeInfinity, double.NegativeInfinity); } } public ControlType ControlType { get { return ControlType.Pane; } } public string FrameworkId { get { return string.Empty; } } public bool HasKeyboardFocus { get { return false; } } public string HelpText { get { return string.Empty; } } public bool IsContentElement { get { return true; } } public bool IsControlElement { get { return true; } } public bool IsEnabled { get { return true; } } public bool IsKeyboardFocusable { get { return false; } } public bool IsOffscreen { get { return false; } } public bool IsPassword { get { return false; } } public bool IsRequiredForForm { get { return false; } } public string ItemStatus { get { return string.Empty; } } public string ItemType { get { return string.Empty; } } public IElement LabeledBy { get { return null; } } public string LocalizedControlType { get { return ControlType.LocalizedControlType; } } public string Name { get { return string.Empty; } } public int NativeWindowHandle { get { return -1; } } public OrientationType Orientation { get { return OrientationType.None; } } public int ProcessId { get { return -1; } } public int[] RuntimeId { get { return new int[0]; } } public IElement Parent { get { return null; } } public IElement FirstChild { get { throw new NotImplementedException (); } } public IElement LastChild { get { throw new NotImplementedException (); } } public IElement NextSibling { get { return null; } } public IElement PreviousSibling { get { return null; } } public IAutomationSource AutomationSource { get { return null; } } public object GetCurrentPattern (AutomationPattern pattern) { throw new InvalidOperationException (); } public AutomationPattern [] GetSupportedPatterns () { return new AutomationPattern [0]; } public AutomationProperty [] GetSupportedProperties () { //TODO need to test whether other properties' values are 'NotSupported' return new AutomationProperty [] { AutomationElementIdentifiers.AcceleratorKeyProperty, AutomationElementIdentifiers.AccessKeyProperty, AutomationElementIdentifiers.AutomationIdProperty, AutomationElementIdentifiers.BoundingRectangleProperty, AutomationElementIdentifiers.ClassNameProperty, AutomationElementIdentifiers.ControlTypeProperty, AutomationElementIdentifiers.FrameworkIdProperty, AutomationElementIdentifiers.HasKeyboardFocusProperty, AutomationElementIdentifiers.HelpTextProperty, AutomationElementIdentifiers.ItemStatusProperty, AutomationElementIdentifiers.ItemTypeProperty, AutomationElementIdentifiers.IsControlElementProperty, AutomationElementIdentifiers.IsContentElementProperty, AutomationElementIdentifiers.IsEnabledProperty, AutomationElementIdentifiers.IsKeyboardFocusableProperty, AutomationElementIdentifiers.IsOffscreenProperty, AutomationElementIdentifiers.IsPasswordProperty, AutomationElementIdentifiers.IsRequiredForFormProperty, AutomationElementIdentifiers.LabeledByProperty, AutomationElementIdentifiers.LocalizedControlTypeProperty, AutomationElementIdentifiers.NameProperty, AutomationElementIdentifiers.OrientationProperty, AutomationElementIdentifiers.ProcessIdProperty, AutomationElementIdentifiers.RuntimeIdProperty }; } public void SetFocus () { // TODO: Need to test } public IElement GetDescendantFromPoint (double x, double y) { //Root element show have no child element which is not //a native window return this; } #endregion } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/GridItemPattern.cs0000644000016200001670000000731011433571545030132 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // Mike Gorse // using System; using Mono.UIAutomation.Source; namespace System.Windows.Automation { public class GridItemPattern : BasePattern { public struct GridItemPatternInformation { private bool cache; private GridItemPattern pattern; internal GridItemPatternInformation (GridItemPattern pattern, bool cache) { this.pattern = pattern; this.cache = cache; } public int Row { get { return (int) pattern.element.GetPropertyValue (RowProperty, cache); } } public int Column { get { return (int) pattern.element.GetPropertyValue (ColumnProperty, cache); } } public int RowSpan { get { return (int) pattern.element.GetPropertyValue (RowSpanProperty, cache); } } public int ColumnSpan { get { return (int) pattern.element.GetPropertyValue (ColumnSpanProperty, cache); } } public AutomationElement ContainingGrid { get { return (AutomationElement) pattern.element.GetPropertyValue (ContainingGridProperty, cache); } } } private AutomationElement element; private bool cached; private GridItemPatternInformation currentInfo; private GridItemPatternInformation cachedInfo; internal GridItemPattern () { } internal GridItemPattern (IGridItemPattern source, AutomationElement element, bool cached) { this.element = element; this.cached = cached; this.Source = source; currentInfo = new GridItemPatternInformation (this, false); if (cached) cachedInfo = new GridItemPatternInformation (this, true); } internal IGridItemPattern Source { get; private set; } public GridItemPatternInformation Cached { get { if (!cached) throw new InvalidOperationException ("Cannot request a property or pattern that is not cached"); return cachedInfo; } } public GridItemPatternInformation Current { get { return currentInfo; } } public static readonly AutomationPattern Pattern = GridItemPatternIdentifiers.Pattern; public static readonly AutomationProperty RowProperty = GridItemPatternIdentifiers.RowProperty; public static readonly AutomationProperty ColumnProperty = GridItemPatternIdentifiers.ColumnProperty; public static readonly AutomationProperty RowSpanProperty = GridItemPatternIdentifiers.RowSpanProperty; public static readonly AutomationProperty ColumnSpanProperty = GridItemPatternIdentifiers.ColumnSpanProperty; public static readonly AutomationProperty ContainingGridProperty = GridItemPatternIdentifiers.ContainingGridProperty; } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/GridPattern.cs0000644000016200001670000000606711433571545027323 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using Mono.UIAutomation.Source; namespace System.Windows.Automation { public class GridPattern : BasePattern { public struct GridPatternInformation { private bool cache; private GridPattern pattern; internal GridPatternInformation (GridPattern pattern, bool cache) { this.pattern = pattern; this.cache = cache; } public int RowCount { get { return (int) pattern.element.GetPropertyValue (RowCountProperty, cache); } } public int ColumnCount { get { return (int) pattern.element.GetPropertyValue (ColumnCountProperty, cache); } } } private AutomationElement element; private bool cached; private GridPatternInformation currentInfo; private GridPatternInformation cachedInfo; internal GridPattern () { } internal GridPattern (IGridPattern source, AutomationElement element, bool cached) { this.element = element; this.cached = cached; this.Source = source; currentInfo = new GridPatternInformation (this, false); if (cached) cachedInfo = new GridPatternInformation (this, true); } internal IGridPattern Source { get; private set; } public GridPatternInformation Cached { get { if (!cached) throw new InvalidOperationException ("Cannot request a property or pattern that is not cached"); return cachedInfo; } } public GridPatternInformation Current { get { return currentInfo; } } public AutomationElement GetItem (int row, int column) { return SourceManager.GetOrCreateAutomationElement (Source.GetItem (row, column)); } public static readonly AutomationPattern Pattern = GridPatternIdentifiers.Pattern; public static readonly AutomationProperty RowCountProperty = GridPatternIdentifiers.RowCountProperty; public static readonly AutomationProperty ColumnCountProperty = GridPatternIdentifiers.ColumnCountProperty; } } AutomationElement.AutomationElementInformation.cs0000644000016200001670000001211511433571545036301 0ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationClient/System.Windows.Automation// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using Mono.UIAutomation.Source; namespace System.Windows.Automation { public sealed partial class AutomationElement { public struct AutomationElementInformation { private AutomationElement element; bool cache; internal AutomationElementInformation (AutomationElement element, bool cache) { this.element = element; this.cache = cache; } public string AcceleratorKey { get { return (string) element.GetPropertyValue (AutomationElement.AcceleratorKeyProperty, cache); } } public string AccessKey { get { return (string) element.GetPropertyValue (AutomationElement.AccessKeyProperty, cache); } } public string AutomationId { get { return (string) element.GetPropertyValue (AutomationElement.AutomationIdProperty, cache); } } public Rect BoundingRectangle { get { return (Rect) element.GetPropertyValue (AutomationElement.BoundingRectangleProperty, cache); } } public string ClassName { get { return (string) element.GetPropertyValue (AutomationElement.ClassNameProperty, cache); } } public ControlType ControlType { get { return (ControlType) element.GetPropertyValue (AutomationElement.ControlTypeProperty, cache); } } public string FrameworkId { get { return (string) element.GetPropertyValue (AutomationElement.FrameworkIdProperty, cache); } } public bool HasKeyboardFocus { get { return (bool) element.GetPropertyValue (AutomationElement.HasKeyboardFocusProperty, cache); } } public string HelpText { get { return (string) element.GetPropertyValue (AutomationElement.HelpTextProperty, cache); } } public bool IsContentElement { get { return (bool) element.GetPropertyValue (AutomationElement.IsContentElementProperty, cache); } } public bool IsControlElement { get { return (bool) element.GetPropertyValue (AutomationElement.IsControlElementProperty, cache); } } public bool IsEnabled { get { return (bool) element.GetPropertyValue (AutomationElement.IsEnabledProperty, cache); } } public bool IsKeyboardFocusable { get { return (bool) element.GetPropertyValue (AutomationElement.IsKeyboardFocusableProperty, cache); } } public bool IsOffscreen { get { return (bool) element.GetPropertyValue (AutomationElement.IsOffscreenProperty, cache); } } public bool IsPassword { get { return (bool) element.GetPropertyValue (AutomationElement.IsPasswordProperty, cache); } } public bool IsRequiredForForm { get { return (bool) element.GetPropertyValue (AutomationElement.IsRequiredForFormProperty, cache); } } public string ItemStatus { get { return (string) element.GetPropertyValue (AutomationElement.ItemStatusProperty, cache); } } public string ItemType { get { return (string) element.GetPropertyValue (AutomationElement.ItemTypeProperty, cache); } } public AutomationElement LabeledBy { get { return (AutomationElement) element.GetPropertyValue (AutomationElement.LabeledByProperty, cache); } } public string LocalizedControlType { get { return (string) element.GetPropertyValue (AutomationElement.LocalizedControlTypeProperty, cache); } } public string Name { get { return (string) element.GetPropertyValue (AutomationElement.NameProperty, cache); } } public int NativeWindowHandle { get { return (int) element.GetPropertyValue (AutomationElement.NativeWindowHandleProperty, cache); } } public OrientationType Orientation { get { return (OrientationType) element.GetPropertyValue (AutomationElement.OrientationProperty, cache); } } public int ProcessId { get { return (int) element.GetPropertyValue (AutomationElement.ProcessIdProperty, cache); } } } } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/DockPattern.cs0000644000016200001670000000556311433571545027316 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // Mike Gorse // using System; using System.Windows.Automation.Provider; namespace System.Windows.Automation { public class DockPattern : BasePattern { public struct DockPatternInformation { private bool cache; private DockPattern pattern; internal DockPatternInformation (DockPattern pattern, bool cache) { this.pattern = pattern; this.cache = cache; } public DockPosition DockPosition { get { return (DockPosition) pattern.element.GetPropertyValue (DockPositionProperty, cache); } } } private AutomationElement element; private bool cached; private DockPatternInformation currentInfo; private DockPatternInformation cachedInfo; internal DockPattern () { } internal DockPattern (IDockProvider source, AutomationElement element, bool cached) { this.element = element; this.cached = cached; this.Source = source; currentInfo = new DockPatternInformation (this, false); if (cached) cachedInfo = new DockPatternInformation (this, true); } internal IDockProvider Source { get; private set; } public DockPatternInformation Cached { get { if (!cached) throw new InvalidOperationException ("Cannot request a property or pattern that is not cached"); return cachedInfo; } } public DockPatternInformation Current { get { return currentInfo; } } public void SetDockPosition (DockPosition dockPosition) { Source.SetDockPosition (dockPosition); } public static readonly AutomationPattern Pattern = DockPatternIdentifiers.Pattern; public static readonly AutomationProperty DockPositionProperty = DockPatternIdentifiers.DockPositionProperty; } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/Automation.cs0000644000016200001670000004737411433571545027226 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using System.Collections.Generic; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using MUS = Mono.UIAutomation.Source; namespace System.Windows.Automation { public static class Automation { private static Dictionary focusHandlerMapping = new Dictionary (); static Automation () { RawViewCondition = Condition.TrueCondition; ControlViewCondition = new NotCondition (new PropertyCondition (AEIds.IsControlElementProperty, false)); ContentViewCondition = new NotCondition (new OrCondition (new PropertyCondition (AEIds.IsControlElementProperty, false), new PropertyCondition (AEIds.IsContentElementProperty, false))); } public static bool Compare (int [] runtimeId1, int [] runtimeId2) { if (runtimeId1 == null) throw new ArgumentNullException ("runtimeId1"); if (runtimeId2 == null) throw new ArgumentNullException ("runtimeId2"); if (runtimeId1.Length != runtimeId2.Length) return false; for (int i = 0; i < runtimeId1.Length; i++) if (runtimeId1 [i] != runtimeId2 [i]) return false; return true; } public static bool Compare (AutomationElement el1, AutomationElement el2) { if (el1 == null) throw new ArgumentNullException ("el1"); if (el2 == null) throw new ArgumentNullException ("el2"); return Compare (el1.GetRuntimeId (), el2.GetRuntimeId ()); } public static string PatternName (AutomationPattern pattern) { if (pattern == null) throw new ArgumentNullException ("pattern"); if (pattern == DockPatternIdentifiers.Pattern) return "Dock"; else if (pattern == ExpandCollapsePatternIdentifiers.Pattern) return "ExpandCollapse"; else if (pattern == GridItemPatternIdentifiers.Pattern) return "GridItem"; else if (pattern == GridPatternIdentifiers.Pattern) return "Grid"; else if (pattern == InvokePatternIdentifiers.Pattern) return "Invoke"; else if (pattern == MultipleViewPatternIdentifiers.Pattern) return "MultipleView"; else if (pattern == RangeValuePatternIdentifiers.Pattern) return "RangeValue"; else if (pattern == ScrollItemPatternIdentifiers.Pattern) return "ScrollItem"; else if (pattern == ScrollPatternIdentifiers.Pattern) return "Scroll"; else if (pattern == SelectionItemPatternIdentifiers.Pattern) return "SelectionItem"; else if (pattern == SelectionPatternIdentifiers.Pattern) return "Selection"; else if (pattern == TableItemPatternIdentifiers.Pattern) return "TableItem"; else if (pattern == TablePatternIdentifiers.Pattern) return "Table"; else if (pattern == TextPatternIdentifiers.Pattern) return "Text"; else if (pattern == TogglePatternIdentifiers.Pattern) return "Toggle"; else if (pattern == TransformPatternIdentifiers.Pattern) return "Transform"; else if (pattern == ValuePatternIdentifiers.Pattern) return "Value"; else if (pattern == WindowPatternIdentifiers.Pattern) return "Window"; return null; } public static string PropertyName (AutomationProperty property) { if (property == null) throw new ArgumentNullException ("property"); if (property == AEIds.AcceleratorKeyProperty) return "AcceleratorKey"; else if (property == AEIds.AccessKeyProperty) return "AccessKey"; else if (property == AEIds.AutomationIdProperty) return "AutomationId"; else if (property == AEIds.BoundingRectangleProperty) return "BoundingRectangle"; else if (property == AEIds.ClassNameProperty) return "ClassName"; else if (property == AEIds.ClickablePointProperty) return "ClickablePoint"; else if (property == AEIds.ControlTypeProperty) return "ControlType"; else if (property == AEIds.CultureProperty) return "Culture"; else if (property == AEIds.FrameworkIdProperty) return "FrameworkId"; else if (property == AEIds.HasKeyboardFocusProperty) return "HasKeyboardFocus"; else if (property == AEIds.HelpTextProperty) return "HelpText"; else if (property == AEIds.IsContentElementProperty) return "IsContentElement"; else if (property == AEIds.IsControlElementProperty) return "IsControlElement"; else if (property == AEIds.IsDockPatternAvailableProperty) return "IsDockPatternAvailable"; else if (property == AEIds.IsEnabledProperty) return "IsEnabled"; else if (property == AEIds.IsExpandCollapsePatternAvailableProperty) return "IsExpandCollapsePatternAvailable"; else if (property == AEIds.IsGridItemPatternAvailableProperty) return "IsGridItemPatternAvailable"; else if (property == AEIds.IsGridPatternAvailableProperty) return "IsGridPatternAvailable"; else if (property == AEIds.IsInvokePatternAvailableProperty) return "IsInvokePatternAvailable"; else if (property == AEIds.IsKeyboardFocusableProperty) return "IsKeyboardFocusable"; else if (property == AEIds.IsMultipleViewPatternAvailableProperty) return "IsMultipleViewPatternAvailable"; else if (property == AEIds.IsOffscreenProperty) return "IsOffscreen"; else if (property == AEIds.IsPasswordProperty) return "IsPassword"; else if (property == AEIds.IsRangeValuePatternAvailableProperty) return "IsRangeValuePatternAvailable"; else if (property == AEIds.IsRequiredForFormProperty) return "IsRequiredForForm"; else if (property == AEIds.IsScrollItemPatternAvailableProperty) return "IsScrollItemPatternAvailable"; else if (property == AEIds.IsScrollPatternAvailableProperty) return "IsScrollPatternAvailable"; else if (property == AEIds.IsSelectionItemPatternAvailableProperty) return "IsSelectionItemPatternAvailable"; else if (property == AEIds.IsSelectionPatternAvailableProperty) return "IsSelectionPatternAvailable"; else if (property == AEIds.IsTableItemPatternAvailableProperty) return "IsTableItemPatternAvailable"; else if (property == AEIds.IsTablePatternAvailableProperty) return "IsTablePatternAvailable"; else if (property == AEIds.IsTextPatternAvailableProperty) return "IsTextPatternAvailable"; else if (property == AEIds.IsTogglePatternAvailableProperty) return "IsTogglePatternAvailable"; else if (property == AEIds.IsTransformPatternAvailableProperty) return "IsTransformPatternAvailable"; else if (property == AEIds.IsValuePatternAvailableProperty) return "IsValuePatternAvailable"; else if (property == AEIds.IsWindowPatternAvailableProperty) return "IsWindowPatternAvailable"; else if (property == AEIds.ItemStatusProperty) return "ItemStatus"; else if (property == AEIds.ItemTypeProperty) return "ItemType"; else if (property == AEIds.LabeledByProperty) return "LabeledBy"; else if (property == AEIds.LocalizedControlTypeProperty) return "LocalizedControlType"; else if (property == AEIds.NameProperty) return "Name"; else if (property == AEIds.NativeWindowHandleProperty) return "NativeWindowHandle"; else if (property == AEIds.OrientationProperty) return "Orientation"; else if (property == AEIds.ProcessIdProperty) return "ProcessId"; else if (property == AEIds.RuntimeIdProperty) return "RuntimeId"; else if (property == DockPatternIdentifiers.DockPositionProperty) return "DockPosition"; else if (property == ExpandCollapsePatternIdentifiers.ExpandCollapseStateProperty) return "ExpandCollapseState"; else if (property == GridItemPatternIdentifiers.ColumnProperty) return "Column"; else if (property == GridItemPatternIdentifiers.ColumnSpanProperty) return "ColumnSpan"; else if (property == GridItemPatternIdentifiers.ContainingGridProperty) return "ContainingGrid"; else if (property == GridItemPatternIdentifiers.RowProperty) return "Row"; else if (property == GridItemPatternIdentifiers.RowSpanProperty) return "RowSpan"; else if (property == GridPatternIdentifiers.ColumnCountProperty) return "ColumnCount"; else if (property == GridPatternIdentifiers.RowCountProperty) return "RowCount"; else if (property == MultipleViewPatternIdentifiers.CurrentViewProperty) return "CurrentView"; else if (property == MultipleViewPatternIdentifiers.SupportedViewsProperty) return "SupportedViews"; else if (property == RangeValuePatternIdentifiers.IsReadOnlyProperty) return "IsReadOnly"; else if (property == RangeValuePatternIdentifiers.LargeChangeProperty) return "LargeChange"; else if (property == RangeValuePatternIdentifiers.MaximumProperty) return "Maximum"; else if (property == RangeValuePatternIdentifiers.MinimumProperty) return "Minimum"; else if (property == RangeValuePatternIdentifiers.SmallChangeProperty) return "SmallChange"; else if (property == RangeValuePatternIdentifiers.ValueProperty) return "Value"; else if (property == ScrollPatternIdentifiers.HorizontallyScrollableProperty) return "HorizontallyScrollable"; else if (property == ScrollPatternIdentifiers.HorizontalScrollPercentProperty) return "HorizontalScrollPercent"; else if (property == ScrollPatternIdentifiers.HorizontalViewSizeProperty) return "HorizontalViewSize"; else if (property == ScrollPatternIdentifiers.VerticallyScrollableProperty) return "VerticallyScrollable"; else if (property == ScrollPatternIdentifiers.VerticalScrollPercentProperty) return "VerticalScrollPercent"; else if (property == ScrollPatternIdentifiers.VerticalViewSizeProperty) return "VerticalViewSize"; else if (property == SelectionItemPatternIdentifiers.IsSelectedProperty) return "IsSelected"; else if (property == SelectionItemPatternIdentifiers.SelectionContainerProperty) return "SelectionContainer"; else if (property == SelectionPatternIdentifiers.CanSelectMultipleProperty) return "CanSelectMultiple"; else if (property == SelectionPatternIdentifiers.IsSelectionRequiredProperty) return "IsSelectionRequired"; else if (property == SelectionPatternIdentifiers.SelectionProperty) return "Selection"; else if (property == TableItemPatternIdentifiers.ColumnHeaderItemsProperty) return "ColumnHeaderItems"; else if (property == TableItemPatternIdentifiers.RowHeaderItemsProperty) return "RowHeaderItems"; else if (property == TablePatternIdentifiers.ColumnHeadersProperty) return "ColumnHeaders"; else if (property == TablePatternIdentifiers.RowHeadersProperty) return "RowHeaders"; else if (property == TablePatternIdentifiers.RowOrColumnMajorProperty) return "RowOrColumnMajor"; else if (property == TogglePatternIdentifiers.ToggleStateProperty) return "ToggleState"; else if (property == TransformPatternIdentifiers.CanMoveProperty) return "CanMove"; else if (property == TransformPatternIdentifiers.CanResizeProperty) return "CanResize"; else if (property == TransformPatternIdentifiers.CanRotateProperty) return "CanRotate"; else if (property == ValuePatternIdentifiers.IsReadOnlyProperty) return "IsReadOnly"; else if (property == ValuePatternIdentifiers.ValueProperty) return "Value"; else if (property == WindowPatternIdentifiers.CanMaximizeProperty) return "CanMaximize"; else if (property == WindowPatternIdentifiers.CanMinimizeProperty) return "CanMinimize"; else if (property == WindowPatternIdentifiers.IsModalProperty) return "IsModal"; else if (property == WindowPatternIdentifiers.IsTopmostProperty) return "IsTopmost"; else if (property == WindowPatternIdentifiers.WindowInteractionStateProperty) return "WindowInteractionState"; else if (property == WindowPatternIdentifiers.WindowVisualStateProperty) return "WindowVisualState"; return null; } public static void AddAutomationEventHandler (AutomationEvent eventId, AutomationElement element, TreeScope scope, AutomationEventHandler eventHandler) { if (element == null) throw new ArgumentNullException ("element"); if (eventHandler == null) throw new ArgumentNullException ("eventHandler"); //TODO In theory we shall also check scope not equals to Parent or Ancestors, //but .Net didn't test/throw exceptions for "scope" CheckAutomationEventId (eventId.Id); if (element == AutomationElement.RootElement) foreach (var source in SourceManager.GetAutomationSources ()) source.AddAutomationEventHandler ( eventId, null, scope, eventHandler); else { var source = element.SourceElement.AutomationSource; source.AddAutomationEventHandler ( eventId, element.SourceElement, scope, eventHandler); } } public static void AddAutomationFocusChangedEventHandler (AutomationFocusChangedEventHandler eventHandler) { if (eventHandler == null) throw new ArgumentNullException ("eventHandler"); MUS.FocusChangedEventHandler sourceHandler; //according to the spec, all static methods in the UIA lib shall be thread safe. lock (focusHandlerMapping) { if (!focusHandlerMapping.TryGetValue (eventHandler, out sourceHandler)) { sourceHandler = (element, objectId, childId) => eventHandler ( SourceManager.GetOrCreateAutomationElement (element), new AutomationFocusChangedEventArgs (objectId, childId)); focusHandlerMapping.Add (eventHandler, sourceHandler); } } foreach (var source in SourceManager.GetAutomationSources ()) source.AddAutomationFocusChangedEventHandler (sourceHandler); } public static void AddAutomationPropertyChangedEventHandler (AutomationElement element, TreeScope scope, AutomationPropertyChangedEventHandler eventHandler, params AutomationProperty [] properties) { if (element == null) throw new ArgumentNullException ("element"); if (eventHandler == null) throw new ArgumentNullException ("eventHandler"); if (element == AutomationElement.RootElement) foreach (var source in SourceManager.GetAutomationSources ()) source.AddAutomationPropertyChangedEventHandler ( null, scope, eventHandler, properties); else { var source = element.SourceElement.AutomationSource; source.AddAutomationPropertyChangedEventHandler ( element.SourceElement, scope, eventHandler, properties); } } public static void AddStructureChangedEventHandler (AutomationElement element, TreeScope scope, StructureChangedEventHandler eventHandler) { if (element == null) throw new ArgumentNullException ("element"); if (eventHandler == null) throw new ArgumentNullException ("eventHandler"); if (element == AutomationElement.RootElement) foreach (var source in SourceManager.GetAutomationSources ()) source.AddStructureChangedEventHandler ( null, scope, eventHandler); else { var source = element.SourceElement.AutomationSource; source.AddStructureChangedEventHandler ( element.SourceElement, scope, eventHandler); } } public static void RemoveAllEventHandlers () { lock (focusHandlerMapping) focusHandlerMapping.Clear (); foreach (var source in SourceManager.GetAutomationSources ()) source.RemoveAllEventHandlers (); AddAutomationFocusChangedEventHandler (AutomationElement.OnFocusChanged); } public static void RemoveAutomationEventHandler ( AutomationEvent eventId, AutomationElement element, AutomationEventHandler eventHandler) { if (element == null) throw new ArgumentNullException ("element"); if (eventHandler == null) throw new ArgumentNullException ("eventHandler"); CheckAutomationEventId (eventId.Id); if (element == AutomationElement.RootElement) foreach (var source in SourceManager.GetAutomationSources ()) source.RemoveAutomationEventHandler ( eventId, element.SourceElement, eventHandler); else { var source = element.SourceElement.AutomationSource; source.RemoveAutomationEventHandler (eventId, element.SourceElement, eventHandler); } } public static void RemoveAutomationFocusChangedEventHandler (AutomationFocusChangedEventHandler eventHandler) { if (eventHandler == null) throw new ArgumentNullException ("eventHandler"); MUS.FocusChangedEventHandler sourceHandler; lock (focusHandlerMapping) { if (focusHandlerMapping.TryGetValue (eventHandler, out sourceHandler)) { focusHandlerMapping.Remove (eventHandler); foreach (var source in SourceManager.GetAutomationSources ()) source.RemoveAutomationFocusChangedEventHandler (sourceHandler); } } } public static void RemoveAutomationPropertyChangedEventHandler ( AutomationElement element, AutomationPropertyChangedEventHandler eventHandler) { if (element == null) throw new ArgumentNullException ("element"); if (eventHandler == null) throw new ArgumentNullException ("eventHandler"); if (element == AutomationElement.RootElement) foreach (var source in SourceManager.GetAutomationSources ()) source.RemoveAutomationPropertyChangedEventHandler ( null, eventHandler); else { var source = element.SourceElement.AutomationSource; source.RemoveAutomationPropertyChangedEventHandler ( element.SourceElement, eventHandler); } } public static void RemoveStructureChangedEventHandler ( AutomationElement element, StructureChangedEventHandler eventHandler) { if (element == null) throw new ArgumentNullException ("element"); if (eventHandler == null) throw new ArgumentNullException ("eventHandler"); if (element == AutomationElement.RootElement) foreach (var source in SourceManager.GetAutomationSources ()) source.RemoveStructureChangedEventHandler ( null, eventHandler); else { var source = element.SourceElement.AutomationSource; source.RemoveStructureChangedEventHandler ( element.SourceElement, eventHandler); } } private static void CheckAutomationEventId (int eventId) { if (AutomationElementIdentifiers.AutomationFocusChangedEvent.Id == eventId || AutomationElementIdentifiers.AutomationFocusChangedEvent.Id == eventId || AutomationElementIdentifiers.AutomationPropertyChangedEvent.Id == eventId || AutomationElementIdentifiers.StructureChangedEvent.Id == eventId) throw new ArgumentException ("eventId"); } public static readonly Condition ContentViewCondition; public static readonly Condition ControlViewCondition; public static readonly Condition RawViewCondition; } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/TablePattern.cs0000644000016200001670000000715111433571545027460 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // Mike Gorse // using System; using Mono.UIAutomation.Source; namespace System.Windows.Automation { public class TablePattern : GridPattern { public struct TablePatternInformation { private bool cache; private TablePattern pattern; internal TablePatternInformation (TablePattern pattern, bool cache) { this.pattern = pattern; this.cache = cache; } public int RowCount { get { return (int) pattern.element.GetPropertyValue (RowCountProperty, cache); } } public int ColumnCount { get { return (int) pattern.element.GetPropertyValue (ColumnCountProperty, cache); } } public RowOrColumnMajor RowOrColumnMajor { get { return (RowOrColumnMajor) pattern.element.GetPropertyValue (RowOrColumnMajorProperty, cache); } } public AutomationElement [] GetRowHeaders () { return (AutomationElement []) pattern.element.GetPropertyValue (RowHeadersProperty, cache); } public AutomationElement [] GetColumnHeaders () { return (AutomationElement []) pattern.element.GetPropertyValue (ColumnHeadersProperty, cache); } } private AutomationElement element; private bool cached; private TablePatternInformation currentInfo; private TablePatternInformation cachedInfo; internal TablePattern () { } internal TablePattern (ITablePattern source, AutomationElement element, bool cached) : base (source, element, cached) { this.element = element; this.cached = cached; this.Source = source; currentInfo = new TablePatternInformation (this, false); if (cached) cachedInfo = new TablePatternInformation (this, true); } internal new ITablePattern Source { get; private set; } public new TablePatternInformation Cached { get { if (!cached) throw new InvalidOperationException ("Cannot request a property or pattern that is not cached"); return cachedInfo; } } public new TablePatternInformation Current { get { return currentInfo; } } public new static readonly AutomationPattern Pattern = TablePatternIdentifiers.Pattern; public static readonly AutomationProperty RowHeadersProperty = TablePatternIdentifiers.RowHeadersProperty; public static readonly AutomationProperty ColumnHeadersProperty = TablePatternIdentifiers.ColumnHeadersProperty; public static readonly AutomationProperty RowOrColumnMajorProperty = TablePatternIdentifiers.RowOrColumnMajorProperty; } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/SourceManager.cs0000644000016200001670000001066311433571545027630 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using System.Collections.Generic; using System.Reflection; using Mono.UIAutomation.Source; using Mono.UIAutomation.Services; namespace System.Windows.Automation { internal static class SourceManager { private const string AtspiUiaSourceAssembly = "AtspiUiaSource, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f4ceacb585d99812"; private const string UiaDbusSourceAssembly = "UiaDbusSource, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f4ceacb585d99812"; private static IAutomationSource [] sources = null; private static object sourcesLock = new object (); internal static IAutomationSource [] GetAutomationSources () { if (sources == null) { lock (sourcesLock) { if (sources == null) { var sourcesList = new List (); // Let MONO_UIA_SOURCE env var override default source string sourceAssemblyNames = Environment.GetEnvironmentVariable ("MONO_UIA_SOURCE"); if (string.IsNullOrEmpty (sourceAssemblyNames)) sourceAssemblyNames = UiaDbusSourceAssembly + ";" + AtspiUiaSourceAssembly; foreach (string sourceAssembly in sourceAssemblyNames.Split (';')) { if (string.IsNullOrEmpty (sourceAssembly)) continue; IAutomationSource source = GetAutomationSource (sourceAssembly); if (source != null) sourcesList.Add (source); } sources = sourcesList.ToArray (); } } } return sources; } // TODO: Rename to GetAutomationElement // Note: this method could be invoked by multiple threads simultaneously internal static AutomationElement GetOrCreateAutomationElement (IElement sourceElement) { if (sourceElement == null) return null; return new AutomationElement (sourceElement); } // TODO: Rename to GetAutomationElements internal static AutomationElement [] GetOrCreateAutomationElements (IElement [] sourceElements) { AutomationElement [] ret = new AutomationElement [sourceElements.Length]; for (int i = 0; i < sourceElements.Length; i++) ret [i] = GetOrCreateAutomationElement (sourceElements [i]); return ret; } private static IAutomationSource GetAutomationSource (string sourceAssemblyName) { Assembly sourceAssembly = null; try { sourceAssembly = Assembly.Load (sourceAssemblyName); } catch (Exception e){ Log.Warn (string.Format ("Error loading UIA source ({0}): {1}", sourceAssemblyName, e)); return null; } Type sourceType = null; // Quickie inefficent implementation Type sourceInterfaceType = typeof (IAutomationSource); foreach (Type type in sourceAssembly.GetTypes ()) { if (sourceInterfaceType.IsAssignableFrom (type)) { sourceType = type; break; } } if (sourceType == null) { Log.Error ("No UIA source found in assembly: " + sourceAssemblyName); return null; } try { IAutomationSource source = (IAutomationSource) Activator.CreateInstance (sourceType); if (!source.IsAccessibilityEnabled) return null; source.Initialize (); return source; } catch (Exception e) { Log.Error ("Failed to load UIA source: " + e); return null; } } } } mono-uia-2.1/UIAutomationClient/System.Windows.Automation/ValuePattern.cs0000644000016200001670000000603111433571545027501 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // Mike Gorse // using System; using Mono.UIAutomation.Source; namespace System.Windows.Automation { public class ValuePattern : BasePattern { public struct ValuePatternInformation { private bool cache; private ValuePattern pattern; internal ValuePatternInformation (ValuePattern pattern, bool cache) { this.pattern = pattern; this.cache = cache; } public string Value { get { return (string) pattern.element.GetPropertyValue (ValueProperty, cache); } } public bool IsReadOnly { get { return (bool) pattern.element.GetPropertyValue (IsReadOnlyProperty, cache); } } } private AutomationElement element; private bool cached; private ValuePatternInformation currentInfo; private ValuePatternInformation cachedInfo; internal ValuePattern () { } internal ValuePattern (IValuePattern source, AutomationElement element, bool cached) { this.element = element; this.cached = cached; this.Source = source; currentInfo = new ValuePatternInformation (this, false); if (cached) cachedInfo = new ValuePatternInformation (this, true); } internal IValuePattern Source { get; private set; } public ValuePatternInformation Cached { get { if (!cached) throw new InvalidOperationException ("Cannot request a property or pattern that is not cached"); return cachedInfo; } } public ValuePatternInformation Current { get { return currentInfo; } } public void SetValue (string value) { Source.SetValue (value); } public static readonly AutomationPattern Pattern = ValuePatternIdentifiers.Pattern; public static readonly AutomationProperty ValueProperty = ValuePatternIdentifiers.ValueProperty; public static readonly AutomationProperty IsReadOnlyProperty = ValuePatternIdentifiers.IsReadOnlyProperty; } } mono-uia-2.1/UIAutomationClient/Makefile.in0000644000016200001670000005541611433571550021560 0ustar00hudsonhudson00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : DIST_COMMON = $(srcdir)/AssemblyInfo.cs.in $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/Makefile.include subdir = UIAutomationClient ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = AssemblyInfo.cs CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(linuxpkgconfigdir)" SCRIPTS = $(bin_SCRIPTS) SOURCES = DIST_SOURCES = DATA = $(linuxpkgconfig_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ GACUTIL = @GACUTIL@ GLIB_SHARP_20_CFLAGS = @GLIB_SHARP_20_CFLAGS@ GLIB_SHARP_20_LIBS = @GLIB_SHARP_20_LIBS@ GMCS = @GMCS@ GTK_SHARP_20_CFLAGS = @GTK_SHARP_20_CFLAGS@ GTK_SHARP_20_LIBS = @GTK_SHARP_20_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MONO = @MONO@ MONO_CFLAGS = @MONO_CFLAGS@ MONO_LIBS = @MONO_LIBS@ NUNIT_CFLAGS = @NUNIT_CFLAGS@ NUNIT_LIBS = @NUNIT_LIBS@ NUNIT_PATH = @NUNIT_PATH@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SN = @SN@ STRIP = @STRIP@ VERSION = @VERSION@ WINDOWSBASE_LIBS = @WINDOWSBASE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_bindir = @expanded_bindir@ expanded_datadir = @expanded_datadir@ expanded_libdir = @expanded_libdir@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = $(build_sources) $(build_resx_files) \ $(build_others_files) $(ASSEMBLY_WRAPPER_IN) $(EXTRAS) \ $(DATA_FILES) $(build_culture_res_files) ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_FLAGS = -lib:@expanded_libdir@/mono/2.0 -lib:../bin -lib:@expanded_libdir@/mono/accessibility -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" -d:NET_2_0 ASSEMBLY = ../bin/UIAutomationClient.dll ASSEMBLY_MDB = $(ASSEMBLY).mdb COMPILE_TARGET = library PROJECT_REFERENCES = \ ../bin/UIAutomationBridge.dll \ ../bin/UIAutomationTypes.dll \ ../bin/UIAutomationSource.dll \ ../bin/UIAutomationProvider.dll BUILD_DIR = ../bin PACKAGE_FLAG = /package accessibility UIAUTOMATIONCLIENT_DLL_MDB_SOURCE = ../bin/UIAutomationClient.dll.mdb UIAUTOMATIONCLIENT_DLL_MDB = $(BUILD_DIR)/UIAutomationClient.dll.mdb AL = al2 SATELLITE_ASSEMBLY_NAME = Mono.UIAutomation.Client.resources.dll PROGRAMFILES = \ $(UIAUTOMATIONCLIENT_DLL_MDB) RESGEN = resgen2 PROJECT_SOURCE_FILES = \ System.Windows.Automation.Text/TextPatternRange.cs \ System.Windows.Automation/AndCondition.cs \ System.Windows.Automation/Automation.cs \ System.Windows.Automation/AutomationElement.AutomationElementInformation.cs \ System.Windows.Automation/AutomationElement.cs \ System.Windows.Automation/AutomationElementCollection.cs \ System.Windows.Automation/AutomationElementMode.cs \ System.Windows.Automation/AutomationFocusChangedEventArgs.cs \ System.Windows.Automation/BasePattern.cs \ System.Windows.Automation/BoolCondition.cs \ System.Windows.Automation/CacheRequest.cs \ System.Windows.Automation/ClientSettings.cs \ System.Windows.Automation/ClientSideProviderDescription.cs \ System.Windows.Automation/Condition.cs \ System.Windows.Automation/DesktopElement.cs \ System.Windows.Automation/DockPattern.cs \ System.Windows.Automation/ExpandCollapsePattern.cs \ System.Windows.Automation/GridItemPattern.cs \ System.Windows.Automation/GridPattern.cs \ System.Windows.Automation/InvokePattern.cs \ System.Windows.Automation/MultipleViewPattern.cs \ System.Windows.Automation/NativeMethods.cs \ System.Windows.Automation/NotCondition.cs \ System.Windows.Automation/OrCondition.cs \ System.Windows.Automation/PropertyConditon.cs \ System.Windows.Automation/RangeValuePattern.cs \ System.Windows.Automation/ScrollItemPattern.cs \ System.Windows.Automation/ScrollPattern.cs \ System.Windows.Automation/SelectionItemPattern.cs \ System.Windows.Automation/SelectionPattern.cs \ System.Windows.Automation/SourceManager.cs \ System.Windows.Automation/TableItemPattern.cs \ System.Windows.Automation/TablePattern.cs \ System.Windows.Automation/TextPattern.cs \ System.Windows.Automation/TogglePattern.cs \ System.Windows.Automation/TransformPattern.cs \ System.Windows.Automation/TreeWalker.cs \ System.Windows.Automation/TreeWalker.TreeIterator.cs \ System.Windows.Automation/ValuePattern.cs \ System.Windows.Automation/WindowPattern.cs FILES = \ AssemblyInfo.cs \ ../build/common/*.cs \ $(PROJECT_SOURCE_FILES) DATA_FILES = RESOURCES = REFERENCES = \ WindowsBase \ System \ $(GTK_SHARP_20_LIBS) DLL_REFERENCES = CLEANFILES = $(PROGRAMFILES) $(ASSEMBLY) $(ASSEMBLY).mdb $(BINARIES) \ $(build_resx_resources) $(build_satellite_assembly_list) VALID_CULTURES = ar bg ca zh-CHS cs da de el en es fi fr he hu is it ja ko nl no pl pt ro ru hr sk sq sv th tr id uk be sl et lv lt fa vi hy eu mk af fo hi sw gu ta te kn mr gl kok ar-SA bg-BG ca-ES zh-TW cs-CZ da-DK de-DE el-GR en-US fi-FI fr-FR he-IL hu-HU is-IS it-IT ja-JP ko-KR nl-NL nb-NO pl-PL pt-BR ro-RO ru-RU hr-HR sk-SK sq-AL sv-SE th-TH tr-TR id-ID uk-UA be-BY sl-SI et-EE lv-LV lt-LT fa-IR vi-VN hy-AM eu-ES mk-MK af-ZA fo-FO hi-IN sw-KE gu-IN ta-IN te-IN kn-IN mr-IN gl-ES kok-IN ar-IQ zh-CN de-CH en-GB es-MX fr-BE it-CH nl-BE nn-NO pt-PT sv-FI ar-EG zh-HK de-AT en-AU es-ES fr-CA ar-LY zh-SG de-LU en-CA es-GT fr-CH ar-DZ zh-MO en-NZ es-CR fr-LU ar-MA en-IE es-PA ar-TN en-ZA es-DO ar-OM es-VE ar-YE es-CO ar-SY es-PE ar-JO es-AR ar-LB en-ZW es-EC ar-KW en-PH es-CL ar-AE es-UY ar-BH es-PY ar-QA es-BO es-SV es-HN es-NI es-PR zh-CHT s2q = $(subst \ ,?,$1) q2s = $(subst ?,\ ,$1) # use this when result will be quoted unesc2 = $(subst ?, ,$1) build_sources = $(FILES) $(GENERATED_FILES) build_sources_esc = $(call s2q,$(build_sources)) # use unesc2, as build_sources_embed is quoted build_sources_embed = $(call unesc2,$(build_sources_esc:%='$(srcdir)/%')) comma__ = , get_resource_name = $(firstword $(subst $(comma__), ,$1)) get_culture = $(lastword $(subst ., ,$(basename $1))) is_cultured_resource = $(and $(word 3,$(subst ., ,$1)), $(filter $(VALID_CULTURES),$(lastword $(subst ., ,$(basename $1))))) RESOURCES_ESC = $(call s2q,$(RESOURCES)) build_resx_list = $(foreach res, $(RESOURCES_ESC), $(if $(filter %.resx, $(call get_resource_name,$(res))),$(res),)) build_non_culture_resx_list = $(foreach res, $(build_resx_list),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) build_non_culture_others_list = $(foreach res, $(filter-out $(build_resx_list),$(RESOURCES_ESC)),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) build_others_list = $(build_non_culture_others_list) build_xamlg_list = $(filter %.xaml.g.cs, $(FILES)) # resgen all .resx resources build_resx_files = $(foreach res, $(build_resx_list), $(call get_resource_name,$(res))) build_resx_resources_esc = $(build_resx_files:.resx=.resources) build_resx_resources = $(call q2s,$(build_resx_resources_esc)) # embed resources for the main assembly build_resx_resources_hack = $(subst .resx,.resources, $(build_non_culture_resx_list)) # use unesc2, as build_resx_resources_embed is quoted build_resx_resources_embed = $(call unesc2,$(build_resx_resources_hack:%='-resource:%')) build_others_files = $(call q2s,$(foreach res, $(build_others_list),$(call get_resource_name,$(res)))) build_others_resources = $(build_others_files) # use unesc2, as build_others_resources_embed is quoted build_others_resources_embed = $(call unesc2,$(build_others_list:%='-resource:$(srcdir)/%')) build_resources = $(build_resx_resources) $(build_others_resources) build_resources_embed = $(build_resx_resources_embed) $(build_others_resources_embed) # -usesourcepath is available only for resgen2 emit_resgen_target_1 = $(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); cd '$$(shell dirname '$$<')' && $$(RESGEN) '$$(shell basename '$$<')' '$$(shell basename '$$@')' emit_resgen_target_2 = $(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); $$(RESGEN) -usesourcepath '$$<' '$$@' emit_resgen_target = $(if $(filter resgen2,$(RESGEN)),$(emit_resgen_target_2),$(emit_resgen_target_1)) emit_resgen_targets = $(foreach res,$(build_resx_resources_esc),$(eval $(call emit_resgen_target,$(res)))) build_references_ref = $(call q2s,$(foreach ref, $(call \ s2q,$(REFERENCES)), $(if $(filter -pkg:%, $(ref)), $(ref), \ $(if $(filter -r:%, $(ref)), $(ref), -r:$(ref))))) $(call \ q2s,$(foreach ref, $(call s2q,$(DLL_REFERENCES)), -r:$(ref))) \ $(call q2s,$(foreach ref, $(call s2q,$(PROJECT_REFERENCES)), \ -r:$(ref))) s2q2s = $(call unesc2,$(call s2q,$1)) cp_actual = test -z $1 || cp $1 $2 cp = $(call cp_actual,'$(call s2q2s,$1)','$(call s2q2s,$2)') rm_actual = test -z '$1' || rm -f '$2' rm = $(call rm_actual,$(call s2q2s,$1),$(call s2q2s,$2)/$(shell basename '$(call s2q2s,$1)')) DISTCLEANFILES = $(GENERATED_FILES) $(pc_files) $(BUILD_DIR)/* #pkglib_SCRIPTS = $(ASSEMBLY) bin_SCRIPTS = $(BINARIES) #programfilesdir = @libdir@/@PACKAGE@ #programfiles_DATA = $(PROGRAMFILES) linuxpkgconfigdir = @libdir@/pkgconfig linuxpkgconfig_DATA = $(LINUX_PKGCONFIG) # generating satellite assemblies culture_resources = $(foreach res, $(RESOURCES_ESC), $(if $(call is_cultured_resource,$(call get_resource_name, $(res))),$(res))) cultures = $(sort $(foreach res, $(culture_resources), $(call get_culture,$(call get_resource_name,$(res))))) culture_resource_dependencies = $(call q2s,$(BUILD_DIR)/$1/$(SATELLITE_ASSEMBLY_NAME): $(subst .resx,.resources,$2)) culture_resource_commandlines = $(call unesc2,cmd_line_satellite_$1 += '/embed:$(subst .resx,.resources,$2)') build_satellite_assembly_list = $(call q2s,$(cultures:%=$(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME))) build_culture_res_files = $(call q2s,$(foreach res, $(culture_resources),$(call get_resource_name,$(res)))) GACROOT = $(DESTDIR)$(prefix)/lib all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.include $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign UIAutomationClient/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign UIAutomationClient/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): AssemblyInfo.cs: $(top_builddir)/config.status $(srcdir)/AssemblyInfo.cs.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files install-linuxpkgconfigDATA: $(linuxpkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(linuxpkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(linuxpkgconfigdir)" @list='$(linuxpkgconfig_DATA)'; test -n "$(linuxpkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(linuxpkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(linuxpkgconfigdir)" || exit $$?; \ done uninstall-linuxpkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(linuxpkgconfig_DATA)'; test -n "$(linuxpkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(linuxpkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(linuxpkgconfigdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) $(DATA) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(linuxpkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-linuxpkgconfigDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-linuxpkgconfigDATA \ uninstall-local .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-binSCRIPTS install-data \ install-data-am install-data-local install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-linuxpkgconfigDATA \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-binSCRIPTS uninstall-linuxpkgconfigDATA \ uninstall-local all: $(ASSEMBLY) $(PROGRAMFILES) install-data-local: gac-install uninstall-local: gac-uninstall # macros # $(call emit-deploy-target,deploy-variable-name) define emit-deploy-target $($1): $($1_SOURCE) mkdir -p '$$(shell dirname '$$@')' cp '$$<' '$$@' endef # $(call emit-deploy-wrapper,wrapper-variable-name,wrapper-sourcefile,x) # assumes that for a wrapper foo.pc its source template is foo.pc.in # if $3 is non-empty then wrapper is marked exec define emit-deploy-wrapper $($1): $2 mkdir -p '$$(shell dirname '$$@')' cp '$$<' '$$@' $(if $3,chmod +x '$$@') endef $(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_dependencies,$(call get_culture,$(call get_resource_name,$(res))),$(call get_resource_name,$(res)))))) $(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_commandlines,$(call get_culture,$(call get_resource_name,$(res))),$(res))))) $(build_satellite_assembly_list): $(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME): mkdir -p '$(@D)' $(AL) -out:'$@' -culture:$* -t:lib $(cmd_line_satellite_$*) gac-install: $(POLICY_ASSEMBLIES) $(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS) /root $(GACROOT) $(PACKAGE_FLAG) || exit 1; gac-uninstall: $(GACUTIL) /us $(ASSEMBLY) $(GACUTIL_FLAGS) /root $(GACROOT) $(PACKAGE_FLAG) || exit 1; $(eval $(call emit_resgen_targets)) $(build_xamlg_list): %.xaml.g.cs: %.xaml xamlg '$<' $(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list) mkdir -p $(shell dirname $(ASSEMBLY)) $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) sn -q -R $(ASSEMBLY) $(top_srcdir)/mono.snk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: mono-uia-2.1/Makefile.am0000644000016200001670000000156511433571545016032 0ustar00hudsonhudson00000000000000EXTRA_DIST = \ expansions.m4 \ mono.snk \ winfx3.pub if HAS_MONO_2_5 CODE_SUBDIRS = UIAutomationTypes UIAutomationBridge UIAutomationProvider UIAutomationSource UIAutomationClient else CODE_SUBDIRS = WindowsBase UIAutomationTypes UIAutomationBridge UIAutomationProvider UIAutomationSource UIAutomationClient endif if ENABLE_TESTS SUBDIRS = $(CODE_SUBDIRS) UIAutomationClientTests data else SUBDIRS = $(CODE_SUBDIRS) data endif dist-hook: @if test -d "$(srcdir)/../.git"; \ then \ echo Creating ChangeLog && \ ( cd "$(top_srcdir)" && \ echo '# Generated by Makefile. Do not edit.'; echo; \ $(top_srcdir)/missing --run git log --stat . ) > ChangeLog.tmp \ && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \ || ( rm -f ChangeLog.tmp ; \ echo Failed to generate ChangeLog >&2 ); \ else \ echo A git clone is required to generate a ChangeLog >&2; \ fi mono-uia-2.1/Makefile.include0000644000016200001670000001472111433571545017056 0ustar00hudsonhudson00000000000000VALID_CULTURES = ar bg ca zh-CHS cs da de el en es fi fr he hu is it ja ko nl no pl pt ro ru hr sk sq sv th tr id uk be sl et lv lt fa vi hy eu mk af fo hi sw gu ta te kn mr gl kok ar-SA bg-BG ca-ES zh-TW cs-CZ da-DK de-DE el-GR en-US fi-FI fr-FR he-IL hu-HU is-IS it-IT ja-JP ko-KR nl-NL nb-NO pl-PL pt-BR ro-RO ru-RU hr-HR sk-SK sq-AL sv-SE th-TH tr-TR id-ID uk-UA be-BY sl-SI et-EE lv-LV lt-LT fa-IR vi-VN hy-AM eu-ES mk-MK af-ZA fo-FO hi-IN sw-KE gu-IN ta-IN te-IN kn-IN mr-IN gl-ES kok-IN ar-IQ zh-CN de-CH en-GB es-MX fr-BE it-CH nl-BE nn-NO pt-PT sv-FI ar-EG zh-HK de-AT en-AU es-ES fr-CA ar-LY zh-SG de-LU en-CA es-GT fr-CH ar-DZ zh-MO en-NZ es-CR fr-LU ar-MA en-IE es-PA ar-TN en-ZA es-DO ar-OM es-VE ar-YE es-CO ar-SY es-PE ar-JO es-AR ar-LB en-ZW es-EC ar-KW en-PH es-CL ar-AE es-UY ar-BH es-PY ar-QA es-BO es-SV es-HN es-NI es-PR zh-CHT s2q=$(subst \ ,?,$1) q2s=$(subst ?,\ ,$1) # use this when result will be quoted unesc2=$(subst ?, ,$1) build_sources = $(FILES) $(GENERATED_FILES) build_sources_esc= $(call s2q,$(build_sources)) # use unesc2, as build_sources_embed is quoted build_sources_embed= $(call unesc2,$(build_sources_esc:%='$(srcdir)/%')) comma__=, get_resource_name = $(firstword $(subst $(comma__), ,$1)) get_culture = $(lastword $(subst ., ,$(basename $1))) is_cultured_resource = $(and $(word 3,$(subst ., ,$1)), $(filter $(VALID_CULTURES),$(lastword $(subst ., ,$(basename $1))))) RESOURCES_ESC=$(call s2q,$(RESOURCES)) build_resx_list = $(foreach res, $(RESOURCES_ESC), $(if $(filter %.resx, $(call get_resource_name,$(res))),$(res),)) build_non_culture_resx_list = $(foreach res, $(build_resx_list),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) build_non_culture_others_list = $(foreach res, $(filter-out $(build_resx_list),$(RESOURCES_ESC)),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) build_others_list = $(build_non_culture_others_list) build_xamlg_list = $(filter %.xaml.g.cs, $(FILES)) # resgen all .resx resources build_resx_files = $(foreach res, $(build_resx_list), $(call get_resource_name,$(res))) build_resx_resources_esc = $(build_resx_files:.resx=.resources) build_resx_resources = $(call q2s,$(build_resx_resources_esc)) # embed resources for the main assembly build_resx_resources_hack = $(subst .resx,.resources, $(build_non_culture_resx_list)) # use unesc2, as build_resx_resources_embed is quoted build_resx_resources_embed = $(call unesc2,$(build_resx_resources_hack:%='-resource:%')) build_others_files = $(call q2s,$(foreach res, $(build_others_list),$(call get_resource_name,$(res)))) build_others_resources = $(build_others_files) # use unesc2, as build_others_resources_embed is quoted build_others_resources_embed = $(call unesc2,$(build_others_list:%='-resource:$(srcdir)/%')) build_resources = $(build_resx_resources) $(build_others_resources) build_resources_embed = $(build_resx_resources_embed) $(build_others_resources_embed) # -usesourcepath is available only for resgen2 emit_resgen_target_1=$(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); cd '$$(shell dirname '$$<')' && $$(RESGEN) '$$(shell basename '$$<')' '$$(shell basename '$$@')' emit_resgen_target_2=$(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); $$(RESGEN) -usesourcepath '$$<' '$$@' emit_resgen_target=$(if $(filter resgen2,$(RESGEN)),$(emit_resgen_target_2),$(emit_resgen_target_1)) emit_resgen_targets=$(foreach res,$(build_resx_resources_esc),$(eval $(call emit_resgen_target,$(res)))) build_references_ref = $(call q2s,$(foreach ref, $(call s2q,$(REFERENCES)), $(if $(filter -pkg:%, $(ref)), $(ref), $(if $(filter -r:%, $(ref)), $(ref), -r:$(ref))))) build_references_ref += $(call q2s,$(foreach ref, $(call s2q,$(DLL_REFERENCES)), -r:$(ref))) build_references_ref += $(call q2s,$(foreach ref, $(call s2q,$(PROJECT_REFERENCES)), -r:$(ref))) s2q2s=$(call unesc2,$(call s2q,$1)) cp_actual=test -z $1 || cp $1 $2 cp=$(call cp_actual,'$(call s2q2s,$1)','$(call s2q2s,$2)') rm_actual=test -z '$1' || rm -f '$2' rm=$(call rm_actual,$(call s2q2s,$1),$(call s2q2s,$2)/$(shell basename '$(call s2q2s,$1)')) EXTRA_DIST += $(build_sources) $(build_resx_files) $(build_others_files) $(ASSEMBLY_WRAPPER_IN) $(EXTRAS) $(DATA_FILES) $(build_culture_res_files) CLEANFILES += $(ASSEMBLY) $(ASSEMBLY).mdb $(BINARIES) $(build_resx_resources) $(build_satellite_assembly_list) DISTCLEANFILES = $(GENERATED_FILES) $(pc_files) $(BUILD_DIR)/* #pkglib_SCRIPTS = $(ASSEMBLY) bin_SCRIPTS = $(BINARIES) #programfilesdir = @libdir@/@PACKAGE@ #programfiles_DATA = $(PROGRAMFILES) linuxpkgconfigdir = @libdir@/pkgconfig linuxpkgconfig_DATA = $(LINUX_PKGCONFIG) # macros # $(call emit-deploy-target,deploy-variable-name) define emit-deploy-target $($1): $($1_SOURCE) mkdir -p '$$(shell dirname '$$@')' cp '$$<' '$$@' endef # $(call emit-deploy-wrapper,wrapper-variable-name,wrapper-sourcefile,x) # assumes that for a wrapper foo.pc its source template is foo.pc.in # if $3 is non-empty then wrapper is marked exec define emit-deploy-wrapper $($1): $2 mkdir -p '$$(shell dirname '$$@')' cp '$$<' '$$@' $(if $3,chmod +x '$$@') endef # generating satellite assemblies culture_resources = $(foreach res, $(RESOURCES_ESC), $(if $(call is_cultured_resource,$(call get_resource_name, $(res))),$(res))) cultures = $(sort $(foreach res, $(culture_resources), $(call get_culture,$(call get_resource_name,$(res))))) culture_resource_dependencies = $(call q2s,$(BUILD_DIR)/$1/$(SATELLITE_ASSEMBLY_NAME): $(subst .resx,.resources,$2)) culture_resource_commandlines = $(call unesc2,cmd_line_satellite_$1 += '/embed:$(subst .resx,.resources,$2)') build_satellite_assembly_list = $(call q2s,$(cultures:%=$(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME))) build_culture_res_files = $(call q2s,$(foreach res, $(culture_resources),$(call get_resource_name,$(res)))) $(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_dependencies,$(call get_culture,$(call get_resource_name,$(res))),$(call get_resource_name,$(res)))))) $(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_commandlines,$(call get_culture,$(call get_resource_name,$(res))),$(res))))) $(build_satellite_assembly_list): $(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME): mkdir -p '$(@D)' $(AL) -out:'$@' -culture:$* -t:lib $(cmd_line_satellite_$*) GACROOT = $(DESTDIR)$(prefix)/lib gac-install: $(POLICY_ASSEMBLIES) $(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS) /root $(GACROOT) $(PACKAGE_FLAG) || exit 1; gac-uninstall: $(GACUTIL) /us $(ASSEMBLY) $(GACUTIL_FLAGS) /root $(GACROOT) $(PACKAGE_FLAG) || exit 1; mono-uia-2.1/ChangeLog0000644000016200001670000066353111433571555015560 0ustar00hudsonhudson00000000000000# Generated by Makefile. Do not edit. commit 5a2c544e68b56d5f646bc094cdca759451ccdaa6 Author: Stephen Shaw Date: Fri Aug 20 14:56:49 2010 -0600 Prepping for 2.1 the Zoidberg release UIAutomation/NEWS | 9 +++++++++ UIAutomation/configure.ac | 2 +- 2 files changed, 10 insertions(+), 1 deletions(-) commit dc5916030fe87ffbd274f87be41414e089e5404d Author: Stephen Shaw Date: Thu Aug 5 13:03:12 2010 -0600 Update all spec files and NEWS files for 2.0.95 release UIAutomation/NEWS | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit be003b197083e8395136bb8fae58eb1b93ecdb36 Author: Mario Carrion Date: Mon Aug 2 23:20:59 2010 -0400 ChangeLog files are autogenerated by "make dist" UIAutomation/ChangeLog | 600 ---------------------- UIAutomation/Makefile.am | 14 + UIAutomation/UIAutomationBridge/ChangeLog | 171 ------ UIAutomation/UIAutomationClient/ChangeLog | 303 ----------- UIAutomation/UIAutomationClientTests/ChangeLog | 375 -------------- UIAutomation/UIAutomationProvider/ChangeLog | 261 ---------- UIAutomation/UIAutomationProvider/Test/ChangeLog | 34 -- UIAutomation/UIAutomationSource/ChangeLog | 54 -- UIAutomation/UIAutomationTypes/ChangeLog | 590 --------------------- UIAutomation/UIAutomationTypes/Test/ChangeLog | 196 ------- 10 files changed, 14 insertions(+), 2584 deletions(-) commit 0f4b70db5ba8311c071915762584bde394d6c795 Author: Mike Gorse Date: Wed Jul 21 13:44:09 2010 +0000 * UIAutomationClientTests/CacheRequestTest.cs: Add tests for properties and patterns. svn path=/trunk/uia2atk/; revision=160677 UIAutomation/UIAutomationClientTests/ChangeLog | 5 + .../UIAutomationClientTests/CacheRequestTest.cs | 1045 +++++++++++++++++++- 2 files changed, 1024 insertions(+), 26 deletions(-) commit c73f98582cc70bbaf1fd938eded358acfdacffb3 Author: Stephen Shaw Date: Tue Jul 20 15:04:22 2010 +0000 Didn't mean to commit the actual spec files svn path=/trunk/uia2atk/; revision=160614 UIAutomation/data/mono-uia-Fedora_12.spec | 85 ----------------------- UIAutomation/data/mono-uia-Fedora_13.spec | 69 ------------------- UIAutomation/data/mono-uia-openSUSE_11.2.spec | 91 ------------------------- UIAutomation/data/mono-uia-openSUSE_11.3.spec | 77 --------------------- UIAutomation/data/mono-uia.pc.in | 5 -- 5 files changed, 0 insertions(+), 327 deletions(-) commit 68b03f138096ea13e0e45a8294ff5abef6381390 Author: Stephen Shaw Date: Tue Jul 20 15:01:28 2010 +0000 Adding specific spec files svn path=/trunk/uia2atk/; revision=160613 UIAutomation/data/mono-uia-Fedora_12.spec | 85 +++++++++++++++++++++++ UIAutomation/data/mono-uia-Fedora_13.spec | 69 +++++++++++++++++++ UIAutomation/data/mono-uia-openSUSE_11.2.spec | 91 +++++++++++++++++++++++++ UIAutomation/data/mono-uia-openSUSE_11.3.spec | 77 +++++++++++++++++++++ UIAutomation/data/mono-uia.pc.in | 5 ++ 5 files changed, 327 insertions(+), 0 deletions(-) commit 88eb0674f2e66d795291f7a24935ac57a8c08f6c Author: Stephen Shaw Date: Mon Jul 19 20:20:48 2010 +0000 Create distro specific spec files svn path=/trunk/uia2atk/; revision=160584 UIAutomation/configure.ac | 6 +- UIAutomation/data/fedora/mono-uia-libdir.patch | 112 ---------------------- UIAutomation/data/fedora/mono-uia.spec.in | 89 ----------------- UIAutomation/data/mono-uia-Fedora_12.spec.in | 85 ++++++++++++++++ UIAutomation/data/mono-uia-Fedora_13.spec.in | 69 +++++++++++++ UIAutomation/data/mono-uia-libdir-fedora.patch | 112 ++++++++++++++++++++++ UIAutomation/data/mono-uia-openSUSE_11.2.spec.in | 91 ++++++++++++++++++ UIAutomation/data/mono-uia-openSUSE_11.3.spec.in | 77 +++++++++++++++ UIAutomation/data/mono-uia.spec.in | 91 ------------------ 9 files changed, 438 insertions(+), 294 deletions(-) commit ef64cb45e937b3a1684e198dd52b2ed28da1760b Merge: e129215 19564eb Author: Stephen Shaw Date: Mon Jul 19 15:32:38 2010 +0000 Move fedora spec files and patches into the respective data directory svn path=/trunk/uia2atk/; revision=160572 commit 0bdc034508bfd1371e1a8cd9d0e5e647de2a2905 Author: Stephen Shaw Date: Sat Jul 17 00:13:35 2010 +0000 Post release rev bump svn path=/trunk/uia2atk/; revision=160509 UIAutomation/configure.ac | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit eb7f19af72ea4e82a43d0790239ea167e1b0cbca Author: Stephen Shaw Date: Wed Jul 14 17:29:06 2010 +0000 Prepping for 2.0.94 release svn path=/trunk/uia2atk/; revision=160373 UIAutomation/NEWS | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) commit ec96e4d6881df77c4057cbcf1c586c4821578c7f Author: Mike Gorse Date: Wed Jul 14 14:54:36 2010 +0000 * System.Windows.Automation/AutomationElement.cs: Fix NRE. Remove TreeFilter check from GetUpdatedCache to match Windows behavior. * UIAutomationClientTests/CacheRequestTest.cs: Add TextPattern test. Add PropertyChanged event test. Add test to call a method on a cached pattern. * SampleForm/Form1.cs: Allow arbitrary setting of TextBox text. svn path=/trunk/uia2atk/; revision=160359 UIAutomation/UIAutomationClient/ChangeLog | 5 + .../System.Windows.Automation/AutomationElement.cs | 5 +- UIAutomation/UIAutomationClientTests/ChangeLog | 8 + .../UIAutomationClientTests/SampleForm/Form1.cs | 16 ++- .../UIAutomationClientTests/CacheRequestTest.cs | 215 ++++++++++++++++++- 5 files changed, 231 insertions(+), 18 deletions(-) commit d49e7bd2869a94a4425df55ad5f132d545f03668 Author: Stephen Shaw Date: Thu Jul 1 16:31:30 2010 +0000 Bumping the rev for next release svn path=/trunk/uia2atk/; revision=159787 UIAutomation/configure.ac | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 89bbfecde32f841b2fc6973849f64208c11c41b9 Author: Stephen Shaw Date: Wed Jun 30 14:14:18 2010 +0000 Prep for 2.0.93 release svn path=/trunk/uia2atk/; revision=159731 UIAutomation/NEWS | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 5a930474a33389704175496e3ac6087aa7c07c1c Author: Sandy Armstrong Date: Fri Jun 25 15:39:42 2010 +0000 In UIAutomation/UIAutomationClientTests/: * UIAutomationClientTests/BaseTest.cs: * UIAutomationClientTests/TableTest.cs: * UIAutomationClientTests/ScrollTest.cs: * UIAutomationClientTests/TextPatternTest.cs: * UIAutomationClientTests/CustomControlTest.cs: * UIAutomationClientTests/SelectionPatternTest.cs: * UIAutomationClientTests/MultipleViewPatternTest.cs: Ensure that TestFixtureTearDown is called when TestFixtureSetUp fails, to prevent having stray SampleForm processes running amok. * UIAutomationClientTests/AutomationTest.cs: * UIAutomationClientTests/RootElementTest.cs: Track other SampleForm processes to ensure they are cleand up during TearDown. * UIAutomationClientTests/RangeValuePatternTest.cs: Fix broken condition for location horizontal scroll bar element. svn path=/trunk/uia2atk/; revision=159543 UIAutomation/UIAutomationClientTests/ChangeLog | 20 +++++++++++ .../UIAutomationClientTests/AutomationTest.cs | 13 +++++++ .../UIAutomationClientTests/BaseTest.cs | 34 +++++++++++++------- .../UIAutomationClientTests/CustomControlTest.cs | 4 +- .../MultipleViewPatternTest.cs | 5 +-- .../RangeValuePatternTest.cs | 20 ++++++----- .../UIAutomationClientTests/RootElementTest.cs | 20 ++++++++--- .../UIAutomationClientTests/ScrollTest.cs | 4 +- .../SelectionPatternTest.cs | 4 +- .../UIAutomationClientTests/TableTest.cs | 4 +- .../UIAutomationClientTests/TextPatternTest.cs | 4 +- 11 files changed, 92 insertions(+), 40 deletions(-) commit d56f24c31572cb053d63aaa4ff084c210bf92cfc Author: Stephen Shaw Date: Tue Jun 22 01:37:37 2010 +0000 Rev for the next release svn path=/trunk/uia2atk/; revision=159308 UIAutomation/configure.ac | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit faf2d7b2d82e397b421106c6606763ec9b959d4b Author: Stephen Shaw Date: Wed Jun 16 18:07:51 2010 +0000 Update NEWS and version for 2.0.92 release svn path=/trunk/uia2atk/; revision=159030 UIAutomation/NEWS | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) commit 60043a95ff60575db521dfde0a3b1559fedf89a8 Author: Mike Gorse Date: Wed Jun 2 18:30:36 2010 +0000 * Element.cs, TableCellElement.cs, AutomationSource.cs, TableElement.cs, DataItemElement.cs: Fix issues with TreeItems sometimes not being created correctly. Expose a dialog painted on a window as a child of the window, even if at-spi exposes it as a child of the application [BNC#590768] * TextSource.cs, SelectionSource.cs: Support SupportedTextSelection. * UIAutomationClientTests/TableHierarchyTest.cs: Test parent of DataItemElement. * AtspiUiaClientTests/DialogTest.cs, AtspiUiaClientTests/Makefile.am: Test that a dialog painted on a window is a child of the window. svn path=/trunk/uia2atk/; revision=158354 .../AtspiUiaClientTests/DialogTest.cs | 88 ++++++++++++++++++++ .../AtspiUiaClientTests/Makefile.am | 1 + UIAutomation/UIAutomationClientTests/ChangeLog | 7 ++ .../UIAutomationClientTests/GtkForm/GtkForm.cs | 9 ++ .../UIAutomationClientTests/TableHierarchyTest.cs | 3 + 5 files changed, 108 insertions(+), 0 deletions(-) commit d7b7df82e847fde8c5ca4e0d7cce6be700901f42 Author: Stephen Shaw Date: Wed May 26 18:36:39 2010 +0000 Rev'ed for the next release svn path=/trunk/uia2atk/; revision=157980 UIAutomation/configure.ac | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit dd7e5cbfcebe27bdf52e3a043ae6eba9cbd0be1c Author: Stephen Shaw Date: Wed May 26 18:18:40 2010 +0000 Prepping for the 2.0.91 release svn path=/trunk/uia2atk/; revision=157978 UIAutomation/NEWS | 4 ++++ UIAutomation/configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) commit 92beabe081799c248e491ac2a143dd8c5c3ce49b Author: Stephen Shaw Date: Wed May 12 20:52:21 2010 +0000 Bumping the gtk-sharp version to 2.12.10 svn path=/trunk/uia2atk/; revision=157264 UIAutomation/data/mono-uia.spec.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 730787d10fae3119c76ee2850f269584697d4616 Author: Stephen Shaw Date: Wed May 12 17:35:24 2010 +0000 Updated NEWS for 2.0.90 release svn path=/trunk/uia2atk/; revision=157254 UIAutomation/NEWS | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) commit 96e797ecb5f036b9f2a53e9d63af2535ce4a3ee5 Author: Stephen Shaw Date: Wed May 12 17:16:21 2010 +0000 Updated rev for 2.0.90 release svn path=/trunk/uia2atk/; revision=157253 UIAutomation/configure.ac | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit cf42f59cf5a3c7edc01a090ec21557e98d0c417f Author: Matt Guo Date: Wed May 12 15:10:48 2010 +0000 In UIAutomation/: * UIAutomationClientTests/UIAutomationClientTests/MultipleViewPatternTest.cs: Update test to our new MultipleViewPattern implementation In UIAutomationWinforms/: * UIAutomationWinformsTests/ListViewProviderTest.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/ListViewProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/ListView/MultipleViewProviderBehavior.cs: Change to implement ListView's MultiViewPattern in the "correct way", and update related tests. In UiaDbus/: * UiaDbusSource/DbusExceptionTranslator.cs: Translate dbus's InvalidArgs error into ArgumentException. svn path=/trunk/uia2atk/; revision=157245 UIAutomation/ChangeLog | 5 ++ .../MultipleViewPatternTest.cs | 41 ++++---------------- 2 files changed, 13 insertions(+), 33 deletions(-) commit a61930906217edf83ab87a4bcb2e03048d185d1a Author: Mike Gorse Date: Thu May 6 13:04:16 2010 +0000 * Mono.UIAutomation.Winforms/ToolStripProvider.cs: Give AccessibleName preedence over Text. * ToolStripProviderTest.cs: Test that AccessibleName is used in preference to Text for the name. * Element.cs, ExpandCollapseSource.cs: Use child accessible for ExpandCollapsePattern in a DataItem. * Element.cs: Mark IsControlElement and IsContentElement as supported. * Element.cs: Do not expose Grid/GridItem for a Tree/TreeItem. Do not expose InvokePattern for a CheckBox. Do not expose SelectionPattern for a MenuBar. * UIAutomationClientTests/TableHierarchyTest.cs, GtkForm/GtkForm.cs: Expect check boxes in the table for Winforms. Fix name of boolean cells to be the same in Gtk as in Winforms. Do not assume that a treeItem has no children when collapsed. Test TreeView patterns. * UIAutomationClientTests/AutomationElementTest.cs: Assume that IsContentElement is true for a label in gtk. Check that a Spinner does not expose InvokePattern. * UIAutomationClientTests/AutomationElementTest.cs, GtkForm/GtkForm.cs: Test checkBox patterns. * UIAutomationClientTests/BaseTest.cs, UIAutomationClientTests/TogglePatternTest.cs: Fix checkboxes. * UIAutomationClientTests/BaseTest.cs: Catch InvalidOperationException and display pattern name in VerifyPatterns. * UIAutomationClientTests/MenuTest.cs: Test MenuBar patterns. * AtspiUiaClientTests/TableHierarchyTest.cs, GtkForm/GtkForm.cs: Test DataItem patterns. svn path=/trunk/uia2atk/; revision=156800 .../AtspiUiaClientTests/TableHierarchyTest.cs | 20 ++++++++ UIAutomation/UIAutomationClientTests/ChangeLog | 26 ++++++++++ .../UIAutomationClientTests/GtkForm/GtkForm.cs | 52 ++++++++++++-------- .../AutomationElementTest.cs | 13 +++++- .../UIAutomationClientTests/BaseTest.cs | 29 +++++++---- .../UIAutomationClientTests/MenuTest.cs | 2 + .../UIAutomationClientTests/TableHierarchyTest.cs | 22 ++++++-- .../UIAutomationClientTests/TogglePatternTest.cs | 10 ++-- 8 files changed, 131 insertions(+), 43 deletions(-) commit ba0f1c7babf8facdcb403a3d14212d1fbf517678 Author: Mario Carrion Date: Mon May 3 12:59:29 2010 +0000 2010-05-03 Mario Carrion In UIAutomation/UIAutomationClientTests/: * AtspiUiaClientTests/Makefile.am: Copy UIAutomationBridge.dll to build tests. svn path=/trunk/uia2atk/; revision=156617 .../AtspiUiaClientTests/Makefile.am | 11 +++++++++++ UIAutomation/UIAutomationClientTests/ChangeLog | 5 +++++ 2 files changed, 16 insertions(+), 0 deletions(-) commit 813b89ef2468d3464284d99684fc3a0d73d0fff5 Author: Mike Gorse Date: Fri Apr 30 18:17:52 2010 +0000 * Element.cs: Handle CheckMenuItem. Disable TextPattern for roles other than Text and PasswordText. Return ControlType.MenuItem for Role.Menu (BNC#598803) Remove patterns from separator (BNC#598036) * UIAutomationClientTests/AutomationElementTest.cs, UIAutomationClientTests/BaseTest.cs: Move VerifyPatterns to BaseTest. * UIAutomationClientTests/BaseTest.cs, SampleForm/Form1.cs, GtkForm/GtkForm.cs, UIAutomationClientTests/Menutest.cs, AtspiUiaClientTests/menuTest.cs, UIAutomationClientTests/Makefile.am, AtspiUiaClientTests/Makefile.am, UIAutomationClientTests/UIAutomationClientTests.csproj: Add tests for some gtk menu bugs. svn path=/trunk/uia2atk/; revision=156543 .../AtspiUiaClientTests/Makefile.am | 1 + .../AtspiUiaClientTests/MenuTest.cs | 69 ++++++++++++++++ UIAutomation/UIAutomationClientTests/ChangeLog | 12 +++ .../UIAutomationClientTests/GtkForm/GtkForm.cs | 19 +++++ .../UIAutomationClientTests/SampleForm/Form1.cs | 17 ++++ .../AutomationElementTest.cs | 28 ------- .../UIAutomationClientTests/BaseTest.cs | 41 +++++++++- .../UIAutomationClientTests/Makefile.am | 1 + .../UIAutomationClientTests/MenuTest.cs | 83 ++++++++++++++++++++ .../UIAutomationClientTests.csproj | 1 + 10 files changed, 239 insertions(+), 33 deletions(-) commit 0dd02eb5d08bf436b8822bda1edcbba6f7ee2362 Author: Stephen Shaw Date: Wed Apr 21 18:17:54 2010 +0000 Rev configure.ac for next release svn path=/trunk/uia2atk/; revision=155905 UIAutomation/configure.ac | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit fc1d44ea54fd30780dbb28517fd40308263c3f6f Author: Stephen Shaw Date: Wed Apr 21 15:36:58 2010 +0000 Prepping for 2.0.3 release svn path=/trunk/uia2atk/; revision=155885 UIAutomation/NEWS | 8 ++++++++ UIAutomation/configure.ac | 2 +- 2 files changed, 9 insertions(+), 1 deletions(-) commit 1636b190d31eba79fbee8543032a6e787d095927 Author: Stephen Shaw Date: Thu Apr 15 22:29:06 2010 +0000 Adding pkg-config to several of the spec files svn path=/trunk/uia2atk/; revision=155567 UIAutomation/data/mono-uia.spec.in | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit dfa8264b62ec1f3a2f05b745ae234a04282648e3 Author: Stephen Shaw Date: Wed Apr 14 18:36:57 2010 +0000 * {module}/configure.ac: Added data/{module}.spec * data/{module}.spec.in: Updated with @VERSION@ macro svn path=/trunk/uia2atk/; revision=155416 UIAutomation/ChangeLog | 4 ++++ UIAutomation/configure.ac | 1 + UIAutomation/data/mono-uia.spec.in | 2 +- 3 files changed, 6 insertions(+), 1 deletions(-) commit e8efc7be7ce60e597a1b5aa84727cfe867f033db Author: Sandy Armstrong Date: Wed Apr 14 18:03:25 2010 +0000 Fix distcheck in various tarballs. svn path=/trunk/uia2atk/; revision=155414 UIAutomation/UIAutomationClientTests/ChangeLog | 4 ++++ .../UIAutomationClientTests/GtkForm/Makefile.am | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) commit 3d01e05824290caad61aba5f22d44f72c6d1937a Author: Stephen Shaw Date: Wed Apr 14 16:55:31 2010 +0000 Moving spec files into their respective module - Phase 1 svn path=/trunk/uia2atk/; revision=155411 UIAutomation/data/mono-uia.spec.in | 90 ++++++++++++++++++++++++++++++++++++ 1 files changed, 90 insertions(+), 0 deletions(-) commit 9420f06fcbdb7b317853c286df6ab7398a925f99 Author: Mike Gorse Date: Sun Apr 4 12:41:29 2010 +0000 * Element.cs: Implement GetSupportedProperties. * UIAutomationClientTests/AutomationElementTest.cs: Test GetCurrentPropertyValue with ignoreDefault for at-spi. svn path=/trunk/uia2atk/; revision=154763 UIAutomation/UIAutomationClientTests/ChangeLog | 5 ++ .../AutomationElementTest.cs | 68 ++++++++++++++++++++ 2 files changed, 73 insertions(+), 0 deletions(-) commit 8f4834627b4991b73542a61f20c699864b0d9e01 Author: Stephen Shaw Date: Wed Mar 31 17:47:02 2010 +0000 Prepping for 2.0.2 heliport release svn path=/trunk/uia2atk/; revision=154564 UIAutomation/NEWS | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) commit b61857ad3046eb9cd4c7b15e523ecdc28934ff43 Author: Stephen Shaw Date: Thu Mar 18 21:26:00 2010 +0000 Bumped versions to next release 2.0.2 svn path=/trunk/uia2atk/; revision=153868 UIAutomation/configure.ac | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 848e0de5f4dafcdd9116ad201f02607572cc27ae Author: Stephen Shaw Date: Wed Mar 17 05:54:47 2010 +0000 Prep for the 2.0.1 tag svn path=/trunk/uia2atk/; revision=153710 UIAutomation/NEWS | 11 +++++++++++ UIAutomation/configure.ac | 2 +- 2 files changed, 12 insertions(+), 1 deletions(-) commit f118c48421092700044d8495e69b7e23f154e237 Author: Matt Guo Date: Fri Mar 12 16:08:19 2010 +0000 In UIAutomation/: * UIAutomationClientTests/UIAutomationClientTests/Makefile.am: * UIAutomationClientTests/UIAutomationClientTests/DataItemTest.cs: * UIAutomationClientTests/UIAutomationClientTests/UIAutomationClientTests.csproj: Test for ListViewItem's SetValue method and DataGridViewCell's NameProperty In UIAutomationWinforms/: * UIAutomationWinforms/Mono.UIAutomation.Winforms/DataGridViewProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/ListView/ListItemEditValueProviderBehavior.cs: Fix bug#584340: In ListView, Calling ValuePattern.SetValue on one cell can take effect on another sibling cell. Fix bug#586635: The NameProperty of DataGridView's Cell is not correctly returned. svn path=/trunk/uia2atk/; revision=153518 UIAutomation/ChangeLog | 8 ++ .../UIAutomationClientTests/DataItemTest.cs | 71 ++++++++++++++++++++ .../UIAutomationClientTests/Makefile.am | 1 + .../UIAutomationClientTests.csproj | 3 +- 4 files changed, 82 insertions(+), 1 deletions(-) commit c78e61cf48905aeb52712a7fe6c57a45aeea4fc4 Author: Matt Guo Date: Sun Mar 7 16:37:25 2010 +0000 In UIAutomation/: * UIAutomationClientTests/SampleForm/Form1.cs: * UIAutomationClientTests/SampleForm/Form1.Designer.cs: * UIAutomationClientTests/UIAutomationClientTests/BaseTest.cs: * UIAutomationClientTests/UIAutomationClientTests/Makefile.am: * UIAutomationClientTests/UIAutomationClientTests/DynamicElementTest.cs: * UIAutomationClientTests/UIAutomationClientTests/UIAutomationClientTests.csproj: Test ElementNotAvailableException. In UiaDbus/: * UiaDbusSource/DbusExceptionTranslator.cs: Support ElementNotAvailableException. svn path=/trunk/uia2atk/; revision=153218 UIAutomation/ChangeLog | 10 ++ .../SampleForm/Form1.Designer.cs | 2 +- .../UIAutomationClientTests/SampleForm/Form1.cs | 8 ++- .../UIAutomationClientTests/BaseTest.cs | 19 ++++- .../UIAutomationClientTests/DynamicElementTest.cs | 95 ++++++++++++++++++++ .../UIAutomationClientTests/Makefile.am | 1 + .../UIAutomationClientTests.csproj | 3 +- 7 files changed, 132 insertions(+), 6 deletions(-) commit 388e1b70777c0a652804744415ec6f91d2fa2ede Author: Stephen Shaw Date: Thu Mar 4 22:01:53 2010 +0000 2010-03-04 Stephen Shaw * configure.ac: Added a flag to allow windowsbase to be built even when mono 2.5 and later are present. svn path=/trunk/uia2atk/; revision=153048 UIAutomation/ChangeLog | 5 +++++ UIAutomation/configure.ac | 22 ++++++++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) commit 57a9f1f21b0d9225aed302827f72824614f2b4a4 Author: Matt Guo Date: Thu Mar 4 07:25:45 2010 +0000 In UIAutomation/: * UIAutomationClientTests/UIAutomationClientTests/AutomationElementTest.cs: Fix some wrong expectations of AutomationElementTest. In UiaDbus/: * UiaDbusBridge/Application.cs: * UiaDbusBridge/AutomationBridge.cs: * UiaDbusBridgeTests/dbusbridgetest.sh.in: * UiaDbusBridgeTests/AutomationBridgeTest.cs: Fix Bug 571799 - The dialog who has parent has been found twice. svn path=/trunk/uia2atk/; revision=152998 UIAutomation/ChangeLog | 5 +++++ .../AutomationElementTest.cs | 12 +++--------- 2 files changed, 8 insertions(+), 9 deletions(-) commit 8392bb2d0a7877ab1f5a358643cc8c3605ebe1cf Author: Stephen Shaw Date: Thu Feb 25 20:18:14 2010 +0000 Prep for tagging 2.0 hypnotoad svn path=/trunk/uia2atk/; revision=152494 UIAutomation/NEWS | 5 ++++- UIAutomation/configure.ac | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) commit 85abe85a610e4a9ea0feaf7cbc32937bbd65cc24 Author: Sandy Armstrong Date: Thu Feb 25 18:50:58 2010 +0000 In UIAutomation/UIAutomationClientTests/: * SampleForm/Form1.cs: * SampleForm/Makefile.am: * SampleForm/MyControl.cs: * SampleForm/SampleForm.csproj: * UIAutomationClientTests/Makefile.am: * UIAutomationClientTests/CustomControlTest.cs: * UIAutomationClientTests/AutomationElementTest.cs: * UIAutomationClientTests/UIAutomationClientTests.csproj: Add new test for controls derived from S.W.Control, which should by default be ControlType.Pane (bug #574269). In UIAutomationWinforms/UIAutomationWinforms/: * Mono.UIAutomation.Winforms/ProviderFactory.cs: By default, treat otherwise-unhandled controls as Panes (bug #574269). * Mono.UIAutomation.Winforms/PaneProvider.cs: Support LabeledBy. * Mono.UIAutomation.Winforms/PictureBoxProvider.cs: * Mono.UIAutomation.Winforms/ScrollableControlProvider.cs: Stop deriving from PaneProvider. svn path=/trunk/uia2atk/; revision=152491 UIAutomation/UIAutomationClientTests/ChangeLog | 13 ++++ .../UIAutomationClientTests/SampleForm/Form1.cs | 5 ++ .../UIAutomationClientTests/SampleForm/Makefile.am | 1 + .../SampleForm/MyControl.cs | 15 +++++ .../SampleForm/SampleForm.csproj | 1 + .../AutomationElementTest.cs | 11 --- .../UIAutomationClientTests/CustomControlTest.cs | 65 ++++++++++++++++++++ .../UIAutomationClientTests/Makefile.am | 1 + .../UIAutomationClientTests.csproj | 3 +- 9 files changed, 103 insertions(+), 12 deletions(-) commit c60de1c7cf23fd8f34102f954735e5859c2f7d38 Author: Mike Gorse Date: Wed Feb 24 22:17:27 2010 +0000 * AutomationSource.cs: Assume that we will receive a ChildrenChanged event when a window is opened, so do not fire StructureChanged events when an application is created. * GtkForm/GtkForm.cs: Support changing window title. svn path=/trunk/uia2atk/; revision=152408 UIAutomation/UIAutomationClientTests/ChangeLog | 4 ++++ .../UIAutomationClientTests/GtkForm/GtkForm.cs | 2 ++ 2 files changed, 6 insertions(+), 0 deletions(-) commit 10cb336a2ef75cff6c4a5b8d79fbb624bb4292c2 Author: Sandy Armstrong Date: Wed Feb 24 22:07:17 2010 +0000 In UIAutomation/UIAutomationClient/: * UIAutomationClient.csproj: Add LINQ. * System.Windows.Automation/TreeWalker.cs: Prevent Winforms applications from showing up twice in the UIA tree by favoring root elements from UiaDbusSource over AtspiUiaSource. Note that this is a temporary solution until we add true source merging support in 2.1. svn path=/trunk/uia2atk/; revision=152406 UIAutomation/UIAutomationClient/ChangeLog | 10 +++ .../System.Windows.Automation/TreeWalker.cs | 75 ++++++++++++++++--- .../UIAutomationClient/UIAutomationClient.csproj | 1 + 3 files changed, 74 insertions(+), 12 deletions(-) commit 68201a313f96e411359ffa86e7ff1a050ed92bab Author: Matt Guo Date: Wed Feb 24 06:03:09 2010 +0000 In UIAutomation/: * UIAutomationTypes/System.Windows.Automation/AutomationTextAttribute.cs: * UIAutomationTypes/Test/System.Windows.Automation/TextPatternIdentifiersTest.cs: Implementation and testing of AutomationTextAttribute.LookupById svn path=/trunk/uia2atk/; revision=152333 UIAutomation/ChangeLog | 6 + .../AutomationTextAttribute.cs | 66 ++- .../TextPatternIdentifiersTest.cs | 683 +++++++++++++++++++- 3 files changed, 752 insertions(+), 3 deletions(-) commit a4f27eddd109628fc9b756e40f5a8d42306d7e2a Author: Stephen Shaw Date: Mon Feb 22 22:24:40 2010 +0000 Prep for the 1.9.90 release svn path=/trunk/uia2atk/; revision=152218 UIAutomation/NEWS | 24 ++++++++++++++++-------- UIAutomation/configure.ac | 2 +- 2 files changed, 17 insertions(+), 9 deletions(-) commit b7d0337ad2e76dc8cbdb95b127166835696eb220 Author: Mike Gorse Date: Mon Feb 22 21:00:54 2010 +0000 * Element.cs: Implement NativeWindowHandle, ProcessId, and GetDescendantFromPoint. * AutomationSource.cs: Init gdk. * AutomationSource.cs: Partly implement GetElementFromhandle. * AutomationSource.cs: handle the root element when checking scope. * AutomationSource.cs: Raise InvokePattern.InvokedEvent on Armed. * makefile.am: Add gtk-sharp. * UIAutomationClientTests/InvokePatternTest.cs: Add test for event when calling InvokePattern.Invoke (). * UIAutomationCLientTests/AutomationElementTest.cs: Disable MoveTo.Origin and associated AutomationElementFromPoint test for at-spi. * UIAutomationClientTests/RootElementTest.cs: Assume that the form is named "TestForm1," even for at-spi. * UIAutomationClientTests/BaseTest.cs: use ProcessIdProperty even for at-spi. svn path=/trunk/uia2atk/; revision=152202 UIAutomation/UIAutomationClientTests/ChangeLog | 13 +++++++++++++ .../AutomationElementTest.cs | 11 +++++++---- .../UIAutomationClientTests/BaseTest.cs | 5 ++--- .../UIAutomationClientTests/InvokePatternTest.cs | 7 +++++++ .../UIAutomationClientTests/RootElementTest.cs | 4 ++-- 5 files changed, 31 insertions(+), 9 deletions(-) commit aaac629f518b96911bcebbe43c5c688a50be094f Author: Mike Gorse Date: Mon Feb 22 19:27:38 2010 +0000 Add missing ChangeLog entry svn path=/trunk/uia2atk/; revision=152198 UIAutomation/UIAutomationClientTests/ChangeLog | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) commit 7149b9f3e68d3e11715e82979baf89ba942d6fa6 Author: Mike Gorse Date: Wed Feb 17 17:01:43 2010 +0000 * Element.cs: Send BoundingRectangle PropertyChanged events. * Element.cs: Don't assume that the desktop has a role of DesktopFrame. * AutomationSource.cs: Support FocusChanged events and FocusedElement * UIAutomationCLientTests/FocusTest.cs: Adapt for Atspi, and add SetFocus test. * UIAutomationClientTests/SelectionPatternTest.cs: Work around BGO#578897. * tableHierarchyTest.cs: Test children of TreeView when expanding. * AutomationElementTest.cs: Add BoundingRectangle test. * AtspiUiaClientTests/FocusTest.cs, AtspiUiaClientTests/makefile.am: Add FocusTest. * GtkForm/GtkForm.cs: Add focus commands. * Mono.UIAutomation.Winforms/ListviewProvider.cs: Initialize children if items exist already. svn path=/trunk/uia2atk/; revision=151914 .../AtspiUiaClientTests/FocusTest.cs | 49 ++++++++++++++++++++ .../AtspiUiaClientTests/Makefile.am | 1 + .../UIAutomationClientTests/GtkForm/GtkForm.cs | 4 ++ .../AutomationElementTest.cs | 16 +++++- .../UIAutomationClientTests/FocusTest.cs | 42 +++++++++++++++-- .../SelectionPatternTest.cs | 6 ++- .../UIAutomationClientTests/TableHierarchyTest.cs | 39 ++++++++++++++-- 7 files changed, 142 insertions(+), 15 deletions(-) commit 00ec2feace9aa04110983c15b000abb870b5018f Author: Matt Guo Date: Sun Feb 14 15:10:44 2010 +0000 In UIAutomation/: * UIAutomationClientTests/UIAutomationClientTests/Makefile.am: Fix build error of UIAutomationClientTests (bug#579635) svn path=/trunk/uia2atk/; revision=151721 UIAutomation/ChangeLog | 5 +++++ .../UIAutomationClientTests/Makefile.am | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletions(-) commit 169d375e37d9d7258390f62a6db39c7f9822da20 Author: Matt Guo Date: Fri Feb 12 10:43:14 2010 +0000 In UIAutomation/: * UIAutomationClient/Makefile.am: * UIAutomationClient/UIAutomationClient.csproj: * UIAutomationClientTests/UIAutomationClientTests/Makefile.am: * UIAutomationClient/System.Windows.Automation/ClientSettings.cs: * UIAutomationClientTests/UIAutomationClientTests/LocalProviderTest.cs: * UIAutomationClientTests/UIAutomationClientTests/AutomationElementTest.cs: * UIAutomationClient/System.Windows.Automation/ClientSideProviderDescription.cs: * UIAutomationClientTests/UIAutomationClientTests/UIAutomationClientTests.csproj: API stub for ClientSettings and related data structure, tests for AutomationElement.FromLocalProvider. svn path=/trunk/uia2atk/; revision=151600 UIAutomation/ChangeLog | 13 + UIAutomation/UIAutomationClient/Makefile.am | 2 + .../System.Windows.Automation/ClientSettings.cs | 72 +++++ .../ClientSideProviderDescription.cs | 68 +++++ .../UIAutomationClient/UIAutomationClient.csproj | 6 + .../AutomationElementTest.cs | 1 - .../UIAutomationClientTests/LocalProviderTest.cs | 290 ++++++++++++++++++++ .../UIAutomationClientTests/Makefile.am | 1 + .../UIAutomationClientTests.csproj | 6 +- 9 files changed, 457 insertions(+), 2 deletions(-) commit 8283493d1685be8702691cb2e89da60854f47e06 Author: Matt Guo Date: Fri Feb 12 10:26:43 2010 +0000 In UIAutomation/: * UIAutomationClientTests/SampleForm/Form1.cs: * UIAutomationClient/System.Windows.Automation/Automation.cs: * UIAutomationClientTests/UIAutomationClientTests/BaseTest.cs: * UIAutomationClient/System.Windows.Automation/AutomationElement.cs: * UIAutomationClientTests/UIAutomationClientTests/RootElementTest.cs: * UIAutomationClientTests/UIAutomationClientTests/AutomationEventTest.cs: UIA Events for AutomationElement.RootElement In UiaDbus/: * UiaDbusSource/Makefile.am: * UiaDbusBridge/Application.cs: * UiaDbusBridge/AutomationBridge.cs: * UiaDbus/Interfaces/IApplication.cs: * UiaDbusSource/UiaDbusSource.csproj: * UiaDbusSource/EventHandlerManager.cs: * UiaDbusSource/UiaDbusAutomationSource.cs: * UiaDbusSource/RootElementEventsManager.cs: * UiaDbusBridge/Wrappers/ProviderElementWrapper.cs: UIA events for AutomationElement.RootElement svn path=/trunk/uia2atk/; revision=151597 UIAutomation/ChangeLog | 10 ++ .../System.Windows.Automation/Automation.cs | 118 +++++++++++++----- .../System.Windows.Automation/AutomationElement.cs | 16 ++- .../UIAutomationClientTests/SampleForm/Form1.cs | 4 +- .../UIAutomationClientTests/AutomationEventTest.cs | 111 +++++++++++++++++ .../UIAutomationClientTests/BaseTest.cs | 14 ++ .../UIAutomationClientTests/RootElementTest.cs | 126 +++++++++++++++++++- 7 files changed, 355 insertions(+), 44 deletions(-) commit c6c8c4f3b6685dd49ef99566b7af098be99d07dc Author: Stephen Shaw Date: Wed Feb 10 16:35:54 2010 +0000 Updated for the 1.8.94 release svn path=/trunk/uia2atk/; revision=151238 UIAutomation/NEWS | 38 ++++++++++++++++++++++++++++++++------ UIAutomation/configure.ac | 2 +- 2 files changed, 33 insertions(+), 7 deletions(-) commit 218ca13d1fb65fa4a90ed3217727230b0fddb6f7 Author: Mike Gorse Date: Tue Feb 9 22:49:48 2010 +0000 * Element.cs, TextEventHandler.cs, Makefile.am: Add TextEventHandler. * UIAutomationClientTests/TextPatternTest.cs: Work around at-spi sending two TextChanged events when text is replaced. svn path=/trunk/uia2atk/; revision=151150 UIAutomation/UIAutomationClientTests/ChangeLog | 5 +++++ .../UIAutomationClientTests/TextPatternTest.cs | 6 +++++- 2 files changed, 10 insertions(+), 1 deletions(-) commit 7cfa1399da3d6d967b45c7283e7a8030fdf5b321 Author: Mike Gorse Date: Sun Feb 7 12:35:20 2010 +0000 * GridEventhandler.cs, rangeValueEventhandler.cs, SelectionEventhandler.cs, ValueEventhandler.cs: Track at-spi-sharp api. * ExpandCollapseSource.cs, Element.cs, AutomationSource.cs, Makefile.am: Add ExpandCollapse. * DataItemElement.cs, TableElement.cs, TreeItemElement.cs: Adjust table row indices when rows are added or removed. * element.cs: Fix GetSupportedPatterns(); * GtkForm/GtkForm.cs: Initially collapse tree view. * GtkForm/GtkForm.cs: Support creating Toggle cell renderers. * UIAutomationClientTests/ExpandCollapsePatternTest.cs: Add event test. * AtspiUiaClientTests/EpandCollapsePatternTest.cs, AtspiUiaClientTests/Makefile.am: Add ExpandCollapsePatternTest. svn path=/trunk/uia2atk/; revision=150998 .../ExpandCollapsePatternTest.cs | 49 +++++++++++++++ .../AtspiUiaClientTests/Makefile.am | 1 + UIAutomation/UIAutomationClientTests/ChangeLog | 11 +++ .../UIAutomationClientTests/GtkForm/GtkForm.cs | 13 +++- .../ExpandCollapsePatternTest.cs | 65 +++++++++++++++++++- 5 files changed, 134 insertions(+), 5 deletions(-) commit b615705ddf3390739d1fa95e14cb4f820a03833f Author: Matt Guo Date: Thu Feb 4 07:21:18 2010 +0000 In AtspiUiaSource/: * AtspiUiaSource/Element.cs: AutomationElement.FromPoint, add IElement.GetDescendantFromPoint method In UIAutomation/: * configure.ac: * UIAutomationClient/Makefile.am: * UIAutomationClientTests/SampleForm/Form1.cs: * UIAutomationClient/UIAutomationClient.csproj: * UIAutomationSource/Mono.UIAutomation.Source/IElement.cs: * UIAutomationClient/System.Windows.Automation/NativeMethods.cs: * UIAutomationClient/System.Windows.Automation/DesktopElement.cs: * UIAutomationClient/System.Windows.Automation/AutomationElement.cs: * UIAutomationClientTests/UIAutomationClientTests/AutomationElementTest.cs: AutomationElement.FromPoint In UiaDbus/: * UiaDbus/Rect.cs: * UiaDbusSource/UiaDbusElement.cs: * UiaDbusBridgeTests/UiaDbusRectTest.cs: * UiaDbus/Interfaces/IAutomationElement.cs: * UiaDbusBridge/Wrappers/ProviderElementWrapper.cs: AutomationElement.FromPoint svn path=/trunk/uia2atk/; revision=150836 UIAutomation/ChangeLog | 13 ++ UIAutomation/UIAutomationClient/Makefile.am | 4 +- .../System.Windows.Automation/AutomationElement.cs | 15 ++- .../System.Windows.Automation/DesktopElement.cs | 12 +- .../System.Windows.Automation/NativeMethods.cs | 154 ++++++++++++++++++++ .../UIAutomationClient/UIAutomationClient.csproj | 2 + .../UIAutomationClientTests/SampleForm/Form1.cs | 11 ++ .../AutomationElementTest.cs | 65 ++++++++ .../Mono.UIAutomation.Source/IElement.cs | 2 + UIAutomation/configure.ac | 1 + 10 files changed, 274 insertions(+), 5 deletions(-) commit 85df3164fe03d56ff1eef88fc6507398673fff92 Author: Matt Guo Date: Wed Feb 3 17:14:11 2010 +0000 In UIAutomation/: * UIAutomationClientTests/SampleForm/Form1.cs: * UIAutomationClientTests/UIAutomationClientTests/AutomationEventTest.cs: Correct the Type of the AutomationPropertyChangedEventArgs's old/new value. In UiaDbus/: * UiaDbus/Makefile.am: * UiaDbus/UiaDbus.csproj: * UiaDbus/DbusSerializer.cs: * UiaDbusBridge/Application.cs: * UiaDbusBridge/AutomationBridge.cs: * UiaDbusSource/UiaDbusAutomationSource.cs: Correct the Type of the AutomationPropertyChangedEventArgs's old/new value. svn path=/trunk/uia2atk/; revision=150772 UIAutomation/ChangeLog | 6 + .../UIAutomationClientTests/SampleForm/Form1.cs | 6 + .../UIAutomationClientTests/AutomationEventTest.cs | 109 ++++++++++++++++++++ 3 files changed, 121 insertions(+), 0 deletions(-) commit c0c43912fc7024e9f59066da7405d98c1524f4c9 Author: Matt Guo Date: Tue Feb 2 02:24:03 2010 +0000 In UIAutomation/: * UIAutomationTypes/Makefile.am: * UIAutomationTypes/UIAutomationTypes.csproj: * UIAutomationTypes/System.Windows.Automation/ControlType.cs: i18n support for LocalizedControlType In UIAutomationWinforms/: * UIAutomationWinforms/Mono.UIAutomation.Winforms/Helper.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/FormProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/PaneProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/LabelProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/ListBoxProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/TabPageProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/TextBoxProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/ToolBarProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/CheckBoxProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/ComboBoxProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/DataGridProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/GroupBoxProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/ListItemProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/ListViewProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/MainMenuProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/MenuItemProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/SplitterProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/TrackBarProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/TreeViewProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/LinkLabelProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/MenuStripProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/ScrollBarProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/StatusBarProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/ToolStripProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/PictureBoxProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/TabControlProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/UpDownBaseProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/WebBrowserProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/ContextMenuProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/PopupButtonProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/ProgressBarProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/RadioButtonProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/StatusStripProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/ToolTipBaseProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/DataGridViewProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/MonthCalendarProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/SimpleControlProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/ToolStripItemProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/DateTimePickerProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/MessageBoxFormProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/SplitContainerProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/ToolStripLabelProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/ToolStripButtonProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/BaseColorControlProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/ContextMenuStripProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/PopupButtonPanelProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/PropertyGridViewProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/ToolStripSeparatorProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/PrintPreviewControlProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/ToolStripSplitButtonProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/MonthCalendarDataGridProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/MonthCalendarListItemProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/Button/InvokeProviderBehavior.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/ComboBox/ButtonInvokeBehavior.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/TrackBar/ButtonInvokeProviderBehavior.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/ScrollBar/ButtonInvokeProviderBehavior.cs: to retrun LocalizedControlType by ControlType svn path=/trunk/uia2atk/; revision=150689 UIAutomation/ChangeLog | 7 ++ UIAutomation/UIAutomationTypes/Makefile.am | 3 +- .../System.Windows.Automation/ControlType.cs | 79 ++++++++++---------- .../UIAutomationTypes/UIAutomationTypes.csproj | 1 + 4 files changed, 50 insertions(+), 40 deletions(-) commit 8a1078e0f351ba94ade46dd3acc1a0f05f5f6eda Author: Matt Guo Date: Sat Jan 30 04:09:32 2010 +0000 In UIAutomation/: * UIAutomationClient/System.Windows.Automation/Automation.cs: * UIAutomationClient/System.Windows.Automation/TreeWalker.cs: * UIAutomationClient/System.Windows.Automation/SourceManager.cs: Fix thread safety issues In UIAutomationWinforms/: * UIAutomationWinforms/Mono.UIAutomation.Winforms/Helper.cs: Fix thread safety issues In UiaDbus/: * UiaDbusSource/UiaDbusAutomationSource.cs: Fix thread safety issues svn path=/trunk/uia2atk/; revision=150592 UIAutomation/ChangeLog | 6 +++ .../System.Windows.Automation/Automation.cs | 26 ++++++++----- .../System.Windows.Automation/SourceManager.cs | 37 ++++++++++++-------- .../System.Windows.Automation/TreeWalker.cs | 6 +-- 4 files changed, 46 insertions(+), 29 deletions(-) commit 4a16f767c3f298da2acbf512035c894fcc005b81 Author: Matt Guo Date: Fri Jan 22 06:35:52 2010 +0000 In AtspiUiaSource/: * AtspiUiaSource/Element.cs: * AtspiUiaSource/AutomationSource.cs: Implement IElement.AutomationSource In UIAutomation/: * UIAutomationSource/Mono.UIAutomation.Source/IElement.cs: * UIAutomationClient/System.Windows.Automation/Automation.cs: * UIAutomationClient/System.Windows.Automation/TreeWalker.cs: * UIAutomationClient/System.Windows.Automation/DesktopElement.cs: Allow find IAutomatioSource by IElement, to enhance the performance of several client APIs. In UiaDbus/: * UiaDbusSource/UiaDbusElement.cs: Implement IElement.AutomationSource svn path=/trunk/uia2atk/; revision=150043 UIAutomation/ChangeLog | 8 ++ .../System.Windows.Automation/Automation.cs | 68 ++++++++++---------- .../System.Windows.Automation/DesktopElement.cs | 5 ++ .../System.Windows.Automation/TreeWalker.cs | 33 ++++++++-- .../Mono.UIAutomation.Source/IElement.cs | 2 + 5 files changed, 77 insertions(+), 39 deletions(-) commit d9ad245f872c06189561953294923ae6c4c40025 Author: Stephen Shaw Date: Wed Jan 20 13:59:49 2010 +0000 Prep for 1.8.93 release svn path=/trunk/uia2atk/; revision=149905 UIAutomation/NEWS | 8 ++++++++ UIAutomation/configure.ac | 2 +- 2 files changed, 9 insertions(+), 1 deletions(-) commit eb6936a16403a8a92bad19d99f5b294ddc792abe Author: Matt Guo Date: Wed Jan 20 11:06:34 2010 +0000 In UIAutomation/: * UIAutomationClientTests/UIAutomationClientTests/AutomationElementTest.cs: unit tests for bug#570621 and bug#571711 In UIAutomationWinforms/: * UIAutomationWinforms/Mono.UIAutomation.Winforms/ComboBoxProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/DataGridProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/ListItemProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/ScrollBarProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/DataGridViewProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/PropertyGridViewProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/MonthCalendarDataGridProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms/MonthCalendarListItemProvider.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/DataGrid/DataItemValueProviderBehavior.cs: * UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/DomainUpDown/ListItemValueProviderBehavior.cs: Fix bug#570621 and bug#571711 In UiaDbus/: * UiaDbusBridge/AutomationBridge.cs: Fix bug#570621 svn path=/trunk/uia2atk/; revision=149891 UIAutomation/ChangeLog | 4 +++ .../AutomationElementTest.cs | 21 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 0 deletions(-) commit 34c13c18cf3219210493d257f8715b90ccc75101 Author: Stephen Shaw Date: Thu Jan 14 16:22:09 2010 +0000 Prep for the 1.8.92 release "chocoholic" svn path=/trunk/uia2atk/; revision=149563 UIAutomation/NEWS | 13 +++++++++++++ UIAutomation/configure.ac | 2 +- 2 files changed, 14 insertions(+), 1 deletions(-) commit 2c1c16a28506604ef68c757814f33df04d95ede1 Author: Matt Guo Date: Thu Jan 14 10:12:33 2010 +0000 In AtspiUiaSource/: * AtspiUiaSource/Element.cs: Add empty method stub for AutomationElement.SupportedProperties In UIAutomation/: * UIAutomationSource/Mono.UIAutomation.Source/IElement.cs: * UIAutomationClientTests/UIAutomationClientTests/BaseTest.cs: * UIAutomationClient/System.Windows.Automation/DesktopElement.cs: * UIAutomationClient/System.Windows.Automation/AutomationElement.cs: * UIAutomationClientTests/UIAutomationClientTests/AutomationElementTest.cs: AutomationElement.SupportedProperties In UIAutomationWinforms/: * UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/ListView/TableProviderBehavior.cs: Fix the bug of not returning RowOrColumnMajorProperty In UiaDbus/: * UiaDbusSource/UiaDbusElement.cs: * UiaDbus/Interfaces/IAutomationElement.cs: * UiaDbusBridge/Wrappers/ProviderElementWrapper.cs: AutomationElement.SupportedProperties svn path=/trunk/uia2atk/; revision=149539 UIAutomation/ChangeLog | 8 +++++ .../System.Windows.Automation/AutomationElement.cs | 4 +- .../System.Windows.Automation/DesktopElement.cs | 31 ++++++++++++++++++ .../AutomationElementTest.cs | 33 +++++++++++++++++++- .../UIAutomationClientTests/BaseTest.cs | 19 +++++++++++- .../Mono.UIAutomation.Source/IElement.cs | 4 ++- 6 files changed, 94 insertions(+), 5 deletions(-) commit 184af9a2930d023e0b68a88bafe657e8d583c054 Author: Matt Guo Date: Wed Jan 13 03:58:16 2010 +0000 In UIAutomation/: * UIAutomationClient/System.Windows.Automation/AutomationElement.cs: Improve AutomationElement.GetHashCode svn path=/trunk/uia2atk/; revision=149434 UIAutomation/ChangeLog | 5 +++++ .../System.Windows.Automation/AutomationElement.cs | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit 15f928e648ad1ff44ecc1ee74744ecbcabaa9217 Author: Sandy Armstrong Date: Tue Dec 15 00:32:04 2009 +0000 In AtspiUiaSource/AtspiUiaSource/: * GridSource.cs: * TableSource.cs: * ValueSource.cs: * GridItemSource.cs: * SelectionSource.cs: * TableItemSource.cs: * RangeValueSource.cs: * SelectionItemSource.cs: * SelectionEventHandler.cs: Update for latest interfaces changes. In UIAutomation/UIAutomationClient/: * System.Windows.Automation/DockPattern.cs: * System.Windows.Automation/GridPattern.cs: * System.Windows.Automation/CacheRequest.cs: * System.Windows.Automation/TablePattern.cs: * System.Windows.Automation/ValuePattern.cs: * System.Windows.Automation/ScrollPattern.cs: * System.Windows.Automation/TogglePattern.cs: * System.Windows.Automation/WindowPattern.cs: * System.Windows.Automation/GridItemPattern.cs: * System.Windows.Automation/SelectionPattern.cs: * System.Windows.Automation/TableItemPattern.cs: * System.Windows.Automation/TransformPattern.cs: * System.Windows.Automation/RangeValuePattern.cs: * System.Windows.Automation/MultipleViewPattern.cs: * System.Windows.Automation/SelectionItemPattern.cs: * System.Windows.Automation/ExpandCollapsePattern.cs: Implement caching. * System.Windows.Automation/TreeWalker.cs: Implement caching methods. * System.Windows.Automation/TreeWalker.TreeIterator.cs: Make sure to use a new instance instead of reusing AutomationElement.RootElement. * System.Windows.Automation/SourceManager.cs: Update GetOrCreate* methods to always create new instances (will rename later). * System.Windows.Automation/AutomationElement.cs: Implement caching. * System.Windows.Automation/AutomationElement.AutomationElementInformation.cs: Add caching support, and ensure that Current property always returns up-to-date values. In UIAutomation/UIAutomationClientTests/: * UIAutomationClientTests/TreeWalkerTest.cs: Update tests to confirm that new AutomationElement instances are always returned. * UIAutomationClientTests/WindowPatternTest.cs: Update tests of Current property. * UIAutomationClientTests/AutomationElementTest.cs: Update tests for GetCurrentPattern and FindFirst. * UIAutomationClientTests/Makefile.am: * UIAutomationClientTests/CacheRequestTest.cs: * UIAutomationClientTests/UIAutomationClientTests.csproj: Add initial tests of CacheRequest class, and caching behavior in general. In UIAutomation/UIAutomationSource/: * Mono.UIAutomation.Source/IGridPattern.cs: * Mono.UIAutomation.Source/ITablePattern.cs: * Mono.UIAutomation.Source/IValuePattern.cs: * Mono.UIAutomation.Source/IScrollPattern.cs: * Mono.UIAutomation.Source/IWindowPattern.cs: * Mono.UIAutomation.Source/IGridItemPattern.cs: * Mono.UIAutomation.Source/ISelectionPattern.cs: * Mono.UIAutomation.Source/ITableItemPattern.cs: * Mono.UIAutomation.Source/ITransformPattern.cs: * Mono.UIAutomation.Source/IRangeValuePattern.cs: * Mono.UIAutomation.Source/IMultipleViewPattern.cs: * Mono.UIAutomation.Source/ISelectionItemPattern.cs: Update interfaces to no longer use *Properties structs. Add properties as necessary. In UiaDbus/: * UiaDbusSource/UiaDbusGridPattern.cs: * UiaDbusSource/UiaDbusTablePattern.cs: * UiaDbusSource/UiaDbusValuePattern.cs: * UiaDbusSource/UiaDbusScrollPattern.cs: * UiaDbusSource/UiaDbusWindowPattern.cs: * UiaDbusSource/UiaDbusGridItemPattern.cs: * UiaDbusSource/UiaDbusSelectionPattern.cs: * UiaDbusSource/UiaDbusTableItemPattern.cs: * UiaDbusSource/UiaDbusTransformPattern.cs: * UiaDbusSource/UiaDbusRangeValuePattern.cs: * UiaDbusSource/UiaDbusMultipleViewPattern.cs: * UiaDbusSource/UiaDbusSelectionItemPattern.cs: Update for interface changes. svn path=/trunk/uia2atk/; revision=148440 UIAutomation/UIAutomationClient/ChangeLog | 33 + ...tomationElement.AutomationElementInformation.cs | 104 ++- .../System.Windows.Automation/AutomationElement.cs | 361 +++++--- .../System.Windows.Automation/CacheRequest.cs | 151 +++- .../System.Windows.Automation/DockPattern.cs | 38 +- .../ExpandCollapsePattern.cs | 40 +- .../System.Windows.Automation/GridItemPattern.cs | 48 +- .../System.Windows.Automation/GridPattern.cs | 42 +- .../MultipleViewPattern.cs | 43 +- .../System.Windows.Automation/RangeValuePattern.cs | 53 +- .../System.Windows.Automation/ScrollPattern.cs | 59 +- .../SelectionItemPattern.cs | 45 +- .../System.Windows.Automation/SelectionPattern.cs | 68 +- .../System.Windows.Automation/SourceManager.cs | 10 +- .../System.Windows.Automation/TableItemPattern.cs | 55 +- .../System.Windows.Automation/TablePattern.cs | 52 +- .../System.Windows.Automation/TogglePattern.cs | 40 +- .../System.Windows.Automation/TransformPattern.cs | 48 +- .../TreeWalker.TreeIterator.cs | 4 +- .../System.Windows.Automation/TreeWalker.cs | 42 +- .../System.Windows.Automation/ValuePattern.cs | 41 +- .../System.Windows.Automation/WindowPattern.cs | 53 +- UIAutomation/UIAutomationClientTests/ChangeLog | 16 + .../AutomationElementTest.cs | 18 + .../UIAutomationClientTests/CacheRequestTest.cs | 978 ++++++++++++++++++++ .../UIAutomationClientTests/Makefile.am | 1 + .../UIAutomationClientTests/TreeWalkerTest.cs | 10 + .../UIAutomationClientTests.csproj | 3 +- .../UIAutomationClientTests/WindowPatternTest.cs | 3 + UIAutomation/UIAutomationSource/ChangeLog | 16 + .../Mono.UIAutomation.Source/IGridItemPattern.cs | 15 +- .../Mono.UIAutomation.Source/IGridPattern.cs | 10 +- .../IMultipleViewPattern.cs | 10 +- .../Mono.UIAutomation.Source/IRangeValuePattern.cs | 18 +- .../Mono.UIAutomation.Source/IScrollPattern.cs | 18 +- .../ISelectionItemPattern.cs | 10 +- .../Mono.UIAutomation.Source/ISelectionPattern.cs | 10 +- .../Mono.UIAutomation.Source/ITableItemPattern.cs | 14 +- .../Mono.UIAutomation.Source/ITablePattern.cs | 13 +- .../Mono.UIAutomation.Source/ITransformPattern.cs | 13 +- .../Mono.UIAutomation.Source/IValuePattern.cs | 10 +- .../Mono.UIAutomation.Source/IWindowPattern.cs | 22 +- 42 files changed, 2094 insertions(+), 544 deletions(-) commit 888e0255983d1d504adc825dae2caf0a5341db8c Author: Stephen Shaw Date: Wed Dec 9 18:46:38 2009 +0000 Rev for the 0.8.91 release svn path=/trunk/uia2atk/; revision=147928 UIAutomation/NEWS | 19 +++++++++++++++++++ UIAutomation/configure.ac | 2 +- 2 files changed, 20 insertions(+), 1 deletions(-) commit 0b8aa2b05a64729b07c915516e6193d0c896de44 Author: Mario Carrion Date: Tue Dec 8 16:02:50 2009 +0000 2009-12-08 Mario Carrion In UIAutomation/UIAutomationClient/: * System.Windows.Automation/Automation.cs: Raising ArgumentException when EventId is not valid, in RemoveAutomationEventHandler. In UIAutomation/UIAutomationClientTests/: * UIAutomationClientTests/AutomationTest.cs: New test RemoveAutomationEventHandlerTest, tests exception thrown Automation.RemoveAutomationEventHandler when event is not valid. svn path=/trunk/uia2atk/; revision=147862 UIAutomation/UIAutomationClient/ChangeLog | 5 + .../System.Windows.Automation/Automation.cs | 6 ++ UIAutomation/UIAutomationClientTests/ChangeLog | 7 ++ .../UIAutomationClientTests/AutomationTest.cs | 79 ++++++++++++++++++++ 4 files changed, 97 insertions(+), 0 deletions(-) commit c12b9b454dbb442b8763a9bd53fefa127ac52a81 Author: Matt Guo Date: Fri Dec 4 01:58:28 2009 +0000 In UIAutomation/: * UIAutomationClientTests/SampleForm/Form1.cs: * UIAutomationClient/System.Windows.Automation/Automation.cs: * UIAutomationClientTests/UIAutomationClientTests/Makefile.am: * UIAutomationClientTests/UIAutomationClientTests/FocusTest.cs: * UIAutomationSource/Mono.UIAutomation.Source/IAutomationSource.cs: * UIAutomationClient/System.Windows.Automation/AutomationElement.cs: * UIAutomationClientTests/UIAutomationClientTests/UIAutomationClientTests.csproj: * UIAutomationClient/System.Windows.Automation/AutomationFocusChangedEventArgs.cs: Implement AutomationElement.FocusedElement, Automation.[Add|Remove]AutomationFocusChangedEventHandler In UiaDbus/: * UiaDbusBridge/Application.cs: * UiaDbusBridge/AutomationBridge.cs: * UiaDbus/Interfaces/IApplication.cs: * UiaDbusSource/UiaDbusAutomationSource.cs: Implement AutomationElement.FocusedElement, Automation.[Add|Remove]AutomationFocusChangedEventHandler svn path=/trunk/uia2atk/; revision=147633 UIAutomation/ChangeLog | 12 +++ .../System.Windows.Automation/Automation.cs | 24 +++++- .../System.Windows.Automation/AutomationElement.cs | 29 ++++++- .../AutomationFocusChangedEventArgs.cs | 2 +- .../UIAutomationClientTests/SampleForm/Form1.cs | 6 +- .../UIAutomationClientTests/FocusTest.cs | 89 ++++++++++++++++++++ .../UIAutomationClientTests/Makefile.am | 1 + .../UIAutomationClientTests.csproj | 3 +- .../Mono.UIAutomation.Source/IAutomationSource.cs | 11 +++ 9 files changed, 171 insertions(+), 6 deletions(-) commit 35c984164042a82d1fb81be838f7b149a833d939 Author: Mike Gorse Date: Thu Dec 3 16:55:27 2009 +0000 * Mono.UIAutomation.Source/IElement.cs: Add SetFocus. * UiaDbus/Interfaces/IAutomationElement.cs, UiaDbusBridge/Wrappers/ProviderElementWrapper.cs, UiaDbusSource/UiaDbusElement.cs: Implement SetFocus. * System.Windows.Automation/AutomationElement.cs, System.Windows.Automation/DesktopElement.cs: Implement SetFocus. * GridItemSource.cs, tableItemSource.cs: Fetch row and column individually if GetRowColumnExtents fails. * Element.cs: Implement SetFocus (). * AutomationSource.cs: Implement some PropertyChanged handlers. * UIAutomationClientTests/AutomationElementTest.cs, AtspiUiaClientTests/AutomationElementTest.cs, AtspiUiaClientTests/Makefile.am: SampleForm/Form1.cs: Test some PropertyChanged events. * UIAutomationClientTests/BaseTest.cs, GtkForm/GtkForm.cs: Change name of form to match SWF form. * UIAutomationClientTests/TableHierarchyTest.cs: Fix for new table. svn path=/trunk/uia2atk/; revision=147570 .../System.Windows.Automation/AutomationElement.cs | 2 +- .../System.Windows.Automation/DesktopElement.cs | 5 + .../AtspiUiaClientTests/AutomationElementTest.cs | 49 ++++++ .../AtspiUiaClientTests/Makefile.am | 5 +- UIAutomation/UIAutomationClientTests/ChangeLog | 12 ++ .../UIAutomationClientTests/GtkForm/GtkForm.cs | 29 +++- .../UIAutomationClientTests/SampleForm/Form1.cs | 9 + .../AutomationElementTest.cs | 154 ++++++++++++++++++-- .../UIAutomationClientTests/BaseTest.cs | 10 +- .../UIAutomationClientTests/TableHierarchyTest.cs | 20 ++- UIAutomation/UIAutomationSource/ChangeLog | 4 + .../Mono.UIAutomation.Source/IElement.cs | 2 + 12 files changed, 267 insertions(+), 34 deletions(-) commit b9b5cc828f027121fa8998e457486eb6f4d09de7 Author: Mario Carrion Date: Wed Dec 2 16:39:23 2009 +0000 2009-12-02 Mario Carrion In AtspiUiaSource/AtspiUiaSource/: * Element.cs: TryCreateRangeValueElement() -> RangeValueEventHandler, TryCreateValueElement() -> ValueEventHandler, OnRowXXX()/OnColumn() -> GridEventHandler. * Makefile.am: Files renamed. * GridEventHandler.cs: Listens for Column and Row changes. * ValueElement.cs -> ValueEventHandler.cs: Renamed, implementing ISourceEventHandler. * RangeValueElement.cs -> RangeValueEventHandler.cs: Renamed, implementing ISourceEventHandler. In UIAutomation/UIAutomationClientTests/: * AtspiUiaClientTests/Makefile.am: Added RangeValuePatternTest.cs. svn path=/trunk/uia2atk/; revision=147459 .../AtspiUiaClientTests/Makefile.am | 1 + UIAutomation/UIAutomationClientTests/ChangeLog | 4 ++++ 2 files changed, 5 insertions(+), 0 deletions(-) commit e0dba9cd19d3caa7ad9d8e79e64c227d4e7f1144 Author: Mario Carrion Date: Tue Dec 1 16:43:24 2009 +0000 2009-12-01 Mario Carrion In AtspiUiaSource/AtspiUiaSource/: * Element.cs: SupportsSelection() event added. * Makefile.am: Added new files. * ISourceEventHandler.cs: File added, to be implemented my Source event handlers. * SelectionEventHandler.cs: Listens SelectionChanged events to raise SelectionProperty events. In UIAutomation/UIAutomationClientTests/: * GtkForm/GtkForm.cs: ListView element added. * SampleForm/Form1.cs: * AtspiUiaClientTests/Makefile.am: Tests added again (removed in last commit.) * UIAutomationClientTests/BaseTest.cs: Updated to get listview element. * AtspiUiaClientTests/atspiuiaclienttest.sh.in: 'c' replaced with 'f' * UIAutomationClientTests/SelectionPatternTest.cs: Tests Selection events. Fixes Bug #489299. Partially Fixes Bug #558634 svn path=/trunk/uia2atk/; revision=147243 .../AtspiUiaClientTests/Makefile.am | 7 ++ .../AtspiUiaClientTests/atspiuiaclienttest.sh.in | 2 +- UIAutomation/UIAutomationClientTests/ChangeLog | 12 +++ .../UIAutomationClientTests/GtkForm/GtkForm.cs | 17 +++- .../UIAutomationClientTests/SampleForm/Form1.cs | 5 +- .../UIAutomationClientTests/BaseTest.cs | 12 ++- .../SelectionPatternTest.cs | 100 +++++++++++++++++++- 7 files changed, 147 insertions(+), 8 deletions(-) commit 3abf2c2a0fe6816a6235bf2815c7d3001793f9c4 Author: Matt Guo Date: Tue Dec 1 04:05:20 2009 +0000 In UIAutomation/: * UIAutomationClient/System.Windows.Automation/TreeWalker.cs: * UIAutomationClientTests/UIAutomationClientTests/Makefile.am: * UIAutomationSource/Mono.UIAutomation.Source/IAutomationSource.cs: * UIAutomationClientTests/UIAutomationClientTests/RootElementTest.cs: * UIAutomationClient/System.Windows.Automation/TreeWalker.TreeIterator.cs: * UIAutomationClientTests/UIAutomationClientTests/UIAutomationClientTests.csproj: Make client be aware of the applications which start after the client starts. In UiaDbus/: * UiaDbusBridge/Application.cs: * UiaDbus/Interfaces/IApplication.cs: * UiaDbusSource/UiaDbusAutomationSource.cs: Make client be aware of the applications which start after the client starts. svn path=/trunk/uia2atk/; revision=147174 UIAutomation/ChangeLog | 10 +++ .../TreeWalker.TreeIterator.cs | 53 +++++++++------- .../System.Windows.Automation/TreeWalker.cs | 26 ++++++-- .../UIAutomationClientTests/Makefile.am | 1 + .../UIAutomationClientTests/RootElementTest.cs | 65 ++++++++++++++++++++ .../UIAutomationClientTests.csproj | 3 +- .../Mono.UIAutomation.Source/IAutomationSource.cs | 2 + 7 files changed, 132 insertions(+), 28 deletions(-) commit f6d2d466ea0edaef9a6a8ff4a3d6b8ad0b04ece2 Author: Stephen Shaw Date: Mon Nov 30 22:37:24 2009 +0000 Updated NEWS files svn path=/trunk/uia2atk/; revision=147135 UIAutomation/NEWS | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 6186f897a2efe7ba8a0fddd5c4432bf94bfbb590 Author: Stephen Shaw Date: Mon Nov 30 21:40:31 2009 +0000 Updated */configure.ac to version 1.8.90 for our next release svn path=/trunk/uia2atk/; revision=147127 UIAutomation/configure.ac | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 13d44802823cb2e0d3837e9e8c939c36a54e3c0f Author: Mike Gorse Date: Wed Nov 25 17:07:58 2009 +0000 Added missing file svn path=/trunk/uia2atk/; revision=146924 .../AtspiUiaClientTests/AutomationEventTest.cs | 49 ++++++++++++++++++++ 1 files changed, 49 insertions(+), 0 deletions(-) commit 3119055a7f4b98719ee45df1d40e1218d1cdf400 Author: Mike Gorse Date: Wed Nov 25 13:27:53 2009 +0000 * AutomationSource.cs: Finish StructureChanged events. * AtspiUiaClientTests/AutomationEventTest.cs, AtspiUiaClientTests/Makefile.am: Add AutomationEventTest.cs. * GtkForm/GtkForm.cs: Remove extra Click event. svn path=/trunk/uia2atk/; revision=146902 .../AtspiUiaClientTests/Makefile.am | 7 +------ UIAutomation/UIAutomationClientTests/ChangeLog | 7 +++++++ .../UIAutomationClientTests/GtkForm/GtkForm.cs | 1 - 3 files changed, 8 insertions(+), 7 deletions(-) commit 4db40ea3771b69a8f9f5e2188067ccaa0b494aeb Author: Sandy Armstrong Date: Tue Nov 24 17:24:25 2009 +0000 In AtspiUiaSource/AtspiUiaSource/: * AutomationSource.cs: Add stub implementation of GetElementFromHandle. In UIAutomation/UIAutomationClient/: * System.Windows.Automation/AutomationElement.cs: Implement FromHandle. In UIAutomation/UIAutomationClientTests/: * UIAutomationClientTests/AutomationElementTest.cs: Implement test for AutomationElement.FromHandle. In UIAutomation/UIAutomationSource/: * Mono.UIAutomation.Source/IAutomationSource.cs: Add GetElementFromHandle. In UIAutomationWinforms/UIAutomationWinforms/: * Mono.UIAutomation.Winforms/FormProvider.cs: * Mono.UIAutomation.Winforms/SimpleControlProvider.cs: Support NativeWindowHandleProperty for all Control-based providers. In UiaDbus/: * UiaDbusBridge/Application.cs: * UiaDbus/Interfaces/IApplication.cs: * UiaDbusSource/UiaDbusAutomationSource.cs: Implement GetElementFromHandle. * UiaDbusBridge/AutomationBridge.cs: Track handles for non-window providers. * UiaDbusBridge/Wrappers/ProviderElementWrapper.cs: * UiaDbusBridgeTests/ProviderElementWrapperTest.cs: NativeWindowHandle default should be 0, not -1. * UiaDbusBridge/Wrappers/GridPatternWrapper.cs: * UiaDbusBridge/Wrappers/GridItemPatternWrapper.cs: * UiaDbusBridge/Wrappers/SelectionPatternWrapper.cs: * UiaDbusBridge/Wrappers/TextPatternRangeWrapper.cs: * UiaDbusBridge/Wrappers/SelectionItemPatternWrapper.cs: Fix typo in FindWrapperByProvider method name. svn path=/trunk/uia2atk/; revision=146846 UIAutomation/UIAutomationClient/ChangeLog | 5 ++++ .../System.Windows.Automation/AutomationElement.cs | 12 ++++++++- UIAutomation/UIAutomationClientTests/ChangeLog | 5 ++++ .../AutomationElementTest.cs | 25 ++++++++++++++++++++ UIAutomation/UIAutomationSource/ChangeLog | 4 +++ .../Mono.UIAutomation.Source/IAutomationSource.cs | 2 + 6 files changed, 52 insertions(+), 1 deletions(-) commit 77b66b8a1b6cf112faef1a0c2d3a1fce8519104a Author: Sandy Armstrong Date: Tue Nov 24 16:42:05 2009 +0000 In UIAutomation/UIAutomationClient/: * System.Windows.Automation/WindowPattern.cs: Implement WaitForInputIdle. In UIAutomation/UIAutomationClientTests/: * SampleForm/Form1.cs: Add new commands for WindowPattern. * UIAutomationClientTests/Makefile.am: * UIAutomationClientTests/AutomationTest.cs: * UIAutomationClientTests/WindowPatternTest.cs: * UIAutomationClientTests/UIAutomationClientTests.csproj: New tests for WindowPattern. svn path=/trunk/uia2atk/; revision=146843 UIAutomation/UIAutomationClient/ChangeLog | 5 + .../System.Windows.Automation/WindowPattern.cs | 2 +- UIAutomation/UIAutomationClientTests/ChangeLog | 10 + .../UIAutomationClientTests/SampleForm/Form1.cs | 22 + .../UIAutomationClientTests/AutomationTest.cs | 27 -- .../UIAutomationClientTests/Makefile.am | 3 +- .../UIAutomationClientTests.csproj | 1 + .../UIAutomationClientTests/WindowPatternTest.cs | 451 ++++++++++++++++++++ 8 files changed, 492 insertions(+), 29 deletions(-) commit 41fb0c53c9ca63b7673f0533e9fb2acf1fb23290 Author: Mario Carrion Date: Mon Nov 23 20:21:45 2009 +0000 2009-11-23 Mario Carrion In AtspiUiaSource/AtspiUiaSource/: * Element.cs: New static method TryCreateValueElement. * Makefile.am: ValueElement.cs added. * ValueElement.cs: Raises ValuePattern.ValueProperty event. In UIAutomation/UIAutomationClientTests/: * UIAutomationClientTests/ValuePatternTest.cs: Updated according LAMESPEC. svn path=/trunk/uia2atk/; revision=146766 UIAutomation/UIAutomationClientTests/ChangeLog | 5 +++++ .../UIAutomationClientTests/ValuePatternTest.cs | 3 ++- 2 files changed, 7 insertions(+), 1 deletions(-) commit 32903c3d4e184bfa8507f3bb21ea9c583cd0e0e2 Author: Mike Gorse Date: Mon Nov 23 17:12:47 2009 +0000 * SelectionItemSource.cs: Remove unused variable. * AutomationSource.cs: Support Selection events. * Element.cs, RangeValueElement.cs, Makefile.am: Support RangeValue events. * UIAutomationClientTests/SelectionPatternTest.cs, UIAutomationClientTests/RangeValuePatternTest.cs: Add event tests. svn path=/trunk/uia2atk/; revision=146743 UIAutomation/UIAutomationClientTests/ChangeLog | 5 + .../RangeValuePatternTest.cs | 37 +++++++ .../SelectionPatternTest.cs | 107 ++++++++++++++++++-- 3 files changed, 140 insertions(+), 9 deletions(-) commit 67f16749b1d26882b90638b95ed33066f4f5a9b5 Author: Mike Gorse Date: Wed Nov 18 19:34:37 2009 +0000 * AssemblyInfo.cs.in: Add InternalsVisibleTo for AtspiUiaSource. svn path=/trunk/uia2atk/; revision=146438 UIAutomation/UIAutomationClient/AssemblyInfo.cs.in | 1 + UIAutomation/UIAutomationClient/ChangeLog | 4 ++++ 2 files changed, 5 insertions(+), 0 deletions(-) commit 71ca033eb69d7d0d63c0952773ad36fdc5f1661b Author: Mike Gorse Date: Wed Nov 18 19:06:16 2009 +0000 Remove ExpandCollapseSource.cs from Makefile.am and remove more doubles. svn path=/trunk/uia2atk/; revision=146437 .../AtspiUiaClientTests/RangeValuePatternTest.cs | 49 -------------------- .../AtspiUiaClientTests/SelectionPatternTest.cs | 49 -------------------- 2 files changed, 0 insertions(+), 98 deletions(-) commit 8c6c85fd5aad8776b725f0ab41a3b0791493bcda Author: Mike Gorse Date: Wed Nov 18 17:06:46 2009 +0000 * Element.cs, RangeValueSource.cs, SelectionItemSource, SelectionSource.cs, Makefile.am: Add RangeValue, Selection, and SelectionItem implementations. * Mono.UIAutomation.Source/SelectionSource.cs: Add some properties. * System.Windows.Automation/SelectionPattern.cs: Support caching. * UIAutomationClientTests/SelectionPatternTest.cs, UIAutomationClientTests/RangeValuePatternTest.cs, AtspiUiaClientTests/SelectionPatternTest.cs, AtspiUiaClientTests/RangeValuePatternTest.cs: Add RangeValue, Selection, and SelectionItem tests for AtspiUiaSource. AtspiUiaClientTests/atspiuiaclienttest.sh.in: Remove GTK_MODULES. svn path=/trunk/uia2atk/; revision=146431 UIAutomation/UIAutomationClient/ChangeLog | 4 + .../System.Windows.Automation/SelectionPattern.cs | 44 +++++++-- .../AtspiUiaClientTests/RangeValuePatternTest.cs | 98 ++++++++++++++++++++ .../AtspiUiaClientTests/SelectionPatternTest.cs | 98 ++++++++++++++++++++ .../AtspiUiaClientTests/atspiuiaclienttest.sh.in | 2 - UIAutomation/UIAutomationClientTests/ChangeLog | 10 ++ .../RangeValuePatternTest.cs | 2 +- .../SelectionPatternTest.cs | 12 ++- UIAutomation/UIAutomationSource/ChangeLog | 4 + .../Mono.UIAutomation.Source/ISelectionPattern.cs | 3 + 10 files changed, 260 insertions(+), 17 deletions(-) commit 5a2df434ea1591ed0ead6209c22b59151a4ae3c0 Author: Mike Gorse Date: Tue Nov 17 16:21:46 2009 +0000 Removed superfluous file svn path=/trunk/uia2atk/; revision=146355 0 files changed, 0 insertions(+), 0 deletions(-) commit a1f728f04546d98ea97f8e10b296e7331d5528a3 Author: Mike Gorse Date: Tue Nov 17 16:16:35 2009 +0000 Added missing file svn path=/trunk/uia2atk/; revision=146353 .../AtspiUiaClientTests/TableTest.cs | 49 ++++++++++++++++++++ 1 files changed, 49 insertions(+), 0 deletions(-) commit b033681903541f85b3c44b2072ce8446d109a8da Author: Mike Gorse Date: Tue Nov 17 15:45:26 2009 +0000 * Element.cs, AutomationSource.cs, GridItemSource.cs, TableItemSource.cs: Add event infrastructure and support for Toggle and table events. * UIAutomationClientTests/TogglePatternTest.cs, UIAutomationClientTests/TableTest.cs: Test at-spi events. * GtkForm/GtkForm.cs, AtspiUiaClientTests/Makefile.am, AtspiUiaClientTests/TableTest.cs: Use the UIAutomationClientTests TablePattern test. svn path=/trunk/uia2atk/; revision=146352 .../AtspiUiaClientTests/Makefile.am | 2 +- .../AtspiUiaClientTests/TablePatternTest.cs | 111 -------------------- UIAutomation/UIAutomationClientTests/ChangeLog | 10 ++ .../UIAutomationClientTests/GtkForm/GtkForm.cs | 26 +++-- .../UIAutomationClientTests/TableTest.cs | 10 ++- .../UIAutomationClientTests/TogglePatternTest.cs | 3 +- 6 files changed, 36 insertions(+), 126 deletions(-) commit 9b8ccb349729c5c4944a003401effcccb2a31623 Author: Sandy Armstrong Date: Mon Nov 16 16:20:26 2009 +0000 In UIAutomation/UIAutomationClient/: * System.Windows.Automation/TreeWalker.TreeIterator.cs: Improve previous patch to get UIA Verify working with one app. svn path=/trunk/uia2atk/; revision=146269 UIAutomation/UIAutomationClient/ChangeLog | 5 +++++ .../TreeWalker.TreeIterator.cs | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) commit 6f6800920b22e82261373e18a7bae79de72f0458 Author: Sandy Armstrong Date: Thu Nov 12 21:48:58 2009 +0000 In UIAutomation/UIAutomationClient/: * System.Windows.Automation/TreeWalker.TreeIterator.cs: When in doubt, get parent element using GetParent calls. svn path=/trunk/uia2atk/; revision=146065 UIAutomation/UIAutomationClient/ChangeLog | 4 ++++ .../TreeWalker.TreeIterator.cs | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) commit 5ecdcce3d58e05aa7f7a68c256454ce8fe930178 Author: Sandy Armstrong Date: Tue Nov 10 05:45:34 2009 +0000 In UIAutomation/UIAutomationClientTests/: * UIAutomationClientTests/UIAutomationClientTests/BaseTest.cs: * UIAutomationClientTests/UIAutomationClientTests/InvokePatternTest.cs: * UIAutomationClientTests/UIAutomationClientTests/AutomationElementTest.cs: Fix tests to work with latest changes to SampleForm. svn path=/trunk/uia2atk/; revision=145805 UIAutomation/UIAutomationClientTests/ChangeLog | 7 +++++++ .../AutomationElementTest.cs | 4 ++-- .../UIAutomationClientTests/BaseTest.cs | 8 ++++---- .../UIAutomationClientTests/InvokePatternTest.cs | 8 +++++--- 4 files changed, 18 insertions(+), 9 deletions(-) commit 09f25feb8f517e4598de7a8ccb26d7c0c99b9894 Author: Matt Guo Date: Fri Nov 6 15:01:12 2009 +0000 In UIAutomation/: * UIAutomationClientTests/UIAutomationClientTests/BaseTest.cs: Minor fixes on BaseTest.cs: (a) Remove three wrong assertions (b) Make AssertRaises public static svn path=/trunk/uia2atk/; revision=145591 UIAutomation/ChangeLog | 5 +++++ .../UIAutomationClientTests/BaseTest.cs | 13 ++----------- 2 files changed, 7 insertions(+), 11 deletions(-) commit 02ae6ebcbf7e17426edc1b7471bcf8df601bb337 Author: Matt Guo Date: Fri Nov 6 14:51:12 2009 +0000 In UIAutomation/: * UIAutomationClientTests/SampleForm/Form1.cs: * UIAutomationClientTests/UIAutomationClientTests/BaseTest.cs: * UIAutomationClientTests/UIAutomationClientTests/Makefile.am: * UIAutomationClientTests/UIAutomationClientTests/ScrollTest.cs: * UIAutomationClientTests/UIAutomationClientTests/UIAutomationClientTests.csproj: Test ScrollPattern/ScrollItemPattern svn path=/trunk/uia2atk/; revision=145590 UIAutomation/ChangeLog | 9 + .../UIAutomationClientTests/SampleForm/Form1.cs | 35 +- .../UIAutomationClientTests/BaseTest.cs | 6 - .../UIAutomationClientTests/Makefile.am | 1 + .../UIAutomationClientTests/ScrollTest.cs | 412 ++++++++++++++++++++ .../UIAutomationClientTests.csproj | 3 +- 6 files changed, 446 insertions(+), 20 deletions(-) commit d503515692e07b1d051668df8b60744764fa25aa Author: Sandy Armstrong Date: Thu Nov 5 19:41:46 2009 +0000 In UIAutomation/UIAutomationClientTests/: * UIAutomationClientTests/BaseTest.cs: Add new AssertRaises. * UIAutomationClientTests/ConditionTest.cs: * UIAutomationClientTests/TreeWalkerTest.cs: * UIAutomationClientTests/TransformPatternTest.cs: * UIAutomationClientTests/AutomationElementTest.cs: Convert uses of try/catch/Assert.IsTrue pattern to AssertRaises calls. svn path=/trunk/uia2atk/; revision=145532 UIAutomation/UIAutomationClientTests/ChangeLog | 9 +++ .../AutomationElementTest.cs | 40 ++++-------- .../UIAutomationClientTests/BaseTest.cs | 13 ++++ .../UIAutomationClientTests/ConditionTest.cs | 26 ++----- .../TransformPatternTest.cs | 46 ++++--------- .../UIAutomationClientTests/TreeWalkerTest.cs | 70 ++++++-------------- 6 files changed, 76 insertions(+), 128 deletions(-) commit 061c474b34465b095d6c5e250ff2c24432e8182c Author: Sandy Armstrong Date: Thu Nov 5 17:42:42 2009 +0000 In /: * uia2atk.mdw: Convert from obsolete MonoDevelop file formats to msbuild. In MoonAtkBridge/: * MoonAtkBridge.sln: * MoonAtkBridge/MoonAtkBridge.csproj: Convert from obsolete MonoDevelop file formats to msbuild. In MoonAtkBridge/tests/: * tests.mdproj: Convert from obsolete MonoDevelop file formats to msbuild. In UIAutomation/: * UIAutomation.sln: * UIAutomationTypes/Makefile.am: * UIAutomationBridge/Makefile.am: * UIAutomationProvider/Makefile.am: * UIAutomationTypes/UIAutomationTypes.csproj: * UIAutomationBridge/UIAutomationBridge.csproj: * UIAutomationClient/UIAutomationClient.csproj: * UIAutomationSource/UIAutomationSource.csproj: * UIAutomationProvider/UIAutomationProvider.csproj: * UIAutomationTypes/Test/UIAutomationTypesTests.sln: * UIAutomationClientTests/UIAutomationClientTests.sln: * UIAutomationProvider/Test/UIAutomationProviderTests.sln: * UIAutomationProvider/Test/UIAutomationProviderTests.csproj: * UIAutomationClientTests/UIAutomationClientTests/UIAutomationClientTests.csproj: Convert from obsolete MonoDevelop file formats to msbuild. Modify some makefiles to accomodate file sync to MD projects. In UIAutomationWinforms/: * UIAutomationWinforms.sln: * UIAutomationWinforms/UIAutomationWinforms.csproj: * UIAutomationWinformsTests/UIAutomationWinformsTests.csproj: Convert from obsolete MonoDevelop file formats to msbuild. In UiaAtkBridge/: * UiaAtkBridge.sln: * Test/AtkTest/AtkTest.csproj: * Test/GailTest/GailTest.csproj: * bridge-glue/bridge-glue.cproj: * UiaAtkBridge/UiaAtkBridge.csproj: * Test/GailTestApp/GailTestApp.csproj: * samples/managed/FormTest/FormTest.csproj: * Test/UiaAtkBridgeTest/UiaAtkBridgeTest.csproj: * samples/unmanaged/atkHelloWorld/atkHelloWorld.cproj: * samples/managed/atkSharpHelloWorld/atkSharpHelloWorld.csproj: Convert from obsolete MonoDevelop file formats to msbuild. In UiaDbus/: * UiaDbus.sln: * UiaDbus/UiaDbus.csproj: * UiaDbusBridge/UiaDbusBridge.csproj: * UiaDbusSource/UiaDbusSource.csproj: * UiaDbusBridgeTests/UiaDbusBridgeTests.csproj: Convert from obsolete MonoDevelop file formats to msbuild. svn path=/trunk/uia2atk/; revision=145500 UIAutomation/ChangeLog | 19 ++++ UIAutomation/UIAutomation.mds | 33 ------ UIAutomation/UIAutomation.sln | 52 +++++++++ UIAutomation/UIAutomationBridge/Makefile.am | 9 +- .../UIAutomationBridge/UIAutomationBridge.csproj | 62 +++++++++++ .../UIAutomationBridge/UIAutomationBridge.mdp | 35 ------ .../UIAutomationClient/UIAutomationClient.csproj | 104 ++++++++++++++++++ .../UIAutomationClient/UIAutomationClient.mdp | 70 ------------ .../SampleForm/SampleForm.csproj | 4 +- .../UIAutomationClientTests.sln | 3 + .../UIAutomationClientTests.csproj | 8 +- UIAutomation/UIAutomationProvider/Makefile.am | 3 + .../Test/UIAutomationProviderTests.csproj | 5 +- .../Test/UIAutomationProviderTests.sln | 3 + .../UIAutomationProvider.csproj | 95 ++++++++++++++++ .../UIAutomationProvider/UIAutomationProvider.mdp | 65 ----------- .../UIAutomationProviderTests.mdp | 38 ------- .../UIAutomationSource/UIAutomationSource.csproj | 76 +++++++++++++ .../UIAutomationSource/UIAutomationSource.mdp | 48 -------- UIAutomation/UIAutomationTypes/Makefile.am | 33 +++--- .../Test/UIAutomationTypesTests.csproj | 7 +- .../Test/UIAutomationTypesTests.sln | 3 + .../UIAutomationTypes/UIAutomationTypes.csproj | 113 ++++++++++++++++++++ .../UIAutomationTypes/UIAutomationTypes.mdp | 87 --------------- .../UIAutomationTypes/UIAutomationTypesTests.mdp | 76 ------------- 25 files changed, 569 insertions(+), 482 deletions(-) commit d1f1bbf2cc5913439b5d4b5c7a2d0f524a2d4c96 Author: Matt Guo Date: Thu Nov 5 16:21:01 2009 +0000 In UIAutomation/: * UIAutomationClientTests/SampleForm/Form1.cs: * UIAutomationClientTests/SampleForm/Form1.Designer.cs: * UIAutomationClientTests/UIAutomationClientTests/BaseTest.cs: * UIAutomationClientTests/UIAutomationClientTests/Makefile.am: * UIAutomationClientTests/UIAutomationClientTests/ValuePatternTest.cs: * UIAutomationClientTests/UIAutomationClientTests/TogglePatternTest.cs: * UIAutomationClientTests/UIAutomationClientTests/RangeValuePatternTest.cs: * UIAutomationClientTests/UIAutomationClientTests/MultipleViewPatternTest.cs: * UIAutomationClientTests/UIAutomationClientTests/UIAutomationClientTests.csproj: Implement/Test MultipleViewPattern In UiaDbus/: * UiaDbus/Makefile.am: * UiaDbus/UiaDbus.mdp: * UiaDbusBridge/Makefile.am: * UiaDbusSource/Makefile.am: * UiaDbusBridge/UiaDbusBridge.mdp: * UiaDbusSource/UiaDbusElement.cs: * UiaDbusSource/UiaDbusSource.mdp: * UiaDbusSource/UiaDbusGridPattern.cs: * UiaDbusSource/UiaDbusRangeValuePattern.cs: * UiaDbus/Interfaces/IMultipleViewPattern.cs: * UiaDbusSource/UiaDbusMultipleViewPattern.cs: * UiaDbusBridge/Wrappers/ProviderElementWrapper.cs: * UiaDbusBridge/Wrappers/MultipleViewPatternWrapper.cs: Implement MultipleViewPattern svn path=/trunk/uia2atk/; revision=145491 UIAutomation/ChangeLog | 13 ++ .../SampleForm/Form1.Designer.cs | 12 ++ .../UIAutomationClientTests/SampleForm/Form1.cs | 22 +++ .../UIAutomationClientTests/BaseTest.cs | 42 +++++- .../UIAutomationClientTests/Makefile.am | 1 + .../MultipleViewPatternTest.cs | 172 ++++++++++++++++++++ .../RangeValuePatternTest.cs | 12 +- .../UIAutomationClientTests/TogglePatternTest.cs | 11 +- .../UIAutomationClientTests.csproj | 4 +- .../UIAutomationClientTests/ValuePatternTest.cs | 4 +- 10 files changed, 276 insertions(+), 17 deletions(-) commit 95212bd1ce414eeace07b6a7216f3fdd0e06a807 Author: Matt Guo Date: Thu Nov 5 15:31:38 2009 +0000 In UIAutomation/: * UIAutomationSource/UIAutomationSource.mdp: * UIAutomationClientTests/SampleForm/Form1.cs: * UIAutomationClientTests/UIAutomationClientTests/TogglePatternTest.cs: Implement/Test TogglePattern In UiaDbus/: * UiaDbus/Makefile.am: * UiaDbus/UiaDbus.mdp: * UiaDbusBridge/Makefile.am: * UiaDbusSource/Makefile.am: * UiaDbusBridge/UiaDbusBridge.mdp: * UiaDbusSource/UiaDbusElement.cs: * UiaDbusSource/UiaDbusSource.mdp: * UiaDbus/Interfaces/ITogglePattern.cs: * UiaDbusSource/UiaDbusTogglePattern.cs: * UiaDbusBridge/Wrappers/TogglePatternWrapper.cs: * UiaDbusBridge/Wrappers/ProviderElementWrapper.cs: Implement TogglePattern svn path=/trunk/uia2atk/; revision=145484 UIAutomation/ChangeLog | 7 +++ .../UIAutomationClientTests/SampleForm/Form1.cs | 4 ++ .../UIAutomationClientTests/TogglePatternTest.cs | 41 ++++++++++++++++++-- .../UIAutomationSource/UIAutomationSource.mdp | 25 ++++++++++-- 4 files changed, 68 insertions(+), 9 deletions(-) commit 0d60399d35a3ecba9b0e4375d489d15491bcbac1 Author: Matt Guo Date: Thu Nov 5 14:58:15 2009 +0000 In UIAutomation/: * UIAutomationClientTests/SampleForm/Form1.cs: * UIAutomationClientTests/UIAutomationClientTests/RangeValuePatternTest.cs: Tests for RangeValuePattern In UiaDbus/: * UiaDbusSource/UiaDbusElement.cs: * UiaDbusSource/UiaDbusDockPattern.cs: * UiaDbusSource/UiaDbusTextPattern.cs: * UiaDbusSource/UiaDbusScrollPattern.cs: * UiaDbusSource/UiaDbusTextPatternRange.cs: * UiaDbusSource/UiaDbusRangeValuePattern.cs: * UiaDbusSource/UiaDbusScrollItemPattern.cs: * UiaDbusSource/UiaDbusSelectionItemPattern.cs: * UiaDbusSource/UiaDbusExpandCollapsePattern.cs: Translate DBus Exceptions svn path=/trunk/uia2atk/; revision=145483 UIAutomation/ChangeLog | 6 ++ .../UIAutomationClientTests/SampleForm/Form1.cs | 4 + .../RangeValuePatternTest.cs | 85 ++++++++++++++++--- 3 files changed, 81 insertions(+), 14 deletions(-) commit 09de4ea07e10e0ca70596c3a640d24ab6a5dd606 Author: Mike Gorse Date: Tue Nov 3 20:26:58 2009 +0000 * TextSource.cs, ValueSource.cs, Element.cs, Makefile.am: dd Text and Value patterns. * UIAutomationClientTests/TextPatternTest.cs, AtspiUiaClientTests/TextPatternTest.cs, AtspiUiaClientTests/Makefile.am: Add at-spi Text and Value tests. svn path=/trunk/uia2atk/; revision=145320 .../AtspiUiaClientTests/Makefile.am | 1 + .../AtspiUiaClientTests/TextPatternTest.cs | 49 ++++++++++++++++++++ UIAutomation/UIAutomationClientTests/ChangeLog | 6 ++ .../UIAutomationClientTests/TextPatternTest.cs | 8 ++- 4 files changed, 62 insertions(+), 2 deletions(-) commit 04eb08e450f61d0273070aa8b778a48dc5ba4c23 Author: Mike Gorse Date: Wed Oct 28 21:21:58 2009 +0000 * DataItemElement.cs, Element.cs, TableCellElement.cs, TableElement.cs, TableHeaderElement.cs, TreeItemElement.cs, Makefile.am: Translate Atk table hierarchies into a form expected for UIA. * AtspiUiaClientTests/TableHierarchyTest.cs, AtspiUiaClientTests/Makefile.am, UIAutomationClientTests/TableHierarchyTest.cs, UIAutomationClientTests/Makefile.am: Add table hierarchy test. * UIAutomationClientTests/BaseTest.cs, GtkForm/GtkForm.cs: Add DataGrid and RunCommand into Atspi client tests. * SampleForm/Form1.cs: Add some nodes to the TreeView. svn path=/trunk/uia2atk/; revision=144971 .../AtspiUiaClientTests/Makefile.am | 1 + .../AtspiUiaClientTests/TableHierarchyTest.cs | 49 +++++++ UIAutomation/UIAutomationClientTests/ChangeLog | 11 ++ .../UIAutomationClientTests/GtkForm/GtkForm.cs | 60 +++++++- .../UIAutomationClientTests/SampleForm/Form1.cs | 4 + .../UIAutomationClientTests/BaseTest.cs | 15 ++- .../UIAutomationClientTests/Makefile.am | 1 + .../UIAutomationClientTests/TableHierarchyTest.cs | 141 ++++++++++++++++++++ 8 files changed, 270 insertions(+), 12 deletions(-) commit dd7e0f3c247e2ad4dc837934a386f7e0529fa300 Merge: d99f07a 1cb3d1c Author: Matt Guo Date: Thu Oct 22 10:37:09 2009 +0000 In UIAutomation/: * UIAutomationClientTests/SampleForm/Form1.cs: * UIAutomationClientTests/SampleForm/Form1.Designer.cs: * UIAutomationClient/System.Windows.Automation/GridPattern.cs: * UIAutomationClientTests/UIAutomationClientTests/BaseTest.cs: * UIAutomationClientTests/UIAutomationClientTests/Makefile.am: * UIAutomationClientTests/UIAutomationClientTests/TableTest.cs: * UIAutomationSource/Mono.UIAutomation.Source/ITablePattern.cs: * UIAutomationSource/Mono.UIAutomation.Source/ITableItemPattern.cs: * UIAutomationClientTests/UIAutomationClientTests/UIAutomationClientTests.csproj: Implementation/Tests for [Grid|GridItem|Table|TableItem]Pattern In UiaDbus/: * UiaDbus/Makefile.am: * UiaDbus/UiaDbus.mdp: * UiaDbus/Constants.cs: * UiaDbusBridge/Makefile.am: * UiaDbusSource/Makefile.am: * UiaDbusBridge/UiaDbusBridge.mdp: * UiaDbusSource/UiaDbusElement.cs: * UiaDbusSource/UiaDbusSource.mdp: * UiaDbusBridge/AutomationBridge.cs: * UiaDbus/Interfaces/IGridPattern.cs: * UiaDbus/Interfaces/ITablePattern.cs: * UiaDbusSource/UiaDbusGridPattern.cs: * UiaDbusSource/UiaDbusTablePattern.cs: * UiaDbus/Interfaces/IGridItemPattern.cs: * UiaDbus/Interfaces/ITableItemPattern.cs: * UiaDbusSource/UiaDbusGridItemPattern.cs: * UiaDbus/Interfaces/InterfaceConverter.cs: * UiaDbusSource/UiaDbusAutomationSource.cs: * UiaDbusSource/UiaDbusTableItemPattern.cs: * UiaDbusBridge/Wrappers/GridPatternWrapper.cs: * UiaDbusBridge/Wrappers/TablePatternWrapper.cs: * UiaDbusBridge/Wrappers/GridItemPatternWrapper.cs: * UiaDbusBridge/Wrappers/ProviderElementWrapper.cs: * UiaDbusBridge/Wrappers/TableItemPatternWrapper.cs: Implement [Grid|GridItem|Table|TableItem]Pattern svn path=/trunk/uia2atk/; revision=144623 commit 5382dbeeba93c93f164838c845ea342b2882d80a Author: Sandy Armstrong Date: Tue Oct 13 20:21:36 2009 +0000 In UIAutomation/UIAutomationClient/: * System.Windows.Automation/TransformPattern.cs: Fix signature of Resize method. In UIAutomation/UIAutomationClientTests/: * SampleForm/Form1.cs: * UIAutomationClientTests/Makefile.am: * UIAutomationClientTests/AutomationTest.cs: * UIAutomationClientTests/TransformPatternTest.cs: * UIAutomationClientTests/UIAutomationClientTests.csproj: Add TransformPattern tests, move some property verification tests from AutomationTest to TransformPatternTest. In UiaDbus/: * UiaDbus/Makefile.am: * UiaDbus/UiaDbus.mdp: * UiaDbusBridge/Makefile.am: * UiaDbusSource/Makefile.am: * UiaDbusBridge/UiaDbusBridge.mdp: * UiaDbusSource/UiaDbusElement.cs: * UiaDbusSource/UiaDbusSource.mdp: * UiaDbus/Interfaces/ITransformPattern.cs: * UiaDbusSource/UiaDbusTransformPattern.cs: * UiaDbusBridge/Wrappers/ProviderElementWrapper.cs: * UiaDbusBridge/Wrappers/TransformPatternWrapper.cs: Implement TransformPattern. svn path=/trunk/uia2atk/; revision=144047 UIAutomation/UIAutomationClient/ChangeLog | 6 + .../System.Windows.Automation/TransformPattern.cs | 2 +- UIAutomation/UIAutomationClientTests/ChangeLog | 11 + .../UIAutomationClientTests/SampleForm/Form1.cs | 14 +- .../UIAutomationClientTests/AutomationTest.cs | 12 - .../UIAutomationClientTests/Makefile.am | 1 + .../TransformPatternTest.cs | 281 ++++++++++++++++++++ .../UIAutomationClientTests.csproj | 1 + .../Mono.UIAutomation.Source/ITransformPattern.cs | 2 +- 9 files changed, 315 insertions(+), 15 deletions(-) commit a71dccbf70855df7ec8dff0a0c342d0e5d40c0c8 Author: Matt Guo Date: Mon Oct 12 08:21:58 2009 +0000 Minor Fix, Add a sleep after one test step svn path=/trunk/uia2atk/; revision=143944 .../UIAutomationClientTests/ValuePatternTest.cs | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 407576c645451d23a692fb1f3dbad91e887f284f Author: Matt Guo Date: Mon Oct 12 06:10:06 2009 +0000 In UIAutomation/: * UIAutomationClient/System.Windows.Automation/Automation.cs: * UIAutomationClientTests/UIAutomationClientTests/TextPatternTest.cs: * UIAutomationClientTests/UIAutomationClientTests/ValuePatternTest.cs: * UIAutomationClientTests/UIAutomationClientTests/InvokePatternTest.cs: Fix the signature of AddPropertyChangedEventHandler, and refine the event tests. svn path=/trunk/uia2atk/; revision=143936 UIAutomation/ChangeLog | 6 +++ .../System.Windows.Automation/Automation.cs | 2 +- .../UIAutomationClientTests/InvokePatternTest.cs | 3 +- .../UIAutomationClientTests/TextPatternTest.cs | 6 +-- .../UIAutomationClientTests/ValuePatternTest.cs | 33 ++++++++++++------- 5 files changed, 31 insertions(+), 19 deletions(-) commit 01eeda4f68539b2f8a18eb432829d48afeeab608 Author: Matt Guo Date: Fri Oct 9 05:17:43 2009 +0000 In UIAutomation/: * UIAutomation/UIAutomationClientTests/UIAutomationClientTests/swfclienttest.sh.in: * UIAutomation/UIAutomationClientTests/AtspiUiaClientTests/atspiuiaclienttest.sh.in: Add fixture option to atspi test script, and correct the scripts' help messages. svn path=/trunk/uia2atk/; revision=143821 UIAutomation/ChangeLog | 6 ++++++ .../AtspiUiaClientTests/atspiuiaclienttest.sh.in | 16 ++++++++++++---- .../UIAutomationClientTests/swfclienttest.sh.in | 2 +- 3 files changed, 19 insertions(+), 5 deletions(-) commit 23b489456697bf3c07757a10db440bfbf559a71d Author: Matt Guo Date: Thu Oct 8 18:21:31 2009 +0000 changelog svn path=/trunk/uia2atk/; revision=143798 UIAutomation/ChangeLog | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) commit 82eb5d75825a8897e4ea9102cb3f21f25016ee99 Author: Matt Guo Date: Thu Oct 8 18:21:05 2009 +0000 In UIAutomation: * UIAutomationClient/System.Windows.Automation/DockPattern.cs: * UIAutomationClient/System.Windows.Automation/GridPattern.cs: * UIAutomationClient/System.Windows.Automation/TablePattern.cs: * UIAutomationClient/System.Windows.Automation/ValuePattern.cs: * UIAutomationClient/System.Windows.Automation/InvokePattern.cs: * UIAutomationClient/System.Windows.Automation/ScrollPattern.cs: * UIAutomationClient/System.Windows.Automation/TogglePattern.cs: * UIAutomationClient/System.Windows.Automation/WindowPattern.cs: * UIAutomationClient/System.Windows.Automation/GridItemPattern.cs: * UIAutomationClient/System.Windows.Automation/SelectionPattern.cs: * UIAutomationClient/System.Windows.Automation/TableItemPattern.cs: * UIAutomationClient/System.Windows.Automation/TransformPattern.cs: * UIAutomationClient/System.Windows.Automation/RangeValuePattern.cs: * UIAutomationClient/System.Windows.Automation/ScrollItemPattern.cs: * UIAutomationClientTests/UIAutomationClientTests/AutomationTest.cs: * UIAutomationClient/System.Windows.Automation/MultipleViewPattern.cs: * UIAutomationClient/System.Windows.Automation/SelectionItemPattern.cs: * UIAutomationClient/System.Windows.Automation/ExpandCollapsePattern.cs: Modify formats to follow the coding standard. svn path=/trunk/uia2atk/; revision=143797 .../System.Windows.Automation/DockPattern.cs | 8 ++-- .../ExpandCollapsePattern.cs | 8 ++-- .../System.Windows.Automation/GridItemPattern.cs | 24 ++++++------ .../System.Windows.Automation/GridPattern.cs | 12 +++--- .../System.Windows.Automation/InvokePattern.cs | 8 ++-- .../MultipleViewPattern.cs | 12 +++--- .../System.Windows.Automation/RangeValuePattern.cs | 28 ++++++++-------- .../System.Windows.Automation/ScrollItemPattern.cs | 4 +- .../System.Windows.Automation/ScrollPattern.cs | 28 ++++++++-------- .../SelectionItemPattern.cs | 24 ++++++------ .../System.Windows.Automation/SelectionPattern.cs | 20 +++++----- .../System.Windows.Automation/TableItemPattern.cs | 12 +++--- .../System.Windows.Automation/TablePattern.cs | 16 ++++---- .../System.Windows.Automation/TogglePattern.cs | 8 ++-- .../System.Windows.Automation/TransformPattern.cs | 16 ++++---- .../System.Windows.Automation/ValuePattern.cs | 12 +++--- .../System.Windows.Automation/WindowPattern.cs | 36 ++++++++++---------- .../UIAutomationClientTests/AutomationTest.cs | 4 +- 18 files changed, 140 insertions(+), 140 deletions(-) commit 8ae3ef9cf2e01cf388fa707ecd95831658a79953 Author: Matt Guo Date: Thu Oct 8 17:07:26 2009 +0000 In UIAutomation/: * UIAutomationClient/System.Windows.Automation/DockPattern.cs: * UIAutomationClient/System.Windows.Automation/GridPattern.cs: * UIAutomationClient/System.Windows.Automation/TablePattern.cs: * UIAutomationClient/System.Windows.Automation/ScrollPattern.cs: * UIAutomationClient/System.Windows.Automation/TogglePattern.cs: * UIAutomationClient/System.Windows.Automation/WindowPattern.cs: * UIAutomationClient/System.Windows.Automation/GridItemPattern.cs: * UIAutomationClient/System.Windows.Automation/SelectionPattern.cs: * UIAutomationClient/System.Windows.Automation/TableItemPattern.cs: * UIAutomationClient/System.Windows.Automation/TransformPattern.cs: * UIAutomationClient/System.Windows.Automation/RangeValuePattern.cs: * UIAutomationClient/System.Windows.Automation/ScrollItemPattern.cs: * UIAutomationClientTests/UIAutomationClientTests/AutomationTest.cs: * UIAutomationClient/System.Windows.Automation/MultipleViewPattern.cs: * UIAutomationClient/System.Windows.Automation/SelectionItemPattern.cs: * UIAutomationClient/System.Windows.Automation/ExpandCollapsePattern.cs: Initialize the static AutomationIdentifier fields in *Pattern classes. svn path=/trunk/uia2atk/; revision=143793 UIAutomation/ChangeLog | 19 ++ .../System.Windows.Automation/DockPattern.cs | 6 +- .../ExpandCollapsePattern.cs | 6 +- .../System.Windows.Automation/GridItemPattern.cs | 18 +- .../System.Windows.Automation/GridPattern.cs | 9 +- .../MultipleViewPattern.cs | 9 +- .../System.Windows.Automation/RangeValuePattern.cs | 21 +- .../System.Windows.Automation/ScrollItemPattern.cs | 3 +- .../System.Windows.Automation/ScrollPattern.cs | 21 +- .../SelectionItemPattern.cs | 18 +- .../System.Windows.Automation/SelectionPattern.cs | 15 +- .../System.Windows.Automation/TableItemPattern.cs | 9 +- .../System.Windows.Automation/TablePattern.cs | 12 +- .../System.Windows.Automation/TogglePattern.cs | 6 +- .../System.Windows.Automation/TransformPattern.cs | 12 +- .../System.Windows.Automation/WindowPattern.cs | 27 ++- .../UIAutomationClientTests/AutomationTest.cs | 316 ++++++++++++++++++++ 17 files changed, 463 insertions(+), 64 deletions(-) commit 21e9776f57ac2a831cd407674a2a571eb7d30c47 Author: Matt Guo Date: Thu Oct 8 16:57:23 2009 +0000 In UIAutomation/: * UIAutomationClientTests/SampleForm/Form1.cs: * UIAutomationClientTests/SampleForm/Form1.Designer.cs: * UIAutomationClient/System.Windows.Automation/TextPattern.cs: * UIAutomationClientTests/UIAutomationClientTests/BaseTest.cs: * UIAutomationClientTests/UIAutomationClientTests/Makefile.am: * UIAutomationClientTests/UIAutomationClientTests/TextPatternTest.cs: * UIAutomationClientTests/UIAutomationClientTests/InvokePatternTest.cs: * UIAutomationClient/System.Windows.Automation.Text/TextPatternRange.cs: * UIAutomationClientTests/UIAutomationClientTests/UIAutomationClientTests.csproj: Implementing TextPattern In UiaDbus/: * UiaDbus/Makefile.am: * UiaDbus/UiaDbus.mdp: * UiaDbus/Constants.cs: * UiaDbusBridge/Makefile.am: * UiaDbusSource/Makefile.am: * UiaDbusBridge/UiaDbusBridge.mdp: * UiaDbusSource/UiaDbusElement.cs: * UiaDbusSource/UiaDbusSource.mdp: * UiaDbusBridge/AutomationBridge.cs: * UiaDbus/Interfaces/ITextPattern.cs: * UiaDbusSource/UiaDbusTextPattern.cs: * UiaDbus/Interfaces/ITextPatternRange.cs: * UiaDbusSource/UiaDbusTextPatternRange.cs: * UiaDbusBridge/Wrappers/TextPatternWrapper.cs: * UiaDbusBridge/Wrappers/ProviderElementWrapper.cs: * UiaDbusBridge/Wrappers/TextPatternRangeWrapper.cs: Implementing TextPattern svn path=/trunk/uia2atk/; revision=143792 UIAutomation/ChangeLog | 12 + .../TextPatternRange.cs | 4 + .../System.Windows.Automation/TextPattern.cs | 6 +- .../SampleForm/Form1.Designer.cs | 26 +- .../UIAutomationClientTests/SampleForm/Form1.cs | 25 +- .../UIAutomationClientTests/BaseTest.cs | 26 +- .../UIAutomationClientTests/InvokePatternTest.cs | 14 +- .../UIAutomationClientTests/Makefile.am | 1 + .../UIAutomationClientTests/TextPatternTest.cs | 740 ++++++++++++++++++++ .../UIAutomationClientTests.csproj | 3 +- 10 files changed, 835 insertions(+), 22 deletions(-) commit ee4f384c23c51a417ddfb8f1fd57acc443b9134d Author: Mike Gorse Date: Thu Sep 17 04:25:51 2009 +0000 Add Invoke, Grid, gridItem, table, and TableItem bindings for at-spi-sharp. Add RangeValue, Selection, and ExpandCollapse tests. svn path=/trunk/uia2atk/; revision=142091 UIAutomation/UIAutomationClient/Makefile.am | 13 ++- .../System.Windows.Automation/TablePattern.cs | 2 +- .../AtspiUiaClientTests/InvokePatternTest.cs | 49 +++++++++ .../AtspiUiaClientTests/Makefile.am | 5 +- .../AtspiUiaClientTests/TablePatternTest.cs | 111 ++++++++++++++++++++ .../AtspiUiaClientTests/ValuePatternTest.cs | 49 +++++++++ UIAutomation/UIAutomationClientTests/ChangeLog | 23 ++++ .../UIAutomationClientTests/GtkForm/GtkForm.cs | 88 +++++++++++++++- .../UIAutomationClientTests/SampleForm/Form1.cs | 30 ++++++ .../UIAutomationClientTests/BaseTest.cs | 50 +++++++++ .../ExpandCollapsePatternTest.cs | 81 ++++++++++++++ .../UIAutomationClientTests/InvokePatternTest.cs | 2 + .../UIAutomationClientTests/Makefile.am | 3 + .../RangeValuePatternTest.cs | 71 +++++++++++++ .../SelectionPatternTest.cs | 82 ++++++++++++++ .../UIAutomationClientTests.csproj | 3 + UIAutomation/UIAutomationSource/ChangeLog | 4 + .../Mono.UIAutomation.Source/ITablePattern.cs | 6 +- UIAutomation/configure.ac | 4 +- 19 files changed, 660 insertions(+), 16 deletions(-) commit 73618b56fee43567bdaf8229ff4f5e392f1f771a Author: Sandy Armstrong Date: Fri Sep 11 20:16:01 2009 +0000 In UIAutomation/: * Makefile.am: * configure.ac: If building with Mono >= 2.5, expect system-installed WindowsBase. Only use bundled version for Mono < 2.5 (bug #538542). * expansions.m4: Borrow GAC assembly search macros from Banshee. In UIAutomation/UIAutomationClientTests/: * AtspiUiaClientTests/Makefile.am: * UIAutomationClientTests/Makefile.am: Use system-installed WindowsBase when using Mono >= 2.5 (bug #538542). Also, make sure to copy UIAutomationSource and UIAutomationProvider along with other UIA DLLs. svn path=/trunk/uia2atk/; revision=141791 UIAutomation/ChangeLog | 8 +++++ UIAutomation/Makefile.am | 11 +++++- .../AtspiUiaClientTests/Makefile.am | 31 ++++++++++++++++++ UIAutomation/UIAutomationClientTests/ChangeLog | 7 ++++ .../UIAutomationClientTests/Makefile.am | 33 +++++++++++++++++++- UIAutomation/configure.ac | 9 +++++ UIAutomation/expansions.m4 | 26 +++++++++++++++ 7 files changed, 122 insertions(+), 3 deletions(-) commit 7f71df5f743531f19d12dc45adbd4a6be1e6fc0c Author: Sandy Armstrong Date: Tue Sep 8 23:33:33 2009 +0000 2009-09-08 Sandy Armstrong * SampleForm/Form1.Designer.cs: Add NumericUpDown. svn path=/trunk/uia2atk/; revision=141548 UIAutomation/UIAutomationClientTests/ChangeLog | 4 + .../SampleForm/Form1.Designer.cs | 80 +++++++++++-------- 2 files changed, 50 insertions(+), 34 deletions(-) commit ffd35d78b85d68df7774db735e9a1b53f502487b Author: Matt Guo Date: Tue Sep 8 10:11:33 2009 +0000 * UIAutomation/UIAutomationClientTests/UIAutomationClientTests/AutomationElementTest.cs: * UIAutomation/UIAutomationClient/System.Windows.Automation/AutomationElement.AutomationElementInformation.cs: fix 530418 svn path=/trunk/uia2atk/; revision=141494 UIAutomation/ChangeLog | 7 ++ ...tomationElement.AutomationElementInformation.cs | 77 +++++++------------- UIAutomation/UIAutomationClientTests/ChangeLog | 4 + .../AutomationElementTest.cs | 20 +++++- 4 files changed, 57 insertions(+), 51 deletions(-) commit 5f82a0a680a178e894b49aa2221024dfd25dde65 Author: Matt Guo Date: Fri Sep 4 06:43:01 2009 +0000 In UIAutomation/: * UIAutomationClient/System.Windows.Automation/Automation.cs: * UIAutomationClient/System.Windows.Automation/SourceManager.cs: * UIAutomationSource/Mono.UIAutomation.Source/IAutomationSource.cs: Support for automation events. In UIAutomation/UIAutomationClientTests/: * UIAutomationClientTests/BaseTest.cs: * UIAutomationClientTests/Makefile.am: * UIAutomationClientTests/ValuePatternTest.cs: * UIAutomationClientTests/InvokePatternTest.cs: * UIAutomationClientTests/AutomationEventTest.cs: * UIAutomationClientTests/UIAutomationClientTests.csproj: Add event tests for sturcture changes and existing pattern TestFixtures. In UiaDbus/: * UiaDbusSource/Makefile.am: * UiaDbusBridge/Application.cs: * UiaDbusSource/UiaDbusSource.mdp: * UiaDbusBridge/AutomationBridge.cs: * UiaDbus/Interfaces/IApplication.cs: * UiaDbusSource/EventHandlerManager.cs: * UiaDbusSource/DbusExceptionTranslator.cs: * UiaDbusSource/UiaDbusAutomationSource.cs: Add support for automation events. svn path=/trunk/uia2atk/; revision=141293 UIAutomation/ChangeLog | 7 ++ UIAutomation/UIAutomationClient/AssemblyInfo.cs.in | 2 + .../System.Windows.Automation/Automation.cs | 53 +++++++++-- .../System.Windows.Automation/SourceManager.cs | 32 ++++--- UIAutomation/UIAutomationClientTests/ChangeLog | 10 ++ .../UIAutomationClientTests/AutomationEventTest.cs | 98 ++++++++++++++++++++ .../UIAutomationClientTests/BaseTest.cs | 17 +++- .../UIAutomationClientTests/InvokePatternTest.cs | 51 ++++++++++- .../UIAutomationClientTests/Makefile.am | 1 + .../UIAutomationClientTests.csproj | 5 +- .../UIAutomationClientTests/ValuePatternTest.cs | 31 ++++++- .../Mono.UIAutomation.Source/IAutomationSource.cs | 26 +++++ 12 files changed, 302 insertions(+), 31 deletions(-) commit 68a192e06208f40be86e3e97d8fbee0d66eaef46 Author: Sandy Armstrong Date: Mon Aug 31 19:26:01 2009 +0000 In UIAutomation/UIAutomationClientTests/: * SampleForm/Form1.resx: * SampleForm/Form1.Designer.cs: Add TreeView to SampleForm, and rearrange some buttons added in the last commit to unbreak TreeWalker unit tests. svn path=/trunk/uia2atk/; revision=140985 UIAutomation/UIAutomationClientTests/ChangeLog | 7 + .../SampleForm/Form1.Designer.cs | 464 ++++++++++---------- .../UIAutomationClientTests/SampleForm/Form1.resx | 238 +++++----- 3 files changed, 363 insertions(+), 346 deletions(-) commit e5cf98b81158eef8c33cb6a1b9e5aa8abe87240b Author: Matt Guo Date: Mon Aug 24 07:25:37 2009 +0000 Implemented ValuePattern, And updated tests for InvokePattern and ValuePattern, Also some minor bug fixes in UIAutomation are included. svn path=/trunk/uia2atk/; revision=140470 UIAutomation/UIAutomationClient/ChangeLog | 10 + .../System.Windows.Automation/AutomationElement.cs | 2 +- .../System.Windows.Automation/InvokePattern.cs | 6 +- .../System.Windows.Automation/ValuePattern.cs | 9 +- UIAutomation/UIAutomationClientTests/ChangeLog | 11 + .../SampleForm/Form1.Designer.cs | 419 +++++++++++--------- .../UIAutomationClientTests/SampleForm/Form1.cs | 33 ++- .../UIAutomationClientTests/Makefile.am | 3 +- .../UIAutomationClientTests.csproj | 3 +- .../UIAutomationClientTests/ValuePatternTest.cs | 74 ++++ 10 files changed, 371 insertions(+), 199 deletions(-) commit d165ca7d7d9a075837a471f5c85a7a81018f1322 Author: Sandy Armstrong Date: Fri Aug 21 14:47:11 2009 +0000 In UIAutomation/: * Makefile.am: * configure.ac: Move UIAutomationClient/Test to UIAutomationClientTests, enable in build. In UIAutomation/UIAutomationClient/: * Makefile.am: Test/ is now its own project directly under UIAutomation. In UIAutomation/UIAutomationClientTests/: * Makefile.am: * SampleForm/Makefile.am: * AtspiUiaClientTests/Makefile.am: * UIAutomationClientTests/Makefile.am: Add and update makefiles so that Client unit tests are included in build. svn path=/trunk/uia2atk/; revision=140418 UIAutomation/ChangeLog | 6 + UIAutomation/Makefile.am | 7 +- UIAutomation/UIAutomationClient/ChangeLog | 5 + UIAutomation/UIAutomationClient/Makefile.am | 6 - UIAutomation/UIAutomationClient/Test/Makefile.am | 1 - .../AtspiUiaClientTests/Makefile.am | 105 -- .../AtspiUiaClientTests/TogglePatternTest.cs | 49 - .../AtspiUiaClientTests/atspiuiaclienttest.sh.in | 55 - .../UIAutomationClientTests/GtkForm/GtkForm.cs | 82 -- .../UIAutomationClientTests/GtkForm/Makefile.am | 70 -- .../Test/UIAutomationClientTests/Makefile.am | 1 - .../SampleForm/Form1.Designer.cs | 239 ----- .../UIAutomationClientTests/SampleForm/Form1.cs | 49 - .../SampleForm/Form1.resources | Bin 172 -> 0 bytes .../UIAutomationClientTests/SampleForm/Form1.resx | 120 --- .../UIAutomationClientTests/SampleForm/Program.cs | 19 - .../SampleForm/Properties/AssemblyInfo.cs | 36 - .../SampleForm/Properties/Resources.Designer.cs | 68 -- .../SampleForm/Properties/Resources.resources | Bin 172 -> 0 bytes .../SampleForm/Properties/Resources.resx | 117 --- .../SampleForm/Properties/Settings.Designer.cs | 28 - .../SampleForm/Properties/Settings.settings | 7 - .../SampleForm/SampleForm.csproj | 83 -- .../UIAutomationClientTests.sln | 26 - .../AutomationElementTest.cs | 1043 -------------------- .../UIAutomationClientTests/AutomationTest.cs | 491 --------- .../UIAutomationClientTests/BaseTest.cs | 278 ------ .../UIAutomationClientTests/ConditionTest.cs | 481 --------- .../UIAutomationClientTests/InvokePatternTest.cs | 65 -- .../Properties/AssemblyInfo.cs | 36 - .../UIAutomationClientTests/TogglePatternTest.cs | 68 -- .../UIAutomationClientTests/TreeWalkerTest.cs | 328 ------ .../UIAutomationClientTests.csproj | 81 -- .../UIAutomationClientTests/swfclienttest.sh.in | 61 -- .../AtspiUiaClientTests/Makefile.am | 103 ++ .../AtspiUiaClientTests/TogglePatternTest.cs | 49 + .../AtspiUiaClientTests/atspiuiaclienttest.sh.in | 55 + UIAutomation/UIAutomationClientTests/ChangeLog | 7 + .../UIAutomationClientTests/GtkForm/GtkForm.cs | 82 ++ .../UIAutomationClientTests/GtkForm/Makefile.am | 70 ++ UIAutomation/UIAutomationClientTests/Makefile.am | 1 + .../SampleForm/Form1.Designer.cs | 239 +++++ .../UIAutomationClientTests/SampleForm/Form1.cs | 49 + .../UIAutomationClientTests/SampleForm/Form1.resx | 120 +++ .../UIAutomationClientTests/SampleForm/Makefile.am | 63 ++ .../UIAutomationClientTests/SampleForm/Program.cs | 19 + .../SampleForm/Properties/AssemblyInfo.cs | 36 + .../SampleForm/SampleForm.csproj | 85 ++ .../UIAutomationClientTests.sln | 26 + .../AutomationElementTest.cs | 1043 ++++++++++++++++++++ .../UIAutomationClientTests/AutomationTest.cs | 491 +++++++++ .../UIAutomationClientTests/BaseTest.cs | 278 ++++++ .../UIAutomationClientTests/ConditionTest.cs | 481 +++++++++ .../UIAutomationClientTests/InvokePatternTest.cs | 65 ++ .../UIAutomationClientTests/Makefile.am | 111 +++ .../Properties/AssemblyInfo.cs | 36 + .../UIAutomationClientTests/TogglePatternTest.cs | 68 ++ .../UIAutomationClientTests/TreeWalkerTest.cs | 328 ++++++ .../UIAutomationClientTests.csproj | 96 ++ .../UIAutomationClientTests/swfclienttest.sh.in | 61 ++ UIAutomation/configure.ac | 17 +- 61 files changed, 4089 insertions(+), 4101 deletions(-) commit 25d06daaf716892a1b09e37ad152863db8e7a1b3 Author: Sandy Armstrong Date: Thu Aug 20 13:50:26 2009 +0000 In UIAutomation/UIAutomationClient/: * Makefile.am: * UIAutomationClient.mdp: * System.Windows.Automation/Automation.cs: * System.Windows.Automation/AutomationElement.cs: * System.Windows.Automation/AutomationElement.AutomationElementInformation.cs: Simplify AutomationElement comparison methods, and split AutomationElement.AutomationElementInformation out into its own file. svn path=/trunk/uia2atk/; revision=140338 UIAutomation/UIAutomationClient/ChangeLog | 10 ++ UIAutomation/UIAutomationClient/Makefile.am | 1 + .../System.Windows.Automation/Automation.cs | 3 +- ...tomationElement.AutomationElementInformation.cs | 161 ++++++++++++++++++++ .../System.Windows.Automation/AutomationElement.cs | 141 +----------------- .../UIAutomationClient/UIAutomationClient.mdp | 1 + 6 files changed, 177 insertions(+), 140 deletions(-) commit 8a19055853ce847c1ed13f9233c1e4f7ffc8e522 Author: Sandy Armstrong Date: Wed Aug 19 19:43:04 2009 +0000 In UIAutomation/UIAutomationClient/: * Makefile.am: * UIAutomationClient.mdp: * System.Windows.Automation/TreeWalker.cs: * System.Windows.Automation/TreeWalker.TreeIterator.cs: Complete most of TreeWalker (bug #513989). Break iteration implementation out into a private inner class called TreeIterator. * Test/UIAutomationClientTests/UIAutomationClientTests/BaseTest.cs: * Test/UIAutomationClientTests/UIAutomationClientTests/TreeWalkerTest.cs: Thorough tests of TreeWalker behavior. * Test/UIAutomationClientTests/UIAutomationClientTests/swfclienttest.sh.in: Client test runner script. In UiaDbus/: * UiaDbusBridge/Wrappers/ProviderElementWrapper.cs: Never return self as parent element. svn path=/trunk/uia2atk/; revision=140277 UIAutomation/UIAutomationClient/ChangeLog | 16 + UIAutomation/UIAutomationClient/Makefile.am | 1 + .../TreeWalker.TreeIterator.cs | 314 ++++++++++++++++++++ .../System.Windows.Automation/TreeWalker.cs | 68 ++--- .../UIAutomationClientTests/BaseTest.cs | 15 +- .../UIAutomationClientTests/TreeWalkerTest.cs | 120 ++++++++- .../UIAutomationClientTests/swfclienttest.sh.in | 61 ++++ .../UIAutomationClient/UIAutomationClient.mdp | 1 + 8 files changed, 553 insertions(+), 43 deletions(-) commit 62cb210f0ad6a81e92e237d946e362441ac5f50b Author: Sandy Armstrong Date: Mon Aug 17 23:12:45 2009 +0000 In UIAutomation/UIAutomationBridge/: * Mono.UIAutomation.Services/Log.cs: Fix typo in LogLevel check. svn path=/trunk/uia2atk/; revision=140114 UIAutomation/UIAutomationBridge/ChangeLog | 4 ++++ .../Mono.UIAutomation.Services/Log.cs | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) commit 104073562ac2bbbfd2e315813ea8e06f3cc1c1fe Author: Matt Guo Date: Thu Aug 13 02:23:52 2009 +0000 Fix bug #489370, Implement InvokePattern for DbusCore. svn path=/trunk/uia2atk/; revision=139830 UIAutomation/UIAutomationClient/ChangeLog | 12 ++++ .../System.Windows.Automation/AutomationElement.cs | 2 +- .../System.Windows.Automation/InvokePattern.cs | 6 +- .../SampleForm/Form1.Designer.cs | 1 + .../UIAutomationClientTests/SampleForm/Form1.cs | 7 ++ .../UIAutomationClientTests/InvokePatternTest.cs | 65 ++++++++++++++++++++ .../UIAutomationClientTests.csproj | 3 +- UIAutomation/UIAutomationSource/ChangeLog | 5 ++ UIAutomation/UIAutomationSource/Makefile.am | 1 + .../Mono.UIAutomation.Source/IInvokePattern.cs | 34 ++++++++++ 10 files changed, 131 insertions(+), 5 deletions(-) commit c6d76cf13ca34ae60ac2e19bc8fe693ac1a9be03 Author: Neville Gao Date: Wed Aug 12 09:21:03 2009 +0000 Modified StructureChangedEvetintArgs.EventId. svn path=/trunk/uia2atk/; revision=139752 UIAutomation/UIAutomationTypes/ChangeLog | 7 +++ .../StructureChangedEventArgs.cs | 2 +- UIAutomation/UIAutomationTypes/Test/ChangeLog | 5 ++ .../StructureChangedEventArgsTest.cs | 46 ++++++++++++++++++++ .../UIAutomationTypes/UIAutomationTypesTests.mdp | 1 + 5 files changed, 60 insertions(+), 1 deletions(-) commit 4ad9a631f7bd73ce6304349ade710bf56c8b9250 Author: Brad Taylor Date: Wed Aug 5 20:37:26 2009 +0000 Reverting r139385 because it causes the build to break, and because it did not go through a proper peer code review. svn path=/trunk/uia2atk/; revision=139443 UIAutomation/ChangeLog | 5 ----- .../System.Windows.Automation/AutomationElement.cs | 2 +- .../System.Windows.Automation/InvokePattern.cs | 6 +++--- .../SampleForm/Form1.Designer.cs | 1 - .../UIAutomationClientTests/SampleForm/Form1.cs | 7 ------- .../UIAutomationClientTests.csproj | 1 - UIAutomation/UIAutomationSource/Makefile.am | 1 - .../UIAutomationSource/UIAutomationSource.mdp | 15 --------------- 8 files changed, 4 insertions(+), 34 deletions(-) commit ade6404048d79d430a2bffa323c2c4a6681bb2b0 Author: Matt Guo Date: Wed Aug 5 03:38:48 2009 +0000 * Add client test for InvokePattern * Change the type of InvokePattern.source from IInvokeProvider to IInvokePattern svn path=/trunk/uia2atk/; revision=139385 UIAutomation/ChangeLog | 5 +++++ .../System.Windows.Automation/AutomationElement.cs | 2 +- .../System.Windows.Automation/InvokePattern.cs | 6 +++--- .../SampleForm/Form1.Designer.cs | 1 + .../UIAutomationClientTests/SampleForm/Form1.cs | 7 +++++++ .../UIAutomationClientTests.csproj | 1 + UIAutomation/UIAutomationSource/Makefile.am | 1 + .../UIAutomationSource/UIAutomationSource.mdp | 15 +++++++++++++++ 8 files changed, 34 insertions(+), 4 deletions(-) commit d3797e4a5b95add386d05872a9497a8e0aa7dda8 Author: Sandy Armstrong Date: Wed Jul 29 20:37:08 2009 +0000 In /: * Uia2Atk.mds: * UiaDbus/: * UiaDbusCoreBridge/: * DbusCoreUiaSource/: Merge UiaDbusCoreBridge and DbusCoreUiaSource into a single project: UiaDbus. In UIAutomation/UIAutomationClient/: * System.Windows.Automation/SourceManager.cs: DbusCoreUiaSource -> UiaDbusSource. In UIAutomation/UIAutomationProvider/: * System.Windows.Automation.Provider/AutomationInteropProvider.cs: UiaDbusCoreBridge->UiaDbusBridge. In UiaDbus/: * *: Rename DbusCore->UiaDbus, UiaDbusCoreBridge*->UiaDbusBridge*, and DbusCoreUiaSource->UiaDbusSource. Update tarball names, .pc files, file names, namespaces, etc. svn path=/trunk/uia2atk/; revision=138997 UIAutomation/UIAutomationClient/ChangeLog | 5 +++++ .../System.Windows.Automation/SourceManager.cs | 6 +++--- UIAutomation/UIAutomationProvider/ChangeLog | 5 +++++ .../AutomationInteropProvider.cs | 6 +++--- 4 files changed, 16 insertions(+), 6 deletions(-) commit e0eedaac205e9dee55651418b56f8d30da4abefa Author: Andrés G. Aragoneses Date: Wed Jul 15 15:57:52 2009 +0000 * UiaAtkBridge/Test/UiaAtkBridgeTest/BridgeTester.cs: * UIAutomationWinforms/UIAutomationWinformsTests/TestHelper.cs: Hook on Log.Error events. * UIAutomation/UIAutomationBridge/Mono.UIAutomation.Services/Log.cs: New ErrorHappened event for unit tests. Fixes bug #485268. svn path=/trunk/uia2atk/; revision=137970 UIAutomation/UIAutomationBridge/ChangeLog | 5 +++ .../Mono.UIAutomation.Services/Log.cs | 30 ++++++++++++-------- 2 files changed, 23 insertions(+), 12 deletions(-) commit 21ef3ba4931a4db1d95d8f2721de1c3354d3690d Author: Mike Gorse Date: Wed Jul 1 13:49:54 2009 +0000 Added pattern infrastructure. svn path=/trunk/uia2atk/; revision=137194 UIAutomation/UIAutomationClient/ChangeLog | 36 +++ UIAutomation/UIAutomationClient/Makefile.am | 6 + .../TextPatternRange.cs | 106 ++++--- .../System.Windows.Automation/AutomationElement.cs | 311 +++++++++++--------- .../System.Windows.Automation/DesktopElement.cs | 11 + .../System.Windows.Automation/DockPattern.cs | 20 +- .../ExpandCollapsePattern.cs | 22 +- .../System.Windows.Automation/GridItemPattern.cs | 38 ++- .../System.Windows.Automation/GridPattern.cs | 24 +- .../System.Windows.Automation/InvokePattern.cs | 9 +- .../MultipleViewPattern.cs | 27 ++- .../System.Windows.Automation/RangeValuePattern.cs | 45 ++-- .../System.Windows.Automation/ScrollItemPattern.cs | 9 +- .../System.Windows.Automation/ScrollPattern.cs | 51 ++-- .../SelectionItemPattern.cs | 29 ++- .../System.Windows.Automation/SelectionPattern.cs | 30 ++- .../System.Windows.Automation/SourceManager.cs | 8 + .../System.Windows.Automation/TableItemPattern.cs | 47 ++-- .../System.Windows.Automation/TablePattern.cs | 37 ++- .../System.Windows.Automation/TextPattern.cs | 34 ++- .../System.Windows.Automation/TogglePattern.cs | 20 +- .../System.Windows.Automation/TransformPattern.cs | 34 ++- .../System.Windows.Automation/ValuePattern.cs | 25 +- .../System.Windows.Automation/WindowPattern.cs | 49 ++-- UIAutomation/UIAutomationClient/Test/Makefile.am | 1 + .../AtspiUiaClientTests/Makefile.am | 105 +++++++ .../AtspiUiaClientTests/TogglePatternTest.cs | 49 +++ .../AtspiUiaClientTests/atspiuiaclienttest.sh.in | 55 ++++ .../UIAutomationClientTests/GtkForm/GtkForm.cs | 82 +++++ .../UIAutomationClientTests/GtkForm/Makefile.am | 70 +++++ .../Test/UIAutomationClientTests/Makefile.am | 1 + .../AutomationElementTest.cs | 304 +++++++++++++++++++ .../UIAutomationClientTests/BaseTest.cs | 139 ++++++++- .../UIAutomationClientTests/TogglePatternTest.cs | 68 +++++ .../UIAutomationClientTests.csproj | 3 +- UIAutomation/UIAutomationSource/Makefile.am | 16 +- .../Mono.UIAutomation.Source/IElement.cs | 4 + .../Mono.UIAutomation.Source/IGridItemPattern.cs | 44 +++ .../Mono.UIAutomation.Source/IGridPattern.cs | 43 +++ .../IMultipleViewPattern.cs | 44 +++ .../Mono.UIAutomation.Source/IRangeValuePattern.cs | 47 +++ .../Mono.UIAutomation.Source/IScrollPattern.cs | 49 +++ .../ISelectionItemPattern.cs | 47 +++ .../Mono.UIAutomation.Source/ISelectionPattern.cs | 42 +++ .../Mono.UIAutomation.Source/ITableItemPattern.cs | 46 +++ .../Mono.UIAutomation.Source/ITablePattern.cs | 47 +++ .../Mono.UIAutomation.Source/ITextPattern.cs | 43 +++ .../Mono.UIAutomation.Source/ITextPatternRange.cs | 55 ++++ .../Mono.UIAutomation.Source/ITransformPattern.cs | 48 +++ .../Mono.UIAutomation.Source/IValuePattern.cs | 43 +++ .../Mono.UIAutomation.Source/IWindowPattern.cs | 52 ++++ UIAutomation/configure.ac | 39 ++- 52 files changed, 2205 insertions(+), 409 deletions(-) commit c0103738ee8ae77de263ba7cb0023027ef368f42 Author: Sandy Armstrong Date: Wed Jun 24 21:40:54 2009 +0000 In UIAutomation/UIAutomationClient/: * Test/UIAutomationClientTests/UIAutomationClientTests/AutomationElementTest.cs: Add Ignore'd CultureTest as a reminder for the future. svn path=/trunk/uia2atk/; revision=136791 UIAutomation/UIAutomationClient/ChangeLog | 5 +++++ .../AutomationElementTest.cs | 10 ++++++++++ 2 files changed, 15 insertions(+), 0 deletions(-) commit 6c08a4936245ccc7291290a09f1652958a53b0a4 Author: Sandy Armstrong Date: Wed Jun 24 21:35:20 2009 +0000 In UIAutomation/: * WindowsBase/System.Windows/Rect.cs: Add missing using statement. svn path=/trunk/uia2atk/; revision=136789 UIAutomation/ChangeLog | 4 ++++ UIAutomation/WindowsBase/System.Windows/Rect.cs | 1 + 2 files changed, 5 insertions(+), 0 deletions(-) commit 3d819638fef2872f65f6278cab3ecf5ab991f160 Author: Sandy Armstrong Date: Wed Jun 24 21:29:46 2009 +0000 In UIAutomation/: * WindowsBase/System.Windows/Rect.cs: Implement ToString methods (proposed fix for bug #516165). In UIAutomation/UIAutomationClient/: * Makefile.am: * UIAutomationClient.mdp: * System.Windows.Automation/InternalCondition.cs -> System.Windows.Automation/BoolCondition.cs: Rename InternalCondition to the more-specific internal BoolCondition. * Test/UIAutomationClientTests/UIAutomationClientTests/ConditionTest.cs: Updated unit tests to thoroughly cover PropertyCondition behavior. * System.Windows.Automation/Condition.cs: * System.Windows.Automation/Automation.cs: * System.Windows.Automation/OrCondition.cs: * System.Windows.Automation/AndCondition.cs: * System.Windows.Automation/NotCondition.cs: * System.Windows.Automation/PropertyConditon.cs: * System.Windows.Automation/AutomationElement.cs: Update PropertyCondition implementation to match unit tests. Refactor Element/Condition matching to work via new virtual Condition.AppliesTo method, instead of old AutomationElement.ElementMeetsCondition method. svn path=/trunk/uia2atk/; revision=136788 UIAutomation/ChangeLog | 5 + UIAutomation/UIAutomationClient/ChangeLog | 21 + UIAutomation/UIAutomationClient/Makefile.am | 2 +- .../System.Windows.Automation/AndCondition.cs | 8 + .../System.Windows.Automation/Automation.cs | 2 +- .../System.Windows.Automation/AutomationElement.cs | 66 +--- .../System.Windows.Automation/BoolCondition.cs | 44 ++ .../System.Windows.Automation/Condition.cs | 8 +- .../System.Windows.Automation/InternalCondition.cs | 33 -- .../System.Windows.Automation/NotCondition.cs | 5 + .../System.Windows.Automation/OrCondition.cs | 8 + .../System.Windows.Automation/PropertyConditon.cs | 305 ++++++++++++++- .../UIAutomationClientTests/ConditionTest.cs | 427 +++++++++++++++++++- .../UIAutomationClient/UIAutomationClient.mdp | 2 +- UIAutomation/WindowsBase/System.Windows/Rect.cs | 35 ++- 15 files changed, 847 insertions(+), 124 deletions(-) commit f462530099428a0c5353fba34e4cb647490b956b Author: Sandy Armstrong Date: Wed Jun 17 19:35:05 2009 +0000 * Test/UIAutomationClientTests/SampleForm/Form1.resx: * Test/UIAutomationClientTests/SampleForm/Form1.cs: * Test/UIAutomationClientTests/SampleForm/Form1.Designer.cs: Add more layers to control hierarchy for TreeWalkerTest. * Test/UIAutomationClientTests/UIAutomationClientTests/AutomationElementTest.cs: * Test/UIAutomationClientTests/UIAutomationClientTests/AutomationTest.cs: * Test/UIAutomationClientTests/UIAutomationClientTests/BaseTest.cs: Factor common code dealing with SampleForm into BaseTest. Also, use String instead of string when accessing static String members. * Test/UIAutomationClientTests/UIAutomationClientTests/TreeWalkerTest.cs: New unit test of TreeWalker support for Conditions. * Test/UIAutomationClientTests/UIAutomationClientTests/UIAutomationClientTests.csproj: Add new files svn path=/trunk/uia2atk/; revision=136348 UIAutomation/UIAutomationClient/ChangeLog | 19 ++ .../SampleForm/Form1.Designer.cs | 107 ++++++++- .../UIAutomationClientTests/SampleForm/Form1.cs | 84 ++++---- .../UIAutomationClientTests/SampleForm/Form1.resx | 238 ++++++++++---------- .../AutomationElementTest.cs | 143 ++---------- .../UIAutomationClientTests/AutomationTest.cs | 15 +- .../UIAutomationClientTests/BaseTest.cs | 160 +++++++++++++ .../UIAutomationClientTests/TreeWalkerTest.cs | 210 +++++++++++++++++ .../UIAutomationClientTests.csproj | 4 +- 9 files changed, 677 insertions(+), 303 deletions(-) commit 7bf0ffb7ba07c10ffa02bafe6fc53d7ee8eea59e Author: Sandy Armstrong Date: Mon Jun 15 16:24:35 2009 +0000 In /: * Uia2Atk.mds: Add DbusCoreUiaSource to solution. In DbusCoreUiaSource/: * NEWS: * README: * COPYING: * ChangeLog: * autogen.sh: * Makefile.am: * configure.ac: * mono-uia.snk: * expansions.m4: * Makefile.include: * DbusCoreUiaSource.mds: * DbusCoreUiaSource/ChangeLog: * DbusCoreUiaSource/Makefile.am: * DbusCoreUiaSource/AssemblyInfo.cs: * DbusCoreUiaSource/DbusCoreUiaSource.mdp: Infrastructure for new DbusCoreUiaSource assembly. * DbusCoreUiaSource/DbusCoreElement.cs: * DbusCoreUiaSource/DbusCoreAutomationSource.cs: Implementation of UIAutomationSource interfaces for automation elements exposed over the UiaDbusCoreBridge. In UIAutomation/UIAutomationClient/: * System.Windows.Automation/TreeWalker.cs: Fix typo which broke use of all TreeWalkers expect RawViewWalker. svn path=/trunk/uia2atk/; revision=136140 UIAutomation/UIAutomationClient/ChangeLog | 5 +++++ .../System.Windows.Automation/TreeWalker.cs | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit ce2552077b240c0a55695421bd91a73ce14e5510 Author: Sandy Armstrong Date: Thu Jun 11 02:07:22 2009 +0000 In UIAutomation/UIAutomationClient/: * System.Windows.Automation/Condition.cs: Implement TrueCondition and FalseCondition. * Test/UIAutomationClientTests/UIAutomationClientTests/ConditionTest.cs: * Test/UIAutomationClientTests/UIAutomationClientTests/UIAutomationClientTests.csproj: Unit tests for TrueCondition and FalseCondition. * Test/UIAutomationClientTests/SampleForm/Form1.cs: * Test/UIAutomationClientTests/UIAutomationClientTests/AutomationTest.cs: * Test/UIAutomationClientTests/UIAutomationClientTests/AutomationElementTest.cs: Add missing headers, fix some typos. svn path=/trunk/uia2atk/; revision=135907 UIAutomation/UIAutomationClient/ChangeLog | 14 ++++ .../System.Windows.Automation/Condition.cs | 6 +- .../UIAutomationClientTests/SampleForm/Form1.cs | 25 ++++++ .../AutomationElementTest.cs | 25 ++++++ .../UIAutomationClientTests/AutomationTest.cs | 29 +++++++- .../UIAutomationClientTests/ConditionTest.cs | 78 ++++++++++++++++++++ .../UIAutomationClientTests.csproj | 1 + 7 files changed, 174 insertions(+), 4 deletions(-) commit 588f9981701903eb5d105fd2e6c826b364e589bf Author: Sandy Armstrong Date: Wed Jun 10 22:30:24 2009 +0000 In UIAutomation/: * UIAutomation.mds: Add UIAutomationClient to solution. In UIAutomation/UIAutomationClient/: * Makefile.am: * AssemblyInfo.cs.in: * UIAutomationClient.mdp: * UIAutomationClient.mds: Add new files and a MonoDevelop solution. * System.Windows.Automation/*Condition.cs: Implement Condition classes, including one for internal uses. * System.Windows.Automation/Automation.cs: Implement (bug #489325). * System.Windows.Automation/TreeWalker.cs: * System.Windows.Automation/SourceManager.cs: Implement TreeWalker class, and SourceManager which aids in loading AutomationSources and their AutomationElements into the automation tree (bug #489321 and bug #489323). * System.Windows.Automation/DesktopElement.cs: * System.Windows.Automation/AutomationElement.cs: Implment AutomationElement class as a wrapper around the UIAutomationSource.IElement interface, and a special DesktopElement for the root of the automation tree. This fixes bug #489322, but some pieces of this class are the work of future bugs. * System.Windows.Automation/AutomationElementCollection.cs: Implement (bug #489330). * System.Windows.Automation/*Pattern*.cs: * System.Windows.Automation/CacheRequest.cs: * System.Windows.Automation/AutomationFocusChangedEventArgs.cs: Stub-out. * Test/UIAutomationClientTests/*: Tests of UIAutomationClient classes. Created in Visual Studio to test Microsoft's implementation, first. Only Automation and AutomationElement classes are thoroughly tested so far. In UIAutomation/UIAutomationSource/: * Mono.UIAutomation.Source/IElement.cs: Add SupportsProperty. In UIAutomation/UIAutomationTypes/: * System.Windows.Automation/TreeScope.cs: Add Flags attribute. In UIAutomationWinforms/UIAutomationWinforms/: * Makefile.am: Alphabetize. * Mono.UIAutomation.Winforms/SimpleControlProvider.cs: Add support for FrameworkId and ProcessId properties. * Mono.UIAutomation.Winforms/FragmentControlProvider.cs: Add support for RuntimeId property. In UiaDbusCoreBridge/: * DbusCore/Interfaces/IAutomationElement.cs: Add SupportsProperty. * UiaDbusCoreBridge/Wrappers/ProviderElementWrapper.cs: Implement SupportsProperty and fix AutomationId to expect an int from the provider. * UiaDbusCoreBridgeTests/ProviderElementWrapperTest.cs: Update AutomationId test to reflect above fix. svn path=/trunk/uia2atk/; revision=135899 UIAutomation/ChangeLog | 4 + UIAutomation/UIAutomation.mds | 6 +- UIAutomation/UIAutomationClient/AssemblyInfo.cs.in | 2 - UIAutomation/UIAutomationClient/ChangeLog | 34 + UIAutomation/UIAutomationClient/Makefile.am | 42 +- .../TextPatternRange.cs | 5 + .../System.Windows.Automation/AndCondition.cs | 44 ++ .../System.Windows.Automation/Automation.cs | 364 +++++++++ .../System.Windows.Automation/AutomationElement.cs | 602 ++++++++++++++-- .../AutomationElementCollection.cs | 28 +- .../AutomationFocusChangedEventArgs.cs | 57 ++ .../System.Windows.Automation/BasePattern.cs | 4 +- .../System.Windows.Automation/CacheRequest.cs | 8 +- .../System.Windows.Automation/Condition.cs | 11 +- .../System.Windows.Automation/DesktopElement.cs | 229 ++++++ .../System.Windows.Automation/DockPattern.cs | 66 ++ .../ExpandCollapsePattern.cs | 71 ++ .../System.Windows.Automation/GridItemPattern.cs | 93 +++ .../System.Windows.Automation/GridPattern.cs | 74 ++ .../System.Windows.Automation/InternalCondition.cs | 33 + .../System.Windows.Automation/InvokePattern.cs | 45 ++ .../MultipleViewPattern.cs | 78 ++ .../System.Windows.Automation/NotCondition.cs | 45 ++ .../System.Windows.Automation/OrCondition.cs | 44 ++ .../System.Windows.Automation/PropertyConditon.cs | 73 ++ .../System.Windows.Automation/RangeValuePattern.cs | 106 +++ .../System.Windows.Automation/ScrollItemPattern.cs | 43 + .../System.Windows.Automation/ScrollPattern.cs | 123 +++ .../SelectionItemPattern.cs | 90 +++ .../System.Windows.Automation/SelectionPattern.cs | 78 ++ .../System.Windows.Automation/SourceManager.cs | 120 +++ .../System.Windows.Automation/TableItemPattern.cs | 97 +++ .../System.Windows.Automation/TablePattern.cs | 87 +++ .../System.Windows.Automation/TextPattern.cs | 20 + .../System.Windows.Automation/TogglePattern.cs | 66 ++ .../System.Windows.Automation/TransformPattern.cs | 92 +++ .../System.Windows.Automation/TreeWalker.cs | 164 ++++ .../System.Windows.Automation/ValuePattern.cs | 74 ++ .../System.Windows.Automation/WindowPattern.cs | 120 +++ .../SampleForm/Form1.Designer.cs | 145 ++++ .../UIAutomationClientTests/SampleForm/Form1.cs | 17 + .../SampleForm/Form1.resources | Bin 0 -> 172 bytes .../UIAutomationClientTests/SampleForm/Form1.resx | 120 +++ .../UIAutomationClientTests/SampleForm/Program.cs | 19 + .../SampleForm/Properties/AssemblyInfo.cs | 36 + .../SampleForm/Properties/Resources.Designer.cs | 68 ++ .../SampleForm/Properties/Resources.resources | Bin 0 -> 172 bytes .../SampleForm/Properties/Resources.resx | 117 +++ .../SampleForm/Properties/Settings.Designer.cs | 28 + .../SampleForm/Properties/Settings.settings | 7 + .../SampleForm/SampleForm.csproj | 83 ++ .../UIAutomationClientTests.sln | 26 + .../AutomationElementTest.cs | 803 ++++++++++++++++++++ .../UIAutomationClientTests/AutomationTest.cs | 477 ++++++++++++ .../Properties/AssemblyInfo.cs | 36 + .../UIAutomationClientTests.csproj | 76 ++ .../UIAutomationClient/UIAutomationClient.mdp | 68 ++ .../UIAutomationClient/UIAutomationClient.mds | 16 + UIAutomation/UIAutomationSource/ChangeLog | 6 +- .../Mono.UIAutomation.Source/IElement.cs | 2 + UIAutomation/UIAutomationTypes/ChangeLog | 4 + .../System.Windows.Automation/TreeScope.cs | 2 +- 62 files changed, 5420 insertions(+), 78 deletions(-) commit f1a3ab650022feffe5fae32fff84169ea2d894db Author: Sandy Armstrong Date: Thu Jun 4 20:34:41 2009 +0000 In UIAutomation/: * Makefile.am: * configure.ac: * UIAutomation.mds: * data/mono-uia.pc.in.in: * UIAutomationSource/*: Add UIAutomationSource to build. In UIAutomation/UIAutomationSource/: * Makefile.am: * AssemblyInfo.cs.in: * UIAutomationSource.mdp: * UIAutomationSource.mds: Infrastructure for UIAutomationSource assembly. * Mono.UIAutomation.Source/IElement.cs: UIA automation element abstraction layer (bug #489322). * Mono.UIAutomation.Source/IAutomationSource.cs: UIA automation source abstraction layer (bug #489323). svn path=/trunk/uia2atk/; revision=135480 UIAutomation/ChangeLog | 8 ++ UIAutomation/Makefile.am | 2 +- UIAutomation/UIAutomation.mds | 4 + UIAutomation/UIAutomationSource/AssemblyInfo.cs.in | 56 ++++++++++++ UIAutomation/UIAutomationSource/ChangeLog | 13 +++ UIAutomation/UIAutomationSource/Makefile.am | 64 +++++++++++++ .../Mono.UIAutomation.Source/IAutomationSource.cs | 40 ++++++++ .../Mono.UIAutomation.Source/IElement.cs | 96 ++++++++++++++++++++ .../UIAutomationSource/UIAutomationSource.mdp | 33 +++++++ .../UIAutomationSource/UIAutomationSource.mds | 16 ++++ UIAutomation/configure.ac | 2 + UIAutomation/data/mono-uia.pc.in.in | 2 +- 12 files changed, 334 insertions(+), 2 deletions(-) commit c5f557737fc8934901c121d6402c980fb9bb27a8 Author: Andrés G. Aragoneses Date: Mon Apr 27 20:49:53 2009 +0000 fix changelog svn path=/trunk/uia2atk/; revision=132785 UIAutomation/UIAutomationProvider/ChangeLog | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) commit 188ccb4721c179d820a310d42d0485be613e4ecb Author: Andrés G. Aragoneses Date: Mon Apr 27 20:47:50 2009 +0000 * UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms/ToolBarProvider.cs: Handle dropdownmenu and style changed-events. Fixes final part of bug#481357. * UIAutomation/UIAutomationProvider/ChangeLog: svn path=/trunk/uia2atk/; revision=132784 UIAutomation/UIAutomationProvider/ChangeLog | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) commit e946632f92b5ffe550693e991ad8ee09c001fa1f Author: Sandy Armstrong Date: Thu Apr 9 14:42:04 2009 +0000 In /: * Uia2Atk.mds: * UiaDbusCoreBridge/: Added UiaDbusCoreBridge sub-project. * .gitignore: Update. In UIAutomation/UIAutomationBridge/: * Mono.UIAutomation.Bridge/IAutomationBridge.cs: Whitespace fix. In UIAutomation/UIAutomationProvider/: * System.Windows.Automation.Provider/AutomationInteropProvider.cs: Add support for multiple bridges. Include UiaDbusCoreBridge by default. In UIAutomationWinforms/UIAutomationWinformsTests/: * TestHelper.cs: Update reflection into AutomationInteropProvider. * TextRangeProviderTest.cs: Use TestHelper for SetUp/TearDown. In UiaDbusCoreBridge/: * Initial commit of alternative DbusCore bridge for providing better support for Winforms and Moonlight apps in the Client API. svn path=/trunk/uia2atk/; revision=131391 UIAutomation/UIAutomationBridge/ChangeLog | 4 + .../Mono.UIAutomation.Bridge/IAutomationBridge.cs | 2 +- UIAutomation/UIAutomationProvider/ChangeLog | 5 ++ .../AutomationInteropProvider.cs | 77 +++++++++++++------- 4 files changed, 60 insertions(+), 28 deletions(-) commit 632581dc7a8da210d9c7a381883227e2576fa52b Author: Andrés G. Aragoneses Date: Thu Mar 19 14:28:56 2009 +0000 * UIAutomationProvider/System.Windows.Automation.Provider/AutomationInteropProvider.cs: Update comment (since this methods are public because we mimic MS API). Thanks to Sandy for noticing. svn path=/trunk/uia2atk/; revision=129776 UIAutomation/UIAutomationProvider/ChangeLog | 6 ++++++ .../AutomationInteropProvider.cs | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) commit 0a31fcb61c3b653c0a0d4dd8c0e11842f2ee9c40 Author: Sandy Armstrong Date: Tue Mar 17 18:09:55 2009 +0000 * UIAutomation/configure.ac: * UiaAtkBridge/configure.ac: * UIAutomationWinforms/configure.ac: Bump version to 1.9.0. UIAutomationWinforms will require mono-uia >= 1.9.0. Not sure yet about UiaAtkBridge. svn path=/trunk/uia2atk/; revision=129613 UIAutomation/ChangeLog | 6 ++++++ UIAutomation/configure.ac | 2 +- 2 files changed, 7 insertions(+), 1 deletions(-) commit 6df6934a7529ac17f6719a8440875b4f3c2064bf Author: Brad Taylor Date: Tue Mar 17 16:09:22 2009 +0000 2009-03-17 Brad Taylor In UIAutomationWinforms/: * NEWS: Update codename for 1.0. In UiaAtkBridge/: * NEWS: Update codename for 1.0. In UIAutomation/: * NEWS: Update codename for 1.0. svn path=/trunk/uia2atk/; revision=129600 UIAutomation/ChangeLog | 4 ++++ UIAutomation/NEWS | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) commit 2b371fa4ba2d9d4e7dc7c9752d77bc7d6e43936e Author: Sandy Armstrong Date: Fri Mar 13 13:10:31 2009 +0000 * UiaAtkBridge/NEWS: * UIAutomation/NEWS: * UiaAtkBridge/README: * UIAutomation/configure.ac: * UiaAtkBridge/configure.ac: * UIAutomationWinforms/NEWS: * UIAutomationWinforms/README: * UIAutomationWinforms/configure.ac: Bump version to 1.0, update dependencies. svn path=/trunk/uia2atk/; revision=129276 UIAutomation/ChangeLog | 5 +++++ UIAutomation/NEWS | 3 +++ UIAutomation/configure.ac | 2 +- 3 files changed, 9 insertions(+), 1 deletions(-) commit e0f8b8cbcaadc738b98276204a08e004211d4a1c Author: Sandy Armstrong Date: Thu Mar 12 19:22:59 2009 +0000 * UIAutomation/UIAutomationBridge/Mono.UIAutomation.Services/Log.cs: Fix typo in string formatting. svn path=/trunk/uia2atk/; revision=129180 UIAutomation/UIAutomationBridge/ChangeLog | 5 +++++ .../Mono.UIAutomation.Services/Log.cs | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit c139f0092da9c69f83227340f317e11c980bf910 Author: Brad Taylor Date: Thu Mar 12 18:29:36 2009 +0000 2009-03-12 Brad Taylor In UIAutomationBridge/: * Mono.UIAutomation.Services/Log.cs: Add log methods that allow Exceptions to be dumped. svn path=/trunk/uia2atk/; revision=129173 UIAutomation/UIAutomationBridge/ChangeLog | 5 +++++ .../Mono.UIAutomation.Services/Log.cs | 10 ++++++++++ 2 files changed, 15 insertions(+), 0 deletions(-) commit 8e6404d662e013196888aa516ab7358c664cb73a Merge: 655476a 5efc82e 487a1c2 Author: Mario Carrion Date: Mon Mar 9 18:46:09 2009 +0000 * uia2atk/UiaAtkBridge/UiaAtkBridge/BaseTextImplementor.cs: Handling Caret: property added: CaretOffset, method added: SetCaretOffSet, event-related methods: RaiseAutomationPropertyChangedEvent, RaiseAutomationEvent. Protected CaretProvider property added. * uia2atk/UiaAtkBridge/UiaAtkBridge/EditableTextImplementor.cs: File renamed to EditableTextImplementorHelper. * uia2atk/UiaAtkBridge/UiaAtkBridge/EditableTextImplementorHelper.cs: Renamed from EditableTextImplementor. No need to use ITextProvider. Clipboard handling by using provider.GetPatternProvider. Handling Editable state. * uia2atk/UiaAtkBridge/UiaAtkBridge/ITextImplementor.cs: Handling Caret: property added: CaretOffset, method added: SetCaretOffSet, event-related methods: RaiseAutomationPropertyChangedEvent, RaiseAutomationEvent. * uia2atk/UiaAtkBridge/UiaAtkBridge/List.cs: Using EditableTextImplementorHelper to handle Atk.EditableTextImplementor methods, events and editable state. Using TableExpert in GetColumnDescription, GetColumnHeader, GetRowDescription and GetRowHeader. * uia2atk/UiaAtkBridge/UiaAtkBridge/TreeItem.cs: * uia2atk/UiaAtkBridge/UiaAtkBridge/ListItem.cs: Using EditableTextImplementorHelper to handle Atk.EditableTextImplementor methods, events and editable state. * uia2atk/UiaAtkBridge/UiaAtkBridge/Makefile.am: * uia2atk/UiaAtkBridge/UiaAtkBridge/UiaAtkBridge.mdp: EditableTextImplementor.cs renamted to EditableTextImplementorHelper.cs. * uia2atk/UiaAtkBridge/UiaAtkBridge/Spinner.cs: Using provider.GetPatternProvider instead of explicit casting. * uia2atk/UiaAtkBridge/UiaAtkBridge/TextBoxEntryView.cs: Using EditableTextImplementorHelper to handle Atk.EditableTextImplementor methods, events and editable state. TextImplementorHelper handles Caret events. * uia2atk/UiaAtkBridge/UiaAtkBridge/TextProviderTextImplementor.cs: IText field removed, using base protected property CaretProvider instead. * uia2atk/UIAutomation/UIAutomationBridge/Makefile.am: * uia2atk/UIAutomation/UIAutomationBridge/UIAutomationBridge.mdp: IClipboardSupport, IEditableRange and IText moved to UIAutomationProvider. * uia2atk/UIAutomation/UIAutomationBridge/Mono.UIAutomation.Bridge/IText.cs: * uia2atk/UIAutomation/UIAutomationBridge/Mono.UIAutomation.Bridge/IEditableRange.cs: * uia2atk/UIAutomation/UIAutomationBridge/Mono.UIAutomation.Bridge/IClipboardSupport.cs: Moved to UIAutomationProvider. * uia2atk/UIAutomation/UIAutomationProvider/Makefile.am: * uia2atk/UIAutomation/UIAutomationProvider/UIAutomationProvider.mdp: * uia2atk/UIAutomation/UIAutomationProvider/UIAutomationProvider.dll.sources: IClipboardSupport, IEditableRange and IText moved from UIAutomationBridge. * uia2atk/UIAutomation/UIAutomationProvider/System.Windows.Automation.Provider/ICaretProvider.cs: * uia2atk/UIAutomation/UIAutomationProvider/System.Windows.Automation.Provider/IClipboardProvider.cs: * uia2atk/UIAutomation/UIAutomationProvider/System.Windows.Automation.Provider/IEditableRangeProvider.cs: Moved from UIAutomationBridge. * uia2atk/UIAutomation/UIAutomationTypes/Makefile.am: * uia2atk/UIAutomation/UIAutomationTypes/UIAutomationTypes.mdp: * uia2atk/UIAutomation/UIAutomationTypes/UIAutomationTypes.dll.sources: Internal classes added: ClipboardPatternIdentifiers, EditableRangePatternIdentifiers and CaretPatternIdentifiers. * uia2atk/UIAutomation/UIAutomationTypes/System.Windows.Automation/CaretPatternIdentifiers.cs: Class added, used by ICaretProvider. * uia2atk/UIAutomation/UIAutomationTypes/System.Windows.Automation/ClipboardPatternIdentifiers.cs: Class added, used by IClipboardProvider. * uia2atk/UIAutomation/UIAutomationTypes/System.Windows.Automation/EditableRangePatternIdentifiers.cs: Class added, used by IEditableRangeProvider. * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Makefile.am: * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.mdp: UpDownBase Events/Behaviors moved to NumericUpDown. Added behaviors to match UIAutomationTypes added: CaretProvider, ClipboardProvider and EditableRangeProvider. * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/ListView/ListItemClipboardProviderBehavior.cs: Behavior that implements IClipboardProvider. * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/ListView/ListItemEmbeddedImageProviderBehavior.cs: Class renamed: EmbeddedImageProviderBehavior -> ListItemEmbeddedImageProviderBehavior * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/ListView/ListItemValueProviderBehavior.cs: IClipboardProvider implementation moved to ListItemClipboardProviderBehavior. * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/NumericUpDown: NumericUpDown Behaviors. * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/NumericUpDown/EditableRangeProviderBehavior.cs: Implements IEditableRangeProvider in NumericUpDown. * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/TextBox/CaretProviderBehavior.cs: * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/TextBox/ClipboardProviderBehavior.cs: * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Events/NumericUpDown/RangeValuePatternValueEvent.cs: * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Events/NumericUpDown/RangeValuePatternMinimumEvent.cs: * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Events/NumericUpDown/RangeValuePatternMaximumEvent.cs: * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/NumericUpDown/RangeValueProviderBehavior.cs: * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Events/NumericUpDown/RangeValuePatternIsReadOnlyEvent.cs: * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Events/NumericUpDown/RangeValuePatternSmallChangeEvent.cs: Moved from UpDownBase. * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Events/UpDownBase/RangeValuePatternValueEvent.cs: * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/UpDownBase/RangeValueProviderBehavior.cs: * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Events/UpDownBase/RangeValuePatternMinimumEvent.cs: * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Events/UpDownBase/RangeValuePatternMaximumEvent.cs: * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Events/UpDownBase/RangeValuePatternIsReadOnlyEvent.cs: * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Events/UpDownBase/RangeValuePatternSmallChangeEvent.cs: Moved to NumericUpDown. * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/TextBox/TextProviderBehavior.cs: IText implementation moved to CaretProviderBehavior, IClipboard implementation moved to ClipboardProviderBehavior. * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Events/NumericUpDown: NumericUpDown Events. * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms/TextBoxProvider.cs: * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms/DomainUpDownProvider.cs: Setting behaviors: Clipboard and Caret. * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms/ListItemProvider.cs: Setting default internal Clipboard behavior. * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms/ListViewProvider.cs: Setting Clipboard behavior. Class EmbeddedImageProviderBehavior renamed to ListItemEmbeddedImageProviderBehavior. * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms/NumericUpDownProvider.cs: Setting behavior: EditableRange. svn path=/trunk/uia2atk/; revision=128899 commit e79eb13be10d0d7c597d0a8aa0542bdcc258f92b Author: Mario Carrion Date: Thu Mar 5 21:23:03 2009 +0000 * UIAutomationTypes/UIAutomationTypes.mdp: Removing GtkDesignInfo. InsertDeleteTextPatternIdentifiers.cs file added to project. * UIAutomationTypes/UIAutomationTypesTests.mdp: Removing GtkDesignInfo. svn path=/trunk/uia2atk/; revision=128726 UIAutomation/UIAutomationTypes/ChangeLog | 7 +++++++ .../UIAutomationTypes/UIAutomationTypes.mdp | 6 +++--- .../UIAutomationTypes/UIAutomationTypesTests.mdp | 1 - 3 files changed, 10 insertions(+), 4 deletions(-) commit 3619aaf642d92b2805f47278080bd6f1bd78704e Author: Mario Carrion Date: Thu Mar 5 21:22:03 2009 +0000 * UIAutomationProvider/UIAutomationProvider.mdp: Removing GtkDesignInfo. IInsertDeleteTextProvider.cs file added. * UIAutomationProvider/UIAutomationProviderTests.mdp: Removing GtkDesignInfo. svn path=/trunk/uia2atk/; revision=128725 UIAutomation/UIAutomationProvider/ChangeLog | 7 +++++++ .../UIAutomationProvider/UIAutomationProvider.mdp | 4 ++-- .../UIAutomationProviderTests.mdp | 1 - 3 files changed, 9 insertions(+), 3 deletions(-) commit e9918f9e92f257d4b9b515f023d28c732d063c7d Author: Brad Taylor Date: Thu Mar 5 18:45:15 2009 +0000 2009-03-05 Brad Taylor In UIAutomationWinforms/UIAutomationWinforms/: Fixes #465467, #465018, #465091, #466598 and #465095. * Mono.UIAutomation.Winforms/TextNormalizer.cs: * Mono.UIAutomation.Winforms/TextRangeProvider.cs: Special case MaskedTextBox so that we return .ToDisplayString () not .Text, as the former is what is actually displayed. * Mono.UIAutomation.Winforms/TextBoxProvider.cs: Move MaxLength here so that it can be used by other providers. * Mono.UIAutomation.Winforms/MaskedTextBoxProvider.cs: Add a new InsertDeleteTextProvider to the list of behaviors. This is necessary as simply manipulating the ValuePattern in the bridge won't work. The semantics of Atk.Editable's InsertText are better mapped to a character by character replace when the insertion is happening on a blank (represented by the '_' character) cell. * Mono.UIAutomation.Winforms.Behaviors/TextBox/TextProviderBehavior.cs: * Mono.UIAutomation.Winforms.Behaviors/TextBox/ValueProviderBehavior.cs: When dealing with the MaskedTextBox control, return .ToDisplayString () instead of .Text. * Makefile.am: * Mono.UIAutomation.Winforms.Behaviors/MaskedTextBox: * Mono.UIAutomation.Winforms.Behaviors/MaskedTextBox/InsertDeleteTextProviderBehavior.cs: Implement the new behavior so that Atk.EditableText's methods can be proxied directly to the actual control. This will allow us to handle these methods as the user expects. In UiaAtkBridge/Test/UiaAtkBridgeTest/: * BridgeTests.cs: Add an entry in GetAccessible () for MaskedTextBoxEntry. * BridgeTester.cs: Add a test for MaskedTextBox's EditableText interface. In UiaAtkBridge/UiaAtkBridge/: * EditableTextImplementor.cs: Use the new IInsertDeleteTextProvider interface so that MaskedTextBox can be properly supported. In UIAutomation/UIAutomationProvider/: * Makefile.am: * System.Windows.Automation.Provider/IInsertDeleteTextProvider.cs: Add a new internal IInsertDeleteTextProvider class for MaskedTextBox. In UIAutomation/UIAutomationTypes/: * Makefile.am: * System.Windows.Automation/InsertDeleteTextPatternIdentifiers.cs: Add a new internal InsertDeleteTextPatternIdentifiers to support the new IInsertDeleteTextProvider. svn path=/trunk/uia2atk/; revision=128716 UIAutomation/UIAutomationProvider/ChangeLog | 6 +++ UIAutomation/UIAutomationProvider/Makefile.am | 1 + .../IInsertDeleteTextProvider.cs | 37 +++++++++++++++ UIAutomation/UIAutomationTypes/ChangeLog | 7 +++ UIAutomation/UIAutomationTypes/Makefile.am | 1 + .../InsertDeleteTextPatternIdentifiers.cs | 47 ++++++++++++++++++++ 6 files changed, 99 insertions(+), 0 deletions(-) commit fe7932c8f0cad7aa2b9ee2e3c7edbd6aa0ab1a07 Author: Sandy Armstrong Date: Thu Feb 26 16:47:57 2009 +0000 * UIAutomation/WindowsBase/System.Windows/Rect.cs: For Rect.Empty, return Size.Empty for Size. Previously this would throw an exception on Size construction. svn path=/trunk/uia2atk/; revision=128117 UIAutomation/ChangeLog | 6 ++++++ UIAutomation/WindowsBase/System.Windows/Rect.cs | 2 ++ 2 files changed, 8 insertions(+), 0 deletions(-) commit a1bb408143a8743c1ebe078320953b6efd7e650e Author: Sandy Armstrong Date: Fri Feb 20 23:31:27 2009 +0000 * UIAutomation/UIAutomationTypes/UIAutomationTypes.mdp: * UIAutomation/UIAutomationBridge/UIAutomationBridge.mdp: * UIAutomation/UIAutomationTypes/UIAutomationTypesTests.mdp: * UIAutomation/UIAutomationProvider/UIAutomationProvider.mdp: * UIAutomation/UIAutomationProvider/UIAutomationProviderTests.mdp: Point projects at Makefile.am, not Makefile. svn path=/trunk/uia2atk/; revision=127594 UIAutomation/UIAutomationBridge/ChangeLog | 5 +++++ .../UIAutomationBridge/UIAutomationBridge.mdp | 4 ++-- UIAutomation/UIAutomationProvider/ChangeLog | 6 ++++++ .../UIAutomationProvider/UIAutomationProvider.mdp | 4 ++-- .../UIAutomationProviderTests.mdp | 4 ++-- UIAutomation/UIAutomationTypes/ChangeLog | 6 ++++++ .../UIAutomationTypes/UIAutomationTypes.mdp | 4 ++-- .../UIAutomationTypes/UIAutomationTypesTests.mdp | 4 ++-- 8 files changed, 27 insertions(+), 10 deletions(-) commit 955c9720e266541598204e01e8d722b2c3e3ebfe Author: Mario Carrion Date: Wed Feb 18 20:07:57 2009 +0000 * uia2atk/UiaAtkBridge/Test/UiaAtkBridgeTest/BridgeTests.cs: Testing Atk.Image in ListView's children. [For Bug #459152] * uia2atk/UiaAtkBridge/UiaAtkBridge/TreeItem.cs: Implementation Atk.ImageImplementor. [Fixes bug #459152] * uia2atk/UIAutomation/UIAutomationTypes/AssemblyInfo.cs.in: * uia2atk/UIAutomation/UIAutomationProvider/AssemblyInfo.cs.in: Friend assembly UIAutomationWinformsTest added. * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/ListView/ListItemEmbeddedImageProviderBehavior.cs: Using ListItem location and CheckBox width to return a valid location. [Fixes bug #459152] * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms/ListViewProvider.cs: Public property CheckboxProvider added. * uia2atk/UIAutomationWinforms/UIAutomationWinformsTests/BaseProviderTest.cs: New protected method: TestEmbeddedImagePattern_All. * uia2atk/UIAutomationWinforms/UIAutomationWinformsTests/ListViewProviderTest.cs: New Test Bug459152Test. Tests IEmbeddedImagePattern. svn path=/trunk/uia2atk/; revision=127318 .../UIAutomationProvider/AssemblyInfo.cs.in | 2 ++ UIAutomation/UIAutomationProvider/ChangeLog | 4 ++++ UIAutomation/UIAutomationTypes/AssemblyInfo.cs.in | 2 ++ UIAutomation/UIAutomationTypes/ChangeLog | 4 ++++ 4 files changed, 12 insertions(+), 0 deletions(-) commit 5450ba50dfd26e6ce7bf059fb9a897e3aa423afb Author: Andrés G. Aragoneses Date: Sun Feb 8 04:42:03 2009 +0000 * UIAutomation/UIAutomationTypes/UIAutomationTypesTests.mdp: * UIAutomation/UIAutomationProvider/UIAutomationProviderTests.mdp: Change nunit version. svn path=/trunk/uia2atk/; revision=126238 UIAutomation/UIAutomationProvider/ChangeLog | 4 ++++ .../UIAutomationProviderTests.mdp | 4 ++-- UIAutomation/UIAutomationTypes/ChangeLog | 4 ++++ .../UIAutomationTypes/UIAutomationTypesTests.mdp | 4 ++-- 4 files changed, 12 insertions(+), 4 deletions(-) commit c02f87cccf7b68846ed9c3883c35360a154c368a Author: Andrés G. Aragoneses Date: Sun Feb 8 00:23:53 2009 +0000 * UIAutomationProvider/System.Windows.Automation.Provider/AutomationInteropProvider.cs: Add meat for bug#469347. svn path=/trunk/uia2atk/; revision=126217 UIAutomation/UIAutomationProvider/ChangeLog | 5 +++++ .../AutomationInteropProvider.cs | 3 +++ 2 files changed, 8 insertions(+), 0 deletions(-) commit 7c6ccba1368aca70165ed5d306bf3d5f273ffd13 Author: Mike Gorse Date: Thu Feb 5 23:40:10 2009 +0000 * System.Windows.Automation/AutomationElementIdentifiers.cs: Add internal IsNotifyIcon property. * Mono.UIAutomation.Winforms/BalloonWindowProvider.cs, Makefile.am: Add BalloonWindowProvider. * Mono.UIAutomation.Winforms/Global.cs, Mono.UIAutomation.Winforms/FormListener.cs, Mono.UIAutomation.Winforms/KeyFilter.cs, Makefile.am: Separate KeyFilter from window creation so that we won't add a new KeyFilter for every window. * Mono.UIAutomation.Winforms/ContainerPanelProvider.cs, Makefile.am: Add ContainerPanel provider. * ProgressBar.cs: Use TextExpert to find character count; fix NRE. * Window.cs: Handle SWF BalloonWindow. * AutomationBridge.cs: handle Table control type like DataGrid. * AtkTester.cs, AtkTests.cs: Remove Resizable test for panels. * BridgeTester.cs, BridgeTests.cs: Add ContainerPanel test. * BridgeTester.cs: Remove ContainerPanelIsResizable. * Gailtester.cs: Remove ContainerPanelIsResizable. svn path=/trunk/uia2atk/; revision=125959 UIAutomation/UIAutomationTypes/ChangeLog | 5 +++++ .../AutomationElementIdentifiers.cs | 6 ++++++ 2 files changed, 11 insertions(+), 0 deletions(-) commit bde7f85c02bc2f66865feaa40663373eaa1a6ee4 Author: Mario Carrion Date: Thu Feb 5 21:10:05 2009 +0000 * UIAutomationBridge/UIAutomationBridge.mdp: Mono.UIAutomation.Services/Log.cs file included in project. svn path=/trunk/uia2atk/; revision=125932 UIAutomation/UIAutomationBridge/ChangeLog | 5 +++++ .../UIAutomationBridge/UIAutomationBridge.mdp | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) commit 8546f74f218e3feba6a06c2f5f6b818dcde27270 Author: Brad Taylor Date: Thu Feb 5 18:09:27 2009 +0000 2009-02-05 Brad Taylor In UIAutomationWinforms/UIAutomationWinforms/: * Mono.UIAutomation.Winforms/DataGridProvider.cs: Remove unneccessary Console.WriteLines. * Mono.UIAutomation.Winforms/ListProvider.cs: * Mono.UIAutomation.Winforms/ProviderFactory.cs: Convert Console.WriteLine to Log.Warn and Log.Error. * Mono.UIAutomation.Winforms.Behaviors/ListView/HeaderItemInvokeProvider.cs: * Mono.UIAutomation.Winforms.Events/ListBox/SelectionPatternSelectionEvent.cs: * Mono.UIAutomation.Winforms.Events/ListBox/SelectionPatternInvalidatedEvent.cs: * Mono.UIAutomation.Winforms.Events/ListView/ListItemGridItemPatternRowEvent.cs: * Mono.UIAutomation.Winforms.Behaviors/DataGrid/DataItemValueProviderBehavior.cs: * Mono.UIAutomation.Winforms.Events/ComboBox/SelectionPatternInvalidatedEvent.cs: * Mono.UIAutomation.Winforms.Events/ListBox/ScrollPatternVerticalViewSizeEvent.cs: * Mono.UIAutomation.Winforms.Events/ListBox/ListItemAutomationNamePropertyEvent.cs: * Mono.UIAutomation.Winforms.Events/ListView/ListItemGridItemPatternColumnEvent.cs: * Mono.UIAutomation.Winforms.Events/ListBox/ScrollPatternHorizontalViewSizeEvent.cs: * Mono.UIAutomation.Winforms.Behaviors/DataGrid/DataItemEditValueProviderBehavior.cs: * Mono.UIAutomation.Winforms.Events/ListBox/SelectionPatternCanSelectMultipleEvent.cs: * Mono.UIAutomation.Winforms.Behaviors/ListView/GroupExpandCollapseProviderBehavior.cs: * Mono.UIAutomation.Winforms.Events/ListView/SelectionPatternCanSelectMultipleEvent.cs: * Mono.UIAutomation.Winforms.Events/ListBox/ListItemSelectionItemPatternIsSelectedEvent.cs: * Mono.UIAutomation.Winforms.Events/ListBox/ListItemSelectionItemPatternElementAddedEvent.cs: * Mono.UIAutomation.Winforms.Events/ListBox/ListItemSelectionItemPatternElementRemovedEvent.cs: * Mono.UIAutomation.Winforms.Events/ListBox/ListItemSelectionItemPatternElementSelectedEvent.cs: Remove reflection for all events, removing the C.WLs in the process. In UIAutomation/UIAutomationBridge/: * Makefile.am: * Mono.UIAutomation.Services: * Mono.UIAutomation.Services/Log.cs: Add new Log class. svn path=/trunk/uia2atk/; revision=125897 UIAutomation/UIAutomationBridge/ChangeLog | 6 + UIAutomation/UIAutomationBridge/Makefile.am | 3 +- .../Mono.UIAutomation.Services/Log.cs | 139 ++++++++++++++++++++ 3 files changed, 147 insertions(+), 1 deletions(-) commit 6435c482dc2057bd8c995f4caa86c2e81ea88c1a Author: Mike Gorse Date: Wed Jan 28 03:58:44 2009 +0000 * Mono.UIAutomation.Bridge/IText.cs: Add GetSelection. * Mono.UIAutomation.Winforms/DomainUpDownProvider.cs, Mono.UIAutomation.Winforms.Behaviors/TextBox/TextProviderBehavior.cs, Mono.UIAutomation.Winforms.Events/TextBox/TextPatternCaretMovedEvent.cs, Mono.UIAutomation.Winforms.Events/TextBox/TextPatternTextSelectionChangedEvent.cs: Support TextProvider for DomainUpDown. * Mono.UIAutomation.Winforms.Behaviors/TextBox/TextProviderBehavior.cs, Some selection-related fixes. Use document.GetCharAtIndex; remove code that does the same thing. * List.cs: Implement clipboard support in ListWithEditableText. * Spinner.cs, Slider.cs, List.cs, TextBoxEntryView.cs, BaseTextImplementor.cs: Fix text-changed events when typing. * BaseTextImplementor.cs, ITextImplementor.cs, TextProviderTextImplementor.cs: Support selections when TextProvider is available. Note: Uses internal api for GetSelection. * BaseTextImplementor.cs: Hack to fix text-changed:delete events. * List.cs: Emit caret-moved and selection-changed events for ListWithEditableText. * BridgeTester.cs: Fix ToolStripTextBox test. * BridgeTests.cs: Add text-event test. svn path=/trunk/uia2atk/; revision=124749 UIAutomation/UIAutomationBridge/ChangeLog | 4 ++++ .../Mono.UIAutomation.Bridge/IText.cs | 6 +----- 2 files changed, 5 insertions(+), 5 deletions(-) commit bc6bd12b9e914b0dcc1b37c3630f13bc013381a1 Author: Sandy Armstrong Date: Tue Jan 27 23:01:47 2009 +0000 * uia2atk/UIAutomation/UIAutomationBridge/UIAutomationBridge.mdp: * uia2atk/UIAutomation/UIAutomationProvider/UIAutomationProvider.mdp: Update project files to match makefiles, since there is no synchronization on these projects. svn path=/trunk/uia2atk/; revision=124727 UIAutomation/UIAutomationBridge/ChangeLog | 5 +++++ .../UIAutomationBridge/UIAutomationBridge.mdp | 1 - UIAutomation/UIAutomationProvider/ChangeLog | 5 +++++ .../UIAutomationProvider/UIAutomationProvider.mdp | 3 ++- 4 files changed, 12 insertions(+), 2 deletions(-) commit 9adc82c0fda67b44bed317ceaa35cbcaeef223d5 Author: Sandy Armstrong Date: Tue Jan 27 22:54:58 2009 +0000 * uia2atk/UIAutomation/UIAutomationProvider/AssemblyInfo.cs.in: Add InternalsVisibleTo for UiaAtkBridge. svn path=/trunk/uia2atk/; revision=124725 .../UIAutomationProvider/AssemblyInfo.cs.in | 1 + UIAutomation/UIAutomationProvider/ChangeLog | 4 ++++ 2 files changed, 5 insertions(+), 0 deletions(-) commit 71e13ad6fafce3eacbd3dfedc340aa92723ffead Merge: 8f578ec 78aa5db Author: Brad Taylor Date: Tue Jan 27 22:31:22 2009 +0000 2009-01-27 Brad Taylor In UIAutomationWinforms/UIAutomationWinforms/: * Makefile.am: * Mono.UIAutomation.Winforms.Behaviors/Button/EmbeddedImageProviderBehavior.cs: * Mono.UIAutomation.Winforms.Behaviors/ListItem/EmbeddedImageProviderBehavior.cs: * Mono.UIAutomation.Winforms.Behaviors/PictureBox/EmbeddedImageProviderBehavior.cs: * Mono.UIAutomation.Winforms.Behaviors/ToolStripItem/EmbeddedImageProviderBehavior.cs: Add IEmbeddedImageProvider support. * Mono.UIAutomation.Winforms/ButtonProvider.cs: * Mono.UIAutomation.Winforms/CheckBoxProvider.cs: * Mono.UIAutomation.Winforms/ListItemProvider.cs: * Mono.UIAutomation.Winforms/StatusBarProvider.cs: * Mono.UIAutomation.Winforms.Behaviors/PictureBox: * Mono.UIAutomation.Winforms/PictureBoxProvider.cs: * Mono.UIAutomation.Winforms/RadioButtonProvider.cs: * Mono.UIAutomation.Winforms/ToolStripItemProvider.cs: * Mono.UIAutomation.Winforms/MessageBoxFormProvider.cs: * Mono.UIAutomation.Winforms.Behaviors/Button/InvokeProviderBehavior.cs: * Mono.UIAutomation.Winforms.Behaviors/CheckBox/ToggleProviderBehavior.cs: * Mono.UIAutomation.Winforms.Behaviors/ToolStripItem/InvokeProviderBehavior.cs: * Mono.UIAutomation.Winforms.Behaviors/ToolStripButton/InvokeProviderBehavior.cs: * Mono.UIAutomation.Winforms.Behaviors/PopupButtonPanel/InvokeProviderBehavior.cs: * Mono.UIAutomation.Winforms.Behaviors/RadioButton/SelectionItemProviderBehavior.cs: Remove IEmbeddedImage support, add the new, cleaner IEmbeddedImageProvider behavior. In UiaAtkBridge/UiaAtkBridge/: * Image.cs: * Button.cs: * ListItem.cs: * HeaderItem.cs: * RadioButton.cs: * CheckBoxButton.cs: * TextImageLabel.cs: * ImageImplementorHelper.cs: Use new IEmbeddedImageProvider instead of hacky IEmbeddedImage interface. In UIAutomation/UIAutomationProvider/: * Makefile.am: * System.Windows.Automation.Provider/IEmbeddedImageProvider.cs: Replace IEmbeddedImage with a real internal provider class. In UIAutomation/UIAutomationBridge/: * Makefile.am: Rename IEmbeddedImage to IEmbeddedImageProvider and move it to UIAutomationProvider. In UIAutomation/UIAutomationTypes/: * Makefile.am: * System.Windows.Automation/EmbeddedImagePatternIdentifiers.cs: Add support class for IEmbeddedImageProvider. svn path=/trunk/uia2atk/; revision=124721 commit 7910a8a06864ac0feabbb03e0df60a8fc45a4f96 Author: Mario Carrion Date: Thu Jan 22 23:39:10 2009 +0000 * UIAutomationBridge/UIAutomationBridge.mdp: IClipboardSupport.cs file added. svn path=/trunk/uia2atk/; revision=124264 UIAutomation/UIAutomationBridge/ChangeLog | 4 ++++ .../UIAutomationBridge/UIAutomationBridge.mdp | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit 28381cc18e4d4e90cc8785f0c49bce7e3d8e5a3a Author: Brad Taylor Date: Thu Jan 22 16:40:27 2009 +0000 2009-01-22 Brad Taylor In UIAutomationWinforms/UIAutomationWinforms/: * Mono.UIAutomation.Winforms.Behaviors/TextBox/TextProviderBehavior.cs: Add an internal interface to support the clipboard, needed for Atk.EditableText. In UiaAtkBridge/Test/AtkTest/: * AtkTester.cs: Test Cut, Copy and Paste for Atk.EditableText. In UiaAtkBridge/UiaAtkBridge/: * TextBoxEntryView.cs: Use internal IClipboardSupport interface to implement Cut, Copy and Paste for Atk.EditableText. In UIAutomation/UIAutomationBridge/: * Makefile.am: * Mono.UIAutomation.Bridge/IClipboardSupport.cs: Add an internal interface to allow us to perform clipboard operations on UIA providers. svn path=/trunk/uia2atk/; revision=124223 UIAutomation/UIAutomationBridge/ChangeLog | 8 ++++- UIAutomation/UIAutomationBridge/Makefile.am | 1 + .../Mono.UIAutomation.Bridge/IClipboardSupport.cs | 37 ++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletions(-) commit d86c5d348980fa4b2ad820486e6611fda93f6715 Author: Brad Taylor Date: Thu Jan 15 19:12:57 2009 +0000 2009-01-15 Brad Taylor In UIAutomation/UIAutomationProvider/: * System.Windows.Automation.Provider/AutomationInteropProvider.cs: Implement ReturnRawElementProvider as a hashtable of weak references (because marshaling the object is not only not possible, but makes no sense). Add RetrieveAndDeleteProvider to allow the contents of the weak reference to be retrieved. * AssemblyInfo.cs.in: Allow UIAutomationWinforms to access internal methods. svn path=/trunk/uia2atk/; revision=123523 .../UIAutomationProvider/AssemblyInfo.cs.in | 2 + UIAutomation/UIAutomationProvider/ChangeLog | 11 ++++++++ .../AutomationInteropProvider.cs | 25 +++++++++++++++++++- 3 files changed, 37 insertions(+), 1 deletions(-) commit ded8469303f7dff8e3b6a64df21169198c353b0c Author: Mike Gorse Date: Fri Jan 9 11:46:06 2009 +0000 Add internal CaretMoved event for text boxes. Catch IndexOutOfRange exceptions in atk GetText methods. svn path=/trunk/uia2atk/; revision=122866 UIAutomation/UIAutomationBridge/ChangeLog | 4 ++ UIAutomation/UIAutomationBridge/Makefile.am | 3 +- .../Mono.UIAutomation.Bridge/IText.cs | 41 ++++++++++++++++++++ UIAutomation/UIAutomationTypes/ChangeLog | 5 ++ .../TextPatternIdentifiers.cs | 6 +++ 5 files changed, 58 insertions(+), 1 deletions(-) commit 9a8c79aba8dbe69bc174b5fa112f290a1b024231 Author: Mike Gorse Date: Fri Jan 2 16:04:15 2009 +0000 Add internal WindowDeactivated event and use to disable active state when a window loses focus [bug 445199] svn path=/trunk/uia2atk/; revision=122340 UIAutomation/UIAutomationTypes/ChangeLog | 5 +++++ .../AutomationElementIdentifiers.cs | 6 ++++++ 2 files changed, 11 insertions(+), 0 deletions(-) commit 85caafa987bc8c261444887291488808fa28f9ee Author: Mike Gorse Date: Wed Dec 17 23:06:07 2008 +0000 * System.Windows.Automation/GridPatternIdentifiers.cs: Add internal column-reordered automation event. * Mono.UIAutomation.Winforms.Behaviors/ListView/GridProviderBehavior.cs, Mono.UIAutomation.Winforms.Events/ProviderEventType.cs, Mono.UIAutomation.Winforms.Events/ListView/GridPatternColumnReorderedEvent.cs, Makefile.am: Add column-reordered event for ListView. * dataGrid.cs: Listen for column-reordered. * Tab.cs, TextContainer.cs, Makefile.am, UiaAtkBridge.mdp, AutomationBridge.cs: Support Tab and TabItem. * AtkTests.cs: Enable TabControl test. * AtkTester.cs: Fix TabControl selection test and remove extra InterfaceComponent.. * AtkTester.cs: Generalize transient logic in Focus(). * AtkTester.cs: Test that Transient matches parent's ManagesDescendants. svn path=/trunk/uia2atk/; revision=121733 UIAutomation/UIAutomationTypes/ChangeLog | 5 +++++ .../GridPatternIdentifiers.cs | 5 +++++ 2 files changed, 10 insertions(+), 0 deletions(-) commit 7d7a5308eeb080803127fa8a81c89fe2d7cd0795 Author: Mike Gorse Date: Wed Dec 3 21:15:25 2008 +0000 * BridgeTests.cs: Test StatusBar children after panel removed. * Mono.UIAutomation.Winforms.Behaviors/UpDownBase/RangeValueProviderBehavior.cs: Rework IEditableRange. * Mono.UIAutomation.Winforms.Behaviors/UpDownBase/ValueProviderBehavior.cs: Check ReadOnly before invoking. * Spinner.cs: Adapt for new EditableRange interface. svn path=/trunk/uia2atk/; revision=120642 UIAutomation/UIAutomationBridge/ChangeLog | 5 +++++ .../Mono.UIAutomation.Bridge/IEditableRange.cs | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit 9eb2c933f2846721166acac0c0551d11e433d3c1 Author: Sandy Armstrong Date: Wed Dec 3 16:44:42 2008 +0000 * uia2atk/UiaAtkBridge/UiaAtkBridge/Image.cs: * uia2atk/UiaAtkBridge/UiaAtkBridge/Button.cs: * uia2atk/UiaAtkBridge/UiaAtkBridge/TextLabel.cs: * uia2atk/UIAutomation/UIAutomationBridge/Mono.UIAutomation.Bridge/IEmbeddedImage.cs: * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms/StatusBarProvider.cs: * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms/PictureBoxProvider.cs: * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/Button/InvokeProviderBehavior.cs: * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/CheckBox/ToggleProviderBehavior.cs: * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/RadioButton/SelectionItemProviderBehavior.cs: Remove IEmbeddedImage.HasImage property...just check Bounds.IsEmpty instead. svn path=/trunk/uia2atk/; revision=120613 UIAutomation/UIAutomationBridge/ChangeLog | 5 +++++ .../Mono.UIAutomation.Bridge/IEmbeddedImage.cs | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) commit ebc70622c8a57096882e3da02626d2aad4a2a677 Author: Sandy Armstrong Date: Wed Dec 3 04:24:14 2008 +0000 * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms/StatusBarProvider.cs: * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms/PictureBoxProvider.cs: * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/Button/InvokeProviderBehavior.cs: * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/CheckBox/ToggleProviderBehavior.cs: * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms.Behaviors/RadioButton/SelectionItemProviderBehavior.cs: Update IEmbeddedImage implementation. * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms/Helper.cs: Rename GetBoundingRectangleFromButtonBase to GetButtonBaseImageBounds to be more descriptive. * uia2atk/UiaAtkBridge/UiaAtkBridge/Image.cs: * uia2atk/UiaAtkBridge/UiaAtkBridge/Button.cs: Handle updates to IEmbeddedImage. * uia2atk/UiaAtkBridge/UiaAtkBridge/TextLabel.cs: * uia2atk/UiaAtkBridge/UiaAtkBridge/AutomationBridge.cs: If a label's parent is a StatusBar, use the TextImageLabel adapter that implements Atk.Image. Fixes bug #448074. * uia2atk/UIAutomation/UIAutomationBridge/Mono.UIAutomation.Bridge/IEmbeddedImage.cs: Rename BoundingRectangle to Bounds, and add HasImage and Description properties. svn path=/trunk/uia2atk/; revision=120571 UIAutomation/UIAutomationBridge/ChangeLog | 5 +++++ .../Mono.UIAutomation.Bridge/IEmbeddedImage.cs | 6 +++++- 2 files changed, 10 insertions(+), 1 deletions(-) commit c46af0d6dd19fc5318945ed1614d5659c0d71554 Author: Mike Gorse Date: Tue Dec 2 00:16:51 2008 +0000 Set a NumericUpDown control's text immediately when editing with EditableText. Only set Editable state on a spinner if the control is not ReadOnly. svn path=/trunk/uia2atk/; revision=120422 UIAutomation/UIAutomationBridge/ChangeLog | 5 +++ UIAutomation/UIAutomationBridge/Makefile.am | 1 + .../Mono.UIAutomation.Bridge/IEditableRange.cs | 37 ++++++++++++++++++++ .../UIAutomationBridge/UIAutomationBridge.mdp | 3 +- 4 files changed, 45 insertions(+), 1 deletions(-) commit 30bc10d12dfd6ff6e8b58c05f8c7f3aa675f3eda Author: Brad Taylor Date: Tue Nov 25 21:59:03 2008 +0000 2008-11-25 Brad Taylor * UiaAtkBridge/Makefile.include: * UIAutomation/Makefile.include: * UIAutomationWinforms/Makefile.include: Correct path for 64-bit systems. svn path=/trunk/uia2atk/; revision=120012 UIAutomation/ChangeLog | 4 ++++ UIAutomation/Makefile.include | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) commit 3f8b21704b759cd78950be8f00dfcd87faf6b2e5 Author: Brad Taylor Date: Tue Nov 25 15:22:55 2008 +0000 2008-11-25 Brad Taylor * UiaAtkBridge/UiaAtkBridge/Makefile.am: * UiaAtkBridge/Test/GailTest/Makefile.am: * UiaAtkBridge/Test/GailTestApp/Makefile.am: * UiaAtkBridge/Test/UiaAtkBridgeTest/Makefile.am: * UIAutomationWinforms/UIAutomationWinforms/Makefile.am: * UIAutomationWinforms/UIAutomationWinformsTests/Makefile.am: Use $(MONO_UIA_LIBS) instead of hardcoding paths. * UiaAtkBridge/Test/AtkTest/Makefile.am: Clean up references. * UiaAtkBridge/UiaAtkBridge/UiaAtkBridge.dll.config.in: Revert incorrect path change. * UIAutomation/data/mono-uia.pc.in.in: Add UIAutomationClient to the Libs directive. svn path=/trunk/uia2atk/; revision=119957 UIAutomation/ChangeLog | 4 ++++ UIAutomation/data/mono-uia.pc.in.in | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) commit 4331d19dee785c823477a3fde462c22b6b54b7da Author: Sandy Armstrong Date: Mon Nov 24 17:58:18 2008 +0000 * uia2atk/UIAutomation/UIAutomationProvider/System.Windows.Automation.Provider/AutomationInteropProvider.cs: Typo/compilation fix. svn path=/trunk/uia2atk/; revision=119823 UIAutomation/UIAutomationProvider/ChangeLog | 5 +++++ .../AutomationInteropProvider.cs | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) commit 0872ada1baa4e95293d9cf2bc8457ed07529a071 Author: Brad Taylor Date: Mon Nov 24 17:19:30 2008 +0000 2008-11-12 Brad Taylor * UiaAtkBridge/NEWS: * UIAutomation/NEWS: * UIAutomationWinforms/NEWS: Move NEWS file into each individual module. svn path=/trunk/uia2atk/; revision=119820 UIAutomation/ChangeLog | 4 ++++ UIAutomation/NEWS | 7 +++++++ 2 files changed, 11 insertions(+), 0 deletions(-) commit 9c85c81051f94462403725721736fb8c1041a6ac Merge: a927bab d0614e0 Author: Sandy Armstrong Date: Mon Nov 24 17:05:52 2008 +0000 Initial README. svn path=/trunk/uia2atk/; revision=119814 commit 096f648a3200e9a695cbb88af43b260cd6284dd3 Author: Sandy Armstrong Date: Sat Nov 22 00:45:58 2008 +0000 * uia2atk/UIAutomationWinforms/configure.ac: * uia2atk/UIAutomationWinforms/UIAutomationWinformsTests/providertest.sh.in: Remove unnecessary check for bridge libraries. * uia2atk/UIAutomationWinforms/UIAutomationWinformsTests/TestHelper.cs: Instead of using reflection to blank out the bridge assembly name, set the new MONO_UIA_BRIDGE env var to a bad value. * uia2atk/UIAutomation/UIAutomationProvider/System.Windows.Automation.Provider/AutomationInteropProvider.cs: New MONO_UIA_BRIDGE environment variable lets user set assembly name indicating what bridge should be loaded. A bad value will cause null to be returned; an empty or null value will cause the UiaAtkBridge assembly to be loaded. svn path=/trunk/uia2atk/; revision=119690 UIAutomation/UIAutomationProvider/ChangeLog | 8 ++++++++ .../AutomationInteropProvider.cs | 14 +++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) commit 5c53535578ca3b44a1d9de3297fb731bd499443a Author: Sandy Armstrong Date: Fri Nov 21 22:58:27 2008 +0000 * uia2atk-0.9/UIAutomation/README: Whitespace fixes. * uia2atk-0.9/UiaAtkBridge/README: * uia2atk-0.9/UIAutomationWinforms/README: Add READMEs for these tarballs, containing package information and installation instructions. svn path=/branches/uia2atk/0.9/; revision=119681 UIAutomation/ChangeLog | 4 ++++ UIAutomation/README | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) commit 486c2b43924ad08892ea019487daac3628e96ead Author: Sandy Armstrong Date: Fri Nov 21 22:02:00 2008 +0000 * uia2atk-0.9/UIAutomation/README: Adding README file with package info and install instructions. svn path=/branches/uia2atk/0.9/; revision=119679 UIAutomation/ChangeLog | 4 +++ UIAutomation/README | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 0 deletions(-) commit 1c4a7f69988f977d37c92fb6ae9fc238b3b0fbef Merge: d02600b 59edd69 Author: Sandy Armstrong Date: Fri Nov 21 05:35:18 2008 +0000 * uia2atk/UIAutomation/COPYING: * uia2atk/UiaAtkBridge/COPYING: * uia2atk/UIAutomationWinforms/COPYING: Add to top-level of each tarball. svn path=/trunk/uia2atk/; revision=119579 commit 49c50ecbee9dcc58e55d733419025f95538043c1 Author: Sandy Armstrong Date: Tue Nov 18 23:17:30 2008 +0000 * uia2atk/UIAutomation/UIAutomationProvider/System.Windows.Automation.Provider/AutomationInteropProvider.cs: Dump errors and exceptions to console when bridge fails to load for whatever reason. Should help when troubleshooting bad packages/installs. Users will only see this if they have at least a partial UIA install (that's broken). svn path=/trunk/uia2atk/; revision=119245 UIAutomation/UIAutomationProvider/ChangeLog | 8 +++++ .../AutomationInteropProvider.cs | 30 +++++++++++++------ 2 files changed, 28 insertions(+), 10 deletions(-) commit 11f021add7a78f5f28e6c38e973e8471508c7253 Author: Sandy Armstrong Date: Tue Nov 18 22:43:24 2008 +0000 * UIAutomation/UIAutomationTypes/UIAutomationTypes.mdp: * UIAutomation/UIAutomationBridge/UIAutomationBridge.mdp: * UIAutomation/UIAutomationTypes/UIAutomationTypesTests.mdp: * UIAutomation/UIAutomationProvider/UIAutomationProvider.mdp: * UIAutomation/UIAutomationProvider/UIAutomationProviderTests.mdp: Add makefile integration. svn path=/trunk/uia2atk/; revision=119238 UIAutomation/UIAutomationBridge/ChangeLog | 4 ++++ .../UIAutomationBridge/UIAutomationBridge.mdp | 8 ++++---- UIAutomation/UIAutomationProvider/ChangeLog | 5 +++++ .../UIAutomationProvider/UIAutomationProvider.mdp | 8 ++++---- .../UIAutomationProviderTests.mdp | 8 ++++---- UIAutomation/UIAutomationTypes/ChangeLog | 5 +++++ .../UIAutomationTypes/UIAutomationTypes.mdp | 8 ++++---- .../UIAutomationTypes/UIAutomationTypesTests.mdp | 8 ++++---- 8 files changed, 34 insertions(+), 20 deletions(-) commit d05d76818e770dda7b077b24f0762b47823f3ab9 Author: Stephen Shaw Date: Tue Nov 18 00:17:03 2008 +0000 Changed lib to $(libdir) svn path=/trunk/uia2atk/; revision=119112 UIAutomation/data/Makefile.am | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 5ea3df924d2830d93e7ad735f3e876d7d9c87d1f Author: Stephen Shaw Date: Mon Nov 17 22:49:34 2008 +0000 Reverting change svn path=/trunk/uia2atk/; revision=119107 UIAutomation/data/Makefile.am | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 7a0097b8b9d2eb68f96a3be4ccacca2eda07dddf Author: Stephen Shaw Date: Mon Nov 17 22:33:20 2008 +0000 Updated $(prefix)/lib to $(libdir)/ for pkgconfig to handle 64bit svn path=/trunk/uia2atk/; revision=119103 UIAutomation/data/Makefile.am | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 4a4bfbf93cb72aed5d94d55158e610724d8f55e7 Author: Stephen Shaw Date: Mon Nov 17 21:10:39 2008 +0000 Changed UIAutomation to mono-uia in configure.ac svn path=/trunk/uia2atk/; revision=119089 UIAutomation/configure.ac | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit f51e05f87eae0325feb1ff926f89242e6838dd8f Author: Mario Carrion Date: Mon Nov 17 15:31:34 2008 +0000 * uia2atk/UiaAtkBridge/UiaAtkBridge/AutomationBridge.cs: IsAccessibilityEnabled implementation to verify if Accessibility is turned on. Initialize calls new Monitor, not constructor. Terminate implementation. * uia2atk/UIAutomation/UIAutomationBridge/Mono.UIAutomation.Bridge/IAutomationBridge.cs: Property added: IsAccessibilityEnabled. * uia2atk/UIAutomation/UIAutomationProvider/System.Windows.Automation.Provider/AutomationInteropProvider.cs: Verifying if accessibility is enabled before initializing bridge. * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms/ErrorProviderListener.cs: SWF = System.Windows.Forms. Initializing internal dictionary when ClientsAreListening. Not using Helper.AddPrivateEvent. * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms/FormListener.cs: Initializing internal dictionary when ClientsAreListening. * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms/HelpProviderListener.cs: Initializing internal dictionary when ClientsAreListening. Not using Helper.AddPrivateEvent. * uia2atk/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms/ToolTipListener.cs: Using AutomationInteropProvider.ClientsAreListening IAutomationBridge implementation: IsAccessibilityEnabled, Initialize, Terminate. * uia2atk/UIAutomationWinforms/UIAutomationWinformsTests/MockBridge.cs: IAutomationBridge implementation: IsAccessibilityEnabled, Initialize, Terminate. svn path=/trunk/uia2atk/; revision=119034 UIAutomation/UIAutomationBridge/ChangeLog | 5 +++++ .../Mono.UIAutomation.Bridge/IAutomationBridge.cs | 6 ++++++ UIAutomation/UIAutomationProvider/ChangeLog | 5 +++++ .../AutomationInteropProvider.cs | 10 ++++++++-- 4 files changed, 24 insertions(+), 2 deletions(-) commit 3cacbd7255d0ded218fd1e301f1498ee03f36bd7 Author: Andrés G. Aragoneses Date: Wed Nov 12 21:42:06 2008 +0000 * uia2atk/UiaAtkBridge/samples/managed/FormTest/FormTest.mdp: * uia2atk/UiaAtkBridge/samples/managed/atkSharpHelloWorld/atkSharpHelloWorld.mdp: Flush. * uia2atk/UIAutomation/UIAutomation.mds: Revert previous dumb changes. svn path=/trunk/uia2atk/; revision=118656 UIAutomation/ChangeLog | 4 ++++ UIAutomation/UIAutomation.mds | 23 ++++++++++++----------- 2 files changed, 16 insertions(+), 11 deletions(-) commit 6f1b10c08ceed9922d645e9e41836a1f75aadcd1 Author: Andrés G. Aragoneses Date: Wed Nov 12 20:29:23 2008 +0000 * uia2atk/UIAutomation/UIAutomationTypes/UIAutomationTypes.mdp: * uia2atk/UIAutomation/UIAutomationBridge/UIAutomationBridge.mdp: * uia2atk/UIAutomation/UIAutomationProvider/UIAutomationProvider.mdp: AssemblyInfo files are autogenerated. svn path=/trunk/uia2atk/; revision=118639 UIAutomation/UIAutomationBridge/ChangeLog | 4 ++++ .../UIAutomationBridge/UIAutomationBridge.mdp | 1 - UIAutomation/UIAutomationProvider/ChangeLog | 4 ++++ .../UIAutomationProvider/UIAutomationProvider.mdp | 1 - UIAutomation/UIAutomationTypes/ChangeLog | 4 ++++ .../UIAutomationTypes/UIAutomationTypes.mdp | 1 - 6 files changed, 12 insertions(+), 3 deletions(-) commit 8e4853e1d95070532f6c628c938a98b49e9a02b4 Author: Andrés G. Aragoneses Date: Wed Nov 12 20:26:11 2008 +0000 * uia2atk/Uia2Atk.mds: * uia2atk/UIAutomation/UIAutomation.mds: * uia2atk/UIAutomation/UIAutomationTypes/UIAutomationTypes.mdp: * uia2atk/UIAutomation/UIAutomationBridge/UIAutomationBridge.mdp: * uia2atk/UIAutomation/UIAutomationProvider/UIAutomationProvider.mdp: * uia2atk/UIAutomationWinforms/UIAutomationWinformsTests/UIAutomationWinformsTests.mdp: Update for new locations. svn path=/trunk/uia2atk/; revision=118638 UIAutomation/ChangeLog | 4 +++ UIAutomation/UIAutomation.mds | 23 +++++++++---------- UIAutomation/UIAutomationBridge/ChangeLog | 4 +++ .../UIAutomationBridge/UIAutomationBridge.mdp | 5 ++- UIAutomation/UIAutomationProvider/ChangeLog | 4 +++ .../UIAutomationProvider/UIAutomationProvider.mdp | 2 +- UIAutomation/UIAutomationTypes/ChangeLog | 4 +++ .../UIAutomationTypes/UIAutomationTypes.mdp | 2 +- 8 files changed, 32 insertions(+), 16 deletions(-) commit 14b5794b37fd43eb2bd671b3dcf99eea1ad8bb3e Author: Stephen Shaw Date: Mon Nov 10 22:49:59 2008 +0000 removed extra files from being installed svn path=/trunk/uia2atk/; revision=118431 UIAutomation/Makefile.include | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit b0b9988a95db89170e189560899eb2a34134c2f1 Merge: 1509c56 015850e Author: Brad Taylor Date: Mon Nov 10 22:28:10 2008 +0000 2008-11-10 Brad Taylor * */: Make distcheck pass. svn path=/trunk/uia2atk/; revision=118427 commit 015850e2f89f5e5b6041d2404580349774a43494 Author: Stephen Shaw Date: Mon Nov 10 21:57:10 2008 +0000 missed a change in configure.ac svn path=/trunk/uia2atk/; revision=118422 UIAutomation/configure.ac | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 9470589b8e5e2b5bed8969edba204c726f58a8c1 Author: Stephen Shaw Date: Mon Nov 10 21:56:21 2008 +0000 Fixing make distcheck svn path=/trunk/uia2atk/; revision=118421 .../UIAutomationBridge/Assembly/AssemblyInfo.cs | 2 +- UIAutomation/UIAutomationBridge/Makefile.am | 2 +- .../UIAutomationClient/Assembly/AssemblyInfo.cs | 2 +- UIAutomation/UIAutomationClient/Makefile.am | 2 +- .../UIAutomationProvider/Assembly/AssemblyInfo.cs | 2 +- UIAutomation/UIAutomationProvider/Makefile.am | 2 +- .../UIAutomationTypes/Assembly/AssemblyInfo.cs | 2 +- UIAutomation/UIAutomationTypes/Makefile.am | 2 +- UIAutomation/WindowsBase/Makefile.am | 4 ++-- UIAutomation/configure.ac | 1 + UIAutomation/data/Makefile.am | 4 ++-- 11 files changed, 13 insertions(+), 12 deletions(-) commit a49f46290ccf66e7a31cb8f7724e6aa59da47a6c Author: Stephen Shaw Date: Fri Nov 7 22:45:34 2008 +0000 Fixed make distcheck svn path=/trunk/uia2atk/; revision=118235 UIAutomation/data/Makefile.am | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) commit 9c5e7790c28988a2aa9c40b0db21455f76542614 Author: Sandy Armstrong Date: Fri Nov 7 21:04:29 2008 +0000 * UIAutomation/UIAutomationTypes/Makefile.am: Add -lib:../bin compiler flag to get local WindowsBase assembly. * UIAutomation/WindowsBase/Makefile.am: Add "/package 2.0" gacutil flag to create WindowsBase symlink in the correct location. svn path=/trunk/uia2atk/; revision=118216 UIAutomation/ChangeLog | 5 +++++ UIAutomation/UIAutomationTypes/ChangeLog | 5 +++++ UIAutomation/UIAutomationTypes/Makefile.am | 2 +- UIAutomation/WindowsBase/Makefile.am | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) commit 1a5ed117a39364f250a875f26697086e388ad69e Author: Brad Taylor Date: Fri Nov 7 20:54:59 2008 +0000 2008-11-07 Brad Taylor * Makefile.am: * configure.ac: * WindowsBase/: Import a small portion of WindowsBase so that we can build UIAutomation* independently of olive. svn path=/trunk/uia2atk/; revision=118213 UIAutomation/ChangeLog | 7 + UIAutomation/Makefile.am | 2 +- UIAutomation/WindowsBase/Assembly/AssemblyInfo.cs | 82 ++++ UIAutomation/WindowsBase/Makefile.am | 62 +++ .../WindowsBase/System.Windows.Media/Matrix.cs | 393 +++++++++++++++++ UIAutomation/WindowsBase/System.Windows/Point.cs | 195 +++++++++ UIAutomation/WindowsBase/System.Windows/Rect.cs | 441 ++++++++++++++++++++ UIAutomation/WindowsBase/System.Windows/Size.cs | 157 +++++++ UIAutomation/WindowsBase/System.Windows/Vector.cs | 255 +++++++++++ UIAutomation/configure.ac | 1 + 10 files changed, 1594 insertions(+), 1 deletions(-) commit 69666e82d30f307bda28ce1b26c1e1f159c50d61 Author: Sandy Armstrong Date: Fri Nov 7 17:58:01 2008 +0000 * UIAutomation/data/Makefile.am: * UIAutomation/data/mono-uia.pc.in: * UIAutomation/data/mono-uia.pc.in.in: Let configure stage take care of replacing @VERSION@. * UIAutomation/Makefile.am: * UIAutomation/configure.ac: Remove cruft. * UIAutomation/UIAutomationTypes/Makefile.am: * UIAutomation/UIAutomationClient/Makefile.am: * UIAutomation/UIAutomationBridge/Makefile.am: * UIAutomation/UIAutomationProvider/Makefile.am: Remove cruft, use bin instead of lib/Debug. svn path=/trunk/uia2atk/; revision=118201 UIAutomation/ChangeLog | 10 +++++++++ UIAutomation/Makefile.am | 4 --- UIAutomation/UIAutomationBridge/ChangeLog | 4 +++ UIAutomation/UIAutomationBridge/Makefile.am | 26 +++------------------- UIAutomation/UIAutomationClient/ChangeLog | 4 +++ UIAutomation/UIAutomationClient/Makefile.am | 26 +++------------------- UIAutomation/UIAutomationProvider/ChangeLog | 4 +++ UIAutomation/UIAutomationProvider/Makefile.am | 26 +++------------------- UIAutomation/UIAutomationTypes/ChangeLog | 4 +++ UIAutomation/UIAutomationTypes/Makefile.am | 23 ++----------------- UIAutomation/configure.ac | 28 +----------------------- UIAutomation/data/Makefile.am | 4 +- UIAutomation/data/mono-uia.pc.in | 5 ---- UIAutomation/data/mono-uia.pc.in.in | 5 ++++ 14 files changed, 50 insertions(+), 123 deletions(-) commit b1173dc90fae7a7dd6d9fe1c43ca6b7c4de3a6f8 Author: Sandy Armstrong Date: Fri Nov 7 17:33:26 2008 +0000 * UIAutomation/Makefile.include: Support passing "/package accessibility" argument to gacutil via PACKAGE_FLAG var. * UIAutomation/UIAutomationTypes/Makefile.am: * UIAutomation/UIAutomationClient/Makefile.am: * UIAutomation/UIAutomationBridge/Makefile.am: * UIAutomation/UIAutomationProvider/Makefile.am: Set PACKAGE_FLAG properly, fix some find/replace bugs. svn path=/trunk/uia2atk/; revision=118195 UIAutomation/ChangeLog | 5 +++++ UIAutomation/Makefile.include | 4 ++-- UIAutomation/UIAutomationBridge/ChangeLog | 4 ++++ UIAutomation/UIAutomationBridge/Makefile.am | 9 +++++---- UIAutomation/UIAutomationClient/ChangeLog | 4 ++++ UIAutomation/UIAutomationClient/Makefile.am | 9 +++++---- UIAutomation/UIAutomationProvider/ChangeLog | 4 ++++ UIAutomation/UIAutomationProvider/Makefile.am | 9 +++++---- UIAutomation/UIAutomationTypes/ChangeLog | 4 ++++ UIAutomation/UIAutomationTypes/Makefile.am | 9 +++++---- 10 files changed, 43 insertions(+), 18 deletions(-) commit 92d3e0b8c021b935d0bea00582d237f07a2d949e Author: Sandy Armstrong Date: Fri Nov 7 16:55:41 2008 +0000 * UIAutomation/configure.ac: Check for sn. svn path=/trunk/uia2atk/; revision=118191 UIAutomation/ChangeLog | 4 ++++ UIAutomation/configure.ac | 5 +++++ 2 files changed, 9 insertions(+), 0 deletions(-) commit f0604041d6ebe043c6d003eca5ff67f57d7e8d6b Author: Sandy Armstrong Date: Fri Nov 7 16:35:54 2008 +0000 * UIAutomation/mkinstalldirs: Copy from olive. * UIAutomation/data/Makefile.am: Copy stuff from olive/build/rules.make needed by this makefile. Could use some cleanup of relative paths, names, etc. * UIAutomation/UIAutomationTypes/Makefile.am: * UIAutomation/UIAutomationClient/Makefile.am: * UIAutomation/UIAutomationBridge/Makefile.am: * UIAutomation/UIAutomationProvider/Makefile.am: After compiling, sign. Should be cleaned up a bit. svn path=/trunk/uia2atk/; revision=118187 UIAutomation/ChangeLog | 7 ++ UIAutomation/UIAutomationBridge/ChangeLog | 4 + UIAutomation/UIAutomationBridge/Makefile.am | 1 + UIAutomation/UIAutomationClient/ChangeLog | 4 + UIAutomation/UIAutomationClient/Makefile.am | 1 + UIAutomation/UIAutomationProvider/ChangeLog | 4 + UIAutomation/UIAutomationProvider/Makefile.am | 1 + UIAutomation/UIAutomationTypes/ChangeLog | 4 + UIAutomation/UIAutomationTypes/Makefile.am | 1 + UIAutomation/data/Makefile.am | 10 ++- UIAutomation/mkinstalldirs | 99 +++++++++++++++++++++++++ 11 files changed, 135 insertions(+), 1 deletions(-) commit 1af7b82b79dae6a90e95d9f319e68e895f26ea5b Merge: 1046bbe a3f10c4 Author: Sandy Armstrong Date: Fri Nov 7 15:54:56 2008 +0000 * UIAutomation/data/Makefile: * UIAutomation/data/Makefile.am: Rename to Makefile.am, make it start to work. * UIAutomation/Makefile.am: Add winfx3.pub to EXTRA_DIST. * UIAutomation/configure.ac: Re-add data/Makefile. * UIAutomation/build/common/Consts.cs.in: Don't need MonoVersion, afict. svn path=/trunk/uia2atk/; revision=118183 commit e9414f53f7c4392ae88da28cbd6ebaba867a39f6 Author: Sandy Armstrong Date: Fri Nov 7 15:06:52 2008 +0000 * UIAutomation/winfx3.pub: Add key for signing these assemblies, copied from olive. * UIAutomation/UIAutomationTypes/Makefile.am: * UIAutomation/UIAutomationClient/Makefile.am: * UIAutomation/UIAutomationBridge/Makefile.am: * UIAutomation/UIAutomationProvider/Makefile.am: Handle keysigning in AssemblyInfo.cs, define NET_2_0 when compiling. * UIAutomation/configure.ac: Remove data for now, not done fixing this. Add buil/common/Consts.cs (still need to set MONO_VERSION). * UIAutomation/configure: * UIAutomation/build/common/MonoVersion.cs: * UIAutomation/build/common/TestConfiguration.cs: Remove unneeded files. * UIAutomation/data/ChangeLog: * UIAutomation/build/common/ChangeLog: Removed excessive ChangeLogs. svn path=/trunk/uia2atk/; revision=118179 UIAutomation/ChangeLog | 14 + UIAutomation/UIAutomationBridge/ChangeLog | 5 + UIAutomation/UIAutomationBridge/Makefile.am | 2 +- UIAutomation/UIAutomationClient/ChangeLog | 5 + UIAutomation/UIAutomationClient/Makefile.am | 2 +- UIAutomation/UIAutomationProvider/ChangeLog | 5 + UIAutomation/UIAutomationProvider/Makefile.am | 2 +- UIAutomation/UIAutomationTypes/ChangeLog | 5 + UIAutomation/UIAutomationTypes/Makefile.am | 2 +- UIAutomation/build/common/ChangeLog | 19 - UIAutomation/build/common/MonoVersion.cs | 6 - UIAutomation/build/common/TestConfiguration.cs | 46 - UIAutomation/configure | 4256 ------------------------ UIAutomation/configure.ac | 2 +- UIAutomation/data/ChangeLog | 57 - UIAutomation/winfx3.pub | Bin 0 -> 160 bytes 16 files changed, 39 insertions(+), 4389 deletions(-) commit 5bfe423f66010d413bd40f325e2d5ec302333f1d Author: Stephen Shaw Date: Fri Nov 7 05:04:29 2008 +0000 More build updates svn path=/trunk/uia2atk/; revision=118168 UIAutomation/UIAutomationBridge/Makefile.am | 2 + UIAutomation/UIAutomationClient/Makefile.am | 2 + UIAutomation/UIAutomationProvider/Makefile.am | 2 + UIAutomation/UIAutomationTypes/Makefile.am | 2 + UIAutomation/build/common/ChangeLog | 19 ++++ UIAutomation/build/common/Consts.cs.in | 119 +++++++++++++++++++++++ UIAutomation/build/common/Locale.cs | 51 ++++++++++ UIAutomation/build/common/MonoTODOAttribute.cs | 120 ++++++++++++++++++++++++ UIAutomation/build/common/MonoVersion.cs | 6 + UIAutomation/build/common/TestConfiguration.cs | 46 +++++++++ UIAutomation/configure | 3 +- UIAutomation/data/Makefile | 4 +- 12 files changed, 373 insertions(+), 3 deletions(-) commit 8130991c9b3fcf917aeb9a8d39e22a0612d24218 Author: Stephen Shaw Date: Fri Nov 7 02:04:05 2008 +0000 Fixed mono-uia.pc file svn path=/trunk/uia2atk/; revision=118165 UIAutomation/Makefile.am | 4 ++-- UIAutomation/configure.ac | 1 + UIAutomation/data/Makefile | 11 +---------- 3 files changed, 4 insertions(+), 12 deletions(-) commit c338ead424cdcadef2b31dcd0cc2417892ae0ba1 Author: Sandy Armstrong Date: Fri Nov 7 01:59:25 2008 +0000 * UIAutomation/UIAutomation.mds: * UIAutomation/UIAutomationProvider/UIAutomation.mds: Move top-level solution to top-level. svn path=/trunk/uia2atk/; revision=118164 UIAutomation/ChangeLog | 4 +++ UIAutomation/UIAutomation.mds | 25 ++++++++++++++++++++ UIAutomation/UIAutomationProvider/ChangeLog | 4 +++ UIAutomation/UIAutomationProvider/UIAutomation.mds | 25 -------------------- 4 files changed, 33 insertions(+), 25 deletions(-) commit 8129e33cf705ea5037ac69ed1f1255c8dd4f89a2 Author: Stephen Shaw Date: Fri Nov 7 01:52:51 2008 +0000 second commit to get build working svn path=/trunk/uia2atk/; revision=118163 UIAutomation/Makefile | 150 - UIAutomation/Makefile.am | 6 +- UIAutomation/UIAutomationBridge/Makefile | 9 - UIAutomation/UIAutomationBridge/Makefile.am | 76 + UIAutomation/UIAutomationClient/Makefile | 10 - UIAutomation/UIAutomationClient/Makefile.am | 82 + UIAutomation/UIAutomationProvider/Makefile | 10 - UIAutomation/UIAutomationProvider/Makefile.am | 101 + UIAutomation/UIAutomationTypes/Makefile | 10 - UIAutomation/UIAutomationTypes/Makefile.am | 128 + UIAutomation/configure | 4292 ++++++++++++++++++++++++- UIAutomation/configure.ac | 5 +- 12 files changed, 4641 insertions(+), 238 deletions(-) commit 31498a809f809341cea6a65299347dfd95dc61b8 Author: Stephen Shaw Date: Thu Nov 6 19:15:34 2008 +0000 First move at getting build put back together svn path=/trunk/uia2atk/; revision=118142 UIAutomation/Makefile | 30 +++++++- UIAutomation/Makefile.am | 8 ++ UIAutomation/Makefile.include | 116 ++++++++++++++++++++++++++++ UIAutomation/MakefileClass | 35 -------- UIAutomation/UIAutomationBridge/Makefile | 6 +- UIAutomation/UIAutomationClient/Makefile | 6 +- UIAutomation/UIAutomationProvider/Makefile | 6 +- UIAutomation/UIAutomationTypes/Makefile | 6 +- UIAutomation/autogen.sh | 83 ++++++++++++++++++++ UIAutomation/configure.ac | 100 ++++++++++++++++++++++++ UIAutomation/data/ChangeLog | 57 ++++++++++++++ UIAutomation/expansions.m4 | 50 ++++++++++++ 12 files changed, 455 insertions(+), 48 deletions(-) commit 4568cc7538e8bdac1fdf4e06186712054f925b59 Merge: 79e5301 b285d3f Author: Stephen Shaw Date: Thu Nov 6 18:48:35 2008 +0000 checkin the uia stuff from olive -> uia2atk svn path=/trunk/uia2atk/; revision=118135 mono-uia-2.1/UIAutomationClientTests/0000777000016200001670000000000011433571554020533 5ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationClientTests/Makefile.am0000644000016200001670000000011111433571545022554 0ustar00hudsonhudson00000000000000SUBDIRS = SampleForm UIAutomationClientTests GtkForm AtspiUiaClientTests mono-uia-2.1/UIAutomationClientTests/SampleForm/0000777000016200001670000000000011433571554022600 5ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationClientTests/SampleForm/Form1.resx0000644000016200001670000001307711433571545024473 0ustar00hudsonhudson00000000000000 text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 mono-uia-2.1/UIAutomationClientTests/SampleForm/Makefile.am0000644000016200001670000000276011433571545024635 0ustar00hudsonhudson00000000000000 EXTRA_DIST = ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG;TRACE" ASSEMBLY = bin/Debug/SampleForm.exe ASSEMBLY_MDB = $(ASSEMBLY).mdb COMPILE_TARGET = winexe PROJECT_REFERENCES = BUILD_DIR = bin/Debug/ SAMPLEFORM_EXE_MDB_SOURCE=bin/Debug/SampleForm.exe.mdb SAMPLEFORM_EXE_MDB=$(BUILD_DIR)/SampleForm.exe.mdb AL=al2 SATELLITE_ASSEMBLY_NAME=$(notdir $(basename $(ASSEMBLY))).resources.dll PROGRAMFILES = \ $(SAMPLEFORM_EXE_MDB) BINARIES = RESGEN=resgen2 all: $(ASSEMBLY) $(PROGRAMFILES) $(BINARIES) FILES = \ Form1.cs \ Form1.Designer.cs \ MyControl.cs \ Program.cs \ Properties/AssemblyInfo.cs DATA_FILES = RESOURCES = Form1.resx,SampleForm.Form1.resources EXTRAS = REFERENCES = \ System \ System.Core \ System.Xml.Linq \ System.Data.DataSetExtensions \ System.Data \ System.Drawing \ System.Windows.Forms \ System.Xml DLL_REFERENCES = CLEANFILES = $(PROGRAMFILES) $(BINARIES) include $(top_srcdir)/Makefile.include $(eval $(call emit_resgen_targets)) $(build_xamlg_list): %.xaml.g.cs: %.xaml xamlg '$<' $(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list) mkdir -p $(shell dirname $(ASSEMBLY)) $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) mono-uia-2.1/UIAutomationClientTests/SampleForm/Form1.Designer.cs0000644000016200001670000003140211433571545025646 0ustar00hudsonhudson00000000000000namespace SampleForm { partial class Form1 { /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected override void Dispose (bool disposing) { if (disposing && ( components != null )) { components.Dispose (); } base.Dispose (disposing); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent () { this.button1 = new System.Windows.Forms.Button (); this.groupBox1 = new System.Windows.Forms.GroupBox (); this.groupBox3 = new System.Windows.Forms.GroupBox (); this.button7 = new System.Windows.Forms.Button (); this.button6 = new System.Windows.Forms.Button (); this.groupBox2 = new System.Windows.Forms.GroupBox (); this.button5 = new System.Windows.Forms.Button (); this.checkBox1 = new System.Windows.Forms.CheckBox (); this.button4 = new System.Windows.Forms.Button (); this.button3 = new System.Windows.Forms.Button (); this.button2 = new System.Windows.Forms.Button (); this.panel1 = new System.Windows.Forms.Panel (); this.btnRemoveTextbox = new System.Windows.Forms.Button (); this.btnAddTextbox = new System.Windows.Forms.Button (); this.label1 = new System.Windows.Forms.Label (); this.textBox1 = new System.Windows.Forms.TextBox (); this.textBox2 = new System.Windows.Forms.TextBox (); this.textBox3 = new System.Windows.Forms.TextBox (); this.treeView1 = new System.Windows.Forms.TreeView (); this.txtCommand = new System.Windows.Forms.TextBox(); this.btnRun = new System.Windows.Forms.Button(); this.numericUpDown1 = new System.Windows.Forms.NumericUpDown (); this.groupBox1.SuspendLayout (); this.groupBox3.SuspendLayout (); this.groupBox2.SuspendLayout (); this.panel1.SuspendLayout (); this.dataGridView1 = new System.Windows.Forms.DataGridView(); ( (System.ComponentModel.ISupportInitialize) (this.dataGridView1 ) ).BeginInit (); ( (System.ComponentModel.ISupportInitialize) ( this.numericUpDown1 ) ).BeginInit (); this.listView1 = new System.Windows.Forms.ListView(); this.SuspendLayout (); // // button1 // this.button1.Location = new System.Drawing.Point (102, 26); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size (75, 23); this.button1.TabIndex = 0; this.button1.Text = "b&utton1"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler (this.button1_Click); // // groupBox1 // this.groupBox1.Controls.Add (this.groupBox3); this.groupBox1.Controls.Add (this.groupBox2); this.groupBox1.Controls.Add (this.button3); this.groupBox1.Controls.Add (this.button2); this.groupBox1.Location = new System.Drawing.Point (44, 153); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size (489, 204); this.groupBox1.TabIndex = 1; this.groupBox1.TabStop = false; this.groupBox1.Text = "groupBox1"; // // groupBox3 // this.groupBox3.Controls.Add (this.button7); this.groupBox3.Controls.Add (this.button6); this.groupBox3.Enabled = false; this.groupBox3.Location = new System.Drawing.Point (272, 20); this.groupBox3.Name = "groupBox3"; this.groupBox3.Size = new System.Drawing.Size (200, 100); this.groupBox3.TabIndex = 3; this.groupBox3.TabStop = false; this.groupBox3.Text = "groupBox3"; // // button7 // this.button7.Enabled = false; this.button7.Location = new System.Drawing.Point (7, 44); this.button7.Name = "button7"; this.button7.Size = new System.Drawing.Size (75, 23); this.button7.TabIndex = 1; this.button7.Text = "button7"; this.button7.UseVisualStyleBackColor = true; // // button6 // this.button6.Location = new System.Drawing.Point (7, 13); this.button6.Name = "button6"; this.button6.Size = new System.Drawing.Size (75, 23); this.button6.TabIndex = 0; this.button6.Text = "button6"; this.button6.UseVisualStyleBackColor = true; // // groupBox2 // this.groupBox2.Controls.Add (this.button5); this.groupBox2.Controls.Add (this.checkBox1); this.groupBox2.Controls.Add (this.button4); this.groupBox2.Location = new System.Drawing.Point (66, 93); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size (200, 100); this.groupBox2.TabIndex = 2; this.groupBox2.TabStop = false; this.groupBox2.Text = "groupBox2"; // // button5 // this.button5.Enabled = false; this.button5.Location = new System.Drawing.Point (90, 20); this.button5.Name = "button5"; this.button5.Size = new System.Drawing.Size (75, 23); this.button5.TabIndex = 2; this.button5.Text = "button5"; this.button5.UseVisualStyleBackColor = true; // // checkBox1 // this.checkBox1.AutoSize = true; this.checkBox1.Location = new System.Drawing.Point (7, 50); this.checkBox1.Name = "checkBox1"; this.checkBox1.Size = new System.Drawing.Size (80, 17); this.checkBox1.TabIndex = 1; this.checkBox1.Text = "checkBox1"; this.checkBox1.UseVisualStyleBackColor = true; // // button4 // this.button4.Location = new System.Drawing.Point (7, 20); this.button4.Name = "button4"; this.button4.Size = new System.Drawing.Size (75, 23); this.button4.TabIndex = 0; this.button4.Text = "button4"; this.button4.UseVisualStyleBackColor = true; // // button3 // this.button3.AccessibleDescription = "help text 3"; this.button3.Enabled = false; this.button3.Location = new System.Drawing.Point (66, 63); this.button3.Name = "button3"; this.button3.Size = new System.Drawing.Size (75, 23); this.button3.TabIndex = 1; this.button3.Text = "button3"; this.button3.UseVisualStyleBackColor = true; // // button2 // this.button2.Location = new System.Drawing.Point (66, 33); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size (128, 23); this.button2.TabIndex = 0; this.button2.Text = "button2"; this.button2.UseVisualStyleBackColor = true; // // panel1 // this.panel1.Controls.Add (this.btnRemoveTextbox); this.panel1.Controls.Add (this.btnAddTextbox); this.panel1.Location = new System.Drawing.Point (338, 26); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size (130, 130); this.panel1.TabIndex = 4; // // btnRemoveTextbox // this.btnRemoveTextbox.Location = new System.Drawing.Point (62, 9); this.btnRemoveTextbox.Name = "btnRemoveTextbox"; this.btnRemoveTextbox.Size = new System.Drawing.Size (63, 25); this.btnRemoveTextbox.TabIndex = 1; this.btnRemoveTextbox.Text = "Remove"; this.btnRemoveTextbox.UseVisualStyleBackColor = true; this.btnRemoveTextbox.Click += new System.EventHandler (this.btnRemoveTextbox_Click); // // btnAddTextbox // this.btnAddTextbox.Location = new System.Drawing.Point (6, 9); this.btnAddTextbox.Name = "btnAddTextbox"; this.btnAddTextbox.Size = new System.Drawing.Size (50, 25); this.btnAddTextbox.TabIndex = 0; this.btnAddTextbox.Text = "Add"; this.btnAddTextbox.UseVisualStyleBackColor = true; this.btnAddTextbox.Click += new System.EventHandler (this.btnAddTextbox_Click); // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point (61, 31); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size (35, 13); this.label1.TabIndex = 2; this.label1.Text = "label1"; // // textBox1 // this.textBox1.Location = new System.Drawing.Point (102, 56); this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size (100, 20); this.textBox1.TabIndex = 3; // // textBox2 // this.textBox2.Enabled = false; this.textBox2.Location = new System.Drawing.Point (102, 83); this.textBox2.Name = "textBox2"; this.textBox2.ReadOnly = true; this.textBox2.Size = new System.Drawing.Size (100, 20); this.textBox2.TabIndex = 4; this.textBox2.UseSystemPasswordChar = true; // // textBox3 // this.textBox3.Location = new System.Drawing.Point (232, 26); this.textBox3.Multiline = true; this.textBox3.Name = "textBox3"; this.textBox3.ScrollBars = System.Windows.Forms.ScrollBars.Both; this.textBox3.Size = new System.Drawing.Size (100, 90); this.textBox3.TabIndex = 7; this.textBox3.Text = "abcdefgabcdefgabcdef\n\n\n\n\n\n\n\ngabcdefgabcdefg"; this.textBox3.WordWrap = false; // // treeView1 // this.treeView1.Location = new System.Drawing.Point (44, 364); this.treeView1.Name = "treeView1"; this.treeView1.Size = new System.Drawing.Size (121, 97); this.treeView1.TabIndex = 8; // // txtCommand // this.txtCommand.Location = new System.Drawing.Point(44, 432); this.txtCommand.Name = "txtCommand"; this.txtCommand.Size = new System.Drawing.Size(120, 21); this.txtCommand.TabIndex = 9; this.txtCommand.Text = "command"; // // btnRun // this.btnRun.Location = new System.Drawing.Point(170, 432); this.btnRun.Name = "btnRun"; this.btnRun.Size = new System.Drawing.Size(45, 23); this.btnRun.TabIndex = 10; this.btnRun.Text = "Run"; this.btnRun.UseVisualStyleBackColor = true; this.btnRun.Click += new System.EventHandler (this.btnRun_Click); // // numericUpDown1 // this.numericUpDown1.Location = new System.Drawing.Point (102, 110); this.numericUpDown1.Name = "numericUpDown1"; this.numericUpDown1.Size = new System.Drawing.Size (120, 20); this.numericUpDown1.TabIndex = 11; // // dataGridView1 // this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView1.Location = new System.Drawing.Point (200, 364); this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.Size = new System.Drawing.Size (240, 150); this.dataGridView1.TabIndex = 12; // // listView1 // this.listView1.Location = new System.Drawing.Point(450, 364); this.listView1.Name = "listView1"; this.listView1.Size = new System.Drawing.Size(150, 150); this.listView1.TabIndex = 13; this.listView1.UseCompatibleStateImageBehavior = false; // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF (6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size (587, 530); this.Controls.Add(this.btnRun); this.Controls.Add(this.txtCommand); this.Controls.Add (this.numericUpDown1); this.Controls.Add (this.treeView1); this.Controls.Add (this.panel1); this.Controls.Add (this.textBox3); this.Controls.Add (this.textBox2); this.Controls.Add (this.textBox1); this.Controls.Add (this.label1); this.Controls.Add (this.groupBox1); this.Controls.Add (this.button1); this.Controls.Add (this.dataGridView1); this.Controls.Add (this.listView1); this.Name = "Form1"; this.Text = "TestForm1"; this.groupBox1.ResumeLayout (false); this.groupBox3.ResumeLayout (false); this.groupBox2.ResumeLayout (false); this.groupBox2.PerformLayout (); this.panel1.ResumeLayout (false); ( (System.ComponentModel.ISupportInitialize) ( this.numericUpDown1 ) ).EndInit (); ( (System.ComponentModel.ISupportInitialize) ( this.dataGridView1 ) ).EndInit (); this.ResumeLayout (false); this.PerformLayout (); } #endregion private System.Windows.Forms.Button button1; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Button button3; private System.Windows.Forms.Button button2; private System.Windows.Forms.Label label1; private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.TextBox textBox2; private System.Windows.Forms.TextBox textBox3; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Button button5; private System.Windows.Forms.CheckBox checkBox1; private System.Windows.Forms.Button button4; private System.Windows.Forms.GroupBox groupBox3; private System.Windows.Forms.Button button7; private System.Windows.Forms.Button button6; private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Button btnRemoveTextbox; private System.Windows.Forms.Button btnAddTextbox; private System.Windows.Forms.TreeView treeView1; private System.Windows.Forms.TextBox txtCommand; private System.Windows.Forms.Button btnRun; private System.Windows.Forms.NumericUpDown numericUpDown1; private System.Windows.Forms.DataGridView dataGridView1; private System.Windows.Forms.ListView listView1; } } mono-uia-2.1/UIAutomationClientTests/SampleForm/MyControl.cs0000644000016200001670000000030211433571545025044 0ustar00hudsonhudson00000000000000using System; using System.Drawing; using System.Windows.Forms; namespace SampleForm { public class MyControl : Control { public MyControl () { this.BackColor = Color.Green; } } } mono-uia-2.1/UIAutomationClientTests/SampleForm/Form1.cs0000644000016200001670000002264411433571545024117 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace SampleForm { public partial class Form1 : Form { private DataTable table = new DataTable (); private Form childForm; private MenuStrip menuStrip1 = new MenuStrip (); private int button1ClickCount = 0; public Form1 () { InitializeComponent (); txtCommand.AccessibleName = "txtCommand"; textBox3.AccessibleName = "textBox3"; this.button4.Click += new System.EventHandler (this.button4_Click); TreeNode node = new TreeNode ("item 1"); node.Nodes.Add (new TreeNode ("item 1a")); treeView1.Nodes.Add (node); node = new TreeNode ("item 2"); node.Nodes.Add (new TreeNode ("item 2a")); node.Nodes.Add (new TreeNode ("item 2b")); treeView1.Nodes.Add (node); table.Columns.Add ("Gender", typeof (bool)); table.Columns.Add ("Name", typeof (string)); table.Columns.Add ("Age", typeof (uint)); DataRow tableRow; tableRow = table.NewRow (); tableRow [0] = false; tableRow [1] = "Alice"; tableRow [2] = 24; table.Rows.Add (tableRow); tableRow = table.NewRow (); tableRow [0] = true; tableRow [1] = "Bob"; tableRow [2] = 28; table.Rows.Add (tableRow); dataGridView1.DataSource = table; dataGridView1.AccessibleName = "dataGridView1"; listView1.AccessibleName = "listView1"; var view = listView1; view.CheckBoxes = true; view.View = View.Details; view.Columns.Add ("Subcolumn 1", 100, HorizontalAlignment.Left); view.Columns.Add ("Subcolumn 2", 100, HorizontalAlignment.Center); for (int i = 0; i < 10; i++) { ListViewItem item = new ListViewItem (); item.Text = "Item " + i; item.SubItems.Add ("subitem1"); item.SubItems.Add ("subitem2"); view.Items.Add (item); } MyControl myCtrl = new MyControl (); myCtrl.AccessibleName = "My Control"; myCtrl.Bounds = new Rectangle (5, 5, 30, 15); Controls.Add (myCtrl); menuStrip1.AccessibleName = "menuStrip1"; menuStrip1.Dock = DockStyle.Top; var file = new ToolStripMenuItem ("&File"); file.DropDownItems.Add (new ToolStripMenuItem ("&New")); file.DropDownItems.Add (new ToolStripMenuItem ("&Open")); var edit = new ToolStripMenuItem ("&Edit"); edit.DropDownItems.Add (new ToolStripMenuItem ("&Undo")); edit.DropDownItems.Add (new ToolStripSeparator ()); edit.DropDownItems.Add (new ToolStripMenuItem ("&Cut")); edit.DropDownItems.Add (new ToolStripMenuItem ("&Copy")); edit.DropDownItems.Add (new ToolStripMenuItem ("&Paste")); menuStrip1.Items.Add (file); menuStrip1.Items.Add (edit); Controls.Add (menuStrip1); } private void button1_Click (object sender, EventArgs e) { button1ClickCount++; if (button1ClickCount == 1) { textBox1.Text = "button1_click"; label1.Text = "button1_click"; } else { textBox1.Text = "button1_click" + button1ClickCount; label1.Text = "button1_click" + button1ClickCount; } Console.WriteLine ("textbox1 & label1's texts are modified."); } private void button4_Click (object sender, EventArgs e) { numericUpDown1.Enabled = !numericUpDown1.Enabled; treeView1.Enabled = !treeView1.Enabled; menuStrip1.Enabled = !menuStrip1.Enabled; } private void btnAddTextbox_Click (object sender, EventArgs e) { TextBox box = new TextBox(); box.Width = 30; box.Left = 10; box.Top = panel1.Controls.Count * 25; panel1.Controls.Add(box); } private void btnRemoveTextbox_Click (object sender, EventArgs e) { if (panel1.Controls.Count <= 2) throw new Exception ("No more child control to delete"); Control controlToDelete = null; foreach (Control c in panel1.Controls) { if (controlToDelete == null || controlToDelete.Top < c.Top) controlToDelete = c; } if (controlToDelete != null) { panel1.Controls.Remove (controlToDelete); controlToDelete.Dispose (); } } private void btnRun_Click (object sender, EventArgs e) { const string sampleText = "Lorem ipsum dolor sit amet"; string cmd = txtCommand.Text; if (cmd == "click button1") button1.PerformClick (); else if (cmd == "set textbox3 text") textBox3.Text = sampleText; else if (cmd.StartsWith ("set textbox3 to ")) { textBox3.Text = cmd.Substring (16).Replace (":", "\n"); }else if (cmd == "select textbox3") { if (textBox3.Text.Length < 4) textBox3.Text = sampleText; if (textBox3.SelectionLength == 3) textBox3.Select (0, 4); else textBox3.Select (0, 3); } else if (cmd == "MoveTo.Origin") { Location = new Point (0, 0); } else if (cmd == "Toggle.Transform.CanMove") { if (WindowState == FormWindowState.Normal) WindowState = FormWindowState.Maximized; else WindowState = FormWindowState.Normal; } else if (cmd == "Toggle.Transform.CanResize") { if (FormBorderStyle == FormBorderStyle.Sizable) FormBorderStyle = FormBorderStyle.FixedSingle; else FormBorderStyle = FormBorderStyle.Sizable; } else if (cmd == "add table row") table.Rows.Add (true, "Mallory", 40); else if (cmd == "add table column") table.Columns.Add("More"); else if (cmd == "set textBox3 long text") textBox3.Text = "very very very very very very very very long text to enable the horizontal scroll bar"; else if (cmd == "disable textBox3") textBox3.Enabled = false; else if (cmd == "disable checkBox1") checkBox1.Enabled = false; else if (cmd == "enable checkBox1") checkBox1.Enabled = true; else if (cmd == "change list view mode list") listView1.View = View.List; else if (cmd == "change list view mode tile") listView1.View = View.Tile; else if (cmd == "change list view mode details") listView1.View = View.Details; else if (cmd == "disable list view") listView1.Enabled = false; else if (cmd == "enable list view") listView1.Enabled = true; else if (cmd == "make listView1 higher") listView1.Height = 500; else if (cmd == "add listView1 item") { ListViewItem item = new ListViewItem (); item.Text = "Item Extra"; item.SubItems.Add ("subitem1"); item.SubItems.Add ("subitem2"); listView1.Items.Add (item); } else if (cmd == "Open.ChildWindow") { if (childForm == null) { childForm = new Form (); childForm.Text = "TestForm1.ChildForm1"; } childForm.Show (); } else if (cmd == "Close.ChildWindow") { if (childForm != null) { childForm.Close (); childForm = null; } } else if (cmd == "Toggle.Window.CanMaximize") { MaximizeBox = !MaximizeBox; } else if (cmd == "Toggle.Window.CanMinimize") { MinimizeBox = !MinimizeBox; } else if (cmd == "Toggle.Window.IsTopmost") { TopMost = !TopMost; } else if (cmd == "Open.ModalChildWindow") { new Form () {Text = "TestForm1.ModalForm1"}.ShowDialog (this); } else if (cmd == "Sleep.2000") { System.Threading.Thread.Sleep (2000); } else if (cmd == "enable multiselect") listView1.MultiSelect = true; else if (cmd == "disable multiselect") listView1.MultiSelect = false; else if (cmd == "change button3 name") { button3.AccessibleName = "xyzzy"; } else if (cmd == "change button3 helptext") { button3.AccessibleDescription = "plugh"; } else if (cmd == "enable button3") { button3.Enabled = true; } else if (cmd == "disable button3") { button3.Enabled = false; } else if (cmd == "focus textBox3") textBox3.Focus (); else if (cmd == "focus button2") button2.Focus (); else if (cmd.StartsWith ("change title:")) this.Text = cmd.Substring (cmd.IndexOf (':') + 1); else if (cmd == "change form size 800x600") this.Size = new Size (800, 600); else if (cmd == "textBox3 singleline") textBox3.Multiline = false; else if (cmd == "bring form to front") this.BringToFront (); else if (cmd == "hide form for 3 seconds") { this.Hide (); var thread = new System.Threading.Thread (() => { System.Threading.Thread.Sleep (3000); MethodInvoker invoker = () => this.Show (); this.Invoke (invoker); }); thread.Start (); } else if (cmd == "toggle form border") FormBorderStyle = (FormBorderStyle == FormBorderStyle.None) ? FormBorderStyle.Sizable : FormBorderStyle.None; } } } mono-uia-2.1/UIAutomationClientTests/SampleForm/Program.cs0000644000016200001670000000065211433571545024535 0ustar00hudsonhudson00000000000000using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; namespace SampleForm { static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main () { Application.EnableVisualStyles (); Application.SetCompatibleTextRenderingDefault (false); Application.Run (new Form1 ()); } } } mono-uia-2.1/UIAutomationClientTests/SampleForm/Makefile.in0000644000016200001670000005062511433571551024646 0ustar00hudsonhudson00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/Makefile.include subdir = UIAutomationClientTests/SampleForm ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(linuxpkgconfigdir)" SCRIPTS = $(bin_SCRIPTS) SOURCES = DIST_SOURCES = DATA = $(linuxpkgconfig_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ GACUTIL = @GACUTIL@ GLIB_SHARP_20_CFLAGS = @GLIB_SHARP_20_CFLAGS@ GLIB_SHARP_20_LIBS = @GLIB_SHARP_20_LIBS@ GMCS = @GMCS@ GTK_SHARP_20_CFLAGS = @GTK_SHARP_20_CFLAGS@ GTK_SHARP_20_LIBS = @GTK_SHARP_20_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MONO = @MONO@ MONO_CFLAGS = @MONO_CFLAGS@ MONO_LIBS = @MONO_LIBS@ NUNIT_CFLAGS = @NUNIT_CFLAGS@ NUNIT_LIBS = @NUNIT_LIBS@ NUNIT_PATH = @NUNIT_PATH@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SN = @SN@ STRIP = @STRIP@ VERSION = @VERSION@ WINDOWSBASE_LIBS = @WINDOWSBASE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_bindir = @expanded_bindir@ expanded_datadir = @expanded_datadir@ expanded_libdir = @expanded_libdir@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = $(build_sources) $(build_resx_files) \ $(build_others_files) $(ASSEMBLY_WRAPPER_IN) $(EXTRAS) \ $(DATA_FILES) $(build_culture_res_files) ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG;TRACE" ASSEMBLY = bin/Debug/SampleForm.exe ASSEMBLY_MDB = $(ASSEMBLY).mdb COMPILE_TARGET = winexe PROJECT_REFERENCES = BUILD_DIR = bin/Debug/ SAMPLEFORM_EXE_MDB_SOURCE = bin/Debug/SampleForm.exe.mdb SAMPLEFORM_EXE_MDB = $(BUILD_DIR)/SampleForm.exe.mdb AL = al2 SATELLITE_ASSEMBLY_NAME = $(notdir $(basename $(ASSEMBLY))).resources.dll PROGRAMFILES = \ $(SAMPLEFORM_EXE_MDB) BINARIES = RESGEN = resgen2 FILES = \ Form1.cs \ Form1.Designer.cs \ MyControl.cs \ Program.cs \ Properties/AssemblyInfo.cs DATA_FILES = RESOURCES = Form1.resx,SampleForm.Form1.resources EXTRAS = REFERENCES = \ System \ System.Core \ System.Xml.Linq \ System.Data.DataSetExtensions \ System.Data \ System.Drawing \ System.Windows.Forms \ System.Xml DLL_REFERENCES = CLEANFILES = $(PROGRAMFILES) $(BINARIES) $(ASSEMBLY) $(ASSEMBLY).mdb \ $(BINARIES) $(build_resx_resources) \ $(build_satellite_assembly_list) VALID_CULTURES = ar bg ca zh-CHS cs da de el en es fi fr he hu is it ja ko nl no pl pt ro ru hr sk sq sv th tr id uk be sl et lv lt fa vi hy eu mk af fo hi sw gu ta te kn mr gl kok ar-SA bg-BG ca-ES zh-TW cs-CZ da-DK de-DE el-GR en-US fi-FI fr-FR he-IL hu-HU is-IS it-IT ja-JP ko-KR nl-NL nb-NO pl-PL pt-BR ro-RO ru-RU hr-HR sk-SK sq-AL sv-SE th-TH tr-TR id-ID uk-UA be-BY sl-SI et-EE lv-LV lt-LT fa-IR vi-VN hy-AM eu-ES mk-MK af-ZA fo-FO hi-IN sw-KE gu-IN ta-IN te-IN kn-IN mr-IN gl-ES kok-IN ar-IQ zh-CN de-CH en-GB es-MX fr-BE it-CH nl-BE nn-NO pt-PT sv-FI ar-EG zh-HK de-AT en-AU es-ES fr-CA ar-LY zh-SG de-LU en-CA es-GT fr-CH ar-DZ zh-MO en-NZ es-CR fr-LU ar-MA en-IE es-PA ar-TN en-ZA es-DO ar-OM es-VE ar-YE es-CO ar-SY es-PE ar-JO es-AR ar-LB en-ZW es-EC ar-KW en-PH es-CL ar-AE es-UY ar-BH es-PY ar-QA es-BO es-SV es-HN es-NI es-PR zh-CHT s2q = $(subst \ ,?,$1) q2s = $(subst ?,\ ,$1) # use this when result will be quoted unesc2 = $(subst ?, ,$1) build_sources = $(FILES) $(GENERATED_FILES) build_sources_esc = $(call s2q,$(build_sources)) # use unesc2, as build_sources_embed is quoted build_sources_embed = $(call unesc2,$(build_sources_esc:%='$(srcdir)/%')) comma__ = , get_resource_name = $(firstword $(subst $(comma__), ,$1)) get_culture = $(lastword $(subst ., ,$(basename $1))) is_cultured_resource = $(and $(word 3,$(subst ., ,$1)), $(filter $(VALID_CULTURES),$(lastword $(subst ., ,$(basename $1))))) RESOURCES_ESC = $(call s2q,$(RESOURCES)) build_resx_list = $(foreach res, $(RESOURCES_ESC), $(if $(filter %.resx, $(call get_resource_name,$(res))),$(res),)) build_non_culture_resx_list = $(foreach res, $(build_resx_list),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) build_non_culture_others_list = $(foreach res, $(filter-out $(build_resx_list),$(RESOURCES_ESC)),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) build_others_list = $(build_non_culture_others_list) build_xamlg_list = $(filter %.xaml.g.cs, $(FILES)) # resgen all .resx resources build_resx_files = $(foreach res, $(build_resx_list), $(call get_resource_name,$(res))) build_resx_resources_esc = $(build_resx_files:.resx=.resources) build_resx_resources = $(call q2s,$(build_resx_resources_esc)) # embed resources for the main assembly build_resx_resources_hack = $(subst .resx,.resources, $(build_non_culture_resx_list)) # use unesc2, as build_resx_resources_embed is quoted build_resx_resources_embed = $(call unesc2,$(build_resx_resources_hack:%='-resource:%')) build_others_files = $(call q2s,$(foreach res, $(build_others_list),$(call get_resource_name,$(res)))) build_others_resources = $(build_others_files) # use unesc2, as build_others_resources_embed is quoted build_others_resources_embed = $(call unesc2,$(build_others_list:%='-resource:$(srcdir)/%')) build_resources = $(build_resx_resources) $(build_others_resources) build_resources_embed = $(build_resx_resources_embed) $(build_others_resources_embed) # -usesourcepath is available only for resgen2 emit_resgen_target_1 = $(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); cd '$$(shell dirname '$$<')' && $$(RESGEN) '$$(shell basename '$$<')' '$$(shell basename '$$@')' emit_resgen_target_2 = $(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); $$(RESGEN) -usesourcepath '$$<' '$$@' emit_resgen_target = $(if $(filter resgen2,$(RESGEN)),$(emit_resgen_target_2),$(emit_resgen_target_1)) emit_resgen_targets = $(foreach res,$(build_resx_resources_esc),$(eval $(call emit_resgen_target,$(res)))) build_references_ref = $(call q2s,$(foreach ref, $(call \ s2q,$(REFERENCES)), $(if $(filter -pkg:%, $(ref)), $(ref), \ $(if $(filter -r:%, $(ref)), $(ref), -r:$(ref))))) $(call \ q2s,$(foreach ref, $(call s2q,$(DLL_REFERENCES)), -r:$(ref))) \ $(call q2s,$(foreach ref, $(call s2q,$(PROJECT_REFERENCES)), \ -r:$(ref))) s2q2s = $(call unesc2,$(call s2q,$1)) cp_actual = test -z $1 || cp $1 $2 cp = $(call cp_actual,'$(call s2q2s,$1)','$(call s2q2s,$2)') rm_actual = test -z '$1' || rm -f '$2' rm = $(call rm_actual,$(call s2q2s,$1),$(call s2q2s,$2)/$(shell basename '$(call s2q2s,$1)')) DISTCLEANFILES = $(GENERATED_FILES) $(pc_files) $(BUILD_DIR)/* #pkglib_SCRIPTS = $(ASSEMBLY) bin_SCRIPTS = $(BINARIES) #programfilesdir = @libdir@/@PACKAGE@ #programfiles_DATA = $(PROGRAMFILES) linuxpkgconfigdir = @libdir@/pkgconfig linuxpkgconfig_DATA = $(LINUX_PKGCONFIG) # generating satellite assemblies culture_resources = $(foreach res, $(RESOURCES_ESC), $(if $(call is_cultured_resource,$(call get_resource_name, $(res))),$(res))) cultures = $(sort $(foreach res, $(culture_resources), $(call get_culture,$(call get_resource_name,$(res))))) culture_resource_dependencies = $(call q2s,$(BUILD_DIR)/$1/$(SATELLITE_ASSEMBLY_NAME): $(subst .resx,.resources,$2)) culture_resource_commandlines = $(call unesc2,cmd_line_satellite_$1 += '/embed:$(subst .resx,.resources,$2)') build_satellite_assembly_list = $(call q2s,$(cultures:%=$(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME))) build_culture_res_files = $(call q2s,$(foreach res, $(culture_resources),$(call get_resource_name,$(res)))) GACROOT = $(DESTDIR)$(prefix)/lib all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.include $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign UIAutomationClientTests/SampleForm/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign UIAutomationClientTests/SampleForm/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files install-linuxpkgconfigDATA: $(linuxpkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(linuxpkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(linuxpkgconfigdir)" @list='$(linuxpkgconfig_DATA)'; test -n "$(linuxpkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(linuxpkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(linuxpkgconfigdir)" || exit $$?; \ done uninstall-linuxpkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(linuxpkgconfig_DATA)'; test -n "$(linuxpkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(linuxpkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(linuxpkgconfigdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) $(DATA) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(linuxpkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-linuxpkgconfigDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-linuxpkgconfigDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-binSCRIPTS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-linuxpkgconfigDATA install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-binSCRIPTS uninstall-linuxpkgconfigDATA all: $(ASSEMBLY) $(PROGRAMFILES) $(BINARIES) # macros # $(call emit-deploy-target,deploy-variable-name) define emit-deploy-target $($1): $($1_SOURCE) mkdir -p '$$(shell dirname '$$@')' cp '$$<' '$$@' endef # $(call emit-deploy-wrapper,wrapper-variable-name,wrapper-sourcefile,x) # assumes that for a wrapper foo.pc its source template is foo.pc.in # if $3 is non-empty then wrapper is marked exec define emit-deploy-wrapper $($1): $2 mkdir -p '$$(shell dirname '$$@')' cp '$$<' '$$@' $(if $3,chmod +x '$$@') endef $(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_dependencies,$(call get_culture,$(call get_resource_name,$(res))),$(call get_resource_name,$(res)))))) $(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_commandlines,$(call get_culture,$(call get_resource_name,$(res))),$(res))))) $(build_satellite_assembly_list): $(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME): mkdir -p '$(@D)' $(AL) -out:'$@' -culture:$* -t:lib $(cmd_line_satellite_$*) gac-install: $(POLICY_ASSEMBLIES) $(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS) /root $(GACROOT) $(PACKAGE_FLAG) || exit 1; gac-uninstall: $(GACUTIL) /us $(ASSEMBLY) $(GACUTIL_FLAGS) /root $(GACROOT) $(PACKAGE_FLAG) || exit 1; $(eval $(call emit_resgen_targets)) $(build_xamlg_list): %.xaml.g.cs: %.xaml xamlg '$<' $(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list) mkdir -p $(shell dirname $(ASSEMBLY)) $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: mono-uia-2.1/UIAutomationClientTests/SampleForm/Properties/0000777000016200001670000000000011433571554024734 5ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationClientTests/SampleForm/Properties/AssemblyInfo.cs0000644000016200001670000000264411433571545027660 0ustar00hudsonhudson00000000000000using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle ("SampleForm")] [assembly: AssemblyDescription ("")] [assembly: AssemblyConfiguration ("")] [assembly: AssemblyCompany ("")] [assembly: AssemblyProduct ("SampleForm")] [assembly: AssemblyCopyright ("Copyright © 2009")] [assembly: AssemblyTrademark ("")] [assembly: AssemblyCulture ("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible (false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid ("a9480a45-3ca3-4372-ab8b-56ad4f13520c")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion ("1.0.0.0")] [assembly: AssemblyFileVersion ("1.0.0.0")] mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/0000777000016200001670000000000011433571554025273 5ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/TableTest.cs0000644000016200001670000002053711433571545027514 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Matt Guo // using System; using System.Linq; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using At = System.Windows.Automation.Automation; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace MonoTests.System.Windows.Automation { //This TestFixture will test GridPattern, TablePattern, GridItemPattern and TableItemPattern [TestFixture] public class TableTest : BaseTest { private GridPattern gridPattern = null; private TablePattern tablePattern = null; protected override void CustomFixtureSetUp () { base.CustomFixtureSetUp (); gridPattern = (GridPattern) table1Element.GetCurrentPattern (GridPattern.Pattern); tablePattern = (TablePattern) table1Element.GetCurrentPattern (TablePattern.Pattern); } [Test] public void IdentifierTest () { Assert.AreEqual (GridPatternIdentifiers.Pattern.Id, GridPattern.Pattern.Id, "GridPattern.Id"); Assert.AreEqual (GridPatternIdentifiers.Pattern.ProgrammaticName, GridPattern.Pattern.ProgrammaticName, "GridPattern.ProgrammaticName"); Assert.AreEqual (GridItemPatternIdentifiers.Pattern.Id, GridItemPattern.Pattern.Id, "GridItemPattern.Id"); Assert.AreEqual (GridItemPatternIdentifiers.Pattern.ProgrammaticName, GridItemPattern.Pattern.ProgrammaticName, "GridItemPattern.ProgrammaticName"); Assert.AreEqual (TablePatternIdentifiers.Pattern.Id, TablePattern.Pattern.Id, "TablePattern.Id"); Assert.AreEqual (TablePatternIdentifiers.Pattern.ProgrammaticName, TablePattern.Pattern.ProgrammaticName, "TablePattern.ProgrammaticName"); Assert.AreEqual (TableItemPatternIdentifiers.Pattern.Id, TableItemPattern.Pattern.Id, "TableItemPattern.Id"); Assert.AreEqual (TableItemPatternIdentifiers.Pattern.ProgrammaticName, TableItemPattern.Pattern.ProgrammaticName, "TableItemPattern.ProgrammaticName"); } [Ignore] //todo see bug# 549115 [Test] public void GridPatternTest () { GridPatternTestInternal (gridPattern); GridPatternTestInternal (tablePattern); } [Test] public void TablePatternTest () { RowOrColumnMajor expectedMajor = (Atspi ? RowOrColumnMajor.Indeterminate : RowOrColumnMajor.RowMajor); Assert.AreEqual (expectedMajor, tablePattern.Current.RowOrColumnMajor, "RowOrColumnMajor"); Assert.AreEqual (0, tablePattern.Current.GetRowHeaders ().Length, "row headers"); var colHeaders = tablePattern.Current.GetColumnHeaders (); VerifyTableColumnHeaders (colHeaders); } [Test] public void GridItemPatternTest () { var pattern = (GridItemPattern) gridPattern.GetItem (1, 2). GetCurrentPattern (GridItemPattern.Pattern); Assert.AreEqual (2, pattern.Current.Column, "Column"); Assert.AreEqual (1, pattern.Current.Row, "Row"); Assert.AreEqual (1, pattern.Current.ColumnSpan, "ColumnSpan"); Assert.AreEqual (1, pattern.Current.RowSpan, "RowSpan"); /*var tmp = pattern.Current.ContainingGrid.Current; Console.WriteLine ("[{0}], [{1}], [{2}]", tmp.Name, tmp.ControlType.ProgrammaticName, tmp.BoundingRectangle);*/ //todo Currently This test case fails, see #bug 549109 Assert.AreEqual (table1Element, pattern.Current.ContainingGrid, "ContainingGrid"); } [Test] public void TableItemPatternTest () { var pattern = (TableItemPattern) tablePattern.GetItem (1, 2). GetCurrentPattern (TableItemPattern.Pattern); Assert.AreEqual (2, pattern.Current.Column, "Column"); Assert.AreEqual (1, pattern.Current.Row, "Row"); Assert.AreEqual (1, pattern.Current.ColumnSpan, "ColumnSpan"); Assert.AreEqual (1, pattern.Current.RowSpan, "RowSpan"); //todo comment below line to make following code run //Assert.AreEqual (table1Element, pattern.Current.ContainingGrid, // "ContainingGrid"); Assert.AreEqual (0, pattern.Current.GetRowHeaderItems ().Length, "row headers"); VerifyTableColumnHeaders (pattern.Current.GetColumnHeaderItems ()); } [Test] //The "Z_" prefix ensures this test runs last, since it will change the column/row count of the data grid //todo Currently This test case fails, see #bug 549112 public void Z_DynamicTest () { var automationEventsArray = new [] { new {Sender = (object) null, Args = (AutomationPropertyChangedEventArgs) null}}; var automationEvents = automationEventsArray.ToList (); automationEvents.Clear (); AutomationPropertyChangedEventHandler handler = (o, e) => automationEvents.Add (new { Sender = o, Args = e }); At.AddAutomationPropertyChangedEventHandler (table1Element, TreeScope.Element, handler, GridPattern.RowCountProperty, GridPattern.ColumnCountProperty); RunCommand ("add table row"); Assert.AreEqual (1, automationEvents.Count, "event count"); Assert.AreEqual (table1Element, automationEvents [0].Sender, "event sender"); Assert.AreEqual (GridPattern.RowCountProperty, automationEvents [0].Args.Property, "property"); int oldValue = (Atspi? 2: 3); Assert.AreEqual (oldValue, automationEvents [0].Args.OldValue, "old value"); Assert.AreEqual (oldValue + 1, automationEvents [0].Args.NewValue, "new value"); automationEvents.Clear (); RunCommand ("add table column"); Assert.AreEqual (1, automationEvents.Count, "event count"); Assert.AreEqual (table1Element, automationEvents [0].Sender, "event sender"); Assert.AreEqual (GridPattern.ColumnCountProperty, automationEvents [0].Args.Property, "property"); Assert.AreEqual (3, automationEvents [0].Args.OldValue, "old value"); Assert.AreEqual (4, automationEvents [0].Args.NewValue, "new value"); } private void GridPatternTestInternal (GridPattern pattern) { Assert.AreEqual (3, pattern.Current.ColumnCount, "ColumnCount"); //Besides the 2 data rows, there is an additional new data row. Assert.AreEqual (3, pattern.Current.RowCount, "RowCount"); var child = pattern.GetItem (0, 1); Assert.AreEqual ("Alice", child.Current.Name, "Item [1,1].Name"); child = pattern.GetItem (1, 0); Assert.AreEqual (ControlType.CheckBox, child.Current.ControlType, "Item [0,0].ControlType"); var toggle = (TogglePattern ) child.GetCurrentPattern (TogglePattern.Pattern); Assert.AreEqual (ToggleState.On, toggle.Current.ToggleState, "Item [0,0].ToggleState"); } private void VerifyTableColumnHeaders (AutomationElement[] colHeaders) { Assert.AreEqual (3, colHeaders.Length, "col_headers.Length"); Assert.AreEqual ("Gender", colHeaders [0].Current.Name, "colHeaders[0].Name"); Assert.AreEqual ("Name", colHeaders [1].Current.Name, "colHeaders[1].Name"); Assert.AreEqual ("Age", colHeaders [2].Current.Name, "colHeaders[2].Name"); Assert.AreEqual (ControlType.HeaderItem, colHeaders [0].Current.ControlType, "colHeaders[0].ControlType"); } } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/Makefile.am0000644000016200001670000001240311433571545027323 0ustar00hudsonhudson00000000000000 EXTRA_DIST = ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG;TRACE" ASSEMBLY = bin/Debug/UIAutomationClientTests.dll ASSEMBLY_MDB = $(ASSEMBLY).mdb COMPILE_TARGET = library BUILD_DIR = bin/Debug/ SAMPLEFORM_EXE = $(BUILD_DIR)/SampleForm.exe SAMPLEFORM_EXE_SOURCE=../SampleForm/bin/Debug/SampleForm.exe SAMPLEFORM_EXE_MDB_SOURCE=$(SAMPLEFORM_EXE_SOURCE).mdb SAMPLEFORM_EXE_MDB=$(SAMPLEFORM_EXE).mdb if HAS_MONO_2_5 else WINDOWSBASE_DLL = $(BUILD_DIR)/WindowsBase.dll WINDOWSBASE_DLL_SOURCE=$(top_builddir)/bin/WindowsBase.dll WINDOWSBASE_DLL_MDB_SOURCE=$(WINDOWSBASE_DLL_SOURCE).mdb WINDOWSBASE_DLL_MDB=$(WINDOWSBASE_DLL).mdb endif UIAUTOMATIONTYPES_DLL = $(BUILD_DIR)/UIAutomationTypes.dll UIAUTOMATIONTYPES_DLL_SOURCE=$(top_builddir)/bin/UIAutomationTypes.dll UIAUTOMATIONTYPES_DLL_MDB_SOURCE=$(UIAUTOMATIONTYPES_DLL_SOURCE).mdb UIAUTOMATIONTYPES_DLL_MDB=$(UIAUTOMATIONTYPES_DLL).mdb UIAUTOMATIONCLIENT_DLL = $(BUILD_DIR)/UIAutomationClient.dll UIAUTOMATIONCLIENT_DLL_SOURCE=$(top_builddir)/bin/UIAutomationClient.dll UIAUTOMATIONCLIENT_DLL_MDB_SOURCE=$(UIAUTOMATIONCLIENT_DLL_SOURCE).mdb UIAUTOMATIONCLIENT_DLL_MDB=$(UIAUTOMATIONCLIENT_DLL).mdb #Needed by UIAutomationClient.dll UIAUTOMATIONSOURCE_DLL = $(BUILD_DIR)/UIAutomationSource.dll UIAUTOMATIONSOURCE_DLL_SOURCE=$(top_builddir)/bin/UIAutomationSource.dll UIAUTOMATIONSOURCE_DLL_MDB_SOURCE=$(UIAUTOMATIONSOURCE_DLL_SOURCE).mdb UIAUTOMATIONSOURCE_DLL_MDB=$(UIAUTOMATIONSOURCE_DLL).mdb #Needed by UIAutomationClient.dll UIAUTOMATIONPROVIDER_DLL = $(BUILD_DIR)/UIAutomationProvider.dll UIAUTOMATIONPROVIDER_DLL_SOURCE=$(top_builddir)/bin/UIAutomationProvider.dll UIAUTOMATIONPROVIDER_DLL_MDB_SOURCE=$(UIAUTOMATIONPROVIDER_DLL_SOURCE).mdb UIAUTOMATIONPROVIDER_DLL_MDB=$(UIAUTOMATIONPROVIDER_DLL).mdb UIAUTOMATIONBRIDGE_DLL = $(BUILD_DIR)/UIAutomationBridge.dll UIAUTOMATIONBRIDGE_DLL_SOURCE=$(top_builddir)/bin/UIAutomationBridge.dll UIAUTOMATIONBRIDGE_DLL_MDB_SOURCE=$(UIAUTOMATIONBRIDGE_DLL_SOURCE).mdb UIAUTOMATIONBRIDGE_DLL_MDB=$(UIAUTOMATIONBRIDGE_DLL).mdb UIAUTOMATIONCLIENTTESTS_DLL_MDB_SOURCE=bin/Debug/UIAutomationClientTests.dll.mdb UIAUTOMATIONCLIENTTESTS_DLL_MDB=$(BUILD_DIR)/UIAutomationClientTests.dll.mdb AL=al2 SATELLITE_ASSEMBLY_NAME=$(notdir $(basename $(ASSEMBLY))).resources.dll PROGRAMFILES = \ $(SAMPLEFORM_EXE) \ $(SAMPLEFORM_EXE_MDB) \ $(WINDOWSBASE_DLL) \ $(WINDOWSBASE_DLL_MDB) \ $(UIAUTOMATIONTYPES_DLL) \ $(UIAUTOMATIONTYPES_DLL_MDB) \ $(UIAUTOMATIONCLIENT_DLL) \ $(UIAUTOMATIONCLIENT_DLL_MDB) \ $(UIAUTOMATIONSOURCE_DLL) \ $(UIAUTOMATIONSOURCE_DLL_MDB) \ $(UIAUTOMATIONPROVIDER_DLL) \ $(UIAUTOMATIONPROVIDER_DLL_MDB) \ $(UIAUTOMATIONBRIDGE_DLL) \ $(UIAUTOMATIONBRIDGE_DLL_MDB) \ $(UIAUTOMATIONCLIENTTESTS_DLL_MDB) RESGEN=resgen2 all: $(ASSEMBLY) $(PROGRAMFILES) FILES = \ AutomationElementTest.cs \ AutomationEventTest.cs \ AutomationTest.cs \ BaseTest.cs \ CacheRequestTest.cs \ ConditionTest.cs \ CustomControlTest.cs \ DataItemTest.cs \ DynamicElementTest.cs \ ExpandCollapsePatternTest.cs \ FocusTest.cs \ InvokePatternTest.cs \ LocalProviderTest.cs \ MenuTest.cs \ MultipleViewPatternTest.cs \ Properties/AssemblyInfo.cs \ RangeValuePatternTest.cs \ RootElementTest.cs \ ScrollTest.cs \ SelectionPatternTest.cs \ TableHierarchyTest.cs \ TableTest.cs \ TextPatternTest.cs \ TogglePatternTest.cs \ TransformPatternTest.cs \ TreeWalkerTest.cs \ ValuePatternTest.cs \ WindowPatternTest.cs DATA_FILES = RESOURCES = EXTRAS = PROJECT_REFERENCES = \ $(WINDOWSBASE_DLL) \ $(UIAUTOMATIONTYPES_DLL) \ $(UIAUTOMATIONCLIENT_DLL) \ $(UIAUTOMATIONSOURCE_DLL) \ $(UIAUTOMATIONPROVIDER_DLL) \ $(UIAUTOMATIONBRIDGE_DLL) REFERENCES = \ System \ System.Core \ System.Xml.Linq \ System.Data.DataSetExtensions \ System.Data \ System.Xml \ $(WINDOWSBASE_LIBS) \ $(NUNIT_LIBS) DLL_REFERENCES = CLEANFILES = $(PROGRAMFILES) \ bin/Debug/TestResult.xml include $(top_srcdir)/Makefile.include $(eval $(call emit-deploy-target,SAMPLEFORM_EXE)) $(eval $(call emit-deploy-target,SAMPLEFORM_EXE_MDB)) if HAS_MONO_2_5 else $(eval $(call emit-deploy-target,WINDOWSBASE_DLL)) $(eval $(call emit-deploy-target,WINDOWSBASE_DLL_MDB)) endif $(eval $(call emit-deploy-target,UIAUTOMATIONTYPES_DLL)) $(eval $(call emit-deploy-target,UIAUTOMATIONTYPES_DLL_MDB)) $(eval $(call emit-deploy-target,UIAUTOMATIONCLIENT_DLL)) $(eval $(call emit-deploy-target,UIAUTOMATIONCLIENT_DLL_MDB)) $(eval $(call emit-deploy-target,UIAUTOMATIONSOURCE_DLL)) $(eval $(call emit-deploy-target,UIAUTOMATIONSOURCE_DLL_MDB)) $(eval $(call emit-deploy-target,UIAUTOMATIONPROVIDER_DLL)) $(eval $(call emit-deploy-target,UIAUTOMATIONPROVIDER_DLL_MDB)) $(eval $(call emit-deploy-target,UIAUTOMATIONBRIDGE_DLL)) $(eval $(call emit-deploy-target,UIAUTOMATIONBRIDGE_DLL_MDB)) $(eval $(call emit_resgen_targets)) $(build_xamlg_list): %.xaml.g.cs: %.xaml xamlg '$<' $(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list) mkdir -p $(shell dirname $(ASSEMBLY)) $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) @chmod +x swfclienttest.sh mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/RangeValuePatternTest.cs0000644000016200001670000001431611433571545032052 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Linq; using System.Collections.Generic; using System.Diagnostics; using System.Threading; //using System.Windows; using System.Windows.Automation; using At = System.Windows.Automation.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace MonoTests.System.Windows.Automation { [TestFixture] public class RangeValuePatternTest : BaseTest { private AutomationElement hScrollBarElement = null; private AndCondition horizontalScrollCondition = new AndCondition ( new PropertyCondition (AutomationElementIdentifiers.ControlTypeProperty, ControlType.ScrollBar), new PropertyCondition (AutomationElementIdentifiers.OrientationProperty, OrientationType.Horizontal)); protected override void CustomFixtureSetUp () { base.CustomFixtureSetUp (); if (!Atspi) { // to enable textBox3's horizontal scroll bar. RunCommand ("set textBox3 long text"); hScrollBarElement = textbox3Element.FindFirst (TreeScope.Children, horizontalScrollCondition); Assert.IsNotNull (hScrollBarElement); } } #region Test Methods [Test] public void PropertiesTest () { CheckPatternIdentifiers (); } [Test] public void RangeValueTest () { RangeValuePattern pattern = null; if (Atspi) { pattern = (RangeValuePattern) numericUpDown1Element.GetCurrentPattern (RangeValuePatternIdentifiers.Pattern); Assert.AreEqual (0, pattern.Current.Minimum, "RangeValue Minimum"); Assert.AreEqual (100, pattern.Current.Maximum, "RangeValue Maximum"); Assert.AreEqual (10, pattern.Current.SmallChange, "RangeValue SmallChange"); } else { //on Windows Winform, NumericUpDown's RangeValuePattern isn't well implemented //So we choose to test RangeValuePattern on textBox3's Horzontal Scroll Bar pattern = (RangeValuePattern) hScrollBarElement.GetCurrentPattern (RangeValuePattern.Pattern); var min = pattern.Current.Minimum; var max = pattern.Current.Maximum; Assert.AreEqual (0, min, "RangeValue Minimum"); Assert.Greater (max, min, "Maximum > Minimum"); Assert.AreEqual (0, pattern.Current.Value, "RangeValue Value"); Assert.AreEqual (1, pattern.Current.SmallChange, "RangeValue SmallChange"); } pattern.SetValue (50); Assert.AreEqual (50, pattern.Current.Value, "RangeValue Value after set"); try { pattern.SetValue (500); Assert.Fail ("Should throw ArgumentOutOfRangeException"); } catch (ArgumentOutOfRangeException) { } Assert.AreEqual (50, pattern.Current.Value, "RangeValue Value after OOR set"); } [Test] public void Z_EventTest () { AutomationElement element = (Atspi ? numericUpDown1Element : hScrollBarElement); RangeValuePattern pattern; pattern = (RangeValuePattern) element.GetCurrentPattern (RangeValuePatternIdentifiers.Pattern); var automationEventsArray = new [] { new {Sender = (object) null, Args = (AutomationPropertyChangedEventArgs) null}}; var automationEvents = automationEventsArray.ToList (); automationEvents.Clear (); AutomationPropertyChangedEventHandler handler = (o, e) => automationEvents.Add (new { Sender = o, Args = e }); pattern.SetValue (20); At.AddAutomationPropertyChangedEventHandler (element, TreeScope.Element, handler, RangeValuePatternIdentifiers.ValueProperty); pattern.SetValue (25); if (Atspi) { Assert.AreEqual (1, automationEvents.Count, "event count"); Assert.AreEqual (element, automationEvents [0].Sender, "event sender"); Assert.AreEqual (RangeValuePattern.ValueProperty, automationEvents [0].Args.Property, "property"); Assert.AreEqual (20, automationEvents [0].Args.OldValue, "old value"); Assert.AreEqual (25, automationEvents [0].Args.NewValue, "new value"); } else { Assert.AreEqual (0, automationEvents.Count, "event count"); } At.RemoveAutomationPropertyChangedEventHandler (element, handler); automationEvents.Clear (); } [Test] public void Z_NotEnabledTest () { RangeValuePattern pattern = null; if (Atspi) { DisableControls (); pattern = (RangeValuePattern) numericUpDown1Element.GetCurrentPattern (RangeValuePatternIdentifiers.Pattern); try { pattern.SetValue (50); Assert.Fail ("Should throw ElementNotEnabledException"); } catch (ElementNotEnabledException) { } EnableControls (); } else { RunCommand ("disable textBox3"); try { hScrollBarElement = textbox3Element.FindFirst (TreeScope.Children, horizontalScrollCondition); Assert.IsNotNull (hScrollBarElement); pattern = (RangeValuePattern) hScrollBarElement.GetCurrentPattern (RangeValuePattern.Pattern); Assert.Fail ("Should throw InvalidOperationException " + "to indicate that disabled scrollBar dosen't support RangeValuePattern"); } catch (InvalidOperationException) { } } } #endregion } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/TreeWalkerTest.cs0000644000016200001670000003025411433571545030527 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.Windows.Automation; using SWA = System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; namespace MonoTests.System.Windows.Automation { [TestFixture] public class TreeWalkerTest : BaseTest { #region Test Methods [Test] public void ControlViewWalkerTest () { Assert.AreEqual (SWA.Automation.ControlViewCondition, TreeWalker.ControlViewWalker.Condition, "Condition"); } [Test] public void ContentViewWalkerTest () { Assert.AreEqual (SWA.Automation.ContentViewCondition, TreeWalker.ContentViewWalker.Condition, "Condition"); } [Test] public void RawViewWalkerTest () { Assert.AreEqual (SWA.Automation.RawViewCondition, TreeWalker.RawViewWalker.Condition, "Condition"); } [Test] public void ConditionTest () { AssertRaises ( () => new TreeWalker (null), "passing null to TreeWalker constructor"); Condition buttonCondition = new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Button); TreeWalker buttonWalker = new TreeWalker (buttonCondition); Assert.AreEqual (buttonCondition, buttonWalker.Condition, "Condition"); } [Test] public void GetFirstChildTest () { Condition buttonCondition = new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Button); TreeWalker buttonWalker = new TreeWalker (buttonCondition); AssertRaises ( () => buttonWalker.GetFirstChild (null), "passing null to TreeWalker.GetFirstChild"); VerifyGetFirstChild (buttonWalker, groupBox1Element, button7Element); } [Test] public void GetLastChildTest () { Condition buttonCondition = new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Button); TreeWalker buttonWalker = new TreeWalker (buttonCondition); AssertRaises ( () => buttonWalker.GetLastChild (null), "passing null to TreeWalker.GetLastChild"); VerifyGetLastChild (buttonWalker, groupBox1Element, button2Element); } [Test] public void GetNextSiblingTest () { Condition buttonCondition = new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Button); TreeWalker buttonWalker = new TreeWalker (buttonCondition); AssertRaises ( () => buttonWalker.GetNextSibling (null), "passing null to TreeWalker.GetNextSibling"); VerifyGetNextSibling (buttonWalker, button7Element, button6Element); VerifyGetNextSibling (buttonWalker, button6Element, button5Element); VerifyGetNextSibling (buttonWalker, button5Element, button4Element); VerifyGetNextSibling (buttonWalker, button4Element, button3Element); VerifyGetNextSibling (buttonWalker, button3Element, button2Element); // Check that there are still more siblings (just without groupBox1Element as parent) VerifyGetNextSibling (buttonWalker, button2Element, button1Element); // TODO: Test how for buttonWalker, GetNextSibling // eventually gets all buttons on the entire // desktop? // Elements whose parents (not the desktop) are also in // the tree run out of siblings as expected. Condition groupCondition = new AndCondition ( new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Group), new PropertyCondition (AEIds.ProcessIdProperty, p.Id)); TreeWalker groupWalker = new TreeWalker (groupCondition); VerifyGetNextSibling (groupWalker, groupBox3Element, groupBox2Element); VerifyGetNextSibling (groupWalker, groupBox2Element, null); // When only other matching thing in tree is child (TODO: Hangs) //VerifyGetNextSibling (groupWalker, groupBox1Element, groupBox2Element); } [Test] public void GetPreviousSiblingTest () { Condition buttonCondition = new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Button); TreeWalker buttonWalker = new TreeWalker (buttonCondition); AssertRaises ( () => buttonWalker.GetPreviousSibling (null), "passing null to TreeWalker.GetPreviousSibling"); //VerifyGetPreviousSibling (buttonWalker, button7Element, null); // TODO: scrollbar button VerifyGetPreviousSibling (buttonWalker, button6Element, button7Element); VerifyGetPreviousSibling (buttonWalker, button5Element, button6Element); VerifyGetPreviousSibling (buttonWalker, button4Element, button5Element); VerifyGetPreviousSibling (buttonWalker, button3Element, button4Element); VerifyGetPreviousSibling (buttonWalker, button2Element, button3Element); // TODO: Test how for buttonWalker, GetPreviousSibling // eventually gets all buttons on the entire // desktop? // Elements whose parents (not the desktop) are also in // the tree run out of siblings as expected. Condition groupCondition = new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Group); TreeWalker groupWalker = new TreeWalker (groupCondition); VerifyGetPreviousSibling (groupWalker, groupBox3Element, null); VerifyGetPreviousSibling (groupWalker, groupBox2Element, groupBox3Element); } [Test] public void GetParentTest () { Condition buttonCondition = new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Button); TreeWalker buttonWalker = new TreeWalker (buttonCondition); AssertRaises ( () => buttonWalker.GetParent (null), "passing null to TreeWalker.GetParent"); VerifyGetParent (buttonWalker, button7Element, null); Condition groupCondition = new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Group); TreeWalker groupWalker = new TreeWalker (groupCondition); // Test where applicable ancestor is parent VerifyGetParent (groupWalker, checkBox1Element, groupBox2Element); VerifyGetParent (groupWalker, groupBox3Element, groupBox1Element); VerifyGetParent (groupWalker, groupBox1Element, null); VerifyGetParent (TreeWalker.RawViewWalker, testFormElement, AutomationElement.RootElement); // Test where applicable ancestor is not direct parent Condition windowCondition = new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Window); TreeWalker windowWalker = new TreeWalker (windowCondition); VerifyGetParent (windowWalker, groupBox3Element, testFormElement); } [Test] public void NormalizeTest () { Condition groupCondition = new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Group); TreeWalker groupWalker = new TreeWalker (groupCondition); AssertRaises ( () => groupWalker.Normalize (null), "passing null to TreeWalker.Normalize"); Assert.AreEqual (groupBox1Element, groupWalker.Normalize (groupBox1Element), "If element matches, return it"); Assert.AreEqual (groupBox1Element, groupWalker.Normalize (button2Element), "When element does not match, return first matching ancestor"); // This is according to MSDN: // http://msdn.microsoft.com/en-us/library/system.windows.automation.treewalker.normalize.aspx //Assert.AreEqual (AutomationElement.RootElement, // groupWalker.Normalize (button1Element), // "When neither elment nor ancestors match, return RootElement"); // This is how Microsoft actually implemented it: Assert.IsNull (groupWalker.Normalize (button1Element), "When neither element nor ancestors match, return null"); Condition noNameCondition = new PropertyCondition (AEIds.NameProperty, string.Empty); TreeWalker noNameWalker = new TreeWalker (noNameCondition); Assert.AreEqual (AutomationElement.RootElement, noNameWalker.Normalize (button1Element), "When RootElement matches, it should be returned"); Assert.AreEqual (AutomationElement.RootElement, TreeWalker.RawViewWalker.Normalize (AutomationElement.RootElement), "When RootElement matches, it should be returned"); Assert.AreEqual (null, new TreeWalker (Condition.FalseCondition).Normalize (AutomationElement.RootElement), "When RootElement does not match, null should be returned"); } #endregion #region Private Helper Methods private void VerifyGetFirstChild (TreeWalker tree, AutomationElement rootElement, AutomationElement expectedElement) { AutomationElement actualChild = tree.GetFirstChild (rootElement); Assert.AreEqual (expectedElement, actualChild, String.Format ("GetFirstChild with root element named {0}: Expected element named {1}, got element named {2}", GetName (rootElement), GetName (expectedElement), GetName (actualChild))); if (expectedElement != null) Assert.AreNotSame (expectedElement, actualChild, "GetFirstChild returns a new instance"); } private void VerifyGetLastChild (TreeWalker tree, AutomationElement rootElement, AutomationElement expectedElement) { AutomationElement actualChild = tree.GetLastChild (rootElement); Assert.AreEqual (expectedElement, actualChild, String.Format ("GetLastChild with root element named {0}: Expected element named {1}, got element named {2}", GetName (rootElement), GetName (expectedElement), GetName (actualChild))); if (expectedElement != null) Assert.AreNotSame (expectedElement, actualChild, "GetLastChild returns a new instance"); } private void VerifyGetNextSibling (TreeWalker tree, AutomationElement rootElement, AutomationElement expectedElement) { AutomationElement actualChild = tree.GetNextSibling (rootElement); Assert.AreEqual (expectedElement, actualChild, String.Format ("GetNextSibling with root element named {0}: Expected element named {1}, got element named {2}", GetName (rootElement), GetName (expectedElement), GetName (actualChild))); if (expectedElement != null) Assert.AreNotSame (expectedElement, actualChild, "GetNextSibling returns a new instance"); } private void VerifyGetPreviousSibling (TreeWalker tree, AutomationElement rootElement, AutomationElement expectedElement) { AutomationElement actualChild = tree.GetPreviousSibling (rootElement); Assert.AreEqual (expectedElement, actualChild, String.Format ("GetPreviousSibling with root element named {0}: Expected element named {1}, got element named {2}", GetName (rootElement), GetName (expectedElement), GetName (actualChild))); if (expectedElement != null) Assert.AreNotSame (expectedElement, actualChild, "GetPreviousSibling returns a new instance"); } private void VerifyGetParent (TreeWalker tree, AutomationElement rootElement, AutomationElement expectedElement) { AutomationElement actualChild = tree.GetParent (rootElement); Assert.AreEqual (expectedElement, actualChild, String.Format ("GetParent with root element named {0}: Expected element named {1}, got element named {2}", GetName (rootElement), GetName (expectedElement), GetName (actualChild))); if (expectedElement != null) Assert.AreNotSame (expectedElement, actualChild, "GetParent returns a new instance"); } private string GetName (AutomationElement element) { if (element == null) return "(null)"; return element.Current.Name; } #endregion } }mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/TransformPatternTest.cs0000644000016200001670000002177711433571545032005 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Threading; using System.Windows.Automation; using SWA = System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; namespace MonoTests.System.Windows.Automation { [TestFixture] public class TransformPatternTest : BaseTest { #region Test Methods [Test] public void PropertiesTest () { Assert.AreEqual (TransformPatternIdentifiers.Pattern.Id, TransformPattern.Pattern.Id, "Pattern.Id"); Assert.AreEqual (TransformPatternIdentifiers.Pattern.ProgrammaticName, TransformPattern.Pattern.ProgrammaticName, "Pattern.ProgrammaticName"); Assert.AreEqual (TransformPatternIdentifiers.CanMoveProperty.Id, TransformPattern.CanMoveProperty.Id, "CanMoveProperty.Id"); Assert.AreEqual (TransformPatternIdentifiers.CanMoveProperty.ProgrammaticName, TransformPattern.CanMoveProperty.ProgrammaticName, "CanMoveProperty.ProgrammaticName"); Assert.AreEqual (TransformPatternIdentifiers.CanResizeProperty.Id, TransformPattern.CanResizeProperty.Id, "CanResizeProperty.Id"); Assert.AreEqual (TransformPatternIdentifiers.CanResizeProperty.ProgrammaticName, TransformPattern.CanResizeProperty.ProgrammaticName, "CanResizeProperty.ProgrammaticName"); Assert.AreEqual (TransformPatternIdentifiers.CanRotateProperty.Id, TransformPattern.CanRotateProperty.Id, "CanRotateProperty.Id"); Assert.AreEqual (TransformPatternIdentifiers.CanRotateProperty.ProgrammaticName, TransformPattern.CanRotateProperty.ProgrammaticName, "CanRotateProperty.ProgrammaticName"); } [Test] public void MoveTest () { var automationEventsArray = new [] { new {Sender = (object) null, Args = (AutomationPropertyChangedEventArgs) null}}; var automationEvents = automationEventsArray.ToList (); automationEvents.Clear (); SWA.Automation.AddAutomationPropertyChangedEventHandler (testFormElement, TreeScope.Element, (o, e) => automationEvents.Add (new { Sender = o, Args = e }), TransformPattern.CanMoveProperty, TransformPattern.CanResizeProperty); var transform = (TransformPattern) testFormElement.GetCurrentPattern (TransformPattern.Pattern); Assert.IsTrue (transform.Current.CanMove, "Expected CanMove to be true"); RunCommand ("MoveTo.Origin"); Thread.Sleep (500); var rect = testFormElement.Current.BoundingRectangle; double minX = rect.X; double minY = rect.Y; transform.Move (0, 0); Thread.Sleep (500); rect = testFormElement.Current.BoundingRectangle; Assert.AreEqual (minX, rect.X, "X after moving to 0,0"); Assert.AreEqual (minY, rect.Y, "Y after moving to 0,0"); transform.Move (50, 100); Thread.Sleep (500); rect = testFormElement.Current.BoundingRectangle; Assert.AreEqual (50, rect.X, "X after moving to 50,100"); Assert.AreEqual (100, rect.Y, "Y after moving to 50,100"); // Set CanMove to false RunCommand ("Toggle.Transform.CanMove"); Thread.Sleep (500); Assert.IsFalse (transform.Current.CanMove, "CanMove should be false after changing WindowState"); AssertRaises ( () => transform.Move (0, 0), "calling Move with CanMove == false"); // Set CanMove back to true RunCommand ("Toggle.Transform.CanMove"); Thread.Sleep (500); rect = testFormElement.Current.BoundingRectangle; Assert.AreEqual (50, rect.X, "X still at 50,100"); Assert.AreEqual (100, rect.Y, "Y still at 50,100"); Assert.IsTrue (transform.Current.CanMove, "CanMove should be true after changing WindowState back"); transform.Move (0, 0); Thread.Sleep (500); rect = testFormElement.Current.BoundingRectangle; Assert.AreEqual (minX, rect.X, "X after moving to 0,0"); Assert.AreEqual (minY, rect.Y, "Y after moving to 0,0"); // No events raised Assert.AreEqual (0, automationEvents.Count, "No events should have been raised"); } [Test] public void MoveToNegativeCoordinatesTest () { var transform = (TransformPattern) testFormElement.GetCurrentPattern (TransformPattern.Pattern); // TODO: Is this case fixable on Linux? transform.Move (-5, -1); Thread.Sleep (500); var rect = testFormElement.Current.BoundingRectangle; Assert.AreEqual (-5, rect.X, "X after moving to -5,-1"); Assert.AreEqual (-1, rect.Y, "Y after moving to -5,-1"); } [Test] public void ResizeTest () { var transform = (TransformPattern) testFormElement.GetCurrentPattern (TransformPattern.Pattern); // Determine minimime resize available transform.Resize (0, 0); Thread.Sleep (200); var rect = testFormElement.Current.BoundingRectangle; var minRect = rect; transform.Resize (500, 1000); Thread.Sleep (200); rect = testFormElement.Current.BoundingRectangle; Assert.AreEqual (500, rect.Width); Assert.AreEqual (1000, rect.Height); transform.Resize (600, 800); Thread.Sleep (200); rect = testFormElement.Current.BoundingRectangle; Assert.AreEqual (600, rect.Width); Assert.AreEqual (800, rect.Height); transform.Resize (-5, -1); Thread.Sleep (200); rect = testFormElement.Current.BoundingRectangle; Assert.AreEqual (minRect.Width, rect.Width); Assert.AreEqual (minRect.Height, rect.Height); } [Test] // NOTE: The "Z_" prefix on the name forces this test to run last, // as changing FormBorderStyle breaks other tests on Linux public void Z_CanResizeTest () { var automationEventsArray = new [] { new {Sender = (object) null, Args = (AutomationPropertyChangedEventArgs) null}}; var automationEvents = automationEventsArray.ToList (); automationEvents.Clear (); SWA.Automation.AddAutomationPropertyChangedEventHandler (testFormElement, TreeScope.Element, (o, e) => automationEvents.Add (new { Sender = o, Args = e }), TransformPattern.CanMoveProperty, TransformPattern.CanResizeProperty); var transform = (TransformPattern) testFormElement.GetCurrentPattern (TransformPattern.Pattern); Assert.IsTrue (transform.Current.CanResize, "Expected CanResize to be true"); transform.Resize (600, 800); Thread.Sleep (200); var rect = testFormElement.Current.BoundingRectangle; Assert.AreEqual (600, rect.Width); Assert.AreEqual (800, rect.Height); // Set CanResize to false RunCommand ("Toggle.Transform.CanResize"); Thread.Sleep (500); Assert.IsFalse (transform.Current.CanResize, "CanResize should be false after changing FormBorderStyle"); AssertRaises ( () => transform.Resize (500, 1000), "calling Resize with CanResize == false"); // Set CanResize back to true RunCommand ("Toggle.Transform.CanResize"); Thread.Sleep (500); rect = testFormElement.Current.BoundingRectangle; Assert.AreEqual (600, rect.Width); Assert.AreEqual (800, rect.Height); Assert.IsTrue (transform.Current.CanResize, "CanResize should be true after changing FormBorderStyle back"); // NOTE: Winforms bug: inability to resize or // move after FormBorderStyle is set back transform.Resize (500, 1000); Thread.Sleep (500); rect = testFormElement.Current.BoundingRectangle; Assert.AreEqual (500, rect.Width); Assert.AreEqual (1000, rect.Height); // No events raised Assert.AreEqual (0, automationEvents.Count, "No events should have been raised"); } [Test] public void RotateTest () { var transform = (TransformPattern) testFormElement.GetCurrentPattern (TransformPattern.Pattern); Assert.IsFalse (transform.Current.CanRotate, "CanRotate always false for winforms and gtk+"); AssertRaises ( () => transform.Rotate (5), "CanRotate is false"); AssertRaises ( () => transform.Rotate (0), "rotating even 0 degrees"); } #endregion } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/TableHierarchyTest.cs0000644000016200001670000002017311433571545031347 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.Windows; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; namespace MonoTests.System.Windows.Automation { [TestFixture] public class TableHierarchyTest : BaseTest { #region Test Methods [Test] public void TableHierarchy () { AutomationElement headerElement; headerElement = table1Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Header)); Assert.IsNotNull (headerElement, "Header"); AutomationElement headerItemElement; headerItemElement = headerElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.HeaderItem)); Assert.IsNotNull (headerItemElement, "headerItem"); Assert.AreEqual ("Gender", headerItemElement.Current.Name, "Header 1 name"); Assert.AreEqual (headerElement, TreeWalker.RawViewWalker.GetParent (headerItemElement), "Header should be parent of its HeaderItem"); Assert.IsNull (TreeWalker.RawViewWalker.GetFirstChild (headerItemElement), "headerItem should not have children"); headerItemElement = TreeWalker.RawViewWalker.GetNextSibling (headerItemElement); Assert.IsNotNull (headerItemElement, "Header #2"); Assert.AreEqual ("Name", headerItemElement.Current.Name, "Header 2 name"); headerItemElement = TreeWalker.RawViewWalker.GetNextSibling (headerItemElement); Assert.IsNotNull (headerItemElement, "Header #3"); Assert.AreEqual ("Age", headerItemElement.Current.Name, "Header 3 name"); Assert.IsNull (TreeWalker.RawViewWalker.GetNextSibling (headerItemElement), "Should not have more than three header items"); AutomationElement dataItemElement = TreeWalker.RawViewWalker.GetNextSibling (headerElement); Assert.IsNotNull (dataItemElement, "DataItem"); Assert.AreEqual ("ControlType.DataItem", dataItemElement.Current.ControlType.ProgrammaticName, "DataItem ControlType"); Assert.AreEqual (table1Element, TreeWalker.RawViewWalker.GetParent (dataItemElement), "DataItem parent should be Table"); AutomationElement textElement = TreeWalker.RawViewWalker.GetFirstChild (dataItemElement); Assert.IsNotNull (textElement, "text"); string expected = (Atspi? "Edit" : "CheckBox"); Assert.AreEqual ("ControlType." + expected, textElement.Current.ControlType.ProgrammaticName, expected + "ControlType"); Assert.AreEqual (dataItemElement, TreeWalker.RawViewWalker.GetParent (textElement), "Text parent should be DataItem"); Assert.IsNull (TreeWalker.RawViewWalker.GetFirstChild (textElement), "TextElement FirstChild"); Assert.IsNull (TreeWalker.RawViewWalker.GetPreviousSibling (textElement), "TextElement PreviousSibling"); Assert.AreEqual ("False", textElement.Current.Name, "TextElement Name"); //VerifyPatterns (textElement, //ValuePatternIdentifiers.Pattern); textElement = TreeWalker.RawViewWalker.GetNextSibling (textElement); Assert.IsNotNull (textElement, "item2"); Assert.AreEqual ("Alice", textElement.Current.Name, "TextElement Name"); textElement = TreeWalker.RawViewWalker.GetNextSibling (textElement); Assert.IsNotNull (textElement, "item2"); Assert.AreEqual ("24", textElement.Current.Name, "TextElement Name"); Assert.IsNull (TreeWalker.RawViewWalker.GetNextSibling (textElement), "next after item2"); } [Test] public void TreeViewHierarchyTest () { AutomationElement treeItemElement; treeItemElement = treeView1Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.TreeItem)); Assert.IsNotNull (treeItemElement, "Should have a TreeItem"); AutomationElement treeItem2Element; treeItem2Element = TreeWalker.RawViewWalker.GetNextSibling (treeItemElement); ExpandCollapsePattern pattern = (ExpandCollapsePattern) treeItem2Element.GetCurrentPattern (ExpandCollapsePatternIdentifiers.Pattern); pattern.Expand (); pattern = (ExpandCollapsePattern) treeItemElement.GetCurrentPattern (ExpandCollapsePatternIdentifiers.Pattern); TreeViewHierarchyTest (false); pattern.Expand (); Thread.Sleep(500); TreeViewHierarchyTest (true); pattern.Collapse (); Thread.Sleep(500); TreeViewHierarchyTest (false); } public void TreeViewHierarchyTest (bool item1Expanded) { AutomationElement treeItemElement; treeItemElement = treeView1Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.TreeItem)); Assert.IsNotNull (treeItemElement, "Should have a TreeItem"); Assert.AreEqual ("item 1", treeItemElement.Current.Name, "item 1"); Assert.IsNull (TreeWalker.RawViewWalker.GetPreviousSibling (treeItemElement), "Item1 previous"); AutomationElement treeItemSubElement; treeItemSubElement = treeItemElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.TreeItem)); if (item1Expanded) { Assert.IsNotNull (treeItemSubElement, "TreeItemSub"); Assert.AreEqual ("item 1a", treeItemSubElement.Current.Name, "item 1a"); Assert.IsNull (TreeWalker.RawViewWalker.GetPreviousSibling (treeItemSubElement), "Item1a previous"); Assert.IsNull (TreeWalker.RawViewWalker.GetNextSibling (treeItemSubElement), "Item1a next"); Assert.IsNull (TreeWalker.RawViewWalker.GetFirstChild (treeItemSubElement), "Item1a child"); } else { AutomationElement child = TreeWalker.RawViewWalker.GetFirstChild (treeItemElement); if (child != null) Assert.IsTrue (child.Current.IsOffscreen, "Child should be of-screen when not expanded"); } treeItemElement = TreeWalker.RawViewWalker.GetNextSibling (treeItemElement); Assert.AreEqual ("item 2", treeItemElement.Current.Name, "item 2"); treeItemSubElement = treeItemElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.TreeItem)); Assert.IsNotNull (treeItemSubElement, "SubElement should not be null"); Assert.AreEqual ("item 2a", treeItemSubElement.Current.Name, "item 2a"); Assert.IsNull (TreeWalker.RawViewWalker.GetPreviousSibling (treeItemSubElement), "Item2a previous"); treeItemSubElement = TreeWalker.RawViewWalker.GetNextSibling (treeItemSubElement); Assert.AreEqual ("item 2b", treeItemSubElement.Current.Name, "item 2b"); Assert.IsNull (TreeWalker.RawViewWalker.GetNextSibling (treeItemSubElement), "Item2b next"); Assert.IsNull (TreeWalker.RawViewWalker.GetNextSibling (treeItemElement), "Item2 next"); treeItemElement = TreeWalker.RawViewWalker.GetPreviousSibling (treeItemElement); Assert.AreEqual ("item 1", treeItemElement.Current.Name, "item 2 previous"); } [Test] public void TreeViewPatternsTest () { VerifyPatterns (treeView1Element, SelectionPatternIdentifiers.Pattern); } #endregion } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/RootElementTest.cs0000644000016200001670000001455611433571545030726 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Matt Guo // using System; using System.Linq; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using MonoTests.System.Windows.Automation; using At = System.Windows.Automation.Automation; namespace MonoTests.System.Windows.Automation { [TestFixture] public class RootElementTest : BaseTest { Condition findTestForm = null; List potentiallyRunningProcesses = new List (); protected override void CustomFixtureSetUp () { findTestForm = new AndCondition (new PropertyCondition ( AEIds.NameProperty, "TestForm1"), new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Window)); var firstChild =AutomationElement.RootElement.FindFirst ( TreeScope.Children, findTestForm); Assert.IsNull (firstChild); base.CustomFixtureSetUp (); } [TearDown] public void TearDown () { foreach (var p in potentiallyRunningProcesses) if (!p.HasExited) p.Kill (); potentiallyRunningProcesses.Clear (); } [Test] public void NewlyAddedChildTest () { var firstChild =AutomationElement.RootElement.FindFirst ( TreeScope.Children, findTestForm); Assert.IsNotNull (firstChild); } // Note: Don't play other applications while the following test cases are running, // Since this test could be affected by any change of any child elements // of AutomationElement.RootElement [Test] public void PropertyEventTest () { int eventCount = 0; AutomationProperty changedProperty = null; object newValue = null; object sender = null; AutomationPropertyChangedEventHandler handler = (o, e) => { eventCount++; changedProperty = e.Property; newValue = e.NewValue; sender = o; }; At.AddAutomationPropertyChangedEventHandler( AutomationElement.RootElement, TreeScope.Children, handler, AutomationElement.NameProperty); RunCommand ("change title:title 1"); Assert.AreEqual (1, eventCount, "count of AutomationPropertyChangedEvent"); Assert.AreEqual (AutomationElement.NameProperty, changedProperty); Assert.AreEqual ("title 1", newValue); Assert.AreEqual (testFormElement, sender); At.RemoveAutomationPropertyChangedEventHandler ( AutomationElement.RootElement, handler); RunCommand ("change title:title 2"); Assert.AreEqual (1, eventCount); } [Test] public void StructureEventTest () //this test also tested WindowPattern.WindowOpenedEvent (i.e. AddAutomationEventHandler) { int automationEventCount = 0; int structureEventCount = 0; AutomationEvent eventId = null; AutomationEventHandler automationEventHandler = (o, e) => { automationEventCount++; eventId = e.EventId; }; At.AddAutomationEventHandler( WindowPattern.WindowOpenedEvent, AutomationElement.RootElement, TreeScope.Children, automationEventHandler); StructureChangedEventHandler structureEventHandler = (o, e) => { if (e.StructureChangeType == StructureChangeType.ChildAdded) structureEventCount++; }; At.AddStructureChangedEventHandler ( AutomationElement.RootElement, TreeScope.Children, structureEventHandler); int pid = OpenForm (); Thread.Sleep (3000); Assert.AreEqual (1, structureEventCount, "[OpenForm] count of StructureChangedEvent"); Assert.AreEqual (1, automationEventCount, "[OpenForm] count of WindowOpenedEvent"); Assert.AreEqual (WindowPattern.WindowOpenedEvent, eventId); automationEventCount = 0; structureEventCount = 0; At.RemoveAllEventHandlers (); int pid2 = OpenForm (); Thread.Sleep (3000); Assert.AreEqual (0, structureEventCount); Assert.AreEqual (0, automationEventCount); structureEventHandler = (o, e) => { structureEventCount++; }; At.AddStructureChangedEventHandler ( AutomationElement.RootElement, TreeScope.Children, structureEventHandler); CloseForm (pid); CloseForm (pid2); Thread.Sleep (3000); // Note: I expect 2 events here (whose StructureChangeType are both ChildRemoved) // But as tested on Win 7, we'll actually get no event, // And with our current implementation, we'll get 4 events (i.e. besides the 2 expected events, we // get other 2 ChildRemoved events, whose sender is the "testFormElement") Assert.AreEqual (0, structureEventCount, "[CloseForm] count of StructureChangedEvent"); } private int OpenForm () { Process p; if (Atspi) p = StartApplication ("GtkForm.exe", String.Empty); else p = StartApplication ("SampleForm.exe", String.Empty); potentiallyRunningProcesses.Add (p); return p.Id; } private void CloseForm (int pid) { var findFormByPid = new AndCondition ( new PropertyCondition ( AEIds.NameProperty, "TestForm1"), new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Window), new PropertyCondition (AEIds.ProcessIdProperty, pid)); var firstChild = AutomationElement.RootElement.FindFirst ( TreeScope.Children, findFormByPid); if (firstChild == null) return; var windowPattern = (WindowPattern) firstChild.GetCurrentPattern ( WindowPattern.Pattern); if (windowPattern == null) return; windowPattern.Close (); } } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/TextPatternTest.cs0000644000016200001670000010716111433571545030746 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Matt Guo // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.Windows.Automation; using System.Windows.Automation.Text; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using At = System.Windows.Automation.Automation; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace MonoTests.System.Windows.Automation { [TestFixture] public class TextPatternTest : BaseTest { private ValuePattern valuePattern = null; private const string TEST_MESSAGE = "One morning, when Gregor Samsa woke from troubled dreams, "+ "he found himself transformed in his bed into a horrible vermin.He lay on his armour-like back, "+ "and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches "+ "into stiff sections. The bedding was hardly able to cover it and seemed ready to slide off any moment. "+ "His many legs, pitifully thin compared with the size of the rest of him, waved about helplessly as he "+ "looked. \"What's happened to me? \" he thought. It wasn't a dream. His room, a proper human room although "+ "a little too small, lay peacefully between its four familiar walls. A collection of textile samples lay "+ "spread out on the table - Samsa was a travelling salesman - and above it there hung a picture that he had "+ "recently cut out of an illustrated magazine and housed in a nice, gilded frame. It showed a lady "+ "fitted out with a fur hat and fur boa who sat upright, raising a heavy fur muff that covered the whole "+ "of her lower arm towards the viewer. Gregor then turned to look out the window at the dull weather. Drops "; protected override void CustomFixtureSetUp () { base.CustomFixtureSetUp (); valuePattern = (ValuePattern) textbox3Element.GetCurrentPattern (ValuePattern.Pattern); } #region Tests copied from TextRangeProviderTest@UIAumationWinformsTests [Test] public void FindText () { valuePattern.SetValue ("gomez thing\r\nmorticia\twednesday ing"); Thread.Sleep (500); TextPatternRange range1, range2; TextPattern textPattern = (TextPattern) textbox3Element.GetCurrentPattern (TextPattern.Pattern); int moved_units; TextPatternRange range = textPattern.DocumentRange.Clone (); range1 = range.FindText ("mort", false, false); Assert.AreEqual ("mort", range1.GetText (-1)); range2 = range1.FindText ("mort", false, false); Assert.AreEqual ("mort", range2.GetText (-1)); range2 = range1.FindText ("gomez", false, false); Assert.IsNull (range2); range2 = range1.FindText ("thing", true, false); Assert.IsNull (range2); range1 = range.FindText ("\t", false, false); Assert.AreEqual ("\t", range1.GetText (-1)); range1 = range.FindText ("dayz", false, false); Assert.IsNull (range1); range1 = range.FindText ("HING\r", false, true); Assert.AreEqual ("hing\r", range1.GetText (-1)); range1 = range.FindText ("HING\r", false, false); Assert.IsNull (range1); range1 = range.FindText ("ing", true, false); Assert.AreEqual ("ing", range1.GetText (-1)); moved_units = range1.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Character, -2); Assert.AreEqual (-2, moved_units); Assert.AreEqual ("y ing", range1.GetText (-1)); } [Test] public void MoveEndpointByCharacter () { valuePattern.SetValue ("The quick\tbrown (fox] \"jumps\"\rover:\nthe lazy, dog."); Thread.Sleep (500); TextPattern textPattern = (TextPattern) textbox3Element.GetCurrentPattern (TextPattern.Pattern); TextPatternRange range = textPattern.DocumentRange.Clone (); int moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Character, 0); Assert.AreEqual (0, moved_units); Assert.AreEqual ("The quick\tbrown (fox] \"jumps\"\rover:\nthe lazy, dog.", range.GetText (-1)); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Character, 1); Assert.AreEqual (1, moved_units); Assert.AreEqual ("he quick\tbrown (fox] \"jumps\"\rover:\nthe lazy, dog.", range.GetText (-1)); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Character, 8); Assert.AreEqual (8, moved_units); Assert.AreEqual ("\tbrown (fox] \"jumps\"\rover:\nthe lazy, dog.", range.GetText (-1)); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Character, 1000); Assert.AreEqual (42, moved_units); Assert.AreEqual (String.Empty, range.GetText (-1)); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Character, -1000); Assert.AreEqual (-52, moved_units); Assert.AreEqual ("The quick\tbrown (fox] \"jumps\"\rover:\nthe lazy, dog.", range.GetText (-1)); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Character, 5); Assert.AreEqual (5, moved_units); Assert.AreEqual ("uick\tbrown (fox] \"jumps\"\rover:\nthe lazy, dog.", range.GetText (-1)); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Character, -3); Assert.AreEqual (-3, moved_units); Assert.AreEqual ("e quick\tbrown (fox] \"jumps\"\rover:\nthe lazy, dog.", range.GetText (-1)); } [Test] public void CharacterNormalize () { string text = "gomez\rmorticia\npugsley\r\nwednesday\r\rfester\n\nlurch\r\n\r\nthing"; valuePattern.SetValue (text); Thread.Sleep (500); TextPattern textPattern = (TextPattern) textbox3Element.GetCurrentPattern (TextPattern.Pattern); TextPatternRange range = textPattern.DocumentRange.Clone (); // NOTE: These all pass successfully on Windows Vista, so // think twice before you change anything. range.ExpandToEnclosingUnit (TextUnit.Character); Assert.AreEqual (text, range.GetText (-1)); int moved_units; moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Character, 2); Assert.AreEqual (2, moved_units); Assert.AreEqual ("mez\rmorticia\npugsley\r\nwednesday\r\rfester\n\nlurch\r\n\r\nthing", range.GetText (-1)); range.ExpandToEnclosingUnit (TextUnit.Character); Assert.AreEqual ("mez\rmorticia\npugsley\r\nwednesday\r\rfester\n\nlurch\r\n\r\nthing", range.GetText (-1)); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.End, TextUnit.Character, -2); Assert.AreEqual (-2, moved_units); Assert.AreEqual ("mez\rmorticia\npugsley\r\nwednesday\r\rfester\n\nlurch\r\n\r\nthi", range.GetText (-1)); range.ExpandToEnclosingUnit (TextUnit.Character); Assert.AreEqual ("mez\rmorticia\npugsley\r\nwednesday\r\rfester\n\nlurch\r\n\r\nthi", range.GetText (-1)); } [Test] public void MoveEndpointByWord () { string text = "The quick\tbrown (fox] \"jumps\"\rover:\nthe lazy, dog."; valuePattern.SetValue (text); Thread.Sleep (500); TextPattern textPattern = (TextPattern) textbox3Element.GetCurrentPattern (TextPattern.Pattern); TextPatternRange range = textPattern.DocumentRange.Clone (); // NOTE: These all pass successfully on Windows Vista, so // think twice before you change anything. int moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Word, 0); Assert.AreEqual (0, moved_units, "Moved units are incorrect in 0 word move"); Assert.AreEqual ("The quick\tbrown (fox] \"jumps\"\rover:\nthe lazy, dog.", range.GetText (-1), "Text is incorrect in 0 word move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Word, 1); Assert.AreEqual (1, moved_units, "Moved units are incorrect in 1 word move"); Assert.AreEqual (" quick\tbrown (fox] \"jumps\"\rover:\nthe lazy, dog.", range.GetText (-1), "Text is incorrect in first +1 word move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Word, -3); Assert.AreEqual (-1, moved_units, "Moved units are incorrect in -3 word move"); Assert.AreEqual ("The quick\tbrown (fox] \"jumps\"\rover:\nthe lazy, dog.", range.GetText (-1), "Text is incorrect in -3 word move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Word, 2); Assert.AreEqual (2, moved_units, "Moved units are incorrect in 2 word move"); Assert.AreEqual ("quick\tbrown (fox] \"jumps\"\rover:\nthe lazy, dog.", range.GetText (-1), "Text is incorrect in +2 word move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Word, 1); Assert.AreEqual (1, moved_units, "Moved units are incorrect in 1 word move"); Assert.AreEqual ("\tbrown (fox] \"jumps\"\rover:\nthe lazy, dog.", range.GetText (-1), "Text is incorrect in second +1 word move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Word, 1); Assert.AreEqual (1, moved_units, "Moved units are incorrect in 1 word move"); Assert.AreEqual ("brown (fox] \"jumps\"\rover:\nthe lazy, dog.", range.GetText (-1), "Text is incorrect in third +1 word move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Word, 3); Assert.AreEqual (3, moved_units, "Moved units are incorrect in 3 word move"); Assert.AreEqual ("fox] \"jumps\"\rover:\nthe lazy, dog.", range.GetText (-1), "Text is incorrect in +3 word move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Word, 4); Assert.AreEqual (4, moved_units, "Moved units are incorrect in 4 word move"); Assert.AreEqual ("jumps\"\rover:\nthe lazy, dog.", range.GetText (-1), "Text is incorrect in +4 word move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Word, -2); Assert.AreEqual (-2, moved_units, "Moved units are incorrect in -2 word move"); Assert.AreEqual (" \"jumps\"\rover:\nthe lazy, dog.", range.GetText (-1), "Text is incorrect in -2 word move"); } [Test] public void WordNormalize () { string text = "gomez\rmorticia\npugsley\r\nwednesday\r\rfester\n\nlurch\r\n\r\nthing"; valuePattern.SetValue (text); Thread.Sleep (500); TextPattern textPattern = (TextPattern) textbox3Element.GetCurrentPattern (TextPattern.Pattern); TextPatternRange range = textPattern.DocumentRange.Clone (); // NOTE: These all pass successfully on Windows Vista, so // think twice before you change anything. int moved_units; moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Character, 2); Assert.AreEqual (2, moved_units); Assert.AreEqual ("mez\rmorticia\npugsley\r\nwednesday\r\rfester\n\nlurch\r\n\r\nthing", range.GetText (-1)); range.ExpandToEnclosingUnit (TextUnit.Word); Assert.AreEqual ("gomez\rmorticia\npugsley\r\nwednesday\r\rfester\n\nlurch\r\n\r\nthing", range.GetText (-1), "Text incorrect when expanding after first +2 character move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.End, TextUnit.Character, -2); Assert.AreEqual (-2, moved_units); Assert.AreEqual ("gomez\rmorticia\npugsley\r\nwednesday\r\rfester\n\nlurch\r\n\r\nthi", range.GetText (-1)); range.ExpandToEnclosingUnit (TextUnit.Word); Assert.AreEqual ("gomez\rmorticia\npugsley\r\nwednesday\r\rfester\n\nlurch\r\n\r\nthing", range.GetText (-1), "Text incorrect when expanding after -2 character move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Character, 5); Assert.AreEqual (5, moved_units); Assert.AreEqual ("\rmorticia\npugsley\r\nwednesday\r\rfester\n\nlurch\r\n\r\nthing", range.GetText (-1)); range.ExpandToEnclosingUnit (TextUnit.Word); Assert.AreEqual ("\rmorticia\npugsley\r\nwednesday\r\rfester\n\nlurch\r\n\r\nthing", range.GetText (-1), "Text incorrect when expanding after +5 character move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Character, 2); Assert.AreEqual (2, moved_units); Assert.AreEqual ("orticia\npugsley\r\nwednesday\r\rfester\n\nlurch\r\n\r\nthing", range.GetText (-1)); range.ExpandToEnclosingUnit (TextUnit.Word); Assert.AreEqual ("morticia\npugsley\r\nwednesday\r\rfester\n\nlurch\r\n\r\nthing", range.GetText (-1), "Text incorrect when expanding after second +2 character move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.End, TextUnit.Character, -10); Assert.AreEqual (-10, moved_units); Assert.AreEqual ("morticia\npugsley\r\nwednesday\r\rfester\n\nlurc", range.GetText (-1)); range.ExpandToEnclosingUnit (TextUnit.Word); Assert.AreEqual ("morticia\npugsley\r\nwednesday\r\rfester\n\nlurch", range.GetText (-1), "Text incorrect when expanding after -10 character move"); } [Test] public void MoveEndpointByParagraphSimpleHard () { MoveEndpointByParagraphSimple ("\r\n"); } [Test] public void MoveEndpointByParagraphSimpleLimp () { MoveEndpointByParagraphSimple ("\r"); } [Test] public void MoveEndpointByParagraphSimpleRich () { MoveEndpointByParagraphSimple ("\n"); } private void MoveEndpointByParagraphSimple (string newline) { //In case you were wondering, the topic is: things that are awesome string text = String.Format("bear{0}{0}shark{0}laser{0}{0}volcano", newline); valuePattern.SetValue (text); Thread.Sleep (500); TextPattern textPattern = (TextPattern) textbox3Element.GetCurrentPattern (TextPattern.Pattern); TextPatternRange range = textPattern.DocumentRange.Clone (); // NOTE: These all pass successfully on Windows Vista, so // think twice before you change anything. int moved_units; moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Paragraph, 0); Assert.AreEqual (0, moved_units, "Moved units are incorrect in 0 paragraph move"); Assert.AreEqual (String.Format ("bear{0}{0}shark{0}laser{0}{0}volcano", newline), range.GetText (-1), "Text is incorrect in 0 paragraph move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Paragraph, -1); Assert.AreEqual (0, moved_units, "Moved units are incorrect in -1 paragraph move"); Assert.AreEqual (String.Format ("bear{0}{0}shark{0}laser{0}{0}volcano", newline), range.GetText (-1), "Text is incorrect in -1 paragraph move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Paragraph, 1); Assert.AreEqual (1, moved_units, "Moved units are incorrect in first +1 paragraph move"); Assert.AreEqual (String.Format ("{0}shark{0}laser{0}{0}volcano", newline), range.GetText (-1), "Text is incorrect in first +1 paragraph move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Paragraph, 1); Assert.AreEqual (1, moved_units, "Moved units are incorrect in second +1 paragraph move"); Assert.AreEqual (String.Format ("shark{0}laser{0}{0}volcano", newline), range.GetText (-1), "Moved units are incorrect in second +1 paragraph move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Paragraph, 1); Assert.AreEqual (1, moved_units, "Moved units are incorrect in third +1 paragraph move"); Assert.AreEqual (String.Format ("laser{0}{0}volcano", newline), range.GetText (-1), "Text is incorrect in third +1 paragraph move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Paragraph, -1); Assert.AreEqual (-1, moved_units, "Moved units are incorrect in first -1 paragraph move"); Assert.AreEqual (String.Format ("shark{0}laser{0}{0}volcano", newline), range.GetText (-1), "Text is incorrect in first -1 paragraph move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Paragraph, -1); Assert.AreEqual (-1, moved_units, "Moved units are incorrect in second -1 paragraph move"); Assert.AreEqual (String.Format ("{0}shark{0}laser{0}{0}volcano", newline), range.GetText (-1), "Text is incorrect in second -1 paragraph move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Paragraph, -1); Assert.AreEqual (-1, moved_units, "Moved units are incorrect in third -1 paragraph move"); Assert.AreEqual (String.Format ("bear{0}{0}shark{0}laser{0}{0}volcano", newline), range.GetText (-1), "Text is incorrect in third -1 paragraph move"); } [Test] public void MoveEndpointByParagraphIntensiveHard () { MoveEndpointByParagraphIntensive ("\r\n"); } [Test] public void MoveEndpointByParagraphIntensiveLimp () { MoveEndpointByParagraphIntensive ("\r"); } [Test] public void MoveEndpointByParagraphIntensiveRich () { MoveEndpointByParagraphIntensive ("\n"); } private void MoveEndpointByParagraphIntensive (string newline) { string text = String.Format ("apples{0}{0}pears{0}peaches{0}{0}bananas", newline); valuePattern.SetValue (text); Thread.Sleep (500); TextPattern textPattern = (TextPattern) textbox3Element.GetCurrentPattern (TextPattern.Pattern); TextPatternRange range = textPattern.DocumentRange.Clone (); // NOTE: These all pass successfully on Windows Vista, so // think twice before you change anything. int moved_units; moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Character, 1); Assert.AreEqual (1, moved_units, "Moved units are incorrect in 0 paragraph move"); Assert.AreEqual (String.Format ("pples{0}{0}pears{0}peaches{0}{0}bananas", newline), range.GetText (-1), "Text is incorrect in 0 paragraph move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Paragraph, -1); Assert.AreEqual (-1, moved_units, "Moved units are incorrect in -1 paragraph move"); Assert.AreEqual (String.Format ("apples{0}{0}pears{0}peaches{0}{0}bananas", newline), range.GetText (-1), "Text is incorrect in -1 paragraph move"); range = textPattern.DocumentRange.Clone (); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Character, 1); Assert.AreEqual (1, moved_units, "Moved units are incorrect in +1 character move"); Assert.AreEqual (String.Format ("pples{0}{0}pears{0}peaches{0}{0}bananas", newline), range.GetText (-1), "Text is incorrect in +1 character move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Paragraph, 2); Assert.AreEqual (2, moved_units, "Moved units are incorrect in +2 paragraph move"); Assert.AreEqual (String.Format ("pears{0}peaches{0}{0}bananas", newline), range.GetText (-1), "Text is incorrect in +2 paragraph move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Paragraph, -1); Assert.AreEqual (-1, moved_units, "Moved units are incorrect in first -1 paragraph move"); Assert.AreEqual (String.Format ("{0}pears{0}peaches{0}{0}bananas", newline), range.GetText (-1), "Text is incorrect in -1 paragraph move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Paragraph, -1); Assert.AreEqual (-1, moved_units, "Moved units are incorrect in first -1 paragraph move"); Assert.AreEqual (String.Format ("apples{0}{0}pears{0}peaches{0}{0}bananas", newline), range.GetText (-1), "Text is incorrect in -1 paragraph move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Paragraph, 4); Assert.AreEqual (4, moved_units, "Moved units are incorrect in +4 paragraph move"); Assert.AreEqual (String.Format ("{0}bananas", newline), range.GetText (-1), "Text is incorrect in +4 paragraph move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Paragraph, 10); Assert.AreEqual (2, moved_units, "Moved units are incorrect in +10 paragraph move"); Assert.AreEqual (String.Empty, range.GetText (-1), "Text is incorrect in +10 paragraph move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Paragraph, -10); Assert.AreEqual (-6, moved_units, "Moved units are incorrect in -10 paragraph move"); Assert.AreEqual (String.Format ("apples{0}{0}pears{0}peaches{0}{0}bananas", newline), range.GetText (-1), "Text is incorrect in -10 paragraph move"); // Going bananas yet? } [Test] public void ParagraphNormalize () { string text = "gomez thing\r\nmorticia\twednesday"; valuePattern.SetValue (text); Thread.Sleep (500); TextPattern textPattern = (TextPattern) textbox3Element.GetCurrentPattern (TextPattern.Pattern); TextPatternRange range = textPattern.DocumentRange.Clone (); // NOTE: These all pass successfully on Windows Vista, so // think twice before you change anything. // Case #1 int moved_units; // Looks like gtk collapses \r\n into one char moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.End, TextUnit.Character, -100); // Seems that SWF treats \n as two chars or something similar int expected = (Atspi? -31: -32); Assert.AreEqual (expected, moved_units, "Case 1: Moved units are incorrect in -100 character move"); Assert.AreEqual (String.Empty, range.GetText (-1), "Case 1: Text is incorrect in -100 character move"); range.ExpandToEnclosingUnit (TextUnit.Paragraph); Assert.AreEqual ("gomez thing\r\n", range.GetText (-1), "Case 1: Text is incorrect in ExpandToEnclosingUnit"); // Case #2 range = textPattern.DocumentRange.Clone (); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.End, TextUnit.Character, -23); Assert.AreEqual (-23, moved_units, "Case 2: Moved units are incorrect in -23 character move"); Assert.AreEqual ("gomez th", range.GetText (-1), "Case 2: Text is incorrect in -23 character move"); range.ExpandToEnclosingUnit (TextUnit.Paragraph); Assert.AreEqual ("gomez thing\r\n", range.GetText (-1), "Case 2: Text is incorrect in ExpandToEnclosingUnit"); // Case #3 range = textPattern.DocumentRange.Clone (); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.End, TextUnit.Character, -18); Assert.AreEqual (-18, moved_units, "Case 3: Moved units are incorrect in -18 character move"); Assert.AreEqual ("gomez thing\r\n", range.GetText (-1), "Case 3: Text is incorrect in -18 character move"); range.ExpandToEnclosingUnit (TextUnit.Paragraph); Assert.AreEqual ("gomez thing\r\n", range.GetText (-1), "Case 3: Text is incorrect in ExpandToEnclosingUnit"); // Case #4 range = textPattern.DocumentRange.Clone (); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.End, TextUnit.Character, -14); Assert.AreEqual (-14, moved_units, "Case 4: Moved units are incorrect in -14 character move"); Assert.AreEqual ("gomez thing\r\nmort", range.GetText (-1), "Case 4: Text is incorrect in -14 character move"); // XXX: Behaves differently than TextUnit.Line range.ExpandToEnclosingUnit (TextUnit.Paragraph); Assert.AreEqual ("gomez thing\r\nmorticia\twednesday", range.GetText (-1), "Case 4: Text is incorrect in ExpandToEnclosingUnit"); // Case #5 range = textPattern.DocumentRange.Clone (); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Character, 2); Assert.AreEqual (2, moved_units, "Case 5: Moved units are incorrect in +2 character move"); Assert.AreEqual ("mez thing\r\nmorticia\twednesday", range.GetText (-1), "Case 5: Text is incorrect in +2 character move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.End, TextUnit.Character, -100); expected = (Atspi? -31: -32); Assert.AreEqual (expected, moved_units, "Case 1: Moved units are incorrect in -100 character move"); Assert.AreEqual (String.Empty, range.GetText (-1), "Case 5: Text is incorrect in -100 character move"); range.ExpandToEnclosingUnit (TextUnit.Paragraph); Assert.AreEqual ("gomez thing\r\n", range.GetText (-1), "Case 5: Text is incorrect in ExpandToEnclosingUnit"); // Case #6 range = textPattern.DocumentRange.Clone (); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.End, TextUnit.Character, -18); Assert.AreEqual (-18, moved_units, "Case 6: Moved units are incorrect in -18 character move"); Assert.AreEqual ("gomez thing\r\n", range.GetText (-1), "Case 6: Text is incorrect in -18 character move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Character, 2); Assert.AreEqual (2, moved_units, "Case 6: Moved units are incorrect in +2 character move"); Assert.AreEqual ("mez thing\r\n", range.GetText (-1), "Case 6: Text is incorrect in 2 character move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.End, TextUnit.Character, -4); Assert.AreEqual (-4, moved_units, "Case 6: Moved units are incorrect in -4 character move"); Assert.AreEqual ("mez thi", range.GetText (-1), "Case 6: Text is incorrect in -4 character move"); range.ExpandToEnclosingUnit (TextUnit.Paragraph); Assert.AreEqual ("gomez thing\r\n", range.GetText (-1), "Case 6: Text is incorrect in ExpandToEnclosingUnit"); // Case #7 range = textPattern.DocumentRange.Clone (); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.End, TextUnit.Character, -18); Assert.AreEqual (-18, moved_units, "Case 7: Moved units are incorrect in -18 character move"); Assert.AreEqual ("gomez thing\r\n", range.GetText (-1), "Case 7: Text is incorrect in -18 character move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Character, 4); Assert.AreEqual (4, moved_units, "Case 7: Moved units are incorrect in +4 character move"); Assert.AreEqual ("z thing\r\n", range.GetText (-1), "Case 7: Text is incorrect in +4 character move"); range.ExpandToEnclosingUnit (TextUnit.Paragraph); Assert.AreEqual ("gomez thing\r\n", range.GetText (-1), "Case 7: Text is incorrect in ExpandToEnclosingUnit"); // Case #8 range = textPattern.DocumentRange.Clone (); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Character, 2); Assert.AreEqual (2, moved_units, "Case 8: Moved units are incorrect in +2 character move"); Assert.AreEqual ("mez thing\r\nmorticia\twednesday", range.GetText (-1), "Case 8: Text is incorrect in +2 character move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.End, TextUnit.Character, -16); Assert.AreEqual (-16, moved_units, "Case 8: Moved units are incorrect in -16 character move"); Assert.AreEqual ("mez thing\r\nmo", range.GetText (-1), "Case 8: Text is incorrect in -16 character move"); // XXX: Behaves differently than TextUnit.Line range.ExpandToEnclosingUnit (TextUnit.Paragraph); Assert.AreEqual ("gomez thing\r\nmorticia\twednesday", range.GetText (-1), "Case 8: Text is incorrect in ExpandToEnclosingUnit"); } [Test] public void MoveEndpointByPage () { string text = String.Format ("apples\r\n\npears\r\r\npeaches\nbananas"); valuePattern.SetValue (text); Thread.Sleep (500); TextPattern textPattern = (TextPattern) textbox3Element.GetCurrentPattern (TextPattern.Pattern); TextPatternRange range = textPattern.DocumentRange.Clone (); // NOTE: These all pass successfully on Windows Vista, so // think twice before you change anything. int moved_units; moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Page, 0); Assert.AreEqual (0, moved_units, "Moved units are incorrect in 0 page move"); Assert.AreEqual ("apples\r\n\npears\r\r\npeaches\nbananas", range.GetText (-1), "Text is incorrect in 0 page move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Character, 1); Assert.AreEqual (1, moved_units, "Moved units are incorrect in +1 character move"); Assert.AreEqual ("pples\r\n\npears\r\r\npeaches\nbananas", range.GetText (-1), "Text is incorrect in first +1 character move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Page, -1); Assert.AreEqual (-1, moved_units, "Moved units are incorrect in first -1 page move"); Assert.AreEqual ("apples\r\n\npears\r\r\npeaches\nbananas", range.GetText (-1), "Text is incorrect in first -1 page move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Page, 1); Assert.AreEqual (1, moved_units, "Moved units are incorrect in first +1 page move"); Assert.AreEqual (String.Empty, range.GetText (-1), "Text is incorrect in first +1 page move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Character, -1); Assert.AreEqual (-1, moved_units, "Moved units are incorrect in -1 character move"); Assert.AreEqual ("s", range.GetText (-1), "Text is incorrect in -1 character move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.End, TextUnit.Page, -1); Assert.AreEqual (-1, moved_units, "Moved units are incorrect in second -1 page move"); Assert.AreEqual (String.Empty, range.GetText (-1), "Text is incorrect in second -1 page move"); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.End, TextUnit.Page, 1); Assert.AreEqual (1, moved_units, "Moved units are incorrect in second +1 page move"); Assert.AreEqual ("apples\r\n\npears\r\r\npeaches\nbananas", range.GetText (-1), "Text is incorrect in second +1 page move"); } // For Edit controls, this is the same as PageNormalize [Test] public void DocumentNormalize () { string text = "gomez thing\r\nmorticia\twednesday"; valuePattern.SetValue (text); Thread.Sleep (500); TextPattern textPattern = (TextPattern) textbox3Element.GetCurrentPattern (TextPattern.Pattern); TextPatternRange range = textPattern.DocumentRange.Clone (); int moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.End, TextUnit.Character, -18); Assert.AreEqual (-18, moved_units); Assert.AreEqual ("gomez thing\r\n", range.GetText (-1)); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Character, 2); Assert.AreEqual (2, moved_units); Assert.AreEqual ("mez thing\r\n", range.GetText (-1)); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.End, TextUnit.Character, -4); Assert.AreEqual (-4, moved_units); Assert.AreEqual ("mez thi", range.GetText (-1)); range.ExpandToEnclosingUnit (TextUnit.Document); Assert.AreEqual ("gomez thing\r\nmorticia\twednesday", range.GetText (-1)); } [Test] [Ignore] //todo WE HAVE A PROBLEM HERE! //The last line: "range.ScrollIntoView (false);" will take very long time to execute. //So currently to run other tests, I set "Ignore" to this test case - Matt Guo public void ScrollIntoView () { valuePattern.SetValue (TEST_MESSAGE); Thread.Sleep (500); TextPattern textPattern = (TextPattern) textbox3Element.GetCurrentPattern (TextPattern.Pattern); TextPatternRange range = textPattern.DocumentRange.Clone (); int moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Page, 1); Assert.AreEqual (1, moved_units); Assert.AreEqual (String.Empty, range.GetText (-1)); moved_units = range.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Word, -3); Assert.AreEqual (-3, moved_units); Assert.AreEqual (" Drops ", range.GetText (-1)); // We can't actually test this visually, but we can // verify that it doesn't crash range.ScrollIntoView (false); } [Test] public void MoveEndpointByRange() { string text = "apples\r\n\npears\r\r\npeaches\nbananas"; valuePattern.SetValue (text); Thread.Sleep (500); TextPattern textPattern = (TextPattern) textbox3Element.GetCurrentPattern (TextPattern.Pattern); TextPatternRange range1, range2; range1 = textPattern.DocumentRange.Clone (); int moved_units = range1.MoveEndpointByUnit (TextPatternRangeEndpoint.Start, TextUnit.Character, 2); Assert.AreEqual (2, moved_units); Assert.AreEqual ("ples\r\n\npears\r\r\npeaches\nbananas", range1.GetText (-1)); range2 = textPattern.DocumentRange.Clone (); Assert.AreEqual ("apples\r\n\npears\r\r\npeaches\nbananas", range2.GetText (-1)); range2.MoveEndpointByRange (TextPatternRangeEndpoint.Start, range2, TextPatternRangeEndpoint.Start); Assert.AreEqual ("apples\r\n\npears\r\r\npeaches\nbananas", range2.GetText (-1)); range2.MoveEndpointByRange (TextPatternRangeEndpoint.Start, range1, TextPatternRangeEndpoint.Start); Assert.AreEqual ("ples\r\n\npears\r\r\npeaches\nbananas", range2.GetText (-1), "Might be this one"); range2 = textPattern.DocumentRange.Clone (); range1.MoveEndpointByUnit (TextPatternRangeEndpoint.End, TextUnit.Word, -1); Assert.AreEqual ("ples\r\n\npears\r\r\npeaches\n", range1.GetText (-1), "Or this one?"); range2.MoveEndpointByRange (TextPatternRangeEndpoint.End, range1, TextPatternRangeEndpoint.End); Assert.AreEqual ("apples\r\n\npears\r\r\npeaches\n", range2.GetText (-1)); range2 = textPattern.DocumentRange.Clone (); range2.MoveEndpointByRange (TextPatternRangeEndpoint.Start, range1, TextPatternRangeEndpoint.End); Assert.AreEqual ("bananas", range2.GetText (-1)); } #endregion [Test] //todo this test will fail since we won't even fire the TextChangedEvent at //provider/bridge side public void TextChangedEvent () { int eventCount = 0; AutomationEventHandler handler = (o, e) => eventCount++; At.AddAutomationEventHandler (TextPattern.TextChangedEvent, textbox3Element, TreeScope.Element, handler); RunCommand ("set textbox3 text"); Thread.Sleep (500); // Ideally we should only receive one event, but at-spi // generates a text-changed::delete followed by a // text-changed::insert. int expectedEventCount = (Atspi? 2: 1); Assert.AreEqual (expectedEventCount, eventCount, "TextChangedEvent fired"); At.RemoveAutomationEventHandler (TextPattern.TextChangedEvent, textbox3Element, handler); } [Test] public void TextSelectionChangedEvent () { int eventCount = 0; AutomationEventHandler handler = (o, e) => eventCount++; At.AddAutomationEventHandler (TextPattern.TextSelectionChangedEvent, textbox3Element, TreeScope.Element, handler); RunCommand ("select textbox3"); Assert.AreEqual (1, eventCount, "TextSelectionChangedEvent fired"); At.RemoveAutomationEventHandler (TextPattern.TextSelectionChangedEvent, textbox3Element, handler); } } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/DynamicElementTest.cs0000644000016200001670000000731411433571545031361 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2010 Novell, Inc. (http://www.novell.com) // // Authors: // Matt Guo // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using SW = System.Windows; using At = System.Windows.Automation.Automation; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace MonoTests.System.Windows.Automation { [TestFixture] public class DynamicElementTest : BaseTest { [Test] public void AddRemoveElementTest () { InvokePattern addAction = (InvokePattern) btnAddTextboxElement.GetCurrentPattern (InvokePattern.Pattern); InvokePattern removeAction = (InvokePattern) btnRemoveTextboxElement.GetCurrentPattern (InvokePattern.Pattern); addAction.Invoke (); Thread.Sleep (1000); var newEditElement = panel1Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Edit)); var vp = (ValuePattern) newEditElement.GetCurrentPattern (ValuePattern.Pattern); Action getControlTypeAction = () => Console.WriteLine (newEditElement.Current.BoundingRectangle); Action appendDotAction = () => vp.SetValue (vp.Current.Value + "."); AssertWontRaise (getControlTypeAction, "get control type"); AssertWontRaise (getControlTypeAction, "append '.'"); removeAction.Invoke (); Thread.Sleep (1000); AssertRaises (getControlTypeAction, "get control type"); AssertRaises (getControlTypeAction, "append '.'"); } [Test] public void Z_CloseAppTest () { if (p != null) { p.Kill (); p = null; } AssertRaises ( () => Console.WriteLine (label1Element.Current.Name), "get testFormElement.Name"); AssertRaises ( () => Console.WriteLine (testFormElement.Current.Name), "get testFormElement.Name"); } [Test] public void DynamicPatternTest () { var tp = (TransformPattern) testFormElement.GetCurrentPattern (TransformPattern.Pattern); Action moveAction = () => tp.Move (25, 25); AssertWontRaise (moveAction, "move form"); //Disable the TransformPattern RunCommand ("toggle form border"); AssertRaises ( () => testFormElement.GetCurrentPattern (TransformPattern.Pattern), "get TransformPattern on a borderless form"); AssertRaises (moveAction, "move form"); //Enable the TransformPattern again RunCommand ("toggle form border"); } } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/MenuTest.cs0000644000016200001670000000610311433571545027362 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.Windows; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; namespace MonoTests.System.Windows.Automation { [TestFixture] public class MenuTest : BaseTest { #region Test Methods [Test] public void HierarchyTest () { Assert.AreEqual ("ControlType.MenuBar", horizontalMenuStripElement.Current.ControlType.ProgrammaticName, "MenuBar control type"); VerifyPatterns (horizontalMenuStripElement); AutomationElement file = TreeWalker.RawViewWalker.GetFirstChild (horizontalMenuStripElement); Assert.IsNotNull (file, "File"); Assert.AreEqual ("File", file.Current.Name, "File name"); Assert.AreEqual ("ControlType.MenuItem", file.Current.ControlType.ProgrammaticName, "File control type"); AutomationElement newElement = TreeWalker.RawViewWalker.GetFirstChild (file); Assert.IsNotNull (newElement, "New"); Assert.AreEqual ("New", newElement.Current.Name, "New name"); Assert.AreEqual ("ControlType.MenuItem", newElement.Current.ControlType.ProgrammaticName, "New control type"); AutomationElement edit = TreeWalker.RawViewWalker.GetNextSibling (file); Assert.IsNotNull (edit, "Edit"); Assert.AreEqual ("Edit", edit.Current.Name, "Edit name"); Assert.AreEqual ("ControlType.MenuItem", edit.Current.ControlType.ProgrammaticName, "Edit control type"); AutomationElement undo = TreeWalker.RawViewWalker.GetFirstChild (edit); AutomationElement separator = TreeWalker.RawViewWalker.GetNextSibling (undo); Assert.IsNotNull (separator, "Separator"); Assert.AreEqual ("ControlType.Separator", separator.Current.ControlType.ProgrammaticName, "Separator control type"); VerifyPatterns (separator); } #endregion } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/AutomationEventTest.cs0000644000016200001670000003214211433571545031602 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Matt Guo // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using At = System.Windows.Automation.Automation; using SW = System.Windows; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace MonoTests.System.Windows.Automation { [TestFixture] public class AutomationEventTest : BaseTest { [Test] public void ArgumentExceptionTest () { Action action = () => { At.AddAutomationEventHandler (InvokePattern.InvokedEvent, null, TreeScope.Element, (o, e) => {}); }; AssertRaises(action, "Pass null as element to AddAutomationEventHandler"); action = () => { At.AddAutomationPropertyChangedEventHandler ( null, TreeScope.Element, (o, e) => {}, AEIds.NameProperty); }; AssertRaises(action, "Pass null as element to AddAutomationPropertyChangedEventHandler"); action = () => { At.AddStructureChangedEventHandler ( null, TreeScope.Element, (o, e) => {}); }; AssertRaises(action, "Pass null as element to AddStructureChangedEventHandler"); action = () => { At.AddAutomationEventHandler (InvokePattern.InvokedEvent, button1Element, TreeScope.Element, null); }; AssertRaises(action, "Pass null as handler to AddAutomationEventHandler"); action = () => { At.AddAutomationPropertyChangedEventHandler ( button1Element, TreeScope.Element, null, AEIds.NameProperty); }; AssertRaises(action, "Pass null as handler to AddAutomationPropertyChangedEventHandler"); action = () => { At.AddStructureChangedEventHandler ( button1Element, TreeScope.Element, null); }; AssertRaises(action, "Pass null as handler to AddStructureChangedEventHandler"); action = () => { At.AddAutomationFocusChangedEventHandler (null); }; AssertRaises(action, "Pass null as handler to AddAutomationFocusChangedEventHandler"); action = () => { At.RemoveAutomationEventHandler (InvokePattern.InvokedEvent, null, (o, e) => {}); }; AssertRaises(action, "Pass null as element to RemoveAutomationEventHandler"); action = () => { At.RemoveAutomationPropertyChangedEventHandler ( null, (o, e) => {}); }; AssertRaises(action, "Pass null as element to RemoveAutomationPropertyChangedEventHandler"); action = () => { At.RemoveStructureChangedEventHandler ( null, (o, e) => {}); }; AssertRaises(action, "Pass null as element to RemoveStructureChangedEventHandler"); action = () => { At.RemoveAutomationEventHandler (InvokePattern.InvokedEvent, button1Element, null); }; AssertRaises(action, "Pass null as handler to RemoveAutomationEventHandler"); action = () => { At.RemoveAutomationPropertyChangedEventHandler ( button1Element, null); }; AssertRaises(action, "Pass null as handler to RemoveAutomationPropertyChangedEventHandler"); action = () => { At.RemoveStructureChangedEventHandler ( button1Element, null); }; AssertRaises(action, "Pass null as handler to RemoveStructureChangedEventHandler"); action = () => { At.RemoveAutomationFocusChangedEventHandler (null); }; AssertRaises(action, "Pass null as handler to RemoveAutomationFocusChangedEventHandler"); //Assert removing a non-existent handler won't fire any exception At.RemoveAutomationEventHandler (InvokePattern.InvokedEvent, button1Element, (o, e) => { Console.Write("nop"); } ); At.RemoveAutomationPropertyChangedEventHandler ( button1Element, (o, e) => { Console.Write("nop"); } ); At.RemoveStructureChangedEventHandler ( button1Element, (o, e) => { Console.Write("nop"); } ); At.RemoveAutomationFocusChangedEventHandler ( (o, e) => { Console.Write("nop"); } ); } [Test] public void StructureEventTest () { List elementEventSenders = new List (); List elementEventChangeTypes = new List (); List childrenEventSenders = new List (); List childrenEventChangeTypes = new List (); StructureChangedEventHandler elementHandler = delegate (object sender, StructureChangedEventArgs args) { elementEventSenders.Add (sender as AutomationElement); elementEventChangeTypes.Add (args.StructureChangeType); }; At.AddStructureChangedEventHandler(panel1Element, TreeScope.Element, elementHandler); StructureChangedEventHandler childrenHandler = delegate (object sender, StructureChangedEventArgs args) { childrenEventSenders.Add (sender as AutomationElement); childrenEventChangeTypes.Add (args.StructureChangeType); }; At.AddStructureChangedEventHandler(panel1Element, TreeScope.Children, childrenHandler); InvokePattern addAction = (InvokePattern) btnAddTextboxElement.GetCurrentPattern (InvokePattern.Pattern); InvokePattern removeAction = (InvokePattern) btnRemoveTextboxElement.GetCurrentPattern (InvokePattern.Pattern); addAction.Invoke (); Thread.Sleep (1000); Assert.AreEqual (1, elementEventSenders.Count, "Check event count"); Assert.AreEqual (panel1Element, elementEventSenders [0], "Check ChildrenInvalidated event sender"); Assert.AreEqual (StructureChangeType.ChildrenInvalidated, elementEventChangeTypes [0], "Check ChildrenInvalidated event type"); Assert.AreEqual (1, childrenEventSenders.Count, "Check event count"); Assert.AreEqual (StructureChangeType.ChildAdded, childrenEventChangeTypes [0], "Check ChildAdded event type"); removeAction.Invoke (); Thread.Sleep (1000); Assert.AreEqual (3, elementEventSenders.Count, "Check event count"); Assert.AreEqual (panel1Element, elementEventSenders [1], "Check event sender"); Assert.AreEqual (panel1Element, elementEventSenders [2], "Check event sender"); Assert.IsTrue ((elementEventChangeTypes [1] == StructureChangeType.ChildRemoved && elementEventChangeTypes [2] == StructureChangeType.ChildrenInvalidated) || (elementEventChangeTypes [1] == StructureChangeType.ChildrenInvalidated && elementEventChangeTypes [2] == StructureChangeType.ChildRemoved), "Check event type"); addAction.Invoke (); Thread.Sleep (1000); Assert.AreEqual (4, elementEventSenders.Count, "Check event count"); Assert.AreEqual (panel1Element, elementEventSenders [3], "Check ChildrenInvalidated event sender"); Assert.AreEqual (StructureChangeType.ChildrenInvalidated, elementEventChangeTypes [3], "Check ChildrenInvalidated event type"); Assert.AreEqual (2, childrenEventSenders.Count, "Check event count"); Assert.AreEqual (StructureChangeType.ChildAdded, childrenEventChangeTypes [1], "Check ChildAdded event type"); At.RemoveStructureChangedEventHandler (panel1Element, elementHandler); At.RemoveStructureChangedEventHandler (panel1Element, childrenHandler); addAction.Invoke (); Thread.Sleep (1000); Assert.AreEqual (4, elementEventSenders.Count, "Element event count didn't change"); Assert.AreEqual (2, childrenEventSenders.Count, "Children event count didn't change"); } /* * From MSDN: "Not all property changes raise events; that is entirely up to the implementation of the UI Automation provider for the element. For example, the standard proxy providers for list boxes do not raise an event when the SelectionProperty changes. In this case, the application instead must listen for an ElementSelectedEvent." * */ [Test] public void SelectionPropertyChangedEventTest () { int propertyEventCount = 0; int selectionEventCount = 0; AutomationPropertyChangedEventHandler propertyHandler = (o, e) => { propertyEventCount++; }; AutomationEventHandler selectionEventHandler = (o, e) => { selectionEventCount++; }; var childElement = treeView1Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.TreeItem)); At.AddAutomationPropertyChangedEventHandler (treeView1Element, TreeScope.Subtree, propertyHandler, SelectionPattern.SelectionProperty); At.AddAutomationEventHandler (SelectionItemPattern.ElementSelectedEvent, childElement, TreeScope.Element, selectionEventHandler); var pattern = (SelectionPattern) treeView1Element.GetCurrentPattern (SelectionPatternIdentifiers.Pattern); Assert.IsNotNull (pattern, "selectionPattern should not be null"); var current = pattern.Current; AutomationElement [] selection = current.GetSelection (); Assert.AreEqual (0, selection.Length, "Selection length"); var selectionItemPattern = (SelectionItemPattern) childElement.GetCurrentPattern (SelectionItemPatternIdentifiers.Pattern); selectionItemPattern.Select (); Thread.Sleep (1000); selection = current.GetSelection (); Assert.AreEqual (1, selection.Length, "Selection length"); Assert.AreEqual (0, propertyEventCount, "# of SelectionProperty changed event"); Assert.AreEqual (1, selectionEventCount, "# of selection event"); } [Test] public void BoundingRectanglePropertyChangedEventTest () { int eventCount = 0; object newValue = null; AutomationPropertyChangedEventHandler propertyHandler = (o, e) => { eventCount++; newValue = e.NewValue; }; At.AddAutomationPropertyChangedEventHandler (testFormElement, TreeScope.Element, propertyHandler, AEIds.BoundingRectangleProperty); RunCommand ("change form size 800x600"); Thread.Sleep (1000); Assert.AreEqual (1, eventCount); SW.Rect rect = (SW.Rect) newValue; Assert.AreEqual (800, rect.Width, "rect.Width"); Assert.AreEqual (600, rect.Height, "rect.Height"); } [Test] public void ControlTypePropertyChangedEventTest () { int eventCount = 0; AutomationPropertyChangedEventHandler propertyHandler = (o, e) => { eventCount++; }; // textBox3's ControlType will change from "Document" to "Edit" if we set Multiline = false // but on Windows we don't have corresponding property changed event. At.AddAutomationPropertyChangedEventHandler (textbox3Element, TreeScope.Element, propertyHandler, AEIds.ControlTypeProperty); var ct = textbox3Element.Current.ControlType; Assert.AreEqual (ControlType.Document, ct, ct.ProgrammaticName); RunCommand ("textBox3 singleline"); Thread.Sleep (500); ct = textbox3Element.Current.ControlType; Assert.AreEqual (ControlType.Document, ct, ct.ProgrammaticName); textbox3Element = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "textBox3")); ct = textbox3Element.Current.ControlType; Assert.AreEqual (ControlType.Edit, ct, ct.ProgrammaticName); Assert.AreEqual (0, eventCount); // listView1's ControlType will change from "DataGrid" to "List" if we set View = View.Tile // but on Windows we don't have corresponding property changed event. At.AddAutomationPropertyChangedEventHandler (listView1Element, TreeScope.Element, propertyHandler, AEIds.ControlTypeProperty); ct = listView1Element.Current.ControlType; Assert.AreEqual (ControlType.DataGrid, ct, ct.ProgrammaticName); RunCommand ("change list view mode tile"); Thread.Sleep (500); ct = listView1Element.Current.ControlType; Assert.AreEqual (ControlType.DataGrid, ct, ct.ProgrammaticName); listView1Element = testFormElement.FindFirst (TreeScope.Descendants, new PropertyCondition (AEIds.NameProperty, "listView1")); ct = listView1Element.Current.ControlType; Assert.AreEqual (ControlType.List, ct, ct.ProgrammaticName); Assert.AreEqual (0, eventCount); } } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/ValuePatternTest.cs0000644000016200001670000001075511433571545031100 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Matt Guo // using System; using System.Linq; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using At = System.Windows.Automation.Automation; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace MonoTests.System.Windows.Automation { [TestFixture] public class ValuePatternTest : BaseTest { [Test] public void ValueTest () { string magicStr = "Hello, ValuePatternTest.ValueTest!"; ValuePattern pattern = (ValuePattern) textbox1Element.GetCurrentPattern (ValuePatternIdentifiers.Pattern); pattern.SetValue (magicStr); //We add following sleep to make sure the test passes, since //"pattern.SetValue (magicStr)" may execute in another thread. Thread.Sleep (500); string str1 = pattern.Current.Value; string str2 = (string)(textbox1Element.GetCurrentPropertyValue (ValuePatternIdentifiers.ValueProperty)); Assert.AreEqual (magicStr, str1, "Check pattern.Current.Value."); Assert.AreEqual (magicStr, str2, "Check ValuePatternIdentifiers.ValueProperty."); } [Test] public void PropertyEventTest () { var automationEventsArray = new [] { new {Sender = (object) null, Args = (AutomationPropertyChangedEventArgs) null}}; var automationEvents = automationEventsArray.ToList (); automationEvents.Clear (); string magicStr1 = "ValuePatternTest.PropertyEventTest.m1"; string magicStr2 = "ValuePatternTest.PropertyEventTest.m2"; ValuePattern pattern = (ValuePattern) textbox1Element.GetCurrentPattern (ValuePatternIdentifiers.Pattern); pattern.SetValue (magicStr1); Thread.Sleep (500); AutomationPropertyChangedEventHandler handler = (o, e) => automationEvents.Add (new { Sender = o, Args = e }); At.AddAutomationPropertyChangedEventHandler (textbox1Element, TreeScope.Element, handler, ValuePattern.ValueProperty, ValuePattern.IsReadOnlyProperty ); pattern.SetValue (magicStr2); Thread.Sleep (500); Assert.AreEqual (1, automationEvents.Count, "event count"); Assert.AreEqual (textbox1Element, automationEvents [0].Sender, "event sender"); Assert.AreEqual (magicStr2, automationEvents [0].Args.NewValue, "new Value"); // LAMESPEC: The value should be equal to "magicStr1" but is returning null instead Assert.IsNull (automationEvents [0].Args.OldValue, "old Value"); automationEvents.Clear (); At.RemoveAutomationPropertyChangedEventHandler (textbox1Element, handler); pattern.SetValue (magicStr1); Thread.Sleep (500); Assert.AreEqual (0, automationEvents.Count, "event count"); } [Test] public void ReadOnlyTest () { ValuePattern pattern = (ValuePattern) textbox1Element.GetCurrentPattern (ValuePatternIdentifiers.Pattern); Assert.AreEqual (false, pattern.Current.IsReadOnly, "Check textbox1's ReadOnly property"); pattern = (ValuePattern) textbox2Element.GetCurrentPattern (ValuePatternIdentifiers.Pattern); Assert.AreEqual (true, pattern.Current.IsReadOnly, "Check textbox2's ReadOnly property"); } [Test] [ExpectedException ("System.Windows.Automation.ElementNotEnabledException")] public void NotEnabledTest () { ValuePattern pattern = (ValuePattern) textbox2Element.GetCurrentPattern (ValuePatternIdentifiers.Pattern); pattern.SetValue ("123"); } } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/ScrollTest.cs0000644000016200001670000003721111433571545027720 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Matt Guo // using System; using System.Linq; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using MonoTests.System.Windows.Automation; using At = System.Windows.Automation.Automation; namespace MonoTests.System.Windows.Automation { //This TestFixture will test ScrollPattern and ScrollItemPattern [TestFixture] public class ScrollTest : BaseTest { private ScrollPattern scrollPattern = null; private AutomationElement listItem0Element = null; private AutomationElement listItem9Element = null; private double lastHoriPos = 0.0; private double lastVertPos = 0.0; private double horiOffset = 0.0; private double vertOffset = 0.0; private void UpdatePosition () { var currentHoriPos = scrollPattern.Current.HorizontalScrollPercent; horiOffset = currentHoriPos - lastHoriPos; lastHoriPos = currentHoriPos; var currentVertPos = scrollPattern.Current.VerticalScrollPercent; vertOffset = currentVertPos - lastVertPos; lastVertPos = currentVertPos; } private void ResetPosition () { scrollPattern.SetScrollPercent (0.0, 0.0); Assert.AreEqual (0.0, scrollPattern.Current.VerticalScrollPercent, "Vertically reset"); Assert.AreEqual (0.0, scrollPattern.Current.HorizontalScrollPercent, "Horizontally reset"); lastHoriPos = 0.0; lastVertPos = 0.0; horiOffset = 0.0; vertOffset = 0.0; } private void ScrollToEnd () { scrollPattern.SetScrollPercent (100.0, 100.0); Assert.AreEqual (100.0, scrollPattern.Current.VerticalScrollPercent, "Vertically scroll to end"); Assert.AreEqual (100.0, scrollPattern.Current.HorizontalScrollPercent, "Horizontally scroll to end"); UpdatePosition (); } private void AssertNotScrolled () { UpdatePosition (); Assert.AreEqual (0, vertOffset, "It's not scrolled vertically"); Assert.AreEqual (0, horiOffset, "It's not scrolled horizontally"); } private void IneffectiveScrollTestInternal (ScrollAmount smallChange, ScrollAmount largeChange) { scrollPattern.Scroll (ScrollAmount.NoAmount, ScrollAmount.NoAmount); AssertNotScrolled (); scrollPattern.Scroll (largeChange, largeChange); AssertNotScrolled (); scrollPattern.Scroll (smallChange, smallChange); AssertNotScrolled (); scrollPattern.ScrollHorizontal (smallChange); AssertNotScrolled (); scrollPattern.ScrollHorizontal (largeChange); AssertNotScrolled (); scrollPattern.ScrollVertical (smallChange); AssertNotScrolled (); scrollPattern.ScrollVertical (largeChange); AssertNotScrolled (); } private void EffectiveScrollTestInternal (ScrollAmount smallChange, ScrollAmount largeChange, bool isOffsetPositive) { scrollPattern.Scroll (smallChange, smallChange); UpdatePosition (); var smallVertOffset = vertOffset; var smallHoriOffset = horiOffset; scrollPattern.Scroll (largeChange, largeChange); UpdatePosition (); var largeVertOffset = vertOffset; var largeHoriOffset = horiOffset; if (isOffsetPositive) { Assert.Greater (smallHoriOffset, 0.0, "Vertically scrolled"); Assert.Greater (smallHoriOffset, 0.0, "Horizontally It's scrolled"); Assert.Greater (largeVertOffset, smallVertOffset, "Vertically 'large' is larger than 'small'"); Assert.Greater (largeHoriOffset, smallHoriOffset, "Horizontally 'large' is larger than 'small'"); } else { Assert.Less (smallHoriOffset, 0.0, "Vertically scrolled"); Assert.Less (smallHoriOffset, 0.0, "Horizontally It's scrolled"); Assert.Less (largeVertOffset, smallVertOffset, "Vertically 'large' is larger than 'small'"); Assert.Less (largeHoriOffset, smallHoriOffset, "Horizontally 'large' is larger than 'small'"); } } private AutomationElement FindItem (string name) { var cond = new AndCondition( new PropertyCondition ( AutomationElementIdentifiers.NameProperty, name), new PropertyCondition ( AutomationElementIdentifiers.ControlTypeProperty, ControlType.DataItem)); return listView1Element.FindFirst (TreeScope.Children, cond); } protected override void CustomFixtureSetUp () { base.CustomFixtureSetUp (); scrollPattern = (ScrollPattern) listView1Element.GetCurrentPattern (ScrollPattern.Pattern); listItem0Element = FindItem ("Item 0"); listItem9Element = FindItem ("Item 9"); } [Test] public void PropertiesTest () { CheckPatternIdentifiers (); CheckPatternIdentifiers (); Assert.AreEqual (-1.0, ScrollPattern.NoScroll, "Check ScrollPattern.NoScroll value"); Assert.AreEqual (-1.0, ScrollPatternIdentifiers.NoScroll, "Check ScrollPatternIdentifiers.NoScroll value"); } [Test] public void SetScrollPercentTest () { ResetPosition (); //Double.NaN takes no effect on Windows scrollPattern.SetScrollPercent (double.NaN, double.NaN); AssertNotScrolled (); scrollPattern.SetScrollPercent (ScrollPattern.NoScroll, ScrollPattern.NoScroll); AssertNotScrolled (); scrollPattern.SetScrollPercent (ScrollPattern.NoScroll, 50.0); UpdatePosition (); Assert.Greater (lastVertPos, 0.0, "Vertical position bottom"); Assert.Less (lastVertPos, 100.0, "Vertical position top"); scrollPattern.SetScrollPercent (ScrollPattern.NoScroll, 100.0); UpdatePosition (); Assert.AreEqual (100.0, lastVertPos, "Vertical position"); AssertRaises ( () => scrollPattern.SetScrollPercent (ScrollPattern.NoScroll, 101.0), "Vertical out of range, top"); AssertRaises ( () => scrollPattern.SetScrollPercent (ScrollPattern.NoScroll, -10.0), "Vertical out of range, bottom"); scrollPattern.SetScrollPercent (50.0, ScrollPattern.NoScroll); UpdatePosition (); Assert.Greater (lastHoriPos, 0.0, "Horizontal position bottom"); Assert.Less (lastHoriPos, 100.0, "Horizontal position top"); scrollPattern.SetScrollPercent (100.0, ScrollPattern.NoScroll); UpdatePosition (); Assert.AreEqual (100.0, lastHoriPos, "Horizontal position"); AssertRaises ( () => scrollPattern.SetScrollPercent (101.0, ScrollPattern.NoScroll), "Horizontal out of range, top"); AssertRaises ( () => scrollPattern.SetScrollPercent (-10.0, ScrollPattern.NoScroll), "Horizontal out of range, bottom"); } [Test] public void ScrollableTest () { Assert.IsTrue (scrollPattern.Current.HorizontallyScrollable, "listView1.HorizontallyScrollable"); Assert.IsTrue (scrollPattern.Current.VerticallyScrollable, "listView1.VerticallyScrollable"); RunCommand ("set textBox3 long text"); var scrollPattern2 = (ScrollPattern) textbox3Element.GetCurrentPattern (ScrollPattern.Pattern); Assert.IsTrue (scrollPattern2.Current.HorizontallyScrollable, "listView1.HorizontallyScrollable"); Assert.IsFalse (scrollPattern2.Current.VerticallyScrollable, "listView1.VerticallyScrollable"); AssertRaises ( () => scrollPattern2.SetScrollPercent (ScrollPattern.NoScroll, 50.0), "Vertical scroll is disabled on textBox3"); } [Test] public void Z2_EventTest() { var automationEventsArray = new [] { new {Sender = (object) null, Args = (AutomationPropertyChangedEventArgs) null}}; var automationEvents = automationEventsArray.ToList (); automationEvents.Clear (); AutomationPropertyChangedEventHandler handler = (o, e) => automationEvents.Add (new { Sender = o, Args = e }); ResetPosition (); At.AddAutomationPropertyChangedEventHandler (listView1Element, TreeScope.Element, handler, ScrollPattern.VerticalScrollPercentProperty, ScrollPattern.HorizontalScrollPercentProperty, ScrollPattern.VerticallyScrollableProperty, ScrollPattern.HorizontallyScrollableProperty, ScrollPattern.VerticalViewSizeProperty, ScrollPattern.HorizontalViewSizeProperty); scrollPattern.Scroll (ScrollAmount.LargeIncrement, ScrollAmount.LargeIncrement); UpdatePosition (); Assert.Greater (vertOffset, 0, "vert scrolled"); Assert.Greater (horiOffset, 0, "hori scrolled"); Thread.Sleep (500); bool vertChanged = false; bool horiChanged = false; foreach (var evt in automationEvents) { var args = evt.Args; Assert.AreEqual (listView1Element, evt.Sender, "event sender"); //On Windows, args.OldValue is always null Assert.IsNull (args.OldValue, "event.OldValue"); if (args.Property == ScrollPattern.VerticalScrollPercentProperty) { Assert.Greater ((double)args.NewValue, 0.0, "vert scrolled, event.NewValue"); vertChanged = true; } else if (args.Property == ScrollPattern.HorizontalScrollPercentProperty) { Assert.Greater ((double)args.NewValue, 0.0, "hori scrolled, event.NewValue"); horiChanged = true; } } Assert.IsTrue (vertChanged, "vert position event fired"); Assert.IsTrue (horiChanged, "hori position event fired"); automationEvents.Clear (); var oldVertViewSize = scrollPattern.Current.VerticalViewSize; RunCommand ("add listView1 item"); var newVertViewSize = scrollPattern.Current.VerticalViewSize; Assert.Greater (oldVertViewSize, newVertViewSize, "size expanded, so view shrinked"); vertChanged = false; bool viewSizeChanged = false; Thread.Sleep (500); foreach (var evt in automationEvents) { var args = evt.Args; Assert.AreEqual (listView1Element, evt.Sender, "event sender"); //On Windows, args.OldValue is always null Assert.IsNull (args.OldValue, "event.OldValue"); if (args.Property == ScrollPattern.VerticalViewSizeProperty) viewSizeChanged = true; else if (args.Property == ScrollPattern.VerticalScrollPercentProperty) vertChanged = true; } //On Windows, though viewSize changes, no event is fired Assert.IsFalse (viewSizeChanged, "viewSize changed event fired"); Assert.IsTrue (vertChanged, "vert position event fired"); automationEvents.Clear (); Assert.IsTrue (scrollPattern.Current.VerticallyScrollable); RunCommand ("make listView1 higher"); Assert.IsFalse (scrollPattern.Current.VerticallyScrollable); vertChanged = false; viewSizeChanged = false; bool scrollableChanged = false; Thread.Sleep (500); foreach (var evt in automationEvents) { var args = evt.Args; Assert.AreEqual (listView1Element, evt.Sender, "event sender"); //On Windows, args.OldValue is always null Assert.IsNull (args.OldValue, "event.OldValue"); if (args.Property == ScrollPattern.VerticalViewSizeProperty) viewSizeChanged = true; else if (args.Property == ScrollPattern.VerticalScrollPercentProperty) vertChanged = true; else if (args.Property == ScrollPattern.VerticallyScrollableProperty) scrollableChanged = true; } //On Windows, though all Vertical*Property changes, no event is fired Assert.IsFalse (viewSizeChanged, "viewSize changed event fired"); Assert.IsFalse (scrollableChanged, "viewSize changed event fired"); Assert.IsFalse (vertChanged, "vert position event fired"); At.RemoveAutomationPropertyChangedEventHandler (listView1Element, handler); } [Test] public void IneffectiveScrollFromTop () { ResetPosition (); IneffectiveScrollTestInternal (ScrollAmount.SmallDecrement, ScrollAmount.LargeDecrement); } [Test] public void IneffectiveScrollTestFromBottom () { ScrollToEnd (); IneffectiveScrollTestInternal (ScrollAmount.SmallIncrement, ScrollAmount.LargeIncrement); } [Test] public void EffectiveScrollTestFromTop () { ResetPosition (); EffectiveScrollTestInternal (ScrollAmount.SmallIncrement, ScrollAmount.LargeIncrement, true); } [Test] public void EffectiveScrollTestFromBottom () { ScrollToEnd (); EffectiveScrollTestInternal (ScrollAmount.SmallDecrement, ScrollAmount.LargeDecrement, false); } [Test] public void EffectiveScrollTestFromEnd () { ResetPosition (); scrollPattern.Scroll (ScrollAmount.SmallIncrement, ScrollAmount.SmallIncrement); UpdatePosition (); var smallVertOffset = vertOffset; var smallHoriOffset = horiOffset; scrollPattern.Scroll (ScrollAmount.LargeIncrement, ScrollAmount.LargeIncrement); UpdatePosition (); var largeVertOffset = vertOffset; var largeHoriOffset = horiOffset; Assert.Greater (smallHoriOffset, 0.0, "Vertically scrolled"); Assert.Greater (smallHoriOffset, 0.0, "Horizontally It's scrolled"); Assert.Greater (largeVertOffset, smallVertOffset, "Vertically 'large' is greater than 'small'"); Assert.Greater (largeHoriOffset, smallHoriOffset, "Horizontally 'large' is greater than 'small'"); } [Test] public void ScrollItemTest () { var item0Pattern = (ScrollItemPattern) listItem0Element.GetCurrentPattern (ScrollItemPattern.Pattern); item0Pattern.ScrollIntoView (); UpdatePosition (); var lastItemElement = FindItem ("Item Extra"); if (lastItemElement == null) lastItemElement = listItem9Element; var lastItemPattern = (ScrollItemPattern) lastItemElement.GetCurrentPattern (ScrollItemPattern.Pattern); lastItemPattern.ScrollIntoView (); UpdatePosition (); Assert.AreEqual (100.0, lastVertPos, "Vertically scroll to end"); Assert.AreEqual (100.0, vertOffset, "Vertically fully scrolled "); } [Test] public void Z1_NotEnabledtest () { ResetPosition (); RunCommand ("disable list view"); AssertRaises ( () => scrollPattern.SetScrollPercent (50.0, 50.0), "Disabled #1"); AssertRaises ( () => scrollPattern.SetScrollPercent (ScrollPattern.NoScroll, ScrollPattern.NoScroll), "Disabled #2"); AssertRaises ( () => scrollPattern.Scroll (ScrollAmount.LargeIncrement, ScrollAmount.LargeIncrement), "Disabled #3"); listItem9Element = FindItem ("Item 9"); Assert.IsNotNull (listItem9Element, "listItem9Element"); AssertRaises ( () => listItem9Element.GetCurrentPattern (ScrollItemPattern.Pattern), "Disabled #4"); RunCommand ("enable list view"); } } }mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/BaseTest.cs0000644000016200001670000005275511433571545027346 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using System.Reflection; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using At = System.Windows.Automation.Automation; using NUnit.Framework; using System.Text; namespace MonoTests.System.Windows.Automation { public abstract class BaseTest { #region Setup/Teardown protected Process p; protected Dictionary patternProperties; protected AutomationElement testFormElement; protected AutomationElement groupBoxElement; protected AutomationElement groupBox1Element; protected AutomationElement groupBox2Element; protected AutomationElement groupBox3Element; protected AutomationElement button1Element; protected AutomationElement button2Element; protected AutomationElement button3Element; protected AutomationElement button4Element; protected AutomationElement button5Element; protected AutomationElement button6Element; protected AutomationElement button7Element; protected AutomationElement checkBox1Element; protected AutomationElement checkBox2Element; protected AutomationElement label1Element; protected AutomationElement numericUpDown1Element; protected AutomationElement numericUpDown2Element; protected AutomationElement textbox1Element; protected AutomationElement textbox2Element; protected AutomationElement textbox3Element; protected AutomationElement tb3horizontalScrollBarElement; protected AutomationElement tb3verticalScrollBarElement; protected AutomationElement horizontalMenuStripElement; //protected AutomationElement verticalMenuStripElement; protected AutomationElement panel1Element; protected AutomationElement btnAddTextboxElement; protected AutomationElement btnRemoveTextboxElement; protected AutomationElement txtCommandElement; protected AutomationElement btnRunElement; protected AutomationElement treeView1Element; protected AutomationElement table1Element; protected AutomationElement listView1Element; protected AutomationElement button8Element; public static Process StartApplication (string name, string arguments) { Process p = new Process (); p.StartInfo.FileName = name; p.StartInfo.Arguments = arguments; p.StartInfo.UseShellExecute = false; p.StartInfo.CreateNoWindow = true; p.Start (); return p; } public static void CheckPatternIdentifiers () where T : BasePattern { Type patternType = typeof (T); Type patternIdsType = typeof (AutomationElementIdentifiers).Assembly.GetType (patternType.FullName + "Identifiers"); foreach (var fieldInfo in patternType.GetFields (BindingFlags.Public | BindingFlags.Static)) { string fieldName = fieldInfo.Name; if (fieldName == "Pattern" || fieldName.EndsWith ("Property") || fieldName.EndsWith ("Event")) { AutomationIdentifier value1 = fieldInfo.GetValue (null) as AutomationIdentifier; var fieldInfo2 = patternIdsType.GetField (fieldName, BindingFlags.Public | BindingFlags.Static); AutomationIdentifier value2 = fieldInfo2.GetValue (null) as AutomationIdentifier; Assert.AreEqual (value2.Id, value1.Id, string.Format ("{0}.{1}.Id", patternType.Name, fieldName) ); Assert.AreEqual (value2.ProgrammaticName, value1.ProgrammaticName, string.Format ("{0}.{1}.ProgrammaticName", patternType.Name, fieldName) ); } } } protected virtual void CustomFixtureSetUp () { patternProperties = new Dictionary (); patternProperties.Add (DockPatternIdentifiers.Pattern, AEIds.IsDockPatternAvailableProperty); patternProperties.Add (ExpandCollapsePatternIdentifiers.Pattern, AEIds.IsExpandCollapsePatternAvailableProperty); patternProperties.Add (GridItemPatternIdentifiers.Pattern, AEIds.IsGridItemPatternAvailableProperty); patternProperties.Add (GridPatternIdentifiers.Pattern, AEIds.IsGridPatternAvailableProperty); patternProperties.Add (InvokePatternIdentifiers.Pattern, AEIds.IsInvokePatternAvailableProperty); patternProperties.Add (MultipleViewPatternIdentifiers.Pattern, AEIds.IsMultipleViewPatternAvailableProperty); patternProperties.Add (RangeValuePatternIdentifiers.Pattern, AEIds.IsRangeValuePatternAvailableProperty); patternProperties.Add (ScrollItemPatternIdentifiers.Pattern, AEIds.IsScrollItemPatternAvailableProperty); patternProperties.Add (ScrollPatternIdentifiers.Pattern, AEIds.IsScrollPatternAvailableProperty); patternProperties.Add (SelectionItemPatternIdentifiers.Pattern, AEIds.IsSelectionItemPatternAvailableProperty); patternProperties.Add (SelectionPatternIdentifiers.Pattern, AEIds.IsSelectionPatternAvailableProperty); patternProperties.Add (TableItemPatternIdentifiers.Pattern, AEIds.IsTableItemPatternAvailableProperty); patternProperties.Add (TablePatternIdentifiers.Pattern, AEIds.IsTablePatternAvailableProperty); patternProperties.Add (TextPatternIdentifiers.Pattern, AEIds.IsTextPatternAvailableProperty); patternProperties.Add (TogglePatternIdentifiers.Pattern, AEIds.IsTogglePatternAvailableProperty); patternProperties.Add (TransformPatternIdentifiers.Pattern, AEIds.IsTransformPatternAvailableProperty); patternProperties.Add (ValuePatternIdentifiers.Pattern, AEIds.IsValuePatternAvailableProperty); patternProperties.Add (WindowPatternIdentifiers.Pattern, AEIds.IsWindowPatternAvailableProperty); if (Atspi) AtspiSetup (); else SWFSetup (); Assert.IsNotNull (testFormElement); Assert.IsNotNull (groupBox1Element); Assert.IsNotNull (button1Element); Assert.IsNotNull (button2Element); Assert.IsNotNull (button3Element); Assert.IsNotNull (button4Element); Assert.IsNotNull (button5Element); Assert.IsNotNull (button6Element); Assert.IsNotNull (button7Element); Assert.IsNotNull (label1Element); Assert.IsNotNull (textbox1Element); Assert.IsNotNull (textbox2Element); Assert.IsNotNull (textbox3Element); if (!Atspi) { Assert.IsNotNull (groupBox2Element); Assert.IsNotNull (groupBox3Element); Assert.IsNotNull (tb3horizontalScrollBarElement); Assert.IsNotNull (tb3verticalScrollBarElement); } Assert.IsNotNull (checkBox1Element); Assert.IsNotNull (panel1Element); Assert.IsNotNull (btnAddTextboxElement); Assert.IsNotNull (btnRemoveTextboxElement); Assert.IsNotNull (txtCommandElement); Assert.IsNotNull (btnRunElement); Assert.IsNotNull (numericUpDown1Element); Assert.IsNotNull (treeView1Element); Assert.IsNotNull (table1Element); if (!Atspi) Assert.IsNotNull (listView1Element); Assert.IsNotNull (horizontalMenuStripElement); //Assert.IsNotNull (verticalMenuStripElement); } [TestFixtureSetUp] public void FixtureSetUp () { try { CustomFixtureSetUp (); } catch { FixtureTearDown (); throw; } } [TestFixtureTearDown] public void FixtureTearDown () { if (p != null && !p.HasExited) { p.Kill (); } p = null; } private void SWFSetup () { p = StartApplication (@"SampleForm.exe", String.Empty); Thread.Sleep (4000); testFormElement = AutomationElement.RootElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ProcessIdProperty, p.Id)); groupBox1Element = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Group)); groupBox2Element = groupBox1Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "groupBox2")); groupBox3Element = groupBox1Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "groupBox3")); button1Element = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "button1")); textbox1Element = testFormElement.FindAll (TreeScope.Children, new AndCondition (new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Edit), new PropertyCondition (AEIds.IsPasswordProperty, false))) [1]; textbox2Element = testFormElement.FindFirst (TreeScope.Children, new AndCondition (new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Edit), new PropertyCondition (AEIds.IsPasswordProperty, true))); label1Element = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Text)); button2Element = groupBox1Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "button2")); button3Element = groupBox1Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "button3")); button4Element = groupBox1Element.FindFirst (TreeScope.Descendants, new PropertyCondition (AEIds.NameProperty, "button4")); button5Element = groupBox1Element.FindFirst (TreeScope.Descendants, new PropertyCondition (AEIds.NameProperty, "button5")); button6Element = groupBox1Element.FindFirst (TreeScope.Descendants, new PropertyCondition (AEIds.NameProperty, "button6")); button7Element = groupBox1Element.FindFirst (TreeScope.Descendants, new PropertyCondition (AEIds.NameProperty, "button7")); checkBox1Element = groupBox2Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "checkBox1")); textbox3Element = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Document)); tb3horizontalScrollBarElement = textbox3Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.OrientationProperty, OrientationType.Horizontal)); tb3verticalScrollBarElement = textbox3Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.OrientationProperty, OrientationType.Vertical)); groupBox2Element = groupBox1Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "groupBox2")); checkBox1Element = groupBox2Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.CheckBox)); panel1Element = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Pane)); btnAddTextboxElement = panel1Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "Add")); btnRemoveTextboxElement = panel1Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "Remove")); txtCommandElement = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "txtCommand")); btnRunElement = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "Run")); treeView1Element = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Tree)); numericUpDown1Element = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Spinner)); table1Element = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "dataGridView1")); listView1Element = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "listView1")); button8Element = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "button8")); horizontalMenuStripElement = testFormElement.FindFirst (TreeScope.Descendants, new PropertyCondition (AEIds.NameProperty, "menuStrip1")); //verticalMenuStripElement = testFormElement.FindFirst (TreeScope.Descendants, // new PropertyCondition (AEIds.NameProperty, // "menuStrip2")); } private void AtspiSetup () { string name = "GtkForm.exe"; p = StartApplication (name, String.Empty); Thread.Sleep (1000); testFormElement = AutomationElement.RootElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ProcessIdProperty, p.Id)); groupBoxElement = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Group)); groupBox1Element = groupBoxElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Group)); groupBox2Element = groupBox1Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "groupBox2")); groupBox3Element = groupBox1Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "groupBox3")); button1Element = groupBoxElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Button)); textbox1Element = groupBoxElement.FindFirst (TreeScope.Children, new AndCondition (new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Edit), new PropertyCondition (AEIds.IsPasswordProperty, false))); textbox2Element = groupBoxElement.FindFirst (TreeScope.Children, new AndCondition (new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Edit), new PropertyCondition (AEIds.IsPasswordProperty, true))); label1Element = groupBoxElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Text)); button2Element = groupBox1Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "button2")); button3Element = groupBox1Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "button3")); button4Element = groupBox1Element.FindFirst (TreeScope.Descendants, new PropertyCondition (AEIds.NameProperty, "button4")); button5Element = groupBox1Element.FindFirst (TreeScope.Descendants, new PropertyCondition (AEIds.NameProperty, "button5")); button6Element = groupBox1Element.FindFirst (TreeScope.Descendants, new PropertyCondition (AEIds.NameProperty, "button6")); button7Element = groupBox1Element.FindFirst (TreeScope.Descendants, new PropertyCondition (AEIds.NameProperty, "button7")); checkBox1Element = groupBox2Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.CheckBox)); textbox3Element = groupBoxElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Document)); checkBox2Element = groupBoxElement.FindFirst (TreeScope.Descendants, new PropertyCondition (AEIds.NameProperty, "checkbox2")); btnAddTextboxElement = groupBoxElement.FindFirst (TreeScope.Descendants, new PropertyCondition (AEIds.NameProperty, "Add")); panel1Element = TreeWalker.RawViewWalker.GetParent (btnAddTextboxElement); btnRemoveTextboxElement = panel1Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "Remove")); txtCommandElement = groupBoxElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "txtCommand")); btnRunElement = groupBoxElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "Run")); treeView1Element = groupBoxElement.FindFirst (TreeScope.Descendants, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Tree)); table1Element = groupBoxElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "dataGridView1")); numericUpDown1Element = groupBoxElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Slider)); listView1Element = groupBoxElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "listView1")); horizontalMenuStripElement = testFormElement.FindFirst (TreeScope.Descendants, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.MenuBar)); } protected void DisableControls () { InvokePattern pattern = (InvokePattern) button4Element.GetCurrentPattern (InvokePatternIdentifiers.Pattern); pattern.Invoke (); if (Atspi) Thread.Sleep (2000); } protected void EnableControls () { InvokePattern pattern = (InvokePattern) button4Element.GetCurrentPattern (InvokePatternIdentifiers.Pattern); pattern.Invoke (); if (Atspi) Thread.Sleep (2000); } #endregion protected void RunCommand (string command) { ValuePattern cmd = (ValuePattern) txtCommandElement.GetCurrentPattern (ValuePattern.Pattern); cmd.SetValue (command); Thread.Sleep (500); InvokePattern run = (InvokePattern) btnRunElement.GetCurrentPattern (InvokePattern.Pattern); run.Invoke (); Thread.Sleep (500); } public virtual bool Atspi { get { return false; } } public static AutomationProperty [] GetPatternProperties (AutomationPattern pattern) { List props = new List (); var patternName = string.Format ( "System.Windows.Automation.{0}Pattern", At.PatternName (pattern)); Type t = typeof(DockPattern).Assembly.GetType(patternName); Assert.IsNotNull (t, "Unknown pattern type"); foreach (FieldInfo info in t.GetFields ( BindingFlags.Public | BindingFlags.Static)) { if (info.Name.EndsWith ("Property")) { props.Add ((AutomationProperty)info.GetValue (null)); } } return props.ToArray(); } public static void AssertRaises (Action a, string message) where T : Exception { bool exceptionRaised = false; try { a (); } catch (T) { exceptionRaised = true; } Assert.IsTrue (exceptionRaised, string.Format ("Expected {0} when {1}", typeof (T), message)); } public static void AssertWontRaise (Action a, string message) where T : Exception { T ex = null; try { a (); } catch (T e) { ex = e; } Assert.IsNull (ex, string.Format ("Didn't expected '{0}' when {1}", ex, message)); } public static string PrintRuntimeId (int [] runtimeId) { StringBuilder sb = new StringBuilder(); sb.Append ("["); foreach (int id in runtimeId) sb.AppendFormat ("{0},", id); if (sb[sb.Length - 1] == ',') sb[sb.Length - 1] = ']'; else sb.Append ("]"); return sb.ToString (); } protected void VerifyPatterns (AutomationElement element, params AutomationPattern [] expected) { List expectedPatterns = new List (expected); List supportedPatterns = new List (element.GetSupportedPatterns ()); object pattern1 = null, pattern2; foreach (AutomationPattern pattern in patternProperties.Keys) { bool patternProperty = (bool) element.GetCurrentPropertyValue (patternProperties [pattern]); if (expectedPatterns.Contains (pattern)) { try { pattern1 = element.GetCurrentPattern (pattern); } catch (InvalidOperationException) { Assert.Fail ("GetCurrentPattern should not throw InvalidOperationException: " + pattern.ProgrammaticName); } Assert.IsNotNull (pattern1, "GetCurrentPattern should not return null: " + pattern.ProgrammaticName); Assert.IsTrue (element.TryGetCurrentPattern (pattern, out pattern2), "TryGetCurrentPattern should return true: " + pattern.ProgrammaticName); Assert.IsNotNull (pattern2, "TryGetCurrentPattern should not return null: " + pattern.ProgrammaticName); Assert.IsTrue (supportedPatterns.Contains (pattern), "GetSupportedPatterns should return pattern: " + pattern.ProgrammaticName); Assert.IsTrue (patternProperty, "Pattern property: " + pattern.ProgrammaticName); } else { try { pattern1 = element.GetCurrentPattern (pattern); Assert.Fail ("GetCurrentPattern should return an InvalidOperation exception: " + pattern.ProgrammaticName); } catch (InvalidOperationException) { } Assert.IsFalse (element.TryGetCurrentPattern (pattern, out pattern2), "TryGetCurrentPattern should return false: " + pattern.ProgrammaticName); Assert.IsFalse (supportedPatterns.Contains (pattern), "GetSupportedPatterns should not return pattern: " + pattern.ProgrammaticName); Assert.IsFalse (patternProperty, "Pattern property: " + pattern.ProgrammaticName); } } } } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/WindowPatternTest.cs0000644000016200001670000004306211433571545031270 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using System.Linq; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.Windows.Automation; using SWA = System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace MonoTests.System.Windows.Automation { [TestFixture] public class WindowPatternTest : BaseTest { #region Test Methods [Test] public void PropertiesTest () { Assert.AreEqual (WindowPatternIdentifiers.Pattern.Id, WindowPattern.Pattern.Id, "PatternTest.Id"); Assert.AreEqual (WindowPatternIdentifiers.Pattern.ProgrammaticName, WindowPattern.Pattern.ProgrammaticName, "Pattern.ProgrammaticName"); Assert.AreEqual (WindowPatternIdentifiers.CanMaximizeProperty.Id, WindowPattern.CanMaximizeProperty.Id, "CanMaximizeProperty.Id"); Assert.AreEqual (WindowPatternIdentifiers.CanMaximizeProperty.ProgrammaticName, WindowPattern.CanMaximizeProperty.ProgrammaticName, "CanMaximizeProperty.ProgrammaticName"); Assert.AreEqual (WindowPatternIdentifiers.CanMinimizeProperty.Id, WindowPattern.CanMinimizeProperty.Id, "CanMinimizeProperty.Id"); Assert.AreEqual (WindowPatternIdentifiers.CanMinimizeProperty.ProgrammaticName, WindowPattern.CanMinimizeProperty.ProgrammaticName, "CanMinimizeProperty.ProgrammaticName"); Assert.AreEqual (WindowPatternIdentifiers.IsModalProperty.Id, WindowPattern.IsModalProperty.Id, "IsModalProperty.Id"); Assert.AreEqual (WindowPatternIdentifiers.IsModalProperty.ProgrammaticName, WindowPattern.IsModalProperty.ProgrammaticName, "IsModalProperty.ProgrammaticName"); Assert.AreEqual (WindowPatternIdentifiers.IsTopmostProperty.Id, WindowPattern.IsTopmostProperty.Id, "IsTopmostProperty.Id"); Assert.AreEqual (WindowPatternIdentifiers.IsTopmostProperty.ProgrammaticName, WindowPattern.IsTopmostProperty.ProgrammaticName, "IsTopmostProperty.ProgrammaticName"); Assert.AreEqual (WindowPatternIdentifiers.WindowInteractionStateProperty.Id, WindowPattern.WindowInteractionStateProperty.Id, "WindowInteractionStateProperty.Id"); Assert.AreEqual (WindowPatternIdentifiers.WindowInteractionStateProperty.ProgrammaticName, WindowPattern.WindowInteractionStateProperty.ProgrammaticName, "WindowInteractionStateProperty.ProgrammaticName"); Assert.AreEqual (WindowPatternIdentifiers.WindowVisualStateProperty.Id, WindowPattern.WindowVisualStateProperty.Id, "WindowVisualStateProperty.Id"); Assert.AreEqual (WindowPatternIdentifiers.WindowVisualStateProperty.ProgrammaticName, WindowPattern.WindowVisualStateProperty.ProgrammaticName, "WindowVisualStateProperty.ProgrammaticName"); Assert.AreEqual (WindowPatternIdentifiers.WindowClosedEvent.Id, WindowPattern.WindowClosedEvent.Id, "WindowClosedEvent.Id"); Assert.AreEqual (WindowPatternIdentifiers.WindowClosedEvent.ProgrammaticName, WindowPattern.WindowClosedEvent.ProgrammaticName, "WindowClosedEvent.ProgrammaticName"); Assert.AreEqual (WindowPatternIdentifiers.WindowOpenedEvent.Id, WindowPattern.WindowOpenedEvent.Id, "WindowOpenedEvent.Id"); Assert.AreEqual (WindowPatternIdentifiers.WindowOpenedEvent.ProgrammaticName, WindowPattern.WindowOpenedEvent.ProgrammaticName, "WindowOpenedEvent.ProgrammaticName"); } [Test] public void WaitForInputIdleTest () { var window = (WindowPattern) testFormElement.GetCurrentPattern (WindowPattern.Pattern); bool result = window.WaitForInputIdle (500); Assert.IsTrue (result, "No wait when input is idle"); RunCommand ("Open.ModalChildWindow"); Thread.Sleep (500); var childWindowElement = testFormElement.FindFirst ( TreeScope.Children, new PropertyCondition (AutomationElement.NameProperty, "TestForm1.ModalForm1")); result = window.WaitForInputIdle (500); Assert.IsTrue (result, "No wait even when showing a modal child window"); ( (WindowPattern) childWindowElement.GetCurrentPattern (WindowPattern.Pattern) ).Close (); RunCommand ("Sleep.2000"); result = window.WaitForInputIdle (200); Assert.IsFalse (result, "Need to wait longer for idle if thread is sleeping"); RunCommand ("Sleep.2000"); result = window.WaitForInputIdle (4000); Assert.IsTrue (result, "Long enough wait for idle when thread is sleeping"); // TODO: Other cases? // TODO: To get False result, test with another child // window element that we get a ref to on open, // but which is not immediately idle (how?) // TODO: Also test WindowInteractionState more as part of this? } [Test] public void IsModalTest () { var window = (WindowPattern) testFormElement.GetCurrentPattern (WindowPattern.Pattern); Assert.IsFalse (window.Current.IsModal, "Main form is not modal"); Assert.AreEqual (WindowInteractionState.ReadyForUserInteraction, window.Current.WindowInteractionState, "When no modal child form showing, main form is in ready state"); RunCommand ("Open.ModalChildWindow"); Thread.Sleep (500); var childWindowElement = testFormElement.FindFirst ( TreeScope.Children, new PropertyCondition (AutomationElement.NameProperty, "TestForm1.ModalForm1")); Assert.IsNotNull (childWindowElement, "Unable to find AutomationElement for modal child window"); var childWindow = (WindowPattern) childWindowElement.GetCurrentPattern (WindowPattern.Pattern); Assert.IsTrue (childWindow.Current.IsModal, "Child form is modal"); // NOTE: Not the BlockedByModalWindow value you might expect Assert.AreEqual (WindowInteractionState.Running, window.Current.WindowInteractionState, "When modal child form showing, main form is in running state"); childWindow.Close (); Assert.AreEqual (WindowInteractionState.ReadyForUserInteraction, window.Current.WindowInteractionState, "When no modal child form showing, main form is in ready state"); } [Test] public void IsTopmostTest () { var automationEventsArray = new [] { new {Sender = (object) null, Args = (AutomationPropertyChangedEventArgs) null}}; var automationEvents = automationEventsArray.ToList (); automationEvents.Clear (); SWA.Automation.AddAutomationPropertyChangedEventHandler (testFormElement, TreeScope.Element, (o, e) => automationEvents.Add (new { Sender = o, Args = e }), WindowPattern.IsTopmostProperty); var window = (WindowPattern) testFormElement.GetCurrentPattern (WindowPattern.Pattern); Assert.IsFalse (window.Current.IsTopmost, "Initial val"); var current = window.Current; RunCommand ("Toggle.Window.IsTopmost"); Thread.Sleep (200); Assert.IsTrue (window.Current.IsTopmost, "Val after toggling on"); Assert.AreEqual (window.Current.IsTopmost, current.IsTopmost, "Even old WindowPatternInformation instances return correct value"); RunCommand ("Toggle.Window.IsTopmost"); Thread.Sleep (200); Assert.IsFalse (window.Current.IsTopmost, "Val after toggling off"); Assert.AreEqual (0, automationEvents.Count, "No property changed events expected"); } [Test] public void WindowVisualStateTest () { var automationEventsArray = new [] { new {Sender = (object) null, Args = (AutomationPropertyChangedEventArgs) null}}; var automationEvents = automationEventsArray.ToList (); automationEvents.Clear (); SWA.Automation.AddAutomationPropertyChangedEventHandler (testFormElement, TreeScope.Element, (o, e) => automationEvents.Add (new { Sender = o, Args = e }), WindowPattern.CanMaximizeProperty, WindowPattern.CanMinimizeProperty, WindowPattern.WindowVisualStateProperty); var window = (WindowPattern) testFormElement.GetCurrentPattern (WindowPattern.Pattern); Assert.IsTrue (window.Current.CanMaximize, "CanMaximize"); Assert.IsTrue (window.Current.CanMinimize, "CanMinimize"); Assert.AreEqual (WindowVisualState.Normal, window.Current.WindowVisualState, "WindowVisualState"); window.SetWindowVisualState (WindowVisualState.Maximized); Thread.Sleep (1000); Assert.IsTrue (window.Current.CanMaximize, "CanMaximize"); Assert.IsTrue (window.Current.CanMinimize, "CanMinimize"); Assert.AreEqual (WindowVisualState.Maximized, window.Current.WindowVisualState, "WindowVisualState"); Assert.AreEqual (1, automationEvents.Count, "event count"); Assert.AreEqual (WindowPattern.WindowVisualStateProperty, automationEvents [0].Args.Property, "event property"); Assert.AreEqual (testFormElement, automationEvents [0].Sender, "event sender"); Assert.AreEqual (null, automationEvents [0].Args.OldValue, "event old val"); Assert.AreEqual (WindowVisualState.Maximized, automationEvents [0].Args.NewValue, "event new val"); automationEvents.Clear (); window.SetWindowVisualState (WindowVisualState.Minimized); Thread.Sleep (1000); Assert.IsTrue (window.Current.CanMaximize, "CanMaximize"); Assert.IsTrue (window.Current.CanMinimize, "CanMinimize"); Assert.AreEqual (WindowVisualState.Minimized, window.Current.WindowVisualState, "WindowVisualState"); Assert.AreEqual (1, automationEvents.Count, "event count"); Assert.AreEqual (WindowPattern.WindowVisualStateProperty, automationEvents [0].Args.Property, "event property"); Assert.AreEqual (testFormElement, automationEvents [0].Sender, "event sender"); Assert.AreEqual (null, automationEvents [0].Args.OldValue, "event old val"); Assert.AreEqual (WindowVisualState.Minimized, automationEvents [0].Args.NewValue, "event new val"); automationEvents.Clear (); window.SetWindowVisualState (WindowVisualState.Normal); Thread.Sleep (1000); Assert.IsTrue (window.Current.CanMaximize, "CanMaximize"); Assert.IsTrue (window.Current.CanMinimize, "CanMinimize"); Assert.AreEqual (WindowVisualState.Normal, window.Current.WindowVisualState, "WindowVisualState"); Assert.AreEqual (1, automationEvents.Count, "event count"); Assert.AreEqual (WindowPattern.WindowVisualStateProperty, automationEvents [0].Args.Property, "event property"); Assert.AreEqual (testFormElement, automationEvents [0].Sender, "event sender"); Assert.AreEqual (null, automationEvents [0].Args.OldValue, "event old val"); Assert.AreEqual (WindowVisualState.Normal, automationEvents [0].Args.NewValue, "event new val"); // CanMaximize=True, CanMinimize=False automationEvents.Clear (); RunCommand ("Toggle.Window.CanMinimize"); Thread.Sleep (1000); // NOTE: Here and below, not property change events for CanMinimize/CanMaximize Assert.AreEqual (0, automationEvents.Count, "event count"); Assert.IsTrue (window.Current.CanMaximize, "CanMaximize"); Assert.IsFalse (window.Current.CanMinimize, "CanMinimize"); AssertRaises ( () => window.SetWindowVisualState (WindowVisualState.Minimized), "trying to Minimize when CanMinimize is False"); Thread.Sleep (500); Assert.AreEqual (WindowVisualState.Normal, window.Current.WindowVisualState, "WindowVisualState"); window.SetWindowVisualState (WindowVisualState.Maximized); Thread.Sleep (500); Assert.AreEqual (WindowVisualState.Maximized, window.Current.WindowVisualState, "WindowVisualState"); // Reset window to normal state window.SetWindowVisualState (WindowVisualState.Normal); Thread.Sleep (500); // CanMaximize=False, CanMinimize=True automationEvents.Clear (); RunCommand ("Toggle.Window.CanMinimize"); RunCommand ("Toggle.Window.CanMaximize"); Thread.Sleep (1000); Assert.AreEqual (0, automationEvents.Count, "event count"); Assert.IsFalse (window.Current.CanMaximize, "CanMaximize"); Assert.IsTrue (window.Current.CanMinimize, "CanMinimize"); AssertRaises ( () => window.SetWindowVisualState (WindowVisualState.Maximized), "trying to Maximize when CanMaximize is False"); Thread.Sleep (500); Assert.AreEqual (WindowVisualState.Normal, window.Current.WindowVisualState, "WindowVisualState"); window.SetWindowVisualState (WindowVisualState.Minimized); Thread.Sleep (500); Assert.AreEqual (WindowVisualState.Minimized, window.Current.WindowVisualState, "WindowVisualState"); // Set form back to normal RunCommand ("Toggle.Window.CanMaximize"); } [Test] public void OpenCloseTest () { // Fun with lists of anonymous types var automationEventsArray = new [] { new {Sender = (object) null, Args = (AutomationEventArgs) null}}; var automationEvents = automationEventsArray.ToList (); automationEvents.Clear (); SWA.Automation.AddAutomationEventHandler (WindowPattern.WindowOpenedEvent, AutomationElement.RootElement, TreeScope.Children, (o, e) => automationEvents.Add (new { Sender = o, Args = e })); // Open child window RunCommand ("Open.ChildWindow"); Thread.Sleep (500); AutomationElement childWindow = AutomationElement.RootElement.FindFirst ( TreeScope.Children, new PropertyCondition (AutomationElement.NameProperty, "TestForm1.ChildForm1")); Assert.IsNotNull (childWindow, "Unable to find AutomationElement for child window"); // TODO: Figure out why multiple events sometimes occur, // and check that sender/arg values are correct in *all* Assert.IsTrue (automationEvents.Count > 0, "Check that event was raised"); Assert.AreEqual (WindowPattern.WindowOpenedEvent, automationEvents [0].Args.EventId, "EventId"); Assert.AreEqual (childWindow, automationEvents [0].Sender, "sender"); automationEvents.Clear (); // TODO: Also test on element itself? SWA.Automation.AddAutomationEventHandler (WindowPattern.WindowClosedEvent, AutomationElement.RootElement, TreeScope.Subtree, (o, e) => automationEvents.Add (new { Sender = o, Args = e })); // Close window RunCommand ("Close.ChildWindow"); Thread.Sleep (500); Assert.AreEqual (2, automationEvents.Count, "Check that only one even (close) was raised"); Assert.AreEqual (WindowPattern.WindowClosedEvent, automationEvents [0].Args.EventId, "EventId"); Assert.AreEqual (null, automationEvents [0].Sender, "sender"); AssertRaises ( () => childWindow.Current.Name.ToString (), "trying to access Current.Name for closed window element"); automationEvents.Clear (); // Open window again RunCommand ("Open.ChildWindow"); Thread.Sleep (500); childWindow = AutomationElement.RootElement.FindFirst ( TreeScope.Children, new PropertyCondition (AutomationElement.NameProperty, "TestForm1.ChildForm1")); Assert.IsNotNull (childWindow, "Unable to find AutomationElement for child window"); Assert.IsTrue (automationEvents.Count > 0, "Check that event was raised"); Assert.AreEqual (WindowPattern.WindowOpenedEvent, automationEvents [0].Args.EventId, "EventId"); Assert.AreEqual (childWindow, automationEvents [0].Sender, "sender"); automationEvents.Clear (); // Close window ( (WindowPattern) childWindow.GetCurrentPattern (WindowPattern.Pattern) ).Close (); Thread.Sleep (500); Assert.AreEqual (1, automationEvents.Count, "Check that only one even (close) was raised"); Assert.AreEqual (WindowPattern.WindowClosedEvent, automationEvents [0].Args.EventId, "EventId"); Assert.AreEqual (null, automationEvents [0].Sender, "sender"); AssertRaises ( () => ( (WindowPattern) childWindow.GetCurrentPattern (WindowPattern.Pattern) ).Close (), "trying to access Current.Name for closed window element"); automationEvents.Clear (); // Exceptions adding event handlers // NOTE: TreeScope.Descendants is also not supported, but doesn't trigger the ArgumentException foreach (var scope in new TreeScope [] { TreeScope.Ancestors, TreeScope.Children, /*TreeScope.Descendants,*/ TreeScope.Element, TreeScope.Parent }) { AssertRaises ( () => SWA.Automation.AddAutomationEventHandler (WindowPattern.WindowClosedEvent, AutomationElement.RootElement, scope, (o, e) => automationEvents.Add (new { Sender = o, Args = e })), "adding WindowClosedEvent handler on RootElement with TreeScope " + scope.ToString ()); } AssertRaises ( () => SWA.Automation.AddAutomationEventHandler (WindowPattern.WindowClosedEvent, button1Element, TreeScope.Element, (o, e) => automationEvents.Add (new { Sender = o, Args = e })), "adding WindowClosedEvent handler on non-Window element"); } #endregion } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/InvokePatternTest.cs0000644000016200001670000001031311433571545031245 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Matt Guo // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using MonoTests.System.Windows.Automation; using At = System.Windows.Automation.Automation; namespace MonoTests.System.Windows.Automation { [TestFixture] public class InvokePatternTest : BaseTest { #region Test Methods [Test] public void InvokeTest () { int eventCount = 0; AutomationEventHandler handler = (o, e) => eventCount++; At.AddAutomationEventHandler (InvokePattern.InvokedEvent, button1Element, TreeScope.Element, handler); InvokePattern pattern = (InvokePattern) button1Element.GetCurrentPattern (InvokePattern.Pattern); pattern.Invoke (); if (Atspi) Thread.Sleep (200); Assert.AreEqual ("button1_click", textbox1Element.GetCurrentPropertyValue (ValuePatternIdentifiers.ValueProperty), "textBox1's text is modified after button1 is clicked"); Assert.AreEqual ("button1_click", label1Element.GetCurrentPropertyValue (AutomationElementIdentifiers.NameProperty), "label1's text is modified after button1 is clicked"); if (Atspi) Assert.AreEqual (1, eventCount, "Invoke event fired"); } [Test] public void InvokeEventTest () { int eventCount = 0; AutomationEventHandler handler = (o, e) => eventCount++; At.AddAutomationEventHandler (InvokePattern.InvokedEvent, button1Element, TreeScope.Element, handler); AssertRaises ( () => At.RemoveAutomationEventHandler (AutomationElementIdentifiers.AutomationPropertyChangedEvent, button1Element, handler), "AutomationPropertyChangedEvent is not valid"); //Shall have no effect. At.RemoveAutomationEventHandler (InvokePattern.InvokedEvent, testFormElement, handler); RunCommand ("click button1"); Assert.AreEqual (1, eventCount, "Invoke event fired"); eventCount = 0; At.RemoveAutomationEventHandler (InvokePattern.InvokedEvent, button1Element, handler); RunCommand ("click button1"); Assert.AreEqual (0, eventCount, "Invoke event not fired"); eventCount = 0; //Test for add the same handler again. At.AddAutomationEventHandler (InvokePattern.InvokedEvent, button1Element, TreeScope.Element, handler); At.AddAutomationEventHandler (InvokePattern.InvokedEvent, button1Element, TreeScope.Element, handler); RunCommand ("click button1"); Assert.AreEqual (2, eventCount, "Invoke event fired"); eventCount = 0; At.RemoveAllEventHandlers (); RunCommand ("click button1"); Assert.AreEqual (0, eventCount, "Invoke event not fired"); } [Test] [ExpectedException("System.Windows.Automation.ElementNotEnabledException")] public void NotEnabledTest () { InvokePattern pattern = (InvokePattern) button3Element.GetCurrentPattern (InvokePatternIdentifiers.Pattern); pattern.Invoke (); } #endregion } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/ConditionTest.cs0000644000016200001670000005152111433571545030410 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using System.Collections.Generic; using System.Globalization; using System.Windows; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; namespace MonoTests.System.Windows.Automation { [TestFixture] public class ConditionTest : BaseTest { [Test] public void TrueConditionTest () { Condition trueCond = Condition.TrueCondition; Assert.IsNotNull (trueCond, "TrueCondition"); PropertyCondition truePropCond = trueCond as PropertyCondition; Assert.IsNull (truePropCond, "TrueCondition is not a PropertyCondition"); AndCondition trueAndCond = trueCond as AndCondition; Assert.IsNull (trueAndCond, "TrueCondition is not a AndCondition"); OrCondition trueOrCond = trueCond as OrCondition; Assert.IsNull (trueOrCond, "TrueCondition is not a OrCondition"); NotCondition trueNotCond = trueCond as NotCondition; Assert.IsNull (trueNotCond, "TrueCondition is not a NotCondition"); } [Test] public void FalseConditionTest () { Condition falseCond = Condition.FalseCondition; Assert.IsNotNull (falseCond, "FalseCondition"); PropertyCondition falsePropCond = falseCond as PropertyCondition; Assert.IsNull (falsePropCond, "FalseCondition is not a PropertyCondition"); AndCondition falseAndCond = falseCond as AndCondition; Assert.IsNull (falseAndCond, "FalseCondition is not a AndCondition"); OrCondition falseOrCond = falseCond as OrCondition; Assert.IsNull (falseOrCond, "FalseCondition is not a OrCondition"); NotCondition falseNotCond = falseCond as NotCondition; Assert.IsNull (falseNotCond, "FalseCondition is not a NotCondition"); } [Test] public void PropertyConditionTest () { AssertRaises ( () => new PropertyCondition (null, null), "passing null to both params of PropertyCondition constructor"); //Load for everything in AEIds VerifyPropertyConditionBasics (AEIds.AcceleratorKeyProperty, new object [] { string.Empty, null }, new object [] { 5 }); VerifyPropertyConditionBasics (AEIds.AccessKeyProperty, new object [] { string.Empty, null }, new object [] { true }); VerifyPropertyConditionBasics (AEIds.AutomationIdProperty, new object [] { string.Empty, null }, new object [] { true }); VerifyPropertyConditionBasics (AEIds.BoundingRectangleProperty, new object [] { Rect.Empty }, new object [] { null, true }, new object [] { new double [] { double.PositiveInfinity, double.PositiveInfinity, double.NegativeInfinity, double.NegativeInfinity } }); VerifyPropertyConditionBasics (AEIds.ClassNameProperty, new object [] { string.Empty, null }, new object [] { true }); VerifyPropertyConditionBasics (AEIds.ClickablePointProperty, new object [] { new Point (0, 0) }, new object [] { null, true }, new object [] { new double [] {0, 0} }); VerifyPropertyConditionBasics (AEIds.ControlTypeProperty, new object [] { ControlType.Button, null }, new object [] { ControlType.Button.Id, string.Empty }, new object [] { ControlType.Button.Id, null }); VerifyPropertyConditionBasics (AEIds.CultureProperty, new object [] { new CultureInfo ("en-US"), new CultureInfo ("fr-FR"), null }, new object [] { new CultureInfo ("en-US").LCID, "en-US", string.Empty, 5 }, new object [] { new CultureInfo ("en-US").LCID, new CultureInfo ("fr-FR").LCID, null }); VerifyPropertyConditionBasics (AEIds.FrameworkIdProperty, new object [] { "WinForm", string.Empty, "hiya", null }, new object [] { 5 }); VerifyPropertyConditionBasics (AEIds.HasKeyboardFocusProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.HelpTextProperty, new object [] { string.Empty, null }, new object [] { true }); VerifyPropertyConditionBasics (AEIds.IsContentElementProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.IsControlElementProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.IsDockPatternAvailableProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.IsEnabledProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.IsExpandCollapsePatternAvailableProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.IsGridItemPatternAvailableProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.IsGridPatternAvailableProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.IsInvokePatternAvailableProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.IsKeyboardFocusableProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.IsMultipleViewPatternAvailableProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.IsOffscreenProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.IsPasswordProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.IsRangeValuePatternAvailableProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.IsRequiredForFormProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.IsScrollItemPatternAvailableProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.IsScrollPatternAvailableProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.IsSelectionItemPatternAvailableProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.IsSelectionPatternAvailableProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.IsTableItemPatternAvailableProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.IsTablePatternAvailableProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.IsTextPatternAvailableProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.IsTogglePatternAvailableProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.IsTransformPatternAvailableProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.IsValuePatternAvailableProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.IsWindowPatternAvailableProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (AEIds.ItemStatusProperty, new object [] { string.Empty, null }, new object [] { true }); VerifyPropertyConditionBasics (AEIds.ItemTypeProperty, new object [] { string.Empty, null }, new object [] { true }); VerifyPropertyConditionBasics (AEIds.LabeledByProperty, new object [] { button1Element, null }, new object [] { string.Empty, true }, new object [] { button1Element.GetRuntimeId (), null }); VerifyPropertyConditionBasics (AEIds.LocalizedControlTypeProperty, new object [] { string.Empty, null }, new object [] { true }); VerifyPropertyConditionBasics (AEIds.NameProperty, new object [] { string.Empty, null }, new object [] { true }); VerifyPropertyConditionBasics (AEIds.NativeWindowHandleProperty, new object [] { 5 }, new object [] { null, string.Empty, true }); VerifyPropertyConditionBasics (AEIds.OrientationProperty, new object [] { OrientationType.Horizontal }, new object [] { null, true }); VerifyPropertyConditionBasics (AEIds.ProcessIdProperty, new object [] { 5 }, new object [] { null, true }); VerifyPropertyConditionBasics (AEIds.RuntimeIdProperty, new object [] { new int [] { 5, 6, 7 }, null }, new object [] { true }); // Load everything for *PatternIdentifiers VerifyPropertyConditionBasics (DockPatternIdentifiers.DockPositionProperty, new object [] { DockPosition.Bottom }, new object [] { null, true }); VerifyPropertyConditionBasics (ExpandCollapsePatternIdentifiers.ExpandCollapseStateProperty, new object [] { ExpandCollapseState.Collapsed }, new object [] { null, true }); VerifyPropertyConditionBasics (GridItemPatternIdentifiers.ColumnProperty, new object [] { 5, -5 }, new object [] { null, true }); VerifyPropertyConditionBasics (GridItemPatternIdentifiers.ColumnSpanProperty, new object [] { 5, -5 }, new object [] { null, true }); VerifyPropertyConditionBasics (GridItemPatternIdentifiers.ContainingGridProperty, new object [] { button1Element, null }, new object [] { true }, new object [] { button1Element.GetRuntimeId (), null }); VerifyPropertyConditionBasics (GridItemPatternIdentifiers.RowProperty, new object [] { 5, -5 }, new object [] { null, true }); VerifyPropertyConditionBasics (GridItemPatternIdentifiers.RowSpanProperty, new object [] { 5, -5 }, new object [] { null, true }); VerifyPropertyConditionBasics (GridPatternIdentifiers.ColumnCountProperty, new object [] { 5, -5 }, new object [] { null, true }); VerifyPropertyConditionBasics (GridPatternIdentifiers.RowCountProperty, new object [] { 5, -5 }, new object [] { null, true }); VerifyPropertyConditionBasics (MultipleViewPatternIdentifiers.CurrentViewProperty, new object [] { 5, -5 }, new object [] { null, true }); VerifyPropertyConditionBasics (MultipleViewPatternIdentifiers.SupportedViewsProperty, new object [] { new int [] { 5, -5 }, new int [] { }, null }, new object [] { true }); VerifyPropertyConditionBasics (RangeValuePatternIdentifiers.IsReadOnlyProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (RangeValuePatternIdentifiers.LargeChangeProperty, new object [] { 5.0, -5.0, 1.2 }, new object [] { null, 5, -5, true }); VerifyPropertyConditionBasics (RangeValuePatternIdentifiers.MaximumProperty, new object [] { 5.0, -5.0, 1.2, 5, -5, true, string.Empty, null }, new object [] { }); VerifyPropertyConditionBasics (RangeValuePatternIdentifiers.MinimumProperty, new object [] { 5.0, -5.0, 1.2, 5, -5, true, string.Empty, null }, new object [] { }); VerifyPropertyConditionBasics (RangeValuePatternIdentifiers.SmallChangeProperty, new object [] { 5.0, -5.0, 1.2 }, new object [] { null, 5, -5, true }); VerifyPropertyConditionBasics (RangeValuePatternIdentifiers.ValueProperty, new object [] { 5.0, -5.0, 1.2 }, new object [] { null, 5, -5, true }); VerifyPropertyConditionBasics (ScrollPatternIdentifiers.HorizontallyScrollableProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (ScrollPatternIdentifiers.HorizontalScrollPercentProperty, new object [] { 5.0, -5.0, 1.2 }, new object [] { null, 5, -5, true }); VerifyPropertyConditionBasics (ScrollPatternIdentifiers.HorizontalViewSizeProperty, new object [] { 5.0, -5.0, 1.2 }, new object [] { null, 5, -5, true }); VerifyPropertyConditionBasics (ScrollPatternIdentifiers.VerticallyScrollableProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (ScrollPatternIdentifiers.VerticalScrollPercentProperty, new object [] { 5.0, -5.0, 1.2 }, new object [] { null, 5, -5, true }); VerifyPropertyConditionBasics (ScrollPatternIdentifiers.VerticalViewSizeProperty, new object [] { 5.0, -5.0, 1.2 }, new object [] { null, 5, -5, true }); VerifyPropertyConditionBasics (SelectionItemPatternIdentifiers.IsSelectedProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (SelectionItemPatternIdentifiers.SelectionContainerProperty, new object [] { button1Element, null }, new object [] { true }, new object [] { button1Element.GetRuntimeId (), null }); VerifyPropertyConditionBasics (SelectionPatternIdentifiers.CanSelectMultipleProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (SelectionPatternIdentifiers.IsSelectionRequiredProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (SelectionPatternIdentifiers.SelectionProperty, new object [] { new AutomationElement [] { button1Element }, null }, new object [] { button1Element, true }); VerifyPropertyConditionBasics (TableItemPatternIdentifiers.ColumnHeaderItemsProperty, new object [] { new AutomationElement [] { button1Element }, null }, new object [] { button1Element, true }); VerifyPropertyConditionBasics (TableItemPatternIdentifiers.RowHeaderItemsProperty, new object [] { new AutomationElement [] { button1Element }, null }, new object [] { button1Element, true }); VerifyPropertyConditionBasics (TablePatternIdentifiers.ColumnHeadersProperty, new object [] { new AutomationElement [] { button1Element }, null }, new object [] { button1Element, true }); VerifyPropertyConditionBasics (TablePatternIdentifiers.RowHeadersProperty, new object [] { new AutomationElement [] { button1Element }, null }, new object [] { button1Element, true }); VerifyPropertyConditionBasics (TablePatternIdentifiers.RowOrColumnMajorProperty, new object [] { RowOrColumnMajor.ColumnMajor, AutomationElement.NotSupported }, new object [] { null, true }); VerifyPropertyConditionBasics (TogglePatternIdentifiers.ToggleStateProperty, new object [] { ToggleState.Indeterminate }, new object [] { null, true }); VerifyPropertyConditionBasics (TransformPatternIdentifiers.CanMoveProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (TransformPatternIdentifiers.CanResizeProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (TransformPatternIdentifiers.CanRotateProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (ValuePatternIdentifiers.IsReadOnlyProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (ValuePatternIdentifiers.ValueProperty, new object [] { string.Empty, null }, new object [] { 5, true }); VerifyPropertyConditionBasics (WindowPatternIdentifiers.CanMaximizeProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (WindowPatternIdentifiers.CanMinimizeProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (WindowPatternIdentifiers.IsModalProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (WindowPatternIdentifiers.IsTopmostProperty, new object [] { true }, new object [] { null, string.Empty }); VerifyPropertyConditionBasics (WindowPatternIdentifiers.WindowInteractionStateProperty, new object [] { WindowInteractionState.BlockedByModalWindow }, new object [] { null, true }); VerifyPropertyConditionBasics (WindowPatternIdentifiers.WindowVisualStateProperty, new object [] { WindowVisualState.Maximized }, new object [] { null, true }); Assert.IsNotNull (button1Element.FindFirst (TreeScope.Element, new PropertyCondition (AEIds.NameProperty, "button1"))); Assert.IsNull (button1Element.FindFirst (TreeScope.Element, new PropertyCondition (AEIds.NameProperty, "Button1"))); Assert.IsNull (button1Element.FindFirst (TreeScope.Element, new PropertyCondition (AEIds.NameProperty, "Button1", PropertyConditionFlags.None))); Assert.IsNotNull (button1Element.FindFirst (TreeScope.Element, new PropertyCondition (AEIds.NameProperty, "Button1", PropertyConditionFlags.IgnoreCase))); PropertyCondition cond1 = new PropertyCondition (AEIds.NameProperty, string.Empty); PropertyCondition cond2 = new PropertyCondition (AEIds.NameProperty, string.Empty); Assert.AreNotEqual (cond1, cond2); } private void VerifyPropertyConditionBasics (AutomationProperty property, object [] expectedGoodValues, object [] expectedBadValues) { VerifyPropertyConditionBasics (property, expectedGoodValues, expectedBadValues, expectedGoodValues); } private void VerifyPropertyConditionBasics (AutomationProperty property, object [] expectedGoodValues, object [] expectedBadValues, object [] expectedGoodValuePropValues) { Assert.AreEqual (expectedGoodValues.Length, expectedGoodValuePropValues.Length, "Cannot test PropertyConditon Value property if expectedGoodValues.Length != expectedGoodValuePropValues.Length"); List goodVals = new List (expectedGoodValues); goodVals.Add (AutomationElement.NotSupported); List goodValPropVals = new List (expectedGoodValuePropValues); goodValPropVals.Add (AutomationElement.NotSupported); for (int i = 0; i < goodVals.Count; i++) { object val = goodVals [i]; object expectedPropVal = goodValPropVals [i]; VerifyPropertyConditionConstructor (property, val, expectedPropVal, null); VerifyPropertyConditionConstructor (property, val, expectedPropVal, PropertyConditionFlags.None); VerifyPropertyConditionConstructor (property, val, expectedPropVal, PropertyConditionFlags.IgnoreCase); } foreach (object val in expectedBadValues) { AssertRaises ( () => new PropertyCondition (property, val), string.Format ("using '{0}' as value for {1}", val ?? "(null)", property.ProgrammaticName)); } } private void VerifyPropertyConditionConstructor (AutomationProperty property, object val, object expectedPropVal, PropertyConditionFlags? flags) { bool exceptionRaised = false; bool ignoreCaseAllowed = val is string; bool exceptionExpected = flags.HasValue && flags.Value == PropertyConditionFlags.IgnoreCase && !ignoreCaseAllowed; try { PropertyCondition cond; if (flags.HasValue) cond = new PropertyCondition (property, val, flags.Value); else cond = new PropertyCondition (property, val); Assert.AreEqual (property, cond.Property, "PropertyCondition.Property"); Assert.AreEqual (expectedPropVal, cond.Value, "PropertyCondition.Value for " + property.ProgrammaticName); Assert.AreEqual (flags.HasValue ? flags.Value : PropertyConditionFlags.None, cond.Flags, "PropertyCondition.Flags"); } catch (ArgumentException) { exceptionRaised = true; } Assert.AreEqual (exceptionExpected, exceptionRaised, string.Format ("For {0} expected '{1}' with {2} to be a {3}", property.ProgrammaticName, val ?? "(null)", flags.HasValue ? flags.Value.ToString () : "no flag specified", exceptionExpected ? "bad value" : "good value, but instead received ArgumentException")); } } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/SelectionPatternTest.cs0000644000016200001670000002545711433571545031756 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Linq; using System.Collections.Generic; using System.Diagnostics; using System.Threading; //using System.Windows; using System.Windows.Automation; using At = System.Windows.Automation.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace MonoTests.System.Windows.Automation { // FIXME: This class doesn't test CanSelectMultiple nor IsSelectionRequired, // at-spi2 doesn't expose them [TestFixture] public class SelectionPatternTest : BaseTest { AutomationElement child1Element; AutomationElement child2Element; AutomationElement child3Element; AutomationElement child4Element; protected override void CustomFixtureSetUp () { base.CustomFixtureSetUp (); child1Element = treeView1Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.TreeItem)); Assert.IsNotNull (child1Element, "Child element should not be null"); child2Element = TreeWalker.RawViewWalker.GetNextSibling (child1Element); Assert.IsNotNull (child2Element, "Child element should not be null"); // TODO: Change next line back to Children when // "default group" bug is fixed (BGO#578897) child3Element = listView1Element.FindFirst (TreeScope.Descendants, new PropertyCondition (AEIds.NameProperty, "Item 0")); Assert.IsNotNull (child3Element, "ListView.Child #0"); child4Element = listView1Element.FindFirst (TreeScope.Descendants, new PropertyCondition (AEIds.NameProperty, "Item 1")); Assert.IsNotNull (child4Element, "ListView.Child #1"); } #region Test Methods [Test] public void SelectionTest () { SelectionPattern pattern = (SelectionPattern) treeView1Element.GetCurrentPattern (SelectionPatternIdentifiers.Pattern); Assert.IsNotNull (pattern, "selectionPattern should not be null"); SelectionPattern.SelectionPatternInformation current = pattern.Current; AutomationElement [] selection = current.GetSelection (); Assert.AreEqual (0, selection.Length, "Selection length"); SelectionItemPattern selectionItemPattern = (SelectionItemPattern) child1Element.GetCurrentPattern (SelectionItemPatternIdentifiers.Pattern); selectionItemPattern.Select (); if (Atspi) Thread.Sleep (500); selection = current.GetSelection (); Assert.AreEqual (1, selection.Length, "Selection length"); Assert.AreEqual (child1Element, selection [0], "Selection should contain child1Element"); if (Atspi) { Assert.IsFalse (current.IsSelectionRequired, "IsSelectionRequired"); } else { Assert.IsTrue (current.IsSelectionRequired, "IsSelectionRequired"); try { selectionItemPattern.RemoveFromSelection (); Assert.Fail ("expected InvalidOperationException"); } catch (InvalidOperationException) { // expected } } selectionItemPattern = (SelectionItemPattern) child2Element.GetCurrentPattern (SelectionItemPatternIdentifiers.Pattern); selectionItemPattern.Select (); selection = current.GetSelection (); Assert.AreEqual (1, selection.Length, "Selection length"); Assert.AreEqual (child2Element, selection [0], "Selection should contain childElement"); } [Test] public void Z_PropertyEventTest () { var automationEventsArray = new [] { new {Sender = (object) null, Args = (AutomationPropertyChangedEventArgs) null}}; var automationEvents = automationEventsArray.ToList (); automationEvents.Clear (); AutomationPropertyChangedEventHandler handler = (o, e) => automationEvents.Add (new { Sender = o, Args = e }); SelectionItemPattern item1 = (SelectionItemPattern) child1Element.GetCurrentPattern (SelectionItemPatternIdentifiers.Pattern); item1.Select (); At.AddAutomationPropertyChangedEventHandler (treeView1Element, TreeScope.Subtree, handler, SelectionItemPattern.IsSelectedProperty); SelectionItemPattern item2 = (SelectionItemPattern) child2Element.GetCurrentPattern (SelectionItemPatternIdentifiers.Pattern); item2.Select (); Thread.Sleep (500); At.RemoveAutomationPropertyChangedEventHandler (treeView1Element, handler); if (Atspi) { Assert.AreEqual (2, automationEvents.Count, "event count"); Assert.AreEqual (child1Element, automationEvents [0].Sender, "event sender"); Assert.AreEqual (false, automationEvents [0].Args.NewValue, "new Value"); Assert.AreEqual (true, automationEvents [0].Args.OldValue, "old Value"); Assert.AreEqual (child2Element, automationEvents [1].Sender, "event sender"); Assert.AreEqual (true, automationEvents [1].Args.NewValue, "new Value"); Assert.AreEqual (false, automationEvents [1].Args.OldValue, "old Value"); } else { // TODO: This all seems wrong; test again with Windows 7 Assert.AreEqual (1, automationEvents.Count, "event count"); Assert.AreEqual (child2Element, automationEvents [0].Sender, "event sender"); Assert.AreEqual (true, automationEvents [0].Args.NewValue, "new Value"); Assert.IsNull (automationEvents [0].Args.OldValue, "old Value"); } automationEvents.Clear (); item1.Select (); Thread.Sleep (500); Assert.AreEqual (0, automationEvents.Count, "event count"); } [Test] public void Z_AutomationEventTest () { var automationEventsArray = new [] { new {Sender = (object) null, Args = (AutomationEventArgs) null}}; var automationEvents = automationEventsArray.ToList (); automationEvents.Clear (); AutomationEventHandler handler = (o, e) => automationEvents.Add (new { Sender = o, Args = e }); SelectionItemPattern item1 = (SelectionItemPattern) child1Element.GetCurrentPattern (SelectionItemPatternIdentifiers.Pattern); item1.Select (); AutomationEvent eventId = SelectionItemPattern.ElementSelectedEvent; At.AddAutomationEventHandler (eventId, treeView1Element, TreeScope.Descendants, handler); SelectionItemPattern item2 = (SelectionItemPattern) child2Element.GetCurrentPattern (SelectionItemPatternIdentifiers.Pattern); item2.Select (); Thread.Sleep (500); At.RemoveAutomationEventHandler (eventId, treeView1Element, handler); Assert.AreEqual (1, automationEvents.Count, "event count"); Assert.AreEqual (child2Element, automationEvents [0].Sender, "event sender"); Assert.AreEqual (SelectionItemPattern.ElementSelectedEvent, automationEvents [0].Args.EventId, "EventId"); automationEvents.Clear (); item1.Select (); Thread.Sleep (500); Assert.AreEqual (0, automationEvents.Count, "event count"); } [Test] public void PropertySelectionEventTest () { var automationEventsArray = new[] { new { Sender = (object) null, Args = (AutomationPropertyChangedEventArgs) null }}; var automationEvents = automationEventsArray.ToList (); automationEvents.Clear (); AutomationPropertyChangedEventHandler handler = (o, e) => automationEvents.Add (new { Sender = o, Args = e }); SelectionItemPattern item1 = (SelectionItemPattern) child3Element.GetCurrentPattern (SelectionItemPatternIdentifiers.Pattern); SelectionItemPattern item2 = (SelectionItemPattern) child4Element.GetCurrentPattern (SelectionItemPatternIdentifiers.Pattern); At.AddAutomationPropertyChangedEventHandler (listView1Element, TreeScope.Element, handler, SelectionPattern.SelectionProperty); // FIXME: Isolate this conditional if (Atspi) { item1.Select (); Thread.Sleep (500); Assert.AreEqual (1, automationEvents.Count, "#0"); Assert.AreEqual (listView1Element, automationEvents [0].Sender, "#1"); AutomationElement[] oldValue = automationEvents [0].Args.OldValue as AutomationElement[]; Assert.IsNotNull (oldValue, "#2"); Assert.AreEqual (0, oldValue.Length, "#3"); AutomationElement[] newValue = automationEvents [0].Args.NewValue as AutomationElement[]; Assert.IsNotNull (newValue, "#4"); Assert.AreEqual (1, newValue.Length, "#5"); Assert.AreEqual (child3Element, newValue [0], "#6"); automationEvents.Clear (); item2.Select (); Thread.Sleep (500); // We have 2 events bacause Select firs deselects all elements and then selects the item Assert.AreEqual (2, automationEvents.Count, "#7"); Assert.AreEqual (listView1Element, automationEvents [0].Sender, "#8"); // First event: deselected-element event oldValue = automationEvents [0].Args.OldValue as AutomationElement[]; Assert.IsNotNull (oldValue, "#9"); Assert.AreEqual (1, oldValue.Length, "#10"); Assert.AreEqual (child3Element, newValue [0], "#11"); newValue = automationEvents [0].Args.NewValue as AutomationElement[]; Assert.IsNotNull (newValue, "#12"); Assert.AreEqual (0, newValue.Length, "#13"); // Second event: selected-element event oldValue = automationEvents [1].Args.OldValue as AutomationElement[]; Assert.IsNotNull (oldValue, "#14"); Assert.AreEqual (0, oldValue.Length, "#15"); newValue = automationEvents [1].Args.NewValue as AutomationElement[]; Assert.IsNotNull (newValue, "#16"); Assert.AreEqual (1, newValue.Length, "#17"); Assert.AreEqual (child4Element, newValue [0], "#18"); } else { item1.Select (); Thread.Sleep (500); // LAMESPEC: SelectionProperty not raised Assert.AreEqual (0, automationEvents.Count, "event count #0"); item2.Select (); Thread.Sleep (500); // LAMESPEC: SelectionProperty not raised Assert.AreEqual (0, automationEvents.Count, "event count #1"); } At.RemoveAutomationPropertyChangedEventHandler (listView1Element, handler); automationEvents.Clear (); item1.Select (); Thread.Sleep (500); Assert.AreEqual (0, automationEvents.Count, "event count"); } #endregion } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/ExpandCollapsePatternTest.cs0000644000016200001670000001375511433571545032731 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.Windows.Automation; using System.Linq; using At = System.Windows.Automation.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace MonoTests.System.Windows.Automation { [TestFixture] public class ExpandCollapsePatternTest : BaseTest { #region Test Methods [Test] public void ExpandCollapseTest () { AutomationElement parentElement, childElement; parentElement = treeView1Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.TreeItem)); ExpandCollapsePattern pattern = (ExpandCollapsePattern) parentElement.GetCurrentPattern (ExpandCollapsePatternIdentifiers.Pattern); ExpandCollapsePattern.ExpandCollapsePatternInformation current = pattern.Current; Assert.AreEqual (ExpandCollapseState.Collapsed, current.ExpandCollapseState, "ExpandCollapseState before Expand"); pattern.Expand (); if (Atspi) Thread.Sleep (500); Assert.AreEqual (ExpandCollapseState.Expanded, current.ExpandCollapseState, "ExpandCollapseState after Expand"); childElement = parentElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.TreeItem)); Assert.IsNotNull (childElement, "Should have a TreeItem after expand"); pattern.Collapse (); if (Atspi) Thread.Sleep (500); Assert.AreEqual (ExpandCollapseState.Collapsed, current.ExpandCollapseState, "ExpandCollapseState after Collapse"); } [Test] [ExpectedException("System.Windows.Automation.ElementNotEnabledException")] public void Z_NotEnabledTest () { DisableControls (); AutomationElement parentElement; parentElement = treeView1Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.TreeItem)); ExpandCollapsePattern pattern = (ExpandCollapsePattern) parentElement.GetCurrentPattern (ExpandCollapsePatternIdentifiers.Pattern); ExpandCollapsePattern.ExpandCollapsePatternInformation current = pattern.Current; Assert.AreEqual (ExpandCollapseState.Collapsed, current.ExpandCollapseState, "ExpandCollapseState before Collapse"); pattern.Expand (); } [Test] public void Z_EventTest () { AutomationElement parentElement; parentElement = treeView1Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.TreeItem)); ExpandCollapsePattern pattern = (ExpandCollapsePattern) parentElement.GetCurrentPattern (ExpandCollapsePatternIdentifiers.Pattern); pattern.Collapse (); var propertyEventsArray = new [] { new {Sender = (object) null, Args = (AutomationPropertyChangedEventArgs) null}}; var propertyEvents = propertyEventsArray.ToList (); propertyEvents.Clear (); AutomationPropertyChangedEventHandler propertyHandler = (o, e) => propertyEvents.Add (new { Sender = o, Args = e }); At.AddAutomationPropertyChangedEventHandler (parentElement, TreeScope.Element, propertyHandler, ExpandCollapsePattern.ExpandCollapseStateProperty); pattern.Expand (); Thread.Sleep (100); Assert.AreEqual (1, propertyEvents.Count, "event count"); Assert.AreEqual (parentElement, propertyEvents [0].Sender, "event sender"); Assert.AreEqual (ExpandCollapsePattern.ExpandCollapseStateProperty, propertyEvents [0].Args.Property, "property"); if (Atspi) { Assert.AreEqual (ExpandCollapseState.Collapsed, propertyEvents [0].Args.OldValue, "old value"); Assert.AreEqual (ExpandCollapseState.Expanded, propertyEvents [0].Args.NewValue, "new value"); } else { Assert.AreEqual (null, propertyEvents [0].Args.OldValue, "old value"); Assert.AreEqual (1, propertyEvents [0].Args.NewValue, "new value"); } propertyEvents.Clear (); pattern.Collapse (); Thread.Sleep (100); Assert.AreEqual (1, propertyEvents.Count, "event count"); Assert.AreEqual (parentElement, propertyEvents [0].Sender, "event sender"); Assert.AreEqual (ExpandCollapsePattern.ExpandCollapseStateProperty, propertyEvents [0].Args.Property, "property"); if (Atspi) { Assert.AreEqual (ExpandCollapseState.Expanded, propertyEvents [0].Args.OldValue, "old value"); Assert.AreEqual (ExpandCollapseState.Collapsed, propertyEvents [0].Args.NewValue, "new value"); } else { Assert.AreEqual (null, propertyEvents [0].Args.OldValue, "old value"); Assert.AreEqual (0, propertyEvents [0].Args.NewValue, "new value"); } propertyEvents.Clear (); pattern.Collapse (); Thread.Sleep (100); Assert.AreEqual (0, propertyEvents.Count, "event count when collapsing but already collapsed"); } #endregion } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/AutomationElementTest.cs0000644000016200001670000016633711433571545032130 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.Windows; using System.Windows.Automation; using At = System.Windows.Automation.Automation; using System.Linq; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; namespace MonoTests.System.Windows.Automation { [TestFixture] public class AutomationElementTest : BaseTest { #region Test Methods [Test] public void AcceleratorKeyTest () { Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.AcceleratorKeyProperty), button1Element.Current.AcceleratorKey, "button1 AutomationElementInformation vs GetCurrentPropertyValue"); if (Atspi) Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.AcceleratorKeyProperty, true), button1Element.Current.AcceleratorKey, "button1 AutomationElementInformation vs GetCurrentPropertyValue w/ignoreDefault"); // TODO: Complete actual test (mostly unimplemented in Linux right now) } [Test] public void AccessKeyTest () { Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.AccessKeyProperty), button1Element.Current.AccessKey, "button1 AutomationElementInformation vs GetCurrentPropertyValue"); if (Atspi) Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.AccessKeyProperty, true), button1Element.Current.AccessKey, "button1 AutomationElementInformation vs GetCurrentPropertyValue w/ignoreDefault"); Assert.AreEqual ("Alt+u", button1Element.Current.AccessKey, "button1"); Assert.AreEqual (String.Empty, button2Element.Current.AccessKey, "button2"); } [Test] public void AutomationIdTest () { Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.AutomationIdProperty), button1Element.Current.AutomationId, "button1 AutomationElementInformation vs GetCurrentPropertyValue"); if (Atspi) Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.AutomationIdProperty, true), button1Element.Current.AutomationId, "button1 AutomationElementInformation vs GetCurrentPropertyValue w/ignoreDefault"); // TODO: Complete actual test (implemented incorrectly in Linux right now) } [Test] public void BoundingRectangleTest () { Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.BoundingRectangleProperty), button1Element.Current.BoundingRectangle, "button1 AutomationElementInformation vs GetCurrentPropertyValue"); if (Atspi) Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.BoundingRectangleProperty, true), button1Element.Current.BoundingRectangle, "button1 AutomationElementInformation vs GetCurrentPropertyValue w/ignoreDefault"); // TODO: Coordinates, not just size (not matching in Linux yet) Rect button2Rect = button2Element.Current.BoundingRectangle; if (!Atspi) { Assert.AreEqual (128, button2Rect.Width, "button2 width"); Assert.AreEqual (23, button2Rect.Height, "button2 height"); } Rect button3Rect = button3Element.Current.BoundingRectangle; if (!Atspi) { Assert.AreEqual (75, button3Rect.Width, "button3 width"); Assert.AreEqual (23, button3Rect.Height, "button3 height"); } var propertyEventsArray = new [] { new {Sender = (object) null, Args = (AutomationPropertyChangedEventArgs) null}}; var propertyEvents = propertyEventsArray.ToList (); propertyEvents.Clear (); AutomationElement element = (Atspi ? treeView1Element : testFormElement); AutomationPropertyChangedEventHandler handler = (o, e) => propertyEvents.Add (new { Sender = o, Args = e }); At.AddAutomationPropertyChangedEventHandler (element, TreeScope.Element, handler, AutomationElement.BoundingRectangleProperty); if (Atspi) { AutomationElement parentElement; parentElement = treeView1Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.TreeItem)); ExpandCollapsePattern pattern = (ExpandCollapsePattern) parentElement.GetCurrentPattern (ExpandCollapsePatternIdentifiers.Pattern); pattern.Expand (); } else RunCommand ("MoveTo.Origin"); Thread.Sleep(1000); Assert.AreEqual (1, propertyEvents.Count, "event count"); Assert.AreEqual (element, propertyEvents [0].Sender, "event sender"); Assert.AreEqual (AutomationElement.BoundingRectangleProperty, propertyEvents [0].Args.Property, "property"); Assert.AreEqual (Rect.Empty, propertyEvents [0].Args.OldValue, "old value"); Assert.AreNotEqual (Rect.Empty, propertyEvents [0].Args.NewValue, "new value"); } [Test] public void ClassNameTest () { Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.ClassNameProperty), button1Element.Current.ClassName, "button1 AutomationElementInformation vs GetCurrentPropertyValue"); // TODO: Complete actual test (totally unimplemented in Linux right now) } [Test] public void ControlTypeTest () { Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.ControlTypeProperty), button1Element.Current.ControlType, "button1 AutomationElementInformation vs GetCurrentPropertyValue"); if (Atspi) Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.ControlTypeProperty, true), button1Element.Current.ControlType, "button1 AutomationElementInformation vs GetCurrentPropertyValue w/ignoreDefault"); Assert.AreEqual (ControlType.Window, testFormElement.Current.ControlType, "window"); Assert.AreEqual (ControlType.Button, button3Element.Current.ControlType, "button3"); } [Test] [Ignore ("Not implemented, not sure how to test on Windows")] public void CultureTest () { // TODO: How to test actual values in Windows? //Assert.AreEqual (new CultureInfo ("en-US"), // testFormElement.GetCurrentPropertyValue (AEIds.CultureProperty), // "button1 Culture"); } [Test] public void FrameworkIdTest () { Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.FrameworkIdProperty), button1Element.Current.FrameworkId, "button1 AutomationElementInformation vs GetCurrentPropertyValue"); if (Atspi) Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.FrameworkIdProperty, true), button1Element.Current.FrameworkId, "button1 AutomationElementInformation vs GetCurrentPropertyValue w/ignoreDefault"); Assert.AreEqual ("WinForm", testFormElement.Current.FrameworkId, "window"); Assert.AreEqual ("WinForm", label1Element.Current.FrameworkId, "label1"); } [Test] public void GetCurrentPropertyValueTest () { // A typical supported property VerifyCurrentPropertyValue (testFormElement, AEIds.NameProperty, "TestForm1", "TestForm1", "TestForm1"); // A typical unsupported property VerifyCurrentPropertyValue (testFormElement, AEIds.OrientationProperty, AutomationElement.NotSupported, OrientationType.None, OrientationType.None); // TODO: Additional things to test (when pattern support implemented) // 2. Supported pattern props, true/false/default // 3. Unsupported pattern proprs, true/false/default } [Test] public void GetCurrentPatternExceptionTest () { AssertRaises ( () => testFormElement.GetCurrentPattern (InvokePattern.Pattern), "calling GetCurrentPattern with unsupported pattern"); AssertRaises ( () => testFormElement.GetCurrentPattern (null), "calling GetCurrentPattern with null pattern"); } [Test] public void HasKeyboardFocusTest () { Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.HasKeyboardFocusProperty), button1Element.Current.HasKeyboardFocus, "button1 AutomationElementInformation vs GetCurrentPropertyValue"); if (Atspi) Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.HasKeyboardFocusProperty, true), button1Element.Current.HasKeyboardFocus, "button1 AutomationElementInformation vs GetCurrentPropertyValue w/ignoreDefault"); var propertyEventsArray = new [] { new {Sender = (object) null, Args = (AutomationPropertyChangedEventArgs) null}}; var propertyEvents = propertyEventsArray.ToList (); propertyEvents.Clear (); AutomationPropertyChangedEventHandler propertyHandler = (o, e) => propertyEvents.Add (new { Sender = o, Args = e }); At.AddAutomationPropertyChangedEventHandler (button2Element, TreeScope.Element, propertyHandler, AutomationElement.HasKeyboardFocusProperty); button2Element.SetFocus (); Thread.Sleep (100); Assert.IsFalse (button1Element.Current.HasKeyboardFocus, "button1, no focus"); Assert.AreEqual (1, propertyEvents.Count, "event count"); Assert.AreEqual (button2Element, propertyEvents [0].Sender, "event sender"); Assert.AreEqual (AutomationElement.HasKeyboardFocusProperty, propertyEvents [0].Args.Property, "property"); Assert.AreEqual (true, propertyEvents [0].Args.NewValue, "new value"); Assert.AreEqual (false, propertyEvents [0].Args.OldValue, "old value"); propertyEvents.Clear (); button1Element.SetFocus (); Thread.Sleep (100); Assert.IsTrue (button1Element.Current.HasKeyboardFocus, "button1, w/ focus"); Assert.AreEqual (0, propertyEvents.Count, "event count"); //Assert.AreEqual (1, propertyEvents.Count, "event count"); //Assert.AreEqual (button2Element, propertyEvents [0].Sender, "event sender"); //Assert.AreEqual (AutomationElement.HasKeyboardFocusProperty, propertyEvents [0].Args.Property, "property"); //Assert.AreEqual (false, propertyEvents [0].Args.NewValue, "new value"); //Assert.AreEqual (true, propertyEvents [0].Args.OldValue, "old value"); At.RemoveAutomationPropertyChangedEventHandler (button2Element, propertyHandler); } [Test] public void HelpTextTest () { Assert.AreEqual (button3Element.GetCurrentPropertyValue (AEIds.HelpTextProperty), button3Element.Current.HelpText, "button3 AutomationElementInformation vs GetCurrentPropertyValue"); if (Atspi) Assert.AreEqual (button3Element.GetCurrentPropertyValue (AEIds.HelpTextProperty, true), button3Element.Current.HelpText, "button3 AutomationElementInformation vs GetCurrentPropertyValue w/ignoreDefault"); Assert.AreEqual ("help text 3", button3Element.Current.HelpText, "button3"); Assert.AreEqual (String.Empty, button1Element.Current.HelpText, "button1"); var propertyEventsArray = new [] { new {Sender = (object) null, Args = (AutomationPropertyChangedEventArgs) null}}; var propertyEvents = propertyEventsArray.ToList (); propertyEvents.Clear (); AutomationPropertyChangedEventHandler handler = (o, e) => propertyEvents.Add (new { Sender = o, Args = e }); At.AddAutomationPropertyChangedEventHandler (button3Element, TreeScope.Element, handler, AutomationElement.NameProperty); RunCommand ("change button3 helptext"); Assert.AreEqual ("plugh", button3Element.Current.HelpText, "HelpText after set"); Assert.AreEqual (0, propertyEvents.Count, "event count"); //Assert.AreEqual (1, propertyEvents.Count, "event count"); //Assert.AreEqual (button3Element, propertyEvents [0].Sender, "event sender"); //Assert.AreEqual (AutomationElement.HelpTextProperty, propertyEvents [0].Args.Property, "property"); //Assert.AreEqual ("plugh", propertyEvents [0].Args.NewValue, "new value"); //Assert.AreEqual ("help text 3", propertyEvents [0].Args.OldValue, "old value"); At.RemoveAutomationPropertyChangedEventHandler (button3Element, handler); } [Test] public void IsContentTest () { Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.IsContentElementProperty), button1Element.Current.IsContentElement, "button1 AutomationElementInformation vs GetCurrentPropertyValue"); Assert.IsTrue (testFormElement.Current.IsContentElement, "window"); if (Atspi) Assert.IsTrue (label1Element.Current.IsContentElement, "label1"); else // this is weird; not replicating it in Atspi Assert.IsFalse (label1Element.Current.IsContentElement, "label1"); } [Test] public void IsControlTest () { Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.IsControlElementProperty), button1Element.Current.IsControlElement, "button1 AutomationElementInformation vs GetCurrentPropertyValue"); Assert.IsTrue (testFormElement.Current.IsControlElement, "window"); Assert.IsTrue (label1Element.Current.IsControlElement, "label1"); } [Test] public void IsEnabledTest () { Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.IsEnabledProperty), button1Element.Current.IsEnabled, "button1 AutomationElementInformation vs GetCurrentPropertyValue"); if (Atspi) Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.IsEnabledProperty, true), button1Element.Current.IsEnabled, "button1 AutomationElementInformation vs GetCurrentPropertyValue w/ignoreDefault"); Assert.IsTrue (testFormElement.Current.IsEnabled, "window"); Assert.IsTrue (label1Element.Current.IsEnabled, "label1"); Assert.IsTrue (groupBox1Element.Current.IsEnabled, "groupBox1"); Assert.IsTrue (button1Element.Current.IsEnabled, "button1"); Assert.IsTrue (button2Element.Current.IsEnabled, "button2"); Assert.IsFalse (button3Element.Current.IsEnabled, "button3"); var propertyEventsArray = new [] { new {Sender = (object) null, Args = (AutomationPropertyChangedEventArgs) null}}; var propertyEvents = propertyEventsArray.ToList (); propertyEvents.Clear (); AutomationPropertyChangedEventHandler handler = (o, e) => propertyEvents.Add (new { Sender = o, Args = e }); At.AddAutomationPropertyChangedEventHandler (button3Element, TreeScope.Element, handler, AutomationElement.IsEnabledProperty); RunCommand ("enable button3"); if (Atspi) Thread.Sleep (100); Assert.AreEqual (1, propertyEvents.Count, "event count"); Assert.AreEqual (button3Element, propertyEvents [0].Sender, "event sender"); Assert.AreEqual (AutomationElement.IsEnabledProperty, propertyEvents [0].Args.Property, "property"); Assert.AreEqual (true, propertyEvents [0].Args.NewValue, "new value"); Assert.AreEqual (false, propertyEvents [0].Args.OldValue, "old value"); RunCommand ("disable button3"); At.RemoveAutomationPropertyChangedEventHandler (button3Element, handler); } [Test] public void IsKeyboardFocusableTest () { Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.IsKeyboardFocusableProperty), button1Element.Current.IsKeyboardFocusable, "button1 AutomationElementInformation vs GetCurrentPropertyValue"); if (Atspi) Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.IsKeyboardFocusableProperty, true), button1Element.Current.IsKeyboardFocusable, "button1 AutomationElementInformation vs GetCurrentPropertyValue w/ignoreDefault"); Assert.IsTrue (testFormElement.Current.IsKeyboardFocusable, "window"); Assert.IsFalse (label1Element.Current.IsKeyboardFocusable, "label1"); Assert.IsFalse (groupBox1Element.Current.IsKeyboardFocusable, "groupBox1"); Assert.IsTrue (button1Element.Current.IsKeyboardFocusable, "button1"); Assert.IsTrue (button2Element.Current.IsKeyboardFocusable, "button2"); Assert.IsFalse (button3Element.Current.IsKeyboardFocusable, "button3"); } [Test] public void IsOffscreenTest () { Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.IsOffscreenProperty), button1Element.Current.IsOffscreen, "button1 AutomationElementInformation vs GetCurrentPropertyValue"); if (Atspi) Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.IsOffscreenProperty, true), button1Element.Current.IsOffscreen, "button1 AutomationElementInformation vs GetCurrentPropertyValue w/ignoreDefault"); // TODO: Complete actual test (requires pattern support to move window) } [Test] public void IsPasswordTest () { Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.IsPasswordProperty), button1Element.Current.IsPassword, "button1 AutomationElementInformation vs GetCurrentPropertyValue"); if (Atspi) Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.IsPasswordProperty, true), button1Element.Current.IsPassword, "button1 AutomationElementInformation vs GetCurrentPropertyValue w/ignoreDefault"); Assert.IsFalse (textbox1Element.Current.IsPassword, "textbox1"); Assert.IsTrue (textbox2Element.Current.IsPassword, "textbox2"); } [Test] public void IsRequiredForFormTest () { Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.IsRequiredForFormProperty), button1Element.Current.IsRequiredForForm, "button1 AutomationElementInformation vs GetCurrentPropertyValue"); // TODO: Complete actual test (totally unimplemented in Linux right now) } [Test] public void ItemStatusTest () { Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.ItemStatusProperty), button1Element.Current.ItemStatus, "button1 AutomationElementInformation vs GetCurrentPropertyValue"); // TODO: Complete actual test (totally unimplemented in Linux right now) } [Test] public void ItemTypeTest () { Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.ItemTypeProperty), button1Element.Current.ItemType, "button1 AutomationElementInformation vs GetCurrentPropertyValue"); // TODO: Complete actual test (totally unimplemented in Linux right now) } [Test] public void LabeledByTest () { Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.LabeledByProperty), button1Element.Current.LabeledBy, "button1 AutomationElementInformation vs GetCurrentPropertyValue"); if (Atspi) Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.LabeledByProperty, true), button1Element.Current.LabeledBy, "button1 AutomationElementInformation vs GetCurrentPropertyValue w/ignoreDefault"); Assert.AreEqual (label1Element, button1Element.Current.LabeledBy, "button1"); Assert.AreEqual (null, button2Element.Current.LabeledBy, "button2"); Assert.AreEqual (null, textbox1Element.Current.LabeledBy, "textbox1"); Assert.AreEqual (null, textbox2Element.Current.LabeledBy, "textbox2Element"); } [Test] public void LocalizedControlTypeTest () { Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.LocalizedControlTypeProperty), button1Element.Current.LocalizedControlType, "button1 AutomationElementInformation vs GetCurrentPropertyValue"); if (Atspi) Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.LocalizedControlTypeProperty, true), button1Element.Current.LocalizedControlType, "button1 AutomationElementInformation vs GetCurrentPropertyValue w/ignoreDefault"); Assert.AreEqual (ControlType.Window.LocalizedControlType, testFormElement.Current.LocalizedControlType, "window"); Assert.AreEqual (ControlType.Button.LocalizedControlType, button3Element.Current.LocalizedControlType, "button3"); } [Test] public void NameTest () { Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.NameProperty), button1Element.Current.Name, "button1 AutomationElementInformation vs GetCurrentPropertyValue"); if (Atspi) Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.NameProperty, true), button1Element.Current.Name, "button1 AutomationElementInformation vs GetCurrentPropertyValue w/ignoreDefault"); Assert.AreEqual ("TestForm1", testFormElement.Current.Name, "window"); Assert.AreEqual ("groupBox1", groupBox1Element.Current.Name, "groupBox1"); Assert.AreEqual ("button1", button1Element.Current.Name, "button1"); Assert.AreEqual (label1Element.Current.Name, textbox1Element.Current.Name, "textbox1"); Assert.AreEqual (String.Empty, textbox2Element.Current.Name, "textbox2"); var propertyEventsArray = new [] { new {Sender = (object) null, Args = (AutomationPropertyChangedEventArgs) null}}; var propertyEvents = propertyEventsArray.ToList (); propertyEvents.Clear (); AutomationPropertyChangedEventHandler handler = (o, e) => propertyEvents.Add (new { Sender = o, Args = e }); At.AddAutomationPropertyChangedEventHandler (button3Element, TreeScope.Element, handler, AutomationElement.NameProperty); RunCommand ("change button3 name"); Assert.AreEqual ("xyzzy", button3Element.Current.Name, "Name after set"); Assert.AreEqual (0, propertyEvents.Count, "event count"); //Assert.AreEqual (1, propertyEvents.Count, "event count"); //Assert.AreEqual (button3Element, propertyEvents [0].Sender, "event sender"); //Assert.AreEqual (AutomationElement.NameProperty, propertyEvents [0].Args.Property, "property"); //Assert.AreEqual ("xyzzy", propertyEvents [0].Args.NewValue, "new value"); //Assert.AreEqual ("button3", propertyEvents [0].Args.OldValue, "old value"); At.RemoveAutomationPropertyChangedEventHandler (button3Element, handler); } [Test] public void NativeWindowHandleTest () { Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.NativeWindowHandleProperty), button1Element.Current.NativeWindowHandle, "button1 AutomationElementInformation vs GetCurrentPropertyValue"); Assert.AreNotEqual (testFormElement.Current.NativeWindowHandle, label1Element.Current.NativeWindowHandle, "Control handles should differ"); } [Test] public void OrientationTest () { Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.OrientationProperty), button1Element.Current.Orientation, "button1 AutomationElementInformation vs GetCurrentPropertyValue"); if (Atspi) Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.OrientationProperty, true), button1Element.Current.Orientation, "button1 AutomationElementInformation vs GetCurrentPropertyValue w/ignoreDefault"); Assert.AreEqual (OrientationType.None, testFormElement.Current.Orientation, "Orientation of Window (unsupported)"); Assert.AreEqual (tb3verticalScrollBarElement.GetCurrentPropertyValue (AEIds.OrientationProperty), tb3verticalScrollBarElement.Current.Orientation, "tb3verticalScrollBarElement AutomationElementInformation vs GetCurrentPropertyValue"); Assert.AreEqual (OrientationType.Vertical, tb3verticalScrollBarElement.Current.Orientation, "Orientation of vertical scroll bar"); Assert.AreEqual (tb3horizontalScrollBarElement.GetCurrentPropertyValue (AEIds.OrientationProperty), tb3horizontalScrollBarElement.Current.Orientation, "tb3horizontalScrollBarElement AutomationElementInformation vs GetCurrentPropertyValue"); Assert.AreEqual (OrientationType.Horizontal, tb3horizontalScrollBarElement.Current.Orientation, "Orientation of horizontal scroll bar"); } [Test] public void ProcessIdTest () { Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.ProcessIdProperty), button1Element.Current.ProcessId, "button1 AutomationElementInformation vs GetCurrentPropertyValue"); if (Atspi) Assert.AreEqual (button1Element.GetCurrentPropertyValue (AEIds.ProcessIdProperty, true), button1Element.Current.ProcessId, "button1 AutomationElementInformation vs GetCurrentPropertyValue w/ignoreDefault"); Assert.AreEqual (p.Id, testFormElement.Current.ProcessId, "Form"); Assert.AreEqual (p.Id, label1Element.Current.ProcessId, "label"); } [Test] public void DockPositionTest () { Assert.AreEqual (DockPosition.None, (DockPosition)AutomationElement.RootElement.GetCurrentPropertyValue (DockPatternIdentifiers.DockPositionProperty), "DockPosition of root element (unsupported)"); } [Test] public void ExpandCollapseStateTest () { Assert.AreEqual (ExpandCollapseState.LeafNode, (ExpandCollapseState)AutomationElement.RootElement.GetCurrentPropertyValue (ExpandCollapsePatternIdentifiers.ExpandCollapseStateProperty), "ExpandCollapseState of root element (unsupported)"); } [Test] public void ColumnTest () { Assert.AreEqual (0, AutomationElement.RootElement.GetCurrentPropertyValue (GridItemPatternIdentifiers.ColumnProperty), "Column of root element (unsupported)"); } [Test] public void ColumnSpanTest () { Assert.AreEqual (1, AutomationElement.RootElement.GetCurrentPropertyValue (GridItemPatternIdentifiers.ColumnSpanProperty), "ColumnSpan of root element (unsupported)"); } [Test] public void ContainingGridTest () { Assert.IsNull (AutomationElement.RootElement.GetCurrentPropertyValue (GridItemPatternIdentifiers.ContainingGridProperty), "ContainingGrid of root element (unsupported)"); } [Test] public void RowTest () { Assert.AreEqual (0, AutomationElement.RootElement.GetCurrentPropertyValue (GridItemPatternIdentifiers.RowProperty), "Row of root element (unsupported)"); } [Test] public void RowSpanTest () { Assert.AreEqual (1, AutomationElement.RootElement.GetCurrentPropertyValue (GridItemPatternIdentifiers.RowSpanProperty), "RowSpan of root element (unsupported)"); } [Test] public void ColumnCountTest () { Assert.AreEqual (0, AutomationElement.RootElement.GetCurrentPropertyValue (GridPatternIdentifiers.ColumnCountProperty), "ColumnCount of root element (unsupported)"); } [Test] public void RowCountTest () { Assert.AreEqual (0, AutomationElement.RootElement.GetCurrentPropertyValue (GridPatternIdentifiers.RowCountProperty), "RowCount of root element (unsupported)"); } [Test] public void CurrentViewTest () { Assert.AreEqual (0, AutomationElement.RootElement.GetCurrentPropertyValue (MultipleViewPatternIdentifiers.CurrentViewProperty), "CurrentView of root element (unsupported)"); } [Test] public void SupportedViewsTest () { Assert.AreEqual (new int [0], AutomationElement.RootElement.GetCurrentPropertyValue (MultipleViewPatternIdentifiers.SupportedViewsProperty), "SupportedViews of root element (unsupported)"); } [Test] public void RangeValueIsReadOnlyTest () { Assert.IsTrue ((bool)AutomationElement.RootElement.GetCurrentPropertyValue (RangeValuePatternIdentifiers.IsReadOnlyProperty), "IsReadOnly of root element (unsupported)"); } [Test] public void LargeChangeTest () { Assert.AreEqual (0, AutomationElement.RootElement.GetCurrentPropertyValue (RangeValuePatternIdentifiers.LargeChangeProperty), "LargeChange of root element (unsupported)"); } [Test] public void MaximumTest () { Assert.AreEqual (0, AutomationElement.RootElement.GetCurrentPropertyValue (RangeValuePatternIdentifiers.MaximumProperty), "Maximum of root element (unsupported)"); } [Test] public void MinimumTest () { Assert.AreEqual (0, AutomationElement.RootElement.GetCurrentPropertyValue (RangeValuePatternIdentifiers.MinimumProperty), "Minimum of root element (unsupported)"); } [Test] public void SmallChangeTest () { Assert.AreEqual (0, AutomationElement.RootElement.GetCurrentPropertyValue (RangeValuePatternIdentifiers.SmallChangeProperty), "SmallChange of root element (unsupported)"); } [Test] public void RangeValueValueTest () { Assert.AreEqual (0, AutomationElement.RootElement.GetCurrentPropertyValue (RangeValuePatternIdentifiers.ValueProperty), "Value of root element (unsupported)"); } [Test] public void HorizontallyScrollableTest () { Assert.IsFalse ((bool)AutomationElement.RootElement.GetCurrentPropertyValue (ScrollPatternIdentifiers.HorizontallyScrollableProperty), "HorizontallyScrollable of root element (unsupported)"); } [Test] public void HorizontalScrollPercentTest () { Assert.AreEqual (0, AutomationElement.RootElement.GetCurrentPropertyValue (ScrollPatternIdentifiers.HorizontalScrollPercentProperty), "HorizontalScrollPercent of root element (unsupported)"); } [Test] public void HorizontalViewSizeTest () { Assert.AreEqual (100, AutomationElement.RootElement.GetCurrentPropertyValue (ScrollPatternIdentifiers.HorizontalViewSizeProperty), "HorizontalViewSize of root element (unsupported)"); } [Test] public void VerticallyScrollableTest () { Assert.IsFalse ((bool)AutomationElement.RootElement.GetCurrentPropertyValue (ScrollPatternIdentifiers.VerticallyScrollableProperty), "VerticallyScrollable of root element (unsupported)"); } [Test] public void VerticalScrollPercentTest () { Assert.AreEqual (0, AutomationElement.RootElement.GetCurrentPropertyValue (ScrollPatternIdentifiers.VerticalScrollPercentProperty), "VerticalScrollPercent of root element (unsupported)"); } [Test] public void VerticalViewSizeTest () { Assert.AreEqual (100, AutomationElement.RootElement.GetCurrentPropertyValue (ScrollPatternIdentifiers.VerticalViewSizeProperty), "VerticalViewSize of root element (unsupported)"); } [Test] public void IsSelectedTest () { Assert.IsFalse ((bool)AutomationElement.RootElement.GetCurrentPropertyValue (SelectionItemPatternIdentifiers.IsSelectedProperty), "IsSelected of root element (unsupported)"); } [Test] public void SelectionContainerTest () { Assert.IsNull (AutomationElement.RootElement.GetCurrentPropertyValue (SelectionItemPatternIdentifiers.SelectionContainerProperty), "SelectionContainer of root element (unsupported)"); } [Test] public void CanSelectMultipleTest () { Assert.IsFalse ((bool)AutomationElement.RootElement.GetCurrentPropertyValue (SelectionPatternIdentifiers.CanSelectMultipleProperty), "CanSelectMultiple of root element (unsupported)"); } [Test] public void IsSelectionRequiredTest () { Assert.IsFalse ((bool)AutomationElement.RootElement.GetCurrentPropertyValue (SelectionPatternIdentifiers.IsSelectionRequiredProperty), "IsSelectionRequired of root element (unsupported)"); } [Test] public void SelectionTest () { Assert.AreEqual (new AutomationElement [0], AutomationElement.RootElement.GetCurrentPropertyValue (SelectionPatternIdentifiers.SelectionProperty), "Selection of root element (unsupported)"); } [Test] public void ColumnHeaderItemsTest () { Assert.AreEqual (new AutomationElement [0], AutomationElement.RootElement.GetCurrentPropertyValue (TableItemPatternIdentifiers.ColumnHeaderItemsProperty), "ColumnHeaderItems of root element (unsupported)"); } [Test] public void RowHeaderItemsTest () { Assert.AreEqual (new AutomationElement [0], AutomationElement.RootElement.GetCurrentPropertyValue (TableItemPatternIdentifiers.RowHeaderItemsProperty), "ColumnHeaderItems of root element (unsupported)"); } [Test] public void ColumnHeadersTest () { Assert.AreEqual (new AutomationElement [0], AutomationElement.RootElement.GetCurrentPropertyValue (TablePatternIdentifiers.ColumnHeadersProperty), "ColumnHeaderItems of root element (unsupported)"); } [Test] public void RowHeadersTest () { Assert.AreEqual (new AutomationElement [0], AutomationElement.RootElement.GetCurrentPropertyValue (TablePatternIdentifiers.RowHeadersProperty), "RowHeaders of root element (unsupported)"); } [Test] public void RowOrColumnMajorTest () { Assert.AreEqual (RowOrColumnMajor.Indeterminate, AutomationElement.RootElement.GetCurrentPropertyValue (TablePatternIdentifiers.RowOrColumnMajorProperty), "RowOrColumnMajor of root element (unsupported)"); } [Test] public void ToggleStateTest () { Assert.AreEqual (ToggleState.Indeterminate, AutomationElement.RootElement.GetCurrentPropertyValue (TogglePatternIdentifiers.ToggleStateProperty), "ToggleState of root element (unsupported)"); } [Test] public void CanMoveTest () { Assert.IsFalse ((bool)AutomationElement.RootElement.GetCurrentPropertyValue (TransformPatternIdentifiers.CanMoveProperty), "CanMove of root element (unsupported)"); } [Test] public void CanResizeTest () { Assert.IsFalse ((bool)AutomationElement.RootElement.GetCurrentPropertyValue (TransformPatternIdentifiers.CanResizeProperty), "CanResize of root element (unsupported)"); } [Test] public void ValueIsReadOnlyTest () { Assert.IsTrue ((bool)AutomationElement.RootElement.GetCurrentPropertyValue (ValuePatternIdentifiers.IsReadOnlyProperty), "IsReadOnly of root element (unsupported)"); } [Test] public void ValueValueTest () { Assert.AreEqual (String.Empty, AutomationElement.RootElement.GetCurrentPropertyValue (ValuePatternIdentifiers.ValueProperty), "Value of root element (unsupported)"); } [Test] public void CanMaximizeTest () { Assert.IsFalse ((bool)AutomationElement.RootElement.GetCurrentPropertyValue (WindowPatternIdentifiers.CanMaximizeProperty), "CanMaximize of root element (unsupported)"); } [Test] public void CanMinimizeTest () { Assert.IsFalse ((bool)AutomationElement.RootElement.GetCurrentPropertyValue (WindowPatternIdentifiers.CanMinimizeProperty), "CanMinimize of root element (unsupported)"); } [Test] public void IsModalTest () { Assert.IsFalse ((bool)AutomationElement.RootElement.GetCurrentPropertyValue (WindowPatternIdentifiers.IsModalProperty), "IsModal of root element (unsupported)"); } [Test] public void IsTopmostTest () { Assert.IsFalse ((bool)AutomationElement.RootElement.GetCurrentPropertyValue (WindowPatternIdentifiers.IsTopmostProperty), "IsTopmost of root element (unsupported)"); } [Test] public void WindowInteractionStateTest () { Assert.AreEqual (WindowInteractionState.Running, AutomationElement.RootElement.GetCurrentPropertyValue (WindowPatternIdentifiers.WindowInteractionStateProperty), "WindowInteractionState of root element (unsupported)"); } [Test] public void WindowVisualStateTest () { Assert.AreEqual (WindowVisualState.Normal, AutomationElement.RootElement.GetCurrentPropertyValue (WindowPatternIdentifiers.WindowVisualStateProperty), "WindowVisualState of root element (unsupported)"); } [Test] public void CanRotateTest () { Assert.IsFalse ((bool)AutomationElement.RootElement.GetCurrentPropertyValue (TransformPatternIdentifiers.CanRotateProperty), "CanRotate of root element (unsupported)"); } [Test] public void EqualsTest () { AutomationElement button1ElementRef2 = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "button1")); Assert.IsTrue (button1Element.Equals (button1ElementRef2), "Comparing two references to button1 element"); Assert.IsFalse (button1Element.Equals (button2Element), "Comparing button1 and button2 elements"); // TODO: Compare after modifying, ie references have different cached info values } [Test] public void FindFirstTest () { // TreeScope.Children VerifyFindFirst (testFormElement, TreeScope.Children, new AutomationElement [] { button1Element, label1Element }, new AutomationElement [] { testFormElement, button3Element }); VerifyFindFirst (groupBox1Element, TreeScope.Children, new AutomationElement [] { button3Element }, new AutomationElement [] { groupBox1Element, button1Element }); // TreeScope.Descendants VerifyFindFirst (testFormElement, TreeScope.Descendants, new AutomationElement [] { button1Element, label1Element, button3Element }, new AutomationElement [] { testFormElement }); VerifyFindFirst (groupBox1Element, TreeScope.Descendants, new AutomationElement [] { button3Element }, new AutomationElement [] { groupBox1Element, button1Element }); // TreeScope.Subtree VerifyFindFirst (testFormElement, TreeScope.Subtree, new AutomationElement [] { button1Element, label1Element, testFormElement, button3Element }, new AutomationElement [] { }); VerifyFindFirst (groupBox1Element, TreeScope.Subtree, new AutomationElement [] { button3Element, groupBox1Element }, new AutomationElement [] { button1Element }); // TreeScope.Ancestors AssertRaises ( () => groupBox1Element.FindFirst (TreeScope.Ancestors, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Window)), "using TreeScope.Ancestors"); // TreeScope.Parent AssertRaises ( () => groupBox1Element.FindFirst (TreeScope.Parent, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Window)), "using TreeScope.Parent"); // Test search order, conditions (also tested in FindAllTest and FixtureSetUp) AutomationElement firstFound = groupBox1Element.FindFirst (TreeScope.Descendants, new AndCondition (new PropertyCondition (AEIds.OrientationProperty, OrientationType.None), new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Button))); Assert.AreEqual (button7Element, firstFound, "In Descendants, first element added found first. " + String.Format ("Expected element named {0}, got element named {1}", button7Element.Current.Name, firstFound.Current.Name)); firstFound = groupBox1Element.FindFirst (TreeScope.Subtree, new PropertyCondition (AEIds.OrientationProperty, OrientationType.None)); Assert.AreEqual (groupBox1Element, firstFound, "In Subtree, root found before descendants"); // FindFirst returns a new instance var groupBox1ElementRef2 = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Group)); Assert.AreEqual (groupBox1Element, groupBox1ElementRef2, "FindFirst returns equivalent element"); Assert.AreNotSame (groupBox1Element, groupBox1ElementRef2, "FindFirst returns different instance"); } [Test] public void FindAllTest () { VerifyFindAll (testFormElement, TreeScope.Descendants, new PropertyCondition (AutomationElement.ControlTypeProperty, ControlType.Button), new AutomationElement [] { button1Element, button2Element, button3Element }); VerifyFindAll (testFormElement, TreeScope.Children, new PropertyCondition (AutomationElement.ControlTypeProperty, ControlType.Button), new AutomationElement [] { button1Element }); // TreeScope.Ancestors AssertRaises ( () => groupBox1Element.FindAll (TreeScope.Ancestors, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Window)), "using TreeScope.Ancestors"); // TreeScope.Parent AssertRaises ( () => groupBox1Element.FindAll (TreeScope.Parent, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Window)), "using TreeScope.Parent"); } [Test] public void StaticFieldsTest () { Assert.IsTrue (AEIds.AcceleratorKeyProperty == AutomationElement.AcceleratorKeyProperty, "AcceleratorKeyProperty"); Assert.IsTrue (AEIds.AccessKeyProperty == AutomationElement.AccessKeyProperty, "AccessKeyProperty"); Assert.IsTrue (AEIds.AutomationIdProperty == AutomationElement.AutomationIdProperty, "AutomationIdProperty"); Assert.IsTrue (AEIds.BoundingRectangleProperty == AutomationElement.BoundingRectangleProperty, "BoundingRectangleProperty"); Assert.IsTrue (AEIds.ClassNameProperty == AutomationElement.ClassNameProperty, "ClassNameProperty"); Assert.IsTrue (AEIds.ClickablePointProperty == AutomationElement.ClickablePointProperty, "ClickablePointProperty"); Assert.IsTrue (AEIds.ControlTypeProperty == AutomationElement.ControlTypeProperty, "ControlTypeProperty"); Assert.IsTrue (AEIds.CultureProperty == AutomationElement.CultureProperty, "CultureProperty"); Assert.IsTrue (AEIds.FrameworkIdProperty == AutomationElement.FrameworkIdProperty, "FrameworkIdProperty"); Assert.IsTrue (AEIds.HasKeyboardFocusProperty == AutomationElement.HasKeyboardFocusProperty, "HasKeyboardFocusProperty"); Assert.IsTrue (AEIds.HelpTextProperty == AutomationElement.HelpTextProperty, "HelpTextProperty"); Assert.IsTrue (AEIds.IsContentElementProperty == AutomationElement.IsContentElementProperty, "IsContentElementProperty"); Assert.IsTrue (AEIds.IsControlElementProperty == AutomationElement.IsControlElementProperty, "IsControlElementProperty"); Assert.IsTrue (AEIds.IsDockPatternAvailableProperty == AutomationElement.IsDockPatternAvailableProperty, "IsDockPatternAvailableProperty"); Assert.IsTrue (AEIds.IsEnabledProperty == AutomationElement.IsEnabledProperty, "IsEnabledProperty"); Assert.IsTrue (AEIds.IsExpandCollapsePatternAvailableProperty == AutomationElement.IsExpandCollapsePatternAvailableProperty, "IsExpandCollapsePatternAvailableProperty"); Assert.IsTrue (AEIds.IsGridItemPatternAvailableProperty == AutomationElement.IsGridItemPatternAvailableProperty, "IsGridItemPatternAvailableProperty"); Assert.IsTrue (AEIds.IsGridPatternAvailableProperty == AutomationElement.IsGridPatternAvailableProperty, "IsGridPatternAvailableProperty"); Assert.IsTrue (AEIds.IsInvokePatternAvailableProperty == AutomationElement.IsInvokePatternAvailableProperty, "IsInvokePatternAvailableProperty"); Assert.IsTrue (AEIds.IsKeyboardFocusableProperty == AutomationElement.IsKeyboardFocusableProperty, "IsKeyboardFocusableProperty"); Assert.IsTrue (AEIds.IsMultipleViewPatternAvailableProperty == AutomationElement.IsMultipleViewPatternAvailableProperty, "IsMultipleViewPatternAvailableProperty"); Assert.IsTrue (AEIds.IsOffscreenProperty == AutomationElement.IsOffscreenProperty, "IsOffscreenProperty"); Assert.IsTrue (AEIds.IsPasswordProperty == AutomationElement.IsPasswordProperty, "IsPasswordProperty"); Assert.IsTrue (AEIds.IsRangeValuePatternAvailableProperty == AutomationElement.IsRangeValuePatternAvailableProperty, "IsRangeValuePatternAvailableProperty"); Assert.IsTrue (AEIds.IsRequiredForFormProperty == AutomationElement.IsRequiredForFormProperty, "IsRequiredForFormProperty"); Assert.IsTrue (AEIds.IsScrollItemPatternAvailableProperty == AutomationElement.IsScrollItemPatternAvailableProperty, "IsScrollItemPatternAvailableProperty"); Assert.IsTrue (AEIds.IsScrollPatternAvailableProperty == AutomationElement.IsScrollPatternAvailableProperty, "IsScrollPatternAvailableProperty"); Assert.IsTrue (AEIds.IsSelectionItemPatternAvailableProperty == AutomationElement.IsSelectionItemPatternAvailableProperty, "IsSelectionItemPatternAvailableProperty"); Assert.IsTrue (AEIds.IsSelectionPatternAvailableProperty == AutomationElement.IsSelectionPatternAvailableProperty, "IsSelectionPatternAvailableProperty"); Assert.IsTrue (AEIds.IsTableItemPatternAvailableProperty == AutomationElement.IsTableItemPatternAvailableProperty, "IsTableItemPatternAvailableProperty"); Assert.IsTrue (AEIds.IsTablePatternAvailableProperty == AutomationElement.IsTablePatternAvailableProperty, "IsTablePatternAvailableProperty"); Assert.IsTrue (AEIds.IsTextPatternAvailableProperty == AutomationElement.IsTextPatternAvailableProperty, "IsTextPatternAvailableProperty"); Assert.IsTrue (AEIds.IsTogglePatternAvailableProperty == AutomationElement.IsTogglePatternAvailableProperty, "IsTogglePatternAvailableProperty"); Assert.IsTrue (AEIds.IsTransformPatternAvailableProperty == AutomationElement.IsTransformPatternAvailableProperty, "IsTransformPatternAvailableProperty"); Assert.IsTrue (AEIds.IsValuePatternAvailableProperty == AutomationElement.IsValuePatternAvailableProperty, "IsValuePatternAvailableProperty"); Assert.IsTrue (AEIds.IsWindowPatternAvailableProperty == AutomationElement.IsWindowPatternAvailableProperty, "IsWindowPatternAvailableProperty"); Assert.IsTrue (AEIds.ItemStatusProperty == AutomationElement.ItemStatusProperty, "ItemStatusProperty"); Assert.IsTrue (AEIds.ItemTypeProperty == AutomationElement.ItemTypeProperty, "ItemTypeProperty"); Assert.IsTrue (AEIds.LabeledByProperty == AutomationElement.LabeledByProperty, "LabeledByProperty"); Assert.IsTrue (AEIds.LocalizedControlTypeProperty == AutomationElement.LocalizedControlTypeProperty, "LocalizedControlTypeProperty"); Assert.IsTrue (AEIds.NameProperty == AutomationElement.NameProperty, "NameProperty"); Assert.IsTrue (AEIds.NativeWindowHandleProperty == AutomationElement.NativeWindowHandleProperty, "NativeWindowHandleProperty"); Assert.IsTrue (AEIds.OrientationProperty == AutomationElement.OrientationProperty, "OrientationProperty"); Assert.IsTrue (AEIds.ProcessIdProperty == AutomationElement.ProcessIdProperty, "ProcessIdProperty"); Assert.IsTrue (AEIds.RuntimeIdProperty == AutomationElement.RuntimeIdProperty, "RuntimeIdProperty"); Assert.IsTrue (AEIds.AsyncContentLoadedEvent == AutomationElement.AsyncContentLoadedEvent, "AsyncContentLoadedEvent"); Assert.IsTrue (AEIds.AutomationFocusChangedEvent == AutomationElement.AutomationFocusChangedEvent, "AutomationFocusChangedEvent"); Assert.IsTrue (AEIds.AutomationPropertyChangedEvent == AutomationElement.AutomationPropertyChangedEvent, "AutomationPropertyChangedEvent"); Assert.IsTrue (AEIds.LayoutInvalidatedEvent == AutomationElement.LayoutInvalidatedEvent, "LayoutInvalidatedEvent"); Assert.IsTrue (AEIds.MenuClosedEvent == AutomationElement.MenuClosedEvent, "MenuClosedEvent"); Assert.IsTrue (AEIds.MenuOpenedEvent == AutomationElement.MenuOpenedEvent, "MenuOpenedEvent"); Assert.IsTrue (AEIds.StructureChangedEvent == AutomationElement.StructureChangedEvent, "StructureChangedEvent"); Assert.IsTrue (AEIds.ToolTipClosedEvent == AutomationElement.ToolTipClosedEvent, "ToolTipClosedEvent"); Assert.IsTrue (AEIds.ToolTipOpenedEvent == AutomationElement.ToolTipOpenedEvent, "ToolTipOpenedEvent"); Assert.IsTrue (AEIds.NotSupported == AutomationElement.NotSupported, "NotSupported"); } [Test] public void RootElementTest () { Assert.AreEqual (String.Empty, AutomationElement.RootElement.Current.AcceleratorKey, "AcceleratorKey"); Assert.AreEqual (String.Empty, AutomationElement.RootElement.Current.AccessKey, "AccessKey"); Assert.AreEqual (String.Empty, AutomationElement.RootElement.Current.AutomationId, "AutomationId"); //Assert.AreEqual (String.Empty, AutomationElement.RootElement.Current.BoundingRectangle, "BoundingRectangle"); // TODO //Assert.AreEqual ("#32769", AutomationElement.RootElement.Current.ClassName, "ClassName"); // TODO Assert.AreEqual (ControlType.Pane, AutomationElement.RootElement.Current.ControlType, "ControlType"); //Assert.AreEqual (String.Empty, AutomationElement.RootElement.Current.FrameworkId, "FrameworkId"); // TODO: "Win32" Assert.IsFalse (AutomationElement.RootElement.Current.HasKeyboardFocus, "HasKeyboardFocus"); Assert.AreEqual (String.Empty, AutomationElement.RootElement.Current.HelpText, "HelpText"); Assert.IsTrue (AutomationElement.RootElement.Current.IsContentElement, "IsContentElement"); Assert.IsTrue (AutomationElement.RootElement.Current.IsControlElement, "IsControlElement"); Assert.IsTrue (AutomationElement.RootElement.Current.IsEnabled, "IsEnabled"); Assert.IsFalse (AutomationElement.RootElement.Current.IsKeyboardFocusable, "IsKeyboardFocusable"); Assert.IsFalse (AutomationElement.RootElement.Current.IsOffscreen, "IsOffscreen"); Assert.IsFalse (AutomationElement.RootElement.Current.IsPassword, "IsPassword"); Assert.IsFalse (AutomationElement.RootElement.Current.IsRequiredForForm, "IsRequiredForForm"); Assert.AreEqual (String.Empty, AutomationElement.RootElement.Current.ItemStatus, "ItemStatus"); Assert.AreEqual (String.Empty, AutomationElement.RootElement.Current.ItemType, "ItemType"); Assert.IsNull (AutomationElement.RootElement.Current.LabeledBy, "LabeledBy"); Assert.AreEqual (ControlType.Pane.LocalizedControlType, AutomationElement.RootElement.Current.LocalizedControlType, "LocalizedControlType"); Assert.AreEqual (String.Empty, AutomationElement.RootElement.Current.Name, "Name"); //Assert.AreEqual (65552, AutomationElement.RootElement.Current.NativeWindowHandle, "NativeWindowHandle"); // TODO: Probably changes Assert.AreEqual (OrientationType.None, AutomationElement.RootElement.Current.Orientation, "Orientation"); //Assert.AreEqual (-1, AutomationElement.RootElement.Current.ProcessId, "ProcessId"); // TODO: Probably changes //Assert.AreEqual (new int [] {42, 65552}, AutomationElement.RootElement.GetRuntimeId (), "GetRuntimeId"); // TODO: Probably changes Assert.IsNull (TreeWalker.RawViewWalker.GetParent (AutomationElement.RootElement), "GetParent"); Assert.IsNull (TreeWalker.RawViewWalker.GetNextSibling (AutomationElement.RootElement), "GetNextSibling"); Assert.IsNull (TreeWalker.RawViewWalker.GetPreviousSibling (AutomationElement.RootElement), "GetPreviousSibling"); VerifyPatterns (AutomationElement.RootElement); } [Test] public void PatternsTest () { VerifyPatterns (button1Element, InvokePatternIdentifiers.Pattern); VerifyPatterns (checkBox1Element, TogglePatternIdentifiers.Pattern); object pattern; Assert.IsFalse (numericUpDown1Element.TryGetCurrentPattern (InvokePatternIdentifiers.Pattern, out pattern), "NumericUpDown should not support Invoke"); } [Test] public void CurrentTest () { var current = label1Element.Current; Assert.AreEqual ("label1", current.Name, "check label1's original text"); InvokePattern pattern = (InvokePattern) button1Element.GetCurrentPattern (InvokePattern.Pattern); pattern.Invoke (); Thread.Sleep (500); Assert.AreEqual ("button1_click", current.Name, "label1's text is modified after button1 is clicked"); } [Test] public void FromHandleTest () { AutomationElement [] elements = { testFormElement, button1Element, groupBox1Element }; foreach (var testElement in elements) { int handle = testElement.Current.NativeWindowHandle; var element = AutomationElement.FromHandle (new IntPtr (handle)); Assert.AreEqual (testElement, element, String.Format ("{0}'s handle of {1} did not work in FromHandle", testElement.Current.Name, handle)); } var firstTreeItemElement = treeView1Element.FindFirst (TreeScope.Children, Condition.TrueCondition); int itemHandle = firstTreeItemElement.Current.NativeWindowHandle; Assert.AreEqual (0, itemHandle); IntPtr itemPtr = new IntPtr (itemHandle); AssertRaises ( () => AutomationElement.FromHandle (itemPtr), "passing in IntPtr.Zero"); AssertRaises ( () => AutomationElement.FromHandle ((IntPtr)null), "passing in null"); } [Test] public void SupportedPropertiesTest () { SupportedPropertiesTestInternal (testFormElement); SupportedPropertiesTestInternal (checkBox1Element); SupportedPropertiesTestInternal (groupBox1Element); SupportedPropertiesTestInternal (numericUpDown1Element); SupportedPropertiesTestInternal (textbox1Element); SupportedPropertiesTestInternal (treeView1Element); SupportedPropertiesTestInternal (listView1Element); } [Test] public void Bug570621_Test () { var firstDataItem = this.table1Element.FindFirst (TreeScope.Children, new PropertyCondition( AEIds.ControlTypeProperty, ControlType.DataItem)); Assert.AreEqual (0, firstDataItem.Current.NativeWindowHandle); Assert.AreEqual (table1Element, AutomationElement.FromHandle (new IntPtr (table1Element.Current.NativeWindowHandle))); } [Test] public void Bug571711_Test () { var firstDataItem = this.table1Element.FindFirst (TreeScope.Children, new PropertyCondition( AEIds.ControlTypeProperty, ControlType.DataItem)); //assert the following line won't fire any exception firstDataItem.GetCurrentPropertyValue (ValuePattern.ValueProperty); } [Test] public void Z_FromPointTest () { AutomationElement element; if (!Atspi) { RunCommand ("MoveTo.Origin"); RunCommand ("bring form to front"); element = AutomationElement.FromPoint (new Point (30.0, 30.0)); Assert.AreEqual (element, testFormElement); } // TODO: uncomment below line after fixing Bug #489387 //AssertControlFromPoint (testFormElement, 2.0, 2.0); AssertControlFromPoint (testFormElement, 30.0, 30.0); AssertControlFromPoint (button1Element, 5.0, 5.0); // TODO: uncomment below line after fixing Bug #489387 //AssertControlFromPoint (textbox1Element, 2.0, 2.0); AssertControlFromPoint (textbox1Element, 5.0, 5.0); AssertControlFromPoint (groupBox1Element, 5.0, 5.0); // TODO: uncomment below line after fixing Bug #489387 //AssertControlFromPoint (listView1Element); AssertNotControlFromPoint (testFormElement, 800.0, 800.0); AssertNotControlFromPoint (testFormElement, -10.0, -10.0); RunCommand ("hide form for 3 seconds"); Thread.Sleep (1000); AssertNotControlFromPoint (testFormElement, 30.0, 30.0); // //Wait for the form to show up again. Thread.Sleep (3000); //Accoding to Windows behavior, if we give a out-of-screen point, //then the returned element shall be RootElement. element = AutomationElement.FromPoint (new Point (999999.0, 999999.0)); Assert.AreEqual (element, AutomationElement.RootElement); element = AutomationElement.FromPoint (new Point (-50.0, -50.0)); Assert.AreEqual (element, AutomationElement.RootElement); // TODO: Test that FromPoint works properly with multiple gtk+ and winforms windows } #endregion #region Private Methods private void AssertControlFromPoint (AutomationElement target, double relX, double relY) { var rect = target.Current.BoundingRectangle; var element = AutomationElement.FromPoint (new Point (rect.X + relX, rect.Y + relY)); bool isInTarget = false; while (element != null && element != AutomationElement.RootElement) { if (element == target) { isInTarget = true; break; } element = TreeWalker.RawViewWalker.GetParent (element); } Assert.IsTrue (isInTarget); } private void AssertNotControlFromPoint (AutomationElement target, double x, double y) { bool compare = false; try { var element = AutomationElement.FromPoint (new Point (x, y)); compare = (element == target); } catch (ElementNotAvailableException) { } Assert.IsFalse (compare, "The returned element of \"FromPoint\" is not the given element."); } private void VerifyCurrentPropertyValue (AutomationElement element, AutomationProperty property, object expectedTrue, object expectedFalse, object expectedDefault) { Assert.AreEqual (expectedTrue, element.GetCurrentPropertyValue (property, true), property.ProgrammaticName + " w/ true"); Assert.AreEqual (expectedFalse, element.GetCurrentPropertyValue (property, false), property.ProgrammaticName + " w/ false"); Assert.AreEqual (expectedDefault, element.GetCurrentPropertyValue (property), property.ProgrammaticName + " w/ default"); } private void VerifyFindAll (AutomationElement root, TreeScope scope, Condition condition, AutomationElement [] expectedElementsArray) { AutomationElementCollection result = null; List expectedElements = new List (expectedElementsArray); result = root.FindAll (scope, condition); // TODO: Uncomment when we support titlebar and its subelements (including min/max/close buttons) //Assert.AreEqual (expectedElements.Count, result.Count, "Result count"); List resultList = new List (); foreach (AutomationElement element in result) { resultList.Add (element); // TODO: Uncomment when Count assertion is supported (see above) //Assert.IsTrue (expectedElements.Contains (element), // String.Format ("Did not expect element named '{0}' with RuntimeId{1}", element.Current.Name, element.GetRuntimeId ())); } foreach (var element in expectedElements) Assert.IsTrue (resultList.Contains (element), String.Format ("Did not find expected element named '{0}' with RuntimeId{1}", element.Current.Name, PrintRuntimeId (element.GetRuntimeId ()))); } private void VerifyFindFirst (AutomationElement root, TreeScope scope, AutomationElement [] includedElements, AutomationElement [] excludedElements) { foreach (var element in includedElements) { int [] runtimeId = element.GetRuntimeId (); AutomationElement result = root.FindFirst (scope, new PropertyCondition (AEIds.RuntimeIdProperty, runtimeId)); Assert.IsNotNull (result, String.Format ("Expected element named '{0}' with RuntimeId {1}", element.Current.Name, PrintRuntimeId (runtimeId))); Assert.AreEqual (element, result, String.Format ("Expected element named '{0}' with RuntimeId {1}, got '{2}' with Id {3}", element.Current.Name, PrintRuntimeId (runtimeId), result.Current.Name, result.Current.AutomationId)); } foreach (var element in excludedElements) { int [] runtimeId = element.GetRuntimeId (); AutomationElement result = root.FindFirst (scope, new PropertyCondition (AEIds.RuntimeIdProperty, runtimeId)); Assert.IsNull (result, String.Format ("Did not expect element named '{0}' with RuntimeId{1}", element.Current.Name, PrintRuntimeId (runtimeId))); } } private void SupportedPropertiesTestInternal (AutomationElement element) { var supportedProperties = element.GetSupportedProperties (); foreach (AutomationPattern pattern in element.GetSupportedPatterns ()) { foreach (var prop in GetPatternProperties (pattern)) { Assert.IsTrue (supportedProperties.Contains (prop), string.Format ("[{0}] {1} shall be supported since {2} pattern is supported", element.Current.Name, prop.ProgrammaticName, At.PatternName (pattern))); } } foreach (var prop in supportedProperties) { Assert.AreNotEqual (AutomationElement.NotSupported, element.GetCurrentPropertyValue (prop, true), string.Format ("[{0}] {1} shall be supported since it's in SupportedProperties", element.Current.Name, prop.ProgrammaticName)); } } #endregion } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/FocusTest.cs0000644000016200001670000001156111433571545027541 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Matt Guo // using System; using System.Linq; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using MonoTests.System.Windows.Automation; using At = System.Windows.Automation.Automation; namespace MonoTests.System.Windows.Automation { [TestFixture] public class FocusTest : BaseTest { List actualFocusedElements = new List (); [Test] public void BasicFocusTest () { // TODO: //Currently FocusTest.BasicFocusTest can pass on Windows, but can't on Linux. The failure reason is that: //on Windows, call InvokePattern.Invoke will make corresponding button focused, so we also assert this behavior in the test, //however our implementation will not make the button focused after InvokePattern.Invoke. AutomationElement [] expectedFocusedElements; if (Atspi) expectedFocusedElements = new AutomationElement [] { btnRunElement, textbox3Element, btnRunElement, button2Element, }; else expectedFocusedElements = new AutomationElement [] { txtCommandElement, textbox3Element, txtCommandElement, button2Element, }; AutomationFocusChangedEventHandler handler = (s,e) => actualFocusedElements.Add ((AutomationElement) s); At.AddAutomationFocusChangedEventHandler (handler); RunCommand ("focus textBox3"); Assert.AreEqual (textbox3Element, AutomationElement.FocusedElement, "FocusedElement"); RunCommand ("focus button2"); Assert.AreEqual (button2Element, AutomationElement.FocusedElement, "FocusedElement"); At.RemoveAutomationFocusChangedEventHandler (handler); RunCommand ("focus textBox3"); Assert.AreEqual (textbox3Element, AutomationElement.FocusedElement, "FocusedElement"); At.AddAutomationFocusChangedEventHandler (handler); At.RemoveAllEventHandlers (); RunCommand ("focus button2"); Assert.AreEqual (button2Element, AutomationElement.FocusedElement, "FocusedElement"); Assert.AreEqual (expectedFocusedElements.Length, actualFocusedElements.Count, "Event handler count"); for (int i = 0; i < actualFocusedElements.Count; i++) { Assert.AreEqual (expectedFocusedElements [i], actualFocusedElements [i], "Event handler sender #" + i); } } [Test] public void SetFocusTest () { AutomationElement [] expectedFocusedElements = new AutomationElement [] { textbox3Element, button2Element }; button2Element.SetFocus (); AutomationFocusChangedEventHandler handler = (s,e) => actualFocusedElements.Add ((AutomationElement) s); At.AddAutomationFocusChangedEventHandler (handler); actualFocusedElements.Clear (); textbox3Element.SetFocus (); Thread.Sleep (100); Assert.AreEqual (textbox3Element, AutomationElement.FocusedElement, "FocusedElement"); button2Element.SetFocus (); Thread.Sleep (100); Assert.AreEqual (button2Element, AutomationElement.FocusedElement, "FocusedElement"); Thread.Sleep(1000); At.RemoveAutomationFocusChangedEventHandler (handler); Assert.AreEqual (expectedFocusedElements.Length, actualFocusedElements.Count, "Event handler count"); for (int i = 0; i < actualFocusedElements.Count; i++) { Assert.AreEqual (expectedFocusedElements [i], actualFocusedElements [i], "Event handler sender #" + i); } } [Test] public void AutomationFocusChangedEventArgsTest () { var args = new AutomationFocusChangedEventArgs (0, 0); Assert.AreEqual (AutomationElementIdentifiers.AutomationFocusChangedEvent, args.EventId); } //todo need to write more test on multiple sources, after the focusedElement //is supported by other sources such as Atspi } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/AutomationTest.cs0000644000016200001670000011646511433571545030613 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.Windows; using SWA = System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; namespace MonoTests.System.Windows.Automation { [TestFixture] public class AutomationTest { List potentiallyRunningProcesses = new List (); [TearDown] public void TearDown () { foreach (var p in potentiallyRunningProcesses) if (!p.HasExited) p.Kill (); potentiallyRunningProcesses.Clear (); } // TODO: Test event handling methods [Test] public void ComparerRuntimeIdsTest () { int [] idSet1a = new int [] { 1, 2 }; int [] idSet1b = new int [] { 1, 2 }; int [] idSet2 = new int [] { 1 }; int [] idSet3 = new int [] { }; int [] idSet4 = new int [] { 2, 1 }; Assert.IsTrue (SWA.Automation.Compare (idSet1a, idSet1a), "Identity"); Assert.IsTrue (SWA.Automation.Compare (idSet1a, idSet1b), "Identity"); Assert.IsFalse (SWA.Automation.Compare (idSet1a, idSet4), "Order matters"); Assert.IsFalse (SWA.Automation.Compare (idSet1a, idSet2), "Different lengths"); Assert.IsFalse (SWA.Automation.Compare (idSet1a, idSet3), "Compare non-empty with empty"); Assert.IsTrue (SWA.Automation.Compare (idSet3, idSet3), "Compare empty with empty"); bool argumentNullRaised = false; try { SWA.Automation.Compare (idSet1a, null); } catch (ArgumentNullException) { argumentNullRaised = true; } Assert.IsTrue (argumentNullRaised, "Expected ArgumentNullException"); } [Test] public void CompareAutomationElementsTest () { Process p = BaseTest.StartApplication (@"SampleForm.exe", String.Empty); try { Thread.Sleep (1000); SWA.AutomationElement testFormElement = SWA.AutomationElement.RootElement.FindFirst (SWA.TreeScope.Children, new SWA.PropertyCondition (AEIds.ProcessIdProperty, p.Id)); Assert.IsNotNull (testFormElement, "window"); SWA.AutomationElement groupBox1Element = testFormElement.FindFirst (SWA.TreeScope.Children, new SWA.PropertyCondition (AEIds.ControlTypeProperty, SWA.ControlType.Group)); Assert.IsNotNull (groupBox1Element, "groupBox1"); Assert.IsTrue (SWA.Automation.Compare (testFormElement, testFormElement), "Identity"); SWA.AutomationElement testFormElement2 = SWA.AutomationElement.RootElement.FindFirst (SWA.TreeScope.Children, new SWA.PropertyCondition (AEIds.ProcessIdProperty, p.Id)); Assert.IsTrue (SWA.Automation.Compare (testFormElement, testFormElement2), "Comparing different instances representing the same element"); Assert.IsFalse (SWA.Automation.Compare (testFormElement, groupBox1Element), "Comparing different elements"); bool argumentNullRaised = false; try { SWA.Automation.Compare (testFormElement, null); } catch (ArgumentNullException) { argumentNullRaised = true; } Assert.IsTrue (argumentNullRaised, "Expected ArgumentNullException"); } finally { p.Kill (); } } [Test] public void PatternNameTest () { Dictionary expectedPatternNames = new Dictionary (); // Load for all patterns expectedPatternNames [SWA.DockPatternIdentifiers.Pattern] = "Dock"; expectedPatternNames [SWA.ExpandCollapsePatternIdentifiers.Pattern] = "ExpandCollapse"; expectedPatternNames [SWA.GridItemPatternIdentifiers.Pattern] = "GridItem"; expectedPatternNames [SWA.GridPatternIdentifiers.Pattern] = "Grid"; expectedPatternNames [SWA.InvokePatternIdentifiers.Pattern] = "Invoke"; expectedPatternNames [SWA.MultipleViewPatternIdentifiers.Pattern] = "MultipleView"; expectedPatternNames [SWA.RangeValuePatternIdentifiers.Pattern] = "RangeValue"; expectedPatternNames [SWA.ScrollItemPatternIdentifiers.Pattern] = "ScrollItem"; expectedPatternNames [SWA.ScrollPatternIdentifiers.Pattern] = "Scroll"; expectedPatternNames [SWA.SelectionItemPatternIdentifiers.Pattern] = "SelectionItem"; expectedPatternNames [SWA.SelectionPatternIdentifiers.Pattern] = "Selection"; expectedPatternNames [SWA.TableItemPatternIdentifiers.Pattern] = "TableItem"; expectedPatternNames [SWA.TablePatternIdentifiers.Pattern] = "Table"; expectedPatternNames [SWA.TextPatternIdentifiers.Pattern] = "Text"; expectedPatternNames [SWA.TogglePatternIdentifiers.Pattern] = "Toggle"; expectedPatternNames [SWA.TransformPatternIdentifiers.Pattern] = "Transform"; expectedPatternNames [SWA.ValuePatternIdentifiers.Pattern] = "Value"; expectedPatternNames [SWA.WindowPatternIdentifiers.Pattern] = "Window"; foreach (var pair in expectedPatternNames) Assert.AreEqual (pair.Value, SWA.Automation.PatternName (pair.Key), pair.Key.ProgrammaticName); bool argumentNullRaised = false; try { Assert.IsNull (SWA.Automation.PatternName (null)); } catch (ArgumentNullException) { argumentNullRaised = true; } Assert.IsTrue (argumentNullRaised, "Expected ArgumentNullException"); } [Test] public void PropertyNameTest () { Dictionary expectedPropertyNames = new Dictionary (); //Load for everything in AEIds expectedPropertyNames [AEIds.AcceleratorKeyProperty] = "AcceleratorKey"; expectedPropertyNames [AEIds.AccessKeyProperty] = "AccessKey"; expectedPropertyNames [AEIds.AutomationIdProperty] = "AutomationId"; expectedPropertyNames [AEIds.BoundingRectangleProperty] = "BoundingRectangle"; expectedPropertyNames [AEIds.ClassNameProperty] = "ClassName"; expectedPropertyNames [AEIds.ClickablePointProperty] = "ClickablePoint"; expectedPropertyNames [AEIds.ControlTypeProperty] = "ControlType"; expectedPropertyNames [AEIds.CultureProperty] = "Culture"; expectedPropertyNames [AEIds.FrameworkIdProperty] = "FrameworkId"; expectedPropertyNames [AEIds.HasKeyboardFocusProperty] = "HasKeyboardFocus"; expectedPropertyNames [AEIds.HelpTextProperty] = "HelpText"; expectedPropertyNames [AEIds.IsContentElementProperty] = "IsContentElement"; expectedPropertyNames [AEIds.IsControlElementProperty] = "IsControlElement"; expectedPropertyNames [AEIds.IsDockPatternAvailableProperty] = "IsDockPatternAvailable"; expectedPropertyNames [AEIds.IsEnabledProperty] = "IsEnabled"; expectedPropertyNames [AEIds.IsExpandCollapsePatternAvailableProperty] = "IsExpandCollapsePatternAvailable"; expectedPropertyNames [AEIds.IsGridItemPatternAvailableProperty] = "IsGridItemPatternAvailable"; expectedPropertyNames [AEIds.IsGridPatternAvailableProperty] = "IsGridPatternAvailable"; expectedPropertyNames [AEIds.IsInvokePatternAvailableProperty] = "IsInvokePatternAvailable"; expectedPropertyNames [AEIds.IsKeyboardFocusableProperty] = "IsKeyboardFocusable"; expectedPropertyNames [AEIds.IsMultipleViewPatternAvailableProperty] = "IsMultipleViewPatternAvailable"; expectedPropertyNames [AEIds.IsOffscreenProperty] = "IsOffscreen"; expectedPropertyNames [AEIds.IsPasswordProperty] = "IsPassword"; expectedPropertyNames [AEIds.IsRangeValuePatternAvailableProperty] = "IsRangeValuePatternAvailable"; expectedPropertyNames [AEIds.IsRequiredForFormProperty] = "IsRequiredForForm"; expectedPropertyNames [AEIds.IsScrollItemPatternAvailableProperty] = "IsScrollItemPatternAvailable"; expectedPropertyNames [AEIds.IsScrollPatternAvailableProperty] = "IsScrollPatternAvailable"; expectedPropertyNames [AEIds.IsSelectionItemPatternAvailableProperty] = "IsSelectionItemPatternAvailable"; expectedPropertyNames [AEIds.IsSelectionPatternAvailableProperty] = "IsSelectionPatternAvailable"; expectedPropertyNames [AEIds.IsTableItemPatternAvailableProperty] = "IsTableItemPatternAvailable"; expectedPropertyNames [AEIds.IsTablePatternAvailableProperty] = "IsTablePatternAvailable"; expectedPropertyNames [AEIds.IsTextPatternAvailableProperty] = "IsTextPatternAvailable"; expectedPropertyNames [AEIds.IsTogglePatternAvailableProperty] = "IsTogglePatternAvailable"; expectedPropertyNames [AEIds.IsTransformPatternAvailableProperty] = "IsTransformPatternAvailable"; expectedPropertyNames [AEIds.IsValuePatternAvailableProperty] = "IsValuePatternAvailable"; expectedPropertyNames [AEIds.IsWindowPatternAvailableProperty] = "IsWindowPatternAvailable"; expectedPropertyNames [AEIds.ItemStatusProperty] = "ItemStatus"; expectedPropertyNames [AEIds.ItemTypeProperty] = "ItemType"; expectedPropertyNames [AEIds.LabeledByProperty] = "LabeledBy"; expectedPropertyNames [AEIds.LocalizedControlTypeProperty] = "LocalizedControlType"; expectedPropertyNames [AEIds.NameProperty] = "Name"; expectedPropertyNames [AEIds.NativeWindowHandleProperty] = "NativeWindowHandle"; expectedPropertyNames [AEIds.OrientationProperty] = "Orientation"; expectedPropertyNames [AEIds.ProcessIdProperty] = "ProcessId"; expectedPropertyNames [AEIds.RuntimeIdProperty] = "RuntimeId"; // Load everything for *PatternIdentifiers expectedPropertyNames [SWA.DockPatternIdentifiers.DockPositionProperty] = "DockPosition"; expectedPropertyNames [SWA.ExpandCollapsePatternIdentifiers.ExpandCollapseStateProperty] = "ExpandCollapseState"; expectedPropertyNames [SWA.GridItemPatternIdentifiers.ColumnProperty] = "Column"; expectedPropertyNames [SWA.GridItemPatternIdentifiers.ColumnSpanProperty] = "ColumnSpan"; expectedPropertyNames [SWA.GridItemPatternIdentifiers.ContainingGridProperty] = "ContainingGrid"; expectedPropertyNames [SWA.GridItemPatternIdentifiers.RowProperty] = "Row"; expectedPropertyNames [SWA.GridItemPatternIdentifiers.RowSpanProperty] = "RowSpan"; expectedPropertyNames [SWA.GridPatternIdentifiers.ColumnCountProperty] = "ColumnCount"; expectedPropertyNames [SWA.GridPatternIdentifiers.RowCountProperty] = "RowCount"; expectedPropertyNames [SWA.MultipleViewPatternIdentifiers.CurrentViewProperty] = "CurrentView"; expectedPropertyNames [SWA.MultipleViewPatternIdentifiers.SupportedViewsProperty] = "SupportedViews"; expectedPropertyNames [SWA.RangeValuePatternIdentifiers.IsReadOnlyProperty] = "IsReadOnly"; expectedPropertyNames [SWA.RangeValuePatternIdentifiers.LargeChangeProperty] = "LargeChange"; expectedPropertyNames [SWA.RangeValuePatternIdentifiers.MaximumProperty] = "Maximum"; expectedPropertyNames [SWA.RangeValuePatternIdentifiers.MinimumProperty] = "Minimum"; expectedPropertyNames [SWA.RangeValuePatternIdentifiers.SmallChangeProperty] = "SmallChange"; expectedPropertyNames [SWA.RangeValuePatternIdentifiers.ValueProperty] = "Value"; expectedPropertyNames [SWA.ScrollPatternIdentifiers.HorizontallyScrollableProperty] = "HorizontallyScrollable"; expectedPropertyNames [SWA.ScrollPatternIdentifiers.HorizontalScrollPercentProperty] = "HorizontalScrollPercent"; expectedPropertyNames [SWA.ScrollPatternIdentifiers.HorizontalViewSizeProperty] = "HorizontalViewSize"; expectedPropertyNames [SWA.ScrollPatternIdentifiers.VerticallyScrollableProperty] = "VerticallyScrollable"; expectedPropertyNames [SWA.ScrollPatternIdentifiers.VerticalScrollPercentProperty] = "VerticalScrollPercent"; expectedPropertyNames [SWA.ScrollPatternIdentifiers.VerticalViewSizeProperty] = "VerticalViewSize"; expectedPropertyNames [SWA.SelectionItemPatternIdentifiers.IsSelectedProperty] = "IsSelected"; expectedPropertyNames [SWA.SelectionItemPatternIdentifiers.SelectionContainerProperty] = "SelectionContainer"; expectedPropertyNames [SWA.SelectionPatternIdentifiers.CanSelectMultipleProperty] = "CanSelectMultiple"; expectedPropertyNames [SWA.SelectionPatternIdentifiers.IsSelectionRequiredProperty] = "IsSelectionRequired"; expectedPropertyNames [SWA.SelectionPatternIdentifiers.SelectionProperty] = "Selection"; expectedPropertyNames [SWA.TableItemPatternIdentifiers.ColumnHeaderItemsProperty] = "ColumnHeaderItems"; expectedPropertyNames [SWA.TableItemPatternIdentifiers.RowHeaderItemsProperty] = "RowHeaderItems"; expectedPropertyNames [SWA.TablePatternIdentifiers.ColumnHeadersProperty] = "ColumnHeaders"; expectedPropertyNames [SWA.TablePatternIdentifiers.RowHeadersProperty] = "RowHeaders"; expectedPropertyNames [SWA.TablePatternIdentifiers.RowOrColumnMajorProperty] = "RowOrColumnMajor"; expectedPropertyNames [SWA.TogglePatternIdentifiers.ToggleStateProperty] = "ToggleState"; expectedPropertyNames [SWA.TransformPatternIdentifiers.CanMoveProperty] = "CanMove"; expectedPropertyNames [SWA.TransformPatternIdentifiers.CanResizeProperty] = "CanResize"; expectedPropertyNames [SWA.TransformPatternIdentifiers.CanRotateProperty] = "CanRotate"; expectedPropertyNames [SWA.ValuePatternIdentifiers.IsReadOnlyProperty] = "IsReadOnly"; expectedPropertyNames [SWA.ValuePatternIdentifiers.ValueProperty] = "Value"; expectedPropertyNames [SWA.WindowPatternIdentifiers.CanMaximizeProperty] = "CanMaximize"; expectedPropertyNames [SWA.WindowPatternIdentifiers.CanMinimizeProperty] = "CanMinimize"; expectedPropertyNames [SWA.WindowPatternIdentifiers.IsModalProperty] = "IsModal"; expectedPropertyNames [SWA.WindowPatternIdentifiers.IsTopmostProperty] = "IsTopmost"; expectedPropertyNames [SWA.WindowPatternIdentifiers.WindowInteractionStateProperty] = "WindowInteractionState"; expectedPropertyNames [SWA.WindowPatternIdentifiers.WindowVisualStateProperty] = "WindowVisualState"; foreach (var pair in expectedPropertyNames) Assert.AreEqual (pair.Value, SWA.Automation.PropertyName (pair.Key), pair.Key.ProgrammaticName); bool argumentNullRaised = false; try { Assert.IsNull (SWA.Automation.PropertyName (null)); } catch (ArgumentNullException) { argumentNullRaised = true; } Assert.IsTrue (argumentNullRaised, "Expected ArgumentNullException"); } [Test] public void ContentViewConditionTest () { SWA.Condition contentViewCond = SWA.Automation.ContentViewCondition; Assert.IsNotNull (contentViewCond, "ContentViewCondition"); SWA.PropertyCondition contentViewPropCond = contentViewCond as SWA.PropertyCondition; Assert.IsNull (contentViewPropCond, "ContentViewCondition is not a PropertyCondition"); SWA.AndCondition contentViewAndCond = contentViewCond as SWA.AndCondition; Assert.IsNull (contentViewPropCond, "ContentViewCondition is not a PropertyCondition"); Assert.IsNull (contentViewAndCond, "ContentViewCondition is not a AndCondition"); SWA.OrCondition contentViewOrCond = contentViewCond as SWA.OrCondition; Assert.IsNull (contentViewOrCond, "ContentViewCondition is not a OrCondition"); SWA.NotCondition contentViewNotCond = contentViewCond as SWA.NotCondition; Assert.IsNotNull (contentViewNotCond, "ContentViewCondition is a NotCondition"); SWA.Condition subCond = contentViewNotCond.Condition; Assert.IsNotNull (subCond, "ContentViewCondition.Condition"); SWA.OrCondition subOrCond = subCond as SWA.OrCondition; Assert.IsNotNull (subOrCond, "ContentViewCondition.Condition is a OrCondition"); SWA.Condition [] subSubConditions = subOrCond.GetConditions (); Assert.AreEqual (2, subSubConditions.Length, "ContentViewCondition.Condition.GetConditions length"); SWA.PropertyCondition subSubPropertyCond1 = subSubConditions [0] as SWA.PropertyCondition; Assert.IsNotNull (subSubPropertyCond1); SWA.PropertyCondition subSubPropertyCond2 = subSubConditions [1] as SWA.PropertyCondition; Assert.IsNotNull (subSubPropertyCond2); Assert.AreEqual (AEIds.IsControlElementProperty, subSubPropertyCond1.Property, "subcondition1 Property"); Assert.AreEqual (false, subSubPropertyCond1.Value, "subcondition1 Value"); Assert.AreEqual (SWA.PropertyConditionFlags.None, subSubPropertyCond1.Flags, "subcondition1 Flags"); Assert.AreEqual (AEIds.IsContentElementProperty.ProgrammaticName, subSubPropertyCond2.Property.ProgrammaticName, "subcondition2 Property"); Assert.AreEqual (false, subSubPropertyCond2.Value, "subcondition2 Value"); Assert.AreEqual (SWA.PropertyConditionFlags.None, subSubPropertyCond2.Flags, "subcondition2 Flags"); } [Test] public void ControlViewConditionTest () { SWA.Condition controlViewCond = SWA.Automation.ControlViewCondition; Assert.IsNotNull (controlViewCond, "ControlViewCondition"); SWA.PropertyCondition controlViewPropCond = controlViewCond as SWA.PropertyCondition; Assert.IsNull (controlViewPropCond, "ControlViewCondition is not a PropertyCondition"); SWA.AndCondition controlViewAndCond = controlViewCond as SWA.AndCondition; Assert.IsNull (controlViewAndCond, "ControlViewCondition is not a AndCondition"); SWA.OrCondition controlViewOrCond = controlViewCond as SWA.OrCondition; Assert.IsNull (controlViewOrCond, "ControlViewCondition is not a OrCondition"); SWA.NotCondition controlViewNotCond = controlViewCond as SWA.NotCondition; Assert.IsNotNull (controlViewNotCond, "ControlViewCondition is a NotCondition"); SWA.Condition subCond = controlViewNotCond.Condition; Assert.IsNotNull (subCond, "ControlViewCondition.Condition"); SWA.PropertyCondition subPropertyCond = subCond as SWA.PropertyCondition; Assert.IsNotNull (subPropertyCond, "ControlViewCondition.Condition is a PropertyCondition"); Assert.AreEqual (AEIds.IsControlElementProperty, subPropertyCond.Property, "ControlViewCondition.Condition.Property"); Assert.AreEqual (false, subPropertyCond.Value, "ControlViewCondition.Condition.Value"); Assert.AreEqual (SWA.PropertyConditionFlags.None, subPropertyCond.Flags, "ControlViewCondition.Condition.Flags"); } [Test] public void RawViewConditionTest () { SWA.Condition rawViewCond = SWA.Automation.RawViewCondition; Assert.IsNotNull (rawViewCond, "RawViewCondition"); SWA.PropertyCondition rawViewPropCond = rawViewCond as SWA.PropertyCondition; Assert.IsNull (rawViewPropCond, "RawViewCondition is not a PropertyCondition"); SWA.AndCondition rawViewAndCond = rawViewCond as SWA.AndCondition; Assert.IsNull (rawViewAndCond, "RawViewCondition is not a AndCondition"); SWA.OrCondition rawViewOrCond = rawViewCond as SWA.OrCondition; Assert.IsNull (rawViewOrCond, "RawViewCondition is not a OrCondition"); SWA.NotCondition rawViewNotCond = rawViewCond as SWA.NotCondition; Assert.IsNull (rawViewNotCond, "RawViewCondition is not a NotCondition"); } [Test] public void PatternMemberTest () { Assert.AreEqual (SWA.DockPattern.Pattern, SWA.DockPatternIdentifiers.Pattern); Assert.IsNotNull (SWA.DockPattern.Pattern); Assert.AreEqual (SWA.DockPattern.DockPositionProperty, SWA.DockPatternIdentifiers.DockPositionProperty); Assert.IsNotNull (SWA.DockPattern.DockPositionProperty); Assert.AreEqual (SWA.ExpandCollapsePattern.Pattern, SWA.ExpandCollapsePatternIdentifiers.Pattern); Assert.IsNotNull (SWA.ExpandCollapsePattern.Pattern); Assert.AreEqual (SWA.ExpandCollapsePattern.ExpandCollapseStateProperty, SWA.ExpandCollapsePatternIdentifiers.ExpandCollapseStateProperty); Assert.IsNotNull (SWA.ExpandCollapsePattern.ExpandCollapseStateProperty); Assert.AreEqual (SWA.GridItemPattern.Pattern, SWA.GridItemPatternIdentifiers.Pattern); Assert.IsNotNull (SWA.GridItemPattern.Pattern); Assert.AreEqual (SWA.GridItemPattern.RowProperty, SWA.GridItemPatternIdentifiers.RowProperty); Assert.IsNotNull (SWA.GridItemPattern.RowProperty); Assert.AreEqual (SWA.GridItemPattern.ColumnProperty, SWA.GridItemPatternIdentifiers.ColumnProperty); Assert.IsNotNull (SWA.GridItemPattern.ColumnProperty); Assert.AreEqual (SWA.GridItemPattern.RowSpanProperty, SWA.GridItemPatternIdentifiers.RowSpanProperty); Assert.IsNotNull (SWA.GridItemPattern.RowSpanProperty); Assert.AreEqual (SWA.GridItemPattern.ColumnSpanProperty, SWA.GridItemPatternIdentifiers.ColumnSpanProperty); Assert.IsNotNull (SWA.GridItemPattern.ColumnSpanProperty); Assert.AreEqual (SWA.GridItemPattern.ContainingGridProperty, SWA.GridItemPatternIdentifiers.ContainingGridProperty); Assert.IsNotNull (SWA.GridItemPattern.ContainingGridProperty); Assert.AreEqual (SWA.GridPattern.Pattern, SWA.GridPatternIdentifiers.Pattern); Assert.IsNotNull (SWA.GridPattern.Pattern); Assert.AreEqual (SWA.GridPattern.RowCountProperty, SWA.GridPatternIdentifiers.RowCountProperty); Assert.IsNotNull (SWA.GridPattern.RowCountProperty); Assert.AreEqual (SWA.GridPattern.ColumnCountProperty, SWA.GridPatternIdentifiers.ColumnCountProperty); Assert.IsNotNull (SWA.GridPattern.ColumnCountProperty); Assert.AreEqual (SWA.InvokePattern.Pattern, SWA.InvokePatternIdentifiers.Pattern); Assert.IsNotNull (SWA.InvokePattern.Pattern); Assert.AreEqual (SWA.InvokePattern.InvokedEvent, SWA.InvokePatternIdentifiers.InvokedEvent); Assert.IsNotNull (SWA.InvokePattern.InvokedEvent); Assert.AreEqual (SWA.MultipleViewPattern.Pattern, SWA.MultipleViewPatternIdentifiers.Pattern); Assert.IsNotNull (SWA.MultipleViewPattern.Pattern); Assert.AreEqual (SWA.MultipleViewPattern.CurrentViewProperty, SWA.MultipleViewPatternIdentifiers.CurrentViewProperty); Assert.IsNotNull (SWA.MultipleViewPattern.CurrentViewProperty); Assert.AreEqual (SWA.MultipleViewPattern.SupportedViewsProperty, SWA.MultipleViewPatternIdentifiers.SupportedViewsProperty); Assert.IsNotNull (SWA.MultipleViewPattern.SupportedViewsProperty); Assert.AreEqual (SWA.RangeValuePattern.Pattern, SWA.RangeValuePatternIdentifiers.Pattern); Assert.IsNotNull (SWA.RangeValuePattern.Pattern); Assert.AreEqual (SWA.RangeValuePattern.ValueProperty, SWA.RangeValuePatternIdentifiers.ValueProperty); Assert.IsNotNull (SWA.RangeValuePattern.ValueProperty); Assert.AreEqual (SWA.RangeValuePattern.IsReadOnlyProperty, SWA.RangeValuePatternIdentifiers.IsReadOnlyProperty); Assert.IsNotNull (SWA.RangeValuePattern.IsReadOnlyProperty); Assert.AreEqual (SWA.RangeValuePattern.MinimumProperty, SWA.RangeValuePatternIdentifiers.MinimumProperty); Assert.IsNotNull (SWA.RangeValuePattern.MinimumProperty); Assert.AreEqual (SWA.RangeValuePattern.MaximumProperty, SWA.RangeValuePatternIdentifiers.MaximumProperty); Assert.IsNotNull (SWA.RangeValuePattern.MaximumProperty); Assert.AreEqual (SWA.RangeValuePattern.LargeChangeProperty, SWA.RangeValuePatternIdentifiers.LargeChangeProperty); Assert.IsNotNull (SWA.RangeValuePattern.LargeChangeProperty); Assert.AreEqual (SWA.RangeValuePattern.SmallChangeProperty, SWA.RangeValuePatternIdentifiers.SmallChangeProperty); Assert.IsNotNull (SWA.RangeValuePattern.SmallChangeProperty); Assert.AreEqual (SWA.ScrollItemPattern.Pattern, SWA.ScrollItemPatternIdentifiers.Pattern); Assert.IsNotNull (SWA.ScrollItemPattern.Pattern); Assert.AreEqual (SWA.ScrollPattern.Pattern, SWA.ScrollPatternIdentifiers.Pattern); Assert.IsNotNull (SWA.ScrollPattern.Pattern); Assert.AreEqual (SWA.ScrollPattern.HorizontalScrollPercentProperty, SWA.ScrollPatternIdentifiers.HorizontalScrollPercentProperty); Assert.IsNotNull (SWA.ScrollPattern.HorizontalScrollPercentProperty); Assert.AreEqual (SWA.ScrollPattern.VerticalScrollPercentProperty, SWA.ScrollPatternIdentifiers.VerticalScrollPercentProperty); Assert.IsNotNull (SWA.ScrollPattern.VerticalScrollPercentProperty); Assert.AreEqual (SWA.ScrollPattern.HorizontalViewSizeProperty, SWA.ScrollPatternIdentifiers.HorizontalViewSizeProperty); Assert.IsNotNull (SWA.ScrollPattern.HorizontalViewSizeProperty); Assert.AreEqual (SWA.ScrollPattern.VerticalViewSizeProperty, SWA.ScrollPatternIdentifiers.VerticalViewSizeProperty); Assert.IsNotNull (SWA.ScrollPattern.VerticalViewSizeProperty); Assert.AreEqual (SWA.ScrollPattern.HorizontallyScrollableProperty, SWA.ScrollPatternIdentifiers.HorizontallyScrollableProperty); Assert.IsNotNull (SWA.ScrollPattern.HorizontallyScrollableProperty); Assert.AreEqual (SWA.ScrollPattern.VerticallyScrollableProperty, SWA.ScrollPatternIdentifiers.VerticallyScrollableProperty); Assert.IsNotNull (SWA.ScrollPattern.VerticallyScrollableProperty); Assert.AreEqual (SWA.SelectionItemPattern.Pattern, SWA.SelectionItemPatternIdentifiers.Pattern); Assert.IsNotNull (SWA.SelectionItemPattern.Pattern); Assert.AreEqual (SWA.SelectionItemPattern.IsSelectedProperty, SWA.SelectionItemPatternIdentifiers.IsSelectedProperty); Assert.IsNotNull (SWA.SelectionItemPattern.IsSelectedProperty); Assert.AreEqual (SWA.SelectionItemPattern.SelectionContainerProperty, SWA.SelectionItemPatternIdentifiers.SelectionContainerProperty); Assert.IsNotNull (SWA.SelectionItemPattern.SelectionContainerProperty); Assert.AreEqual (SWA.SelectionItemPattern.ElementAddedToSelectionEvent, SWA.SelectionItemPatternIdentifiers.ElementAddedToSelectionEvent); Assert.IsNotNull (SWA.SelectionItemPattern.ElementAddedToSelectionEvent); Assert.AreEqual (SWA.SelectionItemPattern.ElementRemovedFromSelectionEvent, SWA.SelectionItemPatternIdentifiers.ElementRemovedFromSelectionEvent); Assert.IsNotNull (SWA.SelectionItemPattern.ElementRemovedFromSelectionEvent); Assert.AreEqual (SWA.SelectionItemPattern.ElementSelectedEvent, SWA.SelectionItemPatternIdentifiers.ElementSelectedEvent); Assert.IsNotNull (SWA.SelectionItemPattern.ElementSelectedEvent); Assert.AreEqual (SWA.SelectionPattern.Pattern, SWA.SelectionPatternIdentifiers.Pattern); Assert.IsNotNull (SWA.SelectionPattern.Pattern); Assert.AreEqual (SWA.SelectionPattern.SelectionProperty, SWA.SelectionPatternIdentifiers.SelectionProperty); Assert.IsNotNull (SWA.SelectionPattern.SelectionProperty); Assert.AreEqual (SWA.SelectionPattern.CanSelectMultipleProperty, SWA.SelectionPatternIdentifiers.CanSelectMultipleProperty); Assert.IsNotNull (SWA.SelectionPattern.CanSelectMultipleProperty); Assert.AreEqual (SWA.SelectionPattern.IsSelectionRequiredProperty, SWA.SelectionPatternIdentifiers.IsSelectionRequiredProperty); Assert.IsNotNull (SWA.SelectionPattern.IsSelectionRequiredProperty); Assert.AreEqual (SWA.SelectionPattern.InvalidatedEvent, SWA.SelectionPatternIdentifiers.InvalidatedEvent); Assert.IsNotNull (SWA.SelectionPattern.InvalidatedEvent); Assert.AreEqual (SWA.TableItemPattern.Pattern, SWA.TableItemPatternIdentifiers.Pattern); Assert.IsNotNull (SWA.TableItemPattern.Pattern); Assert.AreEqual (SWA.TableItemPattern.RowHeaderItemsProperty, SWA.TableItemPatternIdentifiers.RowHeaderItemsProperty); Assert.IsNotNull (SWA.TableItemPattern.RowHeaderItemsProperty); Assert.AreEqual (SWA.TableItemPattern.ColumnHeaderItemsProperty, SWA.TableItemPatternIdentifiers.ColumnHeaderItemsProperty); Assert.IsNotNull (SWA.TableItemPattern.ColumnHeaderItemsProperty); Assert.AreEqual (SWA.TablePattern.Pattern, SWA.TablePatternIdentifiers.Pattern); Assert.IsNotNull (SWA.TablePattern.Pattern); Assert.AreEqual (SWA.TablePattern.RowHeadersProperty, SWA.TablePatternIdentifiers.RowHeadersProperty); Assert.IsNotNull (SWA.TablePattern.RowHeadersProperty); Assert.AreEqual (SWA.TablePattern.ColumnHeadersProperty, SWA.TablePatternIdentifiers.ColumnHeadersProperty); Assert.IsNotNull (SWA.TablePattern.ColumnHeadersProperty); Assert.AreEqual (SWA.TablePattern.RowOrColumnMajorProperty, SWA.TablePatternIdentifiers.RowOrColumnMajorProperty); Assert.IsNotNull (SWA.TablePattern.RowOrColumnMajorProperty); Assert.AreEqual (SWA.TextPattern.AnimationStyleAttribute, SWA.TextPatternIdentifiers.AnimationStyleAttribute); Assert.IsNotNull (SWA.TextPattern.AnimationStyleAttribute); Assert.AreEqual (SWA.TextPattern.BackgroundColorAttribute, SWA.TextPatternIdentifiers.BackgroundColorAttribute); Assert.IsNotNull (SWA.TextPattern.BackgroundColorAttribute); Assert.AreEqual (SWA.TextPattern.BulletStyleAttribute, SWA.TextPatternIdentifiers.BulletStyleAttribute); Assert.IsNotNull (SWA.TextPattern.BulletStyleAttribute); Assert.AreEqual (SWA.TextPattern.CapStyleAttribute, SWA.TextPatternIdentifiers.CapStyleAttribute); Assert.IsNotNull (SWA.TextPattern.CapStyleAttribute); Assert.AreEqual (SWA.TextPattern.CultureAttribute, SWA.TextPatternIdentifiers.CultureAttribute); Assert.IsNotNull (SWA.TextPattern.CultureAttribute); Assert.AreEqual (SWA.TextPattern.FontNameAttribute, SWA.TextPatternIdentifiers.FontNameAttribute); Assert.IsNotNull (SWA.TextPattern.FontNameAttribute); Assert.AreEqual (SWA.TextPattern.FontSizeAttribute, SWA.TextPatternIdentifiers.FontSizeAttribute); Assert.IsNotNull (SWA.TextPattern.FontSizeAttribute); Assert.AreEqual (SWA.TextPattern.FontWeightAttribute, SWA.TextPatternIdentifiers.FontWeightAttribute); Assert.IsNotNull (SWA.TextPattern.FontWeightAttribute); Assert.AreEqual (SWA.TextPattern.ForegroundColorAttribute, SWA.TextPatternIdentifiers.ForegroundColorAttribute); Assert.IsNotNull (SWA.TextPattern.ForegroundColorAttribute); Assert.AreEqual (SWA.TextPattern.HorizontalTextAlignmentAttribute, SWA.TextPatternIdentifiers.HorizontalTextAlignmentAttribute); Assert.IsNotNull (SWA.TextPattern.HorizontalTextAlignmentAttribute); Assert.AreEqual (SWA.TextPattern.IndentationFirstLineAttribute, SWA.TextPatternIdentifiers.IndentationFirstLineAttribute); Assert.IsNotNull (SWA.TextPattern.IndentationFirstLineAttribute); Assert.AreEqual (SWA.TextPattern.IndentationLeadingAttribute, SWA.TextPatternIdentifiers.IndentationLeadingAttribute); Assert.IsNotNull (SWA.TextPattern.IndentationLeadingAttribute); Assert.AreEqual (SWA.TextPattern.IndentationTrailingAttribute, SWA.TextPatternIdentifiers.IndentationTrailingAttribute); Assert.IsNotNull (SWA.TextPattern.IndentationTrailingAttribute); Assert.AreEqual (SWA.TextPattern.IsHiddenAttribute, SWA.TextPatternIdentifiers.IsHiddenAttribute); Assert.IsNotNull (SWA.TextPattern.IsHiddenAttribute); Assert.AreEqual (SWA.TextPattern.IsItalicAttribute, SWA.TextPatternIdentifiers.IsItalicAttribute); Assert.IsNotNull (SWA.TextPattern.IsItalicAttribute); Assert.AreEqual (SWA.TextPattern.IsReadOnlyAttribute, SWA.TextPatternIdentifiers.IsReadOnlyAttribute); Assert.IsNotNull (SWA.TextPattern.IsReadOnlyAttribute); Assert.AreEqual (SWA.TextPattern.IsSubscriptAttribute, SWA.TextPatternIdentifiers.IsSubscriptAttribute); Assert.IsNotNull (SWA.TextPattern.IsSubscriptAttribute); Assert.AreEqual (SWA.TextPattern.IsSuperscriptAttribute, SWA.TextPatternIdentifiers.IsSuperscriptAttribute); Assert.IsNotNull (SWA.TextPattern.IsSuperscriptAttribute); Assert.AreEqual (SWA.TextPattern.MarginBottomAttribute, SWA.TextPatternIdentifiers.MarginBottomAttribute); Assert.IsNotNull (SWA.TextPattern.MarginBottomAttribute); Assert.AreEqual (SWA.TextPattern.MarginLeadingAttribute, SWA.TextPatternIdentifiers.MarginLeadingAttribute); Assert.IsNotNull (SWA.TextPattern.MarginLeadingAttribute); Assert.AreEqual (SWA.TextPattern.MarginTopAttribute, SWA.TextPatternIdentifiers.MarginTopAttribute); Assert.IsNotNull (SWA.TextPattern.MarginTopAttribute); Assert.AreEqual (SWA.TextPattern.MarginTrailingAttribute, SWA.TextPatternIdentifiers.MarginTrailingAttribute); Assert.IsNotNull (SWA.TextPattern.MarginTrailingAttribute); Assert.AreEqual (SWA.TextPattern.MixedAttributeValue, SWA.TextPatternIdentifiers.MixedAttributeValue); Assert.IsNotNull (SWA.TextPattern.MixedAttributeValue); Assert.AreEqual (SWA.TextPattern.OutlineStylesAttribute, SWA.TextPatternIdentifiers.OutlineStylesAttribute); Assert.IsNotNull (SWA.TextPattern.OutlineStylesAttribute); Assert.AreEqual (SWA.TextPattern.OverlineColorAttribute, SWA.TextPatternIdentifiers.OverlineColorAttribute); Assert.IsNotNull (SWA.TextPattern.OverlineColorAttribute); Assert.AreEqual (SWA.TextPattern.OverlineStyleAttribute, SWA.TextPatternIdentifiers.OverlineStyleAttribute); Assert.IsNotNull (SWA.TextPattern.OverlineStyleAttribute); Assert.AreEqual (SWA.TextPattern.Pattern, SWA.TextPatternIdentifiers.Pattern); Assert.IsNotNull (SWA.TextPattern.Pattern); Assert.AreEqual (SWA.TextPattern.StrikethroughColorAttribute, SWA.TextPatternIdentifiers.StrikethroughColorAttribute); Assert.IsNotNull (SWA.TextPattern.StrikethroughColorAttribute); Assert.AreEqual (SWA.TextPattern.StrikethroughStyleAttribute, SWA.TextPatternIdentifiers.StrikethroughStyleAttribute); Assert.IsNotNull (SWA.TextPattern.StrikethroughStyleAttribute); Assert.AreEqual (SWA.TextPattern.TabsAttribute, SWA.TextPatternIdentifiers.TabsAttribute); Assert.IsNotNull (SWA.TextPattern.TabsAttribute); Assert.AreEqual (SWA.TextPattern.TextFlowDirectionsAttribute, SWA.TextPatternIdentifiers.TextFlowDirectionsAttribute); Assert.IsNotNull (SWA.TextPattern.TextFlowDirectionsAttribute); Assert.AreEqual (SWA.TextPattern.UnderlineColorAttribute, SWA.TextPatternIdentifiers.UnderlineColorAttribute); Assert.IsNotNull (SWA.TextPattern.UnderlineColorAttribute); Assert.AreEqual (SWA.TextPattern.UnderlineStyleAttribute, SWA.TextPatternIdentifiers.UnderlineStyleAttribute); Assert.IsNotNull (SWA.TextPattern.UnderlineStyleAttribute); Assert.AreEqual (SWA.TextPattern.TextChangedEvent, SWA.TextPatternIdentifiers.TextChangedEvent); Assert.IsNotNull (SWA.TextPattern.TextChangedEvent); Assert.AreEqual (SWA.TextPattern.TextSelectionChangedEvent, SWA.TextPatternIdentifiers.TextSelectionChangedEvent); Assert.IsNotNull (SWA.TextPattern.TextSelectionChangedEvent); Assert.AreEqual (SWA.TogglePattern.Pattern, SWA.TogglePatternIdentifiers.Pattern); Assert.IsNotNull (SWA.TogglePattern.Pattern); Assert.AreEqual (SWA.TogglePattern.ToggleStateProperty, SWA.TogglePatternIdentifiers.ToggleStateProperty); Assert.IsNotNull (SWA.TogglePattern.ToggleStateProperty); Assert.AreEqual (SWA.ValuePattern.Pattern, SWA.ValuePatternIdentifiers.Pattern); Assert.IsNotNull (SWA.ValuePattern.Pattern); Assert.AreEqual (SWA.ValuePattern.ValueProperty, SWA.ValuePatternIdentifiers.ValueProperty); Assert.IsNotNull (SWA.ValuePattern.ValueProperty); Assert.AreEqual (SWA.ValuePattern.IsReadOnlyProperty, SWA.ValuePatternIdentifiers.IsReadOnlyProperty); Assert.IsNotNull (SWA.ValuePattern.IsReadOnlyProperty); } [Test] public void RemoveAutomationEventHandlerTest () { int eventCount = 0; Process p = BaseTest.StartApplication (@"SampleForm.exe", string.Empty); potentiallyRunningProcesses.Add (p); SWA.AutomationEventHandler handler = (o, e) => eventCount++; Thread.Sleep (2000); // Waiting a little bit for the application to show up SWA.AutomationElement testFormElement = SWA.AutomationElement.RootElement.FindFirst (SWA.TreeScope.Children, new SWA.PropertyCondition (AEIds.ProcessIdProperty, p.Id)); Assert.IsNotNull (testFormElement, "window"); SWA.Automation.RemoveAutomationEventHandler (SWA.AutomationElementIdentifiers.AsyncContentLoadedEvent, testFormElement, handler); BaseTest.AssertRaises ( () => SWA.Automation.RemoveAutomationEventHandler (SWA.AutomationElementIdentifiers.AutomationFocusChangedEvent, testFormElement, handler), "SWA.AutomationElementIdentifiers.AutomationFocusChangedEvent"); BaseTest.AssertRaises ( () => SWA.Automation.RemoveAutomationEventHandler (SWA.AutomationElementIdentifiers.AutomationPropertyChangedEvent, testFormElement, handler), "SWA.AutomationElementIdentifiers.AutomationPropertyChangedEvent"); SWA.Automation.RemoveAutomationEventHandler (SWA.AutomationElementIdentifiers.LayoutInvalidatedEvent, testFormElement, handler); SWA.Automation.RemoveAutomationEventHandler (SWA.AutomationElementIdentifiers.MenuClosedEvent, testFormElement, handler); SWA.Automation.RemoveAutomationEventHandler (SWA.AutomationElementIdentifiers.MenuOpenedEvent, testFormElement, handler); BaseTest.AssertRaises ( () => SWA.Automation.RemoveAutomationEventHandler (SWA.AutomationElementIdentifiers.StructureChangedEvent, testFormElement, handler), "SWA.AutomationElementIdentifiers.StructureChangedEvent"); SWA.Automation.RemoveAutomationEventHandler (SWA.AutomationElementIdentifiers.ToolTipClosedEvent, testFormElement, handler); SWA.Automation.RemoveAutomationEventHandler (SWA.AutomationElementIdentifiers.ToolTipOpenedEvent, testFormElement, handler); SWA.Automation.RemoveAutomationEventHandler (SWA.InvokePatternIdentifiers.InvokedEvent, testFormElement, handler); SWA.Automation.RemoveAutomationEventHandler (SWA.SelectionItemPatternIdentifiers.ElementAddedToSelectionEvent, testFormElement, handler); SWA.Automation.RemoveAutomationEventHandler (SWA.SelectionItemPatternIdentifiers.ElementRemovedFromSelectionEvent, testFormElement, handler); SWA.Automation.RemoveAutomationEventHandler (SWA.SelectionItemPatternIdentifiers.ElementSelectedEvent, testFormElement, handler); SWA.Automation.RemoveAutomationEventHandler (SWA.SelectionPatternIdentifiers.InvalidatedEvent, testFormElement, handler); SWA.Automation.RemoveAutomationEventHandler (SWA.TextPatternIdentifiers.TextChangedEvent, testFormElement, handler); SWA.Automation.RemoveAutomationEventHandler (SWA.TextPatternIdentifiers.TextSelectionChangedEvent, testFormElement, handler); SWA.Automation.RemoveAutomationEventHandler (SWA.WindowPatternIdentifiers.WindowOpenedEvent, testFormElement, handler); p.Kill (); } } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/swfclienttest.sh.in0000644000016200001670000000247111433571545031132 0ustar00hudsonhudson00000000000000#!/bin/bash DLL=UIAutomationClientTests.dll TEST_DISPLAY=:99 NUNIT_FLAGS="-nothread -noshadow" while getopts xd:lf:t: o do case "$o" in x) xephyr="yes";; d) optdisplay="$OPTARG" && xephyr="yes";; l) labels="yes";; f) fixture="$OPTARG";; t) runtest="$OPTARG" && test "x$fixture" != "x";; \?) echo "Usage: $0 -x -l -d -f -t " && exit 1;; esac done if [ "x$optdisplay" != "x" ]; then TEST_DISPLAY=:$optdisplay fi # Reset $@ shift `echo $OPTIND-1 | bc` NUNIT_ARGS=$* if [ "x$xephyr" == "xyes" ]; then Xephyr -ac -screen 800x600 -br -reset -terminate $TEST_DISPLAY & xephyr_pid=$! export DISPLAY=$TEST_DISPLAY gnome-session & metacity & metacity_pid=$! fi if [ "x$fixture" != "x" ]; then echo "Running only the unit tests for fixture $fixture..." echo NUNIT_ARGS="--fixture=MonoTests.System.Windows.Automation.${fixture}" fi if [ "x$runtest" != "x" ]; then echo "Running only the unit test $runtest from $fixture" echo NUNIT_ARGS="${NUNIT_ARGS} --run=MonoTests.System.Windows.Automation.${fixture}.${runtest}" fi if [ "x$labels" == "xyes" ]; then NUNIT_FLAGS="${NUNIT_FLAGS} -labels" fi (cd bin/Debug; \ @MONO@ --debug @NUNIT_PATH@/nunit-console.exe ${NUNIT_FLAGS} ${DLL} ${NUNIT_ARGS}) if [ "x$xephyr" == "xyes" ]; then kill $metacity_pid $xephyr_pid fi mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/TogglePatternTest.cs0000644000016200001670000000667711433571545031255 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; //using System.Windows; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using MonoTests.System.Windows.Automation; using At = System.Windows.Automation.Automation; namespace MonoTests.System.Windows.Automation { [TestFixture] public class TogglePatternTest : BaseTest { #region Test Methods [Test] public void PropertiesTest () { CheckPatternIdentifiers (); } [Test] public void ToggleTest () { TogglePattern pattern = (TogglePattern) checkBox1Element.GetCurrentPattern (TogglePattern.Pattern); Assert.AreEqual (ToggleState.Off, pattern.Current.ToggleState, "ToggleState before Toggle"); pattern.Toggle (); // TODO: Enable this after resolving at-spi-sharp threading/MainLoop issues if (!Atspi) Assert.AreEqual (ToggleState.On, pattern.Current.ToggleState, "ToggleState after Toggle"); } [Test] public void NotEnabledTest () { TogglePattern pattern = null; if (!Atspi) { RunCommand ("disable checkBox1"); pattern = (TogglePattern) checkBox1Element.GetCurrentPattern (TogglePattern.Pattern); } else { pattern = (TogglePattern) checkBox2Element.GetCurrentPattern (TogglePattern.Pattern); } try { pattern.Toggle (); Assert.Fail ("Should throw ElementNotEnabledException"); } catch (ElementNotEnabledException) { } if (!Atspi) RunCommand ("enable checkBox1"); } [Test] public void Z_EventTest () { int eventCount = 0; AutomationPropertyChangedEventHandler handler = (o, e) => eventCount++; At.AddAutomationPropertyChangedEventHandler (checkBox1Element, TreeScope.Element, handler, TogglePattern.ToggleStateProperty); TogglePattern pattern = (TogglePattern) checkBox1Element.GetCurrentPattern (TogglePattern.Pattern); pattern.Toggle (); //We should expect an AutomationPropertyChangedEvent here, //But since no such event fired on Windows Winforms, //then we assert no event fired here int expectedEventCount = (Atspi? 1: 0); Assert.AreEqual (expectedEventCount, eventCount, "ToggleState changed event"); } #endregion } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/CacheRequestTest.cs0000644000016200001670000025127411433571545031045 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.Windows.Automation; using SWA = System.Windows.Automation; using System.Windows.Automation.Text; using At = System.Windows.Automation.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace MonoTests.System.Windows.Automation { [TestFixture] public class CacheRequestTest : BaseTest { // TODO: Test behavior of AutomationElements passed to StructureChanged event handlers which were signed up while there was an active CacheRequest: // TODO: Out-of-order calls to Dispose // TODO: Test GetUpdatedCache with AutomationElementMode.None // TODO: Test GetCurrentPropertyValue with AutomationElementMode.None // TODO: CachedChildren/CachedParent with GetUpdatedCache (activated and not) private readonly CacheRequest originalCurrent = CacheRequest.Current; private int eventCount; private AutomationElement eventElement; private AutomationElement hScrollBarElement; [SetUp] public void SetUp () { while (CacheRequest.Current != originalCurrent) CacheRequest.Current.Pop (); Assert.AreEqual (originalCurrent, CacheRequest.Current, "At SetUp time, CacheRequest.Current should be set back to the original request"); // to enable textBox3's horizontal scroll bar. RunCommand ("set textBox3 long text"); AndCondition horizontalScrollCondition = new AndCondition ( new PropertyCondition (AutomationElementIdentifiers.ControlTypeProperty, ControlType.ScrollBar), new PropertyCondition (AutomationElementIdentifiers.OrientationProperty, OrientationType.Horizontal)); hScrollBarElement = textbox3Element.FindFirst (TreeScope.Children, horizontalScrollCondition); Assert.IsNotNull (hScrollBarElement); } [TearDown] public void TearDown () { Assert.AreEqual (originalCurrent, CacheRequest.Current, "At TearDown time, CacheRequest.Current should be set back to the original request"); } [Test] public void ActiveRequestModificationTest () { // Test modifying originalCurrent AssertRaises ( () => originalCurrent.Add (AutomationElement.ControlTypeProperty), "calling Add on original CacheRequest"); AssertRaises ( () => originalCurrent.AutomationElementMode = AutomationElementMode.None, "setting AutomationElementMode on original CacheRequest"); AssertRaises ( () => originalCurrent.TreeScope = TreeScope.Children, "setting TreeScope on original CacheRequest"); AssertRaises ( () => originalCurrent.TreeFilter = SWA.Automation.ContentViewCondition, "setting TreeFilter on original CacheRequest"); var request = new CacheRequest (); request.Add (AutomationElement.NameProperty); request.Push (); AssertRaises ( () => request.Add (AutomationElement.ControlTypeProperty), "calling Add on active CacheRequest"); AssertRaises ( () => request.AutomationElementMode = AutomationElementMode.None, "setting AutomationElementMode on active CacheRequest"); AssertRaises ( () => request.TreeScope = TreeScope.Children, "setting TreeScope on active CacheRequest"); AssertRaises ( () => request.TreeFilter = SWA.Automation.ContentViewCondition, "setting TreeFilter on active CacheRequest"); var request2 = new CacheRequest (); request2.Add (AutomationElement.ControlTypeProperty); request2.Push (); AssertRaises ( () => request.Add (AutomationElement.ControlTypeProperty), "calling Add on inactive CacheRequest that's still on the stack"); AssertRaises ( () => request.AutomationElementMode = AutomationElementMode.None, "setting AutomationElementMode on inactive CacheRequest that's still on the stack"); AssertRaises ( () => request.TreeScope = TreeScope.Children, "setting TreeScope on inactive CacheRequest that's still on the stack"); AssertRaises ( () => request.TreeFilter = SWA.Automation.ContentViewCondition, "setting TreeFilter on inactive CacheRequest that's still on the stack"); request2.Pop (); var request3 = new CacheRequest (); var disposable3 = request3.Activate (); AssertRaises ( () => request.Add (AutomationElement.ControlTypeProperty), "calling Add on inactive CacheRequest that's still on the stack"); AssertRaises ( () => request.AutomationElementMode = AutomationElementMode.None, "setting AutomationElementMode on inactive CacheRequest that's still on the stack"); AssertRaises ( () => request.TreeScope = TreeScope.Children, "setting TreeScope on inactive CacheRequest that's still on the stack"); AssertRaises ( () => request.TreeFilter = SWA.Automation.ContentViewCondition, "setting TreeFilter on inactive CacheRequest that's still on the stack"); request2.Push (); AssertRaises ( () => request3.Add (AutomationElement.ControlTypeProperty), "calling Add on activated CacheRequest that's not on top of stack"); AssertRaises ( () => request3.AutomationElementMode = AutomationElementMode.None, "setting AutomationElementMode on activated CacheRequest that's not on top of stack"); AssertRaises ( () => request3.TreeScope = TreeScope.Children, "setting TreeScope on activated CacheRequest that's not on top of stack"); AssertRaises ( () => request3.TreeFilter = SWA.Automation.ContentViewCondition, "setting TreeFilter on activated CacheRequest that's not on top of stack"); request2.Pop (); disposable3.Dispose (); request.Pop (); // Test modifying a request once it's no longer on the stack request.Add (AutomationElement.ControlTypeProperty); request.AutomationElementMode = AutomationElementMode.None; request.TreeScope = TreeScope.Children; request.TreeFilter = SWA.Automation.ContentViewCondition; } [Test] public void TreeWalkerTest () { var request = new CacheRequest (); request.Add (AutomationElement.NameProperty); request.Push (); Condition buttonCondition = new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Button); TreeWalker buttonWalker = new TreeWalker (buttonCondition); var button7ElementRef2 = buttonWalker.GetFirstChild (groupBox1Element); AssertRaises ( () => button7ElementRef2.Cached.Name.ToString (), "calling Cached.Name on element gotten from TreeWalker without specifying a CacheRequest"); AssertRaises ( () => button7ElementRef2 = buttonWalker.GetFirstChild (groupBox1Element, null), "passing null CacheRequest into TreeWalker.GetFirstChild"); // Even inactive CacheRequests work just fine var inactiveRequest = new CacheRequest (); inactiveRequest.Add (AutomationElement.ControlTypeProperty); button7ElementRef2 = buttonWalker.GetFirstChild (groupBox1Element, inactiveRequest); Assert.AreEqual (ControlType.Button, button7ElementRef2.Cached.ControlType, "Cached.ControlType"); AssertRaises ( () => button7ElementRef2.Cached.Name.ToString (), "calling Cached.Name on element fetched from TreeWalker with (invalid) CacheRequest that doesn't specify NameProperty"); button7ElementRef2 = buttonWalker.GetFirstChild (groupBox1Element, request); Assert.AreEqual (button7Element.Current.Name, button7ElementRef2.Cached.Name, "Cached.Name"); AssertRaises ( () => button7ElementRef2.Cached.ControlType.ToString (), "calling Cached.Name on element fetched from TreeWalker with (invalid) CacheRequest that doesn't specify ControlTypeProperty"); AssertRaises ( () => buttonWalker.GetFirstChild (null, request), "passing null element to GetFirstChild"); AssertRaises ( () => buttonWalker.GetFirstChild (groupBox1Element, null), "passing null request to GetFirstChild"); request.Pop (); request = new CacheRequest (); request.Add (AutomationElement.NameProperty); request.TreeFilter = new PropertyCondition (AutomationElement.ControlTypeProperty, ControlType.Button); using (request.Activate ()) { button7ElementRef2 = button7Element.GetUpdatedCache (request); Assert.AreEqual (button7Element.Current.Name, button7ElementRef2.Cached.Name, "Cached.Name"); // GetUpdatedCache works just fine, even for elements not in scope AutomationElement treeView1ElementRef2 = treeView1Element.GetUpdatedCache (request); Assert.AreEqual (treeView1Element.Current.Name, treeView1ElementRef2.Cached.Name, "Cached.Name"); AutomationElement element = TreeWalker.RawViewWalker.GetFirstChild (testFormElement); AutomationElement elementRef2 = TreeWalker.RawViewWalker.GetFirstChild (testFormElement, request); Assert.AreEqual (element.Current.Name, elementRef2.Cached.Name, "Cached.Name"); element = TreeWalker.RawViewWalker.GetFirstChild (treeView1Element); elementRef2 = TreeWalker.RawViewWalker.GetFirstChild (treeView1Element, request); // This works, too Assert.AreEqual (element.Current.Name, elementRef2.Cached.Name, "Cached.Name"); } // TODO: More tests with restrictive TreeFilter/TreeScope } [Test] public void GetCachedPropertyValueTest () { AssertRaises ( () => groupBox1Element.GetCachedPropertyValue (AutomationElement.NameProperty), "calling GetCachedPropertyValue on an element with no cache"); AssertRaises ( () => groupBox1Element.GetCachedPropertyValue (AutomationElement.NameProperty, true), "calling GetCachedPropertyValue on an element with no cache"); AssertRaises ( () => groupBox1Element.GetCachedPropertyValue (AutomationElement.NameProperty, false), "calling GetCachedPropertyValue on an element with no cache"); var request = new CacheRequest (); request.Add (AutomationElement.NameProperty); request.Push (); var groupBox1ElementRef2 = groupBox1Element.GetUpdatedCache (request); AssertRaises ( () => groupBox1Element.GetCachedPropertyValue (AutomationElement.NameProperty), "calling GetCachedPropertyValue on an element instance fetched without an active cache request"); Assert.AreEqual (groupBox1Element.Current.Name, groupBox1ElementRef2.GetCachedPropertyValue (AutomationElement.NameProperty)); VerifyCachedPropertyValue (groupBox1ElementRef2, AEIds.NameProperty, groupBox1Element.Current.Name, groupBox1Element.Current.Name, groupBox1Element.Current.Name); AssertRaises ( () => groupBox1ElementRef2.GetCachedPropertyValue (AutomationElement.OrientationProperty), "calling GetCachedPropertyValue for an uncached property"); var request2 = new CacheRequest (); request2.Add (AutomationElement.OrientationProperty); request2.Push (); groupBox1ElementRef2 = groupBox1Element.GetUpdatedCache (request2); VerifyCachedPropertyValue (groupBox1ElementRef2, AEIds.OrientationProperty, AutomationElement.NotSupported, OrientationType.None, OrientationType.None); request2.Pop (); request.Pop (); } [Test] public void CachedChildrenTest () { // NOTE: This property is generally tested in other tests AssertRaises ( () => testFormElement.CachedChildren.ToString (), "accessing CachedChildren on element retrieved with no active CacheRequest"); } [Test] public void CachedParentTest () { // NOTE: This property is generally tested in other tests AssertRaises ( () => button1Element.CachedParent.ToString (), "accessing CachedParent on element retrieved with no active CacheRequest"); } [Test] public void CachedTest () { var request = new CacheRequest (); request.Add (AutomationElement.NameProperty); AutomationElement label1ElementRef2 = null; using (request.Activate ()) { label1ElementRef2 = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Text)); var cache = label1ElementRef2.Cached; Assert.AreEqual ("label1", cache.Name); Assert.AreEqual ("label1", label1ElementRef2.Cached.Name); RunCommand ("click button1"); Thread.Sleep (500); Assert.AreEqual ("button1_click", label1ElementRef2.Current.Name); Assert.AreEqual ("label1", cache.Name); Assert.AreEqual ("label1", label1ElementRef2.Cached.Name); } Assert.AreEqual ("label1", label1ElementRef2.Cached.Name); request = new CacheRequest (); request.Add (ValuePattern.ValueProperty); request.Add (ValuePattern.Pattern); ValuePattern txtCommandCachedValuePattern = null; using (request.Activate ()) { AutomationElement txtCommandElementRef2 = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "txtCommand")); txtCommandCachedValuePattern = (ValuePattern) txtCommandElementRef2.GetCachedPattern (ValuePattern.Pattern); var cache = txtCommandCachedValuePattern.Cached; Assert.AreEqual ("click button1", cache.Value); Assert.AreEqual ("click button1", txtCommandCachedValuePattern.Cached.Value); RunCommand ("set textbox3 text"); Thread.Sleep (500); Assert.AreEqual ("set textbox3 text", txtCommandCachedValuePattern.Current.Value); Assert.AreEqual ("click button1", cache.Value); Assert.AreEqual ("click button1", txtCommandCachedValuePattern.Cached.Value); } Assert.AreEqual ("click button1", txtCommandCachedValuePattern.Cached.Value); // TODO: Fix this test case on Linux (fails because textbox name is coming from label) //var request = new CacheRequest (); //request.Add (AutomationElement.NameProperty); //AutomationElement textbox3ElementRef2 = null; //using (request.Activate ()) { // textbox3ElementRef2 = testFormElement.FindFirst (TreeScope.Children, // new PropertyCondition (AEIds.ControlTypeProperty, // ControlType.Document)); // var cache = textbox3ElementRef2.Cached; // Assert.AreEqual ("abcdefgabcdefgabcdef\n\n\n\n\n\n\n\ngabcdefgabcdefg", cache.Name); // Assert.AreEqual ("abcdefgabcdefgabcdef\n\n\n\n\n\n\n\ngabcdefgabcdefg", textbox3ElementRef2.Cached.Name); // RunCommand ("set textbox3 text"); // Thread.Sleep (500); // Assert.AreEqual ("abcdefgabcdefgabcdef\n\n\n\n\n\n\n\ngabcdefgabcdefg", cache.Name); // Assert.AreEqual ("abcdefgabcdefgabcdef\n\n\n\n\n\n\n\ngabcdefgabcdefg", textbox3ElementRef2.Cached.Name); //} //Assert.AreEqual ("abcdefgabcdefgabcdef\n\n\n\n\n\n\n\ngabcdefgabcdefg", textbox3ElementRef2.Cached.Name); } [Test] public void BasicPatternTest () { var request = new CacheRequest (); request.Add (WindowPattern.CanMaximizeProperty); var testFormElementRef2 = testFormElement.GetUpdatedCache (request); Assert.AreEqual (testFormElement.GetCurrentPropertyValue (WindowPattern.CanMaximizeProperty), testFormElementRef2.GetCachedPropertyValue (WindowPattern.CanMaximizeProperty), "GetCachedPropertyValue"); var windowPattern = (WindowPattern) testFormElementRef2.GetCurrentPattern (WindowPattern.Pattern); AssertRaises ( () => windowPattern.Cached.ToString (), "accessing WindowPattern.Cached on pattern returned from GetCurrentPattern"); AssertRaises ( () => testFormElementRef2.GetCachedPattern (WindowPattern.Pattern), "calling GetCachedPattern when WindowPattern is not cached (even though one of its properties is)"); object patternObj; Assert.IsFalse (testFormElementRef2.TryGetCachedPattern (WindowPattern.Pattern, out patternObj), "TryGetCachedPattern with uncached pattern"); Assert.IsNull (patternObj, "output of TryGetCachedPattern when pattern not found"); request.Add (WindowPattern.Pattern); testFormElementRef2 = testFormElement.GetUpdatedCache (request); AssertRaises ( () => testFormElementRef2.GetCachedPattern (InvokePattern.Pattern), "calling GetCachedPattern with unsupported and uncached pattern"); request.Add (InvokePattern.Pattern); testFormElementRef2 = testFormElement.GetUpdatedCache (request); AssertRaises ( () => testFormElementRef2.GetCachedPattern (InvokePattern.Pattern), "calling GetCachedPattern with unsupported (but cached) pattern for the element"); windowPattern = (WindowPattern) testFormElementRef2.GetCachedPattern (WindowPattern.Pattern); Assert.AreEqual (testFormElement.GetCurrentPropertyValue (WindowPattern.CanMaximizeProperty), windowPattern.Cached.CanMaximize, "WindowPattern.Cached.CanMaximize"); AssertRaises ( () => windowPattern.Cached.CanMinimize.ToString (), "accessing WindowPattern.Cached.CanMinimize when only WindowPattern and CanMaximizeProperty are cached"); Assert.IsTrue (testFormElementRef2.TryGetCachedPattern (WindowPattern.Pattern, out patternObj), "TryGetCachedPattern with cached pattern"); Assert.IsNotNull (patternObj as WindowPattern, "output of TryGetCachedPattern when pattern found"); } [Test] public void AddTest () { var request = new CacheRequest (); AutomationProperty nullProp = null; AssertRaises ( () => request.Add (nullProp), "passing null property"); AutomationPattern nullPattern = null; AssertRaises ( () => request.Add (nullPattern), "passing null pattern"); request.Add (AutomationElement.NameProperty); // Multiple identical calls to Add should be okay request.Add (AutomationElement.NameProperty); AutomationElement button1ElementRef2; using (request.Activate ()) { button1ElementRef2 = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "button1")); } Assert.AreEqual (button1Element.Current.Name, button1ElementRef2.Current.Name, "Both references to button1Element should have the same Current.Name"); Assert.AreEqual (button1Element.Current.Name, button1ElementRef2.Cached.Name, "button1Element Cached.Name should be the same as Current.Name"); Assert.IsNotNull (button1Element.Cached, "Original button1Element reference can be accessed, even if its properties cannot"); AssertRaises ( () => button1Element.Cached.Name.ToString (), "checking for cached NameProperty on original button1Element reference"); AssertRaises ( () => button1ElementRef2.Cached.ControlType.ToString (), "checking for cached ControlTypeProperty, since it wasn't part of the CacheRequest"); request.Add (AutomationElement.ControlTypeProperty); AssertRaises ( () => button1ElementRef2.Cached.ControlType.ToString (), "checking for cached ControlTypeProperty, after adding to inactive CacheRequest"); request.Activate ().Dispose (); AssertRaises ( () => button1ElementRef2.Cached.ControlType.ToString (), "checking for cached ControlTypeProperty, after adding to inactive CacheRequest"); using (request.Activate ()) { button1ElementRef2 = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Button)); } Assert.AreEqual (button1Element.Current.ControlType, button1ElementRef2.Cached.ControlType, "ControlType caching should work after accessing element while request was active"); } [Test] public void ActivateTest () { var request1 = new CacheRequest (); var request2 = new CacheRequest (); request1.Add (AutomationElement.NameProperty); request2.Add (AutomationElement.ControlTypeProperty); using (request1.Activate ()) { Assert.AreEqual (request1, CacheRequest.Current, "request1 should be set to Current"); var button1ElementRef2 = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Button)); button1ElementRef2.Cached.Name.ToString (); AssertRaises ( () => button1ElementRef2.Cached.ControlType.ToString (), "checking for cached ControlTypeProperty, though it is not added to an active CacheRequest"); using (request2.Activate ()) { Assert.AreEqual (request2, CacheRequest.Current, "request2 should be set to Current"); button1ElementRef2 = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Button)); AssertRaises ( () => button1ElementRef2.Cached.Name.ToString (), "checking for cached NameProperty, when another CacheRequest has been activated"); button1ElementRef2.Cached.ControlType.ToString (); } Assert.AreEqual (request1, CacheRequest.Current, "request1 should be set to Current after request2 is disposed"); AssertRaises ( () => button1ElementRef2.Cached.Name.ToString (), "checking for cached NameProperty, when another CacheRequest has been activated"); button1ElementRef2.Cached.ControlType.ToString (); button1ElementRef2 = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Button)); button1ElementRef2.Cached.Name.ToString (); AssertRaises ( () => button1ElementRef2.Cached.ControlType.ToString (), "checking for cached ControlTypeProperty, it is not added to an active CacheRequest"); } Assert.AreEqual (originalCurrent, CacheRequest.Current, "originalCurrent should be set to Current after request1 is disposed"); // No error with multiple calls to Dispose var request3 = new CacheRequest (); var disposable3 = request3.Activate (); Assert.AreEqual (request3, CacheRequest.Current, "request3 should be set to Current after being activated"); disposable3.Dispose (); Assert.AreEqual (originalCurrent, CacheRequest.Current, "originalCurrent should be set to Current after request3 is disposed"); disposable3.Dispose (); Assert.AreEqual (originalCurrent, CacheRequest.Current, "originalCurrent should be set to Current after request3 is double-disposed"); // Test double-activation // TODO: Disposal is out-of-order here, but not fully spec'd IDisposable disposable2a = request2.Activate (); Assert.AreEqual (request2, CacheRequest.Current, "request2 should be set to Current after being activated"); IDisposable disposable2b = request2.Activate (); Assert.AreNotEqual (disposable2a, disposable2b, "Two activations of same request gives two different IDisposables"); Assert.AreEqual (request2, CacheRequest.Current, "request2 should be set to Current after being activated again"); disposable2a.Dispose (); Assert.AreEqual (request2, CacheRequest.Current, "request2 should be set to Current after its first activation is disposed"); var button1ElementRef3 = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Button)); Assert.AreEqual (button1Element.Current.ControlType, button1ElementRef3.Cached.ControlType, "When a request is activated twice, and the first activation is disposed, the second activation should still be active"); disposable2b.Dispose (); Assert.AreEqual (originalCurrent, CacheRequest.Current, "originalCurrent should be set to Current after second request2 activation is disposed"); } [Test] public void ThreadingTest () { CacheRequest originalRequest2 = null; CacheRequest request2 = null; CacheRequest current2a = null; CacheRequest current2b = null; CacheRequest current2c = null; AutomationElement testFormElementRef2 = null; EventWaitHandle ewh1 = new EventWaitHandle (false, EventResetMode.ManualReset); EventWaitHandle ewh2 = new EventWaitHandle (false, EventResetMode.ManualReset); bool threadComplete = false; var t = new Thread (() => { originalRequest2 = CacheRequest.Current; request2 = new CacheRequest (); request2.Add (AutomationElement.NameProperty); request2.Push (); current2a = CacheRequest.Current; testFormElementRef2 = AutomationElement.RootElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ProcessIdProperty, p.Id)); ewh1.Set (); ewh2.WaitOne (); current2b = CacheRequest.Current; request2.Pop (); current2c = CacheRequest.Current; ewh2.Reset (); ewh1.Set (); ewh2.WaitOne (); threadComplete = true; ewh1.Set (); }); t.Start (); Assert.IsTrue (ewh1.WaitOne (500), "Timed out waiting on thread"); Assert.AreSame (originalCurrent, originalRequest2, "No matter the thread, all stacks have the same original request on bottom"); Assert.AreEqual (originalCurrent, CacheRequest.Current, "Even though there is an active request on another thread, Current returns the original request on this thread"); Assert.AreEqual (request2, current2a, "Current on the other thread returns an active request"); AssertRaises ( () => request2.Pop (), "popping the active request from another thread"); AssertRaises ( () => request2.Add (AutomationElement.NameProperty), "calling Add on active request from another thread"); request2.Push (); request2.Pop (); Assert.AreEqual (testFormElement.Current.Name, testFormElementRef2.Cached.Name, "Okay to use cached element from one thread in another thread"); var testFormElementRef3 = testFormElement.GetUpdatedCache (request2); Assert.AreEqual (testFormElement.Current.Name, testFormElementRef3.Cached.Name, "Okay to call GetUpdatedCache using request from another thread"); testFormElementRef3 = AutomationElement.RootElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ProcessIdProperty, p.Id)); AssertRaises ( () => testFormElementRef3.Cached.Name.ToString (), "accessing cached property from element retrieved when only active CacheRequest was in another thread"); ewh1.Reset (); ewh2.Set (); Assert.IsTrue (ewh1.WaitOne (500), "Timed out waiting on thread"); Assert.AreEqual (request2, current2b, "Current on the thread unaffected by changes in this thread's request stack"); Assert.AreEqual (originalRequest2, current2c, "Current on the thread goes back to the original request after active request popped"); Assert.IsFalse (threadComplete, "Thread should not have completed at this point"); ewh1.Reset (); ewh2.Set (); Assert.IsTrue (ewh1.WaitOne (500), "Timed out waiting on thread"); Assert.IsTrue (threadComplete, "Thread should have completed at this point"); } [Test] public void CloneTest () { var request = new CacheRequest (); request.AutomationElementMode = AutomationElementMode.None; request.TreeScope = TreeScope.Subtree; request.TreeFilter = new PropertyCondition (AutomationElement.NameProperty, "test1"); var requestClone = request.Clone (); Assert.AreEqual (request.AutomationElementMode, requestClone.AutomationElementMode, "AutomationElementMode"); Assert.AreEqual (request.TreeScope, requestClone.TreeScope, "TreeScope"); Assert.AreSame (request.TreeFilter, requestClone.TreeFilter, "TreeFilter instance should be shared between original and clone"); // TODO: Test that same things have been Add'ed } [Test] public void AutomationElementModeTest () { var request = new CacheRequest (); Assert.AreEqual (AutomationElementMode.Full, request.AutomationElementMode, "Default AutomationElementMode value"); request.AutomationElementMode = AutomationElementMode.None; request.Add (AutomationElement.NameProperty); using (request.Activate ()) { var groupBox1ElementRef2 = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Group)); Assert.AreEqual (groupBox1Element.Current.Name, groupBox1ElementRef2.Cached.Name, "Cached.Name should be available on Element"); // NOTE: Current is accessible, just not its properties AssertRaises ( () => groupBox1ElementRef2.Current.Name.ToString (), "accessing property from Current with AutomationElementMode.None"); } request.Add (InvokePattern.Pattern); request.Add (SelectionPattern.Pattern); request.Add (SelectionPattern.SelectionProperty); using (request.Activate ()) { AutomationElement selectionElement = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Tree)); SelectionPattern selectionPattern = (SelectionPattern) selectionElement.GetCachedPattern ( SelectionPattern.Pattern); selectionPattern.Cached.GetSelection (); AssertRaises ( () => selectionPattern.Cached.CanSelectMultiple.ToString (), "Fetching a property that is not cached should throw InvalidOperationException"); AutomationElement invokeElement = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Button)); InvokePattern invokePattern = (InvokePattern) invokeElement.GetCachedPattern ( InvokePattern.Pattern); // LAMESPEC: Calling Invoke should throw exception invokePattern.Invoke (); } } [Test] public void TreeFilterTest () { var request = new CacheRequest (); Assert.AreEqual (SWA.Automation.ControlViewCondition, request.TreeFilter, "TreeFilter should default to ControlViewCondition"); request.Add (AutomationElement.NameProperty); request.TreeScope = TreeScope.Subtree; request.TreeFilter = new PropertyCondition (AutomationElement.ControlTypeProperty, ControlType.Group); using (request.Activate ()) { var button1ElementRef2 = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Button)); Assert.IsNull (button1ElementRef2, "AutomationElement.FindFirst should return null if element does not meet CacheRequest.TreeFilter"); var groupBox1ElementRef2 = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Group)); Assert.AreEqual (groupBox1ElementRef2.Current.Name, groupBox1ElementRef2.Cached.Name, "Cached.Name for element that does meet filter reqs"); // NOTE: This behavior seems very strange considering TreeScope Assert.AreEqual (0, groupBox1ElementRef2.CachedChildren.Count, "groupBox1 should have 0 CachedChildren, even though it has two children that meet CacheRequest.Filter"); } } [Test] public void TreeScopeTest () { var request = new CacheRequest (); Assert.AreEqual (TreeScope.Element, request.TreeScope, "Default TreeScope value"); AssertRaises ( () => request.TreeScope = TreeScope.Ancestors, "setting to TreeScope.Ancestors"); AssertRaises ( () => request.TreeScope = TreeScope.Parent, "setting to TreeScope.Parent"); AssertRaises ( () => request.TreeScope = TreeScope.Element | TreeScope.Parent, "setting to TreeScope.Element | TreeScope.Parent"); // TODO: Test Combined scopes that include parent/ancestors // TODO: TreeScope.Descendants request.Add (AutomationElement.NameProperty); //TreeScope.Element request.TreeScope = TreeScope.Element; using (request.Activate ()) { var groupBox1ElementRef2 = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Group)); Assert.AreEqual (groupBox1Element.Current.Name, groupBox1ElementRef2.Cached.Name, "Cached.Name should be available on Element"); AssertRaises ( () => groupBox1ElementRef2.CachedChildren.ToString (), "accessing CachedChildren with TreeScope.Element"); AssertRaises ( () => groupBox1ElementRef2.CachedParent.ToString (), "accessing CachedParent with TreeScope.Element"); } //TreeScope.Children request.TreeScope = TreeScope.Children; using (request.Activate ()) { var groupBox1ElementRef2 = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Group)); AssertRaises ( () => groupBox1ElementRef2.Cached.Name.ToString (), "accessing cached property on fetched element with TreeScope.Children"); Assert.AreEqual (4, groupBox1ElementRef2.CachedChildren.Count, "CachedChildren.Count"); string [] expectedChildNames = { "groupBox3", "groupBox2", "button3", "button2" }; for (int i = 0; i < groupBox1ElementRef2.CachedChildren.Count; i++) { AutomationElement childElement = groupBox1ElementRef2.CachedChildren [i]; Assert.AreEqual (expectedChildNames [i], childElement.Cached.Name, "Cached.Name for child " + i.ToString ()); Assert.AreSame (groupBox1ElementRef2, childElement.CachedParent, "groupbox1ElementRef2 and childElement.CachedParent should point to same instance"); // This fails because I guess CachedParent doesn't work too well when the parent wasn't included in the cache request //Assert.AreEqual (groupBox1ElementRef2.Current.Name, childElement.CachedParent.Cached.Name, // "CachedParent should be available on CachedChildren"); // This fails because AutomationElement.Equals relies on on RuntimeId comparison that fails...or maybe it's the RuntimeId fetching that fails //Assert.AreEqual (groupBox1ElementRef2, childElement.CachedParent, // "CachedParent should be available on CachedChildren"); AssertRaises ( () => childElement.CachedChildren.ToString (), "accessing childElement.CachedChildren with TreeScope.Children"); } AssertRaises ( () => groupBox1ElementRef2.CachedParent.ToString (), "accessing CachedParent with TreeScope.Children"); } //TreeScope.Subtree request.TreeScope = TreeScope.Subtree; using (request.Activate ()) { var groupBox1ElementRef2 = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Group)); Assert.AreEqual (groupBox1Element.Current.Name, groupBox1ElementRef2.Cached.Name, "Cached.Name should be available on Element with TreeScope.Subtree"); Assert.AreEqual (4, groupBox1ElementRef2.CachedChildren.Count, "CachedChildren.Count"); string [] expectedChildNames = { "groupBox3", "groupBox2", "button3", "button2" }; Dictionary expectedGrandchildNames = new Dictionary (); expectedGrandchildNames ["groupBox3"] = new string [] { "button7", "button6" }; expectedGrandchildNames ["groupBox2"] = new string [] { "button5", "checkBox1", "button4" }; for (int i = 0; i < groupBox1ElementRef2.CachedChildren.Count; i++) { AutomationElement childElement = groupBox1ElementRef2.CachedChildren [i]; Assert.AreEqual (expectedChildNames [i], childElement.Cached.Name, "Cached.Name for child " + i.ToString ()); Assert.AreSame (groupBox1ElementRef2, childElement.CachedParent, "groupbox1ElementRef2 and childElement.CachedParent should point to same instance"); if (expectedGrandchildNames.ContainsKey (expectedChildNames [i])) { Assert.AreEqual (expectedGrandchildNames [expectedChildNames [i]].Length, childElement.CachedChildren.Count, "childElement.CachedChildren.Count for " + expectedChildNames [i]); for (int j = 0; j < childElement.CachedChildren.Count; j++) { AutomationElement gcElement = childElement.CachedChildren [j]; Assert.AreEqual (expectedGrandchildNames [expectedChildNames [i]] [j], gcElement.Cached.Name, "Cached.Name for grandchild " + i.ToString ()); } } else { Assert.AreEqual (0, childElement.CachedChildren.Count, "Childless elements should have empty CachedChildren"); } } AssertRaises ( () => groupBox1ElementRef2.CachedParent.ToString (), "accessing CachedParent with TreeScope.Subtree"); } } [Test] public void GetUpdatedCacheTest () { AssertRaises ( () => button1Element.GetUpdatedCache (null), "passing null to GetUpdatedCache"); var request = new CacheRequest (); var updatedElement = button1Element.GetUpdatedCache (request); AssertRaises ( () => updatedElement.Cached.Name.ToString (), "trying to access cached property on element returned by GetUpdatedCache, when no properties were specified in CacheRequest"); request.Add (AutomationElement.NameProperty); updatedElement = button1Element.GetUpdatedCache (request); Assert.AreEqual (button1Element.Current.Name, updatedElement.Cached.Name, "updatedElement Cached.Name should be the same as Current.Name if request has NameProperty set, even if it has not been activated yet"); AutomationElement button1ElementRef2; using (request.Activate ()) { button1ElementRef2 = button1Element.GetUpdatedCache (request); } Assert.AreEqual (button1Element.Current.Name, button1ElementRef2.Current.Name, "Both references to button1Element should have the same Current.Name"); Assert.AreEqual (button1Element.Current.Name, button1ElementRef2.Cached.Name, "button1Element Cached.Name should be the same as Current.Name"); AssertRaises ( () => button1Element.Cached.Name.ToString (), "trying to access cache on original element instance after GetUpdatedCache is called"); updatedElement = button1Element.GetUpdatedCache (request); Assert.AreEqual (button1Element.Current.Name, updatedElement.Cached.Name, "updatedElement Cached.Name should be the same as Current.Name if request has NameProperty set, even if it is no longer active"); } [Test] public void PopCurrentAndExceptionTest () { var request1 = new CacheRequest (); var request2 = new CacheRequest (); // NOTE: It appears that at the bottom of the CacheRequest // stack is an inactive request with bizarre behavior: // TODO: Test if any properties or patterns have been added to originalCurrent // Verify that originalCurrent has all the default CacheRequest settings Assert.AreEqual (AutomationElementMode.Full, originalCurrent.AutomationElementMode, "Original Current.AutomationElementMode"); Assert.AreEqual (TreeScope.Element, originalCurrent.TreeScope, "Original Current.TreeScope"); Assert.AreEqual (SWA.Automation.ControlViewCondition, originalCurrent.TreeFilter, "Original Current.TreeFilter"); // Cannot pop originalCurrent, even though it is not really active AssertRaises ( () => originalCurrent.Pop (), "popping original Current"); AssertRaises ( () => request1.Pop (), "popping inactive CacheRequest"); request1.Push (); Assert.AreEqual (request1, CacheRequest.Current, "CacheRequest.Current should be equal to request at top of stack"); request2.Push (); Assert.AreEqual (request2, CacheRequest.Current, "CacheRequest.Current should be equal to request at top of stack"); // A request can occupy multiple slots in the request stack request2.Push (); Assert.AreEqual (request2, CacheRequest.Current, "CacheRequest.Current should be equal to request at top of stack"); request1.Push (); Assert.AreEqual (request1, CacheRequest.Current, "CacheRequest.Current should be equal to request at top of stack"); request1.Pop (); Assert.AreEqual (request2, CacheRequest.Current, "CacheRequest.Current should be equal to request at top of stack"); request2.Pop (); Assert.AreEqual (request2, CacheRequest.Current, "CacheRequest.Current should be equal to request at top of stack"); AssertRaises ( () => request1.Pop (), "popping active CacheRequest not at top of stack"); request2.Pop (); Assert.AreEqual (request1, CacheRequest.Current, "CacheRequest.Current should be equal to request at top of stack"); request1.Pop (); Assert.AreEqual (originalCurrent, CacheRequest.Current, "After deactivating all of our requests, original Current should be back"); // Neat request1.Activate (); Assert.AreEqual (request1, CacheRequest.Current, "CacheRequest.Current should be equal to request at top of stack"); request1.Pop (); Assert.AreEqual (originalCurrent, CacheRequest.Current, "After deactivating all of our requests, original Current should be back"); } // This behavior seems strange: // "Caching also occurs when you subscribe to an event while a CacheRequest is active. // The AutomationElement passed to your event handler as the source of an event contains // the cached properties and patterns specified by the original CacheRequest. Any changes // made to the CacheRequest after you subscribe to the event have no effect." [Test] public void PropertyEventTest () { string oldName = label1Element.Current.Name; var request = new CacheRequest (); request.Add (AutomationElement.NameProperty); eventCount = 0; // Test adding handler before activating cache At.AddAutomationPropertyChangedEventHandler ( testFormElement, TreeScope.Children, PropertyChangedHandler, AEIds.NameProperty); using (request.Activate ()) { RunCommand ("click button1"); Assert.AreNotEqual (0, eventCount, "Event not fired"); Assert.AreNotEqual (eventElement.Current.Name, oldName, "Name has changed"); AssertRaises ( () => eventElement.Cached.Name.ToString (), "Cached name when handler added before the cache was activated"); } At.RemoveAutomationPropertyChangedEventHandler (label1Element, PropertyChangedHandler); oldName = label1Element.Current.Name; eventCount = 0; // Test adding handler after activating cache using (request.Activate ()) { At.AddAutomationPropertyChangedEventHandler ( label1Element, TreeScope.Element, PropertyChangedHandler, AEIds.NameProperty); RunCommand ("click button1"); Assert.AreNotEqual (0, eventCount, "Event not fired"); Assert.AreNotEqual (eventElement.Current.Name, oldName, "Name has changed"); AssertRaises ( () => eventElement.Cached.Name.ToString (), "Cached name when handler added after the cache was activated"); At.RemoveAutomationPropertyChangedEventHandler (label1Element, PropertyChangedHandler); } // Test using Push() rather than Activate() request.Push (); eventCount = 0; At.AddAutomationPropertyChangedEventHandler ( label1Element, TreeScope.Element, PropertyChangedHandler, AEIds.NameProperty); RunCommand ("click button1"); Assert.AreNotEqual (0, eventCount, "Event not fired"); Assert.AreNotEqual (eventElement.Current.Name, oldName, "Name has changed"); AssertRaises ( () => eventElement.Cached.Name.ToString (), "Cached name when handler added after the cache was activated"); At.RemoveAutomationPropertyChangedEventHandler (label1Element, PropertyChangedHandler); request.Pop (); } [Test] public void SelectionTest () { AutomationElement child1Element, child2Element; child1Element = treeView1Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.TreeItem)); Assert.IsNotNull (child1Element, "Child element should not be null"); child2Element = TreeWalker.RawViewWalker.GetNextSibling (child1Element); Assert.IsNotNull (child2Element, "Child element should not be null"); CacheRequest request = new CacheRequest (); request.Add (SelectionItemPattern.Pattern); request.Add (SelectionItemPattern.IsSelectedProperty); request.Add (SelectionItemPattern.SelectionContainerProperty); request.Add (SelectionPattern.Pattern); request.Add (SelectionPattern.CanSelectMultipleProperty); request.Add (SelectionPattern.IsSelectionRequiredProperty); request.Add (SelectionPattern.SelectionProperty); using (request.Activate ()) { SelectionItemPattern CachedItemPattern; AssertRaises ( () => CachedItemPattern = (SelectionItemPattern) child2Element.GetCachedPattern ( SelectionItemPattern.Pattern), "GetCachedPattern when fetched from an element retrieved while there was no active cache"); child2Element = child2Element.GetUpdatedCache (request); CachedItemPattern = (SelectionItemPattern) child2Element.GetCachedPattern ( SelectionItemPattern.Pattern); SelectionItemPattern currentItemPattern = (SelectionItemPattern) child2Element.GetCurrentPattern ( SelectionItemPattern.Pattern); AutomationElement treeView1ElementRef2 = treeView1Element.GetUpdatedCache (request); SelectionPattern currentSelectionPattern = (SelectionPattern) treeView1ElementRef2.GetCurrentPattern ( SelectionPattern.Pattern); Assert.IsFalse (CachedItemPattern.Current.IsSelected); Assert.IsFalse (CachedItemPattern.Cached.IsSelected); Assert.IsFalse (currentItemPattern.Current.IsSelected); AssertRaises ( () => currentItemPattern.Cached.IsSelected.ToString (), "Cached property on an uncached pattern"); Assert.AreEqual (treeView1Element, CachedItemPattern.Cached.SelectionContainer, "Cached.SelectionContainer"); VerifyCachedPropertyValue (child2Element, SelectionItemPattern.SelectionContainerProperty, currentItemPattern.Current.SelectionContainer, currentItemPattern.Current.SelectionContainer, currentItemPattern.Current.SelectionContainer); Assert.IsFalse (currentSelectionPattern.Current.IsSelectionRequired, "IsSelectionRequired before select"); CachedItemPattern.Select (); Thread.Sleep (500); Assert.IsTrue (currentSelectionPattern.Current.IsSelectionRequired, "IsSelectionRequired before select"); Assert.IsTrue (currentItemPattern.Current.IsSelected); Assert.IsTrue (CachedItemPattern.Current.IsSelected); Assert.IsFalse (CachedItemPattern.Cached.IsSelected); SelectionPattern cachedSelectionPattern = (SelectionPattern) treeView1ElementRef2.GetCachedPattern (SelectionPattern.Pattern); Assert.AreEqual (cachedSelectionPattern.Cached.CanSelectMultiple, currentSelectionPattern.Current.CanSelectMultiple, "Cached.CanSelectMultiple == Current.CanSelectMultiple"); VerifyCachedPropertyValue (treeView1ElementRef2, SelectionPatternIdentifiers.CanSelectMultipleProperty, currentSelectionPattern.Current.CanSelectMultiple, currentSelectionPattern.Current.CanSelectMultiple, currentSelectionPattern.Current.CanSelectMultiple); Assert.IsFalse (cachedSelectionPattern.Cached.IsSelectionRequired, "Cached.IsSelectionRequired == Current.IsSelectionRequired"); VerifyCachedPropertyValue (treeView1ElementRef2, SelectionPatternIdentifiers.IsSelectionRequiredProperty, false, false, false); AutomationElement [] selection = cachedSelectionPattern.Current.GetSelection (); Assert.AreEqual (1, selection.Length, "Selection length"); selection = cachedSelectionPattern.Cached.GetSelection (); Assert.AreEqual (0, selection.Length, "Selection length"); } } [Test] public void TextPatternTest () { RunCommand ("set textbox3 to first line:second line:third line"); var request = new CacheRequest (); request.Add (TextPattern.Pattern); using (request.Activate ()) { TextPattern textPattern; AutomationElement textbox3ElementRef2 = textbox3Element.GetUpdatedCache (request); AssertRaises ( () => textPattern = (TextPattern) textbox3Element.GetCachedPattern (TextPattern.Pattern), "Getting TextPattern from an uncached ref"); textPattern = (TextPattern) textbox3ElementRef2.GetCachedPattern (TextPattern.Pattern); TextPatternRange range = textPattern.DocumentRange.Clone (); TextPatternRange range1; range1 = range.FindText ("second", false, false); Assert.AreEqual ("second", range1.GetText (-1)); RunCommand ("set textbox3 to gomez thing:morticia\twednesday ing"); Thread.Sleep (500); range1 = range.FindText ("mort", false, false); Assert.AreEqual ("mort", range1.GetText (-1)); } } [Test] public void AcceleratorKeyTest () { var request = new CacheRequest (); request.Add (AutomationElement.AcceleratorKeyProperty); using (request.Activate ()) { AutomationElement groupBox1ElementRef2 = groupBox1Element.GetUpdatedCache (request); Assert.AreEqual (groupBox1ElementRef2.Cached.AcceleratorKey, groupBox1Element.Current.AcceleratorKey, "Cached.AcceleratorKey == Current.AcceleratorKey"); } } [Test] public void AccessKeyTest () { var request = new CacheRequest (); request.Add (AutomationElement.AccessKeyProperty); using (request.Activate ()) { AutomationElement groupBox1ElementRef2 = groupBox1Element.GetUpdatedCache (request); Assert.AreEqual (groupBox1ElementRef2.Cached.AccessKey, groupBox1Element.Current.AccessKey, "Cached.AccessKey == Current.AccessKey"); } } [Test] public void AutomationIdTest () { var request = new CacheRequest (); request.Add (AutomationElement.AutomationIdProperty); using (request.Activate ()) { AutomationElement groupBox1ElementRef2 = groupBox1Element.GetUpdatedCache (request); Assert.AreEqual (groupBox1ElementRef2.Cached.AutomationId, groupBox1Element.Current.AutomationId, "Cached.AutomationId == Current.AutomationId"); VerifyCachedPropertyValue (groupBox1ElementRef2, AEIds.AutomationIdProperty, groupBox1Element.Current.AutomationId, groupBox1Element.Current.AutomationId, groupBox1Element.Current.AutomationId); } } [Test] public void BoundingRectangleTest () { var request = new CacheRequest (); request.Add (AutomationElement.BoundingRectangleProperty); using (request.Activate ()) { AutomationElement groupBox1ElementRef2 = groupBox1Element.GetUpdatedCache (request); Assert.AreEqual (groupBox1ElementRef2.Cached.BoundingRectangle, groupBox1Element.Current.BoundingRectangle, "Cached.BoundingRectangle == Current.BoundingRectangle"); VerifyCachedPropertyValue (groupBox1ElementRef2, AEIds.BoundingRectangleProperty, groupBox1Element.Current.BoundingRectangle, groupBox1Element.Current.BoundingRectangle, groupBox1Element.Current.BoundingRectangle); } } [Test] public void ClassNameTest () { var request = new CacheRequest (); request.Add (AutomationElement.ClassNameProperty); using (request.Activate ()) { AutomationElement groupBox1ElementRef2 = groupBox1Element.GetUpdatedCache (request); Assert.AreEqual (groupBox1ElementRef2.Cached.ClassName, groupBox1Element.Current.ClassName, "Cached.ClassName == Current.ClassName"); Assert.AreEqual (groupBox1ElementRef2.Cached.ClassName, groupBox1ElementRef2.GetCachedPropertyValue (AutomationElement.ClassNameProperty), "GetCachedPropertyValue"); } } [Test] public void ClickablePointTest () { TestSimpleProperty (groupBox1Element, AutomationElement.ClickablePointProperty); } [Test] public void ControlTypeTest () { var request = new CacheRequest (); request.Add (AutomationElement.ControlTypeProperty); using (request.Activate ()) { AutomationElement groupBox1ElementRef2 = groupBox1Element.GetUpdatedCache (request); Assert.AreEqual (groupBox1ElementRef2.Cached.ControlType, groupBox1Element.Current.ControlType, "Cached.ControlType == Current.ControlType"); VerifyCachedPropertyValue (groupBox1ElementRef2, AEIds.ControlTypeProperty, groupBox1Element.Current.ControlType, groupBox1Element.Current.ControlType, groupBox1Element.Current.ControlType); } } [Test] public void CultureTest () { TestSimpleProperty (groupBox1Element, AutomationElement.CultureProperty); } [Test] public void FrameworkIdTest () { var request = new CacheRequest (); request.Add (AutomationElement.FrameworkIdProperty); using (request.Activate ()) { AutomationElement groupBox1ElementRef2 = groupBox1Element.GetUpdatedCache (request); Assert.AreEqual (groupBox1ElementRef2.Cached.FrameworkId, groupBox1Element.Current.FrameworkId, "Cached.FrameworkId == Current.FrameworkId"); VerifyCachedPropertyValue (groupBox1ElementRef2, AEIds.FrameworkIdProperty, groupBox1Element.Current.FrameworkId, groupBox1Element.Current.FrameworkId, groupBox1Element.Current.FrameworkId); } } [Test] public void HasKeyboardFocusTest () { var request = new CacheRequest (); request.Add (AutomationElement.HasKeyboardFocusProperty); using (request.Activate ()) { AutomationElement groupBox1ElementRef2 = groupBox1Element.GetUpdatedCache (request); Assert.AreEqual (groupBox1ElementRef2.Cached.HasKeyboardFocus, groupBox1Element.Current.HasKeyboardFocus, "Cached.HasKeyboardFocus == Current.HasKeyboardFocus"); VerifyCachedPropertyValue (groupBox1ElementRef2, AEIds.HasKeyboardFocusProperty, groupBox1Element.Current.HasKeyboardFocus, groupBox1Element.Current.HasKeyboardFocus, groupBox1Element.Current.HasKeyboardFocus); } } [Test] public void HelpTextTest () { var request = new CacheRequest (); request.Add (AutomationElement.HelpTextProperty); using (request.Activate ()) { AutomationElement groupBox1ElementRef2 = groupBox1Element.GetUpdatedCache (request); Assert.AreEqual (groupBox1ElementRef2.Cached.HelpText, groupBox1Element.Current.HelpText, "Cached.HelpText == Current.HelpText"); Assert.AreEqual (groupBox1ElementRef2.Cached.HelpText, groupBox1ElementRef2.GetCachedPropertyValue (AutomationElement.HelpTextProperty), "GetCachedPropertyValue"); } } [Test] public void IsContentElementTest () { var request = new CacheRequest (); request.Add (AutomationElement.IsContentElementProperty); using (request.Activate ()) { AutomationElement groupBox1ElementRef2 = groupBox1Element.GetUpdatedCache (request); Assert.AreEqual (groupBox1ElementRef2.Cached.IsContentElement, groupBox1Element.Current.IsContentElement, "Cached.IsContentElement == Current.IsContentElement"); VerifyCachedPropertyValue (groupBox1ElementRef2, AEIds.IsContentElementProperty, groupBox1Element.Current.IsContentElement, groupBox1Element.Current.IsContentElement, groupBox1Element.Current.IsContentElement); } } [Test] public void IsControlElementTest () { var request = new CacheRequest (); request.Add (AutomationElement.IsControlElementProperty); using (request.Activate ()) { AutomationElement groupBox1ElementRef2 = groupBox1Element.GetUpdatedCache (request); Assert.AreEqual (groupBox1ElementRef2.Cached.IsControlElement, groupBox1Element.Current.IsControlElement, "Cached.IsControlElement == Current.IsControlElement"); Assert.AreEqual (groupBox1ElementRef2.Cached.IsControlElement, groupBox1ElementRef2.GetCachedPropertyValue (AutomationElement.IsControlElementProperty), "GetCachedPropertyValue"); } } [Test] public void IsDockPatternAvailableTest () { TestSimpleProperty (groupBox1Element, AutomationElement.IsDockPatternAvailableProperty); } public void IsEnableTest () { var request = new CacheRequest (); request.Add (AutomationElement.IsEnabledProperty); using (request.Activate ()) { AutomationElement groupBox1ElementRef2 = groupBox1Element.GetUpdatedCache (request); Assert.AreEqual (groupBox1ElementRef2.Cached.IsEnabled, groupBox1Element.Current.IsEnabled, "Cached.IsEnabled == Current.IsEnabled"); VerifyCachedPropertyValue (groupBox1ElementRef2, AEIds.IsEnabledProperty, groupBox1Element.Current.IsEnabled, groupBox1Element.Current.IsEnabled, groupBox1Element.Current.IsEnabled); } } [Test] public void IsExpandCollapsePatternAvailableTest () { TestSimpleProperty (groupBox1Element, AutomationElement.IsExpandCollapsePatternAvailableProperty); } [Test] public void IsGridItemPatternAvailableTest () { TestSimpleProperty (groupBox1Element, AutomationElement.IsGridItemPatternAvailableProperty); } [Test] public void IsGridPatternAvailableTest () { TestSimpleProperty (groupBox1Element, AutomationElement.IsGridPatternAvailableProperty); } [Test] public void IsInvokePatternAvailableTest () { TestSimpleProperty (groupBox1Element, AutomationElement.IsInvokePatternAvailableProperty); } [Test] public void IsKeyboardFocusableTest () { var request = new CacheRequest (); request.Add (AutomationElement.IsKeyboardFocusableProperty); using (request.Activate ()) { AutomationElement groupBox1ElementRef2 = groupBox1Element.GetUpdatedCache (request); Assert.AreEqual (groupBox1ElementRef2.Cached.IsKeyboardFocusable, groupBox1Element.Current.IsKeyboardFocusable, "Cached.IsKeyboardFocusable == Current.IsKeyboardFocusable"); VerifyCachedPropertyValue (groupBox1ElementRef2, AEIds.IsKeyboardFocusableProperty, groupBox1Element.Current.IsKeyboardFocusable, groupBox1Element.Current.IsKeyboardFocusable, groupBox1Element.Current.IsKeyboardFocusable); } } [Test] public void IsMultipleViewPatternAvailableTest () { TestSimpleProperty (groupBox1Element, AutomationElement.IsMultipleViewPatternAvailableProperty); } [Test] public void IsOffscreenTest () { var request = new CacheRequest (); request.Add (AutomationElement.IsOffscreenProperty); using (request.Activate ()) { AutomationElement groupBox1ElementRef2 = groupBox1Element.GetUpdatedCache (request); Assert.AreEqual (groupBox1ElementRef2.Cached.IsOffscreen, groupBox1Element.Current.IsOffscreen, "Cached.IsOffscreen == Current.IsOffscreen"); VerifyCachedPropertyValue (groupBox1ElementRef2, AEIds.IsOffscreenProperty, groupBox1Element.Current.IsOffscreen, groupBox1Element.Current.IsOffscreen, groupBox1Element.Current.IsOffscreen); } } [Test] public void IsPasswordTest () { var request = new CacheRequest (); request.Add (AutomationElement.IsPasswordProperty); using (request.Activate ()) { AutomationElement groupBox1ElementRef2 = groupBox1Element.GetUpdatedCache (request); Assert.AreEqual (groupBox1ElementRef2.Cached.IsPassword, groupBox1Element.Current.IsPassword, "Cached.IsPassword == Current.IsPassword"); Assert.AreEqual (groupBox1ElementRef2.Cached.IsPassword, groupBox1ElementRef2.GetCachedPropertyValue (AutomationElement.IsPasswordProperty), "GetCachedPropertyValue"); } } [Test] public void IsRangeValuePatternAvailableTest () { TestSimpleProperty (groupBox1Element, AutomationElement.IsRangeValuePatternAvailableProperty); } [Test] public void IsRequiredForFormTest () { var request = new CacheRequest (); request.Add (AutomationElement.IsRequiredForFormProperty); using (request.Activate ()) { AutomationElement groupBox1ElementRef2 = groupBox1Element.GetUpdatedCache (request); Assert.AreEqual (groupBox1ElementRef2.Cached.IsRequiredForForm, groupBox1Element.Current.IsRequiredForForm, "Cached.IsRequiredForForm == Current.IsRequiredForForm"); Assert.AreEqual (groupBox1ElementRef2.Cached.IsRequiredForForm, groupBox1ElementRef2.GetCachedPropertyValue (AutomationElement.IsRequiredForFormProperty), "GetCachedPropertyValue"); } } [Test] public void IsScrollItemPatternAvailableTest () { TestSimpleProperty (groupBox1Element, AutomationElement.IsScrollItemPatternAvailableProperty); } [Test] public void IsScrollPatternAvailableTest () { TestSimpleProperty (groupBox1Element, AutomationElement.IsScrollPatternAvailableProperty); } [Test] public void IsSelectionItemPatternAvailableTest () { TestSimpleProperty (groupBox1Element, AutomationElement.IsSelectionItemPatternAvailableProperty); } [Test] public void IsSelectionPatternAvailableTest () { TestSimpleProperty (groupBox1Element, AutomationElement.IsSelectionPatternAvailableProperty); } [Test] public void IsTableItemPatternAvailableTest () { TestSimpleProperty (groupBox1Element, AutomationElement.IsTableItemPatternAvailableProperty); } [Test] public void IsTablePatternAvailableTest () { TestSimpleProperty (groupBox1Element, AutomationElement.IsTablePatternAvailableProperty); } [Test] public void IsTextPatternAvailableTest () { TestSimpleProperty (groupBox1Element, AutomationElement.IsTextPatternAvailableProperty); } [Test] public void IsTogglePatternAvailableTest () { TestSimpleProperty (groupBox1Element, AutomationElement.IsTogglePatternAvailableProperty); } [Test] public void IsTransformPatternAvailableTest () { TestSimpleProperty (groupBox1Element, AutomationElement.IsTransformPatternAvailableProperty); } [Test] public void IsValuePatternAvailableTest () { TestSimpleProperty (groupBox1Element, AutomationElement.IsValuePatternAvailableProperty); } [Test] public void IsWindowPatternAvailableTest () { TestSimpleProperty (groupBox1Element, AutomationElement.IsWindowPatternAvailableProperty); } [Test] public void ItemStatusTest () { var request = new CacheRequest (); request.Add (AutomationElement.ItemStatusProperty); using (request.Activate ()) { AutomationElement groupBox1ElementRef2 = groupBox1Element.GetUpdatedCache (request); Assert.AreEqual (groupBox1ElementRef2.Cached.ItemStatus, groupBox1Element.Current.ItemStatus, "Cached.ItemStatus == Current.ItemStatus"); Assert.AreEqual (groupBox1ElementRef2.Cached.ItemStatus, groupBox1ElementRef2.GetCachedPropertyValue (AutomationElement.ItemStatusProperty), "GetCachedPropertyValue"); } } [Test] public void ItemTypeTest () { var request = new CacheRequest (); request.Add (AutomationElement.ItemTypeProperty); using (request.Activate ()) { AutomationElement groupBox1ElementRef2 = groupBox1Element.GetUpdatedCache (request); Assert.AreEqual (groupBox1ElementRef2.Cached.ItemType, groupBox1Element.Current.ItemType, "Cached.ItemType == Current.ItemType"); Assert.AreEqual (groupBox1ElementRef2.Cached.ItemType, groupBox1ElementRef2.GetCachedPropertyValue (AutomationElement.ItemTypeProperty), "GetCachedPropertyValue"); } } [Test] public void LabeledByTest () { var request = new CacheRequest (); request.Add (AutomationElement.LabeledByProperty); using (request.Activate ()) { AutomationElement groupBox1ElementRef2 = groupBox1Element.GetUpdatedCache (request); Assert.AreEqual (groupBox1ElementRef2.Cached.LabeledBy, groupBox1Element.Current.LabeledBy, "Cached.LabeledBy == Current.LabeledBy"); Assert.AreEqual (groupBox1ElementRef2.Cached.LabeledBy, groupBox1ElementRef2.GetCachedPropertyValue (AutomationElement.LabeledByProperty), "GetCachedPropertyValue"); } } [Test] public void LocalizedControlTypeTest () { var request = new CacheRequest (); request.Add (AutomationElement.LocalizedControlTypeProperty); using (request.Activate ()) { AutomationElement groupBox1ElementRef2 = groupBox1Element.GetUpdatedCache (request); Assert.AreEqual (groupBox1ElementRef2.Cached.LocalizedControlType, groupBox1Element.Current.LocalizedControlType, "Cached.LocalizedControlType == Current.LocalizedControlType"); VerifyCachedPropertyValue (groupBox1ElementRef2, AEIds.LocalizedControlTypeProperty, groupBox1Element.Current.LocalizedControlType, groupBox1Element.Current.LocalizedControlType, groupBox1Element.Current.LocalizedControlType); } } // name is implicitly tested elsewhere [Test] public void NativeWindowHandleTest () { var request = new CacheRequest (); request.Add (AutomationElement.NativeWindowHandleProperty); using (request.Activate ()) { AutomationElement groupBox1ElementRef2 = groupBox1Element.GetUpdatedCache (request); Assert.AreEqual (groupBox1ElementRef2.Cached.NativeWindowHandle, groupBox1Element.Current.NativeWindowHandle, "Cached.NativeWindowHandle == Current.NativeWindowHandle"); VerifyCachedPropertyValue (groupBox1ElementRef2, AEIds.NativeWindowHandleProperty, groupBox1Element.Current.NativeWindowHandle, groupBox1Element.Current.NativeWindowHandle, groupBox1Element.Current.NativeWindowHandle); } } [Test] public void OrientationTest () { var request = new CacheRequest (); request.Add (AutomationElement.OrientationProperty); using (request.Activate ()) { AutomationElement hScrollBarElementRef2 = hScrollBarElement.GetUpdatedCache (request); Assert.AreEqual (hScrollBarElementRef2.Cached.Orientation, hScrollBarElement.Current.Orientation, "Cached.Orientation == Current.Orientation"); VerifyCachedPropertyValue (hScrollBarElementRef2, AEIds.OrientationProperty, hScrollBarElement.Current.Orientation, hScrollBarElement.Current.Orientation, hScrollBarElement.Current.Orientation); } } [Test] public void ProcessIdTest () { var request = new CacheRequest (); request.Add (AutomationElement.ProcessIdProperty); using (request.Activate ()) { AutomationElement groupBox1ElementRef2 = groupBox1Element.GetUpdatedCache (request); Assert.AreEqual (groupBox1ElementRef2.Cached.ProcessId, groupBox1Element.Current.ProcessId, "Cached.ProcessId == Current.ProcessId"); VerifyCachedPropertyValue (groupBox1ElementRef2, AEIds.ProcessIdProperty, groupBox1Element.Current.ProcessId, groupBox1Element.Current.ProcessId, groupBox1Element.Current.ProcessId); } } [Test] public void RuntimeIdTest () { TestSimpleProperty (groupBox1Element, AutomationElement.RuntimeIdProperty); } [Test] public void ExpandCollapsePatternTest () { AutomationElement parentElement = treeView1Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.TreeItem)); var request = new CacheRequest (); request.Add (ExpandCollapsePattern.Pattern); request.Add (ExpandCollapsePattern.ExpandCollapseStateProperty); using (request.Activate ()) { AutomationElement parentElementRef2 = parentElement.GetUpdatedCache (request); ExpandCollapsePattern cachedPattern = (ExpandCollapsePattern) parentElementRef2.GetCachedPattern (ExpandCollapsePattern.Pattern); ExpandCollapsePattern currentPattern = (ExpandCollapsePattern) parentElement.GetCurrentPattern (ExpandCollapsePattern.Pattern); Assert.AreEqual (cachedPattern.Cached.ExpandCollapseState, currentPattern.Current.ExpandCollapseState, "Cached.ExpandCollapseState == Current.ExpandCollapseState"); VerifyCachedPropertyValue (parentElementRef2, ExpandCollapsePatternIdentifiers.ExpandCollapseStateProperty, currentPattern.Current.ExpandCollapseState, currentPattern.Current.ExpandCollapseState, currentPattern.Current.ExpandCollapseState); } } [Test] public void MultipleViewPatternTest () { var request = new CacheRequest (); request.Add (MultipleViewPattern.Pattern); request.Add (MultipleViewPattern.CurrentViewProperty); using (request.Activate ()) { AutomationElement listView1ElementRef2 = listView1Element.GetUpdatedCache (request); MultipleViewPattern cachedPattern = (MultipleViewPattern) listView1ElementRef2.GetCachedPattern (MultipleViewPattern.Pattern); MultipleViewPattern currentPattern = (MultipleViewPattern) listView1Element.GetCurrentPattern (MultipleViewPattern.Pattern); Assert.AreEqual (cachedPattern.Cached.CurrentView, currentPattern.Current.CurrentView, "Cached.CurrentView == Current.CurrentView"); VerifyCachedPropertyValue (listView1ElementRef2, MultipleViewPatternIdentifiers.CurrentViewProperty, currentPattern.Current.CurrentView, currentPattern.Current.CurrentView, currentPattern.Current.CurrentView); } } [Test] public void TogglePatternTest () { var request = new CacheRequest (); request.Add (TogglePattern.Pattern); request.Add (TogglePattern.ToggleStateProperty); using (request.Activate ()) { AutomationElement checkBox1ElementRef2 = checkBox1Element.GetUpdatedCache (request); TogglePattern cachedPattern = (TogglePattern) checkBox1ElementRef2.GetCachedPattern (TogglePattern.Pattern); Assert.AreEqual (ToggleState.Off, checkBox1Element.GetCurrentPropertyValue (TogglePatternIdentifiers.ToggleStateProperty), "CheckBox is initially not checked"); Assert.AreEqual (ToggleState.Off, checkBox1ElementRef2.GetCachedPropertyValue (TogglePatternIdentifiers.ToggleStateProperty), "CheckBox initial cached state"); Assert.AreEqual (ToggleState.Off, cachedPattern.Cached.ToggleState, "cached.ToggleState"); cachedPattern.Toggle (); Assert.AreEqual (ToggleState.On, checkBox1Element.GetCurrentPropertyValue (TogglePatternIdentifiers.ToggleStateProperty), "CheckBox is now checked"); Assert.AreEqual (ToggleState.Off, checkBox1ElementRef2.GetCachedPropertyValue (TogglePatternIdentifiers.ToggleStateProperty), "CheckBox cached state after toggle"); Assert.AreEqual (ToggleState.Off, cachedPattern.Cached.ToggleState, "cached.ToggleState after toggle"); } } [Test] public void RangeValuePatternTest () { var request = new CacheRequest (); request.Add (RangeValuePattern.Pattern); request.Add (RangeValuePattern.IsReadOnlyProperty); request.Add (RangeValuePattern.LargeChangeProperty); request.Add (RangeValuePattern.MaximumProperty); request.Add (RangeValuePattern.MinimumProperty); request.Add (RangeValuePattern.SmallChangeProperty); request.Add (RangeValuePattern.ValueProperty); using (request.Activate ()) { AutomationElement hScrollBarElementRef2 = hScrollBarElement.GetUpdatedCache (request); RangeValuePattern currentPattern = (RangeValuePattern) hScrollBarElement.GetCurrentPattern (RangeValuePattern.Pattern); RangeValuePattern cachedPattern = (RangeValuePattern) hScrollBarElementRef2.GetCachedPattern (RangeValuePattern.Pattern); Assert.AreEqual (cachedPattern.Cached.IsReadOnly, currentPattern.Current.IsReadOnly, "Cached.IsReadOnly == Current.IsReadOnly"); VerifyCachedPropertyValue (hScrollBarElementRef2, RangeValuePatternIdentifiers.IsReadOnlyProperty, currentPattern.Current.IsReadOnly, currentPattern.Current.IsReadOnly, currentPattern.Current.IsReadOnly); Assert.AreEqual (cachedPattern.Cached.LargeChange, currentPattern.Current.LargeChange, "Cached.LargeChange == Current.LargeChange"); VerifyCachedPropertyValue (hScrollBarElementRef2, RangeValuePatternIdentifiers.LargeChangeProperty, currentPattern.Current.LargeChange, currentPattern.Current.LargeChange, currentPattern.Current.LargeChange); Assert.AreEqual (cachedPattern.Cached.Maximum, currentPattern.Current.Maximum, "Cached.Maximum == Current.Maximum"); VerifyCachedPropertyValue (hScrollBarElementRef2, RangeValuePatternIdentifiers.MaximumProperty, currentPattern.Current.Maximum, currentPattern.Current.Maximum, currentPattern.Current.Maximum); Assert.AreEqual (cachedPattern.Cached.Minimum, currentPattern.Current.Minimum, "Cached.Minimum == Current.Minimum"); VerifyCachedPropertyValue (hScrollBarElementRef2, RangeValuePatternIdentifiers.MinimumProperty, currentPattern.Current.Minimum, currentPattern.Current.Minimum, currentPattern.Current.Minimum); Assert.AreEqual (cachedPattern.Cached.SmallChange, currentPattern.Current.SmallChange, "Cached.SmallChange == Current.SmallChange"); VerifyCachedPropertyValue (hScrollBarElementRef2, RangeValuePatternIdentifiers.SmallChangeProperty, currentPattern.Current.SmallChange, currentPattern.Current.SmallChange, currentPattern.Current.SmallChange); Assert.AreEqual (cachedPattern.Cached.Value, currentPattern.Current.Value, "Cached.Value == Current.Value"); VerifyCachedPropertyValue (hScrollBarElementRef2, RangeValuePatternIdentifiers.ValueProperty, currentPattern.Current.Value, currentPattern.Current.Value, currentPattern.Current.Value); } } [Test] public void ScrollPatternTest () { var request = new CacheRequest (); request.Add (ScrollPattern.Pattern); request.Add (ScrollPattern.HorizontallyScrollableProperty); request.Add (ScrollPattern.HorizontalScrollPercentProperty); request.Add (ScrollPattern.HorizontalViewSizeProperty); request.Add (ScrollPattern.VerticallyScrollableProperty); request.Add (ScrollPattern.VerticalViewSizeProperty); using (request.Activate ()) { AutomationElement listView1ElementRef2 = listView1Element.GetUpdatedCache (request); ScrollPattern currentPattern = (ScrollPattern) listView1Element.GetCurrentPattern (ScrollPattern.Pattern); ScrollPattern cachedPattern = (ScrollPattern) listView1ElementRef2.GetCachedPattern (ScrollPattern.Pattern); Assert.AreEqual (cachedPattern.Cached.HorizontallyScrollable, currentPattern.Current.HorizontallyScrollable, "Cached.HorizontallyScrollable == Current.HorizontallyScrollable"); VerifyCachedPropertyValue (listView1ElementRef2, ScrollPatternIdentifiers.HorizontallyScrollableProperty, currentPattern.Current.HorizontallyScrollable, currentPattern.Current.HorizontallyScrollable, currentPattern.Current.HorizontallyScrollable); Assert.AreEqual (cachedPattern.Cached.HorizontalScrollPercent, currentPattern.Current.HorizontalScrollPercent, "Cached.HorizontalScrollPercent == Current.HorizontalScrollPercent"); VerifyCachedPropertyValue (listView1ElementRef2, ScrollPatternIdentifiers.HorizontalScrollPercentProperty, currentPattern.Current.HorizontalScrollPercent, currentPattern.Current.HorizontalScrollPercent, currentPattern.Current.HorizontalScrollPercent); Assert.AreEqual (cachedPattern.Cached.HorizontalViewSize, currentPattern.Current.HorizontalViewSize, "Cached.HorizontalViewSize == Current.HorizontalViewSize"); VerifyCachedPropertyValue (listView1ElementRef2, ScrollPatternIdentifiers.HorizontalViewSizeProperty, currentPattern.Current.HorizontalViewSize, currentPattern.Current.HorizontalViewSize, currentPattern.Current.HorizontalViewSize); Assert.AreEqual (cachedPattern.Cached.VerticallyScrollable, currentPattern.Current.VerticallyScrollable, "Cached.VerticallyScrollable == Current.VerticallyScrollable"); VerifyCachedPropertyValue (listView1ElementRef2, ScrollPatternIdentifiers.VerticallyScrollableProperty, currentPattern.Current.VerticallyScrollable, currentPattern.Current.VerticallyScrollable, currentPattern.Current.VerticallyScrollable); Assert.AreEqual (cachedPattern.Cached.VerticalViewSize, currentPattern.Current.VerticalViewSize, "Cached.VerticalViewSize == Current.VerticalViewSize"); VerifyCachedPropertyValue (listView1ElementRef2, ScrollPatternIdentifiers.VerticalViewSizeProperty, currentPattern.Current.VerticalViewSize, currentPattern.Current.VerticalViewSize, currentPattern.Current.VerticalViewSize); } } [Test] public void TransformPatternTest () { var request = new CacheRequest (); request.Add (TransformPattern.Pattern); request.Add (TransformPattern.CanMoveProperty); request.Add (TransformPattern.CanResizeProperty); request.Add (TransformPattern.CanRotateProperty); using (request.Activate ()) { AutomationElement testFormElementRef2 = testFormElement.GetUpdatedCache (request); TransformPattern currentPattern = (TransformPattern) testFormElement.GetCurrentPattern (TransformPattern.Pattern); TransformPattern cachedPattern = (TransformPattern) testFormElementRef2.GetCachedPattern (TransformPattern.Pattern); Assert.AreEqual (cachedPattern.Cached.CanMove, currentPattern.Current.CanMove, "Cached.CanMove == Current.CanMove"); VerifyCachedPropertyValue (testFormElementRef2, TransformPatternIdentifiers.CanMoveProperty, currentPattern.Current.CanMove, currentPattern.Current.CanMove, currentPattern.Current.CanMove); Assert.AreEqual (cachedPattern.Cached.CanResize, currentPattern.Current.CanResize, "Cached.CanResize == Current.CanResize"); VerifyCachedPropertyValue (testFormElementRef2, TransformPatternIdentifiers.CanResizeProperty, currentPattern.Current.CanResize, currentPattern.Current.CanResize, currentPattern.Current.CanResize); Assert.AreEqual (cachedPattern.Cached.CanRotate, currentPattern.Current.CanRotate, "Cached.CanRotate == Current.CanRotate"); VerifyCachedPropertyValue (testFormElementRef2, TransformPatternIdentifiers.CanRotateProperty, currentPattern.Current.CanRotate, currentPattern.Current.CanRotate, currentPattern.Current.CanRotate); } } [Test] public void ValuePatternTest () { var request = new CacheRequest (); request.Add (ValuePattern.Pattern); request.Add (ValuePattern.IsReadOnlyProperty); request.Add (ValuePattern.ValueProperty); using (request.Activate ()) { AutomationElement textbox1ElementRef2 = textbox1Element.GetUpdatedCache (request); ValuePattern currentPattern = (ValuePattern) textbox1Element.GetCurrentPattern (ValuePattern.Pattern); ValuePattern cachedPattern = (ValuePattern) textbox1ElementRef2.GetCachedPattern (ValuePattern.Pattern); Assert.AreEqual (cachedPattern.Cached.IsReadOnly, currentPattern.Current.IsReadOnly, "Cached.IsReadOnly == Current.IsReadOnly"); VerifyCachedPropertyValue (textbox1ElementRef2, ValuePatternIdentifiers.IsReadOnlyProperty, currentPattern.Current.IsReadOnly, currentPattern.Current.IsReadOnly, currentPattern.Current.IsReadOnly); Assert.AreEqual (cachedPattern.Cached.Value, currentPattern.Current.Value, "Cached.Value == Current.Value"); VerifyCachedPropertyValue (textbox1ElementRef2, ValuePatternIdentifiers.ValueProperty, currentPattern.Current.Value, currentPattern.Current.Value, currentPattern.Current.Value); } } [Test] public void WindowPatternTest () { var request = new CacheRequest (); request.Add (WindowPattern.Pattern); request.Add (WindowPattern.CanMaximizeProperty); request.Add (WindowPattern.CanMinimizeProperty); request.Add (WindowPattern.IsModalProperty); request.Add (WindowPattern.IsTopmostProperty); request.Add (WindowPattern.WindowInteractionStateProperty); request.Add (WindowPattern.WindowVisualStateProperty); using (request.Activate ()) { AutomationElement testFormElementRef2 = testFormElement.GetUpdatedCache (request); WindowPattern currentPattern = (WindowPattern) testFormElement.GetCurrentPattern (WindowPattern.Pattern); WindowPattern cachedPattern = (WindowPattern) testFormElementRef2.GetCachedPattern (WindowPattern.Pattern); Assert.AreEqual (cachedPattern.Cached.CanMaximize, currentPattern.Current.CanMaximize, "Cached.CanMaximize == Current.CanMaximize"); VerifyCachedPropertyValue (testFormElementRef2, WindowPatternIdentifiers.CanMaximizeProperty, currentPattern.Current.CanMaximize, currentPattern.Current.CanMaximize, currentPattern.Current.CanMaximize); Assert.AreEqual (cachedPattern.Cached.CanMinimize, currentPattern.Current.CanMinimize, "Cached.CanMinimize == Current.CanMinimize"); VerifyCachedPropertyValue (testFormElementRef2, WindowPatternIdentifiers.CanMinimizeProperty, currentPattern.Current.CanMinimize, currentPattern.Current.CanMinimize, currentPattern.Current.CanMinimize); Assert.AreEqual (cachedPattern.Cached.IsModal, currentPattern.Current.IsModal, "Cached.IsModal == Current.IsModal"); VerifyCachedPropertyValue (testFormElementRef2, WindowPatternIdentifiers.IsModalProperty, currentPattern.Current.IsModal, currentPattern.Current.IsModal, currentPattern.Current.IsModal); Assert.AreEqual (cachedPattern.Cached.IsTopmost, currentPattern.Current.IsTopmost, "Cached.IsTopmost == Current.IsTopmost"); VerifyCachedPropertyValue (testFormElementRef2, WindowPatternIdentifiers.IsTopmostProperty, currentPattern.Current.IsTopmost, currentPattern.Current.IsTopmost, currentPattern.Current.IsTopmost); Assert.AreEqual (cachedPattern.Cached.WindowInteractionState, currentPattern.Current.WindowInteractionState, "Cached.WindowInteractionState == Current.WindowInteractionState"); VerifyCachedPropertyValue (testFormElementRef2, WindowPatternIdentifiers.WindowInteractionStateProperty, currentPattern.Current.WindowInteractionState, currentPattern.Current.WindowInteractionState, currentPattern.Current.WindowInteractionState); Assert.AreEqual (cachedPattern.Cached.WindowVisualState, currentPattern.Current.WindowVisualState, "Cached.WindowVisualState == Current.WindowVisualState"); VerifyCachedPropertyValue (testFormElementRef2, WindowPatternIdentifiers.WindowVisualStateProperty, currentPattern.Current.WindowVisualState, currentPattern.Current.WindowVisualState, currentPattern.Current.WindowVisualState); } } private void TestSimpleProperty (AutomationElement element, AutomationProperty property) { var request = new CacheRequest (); request.Add (property); using (request.Activate ()) { AutomationElement cachedElement = element.GetUpdatedCache (request); object currentValue = element.GetCurrentPropertyValue (property); Assert.AreEqual (currentValue, cachedElement.GetCachedPropertyValue (property), "GetcachedPropertyValue " + property.ProgrammaticName); } } private void VerifyCachedPropertyValue (AutomationElement element, AutomationProperty property, object expectedTrue, object expectedFalse, object expectedDefault) { Assert.AreEqual (expectedTrue, element.GetCachedPropertyValue (property, true), property.ProgrammaticName + " w/ true"); Assert.AreEqual (expectedFalse, element.GetCachedPropertyValue (property, false), property.ProgrammaticName + " w/ false"); Assert.AreEqual (expectedDefault, element.GetCachedPropertyValue (property), property.ProgrammaticName + " w/ default"); } private void VerifyCachedPropertyValue (AutomationElement element, AutomationProperty property, object expected) { //T retval = (T) //element.GetCachedPropertyValue (property, true); //Assert.AreEqual (expected, retval, //property.ProgrammaticName + " w/ true"); //retval = (T) //element.GetCachedPropertyValue (property, false); //Assert.AreEqual (expected, retval, //property.ProgrammaticName + " w/ false"); object retval = element.GetCachedPropertyValue (property); Assert.AreEqual (expected, retval, property.ProgrammaticName + " w/ default"); } private void PropertyChangedHandler (object sender, AutomationPropertyChangedEventArgs e) { AutomationElement element = sender as AutomationElement; if (element.Current.ControlType != ControlType.Text) return; eventElement = element; eventCount++; } } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/LocalProviderTest.cs0000644000016200001670000002063511433571545031231 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2010 Novell, Inc. (http://www.novell.com) // // Authors: // Matt Guo // using System; using System.Threading; using System.Collections.Generic; using System.Windows.Automation; using System.Windows.Automation.Provider; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using At = System.Windows.Automation.Automation; using SW = System.Windows; namespace MonoTests.System.Windows.Automation { [TestFixture] public class LocalProviderTest { private AutomationElement child = null; private AutomationElement root = null; private CustomProviderFragment childProvider =null; private CustomProviderRoot rootProvider =null; [TestFixtureSetUp] public virtual void FixtureSetUp () { childProvider = new CustomProviderFragment (null); rootProvider = new CustomProviderRoot(childProvider); childProvider.Root = rootProvider; child = AutomationElement.FromLocalProvider(childProvider); root = AutomationElement.FromLocalProvider(rootProvider); } #region Test Methods [Test] public void PropertyTest () { Assert.AreEqual ("Custom Simple", child.Current.Name); Assert.AreEqual (ControlType.TabItem, child.Current.ControlType); Assert.AreEqual ("Custom Root", root.Current.Name); Assert.AreEqual (ControlType.Tab, root.Current.ControlType); } [Test] public void PatternTest () { childProvider.ClickCount = 0; var ip = (InvokePattern) child.GetCurrentPattern (InvokePattern.Pattern); ip.Invoke (); Assert.AreEqual (1, childProvider.ClickCount); } [Test] public void EventTest () { int eventCount = 0; AutomationEventHandler handler = (o, e) => eventCount++; At.AddAutomationEventHandler (InvokePattern.InvokedEvent, child, TreeScope.Element, handler); childProvider.PerformInvoke (); Thread.Sleep (500); Assert.AreEqual (1, eventCount); } [Test] public void ControlTreeTest () { Assert.AreEqual (null, TreeWalker.RawViewWalker.GetParent (root), "root's parent"); Assert.AreEqual (child, TreeWalker.RawViewWalker.GetFirstChild (root), "root's first child"); Assert.AreEqual (child, TreeWalker.RawViewWalker.GetLastChild (root), "root's last child"); Assert.AreEqual (null, TreeWalker.RawViewWalker.GetPreviousSibling (root), "root's prev sibling"); Assert.AreEqual (null, TreeWalker.RawViewWalker.GetNextSibling (root), "root's next sibling"); Assert.AreEqual (child, root.FindFirst (TreeScope.Descendants, Condition.TrueCondition)); Assert.AreEqual (1, root.FindAll (TreeScope.Descendants, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.TabItem)).Count, "root's TabItem descendants"); Assert.AreEqual (0, root.FindAll (TreeScope.Descendants, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Button)).Count, "root's Button descendants"); Assert.AreEqual (root, TreeWalker.RawViewWalker.GetParent (child), "child's parent"); Assert.AreEqual (null, TreeWalker.RawViewWalker.GetFirstChild (child), "child's first child"); Assert.AreEqual (null, TreeWalker.RawViewWalker.GetLastChild (child), "child's last child"); Assert.AreEqual (null, TreeWalker.RawViewWalker.GetPreviousSibling (child), "child's prev sibling"); Assert.AreEqual (null, TreeWalker.RawViewWalker.GetNextSibling (child), "child's next sibling"); Assert.AreEqual (0, child.FindAll (TreeScope.Descendants, Condition.TrueCondition).Count, "child's children count"); } #endregion } internal class CustomProviderBase : IRawElementProviderFragment { private int[] runtimeId = null; private SW.Rect rect = new SW.Rect (100.0, 100.0, 200.0, 200.0); public CustomProviderBase (IRawElementProviderFragmentRoot root) { this.Root = root; } public IRawElementProviderFragmentRoot Root { get; set; } #region IRawElementProviderFragment Members public SW.Rect BoundingRectangle { get { return rect; } } public IRawElementProviderFragmentRoot FragmentRoot { get { return Root; } } public IRawElementProviderSimple[] GetEmbeddedFragmentRoots () { return new IRawElementProviderSimple[0]; } public int [] GetRuntimeId () { const int CustomPrefix = 8888; if (runtimeId == null) { byte [] bytes = new Guid ().ToByteArray (); runtimeId = new int [bytes.Length + 1]; runtimeId [0] = CustomPrefix; for (int i = 0; i < bytes.Length; i++) runtimeId [i + 1] = bytes [i]; } return runtimeId; } public virtual IRawElementProviderFragment Navigate (NavigateDirection direction) { if (direction == NavigateDirection.Parent) return Root; else return null; } public void SetFocus () { } #endregion #region IRawElementProviderSimple Members public virtual object GetPatternProvider (int patternId) { return null; } public virtual object GetPropertyValue (int propertyId) { return null; } public IRawElementProviderSimple HostRawElementProvider { get { return null; } } public ProviderOptions ProviderOptions { get { return ProviderOptions.ClientSideProvider; } } #endregion } internal class CustomProviderFragment : CustomProviderBase { public CustomProviderFragment (IRawElementProviderFragmentRoot root) : base (root) { ClickCount = 0; } public int ClickCount { get; set; } public void PerformInvoke () { ClickCount++; AutomationInteropProvider.RaiseAutomationEvent(InvokePattern.InvokedEvent, this, new AutomationEventArgs(InvokePattern.InvokedEvent)); } public override object GetPatternProvider (int patternId) { if (patternId == InvokePattern.Pattern.Id) return new CustomInvokeProvider (this); return base.GetPatternProvider (patternId); } public override object GetPropertyValue (int propertyId) { if (propertyId == AEIds.NameProperty.Id) return "Custom Simple"; else if (propertyId == AEIds.ControlTypeProperty.Id) return ControlType.TabItem.Id; else return base.GetPropertyValue (propertyId); } } internal class CustomInvokeProvider : IInvokeProvider { private CustomProviderFragment provider = null; public CustomInvokeProvider (CustomProviderFragment provider) { if (provider == null) throw new ArgumentNullException ("provider"); this.provider = provider; } #region IInvokeProvider implementation public void Invoke () { provider.PerformInvoke (); } #endregion } internal class CustomProviderRoot : CustomProviderBase, IRawElementProviderFragmentRoot { public IRawElementProviderFragment Child { get; set; } public CustomProviderRoot (IRawElementProviderFragment child) : base (null) { this.Child = child; } #region IRawElementProviderFragmentRoot Members public IRawElementProviderFragment ElementProviderFromPoint (double x, double y) { return Child; } public IRawElementProviderFragment GetFocus () { return null; } #endregion public override IRawElementProviderFragment Navigate (NavigateDirection direction) { if (direction == NavigateDirection.FirstChild || direction == NavigateDirection.LastChild) return Child; else return null; } public override object GetPropertyValue (int propertyId) { if (propertyId == AEIds.NameProperty.Id) return "Custom Root"; else if (propertyId == AEIds.ControlTypeProperty.Id) return ControlType.Tab.Id; else return base.GetPropertyValue (propertyId); } } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/CustomControlTest.cs0000644000016200001670000000435211433571545031275 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2010 Novell, Inc. (http://www.novell.com) // // Authors: // Matt Guo // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.Windows; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; namespace MonoTests.System.Windows.Automation { [TestFixture] public class CustomControlTest : BaseTest { private AutomationElement myControlElement; protected override void CustomFixtureSetUp () { base.CustomFixtureSetUp (); if (!Atspi) { myControlElement = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "My Control")); Assert.IsNotNull (myControlElement, "myControlElement is not null"); } } [Test] public void PropertyTest () { if (!Atspi) { Assert.AreEqual ("My Control", myControlElement.Current.Name); Assert.AreEqual (ControlType.Pane.ProgrammaticName, myControlElement.Current.ControlType.ProgrammaticName); Assert.AreEqual (new Size (30.0, 15.0), myControlElement.Current.BoundingRectangle.Size); } } } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/DataItemTest.cs0000644000016200001670000000605711433571545030156 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2010 Novell, Inc. (http://www.novell.com) // // Authors: // Matt Guo // using System; using System.Threading; using System.Collections.Generic; using System.Windows.Automation; using System.Windows.Automation.Provider; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using At = System.Windows.Automation.Automation; using SW = System.Windows; namespace MonoTests.System.Windows.Automation { [TestFixture] public class DataItemTest : BaseTest { [Test] public void Bug584340 () { // Bug summary: In ListView, Calling ValuePattern.SetValue on one cell can take effect on another sibling cell Winforms. var aliceElement = table1Element.FindFirst (TreeScope.Descendants, new PropertyCondition (AEIds.NameProperty, "Alice")); var _24Element = TreeWalker.RawViewWalker.GetNextSibling (aliceElement); Assert.AreEqual ("24", _24Element.Current.Name); } [Test] public void Bug586635 () { // Bug summary: The NameProperty of DataGridView's Cell is not correctly returned. var item0Element = listView1Element.FindFirst (TreeScope.Descendants, new AndCondition (new PropertyCondition (AEIds.NameProperty, "Item 0"), new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Edit))); var subItem1Element = listView1Element.FindFirst (TreeScope.Descendants, new AndCondition (new PropertyCondition (AEIds.NameProperty, "subitem1"), new PropertyCondition (AEIds.ControlTypeProperty, ControlType.Edit))); var vp = (ValuePattern) subItem1Element.GetCurrentPattern (ValuePattern.Pattern); vp.SetValue ("New Sub"); Assert.AreEqual ("Item 0", item0Element.Current.Name); Assert.AreEqual ("New Sub", subItem1Element.Current.Name); vp = (ValuePattern) item0Element.GetCurrentPattern (ValuePattern.Pattern); vp.SetValue ("New Item Val"); Assert.AreEqual ("New Item Val", item0Element.Current.Name); Assert.AreEqual ("New Sub", subItem1Element.Current.Name); } } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/MultipleViewPatternTest.cs0000644000016200001670000001402011433571545032437 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Matt Guo // using System; using System.Linq; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using At = System.Windows.Automation.Automation; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace MonoTests.System.Windows.Automation { [TestFixture] // Note: this TestFixture will fail on Windows 7, see comment of // "ListViewProviderTest.MultipleView_GetSupportedViewsTest" in UIAutomationWinformsTest public class MultipleViewPatternTest : BaseTest { private MultipleViewPattern pattern = null; protected override void CustomFixtureSetUp () { base.CustomFixtureSetUp (); pattern = (MultipleViewPattern) listView1Element.GetCurrentPattern (MultipleViewPattern.Pattern); Assert.IsNotNull (pattern); } [Test] public void PropertiesTest () { CheckPatternIdentifiers (); } [Test] public void ViewTest () { var currentView = pattern.Current.CurrentView; var supportedViews = pattern.Current.GetSupportedViews (); Assert.Greater (supportedViews.Length, 1, "GetSupportedViews.Length"); Assert.AreEqual (1, currentView, "GetSupportedViews.Value"); Assert.AreEqual ("Details", pattern.GetViewName (currentView), "Current view name" ); AssertRaises (() => pattern.GetViewName (-1), "get view name from -1"); AssertRaises (() => pattern.GetViewName (supportedViews.Length), "get view name from supportedViews.Length"); } [Test] public void SetErrorViewTest () { var oldView = pattern.Current.CurrentView; AssertRaises (() => pattern.SetCurrentView (123456), "Set invalid viewId"); var newView = pattern.Current.CurrentView; Assert.AreEqual (newView, oldView, "Current view isn't changed"); } [Test] //todo We ignore this test case on Linux to make other test cases pass. [Ignore] public void PatternLifeTest () { RunCommand ("change list view mode list"); //todo Currently our implementation will fail unless //re-find the "listView1Element" with following code: // listView1Element = testFormElement.FindFirst (TreeScope.Children, // new PropertyCondition (AEIds.NameProperty, "listView1")); // Assert.IsNotNull (listView1Element); // pattern = (MultipleViewPattern) listView1Element.GetCurrentPattern (MultipleViewPattern.Pattern); var currentView = pattern.Current.CurrentView; Assert.AreEqual ("List", pattern.GetViewName (currentView), "Current view name" ); RunCommand ("change list view mode details"); } [Test] //The "Z1_" prefix ensures the test case's execution sequence public void Z1_DynamicTest () { var automationEventsArray = new [] { new {Sender = (object) null, Args = (AutomationPropertyChangedEventArgs) null}}; var automationEvents = automationEventsArray.ToList (); automationEvents.Clear (); AutomationPropertyChangedEventHandler handler = (o, e) => automationEvents.Add (new { Sender = o, Args = e }); At.AddAutomationPropertyChangedEventHandler (listView1Element, TreeScope.Element, handler, MultipleViewPattern.CurrentViewProperty, MultipleViewPattern.SupportedViewsProperty); RunCommand ("change list view mode list"); //var currentView = pattern.Current.CurrentView; // We should expect an AutomationPropertyChangedEvent here, // But since on Windows Winforms didn't fire such a event, then we also assert no event fired. Assert.AreEqual (0, automationEvents.Count, "event count"); /* Assert.AreEqual (1, automationEvents.Count, "event count"); Assert.AreEqual (listView1Element, automationEvents [0].Sender, "event sender"); Assert.AreEqual (MultipleViewPattern.CurrentViewProperty, automationEvents [0].Args.Property, "property"); Assert.AreEqual (3, automationEvents [0].Args.NewValue, "new value"); Assert.AreEqual (1, automationEvents [0].Args.OldValue, "old value"); Assert.AreEqual ("List", pattern.GetViewName (currentView), "Current view name" );*/ } [Test] public void NotEnabledTest () { RunCommand ("disable list view"); listView1Element = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "listView1")); Assert.IsNotNull (listView1Element); pattern = (MultipleViewPattern) listView1Element.GetCurrentPattern (MultipleViewPattern.Pattern); // We should expect and ElementNotEnabledException here // But since on Windows Winforms there isn't expcetion fired, then we also assert no exception here pattern.SetCurrentView (1); RunCommand ("enable list view"); pattern = (MultipleViewPattern) listView1Element.GetCurrentPattern (MultipleViewPattern.Pattern); } } } mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/Makefile.in0000644000016200001670000006075711433571551027350 0ustar00hudsonhudson00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/swfclienttest.sh.in $(top_srcdir)/Makefile.include subdir = UIAutomationClientTests/UIAutomationClientTests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = swfclienttest.sh CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(linuxpkgconfigdir)" SCRIPTS = $(bin_SCRIPTS) SOURCES = DIST_SOURCES = DATA = $(linuxpkgconfig_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ GACUTIL = @GACUTIL@ GLIB_SHARP_20_CFLAGS = @GLIB_SHARP_20_CFLAGS@ GLIB_SHARP_20_LIBS = @GLIB_SHARP_20_LIBS@ GMCS = @GMCS@ GTK_SHARP_20_CFLAGS = @GTK_SHARP_20_CFLAGS@ GTK_SHARP_20_LIBS = @GTK_SHARP_20_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MONO = @MONO@ MONO_CFLAGS = @MONO_CFLAGS@ MONO_LIBS = @MONO_LIBS@ NUNIT_CFLAGS = @NUNIT_CFLAGS@ NUNIT_LIBS = @NUNIT_LIBS@ NUNIT_PATH = @NUNIT_PATH@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SN = @SN@ STRIP = @STRIP@ VERSION = @VERSION@ WINDOWSBASE_LIBS = @WINDOWSBASE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_bindir = @expanded_bindir@ expanded_datadir = @expanded_datadir@ expanded_libdir = @expanded_libdir@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = $(build_sources) $(build_resx_files) \ $(build_others_files) $(ASSEMBLY_WRAPPER_IN) $(EXTRAS) \ $(DATA_FILES) $(build_culture_res_files) ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG;TRACE" ASSEMBLY = bin/Debug/UIAutomationClientTests.dll ASSEMBLY_MDB = $(ASSEMBLY).mdb COMPILE_TARGET = library BUILD_DIR = bin/Debug/ SAMPLEFORM_EXE = $(BUILD_DIR)/SampleForm.exe SAMPLEFORM_EXE_SOURCE = ../SampleForm/bin/Debug/SampleForm.exe SAMPLEFORM_EXE_MDB_SOURCE = $(SAMPLEFORM_EXE_SOURCE).mdb SAMPLEFORM_EXE_MDB = $(SAMPLEFORM_EXE).mdb @HAS_MONO_2_5_FALSE@WINDOWSBASE_DLL = $(BUILD_DIR)/WindowsBase.dll @HAS_MONO_2_5_FALSE@WINDOWSBASE_DLL_SOURCE = $(top_builddir)/bin/WindowsBase.dll @HAS_MONO_2_5_FALSE@WINDOWSBASE_DLL_MDB_SOURCE = $(WINDOWSBASE_DLL_SOURCE).mdb @HAS_MONO_2_5_FALSE@WINDOWSBASE_DLL_MDB = $(WINDOWSBASE_DLL).mdb UIAUTOMATIONTYPES_DLL = $(BUILD_DIR)/UIAutomationTypes.dll UIAUTOMATIONTYPES_DLL_SOURCE = $(top_builddir)/bin/UIAutomationTypes.dll UIAUTOMATIONTYPES_DLL_MDB_SOURCE = $(UIAUTOMATIONTYPES_DLL_SOURCE).mdb UIAUTOMATIONTYPES_DLL_MDB = $(UIAUTOMATIONTYPES_DLL).mdb UIAUTOMATIONCLIENT_DLL = $(BUILD_DIR)/UIAutomationClient.dll UIAUTOMATIONCLIENT_DLL_SOURCE = $(top_builddir)/bin/UIAutomationClient.dll UIAUTOMATIONCLIENT_DLL_MDB_SOURCE = $(UIAUTOMATIONCLIENT_DLL_SOURCE).mdb UIAUTOMATIONCLIENT_DLL_MDB = $(UIAUTOMATIONCLIENT_DLL).mdb #Needed by UIAutomationClient.dll UIAUTOMATIONSOURCE_DLL = $(BUILD_DIR)/UIAutomationSource.dll UIAUTOMATIONSOURCE_DLL_SOURCE = $(top_builddir)/bin/UIAutomationSource.dll UIAUTOMATIONSOURCE_DLL_MDB_SOURCE = $(UIAUTOMATIONSOURCE_DLL_SOURCE).mdb UIAUTOMATIONSOURCE_DLL_MDB = $(UIAUTOMATIONSOURCE_DLL).mdb #Needed by UIAutomationClient.dll UIAUTOMATIONPROVIDER_DLL = $(BUILD_DIR)/UIAutomationProvider.dll UIAUTOMATIONPROVIDER_DLL_SOURCE = $(top_builddir)/bin/UIAutomationProvider.dll UIAUTOMATIONPROVIDER_DLL_MDB_SOURCE = $(UIAUTOMATIONPROVIDER_DLL_SOURCE).mdb UIAUTOMATIONPROVIDER_DLL_MDB = $(UIAUTOMATIONPROVIDER_DLL).mdb UIAUTOMATIONBRIDGE_DLL = $(BUILD_DIR)/UIAutomationBridge.dll UIAUTOMATIONBRIDGE_DLL_SOURCE = $(top_builddir)/bin/UIAutomationBridge.dll UIAUTOMATIONBRIDGE_DLL_MDB_SOURCE = $(UIAUTOMATIONBRIDGE_DLL_SOURCE).mdb UIAUTOMATIONBRIDGE_DLL_MDB = $(UIAUTOMATIONBRIDGE_DLL).mdb UIAUTOMATIONCLIENTTESTS_DLL_MDB_SOURCE = bin/Debug/UIAutomationClientTests.dll.mdb UIAUTOMATIONCLIENTTESTS_DLL_MDB = $(BUILD_DIR)/UIAutomationClientTests.dll.mdb AL = al2 SATELLITE_ASSEMBLY_NAME = $(notdir $(basename $(ASSEMBLY))).resources.dll PROGRAMFILES = \ $(SAMPLEFORM_EXE) \ $(SAMPLEFORM_EXE_MDB) \ $(WINDOWSBASE_DLL) \ $(WINDOWSBASE_DLL_MDB) \ $(UIAUTOMATIONTYPES_DLL) \ $(UIAUTOMATIONTYPES_DLL_MDB) \ $(UIAUTOMATIONCLIENT_DLL) \ $(UIAUTOMATIONCLIENT_DLL_MDB) \ $(UIAUTOMATIONSOURCE_DLL) \ $(UIAUTOMATIONSOURCE_DLL_MDB) \ $(UIAUTOMATIONPROVIDER_DLL) \ $(UIAUTOMATIONPROVIDER_DLL_MDB) \ $(UIAUTOMATIONBRIDGE_DLL) \ $(UIAUTOMATIONBRIDGE_DLL_MDB) \ $(UIAUTOMATIONCLIENTTESTS_DLL_MDB) RESGEN = resgen2 FILES = \ AutomationElementTest.cs \ AutomationEventTest.cs \ AutomationTest.cs \ BaseTest.cs \ CacheRequestTest.cs \ ConditionTest.cs \ CustomControlTest.cs \ DataItemTest.cs \ DynamicElementTest.cs \ ExpandCollapsePatternTest.cs \ FocusTest.cs \ InvokePatternTest.cs \ LocalProviderTest.cs \ MenuTest.cs \ MultipleViewPatternTest.cs \ Properties/AssemblyInfo.cs \ RangeValuePatternTest.cs \ RootElementTest.cs \ ScrollTest.cs \ SelectionPatternTest.cs \ TableHierarchyTest.cs \ TableTest.cs \ TextPatternTest.cs \ TogglePatternTest.cs \ TransformPatternTest.cs \ TreeWalkerTest.cs \ ValuePatternTest.cs \ WindowPatternTest.cs DATA_FILES = RESOURCES = EXTRAS = PROJECT_REFERENCES = \ $(WINDOWSBASE_DLL) \ $(UIAUTOMATIONTYPES_DLL) \ $(UIAUTOMATIONCLIENT_DLL) \ $(UIAUTOMATIONSOURCE_DLL) \ $(UIAUTOMATIONPROVIDER_DLL) \ $(UIAUTOMATIONBRIDGE_DLL) REFERENCES = \ System \ System.Core \ System.Xml.Linq \ System.Data.DataSetExtensions \ System.Data \ System.Xml \ $(WINDOWSBASE_LIBS) \ $(NUNIT_LIBS) DLL_REFERENCES = CLEANFILES = $(PROGRAMFILES) bin/Debug/TestResult.xml $(ASSEMBLY) \ $(ASSEMBLY).mdb $(BINARIES) $(build_resx_resources) \ $(build_satellite_assembly_list) VALID_CULTURES = ar bg ca zh-CHS cs da de el en es fi fr he hu is it ja ko nl no pl pt ro ru hr sk sq sv th tr id uk be sl et lv lt fa vi hy eu mk af fo hi sw gu ta te kn mr gl kok ar-SA bg-BG ca-ES zh-TW cs-CZ da-DK de-DE el-GR en-US fi-FI fr-FR he-IL hu-HU is-IS it-IT ja-JP ko-KR nl-NL nb-NO pl-PL pt-BR ro-RO ru-RU hr-HR sk-SK sq-AL sv-SE th-TH tr-TR id-ID uk-UA be-BY sl-SI et-EE lv-LV lt-LT fa-IR vi-VN hy-AM eu-ES mk-MK af-ZA fo-FO hi-IN sw-KE gu-IN ta-IN te-IN kn-IN mr-IN gl-ES kok-IN ar-IQ zh-CN de-CH en-GB es-MX fr-BE it-CH nl-BE nn-NO pt-PT sv-FI ar-EG zh-HK de-AT en-AU es-ES fr-CA ar-LY zh-SG de-LU en-CA es-GT fr-CH ar-DZ zh-MO en-NZ es-CR fr-LU ar-MA en-IE es-PA ar-TN en-ZA es-DO ar-OM es-VE ar-YE es-CO ar-SY es-PE ar-JO es-AR ar-LB en-ZW es-EC ar-KW en-PH es-CL ar-AE es-UY ar-BH es-PY ar-QA es-BO es-SV es-HN es-NI es-PR zh-CHT s2q = $(subst \ ,?,$1) q2s = $(subst ?,\ ,$1) # use this when result will be quoted unesc2 = $(subst ?, ,$1) build_sources = $(FILES) $(GENERATED_FILES) build_sources_esc = $(call s2q,$(build_sources)) # use unesc2, as build_sources_embed is quoted build_sources_embed = $(call unesc2,$(build_sources_esc:%='$(srcdir)/%')) comma__ = , get_resource_name = $(firstword $(subst $(comma__), ,$1)) get_culture = $(lastword $(subst ., ,$(basename $1))) is_cultured_resource = $(and $(word 3,$(subst ., ,$1)), $(filter $(VALID_CULTURES),$(lastword $(subst ., ,$(basename $1))))) RESOURCES_ESC = $(call s2q,$(RESOURCES)) build_resx_list = $(foreach res, $(RESOURCES_ESC), $(if $(filter %.resx, $(call get_resource_name,$(res))),$(res),)) build_non_culture_resx_list = $(foreach res, $(build_resx_list),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) build_non_culture_others_list = $(foreach res, $(filter-out $(build_resx_list),$(RESOURCES_ESC)),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) build_others_list = $(build_non_culture_others_list) build_xamlg_list = $(filter %.xaml.g.cs, $(FILES)) # resgen all .resx resources build_resx_files = $(foreach res, $(build_resx_list), $(call get_resource_name,$(res))) build_resx_resources_esc = $(build_resx_files:.resx=.resources) build_resx_resources = $(call q2s,$(build_resx_resources_esc)) # embed resources for the main assembly build_resx_resources_hack = $(subst .resx,.resources, $(build_non_culture_resx_list)) # use unesc2, as build_resx_resources_embed is quoted build_resx_resources_embed = $(call unesc2,$(build_resx_resources_hack:%='-resource:%')) build_others_files = $(call q2s,$(foreach res, $(build_others_list),$(call get_resource_name,$(res)))) build_others_resources = $(build_others_files) # use unesc2, as build_others_resources_embed is quoted build_others_resources_embed = $(call unesc2,$(build_others_list:%='-resource:$(srcdir)/%')) build_resources = $(build_resx_resources) $(build_others_resources) build_resources_embed = $(build_resx_resources_embed) $(build_others_resources_embed) # -usesourcepath is available only for resgen2 emit_resgen_target_1 = $(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); cd '$$(shell dirname '$$<')' && $$(RESGEN) '$$(shell basename '$$<')' '$$(shell basename '$$@')' emit_resgen_target_2 = $(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); $$(RESGEN) -usesourcepath '$$<' '$$@' emit_resgen_target = $(if $(filter resgen2,$(RESGEN)),$(emit_resgen_target_2),$(emit_resgen_target_1)) emit_resgen_targets = $(foreach res,$(build_resx_resources_esc),$(eval $(call emit_resgen_target,$(res)))) build_references_ref = $(call q2s,$(foreach ref, $(call \ s2q,$(REFERENCES)), $(if $(filter -pkg:%, $(ref)), $(ref), \ $(if $(filter -r:%, $(ref)), $(ref), -r:$(ref))))) $(call \ q2s,$(foreach ref, $(call s2q,$(DLL_REFERENCES)), -r:$(ref))) \ $(call q2s,$(foreach ref, $(call s2q,$(PROJECT_REFERENCES)), \ -r:$(ref))) s2q2s = $(call unesc2,$(call s2q,$1)) cp_actual = test -z $1 || cp $1 $2 cp = $(call cp_actual,'$(call s2q2s,$1)','$(call s2q2s,$2)') rm_actual = test -z '$1' || rm -f '$2' rm = $(call rm_actual,$(call s2q2s,$1),$(call s2q2s,$2)/$(shell basename '$(call s2q2s,$1)')) DISTCLEANFILES = $(GENERATED_FILES) $(pc_files) $(BUILD_DIR)/* #pkglib_SCRIPTS = $(ASSEMBLY) bin_SCRIPTS = $(BINARIES) #programfilesdir = @libdir@/@PACKAGE@ #programfiles_DATA = $(PROGRAMFILES) linuxpkgconfigdir = @libdir@/pkgconfig linuxpkgconfig_DATA = $(LINUX_PKGCONFIG) # generating satellite assemblies culture_resources = $(foreach res, $(RESOURCES_ESC), $(if $(call is_cultured_resource,$(call get_resource_name, $(res))),$(res))) cultures = $(sort $(foreach res, $(culture_resources), $(call get_culture,$(call get_resource_name,$(res))))) culture_resource_dependencies = $(call q2s,$(BUILD_DIR)/$1/$(SATELLITE_ASSEMBLY_NAME): $(subst .resx,.resources,$2)) culture_resource_commandlines = $(call unesc2,cmd_line_satellite_$1 += '/embed:$(subst .resx,.resources,$2)') build_satellite_assembly_list = $(call q2s,$(cultures:%=$(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME))) build_culture_res_files = $(call q2s,$(foreach res, $(culture_resources),$(call get_resource_name,$(res)))) GACROOT = $(DESTDIR)$(prefix)/lib all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.include $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign UIAutomationClientTests/UIAutomationClientTests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign UIAutomationClientTests/UIAutomationClientTests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): swfclienttest.sh: $(top_builddir)/config.status $(srcdir)/swfclienttest.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files install-linuxpkgconfigDATA: $(linuxpkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(linuxpkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(linuxpkgconfigdir)" @list='$(linuxpkgconfig_DATA)'; test -n "$(linuxpkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(linuxpkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(linuxpkgconfigdir)" || exit $$?; \ done uninstall-linuxpkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(linuxpkgconfig_DATA)'; test -n "$(linuxpkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(linuxpkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(linuxpkgconfigdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) $(DATA) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(linuxpkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-linuxpkgconfigDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-linuxpkgconfigDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-binSCRIPTS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-linuxpkgconfigDATA install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-binSCRIPTS uninstall-linuxpkgconfigDATA all: $(ASSEMBLY) $(PROGRAMFILES) # macros # $(call emit-deploy-target,deploy-variable-name) define emit-deploy-target $($1): $($1_SOURCE) mkdir -p '$$(shell dirname '$$@')' cp '$$<' '$$@' endef # $(call emit-deploy-wrapper,wrapper-variable-name,wrapper-sourcefile,x) # assumes that for a wrapper foo.pc its source template is foo.pc.in # if $3 is non-empty then wrapper is marked exec define emit-deploy-wrapper $($1): $2 mkdir -p '$$(shell dirname '$$@')' cp '$$<' '$$@' $(if $3,chmod +x '$$@') endef $(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_dependencies,$(call get_culture,$(call get_resource_name,$(res))),$(call get_resource_name,$(res)))))) $(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_commandlines,$(call get_culture,$(call get_resource_name,$(res))),$(res))))) $(build_satellite_assembly_list): $(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME): mkdir -p '$(@D)' $(AL) -out:'$@' -culture:$* -t:lib $(cmd_line_satellite_$*) gac-install: $(POLICY_ASSEMBLIES) $(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS) /root $(GACROOT) $(PACKAGE_FLAG) || exit 1; gac-uninstall: $(GACUTIL) /us $(ASSEMBLY) $(GACUTIL_FLAGS) /root $(GACROOT) $(PACKAGE_FLAG) || exit 1; $(eval $(call emit-deploy-target,SAMPLEFORM_EXE)) $(eval $(call emit-deploy-target,SAMPLEFORM_EXE_MDB)) @HAS_MONO_2_5_FALSE@$(eval $(call emit-deploy-target,WINDOWSBASE_DLL)) @HAS_MONO_2_5_FALSE@$(eval $(call emit-deploy-target,WINDOWSBASE_DLL_MDB)) $(eval $(call emit-deploy-target,UIAUTOMATIONTYPES_DLL)) $(eval $(call emit-deploy-target,UIAUTOMATIONTYPES_DLL_MDB)) $(eval $(call emit-deploy-target,UIAUTOMATIONCLIENT_DLL)) $(eval $(call emit-deploy-target,UIAUTOMATIONCLIENT_DLL_MDB)) $(eval $(call emit-deploy-target,UIAUTOMATIONSOURCE_DLL)) $(eval $(call emit-deploy-target,UIAUTOMATIONSOURCE_DLL_MDB)) $(eval $(call emit-deploy-target,UIAUTOMATIONPROVIDER_DLL)) $(eval $(call emit-deploy-target,UIAUTOMATIONPROVIDER_DLL_MDB)) $(eval $(call emit-deploy-target,UIAUTOMATIONBRIDGE_DLL)) $(eval $(call emit-deploy-target,UIAUTOMATIONBRIDGE_DLL_MDB)) $(eval $(call emit_resgen_targets)) $(build_xamlg_list): %.xaml.g.cs: %.xaml xamlg '$<' $(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list) mkdir -p $(shell dirname $(ASSEMBLY)) $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) @chmod +x swfclienttest.sh # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/Properties/0000777000016200001670000000000011433571554027427 5ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationClientTests/UIAutomationClientTests/Properties/AssemblyInfo.cs0000644000016200001670000000267611433571545032360 0ustar00hudsonhudson00000000000000using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle ("UIAutomationClientTests")] [assembly: AssemblyDescription ("")] [assembly: AssemblyConfiguration ("")] [assembly: AssemblyCompany ("")] [assembly: AssemblyProduct ("UIAutomationClientTests")] [assembly: AssemblyCopyright ("Copyright © 2009")] [assembly: AssemblyTrademark ("")] [assembly: AssemblyCulture ("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible (false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid ("5af636d8-479a-4597-8685-5197861fd02b")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion ("1.0.0.0")] [assembly: AssemblyFileVersion ("1.0.0.0")] mono-uia-2.1/UIAutomationClientTests/GtkForm/0000777000016200001670000000000011433571554022104 5ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationClientTests/GtkForm/Makefile.am0000644000016200001670000000300211433571545024127 0ustar00hudsonhudson00000000000000EXTRA_DIST = if ENABLE_DEBUG ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+ -debug "-define:DEBUG" ASSEMBLY = bin/Debug/GtkForm.exe ASSEMBLY_MDB = $(ASSEMBLY).mdb COMPILE_TARGET = exe PROJECT_REFERENCES = BUILD_DIR = bin/Debug GTKFORM_EXE_MDB_SOURCE=bin/Debug/GtkForm.exe.mdb GTKFORM_EXE_MDB=$(BUILD_DIR)/GtkForm.exe.mdb endif if ENABLE_RELEASE ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+ -keyfile:$(top_srcdir)/mono-uia.snk ASSEMBLY = bin/Release/GtkForm.exe ASSEMBLY_MDB = COMPILE_TARGET = exe PROJECT_REFERENCES = BUILD_DIR = bin/Release GTKFORM_EXE_MDB= endif AL=al2 SATELLITE_ASSEMBLY_NAME=.resources.dll PROGRAMFILES = \ $(GTKFORM_EXE_MDB) RESGEN=resgen2 all: $(ASSEMBLY) $(PROGRAMFILES) FILES = \ GtkForm.cs DATA_FILES = RESOURCES = EXTRAS = REFERENCES = \ System \ Mono.Posix \ System.Core \ $(GTK_SHARP_20_LIBS) DLL_REFERENCES = CLEANFILES = $(PROGRAMFILES) include $(top_srcdir)/Makefile.include $(eval $(call emit_resgen_targets)) $(build_xamlg_list): %.xaml.g.cs: %.xaml xamlg '$<' $(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list) mkdir -p $(shell dirname $(ASSEMBLY)) $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) mono-uia-2.1/UIAutomationClientTests/GtkForm/GtkForm.cs0000644000016200001670000002262511433571545024007 0ustar00hudsonhudson00000000000000using System; using Gtk; namespace GtkForm { public class DemoMain { private Gtk.Window window; private Gtk.HBox hbox1; private Gtk.Label label1; private Gtk.Entry textBox1; private Gtk.TextView textBox3; private Gtk.TreeView treeView1; private Gtk.TreeView treeView2; private Gtk.TreeView listView1; private Gtk.TreeView dataGridView1; private Gtk.TreeStore tableStore; private Gtk.ScaleButton scaleButton1; private Gtk.HBox hboxPanel; private Gtk.Entry textBoxExtra; private Gtk.Entry txtCommand; private Gtk.Button button1; private Gtk.Button button2; private Gtk.Button button3; private Gtk.FileChooserDialog chooser; public static void Main (string[] args) { Application.Init (); new DemoMain (); Application.Run (); } public DemoMain () { window = new Gtk.Window ("TestForm1"); Gtk.HBox hbox = new Gtk.HBox (false, 0); hbox1 = new Gtk.HBox (false, 0); Gtk.HBox hbox2 = new Gtk.HBox (false, 0); Gtk.HBox hbox3 = new Gtk.HBox (false, 0); hbox.Add (hbox1); window.SetDefaultSize (600, 400); window.DeleteEvent += new DeleteEventHandler (WindowDelete); button1 = new Gtk.Button ("button1"); button1.Clicked += Button1Clicked; button2 = new Gtk.Button ("button2"); button3 = new Gtk.Button ("button3"); Gtk.Button button4 = new Gtk.Button ("button4"); button4.Clicked += Button4Clicked; Gtk.Button button5 = new Gtk.Button ("button5"); Gtk.Button button6 = new Gtk.Button ("button6"); Gtk.Button button7 = new Gtk.Button ("button7"); button7.Sensitive = false; scaleButton1 = new Gtk.ScaleButton (0, 0, 100, 10, new string [0]); hbox1.Add (hbox3); hbox1.Add (hbox2); hbox1.Add (button3); hbox1.Add (button2); button3.Accessible.Description = "help text 3"; button3.Sensitive = false; label1 = new Gtk.Label ("label1"); textBox1 = new Gtk.Entry (); Gtk.Entry textBox2 = new Gtk.Entry (); textBox2.Visibility = false; textBox2.Sensitive = false; textBox2.IsEditable = false; textBox3 = new Gtk.TextView (); // TODO: scrollbars Gtk.CheckButton checkbox1 = new Gtk.CheckButton ("checkbox1"); Gtk.CheckButton checkbox2 = new Gtk.CheckButton ("checkbox2"); checkbox2.Sensitive = false; Gtk.TreeStore store = new Gtk.TreeStore (typeof (string), typeof (string)); Gtk.TreeIter [] iters = new Gtk.TreeIter [2]; iters [0] = store.AppendNode (); store.SetValues (iters [0], "item 1", "item 1 (2)"); iters [1] = store.AppendNode (iters [0]); store.SetValues (iters [1], "item 1a", "item 1a (2)"); iters [0] = store.AppendNode (); store.SetValues (iters [0], "item 2", "item 2 (2)"); iters [1] = store.AppendNode (iters [0]); store.SetValues (iters [1], "item 2a", "item 2a (2)"); iters [1] = store.AppendNode (iters [0]); store.SetValues (iters [1], "item 2b", "item 2b (2)"); treeView1 = new Gtk.TreeView (store); AddTreeViewColumn (treeView1, 0, "column 1"); treeView1.CollapseAll (); treeView2 = new Gtk.TreeView (store); AddTreeViewColumn (treeView2, 0, "column 1"); AddTreeViewColumn (treeView2, 1, "column 2"); treeView2.CollapseAll (); treeView2.Accessible.Name = "treeView2"; tableStore = new Gtk.TreeStore (typeof (string), typeof (string), typeof (string), typeof (string)); iters [0] = tableStore.AppendNode (); tableStore.SetValues (iters [0], "False", "Alice", "24", ""); iters [0] = tableStore.AppendNode (); tableStore.SetValues (iters [0], "True", "Bob", "28", ""); dataGridView1 = new Gtk.TreeView (tableStore); AddTreeViewColumn (dataGridView1, 0, "Gender"); AddTreeViewColumn (dataGridView1, 1, "Name"); AddTreeViewColumn (dataGridView1, 2, "Age"); dataGridView1.Accessible.Name = "dataGridView1"; hboxPanel = new Gtk.HBox (); Gtk.Button btnRemoveTextBox = new Gtk.Button ("Remove"); btnRemoveTextBox.Clicked += RemoveTextBoxClicked; Gtk.Button btnAddTextBox = new Gtk.Button ("Add"); btnAddTextBox.Clicked += AddTextBoxClicked; txtCommand = new Gtk.Entry (); txtCommand.Accessible.Name = "txtCommand"; Gtk.Button btnRun = new Gtk.Button ("Run"); btnRun.Clicked += btnRunClicked; hboxPanel.Add (btnRemoveTextBox); hboxPanel.Add (btnAddTextBox); Gtk.TreeStore treeStore = new Gtk.TreeStore (typeof (string)); Gtk.TreeIter iter = treeStore.AppendNode (); treeStore.SetValue (iter, 0, "Item 0"); iter = treeStore.AppendNode (); treeStore.SetValue (iter, 0, "Item 1"); listView1 = new Gtk.TreeView (treeStore); AddTreeViewColumn (listView1, 0, "items"); listView1.Accessible.Name = "listView1"; listView1.ExpandAll (); hbox2.Add (button5); hbox2.Add (checkbox1); hbox2.Add (checkbox2); hbox2.Add (button4); hbox2.Accessible.Name = "groupBox2"; hbox3.Add (button7); hbox3.Add (button6); hbox3.Sensitive = false; hbox3.Accessible.Name = "groupBox3"; hbox.Add (textBox3); hbox.Add (textBox2); hbox.Add (textBox1); hbox.Add (label1); hbox.Add (button1); hbox.Add (treeView1); hbox.Add (treeView2); hbox.Add (listView1); hbox.Add (dataGridView1); hbox.Add (txtCommand); hbox.Add (btnRun); hbox.Add (hboxPanel); hbox.Add (scaleButton1); Gtk.Menu file = new Gtk.Menu (); file.Append (new Gtk.MenuItem ("_New")); file.Append (new Gtk.MenuItem ("_Open")); file.Append (new Gtk.CheckMenuItem ("Check")); Gtk.MenuItem fileItem = new Gtk.MenuItem ("File"); fileItem.Submenu = file; Gtk.Menu edit = new Gtk.Menu (); edit.Append (new Gtk.MenuItem ("_Undo")); edit.Append (new Gtk.SeparatorMenuItem ()); edit.Append (new Gtk.MenuItem ("_Cut")); edit.Append (new Gtk.MenuItem ("Copy")); edit.Append (new Gtk.MenuItem ("_Paste")); Gtk.MenuItem editItem = new Gtk.MenuItem ("Edit"); editItem.Submenu = edit; Gtk.MenuBar menuBar = new Gtk.MenuBar (); menuBar.Append (fileItem); menuBar.Append (editItem); hbox.Add (menuBar); window.Add (hbox); window.ShowAll (); } private void AddTreeViewColumn (Gtk.TreeView treeView, int i, string name) { AddTreeViewColumn (treeView, i, name, false); } private void AddTreeViewColumn (Gtk.TreeView treeView, int i, string name, bool toggle) { Gtk.TreeViewColumn col = new Gtk.TreeViewColumn (); col.Title = name; treeView.AppendColumn (col); Gtk.CellRenderer cell; if (toggle) cell = new Gtk.CellRendererToggle (); else cell = new Gtk.CellRendererText (); col.PackStart (cell, true); col.AddAttribute (cell, "text", i); } private void Button1Clicked (object o, EventArgs args) { textBox1.Text = "button1_click"; label1.Text = "button1_click"; } private void Button4Clicked (object o, EventArgs args) { treeView1.Sensitive = !treeView1.Sensitive; treeView2.Sensitive = !treeView2.Sensitive; scaleButton1.Sensitive = !scaleButton1.Sensitive; } private void RemoveTextBoxClicked (object o, EventArgs args) { if (textBoxExtra == null) throw new Exception ("No textBox to remove"); hboxPanel.Remove (textBoxExtra); textBoxExtra = null; } private void AddTextBoxClicked (object o, EventArgs args) { if (textBoxExtra != null) throw new Exception ("Adding more than one TextBox not supported"); textBoxExtra = new Gtk.Entry (); hboxPanel.Add (textBoxExtra); } private void btnRunClicked (object o, EventArgs args) { const string sampleText = "Lorem ipsum dolor sit amet"; string cmd = txtCommand.Text; if (cmd == "click button1") button1.Activate (); else if (cmd == "set textbox3 text") textBox3.Buffer.Text = sampleText; else if (cmd == "select textbox3") { if (textBox3.Buffer.Text.Length < 4) textBox3.Buffer.Text = sampleText; Gtk.TextIter startIter, endIter; textBox3.Buffer.GetSelectionBounds (out startIter, out endIter); int start, end; start = startIter.Offset; end = endIter.Offset; end = (end-start == 3? 4: 3); start = 0; startIter = textBox3.Buffer.GetIterAtOffset (start); endIter = textBox3.Buffer.GetIterAtOffset (end); textBox3.Buffer.MoveMark ("selection_bound", startIter); textBox3.Buffer.MoveMark ("insert", endIter); } else if (cmd == "add table row") { Gtk.TreeIter iter; iter = tableStore.AppendNode (); tableStore.SetValues (iter, "true", "Mallory", "40"); } else if (cmd == "add table column") AddTreeViewColumn (treeView2, 3, "more"); else if (cmd == "enable multiselect") listView1.Selection.Mode = Gtk.SelectionMode.Multiple; else if (cmd == "disable multiselect") listView1.Selection.Mode = Gtk.SelectionMode.Single; else if (cmd == "change button3 name") button3.Accessible.Name = "xyzzy"; else if (cmd == "change button3 helptext") button3.Accessible.Description = "plugh"; else if (cmd == "enable button3") button3.Sensitive = true; else if (cmd == "disable button3") button3.Sensitive = false; else if (cmd == "focus textBox3") textBox3.GrabFocus (); else if (cmd == "focus button2") button2.GrabFocus (); else if (cmd.StartsWith ("change title:")) window.Title = cmd.Substring (cmd.IndexOf (':') + 1); else if (cmd == "open FileChooser" && chooser == null) { chooser = new Gtk.FileChooserDialog ("FileChooser", window, FileChooserAction.Open, "data", 0); chooser.Show (); } else if (cmd == "close FileChooser" && chooser != null) { chooser.Destroy (); chooser = null; } } private void WindowDelete (object o, DeleteEventArgs args) { Application.Quit (); args.RetVal = true; } } } mono-uia-2.1/UIAutomationClientTests/GtkForm/Makefile.in0000644000016200001670000005130511433571550024145 0ustar00hudsonhudson00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/Makefile.include subdir = UIAutomationClientTests/GtkForm ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(linuxpkgconfigdir)" SCRIPTS = $(bin_SCRIPTS) SOURCES = DIST_SOURCES = DATA = $(linuxpkgconfig_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ GACUTIL = @GACUTIL@ GLIB_SHARP_20_CFLAGS = @GLIB_SHARP_20_CFLAGS@ GLIB_SHARP_20_LIBS = @GLIB_SHARP_20_LIBS@ GMCS = @GMCS@ GTK_SHARP_20_CFLAGS = @GTK_SHARP_20_CFLAGS@ GTK_SHARP_20_LIBS = @GTK_SHARP_20_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MONO = @MONO@ MONO_CFLAGS = @MONO_CFLAGS@ MONO_LIBS = @MONO_LIBS@ NUNIT_CFLAGS = @NUNIT_CFLAGS@ NUNIT_LIBS = @NUNIT_LIBS@ NUNIT_PATH = @NUNIT_PATH@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SN = @SN@ STRIP = @STRIP@ VERSION = @VERSION@ WINDOWSBASE_LIBS = @WINDOWSBASE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_bindir = @expanded_bindir@ expanded_datadir = @expanded_datadir@ expanded_libdir = @expanded_libdir@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = $(build_sources) $(build_resx_files) \ $(build_others_files) $(ASSEMBLY_WRAPPER_IN) $(EXTRAS) \ $(DATA_FILES) $(build_culture_res_files) @ENABLE_DEBUG_TRUE@ASSEMBLY_COMPILER_COMMAND = gmcs @ENABLE_RELEASE_TRUE@ASSEMBLY_COMPILER_COMMAND = gmcs @ENABLE_DEBUG_TRUE@ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+ -debug "-define:DEBUG" @ENABLE_RELEASE_TRUE@ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+ -keyfile:$(top_srcdir)/mono-uia.snk @ENABLE_DEBUG_TRUE@ASSEMBLY = bin/Debug/GtkForm.exe @ENABLE_RELEASE_TRUE@ASSEMBLY = bin/Release/GtkForm.exe @ENABLE_DEBUG_TRUE@ASSEMBLY_MDB = $(ASSEMBLY).mdb @ENABLE_RELEASE_TRUE@ASSEMBLY_MDB = @ENABLE_DEBUG_TRUE@COMPILE_TARGET = exe @ENABLE_RELEASE_TRUE@COMPILE_TARGET = exe @ENABLE_DEBUG_TRUE@PROJECT_REFERENCES = @ENABLE_RELEASE_TRUE@PROJECT_REFERENCES = @ENABLE_DEBUG_TRUE@BUILD_DIR = bin/Debug @ENABLE_RELEASE_TRUE@BUILD_DIR = bin/Release @ENABLE_DEBUG_TRUE@GTKFORM_EXE_MDB_SOURCE = bin/Debug/GtkForm.exe.mdb @ENABLE_DEBUG_TRUE@GTKFORM_EXE_MDB = $(BUILD_DIR)/GtkForm.exe.mdb @ENABLE_RELEASE_TRUE@GTKFORM_EXE_MDB = AL = al2 SATELLITE_ASSEMBLY_NAME = .resources.dll PROGRAMFILES = \ $(GTKFORM_EXE_MDB) RESGEN = resgen2 FILES = \ GtkForm.cs DATA_FILES = RESOURCES = EXTRAS = REFERENCES = \ System \ Mono.Posix \ System.Core \ $(GTK_SHARP_20_LIBS) DLL_REFERENCES = CLEANFILES = $(PROGRAMFILES) $(ASSEMBLY) $(ASSEMBLY).mdb $(BINARIES) \ $(build_resx_resources) $(build_satellite_assembly_list) VALID_CULTURES = ar bg ca zh-CHS cs da de el en es fi fr he hu is it ja ko nl no pl pt ro ru hr sk sq sv th tr id uk be sl et lv lt fa vi hy eu mk af fo hi sw gu ta te kn mr gl kok ar-SA bg-BG ca-ES zh-TW cs-CZ da-DK de-DE el-GR en-US fi-FI fr-FR he-IL hu-HU is-IS it-IT ja-JP ko-KR nl-NL nb-NO pl-PL pt-BR ro-RO ru-RU hr-HR sk-SK sq-AL sv-SE th-TH tr-TR id-ID uk-UA be-BY sl-SI et-EE lv-LV lt-LT fa-IR vi-VN hy-AM eu-ES mk-MK af-ZA fo-FO hi-IN sw-KE gu-IN ta-IN te-IN kn-IN mr-IN gl-ES kok-IN ar-IQ zh-CN de-CH en-GB es-MX fr-BE it-CH nl-BE nn-NO pt-PT sv-FI ar-EG zh-HK de-AT en-AU es-ES fr-CA ar-LY zh-SG de-LU en-CA es-GT fr-CH ar-DZ zh-MO en-NZ es-CR fr-LU ar-MA en-IE es-PA ar-TN en-ZA es-DO ar-OM es-VE ar-YE es-CO ar-SY es-PE ar-JO es-AR ar-LB en-ZW es-EC ar-KW en-PH es-CL ar-AE es-UY ar-BH es-PY ar-QA es-BO es-SV es-HN es-NI es-PR zh-CHT s2q = $(subst \ ,?,$1) q2s = $(subst ?,\ ,$1) # use this when result will be quoted unesc2 = $(subst ?, ,$1) build_sources = $(FILES) $(GENERATED_FILES) build_sources_esc = $(call s2q,$(build_sources)) # use unesc2, as build_sources_embed is quoted build_sources_embed = $(call unesc2,$(build_sources_esc:%='$(srcdir)/%')) comma__ = , get_resource_name = $(firstword $(subst $(comma__), ,$1)) get_culture = $(lastword $(subst ., ,$(basename $1))) is_cultured_resource = $(and $(word 3,$(subst ., ,$1)), $(filter $(VALID_CULTURES),$(lastword $(subst ., ,$(basename $1))))) RESOURCES_ESC = $(call s2q,$(RESOURCES)) build_resx_list = $(foreach res, $(RESOURCES_ESC), $(if $(filter %.resx, $(call get_resource_name,$(res))),$(res),)) build_non_culture_resx_list = $(foreach res, $(build_resx_list),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) build_non_culture_others_list = $(foreach res, $(filter-out $(build_resx_list),$(RESOURCES_ESC)),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) build_others_list = $(build_non_culture_others_list) build_xamlg_list = $(filter %.xaml.g.cs, $(FILES)) # resgen all .resx resources build_resx_files = $(foreach res, $(build_resx_list), $(call get_resource_name,$(res))) build_resx_resources_esc = $(build_resx_files:.resx=.resources) build_resx_resources = $(call q2s,$(build_resx_resources_esc)) # embed resources for the main assembly build_resx_resources_hack = $(subst .resx,.resources, $(build_non_culture_resx_list)) # use unesc2, as build_resx_resources_embed is quoted build_resx_resources_embed = $(call unesc2,$(build_resx_resources_hack:%='-resource:%')) build_others_files = $(call q2s,$(foreach res, $(build_others_list),$(call get_resource_name,$(res)))) build_others_resources = $(build_others_files) # use unesc2, as build_others_resources_embed is quoted build_others_resources_embed = $(call unesc2,$(build_others_list:%='-resource:$(srcdir)/%')) build_resources = $(build_resx_resources) $(build_others_resources) build_resources_embed = $(build_resx_resources_embed) $(build_others_resources_embed) # -usesourcepath is available only for resgen2 emit_resgen_target_1 = $(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); cd '$$(shell dirname '$$<')' && $$(RESGEN) '$$(shell basename '$$<')' '$$(shell basename '$$@')' emit_resgen_target_2 = $(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); $$(RESGEN) -usesourcepath '$$<' '$$@' emit_resgen_target = $(if $(filter resgen2,$(RESGEN)),$(emit_resgen_target_2),$(emit_resgen_target_1)) emit_resgen_targets = $(foreach res,$(build_resx_resources_esc),$(eval $(call emit_resgen_target,$(res)))) build_references_ref = $(call q2s,$(foreach ref, $(call \ s2q,$(REFERENCES)), $(if $(filter -pkg:%, $(ref)), $(ref), \ $(if $(filter -r:%, $(ref)), $(ref), -r:$(ref))))) $(call \ q2s,$(foreach ref, $(call s2q,$(DLL_REFERENCES)), -r:$(ref))) \ $(call q2s,$(foreach ref, $(call s2q,$(PROJECT_REFERENCES)), \ -r:$(ref))) s2q2s = $(call unesc2,$(call s2q,$1)) cp_actual = test -z $1 || cp $1 $2 cp = $(call cp_actual,'$(call s2q2s,$1)','$(call s2q2s,$2)') rm_actual = test -z '$1' || rm -f '$2' rm = $(call rm_actual,$(call s2q2s,$1),$(call s2q2s,$2)/$(shell basename '$(call s2q2s,$1)')) DISTCLEANFILES = $(GENERATED_FILES) $(pc_files) $(BUILD_DIR)/* #pkglib_SCRIPTS = $(ASSEMBLY) bin_SCRIPTS = $(BINARIES) #programfilesdir = @libdir@/@PACKAGE@ #programfiles_DATA = $(PROGRAMFILES) linuxpkgconfigdir = @libdir@/pkgconfig linuxpkgconfig_DATA = $(LINUX_PKGCONFIG) # generating satellite assemblies culture_resources = $(foreach res, $(RESOURCES_ESC), $(if $(call is_cultured_resource,$(call get_resource_name, $(res))),$(res))) cultures = $(sort $(foreach res, $(culture_resources), $(call get_culture,$(call get_resource_name,$(res))))) culture_resource_dependencies = $(call q2s,$(BUILD_DIR)/$1/$(SATELLITE_ASSEMBLY_NAME): $(subst .resx,.resources,$2)) culture_resource_commandlines = $(call unesc2,cmd_line_satellite_$1 += '/embed:$(subst .resx,.resources,$2)') build_satellite_assembly_list = $(call q2s,$(cultures:%=$(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME))) build_culture_res_files = $(call q2s,$(foreach res, $(culture_resources),$(call get_resource_name,$(res)))) GACROOT = $(DESTDIR)$(prefix)/lib all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.include $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign UIAutomationClientTests/GtkForm/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign UIAutomationClientTests/GtkForm/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files install-linuxpkgconfigDATA: $(linuxpkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(linuxpkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(linuxpkgconfigdir)" @list='$(linuxpkgconfig_DATA)'; test -n "$(linuxpkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(linuxpkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(linuxpkgconfigdir)" || exit $$?; \ done uninstall-linuxpkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(linuxpkgconfig_DATA)'; test -n "$(linuxpkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(linuxpkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(linuxpkgconfigdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) $(DATA) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(linuxpkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-linuxpkgconfigDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-linuxpkgconfigDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-binSCRIPTS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-linuxpkgconfigDATA install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-binSCRIPTS uninstall-linuxpkgconfigDATA all: $(ASSEMBLY) $(PROGRAMFILES) # macros # $(call emit-deploy-target,deploy-variable-name) define emit-deploy-target $($1): $($1_SOURCE) mkdir -p '$$(shell dirname '$$@')' cp '$$<' '$$@' endef # $(call emit-deploy-wrapper,wrapper-variable-name,wrapper-sourcefile,x) # assumes that for a wrapper foo.pc its source template is foo.pc.in # if $3 is non-empty then wrapper is marked exec define emit-deploy-wrapper $($1): $2 mkdir -p '$$(shell dirname '$$@')' cp '$$<' '$$@' $(if $3,chmod +x '$$@') endef $(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_dependencies,$(call get_culture,$(call get_resource_name,$(res))),$(call get_resource_name,$(res)))))) $(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_commandlines,$(call get_culture,$(call get_resource_name,$(res))),$(res))))) $(build_satellite_assembly_list): $(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME): mkdir -p '$(@D)' $(AL) -out:'$@' -culture:$* -t:lib $(cmd_line_satellite_$*) gac-install: $(POLICY_ASSEMBLIES) $(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS) /root $(GACROOT) $(PACKAGE_FLAG) || exit 1; gac-uninstall: $(GACUTIL) /us $(ASSEMBLY) $(GACUTIL_FLAGS) /root $(GACROOT) $(PACKAGE_FLAG) || exit 1; $(eval $(call emit_resgen_targets)) $(build_xamlg_list): %.xaml.g.cs: %.xaml xamlg '$<' $(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list) mkdir -p $(shell dirname $(ASSEMBLY)) $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: mono-uia-2.1/UIAutomationClientTests/AtspiUiaClientTests/0000777000016200001670000000000011433571554024434 5ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationClientTests/AtspiUiaClientTests/TableTest.cs0000644000016200001670000000320711433571545026650 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; //using System.Windows; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace AtspiUiaClientTests { [TestFixture] public class AtspiTableTest : TableTest { public override bool Atspi { get { return true; } } } } mono-uia-2.1/UIAutomationClientTests/AtspiUiaClientTests/Makefile.am0000644000016200001670000001214511433571545026467 0ustar00hudsonhudson00000000000000 EXTRA_DIST = ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" ASSEMBLY = bin/Debug/AtspiUiaClientTests.dll ASSEMBLY_MDB = $(ASSEMBLY).mdb COMPILE_TARGET = library BUILD_DIR = bin/Debug GTKFORM_EXE = $(BUILD_DIR)/GtkForm.exe GTKFORM_EXE_SOURCE=../GtkForm/bin/Debug/GtkForm.exe GTKFORM_EXE_MDB_SOURCE=$(GTKFORM_EXE_SOURCE).mdb GTKFORM_EXE_MDB=$(GTKFORM_EXE).mdb if HAS_MONO_2_5 else WINDOWSBASE_DLL = $(BUILD_DIR)/WindowsBase.dll WINDOWSBASE_DLL_SOURCE=$(top_builddir)/bin/WindowsBase.dll WINDOWSBASE_DLL_MDB_SOURCE=$(WINDOWSBASE_DLL_SOURCE).mdb WINDOWSBASE_DLL_MDB=$(WINDOWSBASE_DLL).mdb endif UIAUTOMATIONTYPES_DLL = $(BUILD_DIR)/UIAutomationTypes.dll UIAUTOMATIONTYPES_DLL_SOURCE=$(top_builddir)/bin/UIAutomationTypes.dll UIAUTOMATIONTYPES_DLL_MDB_SOURCE=$(UIAUTOMATIONTYPES_DLL_SOURCE).mdb UIAUTOMATIONTYPES_DLL_MDB=$(UIAUTOMATIONTYPES_DLL).mdb UIAUTOMATIONCLIENT_DLL = $(BUILD_DIR)/UIAutomationClient.dll UIAUTOMATIONCLIENT_DLL_SOURCE=$(top_builddir)/bin/UIAutomationClient.dll UIAUTOMATIONCLIENT_DLL_MDB_SOURCE=$(UIAUTOMATIONCLIENT_DLL_SOURCE).mdb UIAUTOMATIONCLIENT_DLL_MDB=$(UIAUTOMATIONCLIENT_DLL).mdb #Needed by UIAutomationClient.dll UIAUTOMATIONSOURCE_DLL = $(BUILD_DIR)/UIAutomationSource.dll UIAUTOMATIONSOURCE_DLL_SOURCE=$(top_builddir)/bin/UIAutomationSource.dll UIAUTOMATIONSOURCE_DLL_MDB_SOURCE=$(UIAUTOMATIONSOURCE_DLL_SOURCE).mdb UIAUTOMATIONSOURCE_DLL_MDB=$(UIAUTOMATIONSOURCE_DLL).mdb #Needed by UIAutomationClient.dll UIAUTOMATIONPROVIDER_DLL = $(BUILD_DIR)/UIAutomationProvider.dll UIAUTOMATIONPROVIDER_DLL_SOURCE=$(top_builddir)/bin/UIAutomationProvider.dll UIAUTOMATIONPROVIDER_DLL_MDB_SOURCE=$(UIAUTOMATIONPROVIDER_DLL_SOURCE).mdb UIAUTOMATIONPROVIDER_DLL_MDB=$(UIAUTOMATIONPROVIDER_DLL).mdb UIAUTOMATIONCLIENTTESTS_DLL = $(BUILD_DIR)/UIAutomationClientTests.dll UIAUTOMATIONCLIENTTESTS_DLL_SOURCE=../UIAutomationClientTests/bin/Debug/UIAutomationClientTests.dll UIAUTOMATIONCLIENTTESTS_DLL_MDB_SOURCE=$(UIAUTOMATIONCLIENTTESTS_DLL_SOURCE).mdb UIAUTOMATIONCLIENTTESTS_DLL_MDB=$(UIAUTOMATIONCLIENTTESTS_DLL).mdb UIAUTOMATIONBRIDGE_DLL = $(BUILD_DIR)/UIAutomationBridge.dll UIAUTOMATIONBRIDGE_DLL_SOURCE=$(top_builddir)/bin/UIAutomationBridge.dll UIAUTOMATIONBRIDGE_DLL_MDB_SOURCE=$(UIAUTOMATIONBRIDGE_DLL_SOURCE).mdb UIAUTOMATIONBRIDGE_DLL_MDB=$(UIAUTOMATIONBRIDGE_DLL).mdb AL=al2 PROGRAMFILES = \ $(GTKFORM_EXE) \ $(GTKFORM_EXE_MDB) \ $(WINDOWSBASE_DLL) \ $(WINDOWSBASE_DLL_MDB) \ $(UIAUTOMATIONTYPES_DLL) \ $(UIAUTOMATIONTYPES_DLL_MDB) \ $(UIAUTOMATIONCLIENT_DLL) \ $(UIAUTOMATIONCLIENT_DLL_MDB) \ $(UIAUTOMATIONSOURCE_DLL) \ $(UIAUTOMATIONSOURCE_DLL_MDB) \ $(UIAUTOMATIONPROVIDER_DLL) \ $(UIAUTOMATIONPROVIDER_DLL_MDB) \ $(UIAUTOMATIONBRIDGE_DLL) \ $(UIAUTOMATIONBRIDGE_DLL_MDB) \ $(UIAUTOMATIONCLIENTTESTS_DLL) \ $(UIAUTOMATIONCLIENTTESTS_DLL_MDB) RESGEN=resgen2 all: $(ASSEMBLY) $(PROGRAMFILES) FILES = \ AutomationElementTest.cs \ AutomationEventTest.cs \ DialogTest.cs \ ExpandCollapsePatternTest.cs \ FocusTest.cs \ InvokePatternTest.cs \ MenuTest.cs \ RangeValuePatternTest.cs \ SelectionPatternTest.cs \ TableTest.cs \ TableHierarchyTest.cs \ TextPatternTest.cs \ TogglePatternTest.cs \ ValuePatternTest.cs DATA_FILES = RESOURCES = EXTRAS = PROJECT_REFERENCES = \ $(WINDOWSBASE_DLL) \ $(UIAUTOMATIONTYPES_DLL) \ $(UIAUTOMATIONCLIENT_DLL) \ $(UIAUTOMATIONSOURCE_DLL) \ $(UIAUTOMATIONPROVIDER_DLL) \ $(UIAUTOMATIONBRIDGE_DLL) \ $(UIAUTOMATIONCLIENTTESTS_DLL) REFERENCES = \ System \ System.Data \ Mono.Posix \ $(WINDOWSBASE_LIBS) \ $(NUNIT_LIBS) CLEANFILES = $(PROGRAMFILES) \ bin/Debug/TestResult.xml include $(top_srcdir)/Makefile.include $(eval $(call emit-deploy-target,GTKFORM_EXE)) $(eval $(call emit-deploy-target,GTKFORM_EXE_MDB)) if HAS_MONO_2_5 else $(eval $(call emit-deploy-target,WINDOWSBASE_DLL)) $(eval $(call emit-deploy-target,WINDOWSBASE_DLL_MDB)) endif $(eval $(call emit-deploy-target,UIAUTOMATIONTYPES_DLL)) $(eval $(call emit-deploy-target,UIAUTOMATIONTYPES_DLL_MDB)) $(eval $(call emit-deploy-target,UIAUTOMATIONCLIENT_DLL)) $(eval $(call emit-deploy-target,UIAUTOMATIONCLIENT_DLL_MDB)) $(eval $(call emit-deploy-target,UIAUTOMATIONSOURCE_DLL)) $(eval $(call emit-deploy-target,UIAUTOMATIONSOURCE_DLL_MDB)) $(eval $(call emit-deploy-target,UIAUTOMATIONPROVIDER_DLL)) $(eval $(call emit-deploy-target,UIAUTOMATIONPROVIDER_DLL_MDB)) $(eval $(call emit-deploy-target,UIAUTOMATIONBRIDGE_DLL)) $(eval $(call emit-deploy-target,UIAUTOMATIONBRIDGE_DLL_MDB)) $(eval $(call emit-deploy-target,UIAUTOMATIONCLIENTTESTS_DLL)) $(eval $(call emit-deploy-target,UIAUTOMATIONCLIENTTESTS_DLL_MDB)) $(eval $(call emit_resgen_targets)) $(build_xamlg_list): %.xaml.g.cs: %.xaml xamlg '$<' $(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list) @mkdir -p $(shell dirname $(ASSEMBLY)) $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) @chmod +x atspiuiaclienttest.sh mono-uia-2.1/UIAutomationClientTests/AtspiUiaClientTests/RangeValuePatternTest.cs0000644000016200001670000000323711433571545031213 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; //using System.Windows; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace AtspiUiaClientTests { [TestFixture] public class AtspiRangeValuePatternTest : RangeValuePatternTest { public override bool Atspi { get { return true; } } } } mono-uia-2.1/UIAutomationClientTests/AtspiUiaClientTests/TableHierarchyTest.cs0000644000016200001670000000444211433571545030511 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; //using System.Windows; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace AtspiUiaClientTests { [TestFixture] public class AtspiTableHierarchyTest : TableHierarchyTest { [Test] public void DataItemPatternTest () { AutomationElement treeView2Element = groupBoxElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "treeView2")); AutomationElement dataItemElement = treeView2Element.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.ControlTypeProperty, ControlType.DataItem)); Assert.IsNotNull (dataItemElement, "DataItem not found"); VerifyPatterns (dataItemElement, ExpandCollapsePatternIdentifiers.Pattern, GridPatternIdentifiers.Pattern, SelectionPatternIdentifiers.Pattern, TablePatternIdentifiers.Pattern); } public override bool Atspi { get { return true; } } } } mono-uia-2.1/UIAutomationClientTests/AtspiUiaClientTests/TextPatternTest.cs0000644000016200001670000000322311433571545030101 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; //using System.Windows; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace AtspiUiaClientTests { [TestFixture] public class AtspiTextPatternTest : TextPatternTest { public override bool Atspi { get { return true; } } } } mono-uia-2.1/UIAutomationClientTests/AtspiUiaClientTests/DialogTest.cs0000644000016200001670000000600411433571545027016 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.Windows; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace AtspiUiaClientTests { [TestFixture] public class AtspiDialogTest : BaseTest { #region Test Methods [Test] public void Bug590768 () { RunCommand ("open FileChooser"); AutomationElement chooser; chooser = AutomationElement.RootElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "FileChooser")); Assert.IsNull (chooser, "Chooser should not be child of RootElement"); chooser = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "FileChooser")); Assert.IsNotNull (chooser, "FileChooser should be child of form"); Assert.AreEqual (chooser, TreeWalker.RawViewWalker.GetLastChild (testFormElement), "Chooser should be last TestForm child"); AutomationElement prev = TreeWalker.RawViewWalker.GetPreviousSibling (chooser); Assert.IsNotNull (prev, "Chooser PreviousSibling"); Assert.AreEqual (chooser, TreeWalker.RawViewWalker.GetNextSibling (prev), "chooser GetPrev -> getNext"); Assert.IsNull (TreeWalker.RawViewWalker.GetNextSibling (chooser), "Chooser GetNext"); Assert.AreEqual (testFormElement, TreeWalker.RawViewWalker.GetParent (chooser), "chooser parent"); RunCommand ("close FileChooser"); chooser = testFormElement.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "FileChooser")); Assert.IsNull (chooser, "FileChooser should go away when closed"); } #endregion public override bool Atspi { get { return true; } } } } mono-uia-2.1/UIAutomationClientTests/AtspiUiaClientTests/MenuTest.cs0000644000016200001670000000446611433571545026535 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; //using System.Windows; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace AtspiUiaClientTests { [TestFixture] public class AtspiMenuTest : MenuTest { [Test] public void CheckMenuItemTest () { AutomationElement file = TreeWalker.RawViewWalker.GetFirstChild (horizontalMenuStripElement); Assert.IsNotNull (file, "File"); Assert.AreEqual ("File", file.Current.Name, "File name"); AutomationElement check = file.FindFirst (TreeScope.Children, new PropertyCondition (AEIds.NameProperty, "Check")); Assert.IsNotNull (check, "Check MenuItem found"); Assert.AreEqual ("ControlType.MenuItem", check.Current.ControlType.ProgrammaticName, "ControlType"); VerifyPatterns (check, InvokePatternIdentifiers.Pattern, SelectionItemPatternIdentifiers.Pattern, TogglePatternIdentifiers.Pattern); } public override bool Atspi { get { return true; } } } } mono-uia-2.1/UIAutomationClientTests/AtspiUiaClientTests/AutomationEventTest.cs0000644000016200001670000000323311433571545030742 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; //using System.Windows; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace AtspiUiaClientTests { [TestFixture] public class AtspiAutomationEventTest : AutomationEventTest { public override bool Atspi { get { return true; } } } } mono-uia-2.1/UIAutomationClientTests/AtspiUiaClientTests/ValuePatternTest.cs0000644000016200001670000000322511433571545030233 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; //using System.Windows; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace AtspiUiaClientTests { [TestFixture] public class AtspiValuePatternTest : ValuePatternTest { public override bool Atspi { get { return true; } } } } mono-uia-2.1/UIAutomationClientTests/AtspiUiaClientTests/atspiuiaclienttest.sh.in0000644000016200001670000000243711433571545031315 0ustar00hudsonhudson00000000000000#!/bin/bash DLL=AtspiUiaClientTests.dll TEST_DISPLAY=:99 NUNIT_FLAGS="-nothread -noshadow" while getopts f:xd:t:l o do case "$o" in x) xephyr="yes";; d) optdisplay="$OPTARG" && xephyr="yes";; f) fixture="$OPTARG";; t) runtest="$OPTARG" && test "x$fixture" != "x";; l) labels="yes";; \?) echo "Usage: $0 -x -l -d -f -t " && exit 1;; esac done if [ "x$optdisplay" != "x" ]; then TEST_DISPLAY=:$optdisplay fi # Reset $@ shift `echo $OPTIND-1 | bc` NUNIT_ARGS=$* if [ "x$fixture" != "x" ]; then echo "Running only the unit tests for fixture $fixture..." echo NUNIT_ARGS="--fixture=AtspiUiaClientTests.Atspi${fixture}" fi if [ "x$runtest" != "x" ]; then echo "Running only the unit test $runtest from $fixture" echo NUNIT_ARGS="${NUNIT_ARGS} --run=AtspiUiaClientTests.Atspi${fixture}.${runtest}" fi if [ "x$xephyr" == "xyes" ]; then Xephyr -ac -screen 800x600 -br -reset -terminate $TEST_DISPLAY & xephyr_pid=$! export DISPLAY=$TEST_DISPLAY gnome-session & metacity & metacity_pid=$! fi if [ "x$labels" == "xyes" ]; then NUNIT_FLAGS="${NUNIT_FLAGS} -labels" fi (cd bin/Debug; \ @MONO@ --debug @NUNIT_PATH@/nunit-console.exe ${NUNIT_FLAGS} ${DLL} ${NUNIT_ARGS}) if [ "x$xephyr" == "xyes" ]; then kill $metacity_pid $xephyr_pid fi mono-uia-2.1/UIAutomationClientTests/AtspiUiaClientTests/InvokePatternTest.cs0000644000016200001670000000322711433571545030414 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; //using System.Windows; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace AtspiUiaClientTests { [TestFixture] public class AtspiInvokePatternTest : InvokePatternTest { public override bool Atspi { get { return true; } } } } mono-uia-2.1/UIAutomationClientTests/AtspiUiaClientTests/SelectionPatternTest.cs0000644000016200001670000000323511433571545031105 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; //using System.Windows; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace AtspiUiaClientTests { [TestFixture] public class AtspiSelectionPatternTest : SelectionPatternTest { public override bool Atspi { get { return true; } } } } mono-uia-2.1/UIAutomationClientTests/AtspiUiaClientTests/ExpandCollapsePatternTest.cs0000644000016200001670000000324711433571545032065 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; //using System.Windows; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace AtspiUiaClientTests { [TestFixture] public class AtspiExpandCollapsePatternTest : ExpandCollapsePatternTest { public override bool Atspi { get { return true; } } } } mono-uia-2.1/UIAutomationClientTests/AtspiUiaClientTests/AutomationElementTest.cs0000644000016200001670000000323711433571545031256 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; //using System.Windows; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace AtspiUiaClientTests { [TestFixture] public class AtspiAutomationElementTest : AutomationElementTest { public override bool Atspi { get { return true; } } } } mono-uia-2.1/UIAutomationClientTests/AtspiUiaClientTests/FocusTest.cs0000644000016200001670000000320711433571545026700 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; //using System.Windows; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace AtspiUiaClientTests { [TestFixture] public class AtspiFocusTest : FocusTest { public override bool Atspi { get { return true; } } } } mono-uia-2.1/UIAutomationClientTests/AtspiUiaClientTests/TogglePatternTest.cs0000644000016200001670000000322711433571545030402 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; //using System.Windows; using System.Windows.Automation; using AEIds = System.Windows.Automation.AutomationElementIdentifiers; using NUnit.Framework; using MonoTests.System.Windows.Automation; namespace AtspiUiaClientTests { [TestFixture] public class AtspiTogglePatternTest : TogglePatternTest { public override bool Atspi { get { return true; } } } } mono-uia-2.1/UIAutomationClientTests/AtspiUiaClientTests/Makefile.in0000644000016200001670000006054011433571550026476 0ustar00hudsonhudson00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/atspiuiaclienttest.sh.in \ $(top_srcdir)/Makefile.include subdir = UIAutomationClientTests/AtspiUiaClientTests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = atspiuiaclienttest.sh CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(linuxpkgconfigdir)" SCRIPTS = $(bin_SCRIPTS) SOURCES = DIST_SOURCES = DATA = $(linuxpkgconfig_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ GACUTIL = @GACUTIL@ GLIB_SHARP_20_CFLAGS = @GLIB_SHARP_20_CFLAGS@ GLIB_SHARP_20_LIBS = @GLIB_SHARP_20_LIBS@ GMCS = @GMCS@ GTK_SHARP_20_CFLAGS = @GTK_SHARP_20_CFLAGS@ GTK_SHARP_20_LIBS = @GTK_SHARP_20_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MONO = @MONO@ MONO_CFLAGS = @MONO_CFLAGS@ MONO_LIBS = @MONO_LIBS@ NUNIT_CFLAGS = @NUNIT_CFLAGS@ NUNIT_LIBS = @NUNIT_LIBS@ NUNIT_PATH = @NUNIT_PATH@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SN = @SN@ STRIP = @STRIP@ VERSION = @VERSION@ WINDOWSBASE_LIBS = @WINDOWSBASE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_bindir = @expanded_bindir@ expanded_datadir = @expanded_datadir@ expanded_libdir = @expanded_libdir@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = $(build_sources) $(build_resx_files) \ $(build_others_files) $(ASSEMBLY_WRAPPER_IN) $(EXTRAS) \ $(DATA_FILES) $(build_culture_res_files) ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" ASSEMBLY = bin/Debug/AtspiUiaClientTests.dll ASSEMBLY_MDB = $(ASSEMBLY).mdb COMPILE_TARGET = library BUILD_DIR = bin/Debug GTKFORM_EXE = $(BUILD_DIR)/GtkForm.exe GTKFORM_EXE_SOURCE = ../GtkForm/bin/Debug/GtkForm.exe GTKFORM_EXE_MDB_SOURCE = $(GTKFORM_EXE_SOURCE).mdb GTKFORM_EXE_MDB = $(GTKFORM_EXE).mdb @HAS_MONO_2_5_FALSE@WINDOWSBASE_DLL = $(BUILD_DIR)/WindowsBase.dll @HAS_MONO_2_5_FALSE@WINDOWSBASE_DLL_SOURCE = $(top_builddir)/bin/WindowsBase.dll @HAS_MONO_2_5_FALSE@WINDOWSBASE_DLL_MDB_SOURCE = $(WINDOWSBASE_DLL_SOURCE).mdb @HAS_MONO_2_5_FALSE@WINDOWSBASE_DLL_MDB = $(WINDOWSBASE_DLL).mdb UIAUTOMATIONTYPES_DLL = $(BUILD_DIR)/UIAutomationTypes.dll UIAUTOMATIONTYPES_DLL_SOURCE = $(top_builddir)/bin/UIAutomationTypes.dll UIAUTOMATIONTYPES_DLL_MDB_SOURCE = $(UIAUTOMATIONTYPES_DLL_SOURCE).mdb UIAUTOMATIONTYPES_DLL_MDB = $(UIAUTOMATIONTYPES_DLL).mdb UIAUTOMATIONCLIENT_DLL = $(BUILD_DIR)/UIAutomationClient.dll UIAUTOMATIONCLIENT_DLL_SOURCE = $(top_builddir)/bin/UIAutomationClient.dll UIAUTOMATIONCLIENT_DLL_MDB_SOURCE = $(UIAUTOMATIONCLIENT_DLL_SOURCE).mdb UIAUTOMATIONCLIENT_DLL_MDB = $(UIAUTOMATIONCLIENT_DLL).mdb #Needed by UIAutomationClient.dll UIAUTOMATIONSOURCE_DLL = $(BUILD_DIR)/UIAutomationSource.dll UIAUTOMATIONSOURCE_DLL_SOURCE = $(top_builddir)/bin/UIAutomationSource.dll UIAUTOMATIONSOURCE_DLL_MDB_SOURCE = $(UIAUTOMATIONSOURCE_DLL_SOURCE).mdb UIAUTOMATIONSOURCE_DLL_MDB = $(UIAUTOMATIONSOURCE_DLL).mdb #Needed by UIAutomationClient.dll UIAUTOMATIONPROVIDER_DLL = $(BUILD_DIR)/UIAutomationProvider.dll UIAUTOMATIONPROVIDER_DLL_SOURCE = $(top_builddir)/bin/UIAutomationProvider.dll UIAUTOMATIONPROVIDER_DLL_MDB_SOURCE = $(UIAUTOMATIONPROVIDER_DLL_SOURCE).mdb UIAUTOMATIONPROVIDER_DLL_MDB = $(UIAUTOMATIONPROVIDER_DLL).mdb UIAUTOMATIONCLIENTTESTS_DLL = $(BUILD_DIR)/UIAutomationClientTests.dll UIAUTOMATIONCLIENTTESTS_DLL_SOURCE = ../UIAutomationClientTests/bin/Debug/UIAutomationClientTests.dll UIAUTOMATIONCLIENTTESTS_DLL_MDB_SOURCE = $(UIAUTOMATIONCLIENTTESTS_DLL_SOURCE).mdb UIAUTOMATIONCLIENTTESTS_DLL_MDB = $(UIAUTOMATIONCLIENTTESTS_DLL).mdb UIAUTOMATIONBRIDGE_DLL = $(BUILD_DIR)/UIAutomationBridge.dll UIAUTOMATIONBRIDGE_DLL_SOURCE = $(top_builddir)/bin/UIAutomationBridge.dll UIAUTOMATIONBRIDGE_DLL_MDB_SOURCE = $(UIAUTOMATIONBRIDGE_DLL_SOURCE).mdb UIAUTOMATIONBRIDGE_DLL_MDB = $(UIAUTOMATIONBRIDGE_DLL).mdb AL = al2 PROGRAMFILES = \ $(GTKFORM_EXE) \ $(GTKFORM_EXE_MDB) \ $(WINDOWSBASE_DLL) \ $(WINDOWSBASE_DLL_MDB) \ $(UIAUTOMATIONTYPES_DLL) \ $(UIAUTOMATIONTYPES_DLL_MDB) \ $(UIAUTOMATIONCLIENT_DLL) \ $(UIAUTOMATIONCLIENT_DLL_MDB) \ $(UIAUTOMATIONSOURCE_DLL) \ $(UIAUTOMATIONSOURCE_DLL_MDB) \ $(UIAUTOMATIONPROVIDER_DLL) \ $(UIAUTOMATIONPROVIDER_DLL_MDB) \ $(UIAUTOMATIONBRIDGE_DLL) \ $(UIAUTOMATIONBRIDGE_DLL_MDB) \ $(UIAUTOMATIONCLIENTTESTS_DLL) \ $(UIAUTOMATIONCLIENTTESTS_DLL_MDB) RESGEN = resgen2 FILES = \ AutomationElementTest.cs \ AutomationEventTest.cs \ DialogTest.cs \ ExpandCollapsePatternTest.cs \ FocusTest.cs \ InvokePatternTest.cs \ MenuTest.cs \ RangeValuePatternTest.cs \ SelectionPatternTest.cs \ TableTest.cs \ TableHierarchyTest.cs \ TextPatternTest.cs \ TogglePatternTest.cs \ ValuePatternTest.cs DATA_FILES = RESOURCES = EXTRAS = PROJECT_REFERENCES = \ $(WINDOWSBASE_DLL) \ $(UIAUTOMATIONTYPES_DLL) \ $(UIAUTOMATIONCLIENT_DLL) \ $(UIAUTOMATIONSOURCE_DLL) \ $(UIAUTOMATIONPROVIDER_DLL) \ $(UIAUTOMATIONBRIDGE_DLL) \ $(UIAUTOMATIONCLIENTTESTS_DLL) REFERENCES = \ System \ System.Data \ Mono.Posix \ $(WINDOWSBASE_LIBS) \ $(NUNIT_LIBS) CLEANFILES = $(PROGRAMFILES) bin/Debug/TestResult.xml $(ASSEMBLY) \ $(ASSEMBLY).mdb $(BINARIES) $(build_resx_resources) \ $(build_satellite_assembly_list) VALID_CULTURES = ar bg ca zh-CHS cs da de el en es fi fr he hu is it ja ko nl no pl pt ro ru hr sk sq sv th tr id uk be sl et lv lt fa vi hy eu mk af fo hi sw gu ta te kn mr gl kok ar-SA bg-BG ca-ES zh-TW cs-CZ da-DK de-DE el-GR en-US fi-FI fr-FR he-IL hu-HU is-IS it-IT ja-JP ko-KR nl-NL nb-NO pl-PL pt-BR ro-RO ru-RU hr-HR sk-SK sq-AL sv-SE th-TH tr-TR id-ID uk-UA be-BY sl-SI et-EE lv-LV lt-LT fa-IR vi-VN hy-AM eu-ES mk-MK af-ZA fo-FO hi-IN sw-KE gu-IN ta-IN te-IN kn-IN mr-IN gl-ES kok-IN ar-IQ zh-CN de-CH en-GB es-MX fr-BE it-CH nl-BE nn-NO pt-PT sv-FI ar-EG zh-HK de-AT en-AU es-ES fr-CA ar-LY zh-SG de-LU en-CA es-GT fr-CH ar-DZ zh-MO en-NZ es-CR fr-LU ar-MA en-IE es-PA ar-TN en-ZA es-DO ar-OM es-VE ar-YE es-CO ar-SY es-PE ar-JO es-AR ar-LB en-ZW es-EC ar-KW en-PH es-CL ar-AE es-UY ar-BH es-PY ar-QA es-BO es-SV es-HN es-NI es-PR zh-CHT s2q = $(subst \ ,?,$1) q2s = $(subst ?,\ ,$1) # use this when result will be quoted unesc2 = $(subst ?, ,$1) build_sources = $(FILES) $(GENERATED_FILES) build_sources_esc = $(call s2q,$(build_sources)) # use unesc2, as build_sources_embed is quoted build_sources_embed = $(call unesc2,$(build_sources_esc:%='$(srcdir)/%')) comma__ = , get_resource_name = $(firstword $(subst $(comma__), ,$1)) get_culture = $(lastword $(subst ., ,$(basename $1))) is_cultured_resource = $(and $(word 3,$(subst ., ,$1)), $(filter $(VALID_CULTURES),$(lastword $(subst ., ,$(basename $1))))) RESOURCES_ESC = $(call s2q,$(RESOURCES)) build_resx_list = $(foreach res, $(RESOURCES_ESC), $(if $(filter %.resx, $(call get_resource_name,$(res))),$(res),)) build_non_culture_resx_list = $(foreach res, $(build_resx_list),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) build_non_culture_others_list = $(foreach res, $(filter-out $(build_resx_list),$(RESOURCES_ESC)),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) build_others_list = $(build_non_culture_others_list) build_xamlg_list = $(filter %.xaml.g.cs, $(FILES)) # resgen all .resx resources build_resx_files = $(foreach res, $(build_resx_list), $(call get_resource_name,$(res))) build_resx_resources_esc = $(build_resx_files:.resx=.resources) build_resx_resources = $(call q2s,$(build_resx_resources_esc)) # embed resources for the main assembly build_resx_resources_hack = $(subst .resx,.resources, $(build_non_culture_resx_list)) # use unesc2, as build_resx_resources_embed is quoted build_resx_resources_embed = $(call unesc2,$(build_resx_resources_hack:%='-resource:%')) build_others_files = $(call q2s,$(foreach res, $(build_others_list),$(call get_resource_name,$(res)))) build_others_resources = $(build_others_files) # use unesc2, as build_others_resources_embed is quoted build_others_resources_embed = $(call unesc2,$(build_others_list:%='-resource:$(srcdir)/%')) build_resources = $(build_resx_resources) $(build_others_resources) build_resources_embed = $(build_resx_resources_embed) $(build_others_resources_embed) # -usesourcepath is available only for resgen2 emit_resgen_target_1 = $(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); cd '$$(shell dirname '$$<')' && $$(RESGEN) '$$(shell basename '$$<')' '$$(shell basename '$$@')' emit_resgen_target_2 = $(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); $$(RESGEN) -usesourcepath '$$<' '$$@' emit_resgen_target = $(if $(filter resgen2,$(RESGEN)),$(emit_resgen_target_2),$(emit_resgen_target_1)) emit_resgen_targets = $(foreach res,$(build_resx_resources_esc),$(eval $(call emit_resgen_target,$(res)))) build_references_ref = $(call q2s,$(foreach ref, $(call \ s2q,$(REFERENCES)), $(if $(filter -pkg:%, $(ref)), $(ref), \ $(if $(filter -r:%, $(ref)), $(ref), -r:$(ref))))) $(call \ q2s,$(foreach ref, $(call s2q,$(DLL_REFERENCES)), -r:$(ref))) \ $(call q2s,$(foreach ref, $(call s2q,$(PROJECT_REFERENCES)), \ -r:$(ref))) s2q2s = $(call unesc2,$(call s2q,$1)) cp_actual = test -z $1 || cp $1 $2 cp = $(call cp_actual,'$(call s2q2s,$1)','$(call s2q2s,$2)') rm_actual = test -z '$1' || rm -f '$2' rm = $(call rm_actual,$(call s2q2s,$1),$(call s2q2s,$2)/$(shell basename '$(call s2q2s,$1)')) DISTCLEANFILES = $(GENERATED_FILES) $(pc_files) $(BUILD_DIR)/* #pkglib_SCRIPTS = $(ASSEMBLY) bin_SCRIPTS = $(BINARIES) #programfilesdir = @libdir@/@PACKAGE@ #programfiles_DATA = $(PROGRAMFILES) linuxpkgconfigdir = @libdir@/pkgconfig linuxpkgconfig_DATA = $(LINUX_PKGCONFIG) # generating satellite assemblies culture_resources = $(foreach res, $(RESOURCES_ESC), $(if $(call is_cultured_resource,$(call get_resource_name, $(res))),$(res))) cultures = $(sort $(foreach res, $(culture_resources), $(call get_culture,$(call get_resource_name,$(res))))) culture_resource_dependencies = $(call q2s,$(BUILD_DIR)/$1/$(SATELLITE_ASSEMBLY_NAME): $(subst .resx,.resources,$2)) culture_resource_commandlines = $(call unesc2,cmd_line_satellite_$1 += '/embed:$(subst .resx,.resources,$2)') build_satellite_assembly_list = $(call q2s,$(cultures:%=$(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME))) build_culture_res_files = $(call q2s,$(foreach res, $(culture_resources),$(call get_resource_name,$(res)))) GACROOT = $(DESTDIR)$(prefix)/lib all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.include $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign UIAutomationClientTests/AtspiUiaClientTests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign UIAutomationClientTests/AtspiUiaClientTests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): atspiuiaclienttest.sh: $(top_builddir)/config.status $(srcdir)/atspiuiaclienttest.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files install-linuxpkgconfigDATA: $(linuxpkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(linuxpkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(linuxpkgconfigdir)" @list='$(linuxpkgconfig_DATA)'; test -n "$(linuxpkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(linuxpkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(linuxpkgconfigdir)" || exit $$?; \ done uninstall-linuxpkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(linuxpkgconfig_DATA)'; test -n "$(linuxpkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(linuxpkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(linuxpkgconfigdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) $(DATA) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(linuxpkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-linuxpkgconfigDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-linuxpkgconfigDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-binSCRIPTS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-linuxpkgconfigDATA install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-binSCRIPTS uninstall-linuxpkgconfigDATA all: $(ASSEMBLY) $(PROGRAMFILES) # macros # $(call emit-deploy-target,deploy-variable-name) define emit-deploy-target $($1): $($1_SOURCE) mkdir -p '$$(shell dirname '$$@')' cp '$$<' '$$@' endef # $(call emit-deploy-wrapper,wrapper-variable-name,wrapper-sourcefile,x) # assumes that for a wrapper foo.pc its source template is foo.pc.in # if $3 is non-empty then wrapper is marked exec define emit-deploy-wrapper $($1): $2 mkdir -p '$$(shell dirname '$$@')' cp '$$<' '$$@' $(if $3,chmod +x '$$@') endef $(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_dependencies,$(call get_culture,$(call get_resource_name,$(res))),$(call get_resource_name,$(res)))))) $(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_commandlines,$(call get_culture,$(call get_resource_name,$(res))),$(res))))) $(build_satellite_assembly_list): $(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME): mkdir -p '$(@D)' $(AL) -out:'$@' -culture:$* -t:lib $(cmd_line_satellite_$*) gac-install: $(POLICY_ASSEMBLIES) $(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS) /root $(GACROOT) $(PACKAGE_FLAG) || exit 1; gac-uninstall: $(GACUTIL) /us $(ASSEMBLY) $(GACUTIL_FLAGS) /root $(GACROOT) $(PACKAGE_FLAG) || exit 1; $(eval $(call emit-deploy-target,GTKFORM_EXE)) $(eval $(call emit-deploy-target,GTKFORM_EXE_MDB)) @HAS_MONO_2_5_FALSE@$(eval $(call emit-deploy-target,WINDOWSBASE_DLL)) @HAS_MONO_2_5_FALSE@$(eval $(call emit-deploy-target,WINDOWSBASE_DLL_MDB)) $(eval $(call emit-deploy-target,UIAUTOMATIONTYPES_DLL)) $(eval $(call emit-deploy-target,UIAUTOMATIONTYPES_DLL_MDB)) $(eval $(call emit-deploy-target,UIAUTOMATIONCLIENT_DLL)) $(eval $(call emit-deploy-target,UIAUTOMATIONCLIENT_DLL_MDB)) $(eval $(call emit-deploy-target,UIAUTOMATIONSOURCE_DLL)) $(eval $(call emit-deploy-target,UIAUTOMATIONSOURCE_DLL_MDB)) $(eval $(call emit-deploy-target,UIAUTOMATIONPROVIDER_DLL)) $(eval $(call emit-deploy-target,UIAUTOMATIONPROVIDER_DLL_MDB)) $(eval $(call emit-deploy-target,UIAUTOMATIONBRIDGE_DLL)) $(eval $(call emit-deploy-target,UIAUTOMATIONBRIDGE_DLL_MDB)) $(eval $(call emit-deploy-target,UIAUTOMATIONCLIENTTESTS_DLL)) $(eval $(call emit-deploy-target,UIAUTOMATIONCLIENTTESTS_DLL_MDB)) $(eval $(call emit_resgen_targets)) $(build_xamlg_list): %.xaml.g.cs: %.xaml xamlg '$<' $(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list) @mkdir -p $(shell dirname $(ASSEMBLY)) $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) @chmod +x atspiuiaclienttest.sh # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: mono-uia-2.1/UIAutomationClientTests/Makefile.in0000644000016200001670000003751711433571550022605 0ustar00hudsonhudson00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = UIAutomationClientTests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ GACUTIL = @GACUTIL@ GLIB_SHARP_20_CFLAGS = @GLIB_SHARP_20_CFLAGS@ GLIB_SHARP_20_LIBS = @GLIB_SHARP_20_LIBS@ GMCS = @GMCS@ GTK_SHARP_20_CFLAGS = @GTK_SHARP_20_CFLAGS@ GTK_SHARP_20_LIBS = @GTK_SHARP_20_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MONO = @MONO@ MONO_CFLAGS = @MONO_CFLAGS@ MONO_LIBS = @MONO_LIBS@ NUNIT_CFLAGS = @NUNIT_CFLAGS@ NUNIT_LIBS = @NUNIT_LIBS@ NUNIT_PATH = @NUNIT_PATH@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SN = @SN@ STRIP = @STRIP@ VERSION = @VERSION@ WINDOWSBASE_LIBS = @WINDOWSBASE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_bindir = @expanded_bindir@ expanded_datadir = @expanded_datadir@ expanded_libdir = @expanded_libdir@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = SampleForm UIAutomationClientTests GtkForm AtspiUiaClientTests all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign UIAutomationClientTests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign UIAutomationClientTests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic ctags \ ctags-recursive distclean distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ tags-recursive uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: mono-uia-2.1/UIAutomationSource/0000777000016200001670000000000011433571554017532 5ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationSource/Makefile.am0000644000016200001670000000457711433571545021577 0ustar00hudsonhudson00000000000000 EXTRA_DIST = ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_FLAGS = -lib:@expanded_libdir@/mono/2.0 -lib:../bin -lib:@expanded_libdir@/mono/accessibility -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" -d:NET_2_0 ASSEMBLY = ../bin/UIAutomationSource.dll ASSEMBLY_MDB = $(ASSEMBLY).mdb COMPILE_TARGET = library PROJECT_REFERENCES = BUILD_DIR = ../bin PACKAGE_FLAG = /package accessibility UIAUTOMATIONSOURCE_DLL_MDB_SOURCE=../bin/UIAutomationSource.dll.mdb UIAUTOMATIONSOURCE_DLL_MDB=$(BUILD_DIR)/UIAutomationSource.dll.mdb AL=al2 SATELLITE_ASSEMBLY_NAME=Mono.UIAutomation.Source.resources.dll PROGRAMFILES = \ $(UIAUTOMATIONSOURCE_DLL_MDB) RESGEN=resgen2 all: $(ASSEMBLY) $(PROGRAMFILES) PROJECT_SOURCE_FILES = \ Mono.UIAutomation.Source/IAutomationSource.cs \ Mono.UIAutomation.Source/IElement.cs \ Mono.UIAutomation.Source/IGridItemPattern.cs \ Mono.UIAutomation.Source/IGridPattern.cs \ Mono.UIAutomation.Source/IInvokePattern.cs \ Mono.UIAutomation.Source/IMultipleViewPattern.cs \ Mono.UIAutomation.Source/IRangeValuePattern.cs \ Mono.UIAutomation.Source/IScrollPattern.cs \ Mono.UIAutomation.Source/ISelectionItemPattern.cs \ Mono.UIAutomation.Source/ISelectionPattern.cs \ Mono.UIAutomation.Source/ITableItemPattern.cs \ Mono.UIAutomation.Source/ITablePattern.cs \ Mono.UIAutomation.Source/ITextPattern.cs \ Mono.UIAutomation.Source/ITextPatternRange.cs \ Mono.UIAutomation.Source/ITransformPattern.cs \ Mono.UIAutomation.Source/IValuePattern.cs \ Mono.UIAutomation.Source/IWindowPattern.cs FILES = \ AssemblyInfo.cs \ ../build/common/*.cs \ $(PROJECT_SOURCE_FILES) DATA_FILES = RESOURCES = REFERENCES = \ WindowsBase \ System \ UIAutomationTypes DLL_REFERENCES = CLEANFILES = $(PROGRAMFILES) install-data-local: gac-install uninstall-local: gac-uninstall include $(top_srcdir)/Makefile.include $(eval $(call emit_resgen_targets)) $(build_xamlg_list): %.xaml.g.cs: %.xaml xamlg '$<' $(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list) mkdir -p $(shell dirname $(ASSEMBLY)) $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) sn -q -R $(ASSEMBLY) $(top_srcdir)/mono.snk mono-uia-2.1/UIAutomationSource/AssemblyInfo.cs.in0000644000016200001670000000461411433571545023062 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using System.Resources; using System.Reflection; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security; using System.Security.Permissions; // General Information about the UIAutomationSource assembly // v3.0 Assembly [assembly: AssemblyCompany (Consts.MonoCompany)] [assembly: AssemblyProduct (Consts.MonoProduct)] [assembly: AssemblyCopyright (Consts.MonoCopyright)] [assembly: AssemblyVersion (Consts.FxVersion)] [assembly: AssemblyFileVersion (Consts.WinFileVersion)] [assembly: NeutralResourcesLanguage ("en")] [assembly: CLSCompliant (true)] [assembly: AssemblyDelaySign (true)] [assembly: AssemblyKeyFile ("@abs_top_srcdir@/winfx3.pub")] [assembly: ComVisible (false)] [assembly: AllowPartiallyTrustedCallers] [assembly: CompilationRelaxations (CompilationRelaxations.NoStringInterning)] [assembly: Debuggable (DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: RuntimeCompatibility (WrapNonExceptionThrows = true)] [assembly: PermissionSet (SecurityAction.RequestMinimum, Name = "FullTrust")] [assembly: SecurityPermission (SecurityAction.RequestMinimum, SkipVerification = true)] mono-uia-2.1/UIAutomationSource/AssemblyInfo.cs0000644000016200001670000000467111433571553022457 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using System.Resources; using System.Reflection; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security; using System.Security.Permissions; // General Information about the UIAutomationSource assembly // v3.0 Assembly [assembly: AssemblyCompany (Consts.MonoCompany)] [assembly: AssemblyProduct (Consts.MonoProduct)] [assembly: AssemblyCopyright (Consts.MonoCopyright)] [assembly: AssemblyVersion (Consts.FxVersion)] [assembly: AssemblyFileVersion (Consts.WinFileVersion)] [assembly: NeutralResourcesLanguage ("en")] [assembly: CLSCompliant (true)] [assembly: AssemblyDelaySign (true)] [assembly: AssemblyKeyFile ("/var/lib/hudson/jobs/_uia_tag_tarballs/workspace/UIAutomation/winfx3.pub")] [assembly: ComVisible (false)] [assembly: AllowPartiallyTrustedCallers] [assembly: CompilationRelaxations (CompilationRelaxations.NoStringInterning)] [assembly: Debuggable (DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: RuntimeCompatibility (WrapNonExceptionThrows = true)] [assembly: PermissionSet (SecurityAction.RequestMinimum, Name = "FullTrust")] [assembly: SecurityPermission (SecurityAction.RequestMinimum, SkipVerification = true)] mono-uia-2.1/UIAutomationSource/Mono.UIAutomation.Source/0000777000016200001670000000000011433571554024256 5ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationSource/Mono.UIAutomation.Source/IAutomationSource.cs0000644000016200001670000000653711433571545030226 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using System.Windows; using System.Windows.Automation; namespace Mono.UIAutomation.Source { //We can't use the AutomationFocusChangedEventHandler since it's defined in UIAutomationClient.dll //For most source implementation on Linux, childId and objectId can be ignored, since they're //traditional Microsoft Active Accessibility identifiers. public delegate void FocusChangedEventHandler (IElement element, int objectId, int childId); public interface IAutomationSource { void Initialize (); IElement [] GetRootElements (); event EventHandler RootElementsChanged; IElement GetFocusedElement (); IElement GetElementFromHandle (IntPtr handle); bool IsAccessibilityEnabled { get; } void AddAutomationEventHandler (AutomationEvent eventId, IElement element, TreeScope scope, AutomationEventHandler eventHandler); void AddAutomationPropertyChangedEventHandler (IElement element, TreeScope scope, AutomationPropertyChangedEventHandler eventHandler, AutomationProperty [] properties); void AddStructureChangedEventHandler (IElement element, TreeScope scope, StructureChangedEventHandler eventHandler); void AddAutomationFocusChangedEventHandler (FocusChangedEventHandler eventHandler); void RemoveAutomationEventHandler (AutomationEvent eventId, IElement element, AutomationEventHandler eventHandler); void RemoveAutomationPropertyChangedEventHandler (IElement element, AutomationPropertyChangedEventHandler eventHandler); void RemoveStructureChangedEventHandler (IElement element, StructureChangedEventHandler eventHandler); void RemoveAutomationFocusChangedEventHandler (FocusChangedEventHandler eventHandler); void RemoveAllEventHandlers (); } } mono-uia-2.1/UIAutomationSource/Mono.UIAutomation.Source/IScrollPattern.cs0000644000016200001670000000334611433571545027514 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Runtime.InteropServices; using System.Windows.Automation; namespace Mono.UIAutomation.Source { public interface IScrollPattern { void Scroll (ScrollAmount horizontalAmount, ScrollAmount verticalAmount); void SetScrollPercent (double horizontalPercent, double verticalPercent); bool HorizontallyScrollable { get; } double HorizontalScrollPercent { get; } double HorizontalViewSize { get; } bool VerticallyScrollable { get; } double VerticalScrollPercent { get; } double VerticalViewSize { get; } } } mono-uia-2.1/UIAutomationSource/Mono.UIAutomation.Source/ITableItemPattern.cs0000644000016200001670000000265011433571545030121 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Runtime.InteropServices; namespace Mono.UIAutomation.Source { public interface ITableItemPattern : IGridItemPattern { IElement [] GetRowHeaderItems (); IElement [] GetColumnHeaderItems (); } } mono-uia-2.1/UIAutomationSource/Mono.UIAutomation.Source/ISelectionPattern.cs0000644000016200001670000000265711433571545030207 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Runtime.InteropServices; namespace Mono.UIAutomation.Source { public interface ISelectionPattern { bool CanSelectMultiple { get; } bool IsSelectionRequired { get; } IElement [] GetSelection (); } } mono-uia-2.1/UIAutomationSource/Mono.UIAutomation.Source/ISelectionItemPattern.cs0000644000016200001670000000273711433571545031025 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Runtime.InteropServices; namespace Mono.UIAutomation.Source { public interface ISelectionItemPattern { void Select (); void AddToSelection (); void RemoveFromSelection (); bool IsSelected { get; } IElement SelectionContainer { get; } } } mono-uia-2.1/UIAutomationSource/Mono.UIAutomation.Source/ITransformPattern.cs0000644000016200001670000000301211433571545030217 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Runtime.InteropServices; namespace Mono.UIAutomation.Source { public interface ITransformPattern { void Move (double x, double y); void Resize (double width, double height); void Rotate (double degrees); bool CanMove { get; } bool CanResize { get; } bool CanRotate { get; } } } mono-uia-2.1/UIAutomationSource/Mono.UIAutomation.Source/IInvokePattern.cs0000644000016200001670000000246011433571545027505 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Matt Guo // using System; namespace Mono.UIAutomation.Source { public interface IInvokePattern { void Invoke (); } } mono-uia-2.1/UIAutomationSource/Mono.UIAutomation.Source/IRangeValuePattern.cs0000644000016200001670000000301611433571545030301 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Runtime.InteropServices; namespace Mono.UIAutomation.Source { public interface IRangeValuePattern { void SetValue (double value); double Value { get; } bool IsReadOnly { get; } double Maximum { get; } double Minimum { get; } double LargeChange { get; } double SmallChange { get; } } } mono-uia-2.1/UIAutomationSource/Mono.UIAutomation.Source/ITablePattern.cs0000644000016200001670000000274611433571545027310 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Runtime.InteropServices; using System.Windows.Automation; namespace Mono.UIAutomation.Source { public interface ITablePattern : IGridPattern { RowOrColumnMajor RowOrColumnMajor { get; } IElement [] GetRowHeaders (); IElement [] GetColumnHeaders (); } } mono-uia-2.1/UIAutomationSource/Mono.UIAutomation.Source/ITextPattern.cs0000644000016200001670000000325211433571545027176 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Runtime.InteropServices; using System.Windows; using System.Windows.Automation; namespace Mono.UIAutomation.Source { public interface ITextPattern { ITextPatternRange DocumentRange { get; } SupportedTextSelection SupportedTextSelection { get; } ITextPatternRange[] GetSelection (); ITextPatternRange[] GetVisibleRanges (); ITextPatternRange RangeFromChild (IElement childElement); ITextPatternRange RangeFromPoint (Point screenLocation); } } mono-uia-2.1/UIAutomationSource/Mono.UIAutomation.Source/ITextPatternRange.cs0000644000016200001670000000462111433571545030154 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Runtime.InteropServices; using System.Windows; using System.Windows.Automation; using System.Windows.Automation.Text; namespace Mono.UIAutomation.Source { public interface ITextPatternRange { void AddToSelection (); ITextPatternRange Clone (); bool Compare (ITextPatternRange range); int CompareEndpoints (TextPatternRangeEndpoint endpoint, ITextPatternRange targetRange, TextPatternRangeEndpoint targetEndpoint); void ExpandToEnclosingUnit (TextUnit unit); ITextPatternRange FindAttribute (AutomationTextAttribute attribute, object value, bool backward); ITextPatternRange FindText (string text, bool backward, bool ignoreCase); object GetAttributeValue (AutomationTextAttribute attribute); Rect[] GetBoundingRectangles (); IElement[] GetChildren (); IElement GetEnclosingElement (); string GetText (int maxLength); int Move (TextUnit unit, int count); void MoveEndpointByRange (TextPatternRangeEndpoint endpoint, ITextPatternRange targetRange, TextPatternRangeEndpoint targetEndpoint); int MoveEndpointByUnit (TextPatternRangeEndpoint endpoint, TextUnit unit, int count); void RemoveFromSelection (); void ScrollIntoView (bool alignToTop); void Select (); } } mono-uia-2.1/UIAutomationSource/Mono.UIAutomation.Source/IMultipleViewPattern.cs0000644000016200001670000000271611433571545030704 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Runtime.InteropServices; namespace Mono.UIAutomation.Source { public interface IMultipleViewPattern { string GetViewName (int viewId); void SetCurrentView (int viewId); int CurrentView { get; } int [] GetSupportedViews (); } } mono-uia-2.1/UIAutomationSource/Mono.UIAutomation.Source/IGridPattern.cs0000644000016200001670000000264211433571545027141 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Runtime.InteropServices; namespace Mono.UIAutomation.Source { public interface IGridPattern { IElement GetItem (int row, int column); int RowCount { get; } int ColumnCount { get; } } } mono-uia-2.1/UIAutomationSource/Mono.UIAutomation.Source/IValuePattern.cs0000644000016200001670000000263111433571545027326 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Runtime.InteropServices; namespace Mono.UIAutomation.Source { public interface IValuePattern { void SetValue (string value); bool IsReadOnly { get; } string Value { get; } } } mono-uia-2.1/UIAutomationSource/Mono.UIAutomation.Source/IElement.cs0000644000016200001670000000521311433571545026304 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using System.Windows; using System.Windows.Automation; namespace Mono.UIAutomation.Source { public interface IElement { bool SupportsProperty (AutomationProperty property); string AcceleratorKey { get; } string AccessKey { get; } string AutomationId { get; } Rect BoundingRectangle { get; } string ClassName { get; } Point ClickablePoint { get; } ControlType ControlType { get; } string FrameworkId { get; } bool HasKeyboardFocus { get; } string HelpText { get; } bool IsContentElement { get; } bool IsControlElement { get; } bool IsEnabled { get; } bool IsKeyboardFocusable { get; } bool IsOffscreen { get; } bool IsPassword { get; } bool IsRequiredForForm { get; } string ItemStatus { get; } string ItemType { get; } IElement LabeledBy { get; } string LocalizedControlType { get; } string Name { get; } int NativeWindowHandle { get; } OrientationType Orientation { get; } int ProcessId { get; } int [] RuntimeId { get; } IElement Parent { get; } IElement FirstChild { get; } IElement LastChild { get; } IElement NextSibling { get; } IElement PreviousSibling { get; } IAutomationSource AutomationSource { get; } object GetCurrentPattern (AutomationPattern pattern); AutomationPattern [] GetSupportedPatterns (); AutomationProperty [] GetSupportedProperties (); void SetFocus (); IElement GetDescendantFromPoint (double x, double y); } } mono-uia-2.1/UIAutomationSource/Mono.UIAutomation.Source/IGridItemPattern.cs0000644000016200001670000000270611433571545027761 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Runtime.InteropServices; namespace Mono.UIAutomation.Source { public interface IGridItemPattern { int Row { get; } int Column { get; } int RowSpan { get; } int ColumnSpan { get; } IElement ContainingGrid { get; } } } mono-uia-2.1/UIAutomationSource/Mono.UIAutomation.Source/IWindowPattern.cs0000644000016200001670000000326611433571545027526 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Runtime.InteropServices; using System.Windows.Automation; namespace Mono.UIAutomation.Source { public interface IWindowPattern { void Close (); void SetWindowVisualState (WindowVisualState state); bool WaitForInputIdle (int milliseconds); bool IsModal { get; } bool IsTopmost { get; } bool CanMaximize { get; } bool CanMinimize { get; } WindowInteractionState WindowInteractionState { get; } WindowVisualState WindowVisualState { get; } } } mono-uia-2.1/UIAutomationSource/Makefile.in0000644000016200001670000005276711433571551021611 0ustar00hudsonhudson00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : DIST_COMMON = $(srcdir)/AssemblyInfo.cs.in $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/Makefile.include subdir = UIAutomationSource ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = AssemblyInfo.cs CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(linuxpkgconfigdir)" SCRIPTS = $(bin_SCRIPTS) SOURCES = DIST_SOURCES = DATA = $(linuxpkgconfig_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ GACUTIL = @GACUTIL@ GLIB_SHARP_20_CFLAGS = @GLIB_SHARP_20_CFLAGS@ GLIB_SHARP_20_LIBS = @GLIB_SHARP_20_LIBS@ GMCS = @GMCS@ GTK_SHARP_20_CFLAGS = @GTK_SHARP_20_CFLAGS@ GTK_SHARP_20_LIBS = @GTK_SHARP_20_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MONO = @MONO@ MONO_CFLAGS = @MONO_CFLAGS@ MONO_LIBS = @MONO_LIBS@ NUNIT_CFLAGS = @NUNIT_CFLAGS@ NUNIT_LIBS = @NUNIT_LIBS@ NUNIT_PATH = @NUNIT_PATH@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SN = @SN@ STRIP = @STRIP@ VERSION = @VERSION@ WINDOWSBASE_LIBS = @WINDOWSBASE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_bindir = @expanded_bindir@ expanded_datadir = @expanded_datadir@ expanded_libdir = @expanded_libdir@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = $(build_sources) $(build_resx_files) \ $(build_others_files) $(ASSEMBLY_WRAPPER_IN) $(EXTRAS) \ $(DATA_FILES) $(build_culture_res_files) ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_FLAGS = -lib:@expanded_libdir@/mono/2.0 -lib:../bin -lib:@expanded_libdir@/mono/accessibility -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" -d:NET_2_0 ASSEMBLY = ../bin/UIAutomationSource.dll ASSEMBLY_MDB = $(ASSEMBLY).mdb COMPILE_TARGET = library PROJECT_REFERENCES = BUILD_DIR = ../bin PACKAGE_FLAG = /package accessibility UIAUTOMATIONSOURCE_DLL_MDB_SOURCE = ../bin/UIAutomationSource.dll.mdb UIAUTOMATIONSOURCE_DLL_MDB = $(BUILD_DIR)/UIAutomationSource.dll.mdb AL = al2 SATELLITE_ASSEMBLY_NAME = Mono.UIAutomation.Source.resources.dll PROGRAMFILES = \ $(UIAUTOMATIONSOURCE_DLL_MDB) RESGEN = resgen2 PROJECT_SOURCE_FILES = \ Mono.UIAutomation.Source/IAutomationSource.cs \ Mono.UIAutomation.Source/IElement.cs \ Mono.UIAutomation.Source/IGridItemPattern.cs \ Mono.UIAutomation.Source/IGridPattern.cs \ Mono.UIAutomation.Source/IInvokePattern.cs \ Mono.UIAutomation.Source/IMultipleViewPattern.cs \ Mono.UIAutomation.Source/IRangeValuePattern.cs \ Mono.UIAutomation.Source/IScrollPattern.cs \ Mono.UIAutomation.Source/ISelectionItemPattern.cs \ Mono.UIAutomation.Source/ISelectionPattern.cs \ Mono.UIAutomation.Source/ITableItemPattern.cs \ Mono.UIAutomation.Source/ITablePattern.cs \ Mono.UIAutomation.Source/ITextPattern.cs \ Mono.UIAutomation.Source/ITextPatternRange.cs \ Mono.UIAutomation.Source/ITransformPattern.cs \ Mono.UIAutomation.Source/IValuePattern.cs \ Mono.UIAutomation.Source/IWindowPattern.cs FILES = \ AssemblyInfo.cs \ ../build/common/*.cs \ $(PROJECT_SOURCE_FILES) DATA_FILES = RESOURCES = REFERENCES = \ WindowsBase \ System \ UIAutomationTypes DLL_REFERENCES = CLEANFILES = $(PROGRAMFILES) $(ASSEMBLY) $(ASSEMBLY).mdb $(BINARIES) \ $(build_resx_resources) $(build_satellite_assembly_list) VALID_CULTURES = ar bg ca zh-CHS cs da de el en es fi fr he hu is it ja ko nl no pl pt ro ru hr sk sq sv th tr id uk be sl et lv lt fa vi hy eu mk af fo hi sw gu ta te kn mr gl kok ar-SA bg-BG ca-ES zh-TW cs-CZ da-DK de-DE el-GR en-US fi-FI fr-FR he-IL hu-HU is-IS it-IT ja-JP ko-KR nl-NL nb-NO pl-PL pt-BR ro-RO ru-RU hr-HR sk-SK sq-AL sv-SE th-TH tr-TR id-ID uk-UA be-BY sl-SI et-EE lv-LV lt-LT fa-IR vi-VN hy-AM eu-ES mk-MK af-ZA fo-FO hi-IN sw-KE gu-IN ta-IN te-IN kn-IN mr-IN gl-ES kok-IN ar-IQ zh-CN de-CH en-GB es-MX fr-BE it-CH nl-BE nn-NO pt-PT sv-FI ar-EG zh-HK de-AT en-AU es-ES fr-CA ar-LY zh-SG de-LU en-CA es-GT fr-CH ar-DZ zh-MO en-NZ es-CR fr-LU ar-MA en-IE es-PA ar-TN en-ZA es-DO ar-OM es-VE ar-YE es-CO ar-SY es-PE ar-JO es-AR ar-LB en-ZW es-EC ar-KW en-PH es-CL ar-AE es-UY ar-BH es-PY ar-QA es-BO es-SV es-HN es-NI es-PR zh-CHT s2q = $(subst \ ,?,$1) q2s = $(subst ?,\ ,$1) # use this when result will be quoted unesc2 = $(subst ?, ,$1) build_sources = $(FILES) $(GENERATED_FILES) build_sources_esc = $(call s2q,$(build_sources)) # use unesc2, as build_sources_embed is quoted build_sources_embed = $(call unesc2,$(build_sources_esc:%='$(srcdir)/%')) comma__ = , get_resource_name = $(firstword $(subst $(comma__), ,$1)) get_culture = $(lastword $(subst ., ,$(basename $1))) is_cultured_resource = $(and $(word 3,$(subst ., ,$1)), $(filter $(VALID_CULTURES),$(lastword $(subst ., ,$(basename $1))))) RESOURCES_ESC = $(call s2q,$(RESOURCES)) build_resx_list = $(foreach res, $(RESOURCES_ESC), $(if $(filter %.resx, $(call get_resource_name,$(res))),$(res),)) build_non_culture_resx_list = $(foreach res, $(build_resx_list),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) build_non_culture_others_list = $(foreach res, $(filter-out $(build_resx_list),$(RESOURCES_ESC)),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) build_others_list = $(build_non_culture_others_list) build_xamlg_list = $(filter %.xaml.g.cs, $(FILES)) # resgen all .resx resources build_resx_files = $(foreach res, $(build_resx_list), $(call get_resource_name,$(res))) build_resx_resources_esc = $(build_resx_files:.resx=.resources) build_resx_resources = $(call q2s,$(build_resx_resources_esc)) # embed resources for the main assembly build_resx_resources_hack = $(subst .resx,.resources, $(build_non_culture_resx_list)) # use unesc2, as build_resx_resources_embed is quoted build_resx_resources_embed = $(call unesc2,$(build_resx_resources_hack:%='-resource:%')) build_others_files = $(call q2s,$(foreach res, $(build_others_list),$(call get_resource_name,$(res)))) build_others_resources = $(build_others_files) # use unesc2, as build_others_resources_embed is quoted build_others_resources_embed = $(call unesc2,$(build_others_list:%='-resource:$(srcdir)/%')) build_resources = $(build_resx_resources) $(build_others_resources) build_resources_embed = $(build_resx_resources_embed) $(build_others_resources_embed) # -usesourcepath is available only for resgen2 emit_resgen_target_1 = $(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); cd '$$(shell dirname '$$<')' && $$(RESGEN) '$$(shell basename '$$<')' '$$(shell basename '$$@')' emit_resgen_target_2 = $(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); $$(RESGEN) -usesourcepath '$$<' '$$@' emit_resgen_target = $(if $(filter resgen2,$(RESGEN)),$(emit_resgen_target_2),$(emit_resgen_target_1)) emit_resgen_targets = $(foreach res,$(build_resx_resources_esc),$(eval $(call emit_resgen_target,$(res)))) build_references_ref = $(call q2s,$(foreach ref, $(call \ s2q,$(REFERENCES)), $(if $(filter -pkg:%, $(ref)), $(ref), \ $(if $(filter -r:%, $(ref)), $(ref), -r:$(ref))))) $(call \ q2s,$(foreach ref, $(call s2q,$(DLL_REFERENCES)), -r:$(ref))) \ $(call q2s,$(foreach ref, $(call s2q,$(PROJECT_REFERENCES)), \ -r:$(ref))) s2q2s = $(call unesc2,$(call s2q,$1)) cp_actual = test -z $1 || cp $1 $2 cp = $(call cp_actual,'$(call s2q2s,$1)','$(call s2q2s,$2)') rm_actual = test -z '$1' || rm -f '$2' rm = $(call rm_actual,$(call s2q2s,$1),$(call s2q2s,$2)/$(shell basename '$(call s2q2s,$1)')) DISTCLEANFILES = $(GENERATED_FILES) $(pc_files) $(BUILD_DIR)/* #pkglib_SCRIPTS = $(ASSEMBLY) bin_SCRIPTS = $(BINARIES) #programfilesdir = @libdir@/@PACKAGE@ #programfiles_DATA = $(PROGRAMFILES) linuxpkgconfigdir = @libdir@/pkgconfig linuxpkgconfig_DATA = $(LINUX_PKGCONFIG) # generating satellite assemblies culture_resources = $(foreach res, $(RESOURCES_ESC), $(if $(call is_cultured_resource,$(call get_resource_name, $(res))),$(res))) cultures = $(sort $(foreach res, $(culture_resources), $(call get_culture,$(call get_resource_name,$(res))))) culture_resource_dependencies = $(call q2s,$(BUILD_DIR)/$1/$(SATELLITE_ASSEMBLY_NAME): $(subst .resx,.resources,$2)) culture_resource_commandlines = $(call unesc2,cmd_line_satellite_$1 += '/embed:$(subst .resx,.resources,$2)') build_satellite_assembly_list = $(call q2s,$(cultures:%=$(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME))) build_culture_res_files = $(call q2s,$(foreach res, $(culture_resources),$(call get_resource_name,$(res)))) GACROOT = $(DESTDIR)$(prefix)/lib all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.include $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign UIAutomationSource/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign UIAutomationSource/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): AssemblyInfo.cs: $(top_builddir)/config.status $(srcdir)/AssemblyInfo.cs.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files install-linuxpkgconfigDATA: $(linuxpkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(linuxpkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(linuxpkgconfigdir)" @list='$(linuxpkgconfig_DATA)'; test -n "$(linuxpkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(linuxpkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(linuxpkgconfigdir)" || exit $$?; \ done uninstall-linuxpkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(linuxpkgconfig_DATA)'; test -n "$(linuxpkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(linuxpkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(linuxpkgconfigdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) $(DATA) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(linuxpkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-linuxpkgconfigDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-linuxpkgconfigDATA \ uninstall-local .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-binSCRIPTS install-data \ install-data-am install-data-local install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-linuxpkgconfigDATA \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-binSCRIPTS uninstall-linuxpkgconfigDATA \ uninstall-local all: $(ASSEMBLY) $(PROGRAMFILES) install-data-local: gac-install uninstall-local: gac-uninstall # macros # $(call emit-deploy-target,deploy-variable-name) define emit-deploy-target $($1): $($1_SOURCE) mkdir -p '$$(shell dirname '$$@')' cp '$$<' '$$@' endef # $(call emit-deploy-wrapper,wrapper-variable-name,wrapper-sourcefile,x) # assumes that for a wrapper foo.pc its source template is foo.pc.in # if $3 is non-empty then wrapper is marked exec define emit-deploy-wrapper $($1): $2 mkdir -p '$$(shell dirname '$$@')' cp '$$<' '$$@' $(if $3,chmod +x '$$@') endef $(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_dependencies,$(call get_culture,$(call get_resource_name,$(res))),$(call get_resource_name,$(res)))))) $(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_commandlines,$(call get_culture,$(call get_resource_name,$(res))),$(res))))) $(build_satellite_assembly_list): $(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME): mkdir -p '$(@D)' $(AL) -out:'$@' -culture:$* -t:lib $(cmd_line_satellite_$*) gac-install: $(POLICY_ASSEMBLIES) $(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS) /root $(GACROOT) $(PACKAGE_FLAG) || exit 1; gac-uninstall: $(GACUTIL) /us $(ASSEMBLY) $(GACUTIL_FLAGS) /root $(GACROOT) $(PACKAGE_FLAG) || exit 1; $(eval $(call emit_resgen_targets)) $(build_xamlg_list): %.xaml.g.cs: %.xaml xamlg '$<' $(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list) mkdir -p $(shell dirname $(ASSEMBLY)) $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) sn -q -R $(ASSEMBLY) $(top_srcdir)/mono.snk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: mono-uia-2.1/UIAutomationBridge/0000777000016200001670000000000011433571554017466 5ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationBridge/Mono.UIAutomation.Bridge/0000777000016200001670000000000011433571554024146 5ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationBridge/Mono.UIAutomation.Bridge/IHypertext.cs0000644000016200001670000000273711433571545026607 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Windows.Automation; namespace Mono.UIAutomation.Bridge { public interface IHypertext { int NumberOfLinks { get; } int Start (int index); int Length (int index); string Uri (int index); void Invoke (int index); bool Enabled (int index); } } mono-uia-2.1/UIAutomationBridge/Mono.UIAutomation.Bridge/IAutomationBridge.cs0000644000016200001670000000364611433571545030050 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using System.Windows.Automation; namespace Mono.UIAutomation.Bridge { public interface IAutomationBridge { bool IsAccessibilityEnabled { get; } bool ClientsAreListening { get; } object HostProviderFromHandle (IntPtr hwnd); void RaiseAutomationEvent (AutomationEvent eventId, object provider, AutomationEventArgs e); void RaiseAutomationPropertyChangedEvent (object element, AutomationPropertyChangedEventArgs e); void RaiseStructureChangedEvent (object provider, StructureChangedEventArgs e); void Initialize (); void Terminate (); } } mono-uia-2.1/UIAutomationBridge/Makefile.am0000644000016200001670000000333311433571545021520 0ustar00hudsonhudson00000000000000 EXTRA_DIST = ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_FLAGS = -lib:@expanded_libdir@/mono/2.0 -lib:../bin -lib:@expanded_libdir@/mono/accessibility -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" -d:NET_2_0 ASSEMBLY = ../bin/UIAutomationBridge.dll ASSEMBLY_MDB = $(ASSEMBLY).mdb COMPILE_TARGET = library PROJECT_REFERENCES = BUILD_DIR = ../bin PACKAGE_FLAG = /package accessibility UIAUTOMATIONBRIDGE_DLL_MDB_SOURCE=../bin/UIAutomationBridge.dll.mdb UIAUTOMATIONBRIDGE_DLL_MDB=$(BUILD_DIR)/UIAutomationBridge.dll.mdb AL=al2 SATELLITE_ASSEMBLY_NAME=Mono.UIAutomation.Bridge.resources.dll PROGRAMFILES = \ $(UIAUTOMATIONBRIDGE_DLL_MDB) RESGEN=resgen2 all: $(ASSEMBLY) $(PROGRAMFILES) PROJECT_SOURCE_FILES = \ Mono.UIAutomation.Bridge/IAutomationBridge.cs \ Mono.UIAutomation.Bridge/IHypertext.cs \ Mono.UIAutomation.Services/Log.cs FILES = \ AssemblyInfo.cs \ ../build/common/*.cs \ $(PROJECT_SOURCE_FILES) DATA_FILES = RESOURCES = REFERENCES = \ WindowsBase \ System \ UIAutomationTypes DLL_REFERENCES = CLEANFILES = $(PROGRAMFILES) install-data-local: gac-install uninstall-local: gac-uninstall include $(top_srcdir)/Makefile.include $(eval $(call emit_resgen_targets)) $(build_xamlg_list): %.xaml.g.cs: %.xaml xamlg '$<' $(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list) mkdir -p $(shell dirname $(ASSEMBLY)) $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) sn -q -R $(ASSEMBLY) $(top_srcdir)/mono.snk mono-uia-2.1/UIAutomationBridge/AssemblyInfo.cs.in0000644000016200001670000000460411433571545023015 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Resources; using System.Reflection; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security; using System.Security.Permissions; // General Information about the UIAutomationBridge assembly // v3.0 Assembly [assembly: AssemblyCompany (Consts.MonoCompany)] [assembly: AssemblyProduct (Consts.MonoProduct)] [assembly: AssemblyCopyright (Consts.MonoCopyright)] [assembly: AssemblyVersion (Consts.FxVersion)] [assembly: AssemblyFileVersion (Consts.WinFileVersion)] [assembly: NeutralResourcesLanguage ("en")] [assembly: CLSCompliant (true)] [assembly: AssemblyDelaySign (true)] [assembly: AssemblyKeyFile ("@abs_top_srcdir@/winfx3.pub")] [assembly: ComVisible (false)] [assembly: AllowPartiallyTrustedCallers] [assembly: CompilationRelaxations (CompilationRelaxations.NoStringInterning)] [assembly: Debuggable (DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: RuntimeCompatibility (WrapNonExceptionThrows = true)] [assembly: PermissionSet (SecurityAction.RequestMinimum, Name = "FullTrust")] [assembly: SecurityPermission (SecurityAction.RequestMinimum, SkipVerification = true)] mono-uia-2.1/UIAutomationBridge/AssemblyInfo.cs0000644000016200001670000000466111433571553022412 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Resources; using System.Reflection; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security; using System.Security.Permissions; // General Information about the UIAutomationBridge assembly // v3.0 Assembly [assembly: AssemblyCompany (Consts.MonoCompany)] [assembly: AssemblyProduct (Consts.MonoProduct)] [assembly: AssemblyCopyright (Consts.MonoCopyright)] [assembly: AssemblyVersion (Consts.FxVersion)] [assembly: AssemblyFileVersion (Consts.WinFileVersion)] [assembly: NeutralResourcesLanguage ("en")] [assembly: CLSCompliant (true)] [assembly: AssemblyDelaySign (true)] [assembly: AssemblyKeyFile ("/var/lib/hudson/jobs/_uia_tag_tarballs/workspace/UIAutomation/winfx3.pub")] [assembly: ComVisible (false)] [assembly: AllowPartiallyTrustedCallers] [assembly: CompilationRelaxations (CompilationRelaxations.NoStringInterning)] [assembly: Debuggable (DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: RuntimeCompatibility (WrapNonExceptionThrows = true)] [assembly: PermissionSet (SecurityAction.RequestMinimum, Name = "FullTrust")] [assembly: SecurityPermission (SecurityAction.RequestMinimum, SkipVerification = true)] mono-uia-2.1/UIAutomationBridge/Mono.UIAutomation.Services/0000777000016200001670000000000011433571554024535 5ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationBridge/Mono.UIAutomation.Services/Log.cs0000644000016200001670000000767511433571545025620 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Brad Taylor // using System; namespace Mono.UIAutomation.Services { public enum LogLevel { Information, Debug, Warning, Error } // Store these in a ring buffer? // Color highlighting? // Textual log levels? public static class Log { #region Public Properties public static LogLevel CurrentLogLevel { get { return currentLogLevel; } } #endregion #region Public Methods static Log () { string level = Environment.GetEnvironmentVariable ("MONO_UIA_LOG_LEVEL"); if (level != null) { try { currentLogLevel = (LogLevel) Convert.ToInt32 (level); } catch { } } } public static event Action ErrorHappened; public static void Info (string message) { Info (message, null); } public static void Info (string message, params object[] args) { PrintMessage (LogLevel.Information, message, args); } public static void Debug (string message) { Debug (message, null); } public static void Debug (Exception e) { Debug ("Exception was caught:\n{0}", e); } public static void Debug (string message, params object[] args) { PrintMessage (LogLevel.Debug, message, args); } public static void Warn (string message) { Warn (message, null); } public static void Warn (string message, params object[] args) { PrintMessage (LogLevel.Warning, message, args); } public static void Error (string message) { Error (message, null); } public static void Error (Exception e) { Error ("Exception was caught:\n{0}", e); } public static void Error (string message, params object[] args) { PrintMessage (LogLevel.Error, message, args); } #endregion #region Private Methods private static void PrintMessage (LogLevel level, string message, object[] args) { // Code from Banshee under the MIT/X11 License string msg = String.Format ("[{0} {1:00}:{2:00}:{3:00}.{4:000}] ", GetLogLevelString (level), DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Second, DateTime.Now.Millisecond); if (args == null) msg += message; else msg += String.Format (message, args); if ((int)currentLogLevel <= (int)level) Console.Error.WriteLine (msg); var handler = ErrorHappened; if (handler != null && level == LogLevel.Error) handler (msg); } private static string GetLogLevelString (LogLevel level) { switch (level) { case LogLevel.Information: return "Info"; case LogLevel.Debug: return "Debug"; case LogLevel.Warning: return "Warn"; case LogLevel.Error: return "Error"; } return String.Empty; } #endregion #region Private Fields private static LogLevel currentLogLevel = LogLevel.Warning; #endregion } } mono-uia-2.1/UIAutomationBridge/Makefile.in0000644000016200001670000005152311433571550021531 0ustar00hudsonhudson00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : DIST_COMMON = $(srcdir)/AssemblyInfo.cs.in $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/Makefile.include subdir = UIAutomationBridge ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = AssemblyInfo.cs CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(linuxpkgconfigdir)" SCRIPTS = $(bin_SCRIPTS) SOURCES = DIST_SOURCES = DATA = $(linuxpkgconfig_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ GACUTIL = @GACUTIL@ GLIB_SHARP_20_CFLAGS = @GLIB_SHARP_20_CFLAGS@ GLIB_SHARP_20_LIBS = @GLIB_SHARP_20_LIBS@ GMCS = @GMCS@ GTK_SHARP_20_CFLAGS = @GTK_SHARP_20_CFLAGS@ GTK_SHARP_20_LIBS = @GTK_SHARP_20_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MONO = @MONO@ MONO_CFLAGS = @MONO_CFLAGS@ MONO_LIBS = @MONO_LIBS@ NUNIT_CFLAGS = @NUNIT_CFLAGS@ NUNIT_LIBS = @NUNIT_LIBS@ NUNIT_PATH = @NUNIT_PATH@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SN = @SN@ STRIP = @STRIP@ VERSION = @VERSION@ WINDOWSBASE_LIBS = @WINDOWSBASE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_bindir = @expanded_bindir@ expanded_datadir = @expanded_datadir@ expanded_libdir = @expanded_libdir@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = $(build_sources) $(build_resx_files) \ $(build_others_files) $(ASSEMBLY_WRAPPER_IN) $(EXTRAS) \ $(DATA_FILES) $(build_culture_res_files) ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_FLAGS = -lib:@expanded_libdir@/mono/2.0 -lib:../bin -lib:@expanded_libdir@/mono/accessibility -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" -d:NET_2_0 ASSEMBLY = ../bin/UIAutomationBridge.dll ASSEMBLY_MDB = $(ASSEMBLY).mdb COMPILE_TARGET = library PROJECT_REFERENCES = BUILD_DIR = ../bin PACKAGE_FLAG = /package accessibility UIAUTOMATIONBRIDGE_DLL_MDB_SOURCE = ../bin/UIAutomationBridge.dll.mdb UIAUTOMATIONBRIDGE_DLL_MDB = $(BUILD_DIR)/UIAutomationBridge.dll.mdb AL = al2 SATELLITE_ASSEMBLY_NAME = Mono.UIAutomation.Bridge.resources.dll PROGRAMFILES = \ $(UIAUTOMATIONBRIDGE_DLL_MDB) RESGEN = resgen2 PROJECT_SOURCE_FILES = \ Mono.UIAutomation.Bridge/IAutomationBridge.cs \ Mono.UIAutomation.Bridge/IHypertext.cs \ Mono.UIAutomation.Services/Log.cs FILES = \ AssemblyInfo.cs \ ../build/common/*.cs \ $(PROJECT_SOURCE_FILES) DATA_FILES = RESOURCES = REFERENCES = \ WindowsBase \ System \ UIAutomationTypes DLL_REFERENCES = CLEANFILES = $(PROGRAMFILES) $(ASSEMBLY) $(ASSEMBLY).mdb $(BINARIES) \ $(build_resx_resources) $(build_satellite_assembly_list) VALID_CULTURES = ar bg ca zh-CHS cs da de el en es fi fr he hu is it ja ko nl no pl pt ro ru hr sk sq sv th tr id uk be sl et lv lt fa vi hy eu mk af fo hi sw gu ta te kn mr gl kok ar-SA bg-BG ca-ES zh-TW cs-CZ da-DK de-DE el-GR en-US fi-FI fr-FR he-IL hu-HU is-IS it-IT ja-JP ko-KR nl-NL nb-NO pl-PL pt-BR ro-RO ru-RU hr-HR sk-SK sq-AL sv-SE th-TH tr-TR id-ID uk-UA be-BY sl-SI et-EE lv-LV lt-LT fa-IR vi-VN hy-AM eu-ES mk-MK af-ZA fo-FO hi-IN sw-KE gu-IN ta-IN te-IN kn-IN mr-IN gl-ES kok-IN ar-IQ zh-CN de-CH en-GB es-MX fr-BE it-CH nl-BE nn-NO pt-PT sv-FI ar-EG zh-HK de-AT en-AU es-ES fr-CA ar-LY zh-SG de-LU en-CA es-GT fr-CH ar-DZ zh-MO en-NZ es-CR fr-LU ar-MA en-IE es-PA ar-TN en-ZA es-DO ar-OM es-VE ar-YE es-CO ar-SY es-PE ar-JO es-AR ar-LB en-ZW es-EC ar-KW en-PH es-CL ar-AE es-UY ar-BH es-PY ar-QA es-BO es-SV es-HN es-NI es-PR zh-CHT s2q = $(subst \ ,?,$1) q2s = $(subst ?,\ ,$1) # use this when result will be quoted unesc2 = $(subst ?, ,$1) build_sources = $(FILES) $(GENERATED_FILES) build_sources_esc = $(call s2q,$(build_sources)) # use unesc2, as build_sources_embed is quoted build_sources_embed = $(call unesc2,$(build_sources_esc:%='$(srcdir)/%')) comma__ = , get_resource_name = $(firstword $(subst $(comma__), ,$1)) get_culture = $(lastword $(subst ., ,$(basename $1))) is_cultured_resource = $(and $(word 3,$(subst ., ,$1)), $(filter $(VALID_CULTURES),$(lastword $(subst ., ,$(basename $1))))) RESOURCES_ESC = $(call s2q,$(RESOURCES)) build_resx_list = $(foreach res, $(RESOURCES_ESC), $(if $(filter %.resx, $(call get_resource_name,$(res))),$(res),)) build_non_culture_resx_list = $(foreach res, $(build_resx_list),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) build_non_culture_others_list = $(foreach res, $(filter-out $(build_resx_list),$(RESOURCES_ESC)),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) build_others_list = $(build_non_culture_others_list) build_xamlg_list = $(filter %.xaml.g.cs, $(FILES)) # resgen all .resx resources build_resx_files = $(foreach res, $(build_resx_list), $(call get_resource_name,$(res))) build_resx_resources_esc = $(build_resx_files:.resx=.resources) build_resx_resources = $(call q2s,$(build_resx_resources_esc)) # embed resources for the main assembly build_resx_resources_hack = $(subst .resx,.resources, $(build_non_culture_resx_list)) # use unesc2, as build_resx_resources_embed is quoted build_resx_resources_embed = $(call unesc2,$(build_resx_resources_hack:%='-resource:%')) build_others_files = $(call q2s,$(foreach res, $(build_others_list),$(call get_resource_name,$(res)))) build_others_resources = $(build_others_files) # use unesc2, as build_others_resources_embed is quoted build_others_resources_embed = $(call unesc2,$(build_others_list:%='-resource:$(srcdir)/%')) build_resources = $(build_resx_resources) $(build_others_resources) build_resources_embed = $(build_resx_resources_embed) $(build_others_resources_embed) # -usesourcepath is available only for resgen2 emit_resgen_target_1 = $(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); cd '$$(shell dirname '$$<')' && $$(RESGEN) '$$(shell basename '$$<')' '$$(shell basename '$$@')' emit_resgen_target_2 = $(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); $$(RESGEN) -usesourcepath '$$<' '$$@' emit_resgen_target = $(if $(filter resgen2,$(RESGEN)),$(emit_resgen_target_2),$(emit_resgen_target_1)) emit_resgen_targets = $(foreach res,$(build_resx_resources_esc),$(eval $(call emit_resgen_target,$(res)))) build_references_ref = $(call q2s,$(foreach ref, $(call \ s2q,$(REFERENCES)), $(if $(filter -pkg:%, $(ref)), $(ref), \ $(if $(filter -r:%, $(ref)), $(ref), -r:$(ref))))) $(call \ q2s,$(foreach ref, $(call s2q,$(DLL_REFERENCES)), -r:$(ref))) \ $(call q2s,$(foreach ref, $(call s2q,$(PROJECT_REFERENCES)), \ -r:$(ref))) s2q2s = $(call unesc2,$(call s2q,$1)) cp_actual = test -z $1 || cp $1 $2 cp = $(call cp_actual,'$(call s2q2s,$1)','$(call s2q2s,$2)') rm_actual = test -z '$1' || rm -f '$2' rm = $(call rm_actual,$(call s2q2s,$1),$(call s2q2s,$2)/$(shell basename '$(call s2q2s,$1)')) DISTCLEANFILES = $(GENERATED_FILES) $(pc_files) $(BUILD_DIR)/* #pkglib_SCRIPTS = $(ASSEMBLY) bin_SCRIPTS = $(BINARIES) #programfilesdir = @libdir@/@PACKAGE@ #programfiles_DATA = $(PROGRAMFILES) linuxpkgconfigdir = @libdir@/pkgconfig linuxpkgconfig_DATA = $(LINUX_PKGCONFIG) # generating satellite assemblies culture_resources = $(foreach res, $(RESOURCES_ESC), $(if $(call is_cultured_resource,$(call get_resource_name, $(res))),$(res))) cultures = $(sort $(foreach res, $(culture_resources), $(call get_culture,$(call get_resource_name,$(res))))) culture_resource_dependencies = $(call q2s,$(BUILD_DIR)/$1/$(SATELLITE_ASSEMBLY_NAME): $(subst .resx,.resources,$2)) culture_resource_commandlines = $(call unesc2,cmd_line_satellite_$1 += '/embed:$(subst .resx,.resources,$2)') build_satellite_assembly_list = $(call q2s,$(cultures:%=$(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME))) build_culture_res_files = $(call q2s,$(foreach res, $(culture_resources),$(call get_resource_name,$(res)))) GACROOT = $(DESTDIR)$(prefix)/lib all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.include $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign UIAutomationBridge/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign UIAutomationBridge/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): AssemblyInfo.cs: $(top_builddir)/config.status $(srcdir)/AssemblyInfo.cs.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files install-linuxpkgconfigDATA: $(linuxpkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(linuxpkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(linuxpkgconfigdir)" @list='$(linuxpkgconfig_DATA)'; test -n "$(linuxpkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(linuxpkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(linuxpkgconfigdir)" || exit $$?; \ done uninstall-linuxpkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(linuxpkgconfig_DATA)'; test -n "$(linuxpkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(linuxpkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(linuxpkgconfigdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) $(DATA) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(linuxpkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-linuxpkgconfigDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-linuxpkgconfigDATA \ uninstall-local .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-binSCRIPTS install-data \ install-data-am install-data-local install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-linuxpkgconfigDATA \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-binSCRIPTS uninstall-linuxpkgconfigDATA \ uninstall-local all: $(ASSEMBLY) $(PROGRAMFILES) install-data-local: gac-install uninstall-local: gac-uninstall # macros # $(call emit-deploy-target,deploy-variable-name) define emit-deploy-target $($1): $($1_SOURCE) mkdir -p '$$(shell dirname '$$@')' cp '$$<' '$$@' endef # $(call emit-deploy-wrapper,wrapper-variable-name,wrapper-sourcefile,x) # assumes that for a wrapper foo.pc its source template is foo.pc.in # if $3 is non-empty then wrapper is marked exec define emit-deploy-wrapper $($1): $2 mkdir -p '$$(shell dirname '$$@')' cp '$$<' '$$@' $(if $3,chmod +x '$$@') endef $(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_dependencies,$(call get_culture,$(call get_resource_name,$(res))),$(call get_resource_name,$(res)))))) $(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_commandlines,$(call get_culture,$(call get_resource_name,$(res))),$(res))))) $(build_satellite_assembly_list): $(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME): mkdir -p '$(@D)' $(AL) -out:'$@' -culture:$* -t:lib $(cmd_line_satellite_$*) gac-install: $(POLICY_ASSEMBLIES) $(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS) /root $(GACROOT) $(PACKAGE_FLAG) || exit 1; gac-uninstall: $(GACUTIL) /us $(ASSEMBLY) $(GACUTIL_FLAGS) /root $(GACROOT) $(PACKAGE_FLAG) || exit 1; $(eval $(call emit_resgen_targets)) $(build_xamlg_list): %.xaml.g.cs: %.xaml xamlg '$<' $(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list) mkdir -p $(shell dirname $(ASSEMBLY)) $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) sn -q -R $(ASSEMBLY) $(top_srcdir)/mono.snk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: mono-uia-2.1/winfx3.pub0000644000016200001670000000024011433571545015711 0ustar00hudsonhudson00000000000000$$RSA1gw:މ8e `Y>Ēe??1 3`!g-1 /%}oY5L9EC;&=oGP\dEk*+Ge+]mono-uia-2.1/build/0000777000016200001670000000000011433571553015071 5ustar00hudsonhudson00000000000000mono-uia-2.1/build/common/0000777000016200001670000000000011433571554016362 5ustar00hudsonhudson00000000000000mono-uia-2.1/build/common/MonoTODOAttribute.cs0000644000016200001670000000606411433571545022175 0ustar00hudsonhudson00000000000000// // MonoTODOAttribute.cs // // Authors: // Ravi Pratap (ravi@ximian.com) // Eyal Alaluf // // (C) Ximian, Inc. http://www.ximian.com // // // Copyright (C) 2004 Novell, Inc (http://www.novell.com) // Copyright (C) 2006 Mainsoft, Inc (http://www.mainsoft.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 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. // namespace System { [AttributeUsage (AttributeTargets.All, AllowMultiple=true)] internal class MonoTODOAttribute : Attribute { string comment; public MonoTODOAttribute () { } public MonoTODOAttribute (string comment) { this.comment = comment; } public virtual string Comment { get { return comment; } } } [AttributeUsage (AttributeTargets.All, AllowMultiple=true)] internal class MonoDocumentationNoteAttribute : MonoTODOAttribute { public MonoDocumentationNoteAttribute (string comment) : base (comment) { } public override string Comment { get { return base.Comment; } } } [AttributeUsage (AttributeTargets.All, AllowMultiple=true)] internal class MonoExtensionAttribute : MonoTODOAttribute { public MonoExtensionAttribute (string comment) : base (comment) { } public override string Comment { get { return base.Comment; } } } [AttributeUsage (AttributeTargets.All, AllowMultiple=true)] internal class MonoInternalNoteAttribute : MonoTODOAttribute { public MonoInternalNoteAttribute (string comment) : base (comment) { } public override string Comment { get { return base.Comment; } } } [AttributeUsage (AttributeTargets.All, AllowMultiple=true)] internal class MonoLimitationAttribute : MonoTODOAttribute { public MonoLimitationAttribute (string comment) : base (comment) { } public override string Comment { get { return base.Comment; } } } [AttributeUsage (AttributeTargets.All, AllowMultiple=true)] internal class MonoNotSupportedAttribute : MonoTODOAttribute { public MonoNotSupportedAttribute (string comment) : base (comment) { } public override string Comment { get { return base.Comment; } } } } mono-uia-2.1/build/common/Consts.cs0000644000016200001670000001362511433571553020164 0ustar00hudsonhudson00000000000000// // Consts.cs.in // // Author: // Kornl Pl // // Copyright (C) 2005-2006 Kornl Pl // // // 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. // internal #if NET_2_0 static #else sealed #endif class Consts { #if !NET_2_0 private Consts () { } #endif // // Use these assembly version constants to make code more maintainable. // public const string MonoCompany = "MONO development team"; public const string MonoProduct = "MONO Common language infrastructure"; public const string MonoCopyright = "(c) various MONO Authors"; #if NET_3_5 // Versions of .NET Framework 3.5 RTM public const string FxVersion = "3.5.0.0"; public const string FxFileVersion = "3.5.21022.8"; public const string VsVersion = "0.0.0.0"; // Useless ? #elif NET_2_1 // Versions of .NET Framework for SilverLight public const string FxVersion = "2.0.5.0"; public const string VsVersion = "9.0.0.0"; // TODO: public const string FxFileVersion = "2.0.30226.2"; public const string VsFileVersion = "9.0.50727.42"; // TODO: #elif NET_2_0 || BOOTSTRAP_NET_2_0 // FIXME: This is the data for the 3.0 libraries. // However for now these are built with no special preprocessor symbol. public const string FxVersion = "3.0.0.0"; public const string VsVersion = "8.0.0.0"; public const string FxFileVersion = "3.0.4506.648"; public const string WinFileVersion = "6.0.6001.17014"; // Versions of .NET Framework 2.0 RTM //public const string FxVersion = "2.0.0.0"; //public const string VsVersion = "8.0.0.0"; //public const string FxFileVersion = "2.0.50727.42"; //public const string VsFileVersion = "8.0.50727.42"; #elif NET_1_1 // Versions of .NET Framework 1.1 SP1 public const string FxVersion = "1.0.5000.0"; public const string VsVersion = "7.0.5000.0"; public const string FxFileVersion = "1.1.4322.2032"; public const string VsFileVersion = "7.10.6001.4"; #elif NET_1_0 // Versions of .NET Framework 1.0 SP3 public const string FxVersion = "1.0.3300.0"; public const string VsVersion = "7.0.3300.0"; public const string FxFileVersion = "1.0.3705.6018"; public const string VsFileVersion = "7.0.9951.0"; #else #error No profile symbols defined. #endif // // Use these assembly name constants to make code more maintainable. // public const string AssemblyI18N = "I18N, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756"; public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; #if NET_2_0 public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=" + VsVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; #endif public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=" + VsVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; public const string AssemblyMono_Http = "Mono.Http, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756"; public const string AssemblyMono_Posix = "Mono.Posix, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756"; public const string AssemblyMono_Security = "Mono.Security, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756"; public const string AssemblyCorlib = "mscorlib, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089"; public const string AssemblySystem = "System, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089"; public const string AssemblySystem_Data = "System.Data, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089"; public const string AssemblySystem_Design = "System.Design, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; public const string AssemblySystem_Drawing = "System.Drawing, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; public const string AssemblySystem_Messaging = "System.Messaging, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; public const string AssemblySystem_Security = "System.Security, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; public const string AssemblySystem_Web = "System.Web, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089"; } mono-uia-2.1/build/common/Locale.cs0000644000016200001670000000305111433571545020103 0ustar00hudsonhudson00000000000000// // Locale.cs // // Author: // Miguel de Icaza (miguel@ximian.com) // Andreas Nahr (ClassDevelopment@A-SoftTech.com) // // (C) 2001 - 2003 Ximian, Inc (http://www.ximian.com) // // // Copyright (C) 2004 Novell, Inc (http://www.novell.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 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. // using System; internal sealed class Locale { private Locale () { } public static string GetText (string msg) { return msg; } public static string GetText (string fmt, params object [] args) { return String.Format (fmt, args); } } mono-uia-2.1/build/common/Consts.cs.in0000644000016200001670000001362511433571545020572 0ustar00hudsonhudson00000000000000// // Consts.cs.in // // Author: // Kornl Pl // // Copyright (C) 2005-2006 Kornl Pl // // // 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. // internal #if NET_2_0 static #else sealed #endif class Consts { #if !NET_2_0 private Consts () { } #endif // // Use these assembly version constants to make code more maintainable. // public const string MonoCompany = "MONO development team"; public const string MonoProduct = "MONO Common language infrastructure"; public const string MonoCopyright = "(c) various MONO Authors"; #if NET_3_5 // Versions of .NET Framework 3.5 RTM public const string FxVersion = "3.5.0.0"; public const string FxFileVersion = "3.5.21022.8"; public const string VsVersion = "0.0.0.0"; // Useless ? #elif NET_2_1 // Versions of .NET Framework for SilverLight public const string FxVersion = "2.0.5.0"; public const string VsVersion = "9.0.0.0"; // TODO: public const string FxFileVersion = "2.0.30226.2"; public const string VsFileVersion = "9.0.50727.42"; // TODO: #elif NET_2_0 || BOOTSTRAP_NET_2_0 // FIXME: This is the data for the 3.0 libraries. // However for now these are built with no special preprocessor symbol. public const string FxVersion = "3.0.0.0"; public const string VsVersion = "8.0.0.0"; public const string FxFileVersion = "3.0.4506.648"; public const string WinFileVersion = "6.0.6001.17014"; // Versions of .NET Framework 2.0 RTM //public const string FxVersion = "2.0.0.0"; //public const string VsVersion = "8.0.0.0"; //public const string FxFileVersion = "2.0.50727.42"; //public const string VsFileVersion = "8.0.50727.42"; #elif NET_1_1 // Versions of .NET Framework 1.1 SP1 public const string FxVersion = "1.0.5000.0"; public const string VsVersion = "7.0.5000.0"; public const string FxFileVersion = "1.1.4322.2032"; public const string VsFileVersion = "7.10.6001.4"; #elif NET_1_0 // Versions of .NET Framework 1.0 SP3 public const string FxVersion = "1.0.3300.0"; public const string VsVersion = "7.0.3300.0"; public const string FxFileVersion = "1.0.3705.6018"; public const string VsFileVersion = "7.0.9951.0"; #else #error No profile symbols defined. #endif // // Use these assembly name constants to make code more maintainable. // public const string AssemblyI18N = "I18N, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756"; public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; #if NET_2_0 public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=" + VsVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; #endif public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=" + VsVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; public const string AssemblyMono_Http = "Mono.Http, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756"; public const string AssemblyMono_Posix = "Mono.Posix, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756"; public const string AssemblyMono_Security = "Mono.Security, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756"; public const string AssemblyCorlib = "mscorlib, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089"; public const string AssemblySystem = "System, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089"; public const string AssemblySystem_Data = "System.Data, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089"; public const string AssemblySystem_Design = "System.Design, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; public const string AssemblySystem_Drawing = "System.Drawing, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; public const string AssemblySystem_Messaging = "System.Messaging, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; public const string AssemblySystem_Security = "System.Security, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; public const string AssemblySystem_Web = "System.Web, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089"; } mono-uia-2.1/install-sh0000755000016200000000000003253711270444233015442 0ustar00hudsonroot00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # 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 CONNEC- # TION 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 deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: mono-uia-2.1/UIAutomationTypes/0000777000016200001670000000000011433571554017376 5ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationTypes/System.Windows.Automation.Text/0000777000016200001670000000000011433571554025355 5ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationTypes/System.Windows.Automation.Text/OutlineStyles.cs0000644000016200001670000000273611433571545030533 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Mario Carrion // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation.Text { [ComVisible (true)] [Flags] [Guid ("1F57B37D-CB59-43f4-95E0-7C9E40DB427E")] public enum OutlineStyles { None = 0, Outline = 1, Shadow = 2, Engraved = 4, Embossed = 8 } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation.Text/FlowDirections.cs0000644000016200001670000000273211433571545030637 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Mario Carrion // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation.Text { [ComVisible (true)] [Flags] [Guid ("2E22CC6B-7C34-4002-91AA-E103A09D1027")] public enum FlowDirections { Default = 0, RightToLeft = 1, BottomToTop = 2, Vertical = 4 } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation.Text/AnimationStyle.cs0000644000016200001670000000305011433571545030636 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Mario Carrion // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation.Text { [ComVisible (true)] [Guid ("B6C08F15-AA5E-4754-9E4C-AA279D3F36D4")] public enum AnimationStyle { None = 0, LasVegasLights = 1, BlinkingBackground = 2, SparkleText = 3, MarchingBlackAnts = 4, MarchingRedAnts = 5, Shimmer = 6, Other = -1 } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation.Text/BulletStyle.cs0000644000016200001670000000303311433571545030147 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Mario Carrion // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation.Text { [ComVisible (true)] [Guid ("814FAC6C-F8DE-4682-AF5F-37C4F720990C")] public enum BulletStyle { None = 0, HollowRoundBullet = 1, FilledRoundBullet = 2, HollowSquareBullet = 3, FilledSquareBullet = 4, DashBullet = 5, Other = -1 } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation.Text/TextUnit.cs0000644000016200001670000000276211433571545027473 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation.Text { [ComVisible (true)] [Guid ("A044E5C8-FC20-4747-8CC8-1487F9CBB680")] public enum TextUnit { Character = 0, Format = 1, Word = 2, Line = 3, Paragraph = 4, Page = 5, Document = 6, } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation.Text/CapStyle.cs0000644000016200001670000000300311433571545027420 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Mario Carrion // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation.Text { [ComVisible (true)] [Guid ("4E33C74B-7848-4f1e-B819-A0D866C2EA1F")] public enum CapStyle { None = 0, SmallCap = 1, AllCap = 2, AllPetiteCaps = 3, PetiteCaps = 4, Unicase = 5, Titling = 6, Other = -1 } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation.Text/HorizontalTextAlignment.cs0000644000016200001670000000271711433571545032544 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Mario Carrion // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation.Text { [ComVisible (true)] [Guid ("1FBE7021-A1E4-4e9b-BE94-2C7DFA59D5DD")] public enum HorizontalTextAlignment { Left = 0, Centered = 1, Right = 2, Justified = 3 } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation.Text/TextDecorationLineStyle.cs0000644000016200001670000000331711433571545032471 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Mario Carrion // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation.Text { [ComVisible (true)] [Guid ("909D8633-2941-428e-A549-C752E2FC078C")] public enum TextDecorationLineStyle { None = 0, Single = 1, WordsOnly = 2, Double = 3, Dot = 4, Dash = 5, DashDot = 6, DashDotDot = 7, Wavy = 8, ThickSingle = 9, DoubleWavy = 11, ThickWavy = 12, LongDash = 13, ThickDash = 14, ThickDashDot = 15, ThickDashDotDot = 16, ThickDot = 17, ThickLongDash = 18, Other = -1 } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation.Text/TextPatternRangeEndpoint.cs0000644000016200001670000000266611433571545032652 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation.Text { [ComVisible (true)] [Guid ("62242CAC-9CD0-4364-813D-4F0A36DD842D")] public enum TextPatternRangeEndpoint { Start = 0, End = 1, } } mono-uia-2.1/UIAutomationTypes/Makefile.am0000644000016200001670000001144411433571545021432 0ustar00hudsonhudson00000000000000 EXTRA_DIST = ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_FLAGS = -lib:@expanded_libdir@/mono/2.0 -lib:../bin -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" -d:NET_2_0 ASSEMBLY = ../bin/UIAutomationTypes.dll ASSEMBLY_MDB = $(ASSEMBLY).mdb COMPILE_TARGET = library PROJECT_REFERENCES = BUILD_DIR = ../bin PACKAGE_FLAG = /package accessibility UIAUTOMATIONTYPES_DLL_MDB_SOURCE=../bin/UIAutomationTypes.dll.mdb UIAUTOMATIONTYPES_DLL_MDB=$(BUILD_DIR)/UIAutomationTypes.dll.mdb AL=al2 SATELLITE_ASSEMBLY_NAME=Mono.UIAutomation.Types.resources.dll PROGRAMFILES = \ $(UIAUTOMATIONTYPES_DLL_MDB) RESGEN=resgen2 all: $(ASSEMBLY) $(PROGRAMFILES) PROJECT_SOURCE_FILES = \ System.Windows.Automation.Text/AnimationStyle.cs \ System.Windows.Automation.Text/BulletStyle.cs \ System.Windows.Automation.Text/CapStyle.cs \ System.Windows.Automation.Text/FlowDirections.cs \ System.Windows.Automation.Text/HorizontalTextAlignment.cs \ System.Windows.Automation.Text/OutlineStyles.cs \ System.Windows.Automation.Text/TextDecorationLineStyle.cs \ System.Windows.Automation.Text/TextPatternRangeEndpoint.cs \ System.Windows.Automation.Text/TextUnit.cs \ System.Windows.Automation/AsyncContentLoadedEventArgs.cs \ System.Windows.Automation/AutomationElementIdentifiers.cs \ System.Windows.Automation/AutomationEvent.cs \ System.Windows.Automation/AutomationEventArgs.cs \ System.Windows.Automation/AutomationIdentifier.cs \ System.Windows.Automation/AutomationPattern.cs \ System.Windows.Automation/AutomationProperty.cs \ System.Windows.Automation/AutomationPropertyChangedEventArgs.cs \ System.Windows.Automation/AutomationTextAttribute.cs \ System.Windows.Automation/CaretPatternIdentifiers.cs \ System.Windows.Automation/ClipboardPatternIdentifiers.cs \ System.Windows.Automation/ControlType.cs \ System.Windows.Automation/DockPatternIdentifiers.cs \ System.Windows.Automation/DockPosition.cs \ System.Windows.Automation/EditableRangePatternIdentifiers.cs \ System.Windows.Automation/ElementNotAvailableException.cs \ System.Windows.Automation/ElementNotEnabledException.cs \ System.Windows.Automation/EmbeddedImagePatternIdentifiers.cs \ System.Windows.Automation/ExpandCollapsePatternIdentifiers.cs \ System.Windows.Automation/ExpandCollapseState.cs \ System.Windows.Automation/GridItemPatternIdentifiers.cs \ System.Windows.Automation/GridPatternIdentifiers.cs \ System.Windows.Automation/InsertDeleteTextPatternIdentifiers.cs \ System.Windows.Automation/InvokePatternIdentifiers.cs \ System.Windows.Automation/KeyEventArgs.cs \ System.Windows.Automation/MultipleViewPatternIdentifiers.cs \ System.Windows.Automation/NoClickablePointException.cs \ System.Windows.Automation/OrientationType.cs \ System.Windows.Automation/ProxyAssemblyNotLoadedException.cs \ System.Windows.Automation/RangeValuePatternIdentifiers.cs \ System.Windows.Automation/RowOrColumnMajor.cs \ System.Windows.Automation/ScrollAmount.cs \ System.Windows.Automation/ScrollItemPatternIdentifiers.cs \ System.Windows.Automation/ScrollPatternIdentifiers.cs \ System.Windows.Automation/SelectionItemPatternIdentifiers.cs \ System.Windows.Automation/SelectionPatternIdentifiers.cs \ System.Windows.Automation/StructureChangedEventArgs.cs \ System.Windows.Automation/StructureChangeType.cs \ System.Windows.Automation/SupportedTextSelection.cs \ System.Windows.Automation/TableItemPatternIdentifiers.cs \ System.Windows.Automation/TablePatternIdentifiers.cs \ System.Windows.Automation/TextPatternIdentifiers.cs \ System.Windows.Automation/TogglePatternIdentifiers.cs \ System.Windows.Automation/ToggleState.cs \ System.Windows.Automation/TransformPatternIdentifiers.cs \ System.Windows.Automation/TreeScope.cs \ System.Windows.Automation/ValuePatternIdentifiers.cs \ System.Windows.Automation/WindowClosedEventArgs.cs \ System.Windows.Automation/WindowInteractionState.cs \ System.Windows.Automation/WindowPatternIdentifiers.cs \ System.Windows.Automation/WindowVisualState.cs FILES = \ AssemblyInfo.cs \ ../build/common/*.cs \ $(PROJECT_SOURCE_FILES) DATA_FILES = RESOURCES = REFERENCES = \ WindowsBase \ System \ Mono.Posix DLL_REFERENCES = CLEANFILES = $(PROGRAMFILES) install-data-local: gac-install uninstall-local: gac-uninstall include $(top_srcdir)/Makefile.include $(eval $(call emit_resgen_targets)) $(build_xamlg_list): %.xaml.g.cs: %.xaml xamlg '$<' $(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list) mkdir -p $(shell dirname $(ASSEMBLY)) $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) sn -q -R $(ASSEMBLY) $(top_srcdir)/mono.snk mono-uia-2.1/UIAutomationTypes/AssemblyInfo.cs.in0000644000016200001670000000701211433571545022721 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Resources; using System.Reflection; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security; using System.Security.Permissions; // General Information about the UIAutomationTypes assembly // v3.0 Assembly [assembly: AssemblyCompany (Consts.MonoCompany)] [assembly: AssemblyProduct (Consts.MonoProduct)] [assembly: AssemblyCopyright (Consts.MonoCopyright)] [assembly: AssemblyVersion (Consts.FxVersion)] [assembly: AssemblyFileVersion (Consts.WinFileVersion)] [assembly: NeutralResourcesLanguage ("en")] [assembly: CLSCompliant (true)] [assembly: AssemblyDelaySign (true)] [assembly: AssemblyKeyFile ("@abs_top_srcdir@/winfx3.pub")] [assembly: ComVisible (false)] [assembly: AllowPartiallyTrustedCallers] [assembly: CompilationRelaxations (CompilationRelaxations.NoStringInterning)] [assembly: Debuggable (DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: RuntimeCompatibility (WrapNonExceptionThrows = true)] [assembly: PermissionSet (SecurityAction.RequestMinimum, Name = "FullTrust")] [assembly: SecurityPermission (SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: InternalsVisibleTo("UIAutomationWinforms, PublicKey=00240000048000009400000006020000002400005253413100040000110000004bb98b1af6c1df0df8c02c380e116b7a7f0c8c827aecfccddc6e29b7c754cd608b49dfcef4df9699ad182e50f66afa4e68dabc7b6aeeec0aa4719a5f8e0aae8c193080a706adc3443a8356b1f254142034995532ac176398e12a30f6a74a119a89ac47672c9ae24d7e90de686557166e3b873cd707884431a0451d9d6f7fe795")] [assembly: InternalsVisibleTo("UiaAtkBridge, PublicKey=00240000048000009400000006020000002400005253413100040000110000004bb98b1af6c1df0df8c02c380e116b7a7f0c8c827aecfccddc6e29b7c754cd608b49dfcef4df9699ad182e50f66afa4e68dabc7b6aeeec0aa4719a5f8e0aae8c193080a706adc3443a8356b1f254142034995532ac176398e12a30f6a74a119a89ac47672c9ae24d7e90de686557166e3b873cd707884431a0451d9d6f7fe795")] [assembly: InternalsVisibleTo("UIAutomationWinformsTests, PublicKey=00240000048000009400000006020000002400005253413100040000110000004bb98b1af6c1df0df8c02c380e116b7a7f0c8c827aecfccddc6e29b7c754cd608b49dfcef4df9699ad182e50f66afa4e68dabc7b6aeeec0aa4719a5f8e0aae8c193080a706adc3443a8356b1f254142034995532ac176398e12a30f6a74a119a89ac47672c9ae24d7e90de686557166e3b873cd707884431a0451d9d6f7fe795")] mono-uia-2.1/UIAutomationTypes/AssemblyInfo.cs0000644000016200001670000000706711433571553022325 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Resources; using System.Reflection; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security; using System.Security.Permissions; // General Information about the UIAutomationTypes assembly // v3.0 Assembly [assembly: AssemblyCompany (Consts.MonoCompany)] [assembly: AssemblyProduct (Consts.MonoProduct)] [assembly: AssemblyCopyright (Consts.MonoCopyright)] [assembly: AssemblyVersion (Consts.FxVersion)] [assembly: AssemblyFileVersion (Consts.WinFileVersion)] [assembly: NeutralResourcesLanguage ("en")] [assembly: CLSCompliant (true)] [assembly: AssemblyDelaySign (true)] [assembly: AssemblyKeyFile ("/var/lib/hudson/jobs/_uia_tag_tarballs/workspace/UIAutomation/winfx3.pub")] [assembly: ComVisible (false)] [assembly: AllowPartiallyTrustedCallers] [assembly: CompilationRelaxations (CompilationRelaxations.NoStringInterning)] [assembly: Debuggable (DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: RuntimeCompatibility (WrapNonExceptionThrows = true)] [assembly: PermissionSet (SecurityAction.RequestMinimum, Name = "FullTrust")] [assembly: SecurityPermission (SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: InternalsVisibleTo("UIAutomationWinforms, PublicKey=00240000048000009400000006020000002400005253413100040000110000004bb98b1af6c1df0df8c02c380e116b7a7f0c8c827aecfccddc6e29b7c754cd608b49dfcef4df9699ad182e50f66afa4e68dabc7b6aeeec0aa4719a5f8e0aae8c193080a706adc3443a8356b1f254142034995532ac176398e12a30f6a74a119a89ac47672c9ae24d7e90de686557166e3b873cd707884431a0451d9d6f7fe795")] [assembly: InternalsVisibleTo("UiaAtkBridge, PublicKey=00240000048000009400000006020000002400005253413100040000110000004bb98b1af6c1df0df8c02c380e116b7a7f0c8c827aecfccddc6e29b7c754cd608b49dfcef4df9699ad182e50f66afa4e68dabc7b6aeeec0aa4719a5f8e0aae8c193080a706adc3443a8356b1f254142034995532ac176398e12a30f6a74a119a89ac47672c9ae24d7e90de686557166e3b873cd707884431a0451d9d6f7fe795")] [assembly: InternalsVisibleTo("UIAutomationWinformsTests, PublicKey=00240000048000009400000006020000002400005253413100040000110000004bb98b1af6c1df0df8c02c380e116b7a7f0c8c827aecfccddc6e29b7c754cd608b49dfcef4df9699ad182e50f66afa4e68dabc7b6aeeec0aa4719a5f8e0aae8c193080a706adc3443a8356b1f254142034995532ac176398e12a30f6a74a119a89ac47672c9ae24d7e90de686557166e3b873cd707884431a0451d9d6f7fe795")] mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/0000777000016200001670000000000011433571554024432 5ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/SupportedTextSelection.cs0000644000016200001670000000271211433571545031457 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation { [Guid ("3d9e3d8f-bfb0-484f-84ab-93ff4280cbc4")] [ComVisible (true)] [Flags] public enum SupportedTextSelection { None = 0, Single = 1, Multiple = 2, } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/InvokePatternIdentifiers.cs0000644000016200001670000000355611433571545031745 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; namespace System.Windows.Automation { public static class InvokePatternIdentifiers { #region Constructor private const int PatternId = 10000; private const int InvokedEventId = 20009; static InvokePatternIdentifiers () { InvokedEvent = new AutomationEvent (InvokedEventId, "InvokePatternIdentifiers.InvokedEvent"); Pattern = new AutomationPattern (PatternId, "InvokePatternIdentifiers.Pattern"); } #endregion #region Public Fields public static readonly AutomationEvent InvokedEvent; public static readonly AutomationPattern Pattern; #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/SelectionItemPatternIdentifiers.cs0000644000016200001670000000616011433571545033250 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; namespace System.Windows.Automation { public static class SelectionItemPatternIdentifiers { #region Constructor private const int PatternId = 10010; private const int ElementAddedToSelectionEventId = 20010; private const int ElementRemovedFromSelectionEventId = 20011; private const int ElementSelectedEventId = 20012; private const int IsSelectedPropertyId = 30079; private const int SelectionContainerPropertyId = 30080; static SelectionItemPatternIdentifiers () { Pattern = new AutomationPattern (PatternId, "SelectionItemPatternIdentifiers.Pattern"); ElementAddedToSelectionEvent = new AutomationEvent (ElementAddedToSelectionEventId, "SelectionItemPatternIdentifiers.ElementAddedToSelectionEvent"); ElementRemovedFromSelectionEvent = new AutomationEvent (ElementRemovedFromSelectionEventId, "SelectionItemPatternIdentifiers.ElementRemovedFromSelectionEvent"); ElementSelectedEvent = new AutomationEvent (ElementSelectedEventId, "SelectionItemPatternIdentifiers.ElementSelectedEvent"); IsSelectedProperty = new AutomationProperty (IsSelectedPropertyId, "SelectionItemPatternIdentifiers.IsSelectedProperty"); SelectionContainerProperty = new AutomationProperty (SelectionContainerPropertyId, "SelectionItemPatternIdentifiers.SelectionContainerProperty"); } #endregion #region Public Fields public static readonly AutomationPattern Pattern; public static readonly AutomationEvent ElementAddedToSelectionEvent; public static readonly AutomationEvent ElementRemovedFromSelectionEvent; public static readonly AutomationEvent ElementSelectedEvent; public static readonly AutomationProperty IsSelectedProperty; public static readonly AutomationProperty SelectionContainerProperty; #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/ScrollItemPatternIdentifiers.cs0000644000016200001670000000320011433571545032551 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Mario Carrion // using System; namespace System.Windows.Automation { public static class ScrollItemPatternIdentifiers { #region Constructor private const int PatternId = 10017; static ScrollItemPatternIdentifiers () { Pattern = new AutomationPattern (PatternId, "ScrollItemPatternIdentifiers.Pattern"); } #endregion #region Public Fields public static readonly AutomationPattern Pattern; #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/DockPatternIdentifiers.cs0000644000016200001670000000366711433571545031375 0ustar00hudsonhudson00000000000000//// 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. //// //// Copyright (c) 2008 Novell, Inc. (http://www.novell.com) //// //// Authors: //// Stephen Shaw //// // using System; namespace System.Windows.Automation { public static class DockPatternIdentifiers { #region Constructor private const int PatternId = 10011; private const int DockPositionPropertyId = 30069; static DockPatternIdentifiers () { Pattern = new AutomationPattern (PatternId, "DockPatternIdentifiers.Pattern"); DockPositionProperty = new AutomationProperty (DockPositionPropertyId, "DockPatternIdentifiers.DockPositionProperty"); } #endregion #region Public Fields public static readonly AutomationProperty DockPositionProperty; public static readonly AutomationPattern Pattern; #endregion } }mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/DockPosition.cs0000644000016200001670000000272711433571545027372 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation { [ComVisible (true)] [Guid ("70d46e77-e3a8-449d-913c-e30eb2afecdb")] public enum DockPosition { Top = 0, Left = 1, Bottom = 2, Right = 3, Fill = 4, None = 5, } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/RowOrColumnMajor.cs0000644000016200001670000000271111433571545030175 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation { [Guid ("15fdf2e2-9847-41cd-95dd-510612a025ea")] [ComVisible (true)] public enum RowOrColumnMajor { RowMajor = 0, ColumnMajor = 1, Indeterminate = 2, } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/TablePatternIdentifiers.cs0000644000016200001670000000462311433571545031535 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; namespace System.Windows.Automation { public static class TablePatternIdentifiers { #region Constructor private const int PatternId = 10012; private const int ColumnHeadersPropertyId = 30082; private const int RowHeadersPropertyId = 30081; private const int RowOrColumnMajorPropertyId = 30083; static TablePatternIdentifiers () { Pattern = new AutomationPattern (PatternId, "TablePatternIdentifiers.Pattern"); ColumnHeadersProperty = new AutomationProperty (ColumnHeadersPropertyId, "TablePatternIdentifiers.ColumnHeadersProperty"); RowHeadersProperty = new AutomationProperty (RowHeadersPropertyId, "TablePatternIdentifiers.RowHeadersProperty"); RowOrColumnMajorProperty = new AutomationProperty (RowOrColumnMajorPropertyId, "TablePatternIdentifiers.RowOrColumnMajorProperty"); } #endregion #region Public Fields public static readonly AutomationProperty ColumnHeadersProperty; public static readonly AutomationPattern Pattern; public static readonly AutomationProperty RowHeadersProperty; public static readonly AutomationProperty RowOrColumnMajorProperty; #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/NoClickablePointException.cs0000644000016200001670000000372111433571545032017 0ustar00hudsonhudson00000000000000//// 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. //// //// Copyright (c) 2008 Novell, Inc. (http://www.novell.com) //// //// Authors: //// Stephen Shaw //// // using System; using System.Runtime.Serialization; namespace System.Windows.Automation { public class NoClickablePointException : Exception { #region Constructors public NoClickablePointException() { } public NoClickablePointException(string message) : base(message) { } protected NoClickablePointException(SerializationInfo info, StreamingContext context) : base(info, context) { } public NoClickablePointException(string message, Exception innerException) : base(message, innerException) { } #endregion #region Exception Overrides public override void GetObjectData (SerializationInfo info, StreamingContext context) { throw new NotImplementedException (); } #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/ProxyAssemblyNotLoadedException.cs0000644000016200001670000000376011433571545033255 0ustar00hudsonhudson00000000000000//// 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. //// //// Copyright (c) 2008 Novell, Inc. (http://www.novell.com) //// //// Authors: //// Stephen Shaw //// // using System; using System.Runtime.Serialization; namespace System.Windows.Automation { public class ProxyAssemblyNotLoadedException : Exception { #region Constructors public ProxyAssemblyNotLoadedException() { } public ProxyAssemblyNotLoadedException(string message) : base(message) { } protected ProxyAssemblyNotLoadedException(SerializationInfo info, StreamingContext context) : base(info, context) { } public ProxyAssemblyNotLoadedException(string message, Exception innerException) : base (message, innerException) { } #endregion #region Exception Overrides public override void GetObjectData (SerializationInfo info, StreamingContext context) { throw new NotImplementedException (); } #endregion } }mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/ElementNotAvailableException.cs0000644000016200001670000000412411433571545032510 0ustar00hudsonhudson00000000000000//// 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. //// //// Copyright (c) 2008 Novell, Inc. (http://www.novell.com) //// //// Authors: //// Stephen Shaw //// // using System; using System.Runtime.Serialization; namespace System.Windows.Automation { public class ElementNotAvailableException : SystemException { #region Constructors public ElementNotAvailableException() { } public ElementNotAvailableException( Exception innerException ) : base(string.Empty, innerException) { } public ElementNotAvailableException(string message) : base(message) { } protected ElementNotAvailableException(SerializationInfo info, StreamingContext context) : base(info, context) { } public ElementNotAvailableException(string message, Exception innerException) : base (message, innerException) { } #endregion #region Exception Overrides public override void GetObjectData (SerializationInfo info, StreamingContext context) { throw new NotImplementedException (); } #endregion } }mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/OrientationType.cs0000644000016200001670000000267211433571545030121 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Mario Carrion // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation { [ComVisible (true)] [Guid ("5F8A77B4-E685-48c1-94D0-8BB6AFA43DF9")] public enum OrientationType { None = 0, Horizontal = 1, Vertical = 2 } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/ScrollAmount.cs0000644000016200001670000000276511433571545027411 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation { [Guid ("bd52d3c7-f990-4c52-9ae3-5c377e9eb772")] [ComVisible (true)] public enum ScrollAmount { LargeDecrement = 0, SmallDecrement = 1, NoAmount = 2, LargeIncrement = 3, SmallIncrement = 4, } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/TextPatternIdentifiers.cs0000644000016200001670000002731011433571545031430 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; namespace System.Windows.Automation { public static class TextPatternIdentifiers { #region Constructor private const int PatternId = 10014; private const int CaretMovedEventId = 60004; private const int TextChangedEventId = 20015; private const int TextSelectionChangedEventId = 20014; private const int AnimationStyleAttributeId = 40000; private const int BackgroundColorAttributeId = 40001; private const int BulletStyleAttributeId = 40002; private const int CapStyleAttributeId = 40003; private const int CultureAttributeId = 40004; private const int FontNameAttributeId = 40005; private const int FontSizeAttributeId = 40006; private const int FontWeightAttributeId = 40007; private const int ForegroundColorAttributeId = 40008; private const int HorizontalTextAlignmentAttributeId = 40009; private const int IndentationFirstLineAttributeId = 40010; private const int IndentationLeadingAttributeId = 40011; private const int IndentationTrailingAttributeId = 40012; private const int IsHiddenAttributeId = 40013; private const int IsItalicAttributeId = 40014; private const int IsReadOnlyAttributeId = 40015; private const int IsSubscriptAttributeId = 40016; private const int IsSuperscriptAttributeId = 40017; private const int MarginBottomAttributeId = 40018; private const int MarginLeadingAttributeId = 40019; private const int MarginTopAttributeId = 40020; private const int MarginTrailingAttributeId = 40021; private const int OutlineStylesAttributeId = 40022; private const int OverlineColorAttributeId = 40023; private const int OverlineStyleAttributeId = 40024; private const int StrikethroughColorAttributeId = 40025; private const int StrikethroughStyleAttributeId = 40026; private const int TabsAttributeId = 40027; private const int TextFlowDirectionsAttributeId = 40028; private const int UnderlineColorAttributeId = 40029; private const int UnderlineStyleAttributeId = 40030; static TextPatternIdentifiers () { MixedAttributeValue = new object (); Pattern = new AutomationPattern (PatternId, "TextPatternIdentifiers.Pattern"); CaretMovedEvent = new AutomationEvent (CaretMovedEventId, "TextPatternIdentifiers.CaretMovedEvent"); TextChangedEvent = new AutomationEvent (TextChangedEventId, "TextPatternIdentifiers.TextChangedEvent"); TextSelectionChangedEvent = new AutomationEvent (TextSelectionChangedEventId, "TextPatternIdentifiers.TextSelectionChangedEvent"); AnimationStyleAttribute = new AutomationTextAttribute (AnimationStyleAttributeId, "TextPatternIdentifiers.AnimationStyleAttribute"); BackgroundColorAttribute = new AutomationTextAttribute (BackgroundColorAttributeId, "TextPatternIdentifiers.BackgroundColorAttribute"); BulletStyleAttribute = new AutomationTextAttribute (BulletStyleAttributeId, "TextPatternIdentifiers.BulletStyleAttribute"); CapStyleAttribute = new AutomationTextAttribute (CapStyleAttributeId, "TextPatternIdentifiers.CapStyleAttribute"); CultureAttribute = new AutomationTextAttribute (CultureAttributeId, "TextPatternIdentifiers.CultureAttribute"); FontNameAttribute = new AutomationTextAttribute (FontNameAttributeId, "TextPatternIdentifiers.FontNameAttribute"); FontSizeAttribute = new AutomationTextAttribute (FontSizeAttributeId, "TextPatternIdentifiers.FontSizeAttribute"); FontWeightAttribute = new AutomationTextAttribute (FontWeightAttributeId, "TextPatternIdentifiers.FontWeightAttribute"); ForegroundColorAttribute = new AutomationTextAttribute (ForegroundColorAttributeId, "TextPatternIdentifiers.ForegroundColorAttribute"); HorizontalTextAlignmentAttribute = new AutomationTextAttribute (HorizontalTextAlignmentAttributeId, "TextPatternIdentifiers.HorizontalTextAlignmentAttribute"); IndentationFirstLineAttribute = new AutomationTextAttribute (IndentationFirstLineAttributeId, "TextPatternIdentifiers.IndentationFirstLineAttribute"); IndentationLeadingAttribute = new AutomationTextAttribute (IndentationLeadingAttributeId, "TextPatternIdentifiers.IndentationLeadingAttribute"); IndentationTrailingAttribute = new AutomationTextAttribute (IndentationTrailingAttributeId, "TextPatternIdentifiers.IndentationTrailingAttribute"); IsHiddenAttribute = new AutomationTextAttribute (IsHiddenAttributeId, "TextPatternIdentifiers.IsHiddenAttribute"); IsItalicAttribute = new AutomationTextAttribute (IsItalicAttributeId, "TextPatternIdentifiers.IsItalicAttribute"); IsReadOnlyAttribute = new AutomationTextAttribute (IsReadOnlyAttributeId, "TextPatternIdentifiers.IsReadOnlyAttribute"); IsSubscriptAttribute = new AutomationTextAttribute (IsSubscriptAttributeId, "TextPatternIdentifiers.IsSubscriptAttribute"); IsSuperscriptAttribute = new AutomationTextAttribute (IsSuperscriptAttributeId, "TextPatternIdentifiers.IsSuperscriptAttribute"); MarginBottomAttribute = new AutomationTextAttribute (MarginBottomAttributeId, "TextPatternIdentifiers.MarginBottomAttribute"); MarginLeadingAttribute = new AutomationTextAttribute (MarginLeadingAttributeId, "TextPatternIdentifiers.MarginLeadingAttribute"); MarginTopAttribute = new AutomationTextAttribute (MarginTopAttributeId, "TextPatternIdentifiers.MarginTopAttribute"); MarginTrailingAttribute = new AutomationTextAttribute (MarginTrailingAttributeId, "TextPatternIdentifiers.MarginTrailingAttribute"); OutlineStylesAttribute = new AutomationTextAttribute (OutlineStylesAttributeId, "TextPatternIdentifiers.OutlineStylesAttribute"); OverlineColorAttribute = new AutomationTextAttribute (OverlineColorAttributeId, "TextPatternIdentifiers.OverlineColorAttribute"); OverlineStyleAttribute = new AutomationTextAttribute (OverlineStyleAttributeId, "TextPatternIdentifiers.OverlineStyleAttribute"); StrikethroughColorAttribute = new AutomationTextAttribute (StrikethroughColorAttributeId, "TextPatternIdentifiers.StrikethroughColorAttribute"); StrikethroughStyleAttribute = new AutomationTextAttribute (StrikethroughStyleAttributeId, "TextPatternIdentifiers.StrikethroughStyleAttribute"); TabsAttribute = new AutomationTextAttribute (TabsAttributeId, "TextPatternIdentifiers.TabsAttribute"); TextFlowDirectionsAttribute = new AutomationTextAttribute (TextFlowDirectionsAttributeId, "TextPatternIdentifiers.TextFlowDirectionsAttribute"); UnderlineColorAttribute = new AutomationTextAttribute (UnderlineColorAttributeId, "TextPatternIdentifiers.UnderlineColorAttribute"); UnderlineStyleAttribute = new AutomationTextAttribute (UnderlineStyleAttributeId, "TextPatternIdentifiers.UnderlineStyleAttribute"); } #endregion #region Public Fields public static readonly AutomationTextAttribute AnimationStyleAttribute; public static readonly AutomationTextAttribute BackgroundColorAttribute; public static readonly AutomationTextAttribute BulletStyleAttribute; public static readonly AutomationTextAttribute CapStyleAttribute; public static readonly AutomationTextAttribute CultureAttribute; public static readonly AutomationTextAttribute FontNameAttribute; public static readonly AutomationTextAttribute FontSizeAttribute; public static readonly AutomationTextAttribute FontWeightAttribute; public static readonly AutomationTextAttribute ForegroundColorAttribute; public static readonly AutomationTextAttribute HorizontalTextAlignmentAttribute; public static readonly AutomationTextAttribute IndentationFirstLineAttribute; public static readonly AutomationTextAttribute IndentationLeadingAttribute; public static readonly AutomationTextAttribute IndentationTrailingAttribute; public static readonly AutomationTextAttribute IsHiddenAttribute; public static readonly AutomationTextAttribute IsItalicAttribute; public static readonly AutomationTextAttribute IsReadOnlyAttribute; public static readonly AutomationTextAttribute IsSubscriptAttribute; public static readonly AutomationTextAttribute IsSuperscriptAttribute; public static readonly AutomationTextAttribute MarginBottomAttribute; public static readonly AutomationTextAttribute MarginLeadingAttribute; public static readonly AutomationTextAttribute MarginTopAttribute; public static readonly AutomationTextAttribute MarginTrailingAttribute; public static readonly Object MixedAttributeValue; public static readonly AutomationTextAttribute OutlineStylesAttribute; public static readonly AutomationTextAttribute OverlineColorAttribute; public static readonly AutomationTextAttribute OverlineStyleAttribute; public static readonly AutomationPattern Pattern; public static readonly AutomationTextAttribute StrikethroughColorAttribute; public static readonly AutomationTextAttribute StrikethroughStyleAttribute; public static readonly AutomationTextAttribute TabsAttribute; internal static readonly AutomationEvent CaretMovedEvent; public static readonly AutomationEvent TextChangedEvent; public static readonly AutomationTextAttribute TextFlowDirectionsAttribute; public static readonly AutomationEvent TextSelectionChangedEvent; public static readonly AutomationTextAttribute UnderlineColorAttribute; public static readonly AutomationTextAttribute UnderlineStyleAttribute; #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/StructureChangeType.cs0000644000016200001670000000304211433571545030724 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation { [ComVisible (true)] [Guid ("e4cfef41-071d-472c-a65c-c14f59ea81eb")] public enum StructureChangeType { ChildAdded = 0, ChildRemoved = 1, ChildrenInvalidated = 2, ChildrenBulkAdded = 3, ChildrenBulkRemoved = 4, ChildrenReordered = 5, } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/ExpandCollapsePatternIdentifiers.cs0000644000016200001670000000374311433571545033412 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; namespace System.Windows.Automation { public static class ExpandCollapsePatternIdentifiers { #region Constructor private const int PatternId = 10005; private const int ExpandCollapseStatePropertyId = 30070; static ExpandCollapsePatternIdentifiers () { Pattern = new AutomationPattern (PatternId, "ExpandCollapsePatternIdentifiers.Pattern"); ExpandCollapseStateProperty = new AutomationProperty (ExpandCollapseStatePropertyId, "ExpandCollapsePatternIdentifiers.ExpandCollapseStateProperty"); } #endregion #region Public Fields public static readonly AutomationPattern Pattern; public static readonly AutomationProperty ExpandCollapseStateProperty; #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/WindowInteractionState.cs0000644000016200001670000000300511433571545031423 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation { [ComVisible (true)] [Guid ("65101cc7-7904-408e-87a7-8c6dbd83a18b")] public enum WindowInteractionState { Running = 0, Closing = 1, ReadyForUserInteraction = 2, BlockedByModalWindow = 3, NotResponding = 4, } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/AutomationPattern.cs0000644000016200001670000000672411433571545030444 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // Mario Carrion // using System; namespace System.Windows.Automation { public class AutomationPattern : AutomationIdentifier { #region Internal Constructor internal AutomationPattern (int id, string programmaticName) : base (id, programmaticName) { } #endregion #region Public Static Methods public static AutomationPattern LookupById (int id) { if (id == ExpandCollapsePatternIdentifiers.Pattern.Id) return ExpandCollapsePatternIdentifiers.Pattern; else if (id == GridItemPatternIdentifiers.Pattern.Id) return GridItemPatternIdentifiers.Pattern; else if (id == GridPatternIdentifiers.Pattern.Id) return GridPatternIdentifiers.Pattern; else if (id == InvokePatternIdentifiers.Pattern.Id) return InvokePatternIdentifiers.Pattern; else if (id == MultipleViewPatternIdentifiers.Pattern.Id) return MultipleViewPatternIdentifiers.Pattern; else if (id == RangeValuePatternIdentifiers.Pattern.Id) return RangeValuePatternIdentifiers.Pattern; else if (id == ScrollPatternIdentifiers.Pattern.Id) return ScrollPatternIdentifiers.Pattern; else if (id == SelectionItemPatternIdentifiers.Pattern.Id) return SelectionItemPatternIdentifiers.Pattern; else if (id == SelectionPatternIdentifiers.Pattern.Id) return SelectionPatternIdentifiers.Pattern; else if (id == TablePatternIdentifiers.Pattern.Id) return TablePatternIdentifiers.Pattern; else if (id == TextPatternIdentifiers.Pattern.Id) return TextPatternIdentifiers.Pattern; else if (id == TogglePatternIdentifiers.Pattern.Id) return TogglePatternIdentifiers.Pattern; else if (id == TransformPatternIdentifiers.Pattern.Id) return TransformPatternIdentifiers.Pattern; else if (id == ValuePatternIdentifiers.Pattern.Id) return ValuePatternIdentifiers.Pattern; else if (id == WindowPatternIdentifiers.Pattern.Id) return WindowPatternIdentifiers.Pattern; else if (id == ScrollItemPatternIdentifiers.Pattern.Id) return ScrollItemPatternIdentifiers.Pattern; else if (id == DockPatternIdentifiers.Pattern.Id) return DockPatternIdentifiers.Pattern; else if (id == TableItemPatternIdentifiers.Pattern.Id) return TableItemPatternIdentifiers.Pattern; else return null; } #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/AutomationElementIdentifiers.cs0000644000016200001670000004417211433571545032605 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; namespace System.Windows.Automation { public static class AutomationElementIdentifiers { #region Internal Constants // IDs for internal use, should not conflict with MS private const int KeyEventId = 60000; private const int WindowDeactivatedEventId = 60004; private const int HasNativeAccessibilityObjectPropertyId = 60001; private const int NativeAccessibilityObjectPropertyId = 60002; private const int IsNotifyIconPropertyId = 60005; // Event IDs private const int AsyncContentLoadedEventId = 20006; private const int AutomationFocusChangedEventId = 20005; private const int AutomationPropertyChangedEventId = 20004; private const int LayoutInvalidatedEventId = 20008; private const int MenuClosedEventId = 20007; private const int MenuOpenedEventId = 20003; private const int StructureChangedEventId = 20002; private const int ToolTipClosedEventId = 20001; private const int ToolTipOpenedEventId = 20000; // Property IDs private const int AcceleratorKeyPropertyId = 30006; private const int AccessKeyPropertyId = 30007; private const int AutomationIdPropertyId = 30011; private const int BoundingRectanglePropertyId = 30001; private const int ClassNamePropertyId = 30012; private const int ClickablePointPropertyId = 30014; private const int ControlTypePropertyId = 30003; private const int CulturePropertyId = 30015; private const int FrameworkIdPropertyId = 30024; private const int HasKeyboardFocusPropertyId = 30008; private const int HelpTextPropertyId = 30013; private const int IsContentElementPropertyId = 30017; private const int IsControlElementPropertyId = 30016; private const int IsDockPatternAvailablePropertyId = 30027; private const int IsEnabledPropertyId = 30010; private const int IsExpandCollapsePatternAvailablePropertyId = 30028; private const int IsGridItemPatternAvailablePropertyId = 30029; private const int IsGridPatternAvailablePropertyId = 30030; private const int IsInvokePatternAvailablePropertyId = 30031; private const int IsKeyboardFocusablePropertyId = 30009; private const int IsMultipleViewPatternAvailablePropertyId = 30032; private const int IsOffscreenPropertyId = 30022; private const int IsPasswordPropertyId = 30019; private const int IsRangeValuePatternAvailablePropertyId = 30033; private const int IsRequiredForFormPropertyId = 30025; private const int IsScrollItemPatternAvailablePropertyId = 30035; private const int IsScrollPatternAvailablePropertyId = 30034; private const int IsSelectionItemPatternAvailablePropertyId = 30036; private const int IsSelectionPatternAvailablePropertyId = 30037; private const int IsTableItemPatternAvailablePropertyId = 30039; private const int IsTablePatternAvailablePropertyId = 30038; private const int IsTextPatternAvailablePropertyId = 30040; private const int IsTogglePatternAvailablePropertyId = 30041; private const int IsTransformPatternAvailablePropertyId = 30042; private const int IsValuePatternAvailablePropertyId = 30043; private const int IsWindowPatternAvailablePropertyId = 30044; private const int ItemStatusPropertyId = 30026; private const int ItemTypePropertyId = 30021; private const int LabeledByPropertyId = 30018; private const int LocalizedControlTypePropertyId = 30004; private const int NamePropertyId = 30005; private const int NativeWindowHandlePropertyId = 30020; private const int OrientationPropertyId = 30023; private const int ProcessIdPropertyId = 30002; private const int RuntimeIdPropertyId = 30000; #endregion #region Static Constructor static AutomationElementIdentifiers () { NotSupported = new object (); // Automation Properties HasNativeAccessibilityObjectProperty = new AutomationProperty (HasNativeAccessibilityObjectPropertyId, "AutomationElementIdentifiers.HasNativeAccessibilityObjectProperty"); NativeAccessibilityObjectProperty = new AutomationProperty (NativeAccessibilityObjectPropertyId, "AutomationElementIdentifiers.NativeAccessibilityObjectProperty"); IsNotifyIconProperty = new AutomationProperty (IsNotifyIconPropertyId, "AutomationElementIdentifiers.IsNotifyIconProperty"); AcceleratorKeyProperty = new AutomationProperty (AcceleratorKeyPropertyId, "AutomationElementIdentifiers.AcceleratorKeyProperty"); AccessKeyProperty = new AutomationProperty (AccessKeyPropertyId, "AutomationElementIdentifiers.AccessKeyProperty"); AutomationIdProperty = new AutomationProperty (AutomationIdPropertyId, "AutomationElementIdentifiers.AutomationIdProperty"); BoundingRectangleProperty = new AutomationProperty (BoundingRectanglePropertyId, "AutomationElementIdentifiers.BoundingRectangleProperty"); ClassNameProperty = new AutomationProperty (ClassNamePropertyId, "AutomationElementIdentifiers.ClassNameProperty"); ClickablePointProperty = new AutomationProperty (ClickablePointPropertyId, "AutomationElementIdentifiers.ClickablePointProperty"); ControlTypeProperty = new AutomationProperty (ControlTypePropertyId, "AutomationElementIdentifiers.ControlTypeProperty"); CultureProperty = new AutomationProperty (CulturePropertyId, "AutomationElementIdentifiers.CultureProperty"); FrameworkIdProperty = new AutomationProperty (FrameworkIdPropertyId, "AutomationElementIdentifiers.FrameworkIdProperty"); HasKeyboardFocusProperty = new AutomationProperty (HasKeyboardFocusPropertyId, "AutomationElementIdentifiers.HasKeyboardFocusProperty"); HelpTextProperty = new AutomationProperty (HelpTextPropertyId, "AutomationElementIdentifiers.HelpTextProperty"); IsContentElementProperty = new AutomationProperty (IsContentElementPropertyId, "AutomationElementIdentifiers.IsContentElementProperty"); IsControlElementProperty = new AutomationProperty (IsControlElementPropertyId, "AutomationElementIdentifiers.IsControlElementProperty"); IsDockPatternAvailableProperty = new AutomationProperty (IsDockPatternAvailablePropertyId, "AutomationElementIdentifiers.IsDockPatternAvailableProperty"); IsEnabledProperty = new AutomationProperty (IsEnabledPropertyId, "AutomationElementIdentifiers.IsEnabledProperty"); IsExpandCollapsePatternAvailableProperty = new AutomationProperty (IsExpandCollapsePatternAvailablePropertyId, "AutomationElementIdentifiers.IsExpandCollapsePatternAvailableProperty"); IsGridItemPatternAvailableProperty = new AutomationProperty (IsGridItemPatternAvailablePropertyId, "AutomationElementIdentifiers.IsGridItemPatternAvailableProperty"); IsGridPatternAvailableProperty = new AutomationProperty (IsGridPatternAvailablePropertyId, "AutomationElementIdentifiers.IsGridPatternAvailableProperty"); IsInvokePatternAvailableProperty = new AutomationProperty (IsInvokePatternAvailablePropertyId, "AutomationElementIdentifiers.IsInvokePatternAvailableProperty"); IsKeyboardFocusableProperty = new AutomationProperty (IsKeyboardFocusablePropertyId, "AutomationElementIdentifiers.IsKeyboardFocusableProperty"); IsMultipleViewPatternAvailableProperty = new AutomationProperty (IsMultipleViewPatternAvailablePropertyId, "AutomationElementIdentifiers.IsMultipleViewPatternAvailableProperty"); IsOffscreenProperty = new AutomationProperty (IsOffscreenPropertyId, "AutomationElementIdentifiers.IsOffscreenProperty"); IsPasswordProperty = new AutomationProperty (IsPasswordPropertyId, "AutomationElementIdentifiers.IsPasswordProperty"); IsRangeValuePatternAvailableProperty = new AutomationProperty (IsRangeValuePatternAvailablePropertyId, "AutomationElementIdentifiers.IsRangeValuePatternAvailableProperty"); IsRequiredForFormProperty = new AutomationProperty (IsRequiredForFormPropertyId, "AutomationElementIdentifiers.IsRequiredForFormProperty"); IsScrollItemPatternAvailableProperty = new AutomationProperty (IsScrollItemPatternAvailablePropertyId, "AutomationElementIdentifiers.IsScrollItemPatternAvailableProperty"); IsScrollPatternAvailableProperty = new AutomationProperty (IsScrollPatternAvailablePropertyId, "AutomationElementIdentifiers.IsScrollPatternAvailableProperty"); IsSelectionItemPatternAvailableProperty = new AutomationProperty (IsSelectionItemPatternAvailablePropertyId, "AutomationElementIdentifiers.IsSelectionItemPatternAvailableProperty"); IsSelectionPatternAvailableProperty = new AutomationProperty (IsSelectionPatternAvailablePropertyId, "AutomationElementIdentifiers.IsSelectionPatternAvailableProperty"); IsTableItemPatternAvailableProperty = new AutomationProperty (IsTableItemPatternAvailablePropertyId, "AutomationElementIdentifiers.IsTableItemPatternAvailableProperty"); IsTablePatternAvailableProperty = new AutomationProperty (IsTablePatternAvailablePropertyId, "AutomationElementIdentifiers.IsTablePatternAvailableProperty"); IsTextPatternAvailableProperty = new AutomationProperty (IsTextPatternAvailablePropertyId, "AutomationElementIdentifiers.IsTextPatternAvailableProperty"); IsTogglePatternAvailableProperty = new AutomationProperty (IsTogglePatternAvailablePropertyId, "AutomationElementIdentifiers.IsTogglePatternAvailableProperty"); IsTransformPatternAvailableProperty = new AutomationProperty (IsTransformPatternAvailablePropertyId, "AutomationElementIdentifiers.IsTransformPatternAvailableProperty"); IsValuePatternAvailableProperty = new AutomationProperty (IsValuePatternAvailablePropertyId, "AutomationElementIdentifiers.IsValuePatternAvailableProperty"); IsWindowPatternAvailableProperty = new AutomationProperty (IsWindowPatternAvailablePropertyId, "AutomationElementIdentifiers.IsWindowPatternAvailableProperty"); ItemStatusProperty = new AutomationProperty (ItemStatusPropertyId, "AutomationElementIdentifiers.ItemStatusProperty"); ItemTypeProperty = new AutomationProperty (ItemTypePropertyId, "AutomationElementIdentifiers.ItemTypeProperty"); LabeledByProperty = new AutomationProperty (LabeledByPropertyId, "AutomationElementIdentifiers.LabeledByProperty"); LocalizedControlTypeProperty = new AutomationProperty (LocalizedControlTypePropertyId, "AutomationElementIdentifiers.LocalizedControlTypeProperty"); NameProperty = new AutomationProperty (NamePropertyId, "AutomationElementIdentifiers.NameProperty"); NativeWindowHandleProperty = new AutomationProperty (NativeWindowHandlePropertyId, "AutomationElementIdentifiers.NativeWindowHandleProperty"); OrientationProperty = new AutomationProperty (OrientationPropertyId, "AutomationElementIdentifiers.OrientationProperty"); ProcessIdProperty = new AutomationProperty (ProcessIdPropertyId, "AutomationElementIdentifiers.ProcessIdProperty"); RuntimeIdProperty = new AutomationProperty (RuntimeIdPropertyId, "AutomationElementIdentifiers.RuntimeIdProperty"); // Automation Events WindowDeactivatedEvent = new AutomationEvent (WindowDeactivatedEventId, "AutomationElementIdentifiers.WindowDeactivatedEvent"); KeyEvent = new AutomationEvent (KeyEventId, "AutomationElementIdentifiers.KeyEvent"); AsyncContentLoadedEvent = new AutomationEvent (AsyncContentLoadedEventId, "AutomationElementIdentifiers.AsyncContentLoadedEvent"); AutomationFocusChangedEvent = new AutomationEvent (AutomationFocusChangedEventId, "AutomationElementIdentifiers.AutomationFocusChangedEvent"); AutomationPropertyChangedEvent = new AutomationEvent (AutomationPropertyChangedEventId, "AutomationElementIdentifiers.AutomationPropertyChangedEvent"); LayoutInvalidatedEvent = new AutomationEvent (LayoutInvalidatedEventId, "AutomationElementIdentifiers.LayoutInvalidatedEvent"); MenuClosedEvent = new AutomationEvent (MenuClosedEventId, "AutomationElementIdentifiers.MenuClosedEvent"); MenuOpenedEvent = new AutomationEvent (MenuOpenedEventId, "AutomationElementIdentifiers.MenuOpenedEvent"); StructureChangedEvent = new AutomationEvent (StructureChangedEventId, "AutomationElementIdentifiers.StructureChangedEvent"); ToolTipClosedEvent = new AutomationEvent (ToolTipClosedEventId, "AutomationElementIdentifiers.ToolTipClosedEvent"); ToolTipOpenedEvent = new AutomationEvent (ToolTipOpenedEventId, "AutomationElementIdentifiers.ToolTipOpenedEvent"); } #endregion #region Internal Fields internal static readonly AutomationEvent WindowDeactivatedEvent; internal static readonly AutomationEvent KeyEvent; internal static readonly AutomationProperty HasNativeAccessibilityObjectProperty; internal static readonly AutomationProperty NativeAccessibilityObjectProperty; internal static readonly AutomationProperty IsNotifyIconProperty; #endregion #region Public Fields public static readonly AutomationProperty AcceleratorKeyProperty; public static readonly AutomationProperty AccessKeyProperty; public static readonly AutomationEvent AsyncContentLoadedEvent; public static readonly AutomationEvent AutomationFocusChangedEvent; public static readonly AutomationProperty AutomationIdProperty; public static readonly AutomationEvent AutomationPropertyChangedEvent; public static readonly AutomationProperty BoundingRectangleProperty; public static readonly AutomationProperty ClassNameProperty; public static readonly AutomationProperty ClickablePointProperty; public static readonly AutomationProperty ControlTypeProperty; public static readonly AutomationProperty CultureProperty; public static readonly AutomationProperty FrameworkIdProperty; public static readonly AutomationProperty HasKeyboardFocusProperty; public static readonly AutomationProperty HelpTextProperty; public static readonly AutomationProperty IsContentElementProperty; public static readonly AutomationProperty IsControlElementProperty; public static readonly AutomationProperty IsDockPatternAvailableProperty; public static readonly AutomationProperty IsEnabledProperty; public static readonly AutomationProperty IsExpandCollapsePatternAvailableProperty; public static readonly AutomationProperty IsGridItemPatternAvailableProperty; public static readonly AutomationProperty IsGridPatternAvailableProperty; public static readonly AutomationProperty IsInvokePatternAvailableProperty; public static readonly AutomationProperty IsKeyboardFocusableProperty; public static readonly AutomationProperty IsMultipleViewPatternAvailableProperty; public static readonly AutomationProperty IsOffscreenProperty; public static readonly AutomationProperty IsPasswordProperty; public static readonly AutomationProperty IsRangeValuePatternAvailableProperty; public static readonly AutomationProperty IsRequiredForFormProperty; public static readonly AutomationProperty IsScrollItemPatternAvailableProperty; public static readonly AutomationProperty IsScrollPatternAvailableProperty; public static readonly AutomationProperty IsSelectionItemPatternAvailableProperty; public static readonly AutomationProperty IsSelectionPatternAvailableProperty; public static readonly AutomationProperty IsTableItemPatternAvailableProperty; public static readonly AutomationProperty IsTablePatternAvailableProperty; public static readonly AutomationProperty IsTextPatternAvailableProperty; public static readonly AutomationProperty IsTogglePatternAvailableProperty; public static readonly AutomationProperty IsTransformPatternAvailableProperty; public static readonly AutomationProperty IsValuePatternAvailableProperty; public static readonly AutomationProperty IsWindowPatternAvailableProperty; public static readonly AutomationProperty ItemStatusProperty; public static readonly AutomationProperty ItemTypeProperty; public static readonly AutomationProperty LabeledByProperty; public static readonly AutomationEvent LayoutInvalidatedEvent; public static readonly AutomationProperty LocalizedControlTypeProperty; public static readonly AutomationEvent MenuClosedEvent; public static readonly AutomationEvent MenuOpenedEvent; public static readonly AutomationProperty NameProperty; public static readonly AutomationProperty NativeWindowHandleProperty; public static readonly Object NotSupported; public static readonly AutomationProperty OrientationProperty; public static readonly AutomationProperty ProcessIdProperty; public static readonly AutomationProperty RuntimeIdProperty; public static readonly AutomationEvent StructureChangedEvent; public static readonly AutomationEvent ToolTipClosedEvent; public static readonly AutomationEvent ToolTipOpenedEvent; #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/StructureChangedEventArgs.cs0000644000016200001670000000347011433571545032052 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; namespace System.Windows.Automation { public sealed class StructureChangedEventArgs : AutomationEventArgs { private StructureChangeType structureChangeType; private int[] runtimeId; public StructureChangeType StructureChangeType { get { return structureChangeType; } } public StructureChangedEventArgs (StructureChangeType structureChangeType, int[] runtimeId) : base (AutomationElementIdentifiers.StructureChangedEvent) { this.structureChangeType = structureChangeType; this.runtimeId = runtimeId; } public int[] GetRuntimeId () { return runtimeId; } } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/AutomationIdentifier.cs0000644000016200001670000000441511433571545031104 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; namespace System.Windows.Automation { public class AutomationIdentifier : IComparable { #region Private Fields private int id; private string programmaticName; #endregion #region Internal Constructor internal AutomationIdentifier (int id, string programmaticName) { this.id = id; this.programmaticName = programmaticName; } #endregion #region Public Properties public int Id { get { return id; } } public string ProgrammaticName { get { return programmaticName; } } #endregion #region IComparable Members public int CompareTo (object obj) { AutomationIdentifier other = obj as AutomationIdentifier; if (other == null) return 1; // TODO: What? return id.CompareTo (other.Id); } #endregion #region Public Overrides public override bool Equals (object obj) { AutomationIdentifier other = obj as AutomationIdentifier; if (other == null) return false; return id.Equals (other.Id); } public override int GetHashCode () { return id; // TODO: Verify } #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/AutomationEventArgs.cs0000644000016200001670000000300011433571545030705 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; namespace System.Windows.Automation { public class AutomationEventArgs : EventArgs { private AutomationEvent eventId; public AutomationEvent EventId { get { return eventId; } } public AutomationEventArgs (AutomationEvent eventId) { this.eventId = eventId; } } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/ExpandCollapseState.cs0000644000016200001670000000273611433571545030670 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation { [ComVisible (true)] [Guid ("76d12d7e-b227-4417-9ce2-42642ffa896a")] public enum ExpandCollapseState { Collapsed = 0, Expanded = 1, PartiallyExpanded = 2, LeafNode = 3, } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/GridPatternIdentifiers.cs0000644000016200001670000000452311433571545031372 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; namespace System.Windows.Automation { public static class GridPatternIdentifiers { #region Constructor private const int PatternId = 10006; private const int RowCountPropertyId = 30062; private const int ColumnCountPropertyId = 30063; private const int ColumnReorderedEventId = 60003; static GridPatternIdentifiers () { Pattern = new AutomationPattern (PatternId, "GridPatternIdentifiers.Pattern"); RowCountProperty = new AutomationProperty (RowCountPropertyId, "GridPatternIdentifiers.RowCountProperty"); ColumnCountProperty = new AutomationProperty (ColumnCountPropertyId, "GridPatternIdentifiers.ColumnCountProperty"); ColumnReorderedEvent = new AutomationEvent (ColumnReorderedEventId, "GridPatternIdentifiers.ColumnReorderedEvent"); } #endregion #region Public Fields public static readonly AutomationPattern Pattern; public static readonly AutomationProperty RowCountProperty; public static readonly AutomationProperty ColumnCountProperty; internal static readonly AutomationEvent ColumnReorderedEvent; #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/ControlType.cs0000644000016200001670000005450011433571545027243 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using Mono.Unix; namespace System.Windows.Automation { public class ControlType : AutomationIdentifier { #region Private Fields private string localizedControlType; private AutomationPattern [] neverSupportedPatterns; private AutomationProperty [] requiredProperties; private AutomationPattern [][] requiredPatternSets; #endregion #region Internal Constructor internal ControlType (int id, string programmaticName) : base (id, programmaticName) { } #endregion #region Public Methods public AutomationPattern [] GetNeverSupportedPatterns () { return neverSupportedPatterns; } public AutomationProperty [] GetRequiredProperties () { return requiredProperties; } public AutomationPattern [][] GetRequiredPatternSets () { return requiredPatternSets; } #endregion #region Public Properties public string LocalizedControlType { get { return localizedControlType; } } #endregion #region Internal Constants private const int ButtonId = 50000; private const int CalendarId = 50001; private const int CheckBoxId = 50002; private const int ComboBoxId = 50003; private const int CustomId = 50025; private const int DataGridId = 50028; private const int DataItemId = 50029; private const int DocumentId = 50030; private const int EditId = 50004; private const int GroupId = 50026; private const int HeaderItemId = 50035; private const int HeaderId = 50034; private const int HyperlinkId = 50005; private const int ImageId = 50006; private const int ListId = 50008; private const int ListItemId = 50007; private const int MenuId = 50009; private const int MenuBarId = 50010; private const int MenuItemId = 50011; private const int PaneId = 50033; private const int ProgressBarId = 50012; private const int RadioButtonId = 50013; private const int ScrollBarId = 50014; private const int SeparatorId = 50038; private const int SliderId = 50015; private const int SpinnerId = 50016; private const int SplitButtonId = 50031; private const int StatusBarId = 50017; private const int TabId = 50018; private const int TabItemId = 50019; private const int TableId = 50036; private const int TextId = 50020; private const int ThumbId = 50027; private const int TitleBarId = 50037; private const int ToolBarId = 50021; private const int ToolTipId = 50022; private const int TreeId = 50023; private const int TreeItemId = 50024; private const int WindowId = 50032; #endregion #region Static Members static ControlType () { Button = new ControlType (ButtonId, "ControlType.Button"); Button.localizedControlType = Catalog.GetString("button"); Button.neverSupportedPatterns = new AutomationPattern [] {}; Button.requiredProperties = new AutomationProperty [] {}; Button.requiredPatternSets = new AutomationPattern [] [] { new AutomationPattern [] { InvokePatternIdentifiers.Pattern}}; Calendar = new ControlType (CalendarId, "ControlType.Calendar"); Calendar.localizedControlType = Catalog.GetString("calendar"); Calendar.neverSupportedPatterns = new AutomationPattern [] {}; Calendar.requiredProperties = new AutomationProperty [] {}; Calendar.requiredPatternSets = new AutomationPattern [] [] { new AutomationPattern [] { GridPatternIdentifiers.Pattern, ValuePatternIdentifiers.Pattern, SelectionPatternIdentifiers.Pattern}}; CheckBox = new ControlType (CheckBoxId, "ControlType.CheckBox"); CheckBox.localizedControlType = Catalog.GetString("check box"); CheckBox.neverSupportedPatterns = new AutomationPattern [] {}; CheckBox.requiredProperties = new AutomationProperty [] {}; CheckBox.requiredPatternSets = new AutomationPattern [] [] { new AutomationPattern [] { TogglePatternIdentifiers.Pattern}}; ComboBox = new ControlType (ComboBoxId, "ControlType.ComboBox"); ComboBox.localizedControlType = Catalog.GetString("combo box"); ComboBox.neverSupportedPatterns = new AutomationPattern [] {}; ComboBox.requiredProperties = new AutomationProperty [] {}; ComboBox.requiredPatternSets = new AutomationPattern [] [] { new AutomationPattern [] { SelectionPatternIdentifiers.Pattern, ExpandCollapsePatternIdentifiers.Pattern}}; Custom = new ControlType (CustomId, "ControlType.Custom"); Custom.localizedControlType = Catalog.GetString("custom"); Custom.neverSupportedPatterns = new AutomationPattern [] {}; Custom.requiredProperties = new AutomationProperty [] {}; Custom.requiredPatternSets = new AutomationPattern [] [] {}; DataGrid = new ControlType (DataGridId, "ControlType.DataGrid"); DataGrid.localizedControlType = Catalog.GetString("datagrid"); DataGrid.neverSupportedPatterns = new AutomationPattern [] {}; DataGrid.requiredProperties = new AutomationProperty [] {}; DataGrid.requiredPatternSets = new AutomationPattern [] [] { new AutomationPattern [] { SelectionPatternIdentifiers.Pattern}, new AutomationPattern [] { GridPatternIdentifiers.Pattern}, new AutomationPattern [] { TablePatternIdentifiers.Pattern}}; DataItem = new ControlType (DataItemId, "ControlType.DataItem"); DataItem.localizedControlType = Catalog.GetString("dataitem"); DataItem.neverSupportedPatterns = new AutomationPattern [] {}; DataItem.requiredProperties = new AutomationProperty [] {}; DataItem.requiredPatternSets = new AutomationPattern [] [] { new AutomationPattern [] { SelectionItemPatternIdentifiers.Pattern} }; Document = new ControlType (DocumentId, "ControlType.Document"); Document.localizedControlType = Catalog.GetString("document"); Document.neverSupportedPatterns = new AutomationPattern [] { ValuePatternIdentifiers.Pattern }; Document.requiredProperties = new AutomationProperty [] {}; Document.requiredPatternSets = new AutomationPattern [] [] { new AutomationPattern [] { ScrollPatternIdentifiers.Pattern}, new AutomationPattern [] { TextPatternIdentifiers.Pattern} }; Edit = new ControlType (EditId, "ControlType.Edit"); Edit.localizedControlType = Catalog.GetString("edit"); Edit.neverSupportedPatterns = new AutomationPattern [] {}; Edit.requiredProperties = new AutomationProperty [] {}; Edit.requiredPatternSets = new AutomationPattern [] [] { new AutomationPattern [] { ValuePatternIdentifiers.Pattern} }; Group = new ControlType (GroupId, "ControlType.Group"); Group.localizedControlType = Catalog.GetString("group"); Group.neverSupportedPatterns = new AutomationPattern [] {}; Group.requiredProperties = new AutomationProperty [] {}; Group.requiredPatternSets = new AutomationPattern [] [] {}; HeaderItem = new ControlType (HeaderItemId, "ControlType.HeaderItem"); HeaderItem.localizedControlType = Catalog.GetString("header item"); HeaderItem.neverSupportedPatterns = new AutomationPattern [] {}; HeaderItem.requiredProperties = new AutomationProperty [] {}; HeaderItem.requiredPatternSets = new AutomationPattern [] [] {}; Header = new ControlType (HeaderId, "ControlType.Header"); Header.localizedControlType = Catalog.GetString("header"); Header.neverSupportedPatterns = new AutomationPattern [] {}; Header.requiredProperties = new AutomationProperty [] {}; Header.requiredPatternSets = new AutomationPattern [] [] {}; Hyperlink = new ControlType (HyperlinkId, "ControlType.Hyperlink"); Hyperlink.localizedControlType = Catalog.GetString("hyperlink"); Hyperlink.neverSupportedPatterns = new AutomationPattern [] {}; Hyperlink.requiredProperties = new AutomationProperty [] {}; Hyperlink.requiredPatternSets = new AutomationPattern [] [] { new AutomationPattern [] { InvokePatternIdentifiers.Pattern} }; Image = new ControlType (ImageId, "ControlType.Image"); Image.localizedControlType = Catalog.GetString("image"); Image.neverSupportedPatterns = new AutomationPattern [] {}; Image.requiredProperties = new AutomationProperty [] {}; Image.requiredPatternSets = new AutomationPattern [] [] {}; ListItem = new ControlType (ListItemId, "ControlType.ListItem"); ListItem.localizedControlType = Catalog.GetString("list item"); ListItem.neverSupportedPatterns = new AutomationPattern [] {}; ListItem.requiredProperties = new AutomationProperty [] {}; ListItem.requiredPatternSets = new AutomationPattern [] [] { new AutomationPattern [] { SelectionItemPatternIdentifiers.Pattern} }; List = new ControlType (ListId, "ControlType.List"); List.localizedControlType = Catalog.GetString("list view"); List.neverSupportedPatterns = new AutomationPattern [] {}; List.requiredProperties = new AutomationProperty [] {}; List.requiredPatternSets = new AutomationPattern [] [] { new AutomationPattern [] { SelectionPatternIdentifiers.Pattern, TablePatternIdentifiers.Pattern, GridPatternIdentifiers.Pattern, MultipleViewPatternIdentifiers.Pattern} }; MenuBar = new ControlType (MenuBarId, "ControlType.MenuBar"); MenuBar.localizedControlType = Catalog.GetString("menu bar"); MenuBar.neverSupportedPatterns = new AutomationPattern [] {}; MenuBar.requiredProperties = new AutomationProperty [] {}; MenuBar.requiredPatternSets = new AutomationPattern [] [] {}; MenuItem = new ControlType (MenuItemId, "ControlType.MenuItem"); MenuItem.localizedControlType = Catalog.GetString("menu item"); MenuItem.neverSupportedPatterns = new AutomationPattern [] {}; MenuItem.requiredProperties = new AutomationProperty [] {}; MenuItem.requiredPatternSets = new AutomationPattern [] [] { new AutomationPattern [] { InvokePatternIdentifiers.Pattern}, new AutomationPattern [] { ExpandCollapsePatternIdentifiers.Pattern}, new AutomationPattern [] { TogglePatternIdentifiers.Pattern} }; Menu = new ControlType (MenuId, "ControlType.Menu"); Menu.localizedControlType = Catalog.GetString("menu"); Menu.neverSupportedPatterns = new AutomationPattern [] {}; Menu.requiredProperties = new AutomationProperty [] {}; Menu.requiredPatternSets = new AutomationPattern [] [] {}; Pane = new ControlType (PaneId, "ControlType.Pane"); Pane.localizedControlType = Catalog.GetString("pane"); Pane.neverSupportedPatterns = new AutomationPattern [] {}; Pane.requiredProperties = new AutomationProperty [] {}; Pane.requiredPatternSets = new AutomationPattern [] [] { new AutomationPattern [] { TransformPatternIdentifiers.Pattern} }; ProgressBar = new ControlType (ProgressBarId, "ControlType.ProgressBar"); ProgressBar.localizedControlType = Catalog.GetString("progress bar"); ProgressBar.neverSupportedPatterns = new AutomationPattern [] {}; ProgressBar.requiredProperties = new AutomationProperty [] {}; ProgressBar.requiredPatternSets = new AutomationPattern [] [] { new AutomationPattern [] { ValuePatternIdentifiers.Pattern} }; RadioButton = new ControlType (RadioButtonId, "ControlType.RadioButton"); RadioButton.localizedControlType = Catalog.GetString("radio button"); RadioButton.neverSupportedPatterns = new AutomationPattern [] {}; RadioButton.requiredProperties = new AutomationProperty [] {}; RadioButton.requiredPatternSets = new AutomationPattern [] [] {}; ScrollBar = new ControlType (ScrollBarId, "ControlType.ScrollBar"); ScrollBar.localizedControlType = Catalog.GetString("scroll bar"); ScrollBar.neverSupportedPatterns = new AutomationPattern [] {}; ScrollBar.requiredProperties = new AutomationProperty [] {}; ScrollBar.requiredPatternSets = new AutomationPattern [] [] {}; Separator = new ControlType (SeparatorId, "ControlType.Separator"); Separator.localizedControlType = Catalog.GetString("separator"); Separator.neverSupportedPatterns = new AutomationPattern [] {}; Separator.requiredProperties = new AutomationProperty [] {}; Separator.requiredPatternSets = new AutomationPattern [] [] {}; Slider = new ControlType (SliderId, "ControlType.Slider"); Slider.localizedControlType = Catalog.GetString("slider"); Slider.neverSupportedPatterns = new AutomationPattern [] {}; Slider.requiredProperties = new AutomationProperty [] {}; Slider.requiredPatternSets = new AutomationPattern [] [] { new AutomationPattern [] { RangeValuePatternIdentifiers.Pattern}, new AutomationPattern [] { SelectionPatternIdentifiers.Pattern} }; Spinner = new ControlType (SpinnerId, "ControlType.Spinner"); Spinner.localizedControlType = Catalog.GetString("spinner"); Spinner.neverSupportedPatterns = new AutomationPattern [] {}; Spinner.requiredProperties = new AutomationProperty [] {}; Spinner.requiredPatternSets = new AutomationPattern [] [] { new AutomationPattern [] { RangeValuePatternIdentifiers.Pattern}, new AutomationPattern [] { SelectionPatternIdentifiers.Pattern} }; SplitButton = new ControlType (SplitButtonId, "ControlType.SplitButton"); SplitButton.localizedControlType = Catalog.GetString("split button"); SplitButton.neverSupportedPatterns = new AutomationPattern [] {}; SplitButton.requiredProperties = new AutomationProperty [] {}; SplitButton.requiredPatternSets = new AutomationPattern [] [] { new AutomationPattern [] { InvokePatternIdentifiers.Pattern}, new AutomationPattern [] { ExpandCollapsePatternIdentifiers.Pattern} }; StatusBar = new ControlType (StatusBarId, "ControlType.StatusBar"); StatusBar.localizedControlType = Catalog.GetString("status bar"); StatusBar.neverSupportedPatterns = new AutomationPattern [] {}; StatusBar.requiredProperties = new AutomationProperty [] {}; StatusBar.requiredPatternSets = new AutomationPattern [] [] {}; TabItem = new ControlType (TabItemId, "ControlType.TabItem"); TabItem.localizedControlType = Catalog.GetString("tab item"); TabItem.neverSupportedPatterns = new AutomationPattern [] {}; TabItem.requiredProperties = new AutomationProperty [] {}; TabItem.requiredPatternSets = new AutomationPattern [] [] {}; Table = new ControlType (TableId, "ControlType.Table"); Table.localizedControlType = Catalog.GetString("table"); Table.neverSupportedPatterns = new AutomationPattern [] {}; Table.requiredProperties = new AutomationProperty [] {}; Table.requiredPatternSets = new AutomationPattern [] [] { new AutomationPattern [] { GridPatternIdentifiers.Pattern}, new AutomationPattern [] { SelectionPatternIdentifiers.Pattern}, new AutomationPattern [] { TablePatternIdentifiers.Pattern} }; Tab = new ControlType (TabId, "ControlType.Tab"); Tab.localizedControlType = Catalog.GetString("tab"); Tab.neverSupportedPatterns = new AutomationPattern [] {}; Tab.requiredProperties = new AutomationProperty [] {}; Tab.requiredPatternSets = new AutomationPattern [] [] {}; Text = new ControlType (TextId, "ControlType.Text"); Text.localizedControlType = Catalog.GetString("text"); Text.neverSupportedPatterns = new AutomationPattern [] {}; Text.requiredProperties = new AutomationProperty [] {}; Text.requiredPatternSets = new AutomationPattern [] [] {}; Thumb = new ControlType (ThumbId, "ControlType.Thumb"); Thumb.localizedControlType = Catalog.GetString("thumb"); Thumb.neverSupportedPatterns = new AutomationPattern [] {}; Thumb.requiredProperties = new AutomationProperty [] {}; Thumb.requiredPatternSets = new AutomationPattern [] [] {}; TitleBar = new ControlType (TitleBarId, "ControlType.TitleBar"); TitleBar.localizedControlType = Catalog.GetString("title bar"); TitleBar.neverSupportedPatterns = new AutomationPattern [] {}; TitleBar.requiredProperties = new AutomationProperty [] {}; TitleBar.requiredPatternSets = new AutomationPattern [] [] {}; ToolBar = new ControlType (ToolBarId, "ControlType.ToolBar"); ToolBar.localizedControlType = Catalog.GetString("tool bar"); ToolBar.neverSupportedPatterns = new AutomationPattern [] {}; ToolBar.requiredProperties = new AutomationProperty [] {}; ToolBar.requiredPatternSets = new AutomationPattern [] [] {}; ToolTip = new ControlType (ToolTipId, "ControlType.ToolTip"); ToolTip.localizedControlType = Catalog.GetString("tool tip"); ToolTip.neverSupportedPatterns = new AutomationPattern [] {}; ToolTip.requiredProperties = new AutomationProperty [] {}; ToolTip.requiredPatternSets = new AutomationPattern [] [] {}; TreeItem = new ControlType (TreeItemId, "ControlType.TreeItem"); TreeItem.localizedControlType = Catalog.GetString("tree view item"); TreeItem.neverSupportedPatterns = new AutomationPattern [] {}; TreeItem.requiredProperties = new AutomationProperty [] {}; TreeItem.requiredPatternSets = new AutomationPattern [] [] {}; Tree = new ControlType (TreeId, "ControlType.Tree"); Tree.localizedControlType = Catalog.GetString("tree view"); Tree.neverSupportedPatterns = new AutomationPattern [] {}; Tree.requiredProperties = new AutomationProperty [] {}; Tree.requiredPatternSets = new AutomationPattern [] [] {}; Window = new ControlType (WindowId, "ControlType.Window"); Window.localizedControlType = Catalog.GetString("window"); Window.neverSupportedPatterns = new AutomationPattern [] {}; Window.requiredProperties = new AutomationProperty [] {}; Window.requiredPatternSets = new AutomationPattern [] [] { new AutomationPattern [] { TransformPatternIdentifiers.Pattern}, new AutomationPattern [] { WindowPatternIdentifiers.Pattern} }; } public static ControlType LookupById (int id) { if (id == ButtonId) return Button; else if (id == CalendarId) return Calendar; else if (id == CheckBoxId) return CheckBox; else if (id == ComboBoxId) return ComboBox; else if (id == CustomId) return Custom; else if (id == DataGridId) return DataGrid; else if (id == DataItemId) return DataItem; else if (id == DocumentId) return Document; else if (id == EditId) return Edit; else if (id == GroupId) return Group; else if (id == HeaderItemId) return HeaderItem; else if (id == HeaderId) return Header; else if (id == HyperlinkId) return Hyperlink; else if (id == ImageId) return Image; else if (id == ListItemId) return ListItem; else if (id == ListId) return List; else if (id == MenuBarId) return MenuBar; else if (id == MenuItemId) return MenuItem; else if (id == MenuId) return Menu; else if (id == PaneId) return Pane; else if (id == ProgressBarId) return ProgressBar; else if (id == RadioButtonId) return RadioButton; else if (id == ScrollBarId) return ScrollBar; else if (id == SeparatorId) return Separator; else if (id == SliderId) return Slider; else if (id == SpinnerId) return Spinner; else if (id == SplitButtonId) return SplitButton; else if (id == StatusBarId) return StatusBar; else if (id == TabItemId) return TabItem; else if (id == TableId) return Table; else if (id == TabId) return Tab; else if (id == TextId) return Text; else if (id == ThumbId) return Thumb; else if (id == TitleBarId) return TitleBar; else if (id == ToolBarId) return ToolBar; else if (id == ToolTipId) return ToolTip; else if (id == TreeItemId) return TreeItem; else if (id == TreeId) return Tree; else if (id == WindowId) return Window; else return null; } public static readonly ControlType Button; public static readonly ControlType Calendar; public static readonly ControlType CheckBox; public static readonly ControlType ComboBox; public static readonly ControlType Custom; public static readonly ControlType DataGrid; public static readonly ControlType DataItem; public static readonly ControlType Document; public static readonly ControlType Edit; public static readonly ControlType Group; public static readonly ControlType Header; public static readonly ControlType HeaderItem; public static readonly ControlType Hyperlink; public static readonly ControlType Image; public static readonly ControlType List; public static readonly ControlType ListItem; public static readonly ControlType Menu; public static readonly ControlType MenuBar; public static readonly ControlType MenuItem; public static readonly ControlType Pane; public static readonly ControlType ProgressBar; public static readonly ControlType RadioButton; public static readonly ControlType ScrollBar; public static readonly ControlType Separator; public static readonly ControlType Slider; public static readonly ControlType Spinner; public static readonly ControlType SplitButton; public static readonly ControlType StatusBar; public static readonly ControlType Tab; public static readonly ControlType TabItem; public static readonly ControlType Table; public static readonly ControlType Text; public static readonly ControlType Thumb; public static readonly ControlType TitleBar; public static readonly ControlType ToolBar; public static readonly ControlType ToolTip; public static readonly ControlType Tree; public static readonly ControlType TreeItem; public static readonly ControlType Window; #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/GridItemPatternIdentifiers.cs0000644000016200001670000000540111433571545032205 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Neville Gao // using System; namespace System.Windows.Automation { public static class GridItemPatternIdentifiers { #region Constructor private const int PatternId = 10007; private const int RowPropertyId = 30064; private const int ColumnPropertyId = 30065; private const int RowSpanPropertyId = 30066; private const int ColumnSpanPropertyId = 30067; private const int ContainingGridPropertyId = 30068; static GridItemPatternIdentifiers () { Pattern = new AutomationPattern (PatternId, "GridItemPatternIdentifiers.Pattern"); RowProperty = new AutomationProperty (RowPropertyId, "GridItemPatternIdentifiers.RowProperty"); ColumnProperty = new AutomationProperty (ColumnPropertyId, "GridItemPatternIdentifiers.ColumnProperty"); RowSpanProperty = new AutomationProperty (RowSpanPropertyId, "GridItemPatternIdentifiers.RowSpanProperty"); ColumnSpanProperty = new AutomationProperty (ColumnSpanPropertyId, "GridItemPatternIdentifiers.ColumnSpanProperty"); ContainingGridProperty = new AutomationProperty (ContainingGridPropertyId, "GridItemPatternIdentifiers.ContainingGridProperty"); } #endregion #region Public Fields public static readonly AutomationPattern Pattern; public static readonly AutomationProperty RowProperty; public static readonly AutomationProperty ColumnProperty; public static readonly AutomationProperty RowSpanProperty; public static readonly AutomationProperty ColumnSpanProperty; public static readonly AutomationProperty ContainingGridProperty; #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/ScrollPatternIdentifiers.cs0000644000016200001670000000704411433571545031744 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; namespace System.Windows.Automation { public static class ScrollPatternIdentifiers { #region Constructor private const int PatternId = 10004; private const int HorizontallyScrollablePropertyId = 30057; private const int HorizontalScrollPercentPropertyId = 30053; private const int HorizontalViewSizePropertyId = 30054; private const int VerticallyScrollablePropertyId = 30058; private const int VerticalScrollPercentPropertyId = 30055; private const int VerticalViewSizePropertyId = 30056; static ScrollPatternIdentifiers () { Pattern = new AutomationPattern (PatternId, "ScrollPatternIdentifiers.Pattern"); HorizontallyScrollableProperty = new AutomationProperty (HorizontallyScrollablePropertyId, "ScrollPatternIdentifiers.HorizontallyScrollableProperty"); HorizontalScrollPercentProperty = new AutomationProperty (HorizontalScrollPercentPropertyId, "ScrollPatternIdentifiers.HorizontalScrollPercentProperty"); HorizontalViewSizeProperty = new AutomationProperty (HorizontalViewSizePropertyId, "ScrollPatternIdentifiers.HorizontalViewSizeProperty"); VerticallyScrollableProperty = new AutomationProperty (VerticallyScrollablePropertyId, "ScrollPatternIdentifiers.VerticallyScrollableProperty"); VerticalScrollPercentProperty = new AutomationProperty (VerticalScrollPercentPropertyId, "ScrollPatternIdentifiers.VerticalScrollPercentProperty"); VerticalViewSizeProperty = new AutomationProperty (VerticalViewSizePropertyId, "ScrollPatternIdentifiers.VerticalViewSizeProperty"); } #endregion #region Public Fields public static readonly AutomationPattern Pattern; public static readonly AutomationProperty HorizontallyScrollableProperty; public static readonly AutomationProperty HorizontalScrollPercentProperty; public static readonly AutomationProperty HorizontalViewSizeProperty; public static readonly AutomationProperty VerticallyScrollableProperty; public static readonly AutomationProperty VerticalScrollPercentProperty; public static readonly AutomationProperty VerticalViewSizeProperty; public const double NoScroll = -1; #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/TransformPatternIdentifiers.cs0000644000016200001670000000464211433571545032462 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; namespace System.Windows.Automation { public static class TransformPatternIdentifiers { #region Constructor private const int PatternId = 10016; private const int CanMovePropertyId = 30087; private const int CanResizePropertyId = 30088; private const int CanRotatePropertyId = 30089; static TransformPatternIdentifiers () { Pattern = new AutomationPattern (PatternId, "TransformPatternIdentifiers.Pattern"); CanMoveProperty = new AutomationProperty (CanMovePropertyId, "TransformPatternIdentifiers.CanMoveProperty"); CanResizeProperty = new AutomationProperty (CanResizePropertyId, "TransformPatternIdentifiers.CanResizeProperty"); CanRotateProperty = new AutomationProperty (CanRotatePropertyId, "TransformPatternIdentifiers.CanRotateProperty"); } #endregion #region Public Fields public static readonly AutomationProperty CanMoveProperty; public static readonly AutomationProperty CanResizeProperty; public static readonly AutomationProperty CanRotateProperty; public static readonly AutomationPattern Pattern; #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/WindowClosedEventArgs.cs0000644000016200001670000000313511433571545031177 0ustar00hudsonhudson00000000000000//// 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. //// //// Copyright (c) 2008 Novell, Inc. (http://www.novell.com) //// //// Authors: //// Stephen Shaw //// // using System; namespace System.Windows.Automation { public sealed class WindowClosedEventArgs : AutomationEventArgs { private int[] runtimeId; public WindowClosedEventArgs(int[] runtimeId) : base(WindowPatternIdentifiers.WindowClosedEvent) { this.runtimeId = runtimeId; } public int[] GetRuntimeId () { return runtimeId; } } }mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/WindowVisualState.cs0000644000016200001670000000270211433571545030412 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation { [Guid ("fdc8f176-aed2-477a-8c89-ea04cc5f278d")] [ComVisible (true)] public enum WindowVisualState { Normal = 0, Maximized = 1, Minimized = 2, } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/AutomationEvent.cs0000644000016200001670000001040211433571545030074 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; namespace System.Windows.Automation { #region delegates public delegate void AutomationEventHandler( object sender, AutomationEventArgs e); public delegate void AutomationPropertyChangedEventHandler( object sender, AutomationPropertyChangedEventArgs e); public delegate void StructureChangedEventHandler( object sender, StructureChangedEventArgs e); #endregion public class AutomationEvent : AutomationIdentifier { #region Internal Constructor internal AutomationEvent (int id, string programmaticName) : base (id, programmaticName) { } #endregion #region Public Static Methods public static AutomationEvent LookupById (int id) { if (id == InvokePatternIdentifiers.InvokedEvent.Id) return InvokePatternIdentifiers.InvokedEvent; else if (id == AutomationElementIdentifiers.AsyncContentLoadedEvent.Id) return AutomationElementIdentifiers.AsyncContentLoadedEvent; else if (id == AutomationElementIdentifiers.AutomationFocusChangedEvent.Id) return AutomationElementIdentifiers.AutomationFocusChangedEvent; else if (id == AutomationElementIdentifiers.AutomationPropertyChangedEvent.Id) return AutomationElementIdentifiers.AutomationPropertyChangedEvent; else if (id == AutomationElementIdentifiers.LayoutInvalidatedEvent.Id) return AutomationElementIdentifiers.LayoutInvalidatedEvent; else if (id == AutomationElementIdentifiers.MenuClosedEvent.Id) return AutomationElementIdentifiers.MenuClosedEvent; else if (id == AutomationElementIdentifiers.MenuOpenedEvent.Id) return AutomationElementIdentifiers.MenuOpenedEvent; else if (id == AutomationElementIdentifiers.StructureChangedEvent.Id) return AutomationElementIdentifiers.StructureChangedEvent; else if (id == AutomationElementIdentifiers.ToolTipClosedEvent.Id) return AutomationElementIdentifiers.ToolTipClosedEvent; else if (id == AutomationElementIdentifiers.ToolTipOpenedEvent.Id) return AutomationElementIdentifiers.ToolTipOpenedEvent; else if (id == SelectionItemPatternIdentifiers.ElementAddedToSelectionEvent.Id) return SelectionItemPatternIdentifiers.ElementAddedToSelectionEvent; else if (id == SelectionItemPatternIdentifiers.ElementRemovedFromSelectionEvent.Id) return SelectionItemPatternIdentifiers.ElementRemovedFromSelectionEvent; else if (id == SelectionItemPatternIdentifiers.ElementSelectedEvent.Id) return SelectionItemPatternIdentifiers.ElementSelectedEvent; else if (id == SelectionPatternIdentifiers.InvalidatedEvent.Id) return SelectionPatternIdentifiers.InvalidatedEvent; else if (id == TextPatternIdentifiers.TextChangedEvent.Id) return TextPatternIdentifiers.TextChangedEvent; else if (id == TextPatternIdentifiers.TextSelectionChangedEvent.Id) return TextPatternIdentifiers.TextSelectionChangedEvent; else if (id == WindowPatternIdentifiers.WindowClosedEvent.Id) return WindowPatternIdentifiers.WindowClosedEvent; else if (id == WindowPatternIdentifiers.WindowOpenedEvent.Id) return WindowPatternIdentifiers.WindowOpenedEvent; else return null; } #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/InsertDeleteTextPatternIdentifiers.cs0000644000016200001670000000322111433571545033733 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Brad Taylor // using System; namespace System.Windows.Automation { internal static class InsertDeleteTextPatternIdentifiers { #region Constructor private const int PatternId = 70002; static InsertDeleteTextPatternIdentifiers () { Pattern = new AutomationPattern (PatternId, "InsertDeleteTextPatternIdentifiers.Pattern"); } #endregion #region Public Fields public static readonly AutomationPattern Pattern; #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/RangeValuePatternIdentifiers.cs0000644000016200001670000000625611433571545032543 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; namespace System.Windows.Automation { public static class RangeValuePatternIdentifiers { #region Constructor private const int PatternId = 10003; private const int IsReadOnlyPropertyId = 30048; private const int LargeChangePropertyId = 30051; private const int MaximumPropertyId = 30050; private const int MinimumPropertyId = 30049; private const int SmallChangePropertyId = 30052; private const int ValuePropertyId = 30047; static RangeValuePatternIdentifiers () { Pattern = new AutomationPattern (PatternId, "RangeValuePatternIdentifiers.Pattern"); IsReadOnlyProperty = new AutomationProperty (IsReadOnlyPropertyId, "RangeValuePatternIdentifiers.IsReadOnlyProperty"); LargeChangeProperty = new AutomationProperty (LargeChangePropertyId, "RangeValuePatternIdentifiers.LargeChangeProperty"); MaximumProperty = new AutomationProperty (MaximumPropertyId, "RangeValuePatternIdentifiers.MaximumProperty"); MinimumProperty = new AutomationProperty (MinimumPropertyId, "RangeValuePatternIdentifiers.MinimumProperty"); SmallChangeProperty = new AutomationProperty (SmallChangePropertyId, "RangeValuePatternIdentifiers.SmallChangeProperty"); ValueProperty = new AutomationProperty (ValuePropertyId, "RangeValuePatternIdentifiers.ValueProperty"); } #endregion #region Public Fields public static readonly AutomationPattern Pattern; public static readonly AutomationProperty IsReadOnlyProperty; public static readonly AutomationProperty LargeChangeProperty; public static readonly AutomationProperty MaximumProperty; public static readonly AutomationProperty MinimumProperty; public static readonly AutomationProperty SmallChangeProperty; public static readonly AutomationProperty ValueProperty; #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/MultipleViewPatternIdentifiers.cs0000644000016200001670000000432111433571545033127 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; namespace System.Windows.Automation { public static class MultipleViewPatternIdentifiers { #region Constructor private const int PatternId = 10008; private const int CurrentViewPropertyId = 30071; private const int SupportedViewsPropertyId = 30072; static MultipleViewPatternIdentifiers () { Pattern = new AutomationPattern (PatternId, "MultipleViewPatternIdentifiers.Pattern"); CurrentViewProperty = new AutomationProperty (CurrentViewPropertyId, "MultipleViewPatternIdentifiers.CurrentViewProperty"); SupportedViewsProperty = new AutomationProperty (SupportedViewsPropertyId, "MultipleViewPatternIdentifiers.SupportedViewsProperty"); } #endregion #region Public Fields public static readonly AutomationPattern Pattern; public static readonly AutomationProperty CurrentViewProperty; public static readonly AutomationProperty SupportedViewsProperty; #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/ValuePatternIdentifiers.cs0000644000016200001670000000420111433571545031552 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; namespace System.Windows.Automation { public static class ValuePatternIdentifiers { #region Constructor private const int PatternId = 10002; private const int ValuePropertyId = 30045; private const int IsReadOnlyPropertyId = 30046; static ValuePatternIdentifiers () { Pattern = new AutomationPattern (PatternId, "ValuePatternIdentifiers.Pattern"); IsReadOnlyProperty = new AutomationProperty (IsReadOnlyPropertyId, "ValuePatternIdentifiers.IsReadOnlyProperty"); ValueProperty = new AutomationProperty (ValuePropertyId, "ValuePatternIdentifiers.ValueProperty"); } #endregion #region Public Fields public static readonly AutomationPattern Pattern; public static readonly AutomationProperty IsReadOnlyProperty; public static readonly AutomationProperty ValueProperty; #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/AutomationPropertyChangedEventArgs.cs0000644000016200001670000000337411433571545033742 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; namespace System.Windows.Automation { public sealed class AutomationPropertyChangedEventArgs : AutomationEventArgs { public object NewValue { get; private set; } public object OldValue { get; private set; } public AutomationProperty Property { get; private set; } public AutomationPropertyChangedEventArgs (AutomationProperty property, object oldValue, object newValue) : base (AutomationElementIdentifiers.AutomationPropertyChangedEvent) { Property = property; OldValue = oldValue; NewValue = newValue; } } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/ElementNotEnabledException.cs0000644000016200001670000000370711433571545032170 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; using System.Runtime.Serialization; namespace System.Windows.Automation { public class ElementNotEnabledException : InvalidOperationException { #region Constructors public ElementNotEnabledException() { } public ElementNotEnabledException(string message) : base (message) { } protected ElementNotEnabledException(SerializationInfo info, StreamingContext context) : base (info, context) { } public ElementNotEnabledException(String message, Exception innerException) : base (message, innerException) { } #endregion #region Exception Overrides public override void GetObjectData (SerializationInfo info, StreamingContext context) { throw new NotImplementedException (); } #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/EmbeddedImagePatternIdentifiers.cs0000644000016200001670000000321011433571545033131 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Brad Taylor // using System; namespace System.Windows.Automation { internal static class EmbeddedImagePatternIdentifiers { #region Constructor private const int PatternId = 70001; static EmbeddedImagePatternIdentifiers () { Pattern = new AutomationPattern (PatternId, "EmbeddedImagePatternIdentifiers.Pattern"); } #endregion #region Public Fields public static readonly AutomationPattern Pattern; #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/KeyEventArgs.cs0000644000016200001670000000504411433571545027327 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2004-2005 Novell, Inc. // // Authors: // Mike GOrse mgorse@novell.com // // // COMPLETE using System.Runtime.InteropServices; namespace System.Windows.Automation { [ComVisible(true)] internal class KeyEventArgs : AutomationEventArgs { private bool down; private int keycode; private int keysym; private String str; private bool alt; private bool shift; private bool control; private bool supress_key_press; #region Public Constructors public KeyEventArgs (bool down, int keycode, int keysym, String str, bool alt, bool control, bool shift): base (AutomationElementIdentifiers.KeyEvent) { this.down = down; this.keycode = keycode; this.keysym = keysym; this.str = str; this.alt = alt; this.shift = shift; this.control = control; } #endregion // Public Constructors #region Public Instance Properties public bool Down { get { return down; } } public bool Alt { get { return alt; } } public int Keycode { get { return keycode; } } public int Keysym { get { return keysym; } } public String Str { get { return str; } } public bool Shift { get { return shift; } } public bool Control { get { return control; } } public int KeyCode { get { return keycode; } } public bool SuppressKeyPress { get { return supress_key_press; } set { supress_key_press = value; } } #endregion // Public Instance Properties } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/SelectionPatternIdentifiers.cs0000644000016200001670000000536411433571545032436 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; namespace System.Windows.Automation { public static class SelectionPatternIdentifiers { #region Constructor private const int PatternId = 10001; private const int CanSelectMultiplePropertyId = 30060; private const int IsSelectionRequiredPropertyId = 30061; private const int SelectionPropertyId = 30059; private const int InvalidatedEventId = 20013; static SelectionPatternIdentifiers () { Pattern = new AutomationPattern (PatternId, "SelectionPatternIdentifiers.Pattern"); CanSelectMultipleProperty = new AutomationProperty (CanSelectMultiplePropertyId, "SelectionPatternIdentifiers.CanSelectMultipleProperty"); IsSelectionRequiredProperty = new AutomationProperty (IsSelectionRequiredPropertyId, "SelectionPatternIdentifiers.IsSelectionRequiredProperty"); SelectionProperty = new AutomationProperty (SelectionPropertyId, "SelectionPatternIdentifiers.SelectionProperty"); InvalidatedEvent = new AutomationEvent (InvalidatedEventId, "SelectionPatternIdentifiers.InvalidatedEvent"); } #endregion #region Public Fields public static readonly AutomationPattern Pattern; public static readonly AutomationProperty CanSelectMultipleProperty; public static readonly AutomationProperty IsSelectionRequiredProperty; public static readonly AutomationProperty SelectionProperty; public static readonly AutomationEvent InvalidatedEvent; #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/ClipboardPatternIdentifiers.cs0000644000016200001670000000321611433571545032402 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mario Carrion // using System; namespace System.Windows.Automation { internal static class ClipboardPatternIdentifiers { #region Constructor private const int PatternId = 70004; static ClipboardPatternIdentifiers () { Pattern = new AutomationPattern (PatternId, "ClipboardPatternIdentifiers.Pattern"); } #endregion #region Public Fields public static readonly AutomationPattern Pattern; #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/EditableRangePatternIdentifiers.cs0000644000016200001670000000323211433571545033167 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mario Carrion // using System; namespace System.Windows.Automation { internal static class EditableRangePatternIdentifiers { #region Constructor private const int PatternId = 70003; static EditableRangePatternIdentifiers () { Pattern = new AutomationPattern (PatternId, "EditableRangePatternIdentifiers.Pattern"); } #endregion #region Public Fields public static readonly AutomationPattern Pattern; #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/AutomationProperty.cs0000644000016200001670000003336311433571545030652 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // Mario Carrion // using System; namespace System.Windows.Automation { public class AutomationProperty : AutomationIdentifier { #region Internal Constructor internal AutomationProperty (int id, string programmaticName) : base (id, programmaticName) { } #endregion #region Public Static Methods public static AutomationProperty LookupById (int id) { if (id == AutomationElementIdentifiers.AcceleratorKeyProperty.Id) return AutomationElementIdentifiers.AcceleratorKeyProperty; else if (id == AutomationElementIdentifiers.AccessKeyProperty.Id) return AutomationElementIdentifiers.AccessKeyProperty; else if (id == AutomationElementIdentifiers.AutomationIdProperty.Id) return AutomationElementIdentifiers.AutomationIdProperty; else if (id == AutomationElementIdentifiers.BoundingRectangleProperty.Id) return AutomationElementIdentifiers.BoundingRectangleProperty; else if (id == AutomationElementIdentifiers.ClassNameProperty.Id) return AutomationElementIdentifiers.ClassNameProperty; else if (id == AutomationElementIdentifiers.ClickablePointProperty.Id) return AutomationElementIdentifiers.ClickablePointProperty; else if (id == AutomationElementIdentifiers.ControlTypeProperty.Id) return AutomationElementIdentifiers.ControlTypeProperty; else if (id == AutomationElementIdentifiers.CultureProperty.Id) return AutomationElementIdentifiers.CultureProperty; else if (id == AutomationElementIdentifiers.FrameworkIdProperty.Id) return AutomationElementIdentifiers.FrameworkIdProperty; else if (id == AutomationElementIdentifiers.HasKeyboardFocusProperty.Id) return AutomationElementIdentifiers.HasKeyboardFocusProperty; else if (id == AutomationElementIdentifiers.HelpTextProperty.Id) return AutomationElementIdentifiers.HelpTextProperty; else if (id == AutomationElementIdentifiers.IsContentElementProperty.Id) return AutomationElementIdentifiers.IsContentElementProperty; else if (id == AutomationElementIdentifiers.IsControlElementProperty.Id) return AutomationElementIdentifiers.IsControlElementProperty; else if (id == AutomationElementIdentifiers.IsDockPatternAvailableProperty.Id) return AutomationElementIdentifiers.IsDockPatternAvailableProperty; else if (id == AutomationElementIdentifiers.IsEnabledProperty.Id) return AutomationElementIdentifiers.IsEnabledProperty; else if (id == AutomationElementIdentifiers.IsExpandCollapsePatternAvailableProperty.Id) return AutomationElementIdentifiers.IsExpandCollapsePatternAvailableProperty; else if (id == AutomationElementIdentifiers.IsGridItemPatternAvailableProperty.Id) return AutomationElementIdentifiers.IsGridItemPatternAvailableProperty; else if (id == AutomationElementIdentifiers.IsGridPatternAvailableProperty.Id) return AutomationElementIdentifiers.IsGridPatternAvailableProperty; else if (id == AutomationElementIdentifiers.IsInvokePatternAvailableProperty.Id) return AutomationElementIdentifiers.IsInvokePatternAvailableProperty; else if (id == AutomationElementIdentifiers.IsKeyboardFocusableProperty.Id) return AutomationElementIdentifiers.IsKeyboardFocusableProperty; else if (id == AutomationElementIdentifiers.IsMultipleViewPatternAvailableProperty.Id) return AutomationElementIdentifiers.IsMultipleViewPatternAvailableProperty; else if (id == AutomationElementIdentifiers.IsOffscreenProperty.Id) return AutomationElementIdentifiers.IsOffscreenProperty; else if (id == AutomationElementIdentifiers.IsPasswordProperty.Id) return AutomationElementIdentifiers.IsPasswordProperty; else if (id == AutomationElementIdentifiers.IsRangeValuePatternAvailableProperty.Id) return AutomationElementIdentifiers.IsRangeValuePatternAvailableProperty; else if (id == AutomationElementIdentifiers.IsRequiredForFormProperty.Id) return AutomationElementIdentifiers.IsRequiredForFormProperty; else if (id == AutomationElementIdentifiers.IsScrollItemPatternAvailableProperty.Id) return AutomationElementIdentifiers.IsScrollItemPatternAvailableProperty; else if (id == AutomationElementIdentifiers.IsScrollPatternAvailableProperty.Id) return AutomationElementIdentifiers.IsScrollPatternAvailableProperty; else if (id == AutomationElementIdentifiers.IsSelectionItemPatternAvailableProperty.Id) return AutomationElementIdentifiers.IsSelectionItemPatternAvailableProperty; else if (id == AutomationElementIdentifiers.IsSelectionPatternAvailableProperty.Id) return AutomationElementIdentifiers.IsSelectionPatternAvailableProperty; else if (id == AutomationElementIdentifiers.IsTableItemPatternAvailableProperty.Id) return AutomationElementIdentifiers.IsTableItemPatternAvailableProperty; else if (id == AutomationElementIdentifiers.IsTablePatternAvailableProperty.Id) return AutomationElementIdentifiers.IsTablePatternAvailableProperty; else if (id == AutomationElementIdentifiers.IsTextPatternAvailableProperty.Id) return AutomationElementIdentifiers.IsTextPatternAvailableProperty; else if (id == AutomationElementIdentifiers.IsTogglePatternAvailableProperty.Id) return AutomationElementIdentifiers.IsTogglePatternAvailableProperty; else if (id == AutomationElementIdentifiers.IsTransformPatternAvailableProperty.Id) return AutomationElementIdentifiers.IsTransformPatternAvailableProperty; else if (id == AutomationElementIdentifiers.IsValuePatternAvailableProperty.Id) return AutomationElementIdentifiers.IsValuePatternAvailableProperty; else if (id == AutomationElementIdentifiers.IsWindowPatternAvailableProperty.Id) return AutomationElementIdentifiers.IsWindowPatternAvailableProperty; else if (id == AutomationElementIdentifiers.ItemStatusProperty.Id) return AutomationElementIdentifiers.ItemStatusProperty; else if (id == AutomationElementIdentifiers.ItemTypeProperty.Id) return AutomationElementIdentifiers.ItemTypeProperty; else if (id == AutomationElementIdentifiers.LabeledByProperty.Id) return AutomationElementIdentifiers.LabeledByProperty; else if (id == AutomationElementIdentifiers.LocalizedControlTypeProperty.Id) return AutomationElementIdentifiers.LocalizedControlTypeProperty; else if (id == AutomationElementIdentifiers.NameProperty.Id) return AutomationElementIdentifiers.NameProperty; else if (id == AutomationElementIdentifiers.NativeWindowHandleProperty.Id) return AutomationElementIdentifiers.NativeWindowHandleProperty; else if (id == AutomationElementIdentifiers.OrientationProperty.Id) return AutomationElementIdentifiers.OrientationProperty; else if (id == AutomationElementIdentifiers.ProcessIdProperty.Id) return AutomationElementIdentifiers.ProcessIdProperty; else if (id == AutomationElementIdentifiers.RuntimeIdProperty.Id) return AutomationElementIdentifiers.RuntimeIdProperty; else if (id == TogglePatternIdentifiers.ToggleStateProperty.Id) return TogglePatternIdentifiers.ToggleStateProperty; else if (id == SelectionItemPatternIdentifiers.IsSelectedProperty.Id) return SelectionItemPatternIdentifiers.IsSelectedProperty; else if (id == SelectionItemPatternIdentifiers.SelectionContainerProperty.Id) return SelectionItemPatternIdentifiers.SelectionContainerProperty; else if (id == SelectionPatternIdentifiers.CanSelectMultipleProperty.Id) return SelectionPatternIdentifiers.CanSelectMultipleProperty; else if (id == SelectionPatternIdentifiers.IsSelectionRequiredProperty.Id) return SelectionPatternIdentifiers.IsSelectionRequiredProperty; else if (id == SelectionPatternIdentifiers.SelectionProperty.Id) return SelectionPatternIdentifiers.SelectionProperty; else if (id == RangeValuePatternIdentifiers.IsReadOnlyProperty.Id) return RangeValuePatternIdentifiers.IsReadOnlyProperty; else if (id == RangeValuePatternIdentifiers.LargeChangeProperty.Id) return RangeValuePatternIdentifiers.LargeChangeProperty; else if (id == RangeValuePatternIdentifiers.MaximumProperty.Id) return RangeValuePatternIdentifiers.MaximumProperty; else if (id == RangeValuePatternIdentifiers.MinimumProperty.Id) return RangeValuePatternIdentifiers.MinimumProperty; else if (id == RangeValuePatternIdentifiers.SmallChangeProperty.Id) return RangeValuePatternIdentifiers.SmallChangeProperty; else if (id == RangeValuePatternIdentifiers.ValueProperty.Id) return RangeValuePatternIdentifiers.ValueProperty; else if (id == WindowPatternIdentifiers.CanMaximizeProperty.Id) return WindowPatternIdentifiers.CanMaximizeProperty; else if (id == WindowPatternIdentifiers.CanMinimizeProperty.Id) return WindowPatternIdentifiers.CanMinimizeProperty; else if (id == WindowPatternIdentifiers.IsModalProperty.Id) return WindowPatternIdentifiers.IsModalProperty; else if (id == WindowPatternIdentifiers.IsTopmostProperty.Id) return WindowPatternIdentifiers.IsTopmostProperty; else if (id == WindowPatternIdentifiers.WindowInteractionStateProperty.Id) return WindowPatternIdentifiers.WindowInteractionStateProperty; else if (id == WindowPatternIdentifiers.WindowVisualStateProperty.Id) return WindowPatternIdentifiers.WindowVisualStateProperty; else if (id == ScrollPatternIdentifiers.HorizontallyScrollableProperty.Id) return ScrollPatternIdentifiers.HorizontallyScrollableProperty; else if (id == ScrollPatternIdentifiers.HorizontalScrollPercentProperty.Id) return ScrollPatternIdentifiers.HorizontalScrollPercentProperty; else if (id == ScrollPatternIdentifiers.HorizontalViewSizeProperty.Id) return ScrollPatternIdentifiers.HorizontalViewSizeProperty; else if (id == ScrollPatternIdentifiers.VerticallyScrollableProperty.Id) return ScrollPatternIdentifiers.VerticallyScrollableProperty; else if (id == ScrollPatternIdentifiers.VerticalScrollPercentProperty.Id) return ScrollPatternIdentifiers.VerticalScrollPercentProperty; else if (id == ScrollPatternIdentifiers.VerticalViewSizeProperty.Id) return ScrollPatternIdentifiers.VerticalViewSizeProperty; else if (id == ExpandCollapsePatternIdentifiers.ExpandCollapseStateProperty.Id) return ExpandCollapsePatternIdentifiers.ExpandCollapseStateProperty; else if (id == ValuePatternIdentifiers.IsReadOnlyProperty.Id) return ValuePatternIdentifiers.IsReadOnlyProperty; else if (id == ValuePatternIdentifiers.ValueProperty.Id) return ValuePatternIdentifiers.ValueProperty; else if (id == GridPatternIdentifiers.ColumnCountProperty.Id) return GridPatternIdentifiers.ColumnCountProperty; else if (id == GridPatternIdentifiers.RowCountProperty.Id) return GridPatternIdentifiers.RowCountProperty; else if (id == GridItemPatternIdentifiers.RowProperty.Id) return GridItemPatternIdentifiers.RowProperty; else if (id == GridItemPatternIdentifiers.ColumnProperty.Id) return GridItemPatternIdentifiers.ColumnProperty; else if (id == GridItemPatternIdentifiers.RowSpanProperty.Id) return GridItemPatternIdentifiers.RowSpanProperty; else if (id == GridItemPatternIdentifiers.ColumnSpanProperty.Id) return GridItemPatternIdentifiers.ColumnSpanProperty; else if (id == GridItemPatternIdentifiers.ContainingGridProperty.Id) return GridItemPatternIdentifiers.ContainingGridProperty; else if (id == TransformPatternIdentifiers.CanMoveProperty.Id) return TransformPatternIdentifiers.CanMoveProperty; else if (id == TransformPatternIdentifiers.CanResizeProperty.Id) return TransformPatternIdentifiers.CanResizeProperty; else if (id == TransformPatternIdentifiers.CanRotateProperty.Id) return TransformPatternIdentifiers.CanRotateProperty; else if (id == MultipleViewPatternIdentifiers.CurrentViewProperty.Id) return MultipleViewPatternIdentifiers.CurrentViewProperty; else if (id == MultipleViewPatternIdentifiers.SupportedViewsProperty.Id) return MultipleViewPatternIdentifiers.SupportedViewsProperty; else if (id == DockPatternIdentifiers.DockPositionProperty.Id) return DockPatternIdentifiers.DockPositionProperty; else if (id == TablePatternIdentifiers.ColumnHeadersProperty.Id) return TablePatternIdentifiers.ColumnHeadersProperty; else if (id == TablePatternIdentifiers.RowHeadersProperty.Id) return TablePatternIdentifiers.RowHeadersProperty; else if (id == TablePatternIdentifiers.RowOrColumnMajorProperty.Id) return TablePatternIdentifiers.RowOrColumnMajorProperty; else if (id == TableItemPatternIdentifiers.ColumnHeaderItemsProperty.Id) return TableItemPatternIdentifiers.ColumnHeaderItemsProperty; else if (id == TableItemPatternIdentifiers.RowHeaderItemsProperty.Id) return TableItemPatternIdentifiers.RowHeaderItemsProperty; else return null; } #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/WindowPatternIdentifiers.cs0000644000016200001670000000743611433571545031762 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; namespace System.Windows.Automation { public static class WindowPatternIdentifiers { #region Constructor private const int PatternId = 10009; private const int CanMaximizePropertyId = 30073; private const int CanMinimizePropertyId = 30074; private const int IsModalPropertyId = 30077; private const int IsTopmostPropertyId = 30078; private const int WindowInteractionStatePropertyId = 30076; private const int WindowVisualStatePropertyId = 30075; private const int WindowClosedEventId = 20017; private const int WindowOpenedEventId = 20016; static WindowPatternIdentifiers () { Pattern = new AutomationPattern (PatternId, "WindowPatternIdentifiers.Pattern"); CanMaximizeProperty = new AutomationProperty (CanMaximizePropertyId, "WindowPatternIdentifiers.CanMaximizeProperty"); CanMinimizeProperty = new AutomationProperty (CanMinimizePropertyId, "WindowPatternIdentifiers.CanMinimizeProperty"); IsModalProperty = new AutomationProperty (IsModalPropertyId, "WindowPatternIdentifiers.IsModalProperty"); IsTopmostProperty = new AutomationProperty (IsTopmostPropertyId, "WindowPatternIdentifiers.IsTopmostProperty"); WindowInteractionStateProperty = new AutomationProperty (WindowInteractionStatePropertyId, "WindowPatternIdentifiers.WindowInteractionStateProperty"); WindowVisualStateProperty = new AutomationProperty (WindowVisualStatePropertyId, "WindowPatternIdentifiers.WindowVisualStateProperty"); WindowClosedEvent = new AutomationEvent (WindowClosedEventId, "WindowPatternIdentifiers.WindowClosedProperty"); WindowOpenedEvent = new AutomationEvent (WindowOpenedEventId, "WindowPatternIdentifiers.WindowOpenedProperty"); } #endregion #region Public Fields public static readonly AutomationProperty CanMaximizeProperty; public static readonly AutomationProperty CanMinimizeProperty; public static readonly AutomationProperty IsModalProperty; public static readonly AutomationProperty IsTopmostProperty; public static readonly AutomationPattern Pattern; public static readonly AutomationEvent WindowClosedEvent; public static readonly AutomationProperty WindowInteractionStateProperty; public static readonly AutomationEvent WindowOpenedEvent; public static readonly AutomationProperty WindowVisualStateProperty; #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/ToggleState.cs0000644000016200001670000000266611433571545027211 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation { [ComVisible (true)] [Guid ("ad7db4af-7166-4478-a402-ad5b77eab2fa")] public enum ToggleState { Off = 0, On = 1, Indeterminate = 2, } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/AutomationTextAttribute.cs0000644000016200001670000001265411433571545031636 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; namespace System.Windows.Automation { public class AutomationTextAttribute : AutomationIdentifier { #region Internal Constructor internal AutomationTextAttribute (int id, string programmaticName) : base (id, programmaticName) { } #endregion #region Public Static Methods public static AutomationTextAttribute LookupById (int id) { if (id == TextPatternIdentifiers.AnimationStyleAttribute.Id) return TextPatternIdentifiers.AnimationStyleAttribute; else if (id == TextPatternIdentifiers.BackgroundColorAttribute.Id) return TextPatternIdentifiers.BackgroundColorAttribute; else if (id == TextPatternIdentifiers.BulletStyleAttribute.Id) return TextPatternIdentifiers.BulletStyleAttribute; else if (id == TextPatternIdentifiers.CapStyleAttribute.Id) return TextPatternIdentifiers.CapStyleAttribute; else if (id == TextPatternIdentifiers.CultureAttribute.Id) return TextPatternIdentifiers.CultureAttribute; else if (id == TextPatternIdentifiers.FontNameAttribute.Id) return TextPatternIdentifiers.FontNameAttribute; else if (id == TextPatternIdentifiers.FontSizeAttribute.Id) return TextPatternIdentifiers.FontSizeAttribute; else if (id == TextPatternIdentifiers.FontWeightAttribute.Id) return TextPatternIdentifiers.FontWeightAttribute; else if (id == TextPatternIdentifiers.ForegroundColorAttribute.Id) return TextPatternIdentifiers.ForegroundColorAttribute; else if (id == TextPatternIdentifiers.HorizontalTextAlignmentAttribute.Id) return TextPatternIdentifiers.HorizontalTextAlignmentAttribute; else if (id == TextPatternIdentifiers.IndentationFirstLineAttribute.Id) return TextPatternIdentifiers.IndentationFirstLineAttribute; else if (id == TextPatternIdentifiers.IndentationLeadingAttribute.Id) return TextPatternIdentifiers.IndentationLeadingAttribute; else if (id == TextPatternIdentifiers.IndentationTrailingAttribute.Id) return TextPatternIdentifiers.IndentationTrailingAttribute; else if (id == TextPatternIdentifiers.IsHiddenAttribute.Id) return TextPatternIdentifiers.IsHiddenAttribute; else if (id == TextPatternIdentifiers.IsItalicAttribute.Id) return TextPatternIdentifiers.IsItalicAttribute; else if (id == TextPatternIdentifiers.IsReadOnlyAttribute.Id) return TextPatternIdentifiers.IsReadOnlyAttribute; else if (id == TextPatternIdentifiers.IsSubscriptAttribute.Id) return TextPatternIdentifiers.IsSubscriptAttribute; else if (id == TextPatternIdentifiers.IsSuperscriptAttribute.Id) return TextPatternIdentifiers.IsSuperscriptAttribute; else if (id == TextPatternIdentifiers.MarginBottomAttribute.Id) return TextPatternIdentifiers.MarginBottomAttribute; else if (id == TextPatternIdentifiers.MarginLeadingAttribute.Id) return TextPatternIdentifiers.MarginLeadingAttribute; else if (id == TextPatternIdentifiers.MarginTopAttribute.Id) return TextPatternIdentifiers.MarginTopAttribute; else if (id == TextPatternIdentifiers.MarginTrailingAttribute.Id) return TextPatternIdentifiers.MarginTrailingAttribute; else if (id == TextPatternIdentifiers.OutlineStylesAttribute.Id) return TextPatternIdentifiers.OutlineStylesAttribute; else if (id == TextPatternIdentifiers.OverlineColorAttribute.Id) return TextPatternIdentifiers.OverlineColorAttribute; else if (id == TextPatternIdentifiers.OverlineStyleAttribute.Id) return TextPatternIdentifiers.OverlineStyleAttribute; else if (id == TextPatternIdentifiers.StrikethroughColorAttribute.Id) return TextPatternIdentifiers.StrikethroughColorAttribute; else if (id == TextPatternIdentifiers.StrikethroughStyleAttribute.Id) return TextPatternIdentifiers.StrikethroughStyleAttribute; else if (id == TextPatternIdentifiers.TabsAttribute.Id) return TextPatternIdentifiers.TabsAttribute; else if (id == TextPatternIdentifiers.TextFlowDirectionsAttribute.Id) return TextPatternIdentifiers.TextFlowDirectionsAttribute; else if (id == TextPatternIdentifiers.UnderlineColorAttribute.Id) return TextPatternIdentifiers.UnderlineColorAttribute; else if (id == TextPatternIdentifiers.UnderlineStyleAttribute.Id) return TextPatternIdentifiers.UnderlineStyleAttribute; else return null; } #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/TreeScope.cs0000644000016200001670000000267011433571545026653 0ustar00hudsonhudson00000000000000//// 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. //// //// Copyright (c) 2008 Novell, Inc. (http://www.novell.com) //// //// Authors: //// Stephen Shaw //// // using System; namespace System.Windows.Automation { [Flags] public enum TreeScope { Element = 1, Children = 2, Descendants = 4, Parent = 8, Ancestors = 16, Subtree = 7, } }mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/CaretPatternIdentifiers.cs0000644000016200001670000000320211433571545031534 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mario Carrion // using System; namespace System.Windows.Automation { internal static class CaretPatternIdentifiers { #region Constructor private const int PatternId = 70005; static CaretPatternIdentifiers () { Pattern = new AutomationPattern (PatternId, "CaretPatternIdentifiers.Pattern"); } #endregion #region Public Fields public static readonly AutomationPattern Pattern; #endregion } } mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/TableItemPatternIdentifiers.cs0000644000016200001670000000440311433571545032350 0ustar00hudsonhudson00000000000000//// 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. //// //// Copyright (c) 2008 Novell, Inc. (http://www.novell.com) //// //// Authors: //// Stephen Shaw //// Mario Carrion //// // using System; namespace System.Windows.Automation { public static class TableItemPatternIdentifiers { private const int PatternId = 10013; private const int ColumnHeaderItemsPropertyId = 30085; private const int RowHeaderItemsPropertyId = 30084; #region Constructor static TableItemPatternIdentifiers() { Pattern = new AutomationPattern (PatternId, "TableItemPatternIdentifiers.Pattern"); ColumnHeaderItemsProperty = new AutomationProperty (ColumnHeaderItemsPropertyId, "TableItemPatternIdentifiers.ColumnHeaderItemsProperty"); RowHeaderItemsProperty = new AutomationProperty (RowHeaderItemsPropertyId, "TableItemPatternIdentifiers.RowHeaderItemsProperty"); } #endregion #region Public Fields public static readonly AutomationProperty ColumnHeaderItemsProperty; public static readonly AutomationPattern Pattern; public static readonly AutomationProperty RowHeaderItemsProperty; #endregion } }mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/AsyncContentLoadedEventArgs.cs0000644000016200001670000000367311433571545032326 0ustar00hudsonhudson00000000000000//// 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. //// //// Copyright (c) 2008 Novell, Inc. (http://www.novell.com) //// //// Authors: //// Stephen Shaw //// // using System; namespace System.Windows.Automation { public enum AsyncContentLoadedState { Beginning = 0, Progress = 1, Completed = 2, } public sealed class AsyncContentLoadedEventArgs : AutomationEventArgs { private AsyncContentLoadedState state; private double percent; public AsyncContentLoadedEventArgs ( AsyncContentLoadedState asyncContentSate, double percentComplete ) : base ( AutomationElementIdentifiers.AsyncContentLoadedEvent ) { state = asyncContentSate; percent = percentComplete; } public AsyncContentLoadedState AsyncContentLoadedState { get { return state; } } public double PercentComplete { get { return percent; } } } }mono-uia-2.1/UIAutomationTypes/System.Windows.Automation/TogglePatternIdentifiers.cs0000644000016200001670000000362411433571545031727 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Sandy Armstrong // using System; namespace System.Windows.Automation { public static class TogglePatternIdentifiers { #region Constructor private const int PatternId = 10015; private const int ToggleStatePropertyId = 30086; static TogglePatternIdentifiers () { Pattern = new AutomationPattern (PatternId, "TogglePatternIdentifiers.Pattern"); ToggleStateProperty = new AutomationProperty (ToggleStatePropertyId, "TogglePatternIdentifiers.ToggleStateProperty"); } #endregion #region Public Fields public static readonly AutomationPattern Pattern; public static readonly AutomationProperty ToggleStateProperty; #endregion } } mono-uia-2.1/UIAutomationTypes/Makefile.in0000644000016200001670000005762711433571551021455 0ustar00hudsonhudson00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : DIST_COMMON = $(srcdir)/AssemblyInfo.cs.in $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/Makefile.include subdir = UIAutomationTypes ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = AssemblyInfo.cs CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(linuxpkgconfigdir)" SCRIPTS = $(bin_SCRIPTS) SOURCES = DIST_SOURCES = DATA = $(linuxpkgconfig_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ GACUTIL = @GACUTIL@ GLIB_SHARP_20_CFLAGS = @GLIB_SHARP_20_CFLAGS@ GLIB_SHARP_20_LIBS = @GLIB_SHARP_20_LIBS@ GMCS = @GMCS@ GTK_SHARP_20_CFLAGS = @GTK_SHARP_20_CFLAGS@ GTK_SHARP_20_LIBS = @GTK_SHARP_20_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MONO = @MONO@ MONO_CFLAGS = @MONO_CFLAGS@ MONO_LIBS = @MONO_LIBS@ NUNIT_CFLAGS = @NUNIT_CFLAGS@ NUNIT_LIBS = @NUNIT_LIBS@ NUNIT_PATH = @NUNIT_PATH@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SN = @SN@ STRIP = @STRIP@ VERSION = @VERSION@ WINDOWSBASE_LIBS = @WINDOWSBASE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_bindir = @expanded_bindir@ expanded_datadir = @expanded_datadir@ expanded_libdir = @expanded_libdir@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = $(build_sources) $(build_resx_files) \ $(build_others_files) $(ASSEMBLY_WRAPPER_IN) $(EXTRAS) \ $(DATA_FILES) $(build_culture_res_files) ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_FLAGS = -lib:@expanded_libdir@/mono/2.0 -lib:../bin -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" -d:NET_2_0 ASSEMBLY = ../bin/UIAutomationTypes.dll ASSEMBLY_MDB = $(ASSEMBLY).mdb COMPILE_TARGET = library PROJECT_REFERENCES = BUILD_DIR = ../bin PACKAGE_FLAG = /package accessibility UIAUTOMATIONTYPES_DLL_MDB_SOURCE = ../bin/UIAutomationTypes.dll.mdb UIAUTOMATIONTYPES_DLL_MDB = $(BUILD_DIR)/UIAutomationTypes.dll.mdb AL = al2 SATELLITE_ASSEMBLY_NAME = Mono.UIAutomation.Types.resources.dll PROGRAMFILES = \ $(UIAUTOMATIONTYPES_DLL_MDB) RESGEN = resgen2 PROJECT_SOURCE_FILES = \ System.Windows.Automation.Text/AnimationStyle.cs \ System.Windows.Automation.Text/BulletStyle.cs \ System.Windows.Automation.Text/CapStyle.cs \ System.Windows.Automation.Text/FlowDirections.cs \ System.Windows.Automation.Text/HorizontalTextAlignment.cs \ System.Windows.Automation.Text/OutlineStyles.cs \ System.Windows.Automation.Text/TextDecorationLineStyle.cs \ System.Windows.Automation.Text/TextPatternRangeEndpoint.cs \ System.Windows.Automation.Text/TextUnit.cs \ System.Windows.Automation/AsyncContentLoadedEventArgs.cs \ System.Windows.Automation/AutomationElementIdentifiers.cs \ System.Windows.Automation/AutomationEvent.cs \ System.Windows.Automation/AutomationEventArgs.cs \ System.Windows.Automation/AutomationIdentifier.cs \ System.Windows.Automation/AutomationPattern.cs \ System.Windows.Automation/AutomationProperty.cs \ System.Windows.Automation/AutomationPropertyChangedEventArgs.cs \ System.Windows.Automation/AutomationTextAttribute.cs \ System.Windows.Automation/CaretPatternIdentifiers.cs \ System.Windows.Automation/ClipboardPatternIdentifiers.cs \ System.Windows.Automation/ControlType.cs \ System.Windows.Automation/DockPatternIdentifiers.cs \ System.Windows.Automation/DockPosition.cs \ System.Windows.Automation/EditableRangePatternIdentifiers.cs \ System.Windows.Automation/ElementNotAvailableException.cs \ System.Windows.Automation/ElementNotEnabledException.cs \ System.Windows.Automation/EmbeddedImagePatternIdentifiers.cs \ System.Windows.Automation/ExpandCollapsePatternIdentifiers.cs \ System.Windows.Automation/ExpandCollapseState.cs \ System.Windows.Automation/GridItemPatternIdentifiers.cs \ System.Windows.Automation/GridPatternIdentifiers.cs \ System.Windows.Automation/InsertDeleteTextPatternIdentifiers.cs \ System.Windows.Automation/InvokePatternIdentifiers.cs \ System.Windows.Automation/KeyEventArgs.cs \ System.Windows.Automation/MultipleViewPatternIdentifiers.cs \ System.Windows.Automation/NoClickablePointException.cs \ System.Windows.Automation/OrientationType.cs \ System.Windows.Automation/ProxyAssemblyNotLoadedException.cs \ System.Windows.Automation/RangeValuePatternIdentifiers.cs \ System.Windows.Automation/RowOrColumnMajor.cs \ System.Windows.Automation/ScrollAmount.cs \ System.Windows.Automation/ScrollItemPatternIdentifiers.cs \ System.Windows.Automation/ScrollPatternIdentifiers.cs \ System.Windows.Automation/SelectionItemPatternIdentifiers.cs \ System.Windows.Automation/SelectionPatternIdentifiers.cs \ System.Windows.Automation/StructureChangedEventArgs.cs \ System.Windows.Automation/StructureChangeType.cs \ System.Windows.Automation/SupportedTextSelection.cs \ System.Windows.Automation/TableItemPatternIdentifiers.cs \ System.Windows.Automation/TablePatternIdentifiers.cs \ System.Windows.Automation/TextPatternIdentifiers.cs \ System.Windows.Automation/TogglePatternIdentifiers.cs \ System.Windows.Automation/ToggleState.cs \ System.Windows.Automation/TransformPatternIdentifiers.cs \ System.Windows.Automation/TreeScope.cs \ System.Windows.Automation/ValuePatternIdentifiers.cs \ System.Windows.Automation/WindowClosedEventArgs.cs \ System.Windows.Automation/WindowInteractionState.cs \ System.Windows.Automation/WindowPatternIdentifiers.cs \ System.Windows.Automation/WindowVisualState.cs FILES = \ AssemblyInfo.cs \ ../build/common/*.cs \ $(PROJECT_SOURCE_FILES) DATA_FILES = RESOURCES = REFERENCES = \ WindowsBase \ System \ Mono.Posix DLL_REFERENCES = CLEANFILES = $(PROGRAMFILES) $(ASSEMBLY) $(ASSEMBLY).mdb $(BINARIES) \ $(build_resx_resources) $(build_satellite_assembly_list) VALID_CULTURES = ar bg ca zh-CHS cs da de el en es fi fr he hu is it ja ko nl no pl pt ro ru hr sk sq sv th tr id uk be sl et lv lt fa vi hy eu mk af fo hi sw gu ta te kn mr gl kok ar-SA bg-BG ca-ES zh-TW cs-CZ da-DK de-DE el-GR en-US fi-FI fr-FR he-IL hu-HU is-IS it-IT ja-JP ko-KR nl-NL nb-NO pl-PL pt-BR ro-RO ru-RU hr-HR sk-SK sq-AL sv-SE th-TH tr-TR id-ID uk-UA be-BY sl-SI et-EE lv-LV lt-LT fa-IR vi-VN hy-AM eu-ES mk-MK af-ZA fo-FO hi-IN sw-KE gu-IN ta-IN te-IN kn-IN mr-IN gl-ES kok-IN ar-IQ zh-CN de-CH en-GB es-MX fr-BE it-CH nl-BE nn-NO pt-PT sv-FI ar-EG zh-HK de-AT en-AU es-ES fr-CA ar-LY zh-SG de-LU en-CA es-GT fr-CH ar-DZ zh-MO en-NZ es-CR fr-LU ar-MA en-IE es-PA ar-TN en-ZA es-DO ar-OM es-VE ar-YE es-CO ar-SY es-PE ar-JO es-AR ar-LB en-ZW es-EC ar-KW en-PH es-CL ar-AE es-UY ar-BH es-PY ar-QA es-BO es-SV es-HN es-NI es-PR zh-CHT s2q = $(subst \ ,?,$1) q2s = $(subst ?,\ ,$1) # use this when result will be quoted unesc2 = $(subst ?, ,$1) build_sources = $(FILES) $(GENERATED_FILES) build_sources_esc = $(call s2q,$(build_sources)) # use unesc2, as build_sources_embed is quoted build_sources_embed = $(call unesc2,$(build_sources_esc:%='$(srcdir)/%')) comma__ = , get_resource_name = $(firstword $(subst $(comma__), ,$1)) get_culture = $(lastword $(subst ., ,$(basename $1))) is_cultured_resource = $(and $(word 3,$(subst ., ,$1)), $(filter $(VALID_CULTURES),$(lastword $(subst ., ,$(basename $1))))) RESOURCES_ESC = $(call s2q,$(RESOURCES)) build_resx_list = $(foreach res, $(RESOURCES_ESC), $(if $(filter %.resx, $(call get_resource_name,$(res))),$(res),)) build_non_culture_resx_list = $(foreach res, $(build_resx_list),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) build_non_culture_others_list = $(foreach res, $(filter-out $(build_resx_list),$(RESOURCES_ESC)),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) build_others_list = $(build_non_culture_others_list) build_xamlg_list = $(filter %.xaml.g.cs, $(FILES)) # resgen all .resx resources build_resx_files = $(foreach res, $(build_resx_list), $(call get_resource_name,$(res))) build_resx_resources_esc = $(build_resx_files:.resx=.resources) build_resx_resources = $(call q2s,$(build_resx_resources_esc)) # embed resources for the main assembly build_resx_resources_hack = $(subst .resx,.resources, $(build_non_culture_resx_list)) # use unesc2, as build_resx_resources_embed is quoted build_resx_resources_embed = $(call unesc2,$(build_resx_resources_hack:%='-resource:%')) build_others_files = $(call q2s,$(foreach res, $(build_others_list),$(call get_resource_name,$(res)))) build_others_resources = $(build_others_files) # use unesc2, as build_others_resources_embed is quoted build_others_resources_embed = $(call unesc2,$(build_others_list:%='-resource:$(srcdir)/%')) build_resources = $(build_resx_resources) $(build_others_resources) build_resources_embed = $(build_resx_resources_embed) $(build_others_resources_embed) # -usesourcepath is available only for resgen2 emit_resgen_target_1 = $(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); cd '$$(shell dirname '$$<')' && $$(RESGEN) '$$(shell basename '$$<')' '$$(shell basename '$$@')' emit_resgen_target_2 = $(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); $$(RESGEN) -usesourcepath '$$<' '$$@' emit_resgen_target = $(if $(filter resgen2,$(RESGEN)),$(emit_resgen_target_2),$(emit_resgen_target_1)) emit_resgen_targets = $(foreach res,$(build_resx_resources_esc),$(eval $(call emit_resgen_target,$(res)))) build_references_ref = $(call q2s,$(foreach ref, $(call \ s2q,$(REFERENCES)), $(if $(filter -pkg:%, $(ref)), $(ref), \ $(if $(filter -r:%, $(ref)), $(ref), -r:$(ref))))) $(call \ q2s,$(foreach ref, $(call s2q,$(DLL_REFERENCES)), -r:$(ref))) \ $(call q2s,$(foreach ref, $(call s2q,$(PROJECT_REFERENCES)), \ -r:$(ref))) s2q2s = $(call unesc2,$(call s2q,$1)) cp_actual = test -z $1 || cp $1 $2 cp = $(call cp_actual,'$(call s2q2s,$1)','$(call s2q2s,$2)') rm_actual = test -z '$1' || rm -f '$2' rm = $(call rm_actual,$(call s2q2s,$1),$(call s2q2s,$2)/$(shell basename '$(call s2q2s,$1)')) DISTCLEANFILES = $(GENERATED_FILES) $(pc_files) $(BUILD_DIR)/* #pkglib_SCRIPTS = $(ASSEMBLY) bin_SCRIPTS = $(BINARIES) #programfilesdir = @libdir@/@PACKAGE@ #programfiles_DATA = $(PROGRAMFILES) linuxpkgconfigdir = @libdir@/pkgconfig linuxpkgconfig_DATA = $(LINUX_PKGCONFIG) # generating satellite assemblies culture_resources = $(foreach res, $(RESOURCES_ESC), $(if $(call is_cultured_resource,$(call get_resource_name, $(res))),$(res))) cultures = $(sort $(foreach res, $(culture_resources), $(call get_culture,$(call get_resource_name,$(res))))) culture_resource_dependencies = $(call q2s,$(BUILD_DIR)/$1/$(SATELLITE_ASSEMBLY_NAME): $(subst .resx,.resources,$2)) culture_resource_commandlines = $(call unesc2,cmd_line_satellite_$1 += '/embed:$(subst .resx,.resources,$2)') build_satellite_assembly_list = $(call q2s,$(cultures:%=$(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME))) build_culture_res_files = $(call q2s,$(foreach res, $(culture_resources),$(call get_resource_name,$(res)))) GACROOT = $(DESTDIR)$(prefix)/lib all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.include $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign UIAutomationTypes/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign UIAutomationTypes/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): AssemblyInfo.cs: $(top_builddir)/config.status $(srcdir)/AssemblyInfo.cs.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files install-linuxpkgconfigDATA: $(linuxpkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(linuxpkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(linuxpkgconfigdir)" @list='$(linuxpkgconfig_DATA)'; test -n "$(linuxpkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(linuxpkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(linuxpkgconfigdir)" || exit $$?; \ done uninstall-linuxpkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(linuxpkgconfig_DATA)'; test -n "$(linuxpkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(linuxpkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(linuxpkgconfigdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) $(DATA) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(linuxpkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-linuxpkgconfigDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-linuxpkgconfigDATA \ uninstall-local .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-binSCRIPTS install-data \ install-data-am install-data-local install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-linuxpkgconfigDATA \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-binSCRIPTS uninstall-linuxpkgconfigDATA \ uninstall-local all: $(ASSEMBLY) $(PROGRAMFILES) install-data-local: gac-install uninstall-local: gac-uninstall # macros # $(call emit-deploy-target,deploy-variable-name) define emit-deploy-target $($1): $($1_SOURCE) mkdir -p '$$(shell dirname '$$@')' cp '$$<' '$$@' endef # $(call emit-deploy-wrapper,wrapper-variable-name,wrapper-sourcefile,x) # assumes that for a wrapper foo.pc its source template is foo.pc.in # if $3 is non-empty then wrapper is marked exec define emit-deploy-wrapper $($1): $2 mkdir -p '$$(shell dirname '$$@')' cp '$$<' '$$@' $(if $3,chmod +x '$$@') endef $(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_dependencies,$(call get_culture,$(call get_resource_name,$(res))),$(call get_resource_name,$(res)))))) $(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_commandlines,$(call get_culture,$(call get_resource_name,$(res))),$(res))))) $(build_satellite_assembly_list): $(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME): mkdir -p '$(@D)' $(AL) -out:'$@' -culture:$* -t:lib $(cmd_line_satellite_$*) gac-install: $(POLICY_ASSEMBLIES) $(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS) /root $(GACROOT) $(PACKAGE_FLAG) || exit 1; gac-uninstall: $(GACUTIL) /us $(ASSEMBLY) $(GACUTIL_FLAGS) /root $(GACROOT) $(PACKAGE_FLAG) || exit 1; $(eval $(call emit_resgen_targets)) $(build_xamlg_list): %.xaml.g.cs: %.xaml xamlg '$<' $(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list) mkdir -p $(shell dirname $(ASSEMBLY)) $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) sn -q -R $(ASSEMBLY) $(top_srcdir)/mono.snk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: mono-uia-2.1/UIAutomationProvider/0000777000016200001670000000000011433571554020064 5ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationProvider/Makefile.am0000644000016200001670000000706511433571545022124 0ustar00hudsonhudson00000000000000 EXTRA_DIST = ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_FLAGS = -lib:@expanded_libdir@/mono/2.0 -lib:../bin -lib:@expanded_libdir@/mono/accessibility -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" -d:NET_2_0 ASSEMBLY = ../bin/UIAutomationProvider.dll ASSEMBLY_MDB = $(ASSEMBLY).mdb COMPILE_TARGET = library PROJECT_REFERENCES = BUILD_DIR = ../bin PACKAGE_FLAG = /package accessibility UIAUTOMATIONPROVIDER_DLL_MDB_SOURCE=../bin/UIAutomationProvider.dll.mdb UIAUTOMATIONPROVIDER_DLL_MDB=$(BUILD_DIR)/UIAutomationProvider.dll.mdb AL=al2 SATELLITE_ASSEMBLY_NAME=Mono.UIAutomation.Provider.resources.dll PROGRAMFILES = \ $(UIAUTOMATIONPROVIDER_DLL_MDB) RESGEN=resgen2 all: $(ASSEMBLY) $(PROGRAMFILES) FILES = \ AssemblyInfo.cs \ ../build/common/*.cs \ $(PROJECT_SOURCE_FILES) PROJECT_SOURCE_FILES = \ System.Windows.Automation.Provider/AutomationInteropProvider.cs \ System.Windows.Automation.Provider/ICaretProvider.cs \ System.Windows.Automation.Provider/IClipboardProvider.cs \ System.Windows.Automation.Provider/IDockProvider.cs \ System.Windows.Automation.Provider/IEditableRangeProvider.cs \ System.Windows.Automation.Provider/IEmbeddedImageProvider.cs \ System.Windows.Automation.Provider/IExpandCollapseProvider.cs \ System.Windows.Automation.Provider/IGridItemProvider.cs \ System.Windows.Automation.Provider/IGridProvider.cs \ System.Windows.Automation.Provider/IInsertDeleteTextProvider.cs \ System.Windows.Automation.Provider/IInvokeProvider.cs \ System.Windows.Automation.Provider/IMultipleViewProvider.cs \ System.Windows.Automation.Provider/IRangeValueProvider.cs \ System.Windows.Automation.Provider/IRawElementProviderAdviseEvents.cs \ System.Windows.Automation.Provider/IRawElementProviderFragment.cs \ System.Windows.Automation.Provider/IRawElementProviderFragmentRoot.cs \ System.Windows.Automation.Provider/IRawElementProviderHwndOverride.cs \ System.Windows.Automation.Provider/IRawElementProviderSimple.cs \ System.Windows.Automation.Provider/IScrollItemProvider.cs \ System.Windows.Automation.Provider/IScrollProvider.cs \ System.Windows.Automation.Provider/ISelectionItemProvider.cs \ System.Windows.Automation.Provider/ISelectionProvider.cs \ System.Windows.Automation.Provider/ITableItemProvider.cs \ System.Windows.Automation.Provider/ITableProvider.cs \ System.Windows.Automation.Provider/ITextProvider.cs \ System.Windows.Automation.Provider/ITextRangeProvider.cs \ System.Windows.Automation.Provider/IToggleProvider.cs \ System.Windows.Automation.Provider/ITransformProvider.cs \ System.Windows.Automation.Provider/IValueProvider.cs \ System.Windows.Automation.Provider/IWindowProvider.cs \ System.Windows.Automation.Provider/NavigateDirection.cs \ System.Windows.Automation.Provider/ProviderOptions.cs DATA_FILES = RESOURCES = REFERENCES = \ WindowsBase \ System \ UIAutomationBridge \ UIAutomationTypes DLL_REFERENCES = CLEANFILES = $(PROGRAMFILES) install-data-local: gac-install uninstall-local: gac-uninstall include $(top_srcdir)/Makefile.include $(eval $(call emit_resgen_targets)) $(build_xamlg_list): %.xaml.g.cs: %.xaml xamlg '$<' $(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list) mkdir -p $(shell dirname $(ASSEMBLY)) $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) sn -q -R $(ASSEMBLY) $(top_srcdir)/mono.snk mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/0000777000016200001670000000000011433571554026711 5ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/IRangeValueProvider.cs0000644000016200001670000000323611433571545033115 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation.Provider { [Guid ("36dc7aef-33e6-4691-afe1-2be7274b3d33")] [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] [ComVisible (true)] public interface IRangeValueProvider { bool IsReadOnly { get; } double LargeChange { get; } double Maximum { get; } double Minimum { get; } double SmallChange { get; } double Value { get; } void SetValue (double value); } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/IInsertDeleteTextProvider.cs0000644000016200001670000000265211433571545034321 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2009 Novell, Inc. (http://www.novell.com) // // Authors: // Brad Taylor // using System; using System.Windows; namespace System.Windows.Automation.Provider { internal interface IInsertDeleteTextProvider { void InsertText (string str, ref int position); void DeleteText (int start, int end); } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/IWindowProvider.cs0000644000016200001670000000345411433571545032335 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; using System.Windows.Automation; namespace System.Windows.Automation.Provider { [Guid ("987df77b-db06-4d77-8f8a-86a9c3bb90b9")] [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] [ComVisible (true)] public interface IWindowProvider { WindowInteractionState InteractionState { get; } bool IsModal { get; } bool IsTopmost { get; } bool Maximizable { get; } bool Minimizable { get; } WindowVisualState VisualState { get; } void Close (); void SetVisualState (WindowVisualState state); bool WaitForInputIdle (int milliseconds); } } IRawElementProviderAdviseEvents.cs0000644000016200001670000000321411433571545035365 0ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; using System.Windows; namespace System.Windows.Automation.Provider { [Guid ("a407b27b-0f6d-4427-9292-473c7bf93258")] [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] [ComVisible (true)] public interface IRawElementProviderAdviseEvents : IRawElementProviderSimple { void AdviseEventAdded (int eventId, int[] properties); void AdviseEventRemoved (int eventId, int[] properties); } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/IScrollProvider.cs0000644000016200001670000000356711433571545032331 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; using System.Windows.Automation; namespace System.Windows.Automation.Provider { [Guid ("b38b8077-1fc3-42a5-8cae-d40c2215055a")] [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] [ComVisible (true)] public interface IScrollProvider { bool HorizontallyScrollable { get; } double HorizontalScrollPercent { get; } double HorizontalViewSize { get; } bool VerticallyScrollable { get; } double VerticalScrollPercent { get; } double VerticalViewSize { get; } void Scroll (ScrollAmount horizontalAmount, ScrollAmount verticalAmount); void SetScrollPercent (double horizontalPercent, double verticalPercent); } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/IRawElementProviderSimple.cs0000644000016200001670000000326711433571545034305 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; using System.Windows; namespace System.Windows.Automation.Provider { [Guid ("d6dd68d1-86fd-4332-8666-9abedea2d24c")] [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] [ComVisible (true)] public interface IRawElementProviderSimple { IRawElementProviderSimple HostRawElementProvider { get; } ProviderOptions ProviderOptions { get; } object GetPatternProvider (int patternId); object GetPropertyValue (int propertyId); } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/ICaretProvider.cs0000644000016200001670000000274411433571545032125 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008,2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Windows.Automation; namespace System.Windows.Automation.Provider { internal interface ICaretProvider { int CaretOffset { get; } bool SetCaretOffset (int offset); string GetSelection (int selectionNum, out int startOffset, out int endOffset); } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/IEmbeddedImageProvider.cs0000644000016200001670000000267111433571545033522 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Andrés G. Aragoneses // Brad Taylor // using System; using System.Windows; namespace System.Windows.Automation.Provider { internal interface IEmbeddedImageProvider { Rect Bounds { get; } string Description { get; } } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/IEditableRangeProvider.cs0000644000016200001670000000264711433571545033557 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008,2009 Novell, Inc. (http://www.novell.com) // // Authors: // Mike Gorse // using System; using System.Windows; using System.Windows.Automation; namespace System.Windows.Automation.Provider { internal interface IEditableRangeProvider { void BeginEdit (string text); void CommitEdit (); } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/IValueProvider.cs0000644000016200001670000000305111433571545032133 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation.Provider { [Guid ("c7935180-6fb3-4201-b174-7df73adbf64a")] [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] [ComVisible (true)] public interface IValueProvider { bool IsReadOnly { get; } string Value { get; } void SetValue (string value); } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/ITextProvider.cs0000644000016200001670000000350111433571545032003 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System.Runtime.InteropServices; using System.Windows; using System.Windows.Automation; namespace System.Windows.Automation.Provider { [Guid ("3589c92c-63f3-4367-99bb-ada653b77cf2")] [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] [ComVisible (true)] public interface ITextProvider { ITextRangeProvider DocumentRange { get; } SupportedTextSelection SupportedTextSelection { get; } ITextRangeProvider[] GetSelection (); ITextRangeProvider[] GetVisibleRanges (); ITextRangeProvider RangeFromChild (IRawElementProviderSimple childElement); ITextRangeProvider RangeFromPoint (Point screenLocation); } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/IInvokeProvider.cs0000644000016200001670000000274711433571545032325 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation.Provider { [Guid ("54fcb24b-e18e-47a2-b4d3-eccbe77599a2")] [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] [ComVisible (true)] public interface IInvokeProvider { void Invoke(); } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/IScrollItemProvider.cs0000644000016200001670000000276511433571545033147 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation.Provider { [Guid ("2360c714-4bf1-4b26-ba65-9b21316127eb")] [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] [ComVisible (true)] public interface IScrollItemProvider { void ScrollIntoView (); } } IRawElementProviderFragmentRoot.cs0000644000016200001670000000325511433571545035401 0ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; using System.Windows; namespace System.Windows.Automation.Provider { [Guid ("620ce2a5-ab8f-40a9-86cb-de3c75599b58")] [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] [ComVisible (true)] public interface IRawElementProviderFragmentRoot : IRawElementProviderFragment, IRawElementProviderSimple { IRawElementProviderFragment ElementProviderFromPoint (double x, double y); IRawElementProviderFragment GetFocus (); } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/NavigateDirection.cs0000644000016200001670000000301511433571545032632 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; using System.Windows; namespace System.Windows.Automation.Provider { [Guid ("670c3006-bf4c-428b-8534-e1848f645122")] [ComVisible (true)] public enum NavigateDirection { Parent = 0, NextSibling = 1, PreviousSibling = 2, FirstChild = 3, LastChild = 4, } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/IGridProvider.cs0000644000016200001670000000310311433571545031742 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation.Provider { [Guid ("b17d6187-0907-464b-a168-0ef17a1572b1")] [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] [ComVisible (true)] public interface IGridProvider { int ColumnCount { get; } int RowCount { get; } IRawElementProviderSimple GetItem (int row, int column); } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/IToggleProvider.cs0000644000016200001670000000305511433571545032304 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; using System.Windows.Automation; namespace System.Windows.Automation.Provider { [Guid ("56d00bd0-c4f4-433c-a836-1a52a57e0892")] [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] [ComVisible (true)] public interface IToggleProvider { ToggleState ToggleState { get; } void Toggle (); } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/IClipboardProvider.cs0000644000016200001670000000265511433571545032767 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008,2009 Novell, Inc. (http://www.novell.com) // // Authors: // Brad Taylor // using System; using System.Windows; using System.Windows.Automation; namespace System.Windows.Automation.Provider { internal interface IClipboardProvider { void Copy (int start, int end); void Paste (int position); } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/ISelectionItemProvider.cs0000644000016200001670000000317611433571545033633 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation.Provider { [Guid ("2acad808-b2d4-452d-a407-91ff1ad167b2")] [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] [ComVisible (true)] public interface ISelectionItemProvider { bool IsSelected { get; } IRawElementProviderSimple SelectionContainer { get; } void AddToSelection (); void RemoveFromSelection (); void Select (); } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/IRawElementProviderFragment.cs0000644000016200001670000000343411433571545034613 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; using System.Windows; namespace System.Windows.Automation.Provider { [Guid ("f7063da8-8359-439c-9297-bbc5299a7d87")] [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] [ComVisible (true)] public interface IRawElementProviderFragment : IRawElementProviderSimple { Rect BoundingRectangle { get; } IRawElementProviderFragmentRoot FragmentRoot { get; } IRawElementProviderSimple[] GetEmbeddedFragmentRoots(); int[] GetRuntimeId (); IRawElementProviderFragment Navigate (NavigateDirection direction); void SetFocus (); } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/IDockProvider.cs0000644000016200001670000000311711433571545031742 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; using System.Windows.Automation; namespace System.Windows.Automation.Provider { [Guid ("159bc72c-4ad3-485e-9637-d7052edf0146")] [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] [ComVisible (true)] public interface IDockProvider { DockPosition DockPosition { get; } void SetDockPosition (DockPosition dockPosition); } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/IGridItemProvider.cs0000644000016200001670000000314711433571545032571 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation.Provider { [Guid ("d02541f1-fb81-4d64-ae32-f520f8a6dbd1")] [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] [ComVisible (true)] public interface IGridItemProvider { int Column { get; } int ColumnSpan { get; } IRawElementProviderSimple ContainingGrid { get; } int Row { get; } int RowSpan { get; } } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/ITextRangeProvider.cs0000644000016200001670000000475111433571545032770 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; using System.Windows.Automation.Text; namespace System.Windows.Automation.Provider { [Guid ("5347ad7b-c355-46f8-aff5-909033582f63")] [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] [ComVisible (true)] public interface ITextRangeProvider { void AddToSelection (); ITextRangeProvider Clone (); bool Compare (ITextRangeProvider range); int CompareEndpoints (TextPatternRangeEndpoint endpoint, ITextRangeProvider targetRange, TextPatternRangeEndpoint targetEndpoint); void ExpandToEnclosingUnit (TextUnit unit); ITextRangeProvider FindAttribute (int attribute, object value, bool backward); ITextRangeProvider FindText (string text, bool backward, bool ignoreCase); object GetAttributeValue (int attribute); Rect[] GetBoundingRectangles (); IRawElementProviderSimple[] GetChildren (); IRawElementProviderSimple GetEnclosingElement (); string GetText (int maxLength); int Move (TextUnit unit, int count); void MoveEndpointByRange (TextPatternRangeEndpoint endpoint, ITextRangeProvider targetRange, TextPatternRangeEndpoint targetEndpoint); int MoveEndpointByUnit (TextPatternRangeEndpoint endpoint, TextUnit unit, int count); void RemoveFromSelection (); void ScrollIntoView (bool alignToTop); void Select (); } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/IMultipleViewProvider.cs0000644000016200001670000000313211433571545033505 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation.Provider { [Guid ("6278cab1-b556-4a1a-b4e0-418acc523201")] [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] [ComVisible (true)] public interface IMultipleViewProvider { int CurrentView { get; } int[] GetSupportedViews(); string GetViewName(int viewId); void SetCurrentView(int viewId); } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/IExpandCollapseProvider.cs0000644000016200001670000000315311433571545033764 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; using System.Windows.Automation; namespace System.Windows.Automation.Provider { [Guid ("d847d3a5-cab0-4a98-8c32-ecb45c59ad24")] [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] [ComVisible (true)] public interface IExpandCollapseProvider { ExpandCollapseState ExpandCollapseState { get; } void Collapse (); void Expand (); } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/ITransformProvider.cs0000644000016200001670000000322511433571545033035 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation.Provider { [Guid ("6829ddc4-4f91-4ffa-b86f-bd3e2987cb4c")] [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] [ComVisible (true)] public interface ITransformProvider { bool CanMove { get; } bool CanResize { get; } bool CanRotate { get; } void Move (double x, double y); void Resize (double width, double height); void Rotate (double degrees); } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/ITableItemProvider.cs0000644000016200001670000000311111433571545032722 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System.Runtime.InteropServices; namespace System.Windows.Automation.Provider { [Guid ("b9734fa6-771f-4d78-9c90-2517999349cd")] [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] [ComVisible (true)] public interface ITableItemProvider : IGridItemProvider { IRawElementProviderSimple[] GetColumnHeaderItems (); IRawElementProviderSimple[] GetRowHeaderItems (); } }mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/AutomationInteropProvider.cs0000644000016200001670000001400211433571545034425 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Windows.Automation; using System.Reflection; using System.Collections.Generic; using Mono.UIAutomation.Bridge; namespace System.Windows.Automation.Provider { public static class AutomationInteropProvider { public const int AppendRuntimeId = 3; public const int InvalidateLimit = 20; public const int RootObjectId = -25; private static IList bridges; private static Dictionary providerMapping = new Dictionary (); static AutomationInteropProvider () { bridges = BridgeManager.GetAutomationBridges (); if (bridges == null) bridges = new List (); } public static bool ClientsAreListening { get { // Important to forward to all bridges, // even after one has returned true. bool listening = false; foreach (var bridge in bridges) if (bridge.ClientsAreListening) listening = true; return listening; } } public static IRawElementProviderSimple HostProviderFromHandle (IntPtr hwnd) { foreach (var bridge in bridges) { var provider = bridge.HostProviderFromHandle (hwnd) as IRawElementProviderSimple; if (provider != null) return provider; } return null; } public static void RaiseAutomationEvent (AutomationEvent eventId, IRawElementProviderSimple provider, AutomationEventArgs e) { foreach (var bridge in bridges) bridge.RaiseAutomationEvent (eventId, provider, e); } public static void RaiseAutomationPropertyChangedEvent (IRawElementProviderSimple element, AutomationPropertyChangedEventArgs e) { foreach (var bridge in bridges) bridge.RaiseAutomationPropertyChangedEvent (element, e); } public static void RaiseStructureChangedEvent (IRawElementProviderSimple provider, StructureChangedEventArgs e) { foreach (var bridge in bridges) bridge.RaiseStructureChangedEvent (provider, e); } public static IntPtr ReturnRawElementProvider (IntPtr hwnd, IntPtr wParam, IntPtr lParam, IRawElementProviderSimple el) { // Hopefully using the hwnd as a hashcode is unique // enough. I am concerned about being called multiple // times for the same hwnd before the value is // retrieved though. providerMapping [hwnd] = new WeakReference (el); return hwnd; } internal static IRawElementProviderSimple RetrieveAndDeleteProvider (IntPtr result) { if (!providerMapping.ContainsKey (result)) { return null; } WeakReference weakRef = providerMapping [result]; if (!weakRef.IsAlive) { return null; } providerMapping.Remove (result); return weakRef.Target as IRawElementProviderSimple; } } internal static class BridgeManager { private static string UiaAtkBridgeAssembly = "UiaAtkBridge, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f4ceacb585d99812"; private static string UiaDbusBridgeAssembly = "UiaDbusBridge, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f4ceacb585d99812"; public static IList GetAutomationBridges () { List bridges = new List (); // Let MONO_UIA_BRIDGE env var override default bridge string bridgeAssemblyNames = Environment.GetEnvironmentVariable ("MONO_UIA_BRIDGE"); if (string.IsNullOrEmpty (bridgeAssemblyNames)) bridgeAssemblyNames = UiaAtkBridgeAssembly + ";" + UiaDbusBridgeAssembly; foreach (string bridgeAssembly in bridgeAssemblyNames.Split (';')) { if (string.IsNullOrEmpty (bridgeAssembly)) continue; IAutomationBridge bridge = GetAutomationBridge (bridgeAssembly); if (bridge != null) bridges.Add (bridge); } return bridges; } private static IAutomationBridge GetAutomationBridge (string bridgeAssemblyName) { Assembly bridgeAssembly = null; try { bridgeAssembly = Assembly.Load (bridgeAssemblyName); } catch (Exception e){ Console.WriteLine (string.Format ("Error loading UIA bridge ({0}): {1}", bridgeAssemblyName, e)); return null; } Type bridgeType = null; // Quickie inefficent implementation Type bridgeInterfaceType = typeof (IAutomationBridge); foreach (Type type in bridgeAssembly.GetTypes ()) { if (bridgeInterfaceType.IsAssignableFrom (type)) { bridgeType = type; break; } } if (bridgeType == null) { Console.WriteLine ("No UIA bridge found in assembly: " + bridgeAssemblyName); return null; } try { IAutomationBridge bridge = (IAutomationBridge) Activator.CreateInstance (bridgeType); if (!bridge.IsAccessibilityEnabled) return null; bridge.Initialize (); return bridge; } catch (Exception e) { Console.WriteLine ("Failed to load UIA bridge: " + e); return null; } } } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/ProviderOptions.cs0000644000016200001670000000277011433571545032410 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; using System.Windows; namespace System.Windows.Automation.Provider { [Flags] public enum ProviderOptions { ClientSideProvider = 1, ServerSideProvider = 2, NonClientAreaProvider = 4, OverrideProvider = 8, ProviderOwnsSetFocus = 16, } } IRawElementProviderHwndOverride.cs0000644000016200001670000000313611433571545035370 0ustar00hudsonhudson00000000000000mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; using System.Windows; namespace System.Windows.Automation.Provider { [Guid ("1d5df27c-8947-4425-b8d9-79787bb460b8")] [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] [ComVisible (true)] public interface IRawElementProviderHwndOverride : IRawElementProviderSimple { IRawElementProviderSimple GetOverrideProviderForHwnd (IntPtr hwnd); } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/ITableProvider.cs0000644000016200001670000000321211433571545032105 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System.Runtime.InteropServices; using System.Windows.Automation; namespace System.Windows.Automation.Provider { [Guid ("9c860395-97b3-490a-b52a-858cc22af166")] [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] [ComVisible (true)] public interface ITableProvider : IGridProvider { RowOrColumnMajor RowOrColumnMajor { get; } IRawElementProviderSimple[] GetColumnHeaders (); IRawElementProviderSimple[] GetRowHeaders (); } } mono-uia-2.1/UIAutomationProvider/System.Windows.Automation.Provider/ISelectionProvider.cs0000644000016200001670000000311611433571545033006 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Runtime.InteropServices; namespace System.Windows.Automation.Provider { [Guid ("fb8b03af-3bdf-48d4-bd36-1a65793be168")] [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] [ComVisible (true)] public interface ISelectionProvider { bool CanSelectMultiple { get; } bool IsSelectionRequired { get; } IRawElementProviderSimple[] GetSelection (); } }mono-uia-2.1/UIAutomationProvider/AssemblyInfo.cs.in0000644000016200001670000000701611433571545023413 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Resources; using System.Reflection; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security; using System.Security.Permissions; // General Information about the UIAutomationProvider assembly // v3.0 Assembly [assembly: AssemblyCompany (Consts.MonoCompany)] [assembly: AssemblyProduct (Consts.MonoProduct)] [assembly: AssemblyCopyright (Consts.MonoCopyright)] [assembly: AssemblyVersion (Consts.FxVersion)] [assembly: AssemblyFileVersion (Consts.WinFileVersion)] [assembly: NeutralResourcesLanguage ("en")] [assembly: CLSCompliant (true)] [assembly: AssemblyDelaySign (true)] [assembly: AssemblyKeyFile ("@abs_top_srcdir@/winfx3.pub")] [assembly: ComVisible (false)] [assembly: AllowPartiallyTrustedCallers] [assembly: CompilationRelaxations (CompilationRelaxations.NoStringInterning)] [assembly: Debuggable (DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: RuntimeCompatibility (WrapNonExceptionThrows = true)] [assembly: PermissionSet (SecurityAction.RequestMinimum, Name = "FullTrust")] [assembly: SecurityPermission (SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: InternalsVisibleTo("UIAutomationWinforms, PublicKey=00240000048000009400000006020000002400005253413100040000110000004bb98b1af6c1df0df8c02c380e116b7a7f0c8c827aecfccddc6e29b7c754cd608b49dfcef4df9699ad182e50f66afa4e68dabc7b6aeeec0aa4719a5f8e0aae8c193080a706adc3443a8356b1f254142034995532ac176398e12a30f6a74a119a89ac47672c9ae24d7e90de686557166e3b873cd707884431a0451d9d6f7fe795")] [assembly: InternalsVisibleTo("UiaAtkBridge, PublicKey=00240000048000009400000006020000002400005253413100040000110000004bb98b1af6c1df0df8c02c380e116b7a7f0c8c827aecfccddc6e29b7c754cd608b49dfcef4df9699ad182e50f66afa4e68dabc7b6aeeec0aa4719a5f8e0aae8c193080a706adc3443a8356b1f254142034995532ac176398e12a30f6a74a119a89ac47672c9ae24d7e90de686557166e3b873cd707884431a0451d9d6f7fe795")] [assembly: InternalsVisibleTo("UIAutomationWinformsTests, PublicKey=00240000048000009400000006020000002400005253413100040000110000004bb98b1af6c1df0df8c02c380e116b7a7f0c8c827aecfccddc6e29b7c754cd608b49dfcef4df9699ad182e50f66afa4e68dabc7b6aeeec0aa4719a5f8e0aae8c193080a706adc3443a8356b1f254142034995532ac176398e12a30f6a74a119a89ac47672c9ae24d7e90de686557166e3b873cd707884431a0451d9d6f7fe795")] mono-uia-2.1/UIAutomationProvider/AssemblyInfo.cs0000644000016200001670000000707311433571553023010 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // // Authors: // Calvin Gaisford // using System; using System.Resources; using System.Reflection; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security; using System.Security.Permissions; // General Information about the UIAutomationProvider assembly // v3.0 Assembly [assembly: AssemblyCompany (Consts.MonoCompany)] [assembly: AssemblyProduct (Consts.MonoProduct)] [assembly: AssemblyCopyright (Consts.MonoCopyright)] [assembly: AssemblyVersion (Consts.FxVersion)] [assembly: AssemblyFileVersion (Consts.WinFileVersion)] [assembly: NeutralResourcesLanguage ("en")] [assembly: CLSCompliant (true)] [assembly: AssemblyDelaySign (true)] [assembly: AssemblyKeyFile ("/var/lib/hudson/jobs/_uia_tag_tarballs/workspace/UIAutomation/winfx3.pub")] [assembly: ComVisible (false)] [assembly: AllowPartiallyTrustedCallers] [assembly: CompilationRelaxations (CompilationRelaxations.NoStringInterning)] [assembly: Debuggable (DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: RuntimeCompatibility (WrapNonExceptionThrows = true)] [assembly: PermissionSet (SecurityAction.RequestMinimum, Name = "FullTrust")] [assembly: SecurityPermission (SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: InternalsVisibleTo("UIAutomationWinforms, PublicKey=00240000048000009400000006020000002400005253413100040000110000004bb98b1af6c1df0df8c02c380e116b7a7f0c8c827aecfccddc6e29b7c754cd608b49dfcef4df9699ad182e50f66afa4e68dabc7b6aeeec0aa4719a5f8e0aae8c193080a706adc3443a8356b1f254142034995532ac176398e12a30f6a74a119a89ac47672c9ae24d7e90de686557166e3b873cd707884431a0451d9d6f7fe795")] [assembly: InternalsVisibleTo("UiaAtkBridge, PublicKey=00240000048000009400000006020000002400005253413100040000110000004bb98b1af6c1df0df8c02c380e116b7a7f0c8c827aecfccddc6e29b7c754cd608b49dfcef4df9699ad182e50f66afa4e68dabc7b6aeeec0aa4719a5f8e0aae8c193080a706adc3443a8356b1f254142034995532ac176398e12a30f6a74a119a89ac47672c9ae24d7e90de686557166e3b873cd707884431a0451d9d6f7fe795")] [assembly: InternalsVisibleTo("UIAutomationWinformsTests, PublicKey=00240000048000009400000006020000002400005253413100040000110000004bb98b1af6c1df0df8c02c380e116b7a7f0c8c827aecfccddc6e29b7c754cd608b49dfcef4df9699ad182e50f66afa4e68dabc7b6aeeec0aa4719a5f8e0aae8c193080a706adc3443a8356b1f254142034995532ac176398e12a30f6a74a119a89ac47672c9ae24d7e90de686557166e3b873cd707884431a0451d9d6f7fe795")] mono-uia-2.1/UIAutomationProvider/Makefile.in0000644000016200001670000005526311433571551022135 0ustar00hudsonhudson00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : DIST_COMMON = $(srcdir)/AssemblyInfo.cs.in $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/Makefile.include subdir = UIAutomationProvider ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = AssemblyInfo.cs CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(linuxpkgconfigdir)" SCRIPTS = $(bin_SCRIPTS) SOURCES = DIST_SOURCES = DATA = $(linuxpkgconfig_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ GACUTIL = @GACUTIL@ GLIB_SHARP_20_CFLAGS = @GLIB_SHARP_20_CFLAGS@ GLIB_SHARP_20_LIBS = @GLIB_SHARP_20_LIBS@ GMCS = @GMCS@ GTK_SHARP_20_CFLAGS = @GTK_SHARP_20_CFLAGS@ GTK_SHARP_20_LIBS = @GTK_SHARP_20_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MONO = @MONO@ MONO_CFLAGS = @MONO_CFLAGS@ MONO_LIBS = @MONO_LIBS@ NUNIT_CFLAGS = @NUNIT_CFLAGS@ NUNIT_LIBS = @NUNIT_LIBS@ NUNIT_PATH = @NUNIT_PATH@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SN = @SN@ STRIP = @STRIP@ VERSION = @VERSION@ WINDOWSBASE_LIBS = @WINDOWSBASE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_bindir = @expanded_bindir@ expanded_datadir = @expanded_datadir@ expanded_libdir = @expanded_libdir@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = $(build_sources) $(build_resx_files) \ $(build_others_files) $(ASSEMBLY_WRAPPER_IN) $(EXTRAS) \ $(DATA_FILES) $(build_culture_res_files) ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_FLAGS = -lib:@expanded_libdir@/mono/2.0 -lib:../bin -lib:@expanded_libdir@/mono/accessibility -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" -d:NET_2_0 ASSEMBLY = ../bin/UIAutomationProvider.dll ASSEMBLY_MDB = $(ASSEMBLY).mdb COMPILE_TARGET = library PROJECT_REFERENCES = BUILD_DIR = ../bin PACKAGE_FLAG = /package accessibility UIAUTOMATIONPROVIDER_DLL_MDB_SOURCE = ../bin/UIAutomationProvider.dll.mdb UIAUTOMATIONPROVIDER_DLL_MDB = $(BUILD_DIR)/UIAutomationProvider.dll.mdb AL = al2 SATELLITE_ASSEMBLY_NAME = Mono.UIAutomation.Provider.resources.dll PROGRAMFILES = \ $(UIAUTOMATIONPROVIDER_DLL_MDB) RESGEN = resgen2 FILES = \ AssemblyInfo.cs \ ../build/common/*.cs \ $(PROJECT_SOURCE_FILES) PROJECT_SOURCE_FILES = \ System.Windows.Automation.Provider/AutomationInteropProvider.cs \ System.Windows.Automation.Provider/ICaretProvider.cs \ System.Windows.Automation.Provider/IClipboardProvider.cs \ System.Windows.Automation.Provider/IDockProvider.cs \ System.Windows.Automation.Provider/IEditableRangeProvider.cs \ System.Windows.Automation.Provider/IEmbeddedImageProvider.cs \ System.Windows.Automation.Provider/IExpandCollapseProvider.cs \ System.Windows.Automation.Provider/IGridItemProvider.cs \ System.Windows.Automation.Provider/IGridProvider.cs \ System.Windows.Automation.Provider/IInsertDeleteTextProvider.cs \ System.Windows.Automation.Provider/IInvokeProvider.cs \ System.Windows.Automation.Provider/IMultipleViewProvider.cs \ System.Windows.Automation.Provider/IRangeValueProvider.cs \ System.Windows.Automation.Provider/IRawElementProviderAdviseEvents.cs \ System.Windows.Automation.Provider/IRawElementProviderFragment.cs \ System.Windows.Automation.Provider/IRawElementProviderFragmentRoot.cs \ System.Windows.Automation.Provider/IRawElementProviderHwndOverride.cs \ System.Windows.Automation.Provider/IRawElementProviderSimple.cs \ System.Windows.Automation.Provider/IScrollItemProvider.cs \ System.Windows.Automation.Provider/IScrollProvider.cs \ System.Windows.Automation.Provider/ISelectionItemProvider.cs \ System.Windows.Automation.Provider/ISelectionProvider.cs \ System.Windows.Automation.Provider/ITableItemProvider.cs \ System.Windows.Automation.Provider/ITableProvider.cs \ System.Windows.Automation.Provider/ITextProvider.cs \ System.Windows.Automation.Provider/ITextRangeProvider.cs \ System.Windows.Automation.Provider/IToggleProvider.cs \ System.Windows.Automation.Provider/ITransformProvider.cs \ System.Windows.Automation.Provider/IValueProvider.cs \ System.Windows.Automation.Provider/IWindowProvider.cs \ System.Windows.Automation.Provider/NavigateDirection.cs \ System.Windows.Automation.Provider/ProviderOptions.cs DATA_FILES = RESOURCES = REFERENCES = \ WindowsBase \ System \ UIAutomationBridge \ UIAutomationTypes DLL_REFERENCES = CLEANFILES = $(PROGRAMFILES) $(ASSEMBLY) $(ASSEMBLY).mdb $(BINARIES) \ $(build_resx_resources) $(build_satellite_assembly_list) VALID_CULTURES = ar bg ca zh-CHS cs da de el en es fi fr he hu is it ja ko nl no pl pt ro ru hr sk sq sv th tr id uk be sl et lv lt fa vi hy eu mk af fo hi sw gu ta te kn mr gl kok ar-SA bg-BG ca-ES zh-TW cs-CZ da-DK de-DE el-GR en-US fi-FI fr-FR he-IL hu-HU is-IS it-IT ja-JP ko-KR nl-NL nb-NO pl-PL pt-BR ro-RO ru-RU hr-HR sk-SK sq-AL sv-SE th-TH tr-TR id-ID uk-UA be-BY sl-SI et-EE lv-LV lt-LT fa-IR vi-VN hy-AM eu-ES mk-MK af-ZA fo-FO hi-IN sw-KE gu-IN ta-IN te-IN kn-IN mr-IN gl-ES kok-IN ar-IQ zh-CN de-CH en-GB es-MX fr-BE it-CH nl-BE nn-NO pt-PT sv-FI ar-EG zh-HK de-AT en-AU es-ES fr-CA ar-LY zh-SG de-LU en-CA es-GT fr-CH ar-DZ zh-MO en-NZ es-CR fr-LU ar-MA en-IE es-PA ar-TN en-ZA es-DO ar-OM es-VE ar-YE es-CO ar-SY es-PE ar-JO es-AR ar-LB en-ZW es-EC ar-KW en-PH es-CL ar-AE es-UY ar-BH es-PY ar-QA es-BO es-SV es-HN es-NI es-PR zh-CHT s2q = $(subst \ ,?,$1) q2s = $(subst ?,\ ,$1) # use this when result will be quoted unesc2 = $(subst ?, ,$1) build_sources = $(FILES) $(GENERATED_FILES) build_sources_esc = $(call s2q,$(build_sources)) # use unesc2, as build_sources_embed is quoted build_sources_embed = $(call unesc2,$(build_sources_esc:%='$(srcdir)/%')) comma__ = , get_resource_name = $(firstword $(subst $(comma__), ,$1)) get_culture = $(lastword $(subst ., ,$(basename $1))) is_cultured_resource = $(and $(word 3,$(subst ., ,$1)), $(filter $(VALID_CULTURES),$(lastword $(subst ., ,$(basename $1))))) RESOURCES_ESC = $(call s2q,$(RESOURCES)) build_resx_list = $(foreach res, $(RESOURCES_ESC), $(if $(filter %.resx, $(call get_resource_name,$(res))),$(res),)) build_non_culture_resx_list = $(foreach res, $(build_resx_list),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) build_non_culture_others_list = $(foreach res, $(filter-out $(build_resx_list),$(RESOURCES_ESC)),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) build_others_list = $(build_non_culture_others_list) build_xamlg_list = $(filter %.xaml.g.cs, $(FILES)) # resgen all .resx resources build_resx_files = $(foreach res, $(build_resx_list), $(call get_resource_name,$(res))) build_resx_resources_esc = $(build_resx_files:.resx=.resources) build_resx_resources = $(call q2s,$(build_resx_resources_esc)) # embed resources for the main assembly build_resx_resources_hack = $(subst .resx,.resources, $(build_non_culture_resx_list)) # use unesc2, as build_resx_resources_embed is quoted build_resx_resources_embed = $(call unesc2,$(build_resx_resources_hack:%='-resource:%')) build_others_files = $(call q2s,$(foreach res, $(build_others_list),$(call get_resource_name,$(res)))) build_others_resources = $(build_others_files) # use unesc2, as build_others_resources_embed is quoted build_others_resources_embed = $(call unesc2,$(build_others_list:%='-resource:$(srcdir)/%')) build_resources = $(build_resx_resources) $(build_others_resources) build_resources_embed = $(build_resx_resources_embed) $(build_others_resources_embed) # -usesourcepath is available only for resgen2 emit_resgen_target_1 = $(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); cd '$$(shell dirname '$$<')' && $$(RESGEN) '$$(shell basename '$$<')' '$$(shell basename '$$@')' emit_resgen_target_2 = $(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); $$(RESGEN) -usesourcepath '$$<' '$$@' emit_resgen_target = $(if $(filter resgen2,$(RESGEN)),$(emit_resgen_target_2),$(emit_resgen_target_1)) emit_resgen_targets = $(foreach res,$(build_resx_resources_esc),$(eval $(call emit_resgen_target,$(res)))) build_references_ref = $(call q2s,$(foreach ref, $(call \ s2q,$(REFERENCES)), $(if $(filter -pkg:%, $(ref)), $(ref), \ $(if $(filter -r:%, $(ref)), $(ref), -r:$(ref))))) $(call \ q2s,$(foreach ref, $(call s2q,$(DLL_REFERENCES)), -r:$(ref))) \ $(call q2s,$(foreach ref, $(call s2q,$(PROJECT_REFERENCES)), \ -r:$(ref))) s2q2s = $(call unesc2,$(call s2q,$1)) cp_actual = test -z $1 || cp $1 $2 cp = $(call cp_actual,'$(call s2q2s,$1)','$(call s2q2s,$2)') rm_actual = test -z '$1' || rm -f '$2' rm = $(call rm_actual,$(call s2q2s,$1),$(call s2q2s,$2)/$(shell basename '$(call s2q2s,$1)')) DISTCLEANFILES = $(GENERATED_FILES) $(pc_files) $(BUILD_DIR)/* #pkglib_SCRIPTS = $(ASSEMBLY) bin_SCRIPTS = $(BINARIES) #programfilesdir = @libdir@/@PACKAGE@ #programfiles_DATA = $(PROGRAMFILES) linuxpkgconfigdir = @libdir@/pkgconfig linuxpkgconfig_DATA = $(LINUX_PKGCONFIG) # generating satellite assemblies culture_resources = $(foreach res, $(RESOURCES_ESC), $(if $(call is_cultured_resource,$(call get_resource_name, $(res))),$(res))) cultures = $(sort $(foreach res, $(culture_resources), $(call get_culture,$(call get_resource_name,$(res))))) culture_resource_dependencies = $(call q2s,$(BUILD_DIR)/$1/$(SATELLITE_ASSEMBLY_NAME): $(subst .resx,.resources,$2)) culture_resource_commandlines = $(call unesc2,cmd_line_satellite_$1 += '/embed:$(subst .resx,.resources,$2)') build_satellite_assembly_list = $(call q2s,$(cultures:%=$(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME))) build_culture_res_files = $(call q2s,$(foreach res, $(culture_resources),$(call get_resource_name,$(res)))) GACROOT = $(DESTDIR)$(prefix)/lib all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.include $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign UIAutomationProvider/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign UIAutomationProvider/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): AssemblyInfo.cs: $(top_builddir)/config.status $(srcdir)/AssemblyInfo.cs.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files install-linuxpkgconfigDATA: $(linuxpkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(linuxpkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(linuxpkgconfigdir)" @list='$(linuxpkgconfig_DATA)'; test -n "$(linuxpkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(linuxpkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(linuxpkgconfigdir)" || exit $$?; \ done uninstall-linuxpkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(linuxpkgconfig_DATA)'; test -n "$(linuxpkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(linuxpkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(linuxpkgconfigdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) $(DATA) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(linuxpkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-linuxpkgconfigDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-linuxpkgconfigDATA \ uninstall-local .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-binSCRIPTS install-data \ install-data-am install-data-local install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-linuxpkgconfigDATA \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-binSCRIPTS uninstall-linuxpkgconfigDATA \ uninstall-local all: $(ASSEMBLY) $(PROGRAMFILES) install-data-local: gac-install uninstall-local: gac-uninstall # macros # $(call emit-deploy-target,deploy-variable-name) define emit-deploy-target $($1): $($1_SOURCE) mkdir -p '$$(shell dirname '$$@')' cp '$$<' '$$@' endef # $(call emit-deploy-wrapper,wrapper-variable-name,wrapper-sourcefile,x) # assumes that for a wrapper foo.pc its source template is foo.pc.in # if $3 is non-empty then wrapper is marked exec define emit-deploy-wrapper $($1): $2 mkdir -p '$$(shell dirname '$$@')' cp '$$<' '$$@' $(if $3,chmod +x '$$@') endef $(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_dependencies,$(call get_culture,$(call get_resource_name,$(res))),$(call get_resource_name,$(res)))))) $(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_commandlines,$(call get_culture,$(call get_resource_name,$(res))),$(res))))) $(build_satellite_assembly_list): $(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME): mkdir -p '$(@D)' $(AL) -out:'$@' -culture:$* -t:lib $(cmd_line_satellite_$*) gac-install: $(POLICY_ASSEMBLIES) $(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS) /root $(GACROOT) $(PACKAGE_FLAG) || exit 1; gac-uninstall: $(GACUTIL) /us $(ASSEMBLY) $(GACUTIL_FLAGS) /root $(GACROOT) $(PACKAGE_FLAG) || exit 1; $(eval $(call emit_resgen_targets)) $(build_xamlg_list): %.xaml.g.cs: %.xaml xamlg '$<' $(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list) mkdir -p $(shell dirname $(ASSEMBLY)) $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) sn -q -R $(ASSEMBLY) $(top_srcdir)/mono.snk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: mono-uia-2.1/data/0000777000016200001670000000000011433571554014704 5ustar00hudsonhudson00000000000000mono-uia-2.1/data/mono-uia-openSUSE_11.2.spec.in0000644000016200001670000000461211433571545022010 0ustar00hudsonhudson00000000000000# # spec file for package UIAutomation # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild # Name: mono-uia Version: @VERSION@ Release: 1 License: MIT/X11 Group: System/Libraries URL: http://www.mono-project.com/Accessibility Source0: %{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: mono-core >= 2.4 Requires: mono-winfxcore BuildRequires: gtk-sharp2 >= 2.12.10 BuildRequires: mono-core >= 2.4 BuildRequires: mono-devel >= 2.4 BuildRequires: mono-nunit >= 2.4 BuildRequires: pkg-config Summary: Implementations of members and interfaces based on MS UIA API %description User Interface Automation (UIA) is a new accessibility standard %package devel License: MIT Summary: mono-uia devel package Group: Development/Languages Requires: mono-uia == %{version}-%{release} %description devel Implementations of the members and interfaces based on MS UIA API %package -n mono-winfxcore License: MIT Summary: Parts of winfx Group: Development/Languages Requires: mono-core >= 2.4 %description -n mono-winfxcore WinFx components required by User Interface Automation (UIA) for use with Mono %prep %setup -q %build %configure --disable-tests --enable-winfxcore # Parallel build fails make %install make DESTDIR=%{buildroot} install %clean rm -rf %{buildroot} %files %defattr(-,root,root) %doc README COPYING NEWS %{_prefix}/lib/mono/accessibility %{_prefix}/lib/mono/gac/UIAutomationProvider %{_prefix}/lib/mono/accessibility/UIAutomationProvider.dll %{_prefix}/lib/mono/gac/UIAutomationTypes %{_prefix}/lib/mono/accessibility/UIAutomationTypes.dll %{_prefix}/lib/mono/gac/UIAutomationBridge %{_prefix}/lib/mono/accessibility/UIAutomationBridge.dll %{_prefix}/lib/mono/gac/UIAutomationClient %{_prefix}/lib/mono/accessibility/UIAutomationClient.dll %{_prefix}/lib/mono/gac/UIAutomationSource %{_prefix}/lib/mono/accessibility/UIAutomationSource.dll %files devel %defattr(-,root,root,-) %{_libdir}/pkgconfig/*.pc %files -n mono-winfxcore %defattr(-, root, root) %{_prefix}/lib/mono/gac/WindowsBase %{_prefix}/lib/mono/2.0/WindowsBase.dll %changelog mono-uia-2.1/data/Makefile.am0000644000016200001670000000137011433571545016735 0ustar00hudsonhudson00000000000000 EXTRA_DIST = net20dir = $(prefix)/lib/mono/2.0 a11ydir = $(prefix)/lib/mono/accessibility SHELL = /bin/sh MKINSTALLDIRS = $(SHELL) $(top_srcdir)/mkinstalldirs INSTALL = $(SHELL) $(top_srcdir)/install-sh INSTALL_D = $(INSTALL) -c -m 644 all: mono-uia.pc REWRITE= mono-uia.pc: mono-uia.pc.in Makefile sed -e "s,@net20dir@,$(net20dir),g" < mono-uia.pc.in > $@.tmp sed -e "s,@a11ydir@,$(a11ydir),g" < $@.tmp > $@.tmp2 mv $@.tmp2 $@ rm $@.tmp install-data-local: mono-uia.pc $(MKINSTALLDIRS) $(DESTDIR)$(libdir)/pkgconfig $(INSTALL_D) mono-uia.pc $(DESTDIR)$(libdir)/pkgconfig uninstall-local: rm -rf $(DESTDIR)$(libdir)/pkgconfig/mono-uia.pc clean-local: rm -rf mono-uia.pc test-local: dist-local: dist-default FILES = \ mono-uia.pc.in mono-uia-2.1/data/mono-uia-Fedora_12.spec.in0000644000016200001670000000432411433571545021410 0ustar00hudsonhudson00000000000000%define debug_package %{nil} # # spec file for package UIAutomation # Name: mono-uia Version: @VERSION@ Release: 1 License: MIT Group: System/Libraries URL: http://www.mono-project.com/Accessibility Source0: http://ftp.novell.com/pub/mono/sources/mono-uia/%{name}-%{version}.tar.bz2 Patch0: mono-uia-libdir-fedora.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: mono-core >= 2.4 Requires: mono-winfxcore BuildRequires: gtk-sharp2-devel >= 2.12.10 BuildRequires: mono-core >= 2.4 BuildRequires: mono-devel >= 2.4 BuildRequires: mono-nunit >= 2.4 Summary: Implementations of members and interfaces based on MS UIA API %description User Interface Automation (UIA) is a new accessibility standard %package devel License: MIT Summary: mono-uia devel package Group: Development/Languages Requires: mono-uia == %{version}-%{release} %description devel Implementations of the members and interfaces based on MS UIA API %package -n mono-winfxcore License: MIT Summary: Parts of winfx Group: Development/Languages Requires: mono-core >= 2.4 %description -n mono-winfxcore WinFx components required by User Interface Automation (UIA) for use with Mono %prep %setup -q %patch0 -p1 %build %configure --disable-tests --enable-winfxcore # Parallel build fails make %install rm -rf %{buildroot} make DESTDIR=%{buildroot} install %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc README COPYING NEWS %{_libdir}/mono/accessibility %{_libdir}/mono/gac/UIAutomationProvider %{_libdir}/mono/accessibility/UIAutomationProvider.dll %{_libdir}/mono/gac/UIAutomationTypes %{_libdir}/mono/accessibility/UIAutomationTypes.dll %{_libdir}/mono/gac/UIAutomationBridge %{_libdir}/mono/accessibility/UIAutomationBridge.dll %{_libdir}/mono/gac/UIAutomationClient %{_libdir}/mono/accessibility/UIAutomationClient.dll %{_libdir}/mono/gac/UIAutomationSource %{_libdir}/mono/accessibility/UIAutomationSource.dll %files devel %defattr(-,root,root,-) %{_libdir}/pkgconfig/*.pc %files -n mono-winfxcore %defattr(-, root, root) %{_libdir}/mono/gac/WindowsBase %{_libdir}/mono/2.0/WindowsBase.dll %changelogmono-uia-2.1/data/mono-uia-openSUSE_11.3.spec.in0000644000016200001670000000405711433571545022014 0ustar00hudsonhudson00000000000000# # spec file for package UIAutomation # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild # Name: mono-uia Version: @VERSION@ Release: 1 License: MIT/X11 Group: System/Libraries URL: http://www.mono-project.com/Accessibility Source0: %{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: mono-core >= 2.6 Requires: mono-winfxcore BuildRequires: gtk-sharp2 >= 2.12.10 BuildRequires: mono-core >= 2.6 BuildRequires: mono-winfxcore BuildRequires: mono-devel >= 2.6 BuildRequires: mono-nunit >= 2.6 BuildRequires: pkg-config Summary: Implementations of members and interfaces based on MS UIA API %description User Interface Automation (UIA) is a new accessibility standard %package devel License: MIT Summary: mono-uia devel package Group: Development/Languages Requires: mono-uia == %{version}-%{release} %description devel Implementations of the members and interfaces based on MS UIA API %prep %setup -q %build %configure --disable-tests # Parallel build fails make %install make DESTDIR=%{buildroot} install %clean rm -rf %{buildroot} %files %defattr(-,root,root) %doc README COPYING NEWS %{_prefix}/lib/mono/accessibility %{_prefix}/lib/mono/gac/UIAutomationProvider %{_prefix}/lib/mono/accessibility/UIAutomationProvider.dll %{_prefix}/lib/mono/gac/UIAutomationTypes %{_prefix}/lib/mono/accessibility/UIAutomationTypes.dll %{_prefix}/lib/mono/gac/UIAutomationBridge %{_prefix}/lib/mono/accessibility/UIAutomationBridge.dll %{_prefix}/lib/mono/gac/UIAutomationClient %{_prefix}/lib/mono/accessibility/UIAutomationClient.dll %{_prefix}/lib/mono/gac/UIAutomationSource %{_prefix}/lib/mono/accessibility/UIAutomationSource.dll %files devel %defattr(-,root,root,-) %{_libdir}/pkgconfig/*.pc %changelog mono-uia-2.1/data/mono-uia-Fedora_13.spec.in0000644000016200001670000000350211433571545021406 0ustar00hudsonhudson00000000000000%define debug_package %{nil} # # spec file for package UIAutomation # Name: mono-uia Version: @VERSION@ Release: 1 License: MIT Group: System/Libraries URL: http://www.mono-project.com/Accessibility Source0: http://ftp.novell.com/pub/mono/sources/mono-uia/%{name}-%{version}.tar.bz2 Patch0: mono-uia-libdir-fedora.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: mono-core >= 2.6 BuildRequires: gtk-sharp2-devel >= 2.12.10 BuildRequires: mono-core >= 2.6 BuildRequires: mono-devel >= 2.6 BuildRequires: mono-nunit >= 2.6 Summary: Implementations of members and interfaces based on MS UIA API %description User Interface Automation (UIA) is a new accessibility standard %package devel License: MIT Summary: mono-uia devel package Group: Development/Languages Requires: mono-uia == %{version}-%{release} %description devel Implementations of the members and interfaces based on MS UIA API %prep %setup -q %patch0 -p1 %build %configure --disable-tests # Parallel build fails make %install rm -rf %{buildroot} make DESTDIR=%{buildroot} install %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc README COPYING NEWS %{_libdir}/mono/accessibility %{_libdir}/mono/gac/UIAutomationProvider %{_libdir}/mono/accessibility/UIAutomationProvider.dll %{_libdir}/mono/gac/UIAutomationTypes %{_libdir}/mono/accessibility/UIAutomationTypes.dll %{_libdir}/mono/gac/UIAutomationBridge %{_libdir}/mono/accessibility/UIAutomationBridge.dll %{_libdir}/mono/gac/UIAutomationClient %{_libdir}/mono/accessibility/UIAutomationClient.dll %{_libdir}/mono/gac/UIAutomationSource %{_libdir}/mono/accessibility/UIAutomationSource.dll %files devel %defattr(-,root,root,-) %{_libdir}/pkgconfig/*.pc %changelogmono-uia-2.1/data/mono-uia.pc.in.in0000644000016200001670000000047511433571545017770 0ustar00hudsonhudson00000000000000 Name: UIAutomation Libraries Description: UIAutomation implementation for Mono. Version: @VERSION@ Libs: -r:@a11ydir@/UIAutomationTypes.dll -r:@a11ydir@/UIAutomationBridge.dll -r:@a11ydir@/UIAutomationProvider.dll -r:@a11ydir@/UIAutomationSource.dll -r:@a11ydir@/UIAutomationClient.dll -r:@net20dir@/WindowsBase.dll mono-uia-2.1/data/Makefile.in0000644000016200001670000002476611433571551016761 0ustar00hudsonhudson00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = data DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/mono-uia-Fedora_12.spec.in \ $(srcdir)/mono-uia-Fedora_13.spec.in \ $(srcdir)/mono-uia-openSUSE_11.2.spec.in \ $(srcdir)/mono-uia-openSUSE_11.3.spec.in \ $(srcdir)/mono-uia.pc.in.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = mono-uia.pc.in mono-uia-openSUSE_11.2.spec \ mono-uia-Fedora_12.spec mono-uia-openSUSE_11.3.spec \ mono-uia-Fedora_13.spec CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ GACUTIL = @GACUTIL@ GLIB_SHARP_20_CFLAGS = @GLIB_SHARP_20_CFLAGS@ GLIB_SHARP_20_LIBS = @GLIB_SHARP_20_LIBS@ GMCS = @GMCS@ GTK_SHARP_20_CFLAGS = @GTK_SHARP_20_CFLAGS@ GTK_SHARP_20_LIBS = @GTK_SHARP_20_LIBS@ INSTALL = $(SHELL) $(top_srcdir)/install-sh INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MONO = @MONO@ MONO_CFLAGS = @MONO_CFLAGS@ MONO_LIBS = @MONO_LIBS@ NUNIT_CFLAGS = @NUNIT_CFLAGS@ NUNIT_LIBS = @NUNIT_LIBS@ NUNIT_PATH = @NUNIT_PATH@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = /bin/sh SN = @SN@ STRIP = @STRIP@ VERSION = @VERSION@ WINDOWSBASE_LIBS = @WINDOWSBASE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_bindir = @expanded_bindir@ expanded_datadir = @expanded_datadir@ expanded_libdir = @expanded_libdir@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = net20dir = $(prefix)/lib/mono/2.0 a11ydir = $(prefix)/lib/mono/accessibility MKINSTALLDIRS = $(SHELL) $(top_srcdir)/mkinstalldirs INSTALL_D = $(INSTALL) -c -m 644 REWRITE = FILES = \ mono-uia.pc.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign data/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign data/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mono-uia.pc.in: $(top_builddir)/config.status $(srcdir)/mono-uia.pc.in.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mono-uia-openSUSE_11.2.spec: $(top_builddir)/config.status $(srcdir)/mono-uia-openSUSE_11.2.spec.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mono-uia-Fedora_12.spec: $(top_builddir)/config.status $(srcdir)/mono-uia-Fedora_12.spec.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mono-uia-openSUSE_11.3.spec: $(top_builddir)/config.status $(srcdir)/mono-uia-openSUSE_11.3.spec.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mono-uia-Fedora_13.spec: $(top_builddir)/config.status $(srcdir)/mono-uia-Fedora_13.spec.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-local .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-local \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ install-data-local install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-local all: mono-uia.pc mono-uia.pc: mono-uia.pc.in Makefile sed -e "s,@net20dir@,$(net20dir),g" < mono-uia.pc.in > $@.tmp sed -e "s,@a11ydir@,$(a11ydir),g" < $@.tmp > $@.tmp2 mv $@.tmp2 $@ rm $@.tmp install-data-local: mono-uia.pc $(MKINSTALLDIRS) $(DESTDIR)$(libdir)/pkgconfig $(INSTALL_D) mono-uia.pc $(DESTDIR)$(libdir)/pkgconfig uninstall-local: rm -rf $(DESTDIR)$(libdir)/pkgconfig/mono-uia.pc clean-local: rm -rf mono-uia.pc test-local: dist-local: dist-default # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: mono-uia-2.1/README0000644000016200001670000000344711433571545014657 0ustar00hudsonhudson00000000000000UIAutomation is a project of the Mono Accessibility team. Its purpose is to implement assemblies that define common types, interfaces, and identifiers defined in Microsoft's UIA specification. More information about the Mono Accessibility team and UIA on Linux can be found on our wiki: http://www.mono-project.com/Accessibility 1. Package contents =================== Implementation of Microsoft UI Automation (UIA) assemblies. This package provides the following assemblies: UIAutomationTypes.dll: Types, constants, and identifiers. UIAutomationProvider.dll: Provider pattern interface definitions. UIAutomationClient.dll: Types used by UIA clients to get element info. ( See http://msdn.microsoft.com/en-us/library/ms747327.aspx ) UIAutomationBridge.dll: Defines interfaces unique to Mono's UIA implementation, that must be implemented by compatible a11y bridges or providers. WindowsBase.dll: Minimal version of this otherwise-unreleased assembly, containing only the types needed by the above DLLs. Development can be tracked in the olive module in SVN. 2. Compilation and Installation =============================== a. Build Requirements --------------------- To build UIAutomation, you will need the following components: * pkg-config * mono >= 2.0 * Tests require nunit >= 2.4.7 b. Building the Software ------------------------ If you obtained this package as an officially released tarball, this is very simple, use configure and make: ./configure --prefix=/usr/local make make install c. Building the Software from SVN --------------------------------- If you obtained this package from Subversion, use autogen.sh: ./autogen.sh --prefix=/usr/local make make install mono-uia-2.1/mkinstalldirs0000755000016200001670000000341111433571545016574 0ustar00hudsonhudson00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case "${1}" in -h | --help | --h* ) # -h for help echo "${usage}" 1>&2; exit 0 ;; -m ) # -m PERM arg shift test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } dirmode="${1}" shift ;; -- ) shift; break ;; # stop option processing -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option * ) break ;; # first non-opt arg esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 3 # End: # mkinstalldirs ends here mono-uia-2.1/missing0000755000016200000000000002623311270444233015031 0ustar00hudsonroot00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program 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 General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: mono-uia-2.1/NEWS0000644000016200001670000002510711433571545014473 0ustar00hudsonhudson00000000000000 Mono Accessibility News Copyright (C) 2008 - 2010 Novell, Inc. (http://www.novell.com) Version 2.1: The "Zoidberg" release * #628639 - Fedora: The control can't be found by using FindFirst(app, TreeScope.Descendants, condition) method * #624236 - Fail to launch KeePass.exe * #625814 - Segmentation fault in Fedora12 when the application have toolbarbutton control * #623809 - The at-spi2 will hang up the new launched dialog * #628639 - Fedora: The control can't be found by using FindFirst(app, TreeScope.Descendants, condition) method * #628996 - Fedora: The pattern of slider is not implemented yet. * #625814 - Segmentation fault in Fedora12 when the application have toolbarbutton control Version 2.0.95: The "occulture" release * #582891 - [Caching] Add unit tests for caching each property and pattern * #626521 - Winforms fails be accessible with at-spi-dbus enabled in 28-Jul-2010 version Version 2.0.94: The "nit" release * #574269 - Cannot find pane control on Linux * #574242 - Can't define custom provider by using the WM_GETOBJECT message * #582884 - [Caching] Test and implement behavior of AutomationElements passed to event handlers which were signed up while there was an active CacheRequest * #582887 - [Caching] Test TreeWalker caching with more restrictive TreeFilter/TreeScope * #582888 - [Caching] Test caching as it relates to TextPattern * #617867 - press key make openfiledialog and savefiledialog died Version 2.0.93: The "machinima" release * #585147 - Initial work started Version 2.0.92: The "liger" release * #599589 - [uiaclient-GTKs]:the tree item can't be found by UIA Client * #590768 - The popup window is in the same tree level with its main window * #551109 - Support TextPatern.SupportedTextSelection Version 2.0.91: The "knowledgebase" release * #593283 - Find Silverlight child via UIAClientApi cause firefox crashed * #597216 - Moonlight HyperLink is missing Invoke Pattern Version 2.0.90: The "jabberwocky" release * #600024 - Weird problems in Gtk app when using managed AT to detect it * #600049 - ListView_details: navigate treetable's children in accerciser crash the application * #571577 - [uiaclient-Winforms]: the Openfiledialog's itemViewList.GetSupportedViews() method can't be shown as expected * #585111 - MoonlightAtkBridge 2.0 release test * #597333 - UiaAtkBridge Currently is failing make distcheck * #580447 - [UIAClient-Winforms] The viewId is difference between on Linux and Windows * #567496 - [uiaclient-winforms]The AutomationElement can't be found under OpenSuse 11.1 * #515457 - CheckedListBox: treetable remain 'focused' state after focus is moved * #590708 - Fail to run IronPython Winforms application after install at-spi2 * #593272 - Accerciser crash when Refrash Node using at-spi2 * #596801 - [uiaclient-GTKs]: The disable button became a enable button, but its IsEnableProperty still be false * #598010 - [uiaclient-GTKs]: The control on the menubar should be recognized as menu item not menu. * #599140 - [uiaclient-GTKs]: check menu item is translated into Custom * #599598 - [uiaclient-GTKs]:The tree control should not support the Grid pattern * #600816 - [uiaclient-GTKs]:The menubar should not support SelectionPattern * #602254 - [uiaclient-GTKs]:Chcke Box control should not support InvokePattern * #602294 - [uiaclient-GTKs]:The CheckBox has not implemented IsContentElementProperty * #602296 - [uiaclient-GTKs]:The CheckBox has not implemented IsControlElementProperty * #576050 - [uiaclient-winforms]: The splitbutton's Invoke method doesn't work * #598053 - [uiaclient-GTKs]: The enable button's IsEnabledProperty is false * #598803 - [uiaclient-GTKs]:the menu item who can pop up the sub menu is recognized as menu * #600803 - [uiaclient-GTKs]:The Document has not implemented IsContentElementProperty * #600805 - [uiaclient-GTKs]:The Document has not implemented IsControlElementProperty * #602716 - [uiaclient-GTKs]:The ComboBox's IsContentElementProperty should be true * #602721 - [uiaclient-GTKs]:The ComboBox's IsControlElementProperty should be true * #575995 - [UIAexplore]: When call Invoke method twice, the UIAexplore will crash * #598030 - [uiaclient-GTKs]:For all the GTK controls, there is an extra TextPattern * #598036 - [uiaclient-GTKs]: The separator should not support any pattern Version 2.0.3: The "infotainment" release * #590765 - GridSpliter: Crash When Selected * #590708 - Fail to run IronPython Winforms application after install at-spi2 * #586360 - Ironpython sample doesn't accessible after install at-spi1 and at-spi2 * #596801 - [uiaclient-GTKs]: The disable button became a enable button, but its IsEnableProperty still be false * #593973 - GTK sub window can not be refreshed * #592185 - Supported AutomationElement returns AutomationElement.NotSupported Version 2.0.2: The "heliport" release * #587792 - TabControl: select invisible label child make the application crashed * #563890 - GridSplitter: run with Orca couldn't use Up|Down Right|Left to move splitter * #587783 - TabControl: 'page tab' has 2 extraneous labels * #555165 - Couldn't show GridSplitter sample which is build by mxap * #546068 - Block bugs from moonlight * #494708 - Test DataGrid control * #588941 - Task of review ClientAPI-Gtk tests on dashboard-Ray * #588942 - Task of review ClientAPI-Gtk tests on dashboard-Neville * #571772 - In scrollable list, listitem[0] missing ScrollItemPattern * #571786 - In non-scrollable list, listitems support extraneous ScrollItemPattern * #576450 - [uiaclient-winforms] The dialog's Window Pattern' WindowInteractionState will be different between Windows and Linux * #578244 - [uiaclient-winforms]: the datagrid's GetItem method can't be run on Linux Version 2.0.1: The "guesstimate" release * #579004 - Update google docs with new testcase descriptions * #554449 - ComboBox crashes when using ItemsSource * #576600 - Handle ControlType changes in bridges. * #494724 - Test TabControl control * #494709 - Test DatePicker control * #584340 - In ListView, Calling ValuePattern.SetValue on one cell can take effect on another sibling cell * #572683 - ElementNotAvailableException is not fired. * #558289 - Slider: Key Navigation Does Not Update Slider's Value with SmallChange Property * #586635 - The NameProperty of DataGridView's Cell is not correctly returned. Version 2.0: The "hypnotoad" release * #574269 - Cannot find pane control on Linux Version 1.9.90: The "fantabulous" release * #572097 - Test AutomationEvents.SelectionItem* events. * #567650 - DataGrid: view on accerciser left treeview make the app crash * #567651 - Calendar: week labels have extraneous 'selectable' state * #567653 - Calendar: title buttons have extraneous 'selectable' state * #561268 - TextBlock: Multi-line Name Is Parsed Incorrectly * #555714 - HyperlinkButton: do click action on accerciser make the firefox crashed * #576554 - Summary the client-UIA winforms test * #576557 - Test SetFocus * #489290 - Support properties other than ControlType. * #489272 - Implement DeviceEventController interface * #576665 - TabControl doesn't refresh children when changing tab. * #578220 - Run and add more test case for the current project. Version 1.8.94: The "ebonics" release * #551974 - [PENDING BACKPORT] Test CalendarAutomationPeer and related Peers. * #551977 - [PENDING BACKPORT] Test TabControlAutomationPeer and related Peers. * #550616 - Make the output log of each element more meaningful. * #571581 - Run UIA Client API winforms tests on Linux * #568774 - Fix thread safety issues in UiaDbusSource * #489315 - Implement TextPattern events * #572516 - Build the rpm package for at-spi2-0.14 * #573328 - Figure out why after install the at-spi2 0.1.4, the test can't run * #572318 - Clean UIAutomationWinforms code to return LocalizedControlType * #562187 - TabControlAutomationPeer does not return children from GetChildren() * #560711 - Slider: some extraneous push buttons * #494712 - Test Image control * #494713 - Test ListBox control * #494714 - Test MediaElement control * #494715 - Test MultiScaleImage control * #494721 - Test ScrollViewer control * #494722 - Test Selector control * #494723 - Test Slider control * #494726 - Test Thumb control * #576537 - Finishing running UIA Client API winforms test case 103. * #576041 - Create automated test for Moonlight SL2WithPrism real sample * #489336 - Implement AutomationElement.FromPoint method * #576896 - Run Winforms client test case104 on Linux, other tests followup Version 1.8.93: The "digerati" release * #568599 - Dig and verify bug 567496 * #568627 - [PENDING BACKPORT] IsOffscreen event not raised when Visibility changes * #568775 - Fix thread safety issues in UiaDbusBridge * #568776 - Make a light-weight uispy-like AT client * #567486 - Build atspiuiasource, at-spi-sharp, uiadbus debian package * #567919 - Rebuild mono-uia, mono-uia-atkbridge, mono-uia-winforms deb packages Version 1.8.92: The "chocoholic" release * #554449 - MoonAtkBridge doesn't display the proper accessibles when more than one plugin is loaded * #555714 - HyperlinkButton: do click action on accerciser make the firefox crashed * #549215 - Investigate and fix latest segfault in Bridge * #494719 - Test RepeatButton control * #494727 - Test ToggleButton control * #552190 - Make sure StructureChanged is raised * #553682 - Accerciser shows wrong elements for the first sample * #564737 - Update code according to the comments from Review Board. * #565859 - Prepare machines to be ready for running tests * #567486 - Build atspiuiasource, at-spi-sharp, uiadbus debian package * #567919 - Rebuild mono-uia, mono-uia-atkbridge, mono-uia-winforms deb packages Version 1.8.91: The "beefalo" release * #559133 - RadioButton: missing checked and focused states when doing click action * #558232 - ProgressBar: value shouldn't be editable * #494706 - Test CheckBox control * #494711 - Test HyperlinkButton control * #494717 - Test ProgressBar control * #494718 - Test RadioButton control * #494720 - Test ScrollBar control * #489331 - Implement AutomationFocusChangedEventArgs * #489386 - DbusCoreUiaSource: Implement AutomationElement.FocusedElement * #541418 - Security audit for InternalsVisibleTo and platform-code marking of MoonAtkBridge * #550443 - If user disables MoonAtkBridge extension from the Firefox->Addons menu, the extension is still enabled * #554577 - Write method according the keyboard() in strongwind. * #554784 - Replace Find* methods with more generic Find<> * #557628 - TreeWalker.directChildren shall be dynamic * #558394 - MoonAtkBridge build is broken due to Makefile issues in the tests * #555717 - HyperlinkButton: wrong action name * #559825 - ScrollBar: HScrollBar is missing 'horizontal' state and VScrollBar is missing 'vertical' state Version 1.8.90: The "anacronym" release * Initial release mono-uia-2.1/configure.ac0000644000016200001670000000715711433571545016267 0ustar00hudsonhudson00000000000000dnl Warning: This is an automatically generated file, do not edit! dnl Process this file with autoconf to produce a configure script. AC_PREREQ([2.54]) AC_INIT([mono-uia],[2.1]) AM_INIT_AUTOMAKE([foreign 1.9 tar-ustar]) dnl pkg-config AC_PATH_PROG(PKG_CONFIG, pkg-config, no) if test "x$PKG_CONFIG" = "xno"; then AC_MSG_ERROR([You need to install pkg-config]) fi SHAMROCK_EXPAND_LIBDIR SHAMROCK_EXPAND_BINDIR SHAMROCK_EXPAND_DATADIR AC_PROG_INSTALL AC_PATH_PROG(MONO, mono, no) if test "x$MONO" = "xno"; then AC_MSG_ERROR([mono Not found]) fi AC_SUBST(MONO) AC_PATH_PROG(GMCS, gmcs, no) if test "x$GMCS" = "xno"; then AC_MSG_ERROR([gmcs Not found]) fi AC_PATH_PROG(GACUTIL, gacutil, no) if test "x$GACUTIL" = "xno" ; then AC_MSG_ERROR([No gacutil tool found]) fi AC_PATH_PROG(SN, sn, no) if test "x$SN" = "xno" ; then AC_MSG_ERROR([No sn tool found]) fi AC_ARG_ENABLE(tests, AC_HELP_STRING([--disable-tests], [Do not build unit tests [default=no]]), enable_tests=no, enable_tests=yes) AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Use 'DEBUG' Configuration [default=YES]]), enable_debug=yes, enable_debug=no) AM_CONDITIONAL(ENABLE_DEBUG, test x$enable_debug = xyes) if test "x$enable_debug" = "xyes" ; then CONFIG_REQUESTED="yes" fi AC_ARG_ENABLE(release, AC_HELP_STRING([--enable-release], [Use 'RELEASE' Configuration [default=NO]]), enable_release=yes, enable_release=no) AM_CONDITIONAL(ENABLE_RELEASE, test x$enable_release = xyes) if test "x$enable_release" = "xyes" ; then CONFIG_REQUESTED="yes" fi if test -z "$CONFIG_REQUESTED" ; then AM_CONDITIONAL(ENABLE_DEBUG, true) enable_debug=yes fi AC_ARG_ENABLE(winfxcore, AC_HELP_STRING([--enable-winfxcore], [force winfxcore to build with mono 2.6 [default=NO]]), enable_winfxcore=yes, enable_winfxcore=no) NUNIT_PATH= PKG_CHECK_MODULES(NUNIT, mono-nunit >= 2.4, nunit_247=yes, nunit_247=no) if test "x$nunit_247" = "xno"; then AC_MSG_WARN([Could not find nunit >= 2.4.7; unit tests will not be available.]) enable_tests=no else NUNIT_PATH=`pkg-config --variable=libdir mono-nunit`/mono/2.0/ fi AC_SUBST(NUNIT_PATH) AM_CONDITIONAL(ENABLE_TESTS, test "x$enable_tests" = "xyes") dnl package checks, common for all configs PKG_CHECK_MODULES([MONO], [mono >= 2.0]) if test "x$enable_winfxcore" = "xno"; then if pkg-config --atleast-version=2.5 mono; then SHAMROCK_CHECK_MONO_2_0_GAC_ASSEMBLIES([ WindowsBase ]) WINDOWSBASE_LIBS=-r:WindowsBase AC_SUBST(WINDOWSBASE_LIBS) has_mono_2_5=yes fi fi AM_CONDITIONAL(HAS_MONO_2_5, test "x$has_mono_2_5" = "xyes") dnl for test PKG_CHECK_MODULES([GLIB_SHARP_20], [glib-sharp-2.0 >= 2.12.8]) PKG_CHECK_MODULES([GTK_SHARP_20], [gtk-sharp-2.0 >= 2.12.8]) AC_CONFIG_FILES([ WindowsBase/Makefile WindowsBase/AssemblyInfo.cs UIAutomationTypes/Makefile UIAutomationTypes/AssemblyInfo.cs UIAutomationBridge/Makefile UIAutomationBridge/AssemblyInfo.cs UIAutomationSource/Makefile UIAutomationSource/AssemblyInfo.cs UIAutomationClient/Makefile UIAutomationClientTests/Makefile UIAutomationClientTests/GtkForm/Makefile UIAutomationClientTests/AtspiUiaClientTests/Makefile UIAutomationClientTests/AtspiUiaClientTests/atspiuiaclienttest.sh UIAutomationClientTests/SampleForm/Makefile UIAutomationClientTests/UIAutomationClientTests/Makefile UIAutomationClientTests/UIAutomationClientTests/swfclienttest.sh UIAutomationClient/AssemblyInfo.cs UIAutomationProvider/Makefile UIAutomationProvider/AssemblyInfo.cs data/Makefile data/mono-uia.pc.in data/mono-uia-openSUSE_11.2.spec data/mono-uia-Fedora_12.spec data/mono-uia-openSUSE_11.3.spec data/mono-uia-Fedora_13.spec Makefile build/common/Consts.cs ]) AC_OUTPUT mono-uia-2.1/configure0000755000016200001670000041303011433571551015674 0ustar00hudsonhudson00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.63 for mono-uia 2.1. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell bug-autoconf@gnu.org about your system, echo including any error possibly output before this message. echo This can help us improve future autoconf versions. echo Configuration will now proceed without shell functions. } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='mono-uia' PACKAGE_TARNAME='mono-uia' PACKAGE_VERSION='2.1' PACKAGE_STRING='mono-uia 2.1' PACKAGE_BUGREPORT='' ac_subst_vars='LTLIBOBJS LIBOBJS GTK_SHARP_20_LIBS GTK_SHARP_20_CFLAGS GLIB_SHARP_20_LIBS GLIB_SHARP_20_CFLAGS HAS_MONO_2_5_FALSE HAS_MONO_2_5_TRUE WINDOWSBASE_LIBS MONO_LIBS MONO_CFLAGS ENABLE_TESTS_FALSE ENABLE_TESTS_TRUE NUNIT_PATH NUNIT_LIBS NUNIT_CFLAGS ENABLE_RELEASE_FALSE ENABLE_RELEASE_TRUE ENABLE_DEBUG_FALSE ENABLE_DEBUG_TRUE SN GACUTIL GMCS MONO expanded_datadir expanded_bindir expanded_libdir PKG_CONFIG am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_tests enable_debug enable_release enable_winfxcore ' ac_precious_vars='build_alias host_alias target_alias PKG_CONFIG NUNIT_CFLAGS NUNIT_LIBS MONO_CFLAGS MONO_LIBS GLIB_SHARP_20_CFLAGS GLIB_SHARP_20_LIBS GTK_SHARP_20_CFLAGS GTK_SHARP_20_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 { (exit 1); exit 1; }; } ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { $as_echo "$as_me: error: working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures mono-uia 2.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/mono-uia] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of mono-uia 2.1:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-tests Do not build unit tests default=no --enable-debug Use 'DEBUG' Configuration default=YES --enable-release Use 'RELEASE' Configuration default=NO --enable-winfxcore force winfxcore to build with mono 2.6 default=NO Some influential environment variables: PKG_CONFIG path to pkg-config utility NUNIT_CFLAGS C compiler flags for NUNIT, overriding pkg-config NUNIT_LIBS linker flags for NUNIT, overriding pkg-config MONO_CFLAGS C compiler flags for MONO, overriding pkg-config MONO_LIBS linker flags for MONO, overriding pkg-config GLIB_SHARP_20_CFLAGS C compiler flags for GLIB_SHARP_20, overriding pkg-config GLIB_SHARP_20_LIBS linker flags for GLIB_SHARP_20, overriding pkg-config GTK_SHARP_20_CFLAGS C compiler flags for GTK_SHARP_20, overriding pkg-config GTK_SHARP_20_LIBS linker flags for GTK_SHARP_20, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF mono-uia configure 2.1 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by mono-uia $as_me 2.1, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 $as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5 $as_echo "$as_me: error: unsafe absolute working directory name" >&2;} { (exit 1); exit 1; }; };; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5 $as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;} { (exit 1); exit 1; }; };; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 $as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 $as_echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:$LINENO: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 $as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='mono-uia' VERSION='2.1' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} { $as_echo "$as_me:$LINENO: checking how to create a ustar tar archive" >&5 $as_echo_n "checking how to create a ustar tar archive... " >&6; } # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar plaintar pax cpio none' _am_tools=${am_cv_prog_tar_ustar-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do { echo "$as_me:$LINENO: $_am_tar --version" >&5 ($_am_tar --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && break done am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x ustar -w "$$tardir"' am__tar_='pax -L -x ustar -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H ustar -L' am__tar_='find "$tardir" -print | cpio -o -H ustar -L' am__untar='cpio -i -H ustar -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_ustar}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -rf conftest.dir if test -s conftest.tar; then { echo "$as_me:$LINENO: $am__untar &5 ($am__untar &5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir if test "${am_cv_prog_tar_ustar+set}" = set; then $as_echo_n "(cached) " >&6 else am_cv_prog_tar_ustar=$_am_tool fi { $as_echo "$as_me:$LINENO: result: $am_cv_prog_tar_ustar" >&5 $as_echo "$am_cv_prog_tar_ustar" >&6; } # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$PKG_CONFIG" = "xno"; then { { $as_echo "$as_me:$LINENO: error: You need to install pkg-config" >&5 $as_echo "$as_me: error: You need to install pkg-config" >&2;} { (exit 1); exit 1; }; } fi expanded_libdir=`( case $prefix in NONE) prefix=$ac_default_prefix ;; *) ;; esac case $exec_prefix in NONE) exec_prefix=$prefix ;; *) ;; esac eval echo $libdir )` expanded_bindir=`( case $prefix in NONE) prefix=$ac_default_prefix ;; *) ;; esac case $exec_prefix in NONE) exec_prefix=$prefix ;; *) ;; esac eval echo $bindir )` case $prefix in NONE) prefix=$ac_default_prefix ;; *) ;; esac case $exec_prefix in NONE) exec_prefix=$prefix ;; *) ;; esac expanded_datadir=`(eval echo $datadir)` expanded_datadir=`(eval echo $expanded_datadir)` # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "mono", so it can be a program name with args. set dummy mono; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_MONO+set}" = set; then $as_echo_n "(cached) " >&6 else case $MONO in [\\/]* | ?:[\\/]*) ac_cv_path_MONO="$MONO" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MONO="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_MONO" && ac_cv_path_MONO="no" ;; esac fi MONO=$ac_cv_path_MONO if test -n "$MONO"; then { $as_echo "$as_me:$LINENO: result: $MONO" >&5 $as_echo "$MONO" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$MONO" = "xno"; then { { $as_echo "$as_me:$LINENO: error: mono Not found" >&5 $as_echo "$as_me: error: mono Not found" >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "gmcs", so it can be a program name with args. set dummy gmcs; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GMCS+set}" = set; then $as_echo_n "(cached) " >&6 else case $GMCS in [\\/]* | ?:[\\/]*) ac_cv_path_GMCS="$GMCS" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GMCS="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMCS" && ac_cv_path_GMCS="no" ;; esac fi GMCS=$ac_cv_path_GMCS if test -n "$GMCS"; then { $as_echo "$as_me:$LINENO: result: $GMCS" >&5 $as_echo "$GMCS" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$GMCS" = "xno"; then { { $as_echo "$as_me:$LINENO: error: gmcs Not found" >&5 $as_echo "$as_me: error: gmcs Not found" >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "gacutil", so it can be a program name with args. set dummy gacutil; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GACUTIL+set}" = set; then $as_echo_n "(cached) " >&6 else case $GACUTIL in [\\/]* | ?:[\\/]*) ac_cv_path_GACUTIL="$GACUTIL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GACUTIL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GACUTIL" && ac_cv_path_GACUTIL="no" ;; esac fi GACUTIL=$ac_cv_path_GACUTIL if test -n "$GACUTIL"; then { $as_echo "$as_me:$LINENO: result: $GACUTIL" >&5 $as_echo "$GACUTIL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$GACUTIL" = "xno" ; then { { $as_echo "$as_me:$LINENO: error: No gacutil tool found" >&5 $as_echo "$as_me: error: No gacutil tool found" >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "sn", so it can be a program name with args. set dummy sn; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_SN+set}" = set; then $as_echo_n "(cached) " >&6 else case $SN in [\\/]* | ?:[\\/]*) ac_cv_path_SN="$SN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SN="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_SN" && ac_cv_path_SN="no" ;; esac fi SN=$ac_cv_path_SN if test -n "$SN"; then { $as_echo "$as_me:$LINENO: result: $SN" >&5 $as_echo "$SN" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$SN" = "xno" ; then { { $as_echo "$as_me:$LINENO: error: No sn tool found" >&5 $as_echo "$as_me: error: No sn tool found" >&2;} { (exit 1); exit 1; }; } fi # Check whether --enable-tests was given. if test "${enable_tests+set}" = set; then enableval=$enable_tests; enable_tests=no else enable_tests=yes fi # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then enableval=$enable_debug; enable_debug=yes else enable_debug=no fi if test x$enable_debug = xyes; then ENABLE_DEBUG_TRUE= ENABLE_DEBUG_FALSE='#' else ENABLE_DEBUG_TRUE='#' ENABLE_DEBUG_FALSE= fi if test "x$enable_debug" = "xyes" ; then CONFIG_REQUESTED="yes" fi # Check whether --enable-release was given. if test "${enable_release+set}" = set; then enableval=$enable_release; enable_release=yes else enable_release=no fi if test x$enable_release = xyes; then ENABLE_RELEASE_TRUE= ENABLE_RELEASE_FALSE='#' else ENABLE_RELEASE_TRUE='#' ENABLE_RELEASE_FALSE= fi if test "x$enable_release" = "xyes" ; then CONFIG_REQUESTED="yes" fi if test -z "$CONFIG_REQUESTED" ; then if true; then ENABLE_DEBUG_TRUE= ENABLE_DEBUG_FALSE='#' else ENABLE_DEBUG_TRUE='#' ENABLE_DEBUG_FALSE= fi enable_debug=yes fi # Check whether --enable-winfxcore was given. if test "${enable_winfxcore+set}" = set; then enableval=$enable_winfxcore; enable_winfxcore=yes else enable_winfxcore=no fi NUNIT_PATH= if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:$LINENO: checking for NUNIT" >&5 $as_echo_n "checking for NUNIT... " >&6; } if test -n "$NUNIT_CFLAGS"; then pkg_cv_NUNIT_CFLAGS="$NUNIT_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"mono-nunit >= 2.4\"") >&5 ($PKG_CONFIG --exists --print-errors "mono-nunit >= 2.4") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_NUNIT_CFLAGS=`$PKG_CONFIG --cflags "mono-nunit >= 2.4" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$NUNIT_LIBS"; then pkg_cv_NUNIT_LIBS="$NUNIT_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"mono-nunit >= 2.4\"") >&5 ($PKG_CONFIG --exists --print-errors "mono-nunit >= 2.4") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_NUNIT_LIBS=`$PKG_CONFIG --libs "mono-nunit >= 2.4" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then NUNIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "mono-nunit >= 2.4" 2>&1` else NUNIT_PKG_ERRORS=`$PKG_CONFIG --print-errors "mono-nunit >= 2.4" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$NUNIT_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } nunit_247=no elif test $pkg_failed = untried; then nunit_247=no else NUNIT_CFLAGS=$pkg_cv_NUNIT_CFLAGS NUNIT_LIBS=$pkg_cv_NUNIT_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } nunit_247=yes fi if test "x$nunit_247" = "xno"; then { $as_echo "$as_me:$LINENO: WARNING: Could not find nunit >= 2.4.7; unit tests will not be available." >&5 $as_echo "$as_me: WARNING: Could not find nunit >= 2.4.7; unit tests will not be available." >&2;} enable_tests=no else NUNIT_PATH=`pkg-config --variable=libdir mono-nunit`/mono/2.0/ fi if test "x$enable_tests" = "xyes"; then ENABLE_TESTS_TRUE= ENABLE_TESTS_FALSE='#' else ENABLE_TESTS_TRUE='#' ENABLE_TESTS_FALSE= fi pkg_failed=no { $as_echo "$as_me:$LINENO: checking for MONO" >&5 $as_echo_n "checking for MONO... " >&6; } if test -n "$MONO_CFLAGS"; then pkg_cv_MONO_CFLAGS="$MONO_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"mono >= 2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "mono >= 2.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_MONO_CFLAGS=`$PKG_CONFIG --cflags "mono >= 2.0" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$MONO_LIBS"; then pkg_cv_MONO_LIBS="$MONO_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"mono >= 2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "mono >= 2.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_MONO_LIBS=`$PKG_CONFIG --libs "mono >= 2.0" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then MONO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "mono >= 2.0" 2>&1` else MONO_PKG_ERRORS=`$PKG_CONFIG --print-errors "mono >= 2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$MONO_PKG_ERRORS" >&5 { { $as_echo "$as_me:$LINENO: error: Package requirements (mono >= 2.0) were not met: $MONO_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables MONO_CFLAGS and MONO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 $as_echo "$as_me: error: Package requirements (mono >= 2.0) were not met: $MONO_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables MONO_CFLAGS and MONO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&2;} { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables MONO_CFLAGS and MONO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&5 $as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables MONO_CFLAGS and MONO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } else MONO_CFLAGS=$pkg_cv_MONO_CFLAGS MONO_LIBS=$pkg_cv_MONO_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi if test "x$enable_winfxcore" = "xno"; then if pkg-config --atleast-version=2.5 mono; then for asm in $(echo "2.0,WindowsBase " | cut -d, -f2- | sed 's/\,/ /g') do { $as_echo "$as_me:$LINENO: checking for Mono 2.0 GAC for $asm.dll" >&5 $as_echo_n "checking for Mono 2.0 GAC for $asm.dll... " >&6; } if test \ -e "$($PKG_CONFIG --variable=libdir mono)/mono/2.0/$asm.dll" -o \ -e "$($PKG_CONFIG --variable=prefix mono)/lib/mono/2.0/$asm.dll"; \ then \ { $as_echo "$as_me:$LINENO: result: found" >&5 $as_echo "found" >&6; } else { $as_echo "$as_me:$LINENO: result: not found" >&5 $as_echo "not found" >&6; } { { $as_echo "$as_me:$LINENO: error: missing reqired Mono 2.0 assembly: $asm.dll" >&5 $as_echo "$as_me: error: missing reqired Mono 2.0 assembly: $asm.dll" >&2;} { (exit 1); exit 1; }; } fi done WINDOWSBASE_LIBS=-r:WindowsBase has_mono_2_5=yes fi fi if test "x$has_mono_2_5" = "xyes"; then HAS_MONO_2_5_TRUE= HAS_MONO_2_5_FALSE='#' else HAS_MONO_2_5_TRUE='#' HAS_MONO_2_5_FALSE= fi pkg_failed=no { $as_echo "$as_me:$LINENO: checking for GLIB_SHARP_20" >&5 $as_echo_n "checking for GLIB_SHARP_20... " >&6; } if test -n "$GLIB_SHARP_20_CFLAGS"; then pkg_cv_GLIB_SHARP_20_CFLAGS="$GLIB_SHARP_20_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-sharp-2.0 >= 2.12.8\"") >&5 ($PKG_CONFIG --exists --print-errors "glib-sharp-2.0 >= 2.12.8") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GLIB_SHARP_20_CFLAGS=`$PKG_CONFIG --cflags "glib-sharp-2.0 >= 2.12.8" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GLIB_SHARP_20_LIBS"; then pkg_cv_GLIB_SHARP_20_LIBS="$GLIB_SHARP_20_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-sharp-2.0 >= 2.12.8\"") >&5 ($PKG_CONFIG --exists --print-errors "glib-sharp-2.0 >= 2.12.8") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GLIB_SHARP_20_LIBS=`$PKG_CONFIG --libs "glib-sharp-2.0 >= 2.12.8" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GLIB_SHARP_20_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-sharp-2.0 >= 2.12.8" 2>&1` else GLIB_SHARP_20_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-sharp-2.0 >= 2.12.8" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GLIB_SHARP_20_PKG_ERRORS" >&5 { { $as_echo "$as_me:$LINENO: error: Package requirements (glib-sharp-2.0 >= 2.12.8) were not met: $GLIB_SHARP_20_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GLIB_SHARP_20_CFLAGS and GLIB_SHARP_20_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 $as_echo "$as_me: error: Package requirements (glib-sharp-2.0 >= 2.12.8) were not met: $GLIB_SHARP_20_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GLIB_SHARP_20_CFLAGS and GLIB_SHARP_20_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&2;} { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GLIB_SHARP_20_CFLAGS and GLIB_SHARP_20_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&5 $as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GLIB_SHARP_20_CFLAGS and GLIB_SHARP_20_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } else GLIB_SHARP_20_CFLAGS=$pkg_cv_GLIB_SHARP_20_CFLAGS GLIB_SHARP_20_LIBS=$pkg_cv_GLIB_SHARP_20_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi pkg_failed=no { $as_echo "$as_me:$LINENO: checking for GTK_SHARP_20" >&5 $as_echo_n "checking for GTK_SHARP_20... " >&6; } if test -n "$GTK_SHARP_20_CFLAGS"; then pkg_cv_GTK_SHARP_20_CFLAGS="$GTK_SHARP_20_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk-sharp-2.0 >= 2.12.8\"") >&5 ($PKG_CONFIG --exists --print-errors "gtk-sharp-2.0 >= 2.12.8") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GTK_SHARP_20_CFLAGS=`$PKG_CONFIG --cflags "gtk-sharp-2.0 >= 2.12.8" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GTK_SHARP_20_LIBS"; then pkg_cv_GTK_SHARP_20_LIBS="$GTK_SHARP_20_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk-sharp-2.0 >= 2.12.8\"") >&5 ($PKG_CONFIG --exists --print-errors "gtk-sharp-2.0 >= 2.12.8") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GTK_SHARP_20_LIBS=`$PKG_CONFIG --libs "gtk-sharp-2.0 >= 2.12.8" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTK_SHARP_20_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gtk-sharp-2.0 >= 2.12.8" 2>&1` else GTK_SHARP_20_PKG_ERRORS=`$PKG_CONFIG --print-errors "gtk-sharp-2.0 >= 2.12.8" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GTK_SHARP_20_PKG_ERRORS" >&5 { { $as_echo "$as_me:$LINENO: error: Package requirements (gtk-sharp-2.0 >= 2.12.8) were not met: $GTK_SHARP_20_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GTK_SHARP_20_CFLAGS and GTK_SHARP_20_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 $as_echo "$as_me: error: Package requirements (gtk-sharp-2.0 >= 2.12.8) were not met: $GTK_SHARP_20_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GTK_SHARP_20_CFLAGS and GTK_SHARP_20_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&2;} { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GTK_SHARP_20_CFLAGS and GTK_SHARP_20_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&5 $as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GTK_SHARP_20_CFLAGS and GTK_SHARP_20_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } else GTK_SHARP_20_CFLAGS=$pkg_cv_GTK_SHARP_20_CFLAGS GTK_SHARP_20_LIBS=$pkg_cv_GTK_SHARP_20_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi ac_config_files="$ac_config_files WindowsBase/Makefile WindowsBase/AssemblyInfo.cs UIAutomationTypes/Makefile UIAutomationTypes/AssemblyInfo.cs UIAutomationBridge/Makefile UIAutomationBridge/AssemblyInfo.cs UIAutomationSource/Makefile UIAutomationSource/AssemblyInfo.cs UIAutomationClient/Makefile UIAutomationClientTests/Makefile UIAutomationClientTests/GtkForm/Makefile UIAutomationClientTests/AtspiUiaClientTests/Makefile UIAutomationClientTests/AtspiUiaClientTests/atspiuiaclienttest.sh UIAutomationClientTests/SampleForm/Makefile UIAutomationClientTests/UIAutomationClientTests/Makefile UIAutomationClientTests/UIAutomationClientTests/swfclienttest.sh UIAutomationClient/AssemblyInfo.cs UIAutomationProvider/Makefile UIAutomationProvider/AssemblyInfo.cs data/Makefile data/mono-uia.pc.in data/mono-uia-openSUSE_11.2.spec data/mono-uia-Fedora_12.spec data/mono-uia-openSUSE_11.3.spec data/mono-uia-Fedora_13.spec Makefile build/common/Consts.cs" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${ENABLE_DEBUG_TRUE}" && test -z "${ENABLE_DEBUG_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"ENABLE_DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${ENABLE_RELEASE_TRUE}" && test -z "${ENABLE_RELEASE_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_RELEASE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"ENABLE_RELEASE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${ENABLE_DEBUG_TRUE}" && test -z "${ENABLE_DEBUG_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"ENABLE_DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${ENABLE_TESTS_TRUE}" && test -z "${ENABLE_TESTS_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_TESTS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"ENABLE_TESTS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAS_MONO_2_5_TRUE}" && test -z "${HAS_MONO_2_5_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAS_MONO_2_5\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAS_MONO_2_5\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by mono-uia $as_me 2.1, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ mono-uia config.status 2.1 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { $as_echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "WindowsBase/Makefile") CONFIG_FILES="$CONFIG_FILES WindowsBase/Makefile" ;; "WindowsBase/AssemblyInfo.cs") CONFIG_FILES="$CONFIG_FILES WindowsBase/AssemblyInfo.cs" ;; "UIAutomationTypes/Makefile") CONFIG_FILES="$CONFIG_FILES UIAutomationTypes/Makefile" ;; "UIAutomationTypes/AssemblyInfo.cs") CONFIG_FILES="$CONFIG_FILES UIAutomationTypes/AssemblyInfo.cs" ;; "UIAutomationBridge/Makefile") CONFIG_FILES="$CONFIG_FILES UIAutomationBridge/Makefile" ;; "UIAutomationBridge/AssemblyInfo.cs") CONFIG_FILES="$CONFIG_FILES UIAutomationBridge/AssemblyInfo.cs" ;; "UIAutomationSource/Makefile") CONFIG_FILES="$CONFIG_FILES UIAutomationSource/Makefile" ;; "UIAutomationSource/AssemblyInfo.cs") CONFIG_FILES="$CONFIG_FILES UIAutomationSource/AssemblyInfo.cs" ;; "UIAutomationClient/Makefile") CONFIG_FILES="$CONFIG_FILES UIAutomationClient/Makefile" ;; "UIAutomationClientTests/Makefile") CONFIG_FILES="$CONFIG_FILES UIAutomationClientTests/Makefile" ;; "UIAutomationClientTests/GtkForm/Makefile") CONFIG_FILES="$CONFIG_FILES UIAutomationClientTests/GtkForm/Makefile" ;; "UIAutomationClientTests/AtspiUiaClientTests/Makefile") CONFIG_FILES="$CONFIG_FILES UIAutomationClientTests/AtspiUiaClientTests/Makefile" ;; "UIAutomationClientTests/AtspiUiaClientTests/atspiuiaclienttest.sh") CONFIG_FILES="$CONFIG_FILES UIAutomationClientTests/AtspiUiaClientTests/atspiuiaclienttest.sh" ;; "UIAutomationClientTests/SampleForm/Makefile") CONFIG_FILES="$CONFIG_FILES UIAutomationClientTests/SampleForm/Makefile" ;; "UIAutomationClientTests/UIAutomationClientTests/Makefile") CONFIG_FILES="$CONFIG_FILES UIAutomationClientTests/UIAutomationClientTests/Makefile" ;; "UIAutomationClientTests/UIAutomationClientTests/swfclienttest.sh") CONFIG_FILES="$CONFIG_FILES UIAutomationClientTests/UIAutomationClientTests/swfclienttest.sh" ;; "UIAutomationClient/AssemblyInfo.cs") CONFIG_FILES="$CONFIG_FILES UIAutomationClient/AssemblyInfo.cs" ;; "UIAutomationProvider/Makefile") CONFIG_FILES="$CONFIG_FILES UIAutomationProvider/Makefile" ;; "UIAutomationProvider/AssemblyInfo.cs") CONFIG_FILES="$CONFIG_FILES UIAutomationProvider/AssemblyInfo.cs" ;; "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; "data/mono-uia.pc.in") CONFIG_FILES="$CONFIG_FILES data/mono-uia.pc.in" ;; "data/mono-uia-openSUSE_11.2.spec") CONFIG_FILES="$CONFIG_FILES data/mono-uia-openSUSE_11.2.spec" ;; "data/mono-uia-Fedora_12.spec") CONFIG_FILES="$CONFIG_FILES data/mono-uia-Fedora_12.spec" ;; "data/mono-uia-openSUSE_11.3.spec") CONFIG_FILES="$CONFIG_FILES data/mono-uia-openSUSE_11.3.spec" ;; "data/mono-uia-Fedora_13.spec") CONFIG_FILES="$CONFIG_FILES data/mono-uia-Fedora_13.spec" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "build/common/Consts.cs") CONFIG_FILES="$CONFIG_FILES build/common/Consts.cs" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=' ' ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 $as_echo "$as_me: error: could not setup config files machinery" >&2;} { (exit 1); exit 1; }; } _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac ac_file_inputs="$ac_file_inputs '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi mono-uia-2.1/mono.snk0000644000016200001670000000112411433571545015452 0ustar00hudsonhudson00000000000000$RSA2yw:kz.tѯ̓t+,4GM$G~hSoNF^՗.m6p/ MHֱ/F_I.d/^d%F+=QТY_z{ is9~ \@9Omono-uia-2.1/expansions.m40000644000016200001670000000272011433571545016421 0ustar00hudsonhudson00000000000000AC_DEFUN([SHAMROCK_EXPAND_LIBDIR], [ expanded_libdir=`( case $prefix in NONE) prefix=$ac_default_prefix ;; *) ;; esac case $exec_prefix in NONE) exec_prefix=$prefix ;; *) ;; esac eval echo $libdir )` AC_SUBST(expanded_libdir) ]) AC_DEFUN([SHAMROCK_EXPAND_BINDIR], [ expanded_bindir=`( case $prefix in NONE) prefix=$ac_default_prefix ;; *) ;; esac case $exec_prefix in NONE) exec_prefix=$prefix ;; *) ;; esac eval echo $bindir )` AC_SUBST(expanded_bindir) ]) AC_DEFUN([SHAMROCK_EXPAND_DATADIR], [ case $prefix in NONE) prefix=$ac_default_prefix ;; *) ;; esac case $exec_prefix in NONE) exec_prefix=$prefix ;; *) ;; esac expanded_datadir=`(eval echo $datadir)` expanded_datadir=`(eval echo $expanded_datadir)` AC_SUBST(expanded_datadir) ]) AC_DEFUN([_SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES], [ for asm in $(echo "$*" | cut -d, -f2- | sed 's/\,/ /g') do AC_MSG_CHECKING([for Mono $1 GAC for $asm.dll]) if test \ -e "$($PKG_CONFIG --variable=libdir mono)/mono/$1/$asm.dll" -o \ -e "$($PKG_CONFIG --variable=prefix mono)/lib/mono/$1/$asm.dll"; \ then \ AC_MSG_RESULT([found]) else AC_MSG_RESULT([not found]) AC_MSG_ERROR([missing reqired Mono $1 assembly: $asm.dll]) fi done ]) AC_DEFUN([SHAMROCK_CHECK_MONO_1_0_GAC_ASSEMBLIES], [ _SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES(1.0, $*) ]) AC_DEFUN([SHAMROCK_CHECK_MONO_2_0_GAC_ASSEMBLIES], [ _SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES(2.0, $*) ]) mono-uia-2.1/Makefile.in0000644000016200001670000005367211433571551016046 0ustar00hudsonhudson00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/build/common/Consts.cs.in \ $(top_srcdir)/configure COPYING NEWS install-sh missing \ mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = build/common/Consts.cs CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = WindowsBase UIAutomationTypes UIAutomationBridge \ UIAutomationProvider UIAutomationSource UIAutomationClient \ data UIAutomationClientTests DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ GACUTIL = @GACUTIL@ GLIB_SHARP_20_CFLAGS = @GLIB_SHARP_20_CFLAGS@ GLIB_SHARP_20_LIBS = @GLIB_SHARP_20_LIBS@ GMCS = @GMCS@ GTK_SHARP_20_CFLAGS = @GTK_SHARP_20_CFLAGS@ GTK_SHARP_20_LIBS = @GTK_SHARP_20_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MONO = @MONO@ MONO_CFLAGS = @MONO_CFLAGS@ MONO_LIBS = @MONO_LIBS@ NUNIT_CFLAGS = @NUNIT_CFLAGS@ NUNIT_LIBS = @NUNIT_LIBS@ NUNIT_PATH = @NUNIT_PATH@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SN = @SN@ STRIP = @STRIP@ VERSION = @VERSION@ WINDOWSBASE_LIBS = @WINDOWSBASE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_bindir = @expanded_bindir@ expanded_datadir = @expanded_datadir@ expanded_libdir = @expanded_libdir@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ expansions.m4 \ mono.snk \ winfx3.pub @HAS_MONO_2_5_FALSE@CODE_SUBDIRS = WindowsBase UIAutomationTypes UIAutomationBridge UIAutomationProvider UIAutomationSource UIAutomationClient @HAS_MONO_2_5_TRUE@CODE_SUBDIRS = UIAutomationTypes UIAutomationBridge UIAutomationProvider UIAutomationSource UIAutomationClient @ENABLE_TESTS_FALSE@SUBDIRS = $(CODE_SUBDIRS) data @ENABLE_TESTS_TRUE@SUBDIRS = $(CODE_SUBDIRS) UIAutomationClientTests data all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): build/common/Consts.cs: $(top_builddir)/config.status $(top_srcdir)/build/common/Consts.cs.in cd $(top_builddir) && $(SHELL) ./config.status $@ # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-hook dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am dist-hook: @if test -d "$(srcdir)/../.git"; \ then \ echo Creating ChangeLog && \ ( cd "$(top_srcdir)" && \ echo '# Generated by Makefile. Do not edit.'; echo; \ $(top_srcdir)/missing --run git log --stat . ) > ChangeLog.tmp \ && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \ || ( rm -f ChangeLog.tmp ; \ echo Failed to generate ChangeLog >&2 ); \ else \ echo A git clone is required to generate a ChangeLog >&2; \ fi # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: mono-uia-2.1/WindowsBase/0000777000016200001670000000000011433571554016220 5ustar00hudsonhudson00000000000000mono-uia-2.1/WindowsBase/Makefile.am0000644000016200001670000000300611433571545020247 0ustar00hudsonhudson00000000000000 EXTRA_DIST = ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_FLAGS = -lib:@expanded_libdir@/mono/2.0 -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" -d:NET_2_0 ASSEMBLY = ../bin/WindowsBase.dll ASSEMBLY_MDB = $(ASSEMBLY).mdb COMPILE_TARGET = library PROJECT_REFERENCES = BUILD_DIR = ../bin PACKAGE_FLAG = /package 2.0 WINDOWSBASE_DLL_MDB_SOURCE=$(BUILD_DIR)/WindowsBase.dll.mdb WINDOWSBASE_DLL_MDB=$(BUILD_DIR)/WindowsBase.dll.mdb AL=al2 SATELLITE_ASSEMBLY_NAME= PROGRAMFILES = \ $(WINDOWSBASE_DLL_MDB) RESGEN=resgen2 all: $(ASSEMBLY) $(PROGRAMFILES) FILES = \ AssemblyInfo.cs \ ../build/common/*.cs \ System.Windows/Point.cs \ System.Windows/Rect.cs \ System.Windows/Size.cs \ System.Windows/Vector.cs \ System.Windows.Media/Matrix.cs DATA_FILES = RESOURCES = REFERENCES = \ System DLL_REFERENCES = CLEANFILES = $(PROGRAMFILES) install-data-local: gac-install uninstall-local: gac-uninstall include $(top_srcdir)/Makefile.include $(eval $(call emit_resgen_targets)) $(build_xamlg_list): %.xaml.g.cs: %.xaml xamlg '$<' $(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list) mkdir -p $(shell dirname $(ASSEMBLY)) $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) sn -q -R $(ASSEMBLY) $(top_srcdir)/mono.snk mono-uia-2.1/WindowsBase/AssemblyInfo.cs.in0000644000016200001670000000773511433571545021557 0ustar00hudsonhudson00000000000000// // AssemblyInfo.cs // // Author: // Andreas Nahr (ClassDevelopment@A-SoftTech.com) // // (C) 2003 Ximian, Inc. http://www.ximian.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 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. // using System; using System.Reflection; using System.Resources; using System.Security; using System.Security.Permissions; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about the WindowsBase assembly // v3.0 Assembly [assembly: AssemblyCompany (Consts.MonoCompany)] [assembly: AssemblyProduct (Consts.MonoProduct)] [assembly: AssemblyCopyright (Consts.MonoCopyright)] [assembly: AssemblyVersion (Consts.FxVersion)] [assembly: AssemblyFileVersion (Consts.FxFileVersion)] [assembly: NeutralResourcesLanguage ("en")] [assembly: CLSCompliant (true)] [assembly: AssemblyDelaySign (true)] [assembly: AssemblyKeyFile ("@abs_top_srcdir@/winfx3.pub")] [assembly: ComVisible (false)] [assembly: AllowPartiallyTrustedCallers] [assembly: CompilationRelaxations (CompilationRelaxations.NoStringInterning)] [assembly: Debuggable (DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.Default)] [assembly: RuntimeCompatibility (WrapNonExceptionThrows = true)] [assembly: Dependency ("System,", LoadHint.Always)] [assembly: SecurityCritical] [assembly: PermissionSet (SecurityAction.RequestMinimum, Name = "FullTrust")] [assembly: SecurityPermission (SecurityAction.RequestMinimum, SkipVerification = true)] //[assembly: XmlnsPrefixAttribute ("http://schemas.microsoft.com/xps/2005/06", "metro")] //[assembly: XmlnsPrefixAttribute ("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "wpf")] //[assembly: XmlnsPrefixAttribute ("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "av")] //[assembly: XmlnsDefinitionAttribute ("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Media")] //[assembly: XmlnsDefinitionAttribute ("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Input")] //[assembly: XmlnsDefinitionAttribute ("http://schemas.microsoft.com/xps/2005/06", "System.Windows")] //[assembly: XmlnsDefinitionAttribute ("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Media")] //[assembly: XmlnsDefinitionAttribute ("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Input")] //[assembly: XmlnsDefinitionAttribute ("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows")] //[assembly: XmlnsDefinitionAttribute ("http://schemas.microsoft.com/winfx/2006/xaml/composite-font", "System.Windows.Media")] // //[assembly: XmlnsDefinitionAttribute ("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Media")] //[assembly: XmlnsDefinitionAttribute ("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Input")] //[assembly: XmlnsDefinitionAttribute ("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows")] mono-uia-2.1/WindowsBase/System.Windows.Media/0000777000016200001670000000000011433571554022153 5ustar00hudsonhudson00000000000000mono-uia-2.1/WindowsBase/System.Windows.Media/Matrix.cs0000644000016200001670000002072611433571545023751 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2007 Novell, Inc. (http://www.novell.com) // // Authors: // Chris Toshok (toshok@ximian.com) // using System; //using System.ComponentModel; //using System.Windows.Threading; namespace System.Windows.Media { [SerializableAttribute] //[TypeConverterAttribute(typeof(MatrixConverter))] public struct Matrix : IFormattable { double m11; double m12; double m21; double m22; double offsetX; double offsetY; public Matrix (double m11, double m12, double m21, double m22, double offsetX, double offsetY) { this.m11 = m11; this.m12 = m12; this.m21 = m21; this.m22 = m22; this.offsetX = offsetX; this.offsetY = offsetY; } public void Append (Matrix matrix) { double _m11; double _m21; double _m12; double _m22; double _offsetX; double _offsetY; _m11 = m11 * matrix.M11 + m12 * matrix.M21; _m12 = m11 * matrix.M12 + m12 * matrix.M22; _m21 = m21 * matrix.M11 + m22 * matrix.M21; _m22 = m21 * matrix.M12 + m22 * matrix.M22; _offsetX = offsetX * matrix.M11 + offsetY * matrix.M21 + matrix.OffsetX; _offsetY = offsetX * matrix.M12 + offsetY * matrix.M22 + matrix.OffsetY; m11 = _m11; m12 = _m12; m21 = _m21; m22 = _m22; offsetX = _offsetX; offsetY = _offsetY; } public bool Equals (Matrix value) { return (m11 == value.M11 && m12 == value.M12 && m21 == value.M21 && m22 == value.M22 && offsetX == value.OffsetX && offsetY == value.OffsetY); } public override bool Equals (object o) { if (!(o is Matrix)) return false; return Equals ((Matrix)o); } public static bool Equals (Matrix matrix1, Matrix matrix2) { return matrix1.Equals (matrix2); } public override int GetHashCode () { throw new NotImplementedException (); } public void Invert () { if (!HasInverse) throw new InvalidOperationException ("Transform is not invertible."); double d = Determinant; /* 1/(ad-bc)[d -b; -c a] */ double _m11 = m22; double _m12 = -m12; double _m21 = -m21; double _m22 = m11; double _offsetX = m21 * offsetY - m22 * offsetX; double _offsetY = m12 * offsetX - m11 * offsetY; m11 = _m11 / d; m12 = _m12 / d; m21 = _m21 / d; m22 = _m22 / d; offsetX = _offsetX / d; offsetY = _offsetY / d; } public static Matrix Multiply (Matrix trans1, Matrix trans2) { Matrix m = trans1; m.Append (trans2); return m; } public static bool operator == (Matrix matrix1, Matrix matrix2) { return matrix1.Equals (matrix2); } public static bool operator != (Matrix matrix1, Matrix matrix2) { return !matrix1.Equals (matrix2); } public static Matrix operator * (Matrix trans1, Matrix trans2) { Matrix result = trans1; result.Append (trans2); return result; } public static Matrix Parse (string source) { throw new NotImplementedException (); } public void Prepend (Matrix matrix) { double _m11; double _m21; double _m12; double _m22; double _offsetX; double _offsetY; _m11 = matrix.M11 * m11 + matrix.M12 * m21; _m12 = matrix.M11 * m12 + matrix.M12 * m22; _m21 = matrix.M21 * m11 + matrix.M22 * m21; _m22 = matrix.M21 * m12 + matrix.M22 * m22; _offsetX = matrix.OffsetX * m11 + matrix.OffsetY * m21 + offsetX; _offsetY = matrix.OffsetX * m12 + matrix.OffsetY * m22 + offsetY; m11 = _m11; m12 = _m12; m21 = _m21; m22 = _m22; offsetX = _offsetX; offsetY = _offsetY; } public void Rotate (double angle) { // R_theta==[costheta -sintheta; sintheta costheta], double theta = angle * Math.PI / 180; Matrix r_theta = new Matrix (Math.Cos (theta), Math.Sin(theta), -Math.Sin (theta), Math.Cos(theta), 0, 0); Append (r_theta); } public void RotateAt (double angle, double centerX, double centerY) { Translate (-centerX, -centerY); Rotate (angle); Translate (centerX, centerY); } public void RotateAtPrepend (double angle, double centerX, double centerY) { Matrix m = Matrix.Identity; m.RotateAt (angle, centerX, centerY); Prepend (m); } public void RotatePrepend (double angle) { Matrix m = Matrix.Identity; m.Rotate (angle); Prepend (m); } public void Scale (double scaleX, double scaleY) { Matrix scale = new Matrix (scaleX, 0, 0, scaleY, 0, 0); Append (scale); } public void ScaleAt (double scaleX, double scaleY, double centerX, double centerY) { Translate (-centerX, -centerY); Scale (scaleX, scaleY); Translate (centerX, centerY); } public void ScaleAtPrepend (double scaleX, double scaleY, double centerX, double centerY) { Matrix m = Matrix.Identity; m.ScaleAt (scaleX, scaleY, centerX, centerY); Prepend (m); } public void ScalePrepend (double scaleX, double scaleY) { Matrix m = Matrix.Identity; m.Scale (scaleX, scaleY); Prepend (m); } public void SetIdentity () { m11 = m22 = 1.0; m12 = m21 = 0.0; offsetX = offsetY = 0.0; } public void Skew (double skewX, double skewY) { Matrix skew_m = new Matrix (1, Math.Tan (skewY * Math.PI / 180), Math.Tan (skewX * Math.PI / 180), 1, 0, 0); Append (skew_m); } public void SkewPrepend (double skewX, double skewY) { Matrix m = Matrix.Identity; m.Skew (skewX, skewY); Prepend (m); } string IFormattable.ToString (string format, IFormatProvider provider) { throw new NotImplementedException (); } public override string ToString () { if (IsIdentity) return "Identity"; else return string.Format ("{0},{1},{2},{3},{4},{5}", m11, m12, m21, m22, offsetX, offsetY); } public string ToString (IFormatProvider provider) { throw new NotImplementedException (); } public Point Transform (Point point) { return Point.Multiply (point, this); } public void Transform (Point[] points) { for (int i = 0; i < points.Length; i ++) points[i] = Transform (points[i]); } public Vector Transform (Vector vector) { return Vector.Multiply (vector, this); } public void Transform (Vector[] vectors) { for (int i = 0; i < vectors.Length; i ++) vectors[i] = Transform (vectors[i]); } public void Translate (double offsetX, double offsetY) { this.offsetX += offsetX; this.offsetY += offsetY; } public void TranslatePrepend (double offsetX, double offsetY) { Matrix m = Matrix.Identity; m.Translate (offsetX, offsetY); Prepend (m); } public double Determinant { get { return m11 * m22 - m12 * m21; } } public bool HasInverse { get { return Determinant != 0; } } public static Matrix Identity { get { return new Matrix (1.0, 0.0, 0.0, 1.0, 0.0, 0.0); } } public bool IsIdentity { get { return Equals (Matrix.Identity); } } public double M11 { get { return m11; } set { m11 = value; } } public double M12 { get { return m12; } set { m12 = value; } } public double M21 { get { return m21; } set { m21 = value; } } public double M22 { get { return m22; } set { m22 = value; } } public double OffsetX { get { return offsetX; } set { offsetX = value; } } public double OffsetY { get { return offsetY; } set { offsetY = value; } } } } mono-uia-2.1/WindowsBase/AssemblyInfo.cs0000644000016200001670000001001211433571553021127 0ustar00hudsonhudson00000000000000// // AssemblyInfo.cs // // Author: // Andreas Nahr (ClassDevelopment@A-SoftTech.com) // // (C) 2003 Ximian, Inc. http://www.ximian.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 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. // using System; using System.Reflection; using System.Resources; using System.Security; using System.Security.Permissions; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about the WindowsBase assembly // v3.0 Assembly [assembly: AssemblyCompany (Consts.MonoCompany)] [assembly: AssemblyProduct (Consts.MonoProduct)] [assembly: AssemblyCopyright (Consts.MonoCopyright)] [assembly: AssemblyVersion (Consts.FxVersion)] [assembly: AssemblyFileVersion (Consts.FxFileVersion)] [assembly: NeutralResourcesLanguage ("en")] [assembly: CLSCompliant (true)] [assembly: AssemblyDelaySign (true)] [assembly: AssemblyKeyFile ("/var/lib/hudson/jobs/_uia_tag_tarballs/workspace/UIAutomation/winfx3.pub")] [assembly: ComVisible (false)] [assembly: AllowPartiallyTrustedCallers] [assembly: CompilationRelaxations (CompilationRelaxations.NoStringInterning)] [assembly: Debuggable (DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.Default)] [assembly: RuntimeCompatibility (WrapNonExceptionThrows = true)] [assembly: Dependency ("System,", LoadHint.Always)] [assembly: SecurityCritical] [assembly: PermissionSet (SecurityAction.RequestMinimum, Name = "FullTrust")] [assembly: SecurityPermission (SecurityAction.RequestMinimum, SkipVerification = true)] //[assembly: XmlnsPrefixAttribute ("http://schemas.microsoft.com/xps/2005/06", "metro")] //[assembly: XmlnsPrefixAttribute ("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "wpf")] //[assembly: XmlnsPrefixAttribute ("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "av")] //[assembly: XmlnsDefinitionAttribute ("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Media")] //[assembly: XmlnsDefinitionAttribute ("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Input")] //[assembly: XmlnsDefinitionAttribute ("http://schemas.microsoft.com/xps/2005/06", "System.Windows")] //[assembly: XmlnsDefinitionAttribute ("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Media")] //[assembly: XmlnsDefinitionAttribute ("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Input")] //[assembly: XmlnsDefinitionAttribute ("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows")] //[assembly: XmlnsDefinitionAttribute ("http://schemas.microsoft.com/winfx/2006/xaml/composite-font", "System.Windows.Media")] // //[assembly: XmlnsDefinitionAttribute ("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Media")] //[assembly: XmlnsDefinitionAttribute ("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Input")] //[assembly: XmlnsDefinitionAttribute ("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows")] mono-uia-2.1/WindowsBase/System.Windows/0000777000016200001670000000000011433571554021135 5ustar00hudsonhudson00000000000000mono-uia-2.1/WindowsBase/System.Windows/Size.cs0000644000016200001670000000743311433571545022401 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2007 Novell, Inc. (http://www.novell.com) // // Authors: // Chris Toshok (toshok@novell.com) // using System; //using System.ComponentModel; //using System.Windows.Converters; //using System.Windows.Markup; namespace System.Windows { [Serializable] //[ValueSerializer (typeof (SizeValueSerializer))] //[TypeConverter (typeof (SizeConverter))] public struct Size : IFormattable { public Size (double width, double height) { if (width < 0 || height < 0) throw new ArgumentException ("Width and Height must be non-negative."); this.width = width; this.height = height; } public bool Equals (Size value) { return width == value.Width && height == value.Height; } public override bool Equals (object o) { if (!(o is Size)) return false; return Equals ((Size)o); } public static bool Equals (Size size1, Size size2) { return size1.Equals (size2); } public override int GetHashCode () { throw new NotImplementedException (); } public static Size Parse (string source) { throw new NotImplementedException (); } public override string ToString () { if (IsEmpty) return "Empty"; return String.Format ("{0},{1}", width, height); } public string ToString (IFormatProvider formatProvider) { throw new NotImplementedException (); } string IFormattable.ToString (string format, IFormatProvider provider) { throw new NotImplementedException (); } public bool IsEmpty { get { return (width == Double.NegativeInfinity && height == Double.NegativeInfinity); } } public double Height { get { return height; } set { if (IsEmpty) throw new InvalidOperationException ("Cannot modify this property on the Empty Size."); if (value < 0) throw new ArgumentException ("height must be non-negative."); height = value; } } public double Width { get { return width; } set { if (IsEmpty) throw new InvalidOperationException ("Cannot modify this property on the Empty Size."); if (value < 0) throw new ArgumentException ("width must be non-negative."); width = value; } } public static Size Empty { get { Size s = new Size (); s.width = s.height = Double.NegativeInfinity; return s; } } /* operators */ public static explicit operator Point (Size size) { return new Point (size.Width, size.Height); } public static explicit operator Vector (Size size) { return new Vector (size.Width, size.Height); } public static bool operator ==(Size size1, Size size2) { return size1.Equals (size2); } public static bool operator !=(Size size1, Size size2) { return !size1.Equals (size2); } double width; double height; } } mono-uia-2.1/WindowsBase/System.Windows/Point.cs0000644000016200001670000001163411433571545022556 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2007 Novell, Inc. (http://www.novell.com) // // Authors: // Chris Toshok (toshok@novell.com) // using System; //using System.ComponentModel; //using System.Windows.Converters; //using System.Windows.Markup; using System.Windows.Media; using System.Globalization; namespace System.Windows { [Serializable] //[TypeConverter (typeof (PointConverter))] //[ValueSerializer (typeof (PointValueSerializer))] public struct Point : IFormattable { public Point (double x, double y) { this.x = x; this.y = y; } public double X { get { return x; } set { x = value; } } public double Y { get { return y; } set { y = value; } } public override bool Equals (object o) { if (!(o is Point)) return false; return Equals ((Point)o); } public bool Equals (Point value) { return x == value.X && y == value.Y; } public override int GetHashCode () { return (x.GetHashCode() ^ y.GetHashCode()); } public void Offset (double offsetX, double offsetY) { x += offsetX; y += offsetY; } public static Point Add (Point point, Vector vector) { return new Point (point.X + vector.X, point.Y + vector.Y); } public static bool Equals (Point point1, Point point2) { return point1.Equals (point2); } public static Point Multiply (Point point, Matrix matrix) { return new Point (point.X * matrix.M11 + point.Y * matrix.M21 + matrix.OffsetX, point.X * matrix.M12 + point.Y * matrix.M22 + matrix.OffsetY); } public static Vector Subtract (Point point1, Point point2) { return new Vector (point1.X - point2.X, point1.Y - point2.Y); } public static Point Subtract (Point point, Vector vector) { return new Point (point.X - vector.X, point.Y - vector.Y); } /* operators */ public static Vector operator -(Point point1, Point point2) { return Subtract (point1, point2); } public static Point operator -(Point point, Vector vector) { return Subtract (point, vector); } public static Point operator + (Point point, Vector vector) { return Add (point, vector); } public static Point operator * (Point point, Matrix matrix) { return Multiply (point, matrix); } public static bool operator != (Point point1, Point point2) { return !point1.Equals(point2); } public static bool operator == (Point point1, Point point2) { return point1.Equals(point2); } public static explicit operator Size (Point point) { return new Size (point.X, point.Y); } public static explicit operator Vector (Point point) { return new Vector (point.X, point.Y); } public static Point Parse (string source) { string[] points = source.Split(','); if (points.Length<2) throw new InvalidOperationException ("source does not contain two numbers"); if (points.Length > 2) throw new InvalidOperationException ("source contains too many delimiters"); CultureInfo ci = CultureInfo.InvariantCulture; return new Point (Convert.ToDouble(points[0],ci), Convert.ToDouble(points[1],ci)); } public override string ToString () { return this.ToString(null, null); } public string ToString (IFormatProvider formatProvider) { return this.ToString(null,formatProvider); } private string ToString(string format,IFormatProvider formatProvider) { CultureInfo ci = (CultureInfo)formatProvider; if (ci == null) ci = CultureInfo.CurrentCulture; string seperator = ci.NumberFormat.NumberDecimalSeparator; if (seperator.Equals(",")) seperator = ";"; else seperator = ","; object[] ob = { this.x, seperator, this.y }; return string.Format(formatProvider, "{0:" + format + "}{1}{2:" + format + "}", ob); } string IFormattable.ToString (string format, IFormatProvider formatProvider) { return this.ToString(format, formatProvider); } double x; double y; } } mono-uia-2.1/WindowsBase/System.Windows/Vector.cs0000644000016200001670000001373511433571545022733 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2007 Novell, Inc. (http://www.novell.com) // // Authors: // Chris Toshok (toshok@novell.com) // using System; //using System.ComponentModel; //using System.Windows.Converters; //using System.Windows.Markup; using System.Windows.Media; namespace System.Windows { [Serializable] //[ValueSerializer (typeof (VectorValueSerializer))] //[TypeConverter (typeof (VectorConverter))] public struct Vector : IFormattable { public Vector (double x, double y) { this.x = x; this.y = y; } public bool Equals (Vector value) { return x == value.X && y == value.Y; } public override bool Equals (object o) { if (!(o is Vector)) return false; return Equals ((Vector)o); } public override int GetHashCode () { throw new NotImplementedException (); } string IFormattable.ToString(string format, IFormatProvider formatProvider) { throw new NotImplementedException (); } public static bool Equals (Vector vector1, Vector vector2) { return vector1.Equals (vector2); } public static Point Add (Vector vector, Point point) { return new Point (vector.X + point.X, vector.Y + point.Y); } public static Vector Add (Vector vector1, Vector vector2) { return new Vector (vector1.X + vector2.X, vector1.Y + vector2.Y); } public static double AngleBetween (Vector vector1, Vector vector2) { double cos_theta = (vector1.X * vector2.X + vector1.Y * vector2.Y) / (vector1.Length * vector2.Length); return Math.Acos (cos_theta) / Math.PI * 180; } public static double CrossProduct (Vector vector1, Vector vector2) { // ... what operation is this exactly? return vector1.X * vector2.Y - vector1.Y * vector2.X; } public static double Determinant (Vector vector1, Vector vector2) { // same as CrossProduct, it appears. return vector1.X * vector2.Y - vector1.Y * vector2.X; } public static Vector Divide (Vector vector, double scalar) { return new Vector (vector.X / scalar, vector.Y / scalar); } public static double Multiply (Vector vector1, Vector vector2) { return vector1.X * vector2.X + vector1.Y * vector2.Y; } public static Vector Multiply (Vector vector, Matrix matrix) { return new Vector (vector.X * matrix.M11 + vector.Y * matrix.M21, vector.X * matrix.M12 + vector.Y * matrix.M22); } public static Vector Multiply (double scalar, Vector vector) { return new Vector (scalar * vector.X, scalar * vector.Y); } public static Vector Multiply (Vector vector, double scalar) { return new Vector (scalar * vector.X, scalar * vector.Y); } public void Negate () { x = -x; y = -y; } public void Normalize () { double ls = LengthSquared; if (ls == 1) return; double l = Math.Sqrt (ls); x /= l; y /= l; } public static Vector Subtract (Vector vector1, Vector vector2) { return new Vector (vector1.X - vector2.X, vector1.Y - vector2.Y); } public static Vector Parse (string source) { throw new NotImplementedException (); } public override string ToString () { return String.Format ("{0},{1}", x, y); } public string ToString (IFormatProvider provider) { throw new NotImplementedException (); } public double Length { get { return Math.Sqrt (LengthSquared); } } public double LengthSquared { get { return x * x + y * y; } } public double X { get { return x; } set { x = value; } } public double Y { get { return y; } set { y = value; } } /* operators */ public static explicit operator Point (Vector vector) { return new Point (vector.X, vector.Y); } public static explicit operator Size (Vector vector) { return new Size (vector.X, vector.Y); } public static Vector operator - (Vector vector1, Vector vector2) { return Subtract (vector1, vector2); } public static Vector operator - (Vector vector) { Vector result = vector; result.Negate (); return result; } public static bool operator != (Vector vector1, Vector vector2) { return !Equals (vector1, vector2); } public static bool operator == (Vector vector1, Vector vector2) { return Equals (vector1, vector2); } public static double operator * (Vector vector1, Vector vector2) { return Multiply (vector1, vector2); } public static Vector operator * (Vector vector, Matrix matrix) { return Multiply (vector, matrix); } public static Vector operator * (double scalar, Vector vector) { return Multiply (scalar, vector); } public static Vector operator * (Vector vector, double scalar) { return Multiply (vector, scalar); } public static Vector operator / (Vector vector, double scalar) { return Divide (vector, scalar); } public static Point operator + (Vector vector, Point point) { return Add (vector, point); } public static Vector operator + (Vector vector1, Vector vector2) { return Add (vector1, vector2); } double x; double y; } } mono-uia-2.1/WindowsBase/System.Windows/Rect.cs0000644000016200001670000002344411433571545022364 0ustar00hudsonhudson00000000000000// 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. // // Copyright (c) 2007 Novell, Inc. (http://www.novell.com) // // Authors: // Chris Toshok // Sebastien Pouliot // using System; //using System.ComponentModel; using System.Globalization; //using System.Windows.Converters; //using System.Windows.Markup; using System.Windows.Media; namespace System.Windows { [Serializable] //[ValueSerializer (typeof (RectValueSerializer))] //[TypeConverter (typeof (RectConverter))] public struct Rect : IFormattable { public Rect (Size size) { x = y = 0.0; width = size.Width; height = size.Height; } public Rect (Point point, Vector vector) : this (point, Point.Add (point, vector)) { } public Rect (Point point1, Point point2) { if (point1.X < point2.X) { x = point1.X; width = point2.X - point1.X; } else { x = point2.X; width = point1.X - point2.X; } if (point1.Y < point2.Y) { y = point1.Y; height = point2.Y - point1.Y; } else { y = point2.Y; height = point1.Y - point2.Y; } } public Rect (double x, double y, double width, double height) { if (width < 0 || height < 0) throw new ArgumentException ("width and height must be non-negative."); this.x = x; this.y = y; this.width = width; this.height = height; } public Rect (Point location, Size size) { x = location.X; y = location.Y; width = size.Width; height = size.Height; } public bool Equals (Rect rect) { return (x == rect.X && y == rect.Y && width == rect.Width && height == rect.Height); } public static bool operator != (Rect rect1, Rect rect2) { return !(rect1.Location == rect2.Location && rect1.Size == rect2.Size); } public static bool operator == (Rect rect1, Rect rect2) { return rect1.Location == rect2.Location && rect1.Size == rect2.Size; } public override bool Equals (object o) { if (!(o is Rect)) return false; return Equals ((Rect)o); } public static bool Equals (Rect rect1, Rect rect2) { return rect1.Equals (rect2); } public override int GetHashCode () { throw new NotImplementedException (); } public bool Contains (Rect rect) { if (rect.Left < this.Left || rect.Right > this.Right) return false; if (rect.Top < this.Top || rect.Bottom > this.Bottom) return false; return true; } public bool Contains (double x, double y) { if (x < Left || x > Right) return false; if (y < Top || y > Bottom) return false; return true; } public bool Contains (Point p) { return Contains (p.X, p.Y); } public static Rect Inflate (Rect rect, double width, double height) { if (width < rect.Width * -2) return Rect.Empty; if (height < rect.Height * -2) return Rect.Empty; Rect result = rect; result.Inflate (width, height); return result; } public static Rect Inflate (Rect rect, Size size) { return Rect.Inflate (rect, size.Width, size.Height); } public void Inflate (double width, double height) { // XXX any error checking like in the static case? x -= width; y -= height; this.width += 2*width; this.height += 2*height; } public void Inflate (Size size) { Inflate (size.Width, size.Height); } public bool IntersectsWith(Rect rect) { return !((Left >= rect.Right) || (Right <= rect.Left) || (Top >= rect.Bottom) || (Bottom <= rect.Top)); } public void Intersect(Rect rect) { double _x = Math.Max (x, rect.x); double _y = Math.Max (y, rect.y); double _width = Math.Min (Right, rect.Right) - _x; double _height = Math.Min (Bottom, rect.Bottom) - _y; if (_width < 0 || _height < 0) { x = y = Double.PositiveInfinity; width = height = Double.NegativeInfinity; } else { x = _x; y = _y; width = _width; height = _height; } } public static Rect Intersect(Rect rect1, Rect rect2) { Rect result = rect1; result.Intersect (rect2); return result; } public void Offset(double offsetX, double offsetY) { x += offsetX; y += offsetY; } public static Rect Offset(Rect rect, double offsetX, double offsetY) { Rect result = rect; result.Offset (offsetX, offsetY); return result; } public void Offset (Vector offsetVector) { x += offsetVector.X; y += offsetVector.Y; } public static Rect Offset (Rect rect, Vector offsetVector) { Rect result = rect; result.Offset (offsetVector); return result; } public void Scale(double scaleX, double scaleY) { x *= scaleX; y *= scaleY; width *= scaleX; height *= scaleY; } public void Transform (Matrix matrix) { throw new NotImplementedException (); } public static Rect Transform (Rect rect, Matrix matrix) { Rect result = rect; result.Transform (matrix); return result; } public static Rect Union(Rect rect1, Rect rect2) { Rect result = rect1; result.Union (rect2); return result; } public static Rect Union(Rect rect, Point point) { Rect result = rect; result.Union (point); return result; } public void Union(Rect rect) { x = Math.Min (x, rect.x); y = Math.Min (y, rect.y); width = Math.Max (Right, rect.Right) - x; height = Math.Max (Bottom, rect.Bottom) - y; } public void Union(Point point) { Union (new Rect (point, point)); } public static Rect Parse (string source) { throw new NotImplementedException (); } public override string ToString () { return ToString (null); } public string ToString (IFormatProvider provider) { return ToString (null, provider); } string IFormattable.ToString (string format, IFormatProvider provider) { return ToString (format, provider); } private string ToString (string format, IFormatProvider provider) { if (IsEmpty) return "Empty"; if (provider == null) provider = CultureInfo.CurrentCulture; if (format == null) format = string.Empty; string separator = ","; NumberFormatInfo numberFormat = provider.GetFormat (typeof (NumberFormatInfo)) as NumberFormatInfo; if (numberFormat != null && numberFormat.NumberDecimalSeparator == separator) separator = ";"; string rectFormat = String.Format ( "{{0:{0}}}{1}{{1:{0}}}{1}{{2:{0}}}{1}{{3:{0}}}", format, separator); return String.Format (provider, rectFormat, x, y, width, height); } public static Rect Empty { get { Rect r = new Rect (); r.x = r.y = Double.PositiveInfinity; r.width = r.height = Double.NegativeInfinity; return r; } } public bool IsEmpty { get { return (x == Double.PositiveInfinity && y == Double.PositiveInfinity && width == Double.NegativeInfinity && height == Double.NegativeInfinity); } } public Point Location { get { return new Point (x, y); } set { if (IsEmpty) throw new InvalidOperationException ("Cannot modify this property on the Empty Rect."); x = value.X; y = value.Y; } } public Size Size { get { if (IsEmpty) return Size.Empty; return new Size (width, height); } set { if (IsEmpty) throw new InvalidOperationException ("Cannot modify this property on the Empty Rect."); width = value.Width; height = value.Height; } } public double X { get { return x; } set { if (IsEmpty) throw new InvalidOperationException ("Cannot modify this property on the Empty Rect."); x = value; } } public double Y { get { return y; } set { if (IsEmpty) throw new InvalidOperationException ("Cannot modify this property on the Empty Rect."); y = value; } } public double Width { get { return width; } set { if (IsEmpty) throw new InvalidOperationException ("Cannot modify this property on the Empty Rect."); if (value < 0) throw new ArgumentException ("width must be non-negative."); width = value; } } public double Height { get { return height; } set { if (IsEmpty) throw new InvalidOperationException ("Cannot modify this property on the Empty Rect."); if (value < 0) throw new ArgumentException ("height must be non-negative."); height = value; } } public double Left { get { return x; } } public double Top { get { return y; } } public double Right { get { return x + width; } } public double Bottom { get { return y + height; } } public Point TopLeft { get { return new Point (Left, Top); } } public Point TopRight { get { return new Point (Right, Top); } } public Point BottomLeft { get { return new Point (Left, Bottom); } } public Point BottomRight { get { return new Point (Right, Bottom); } } double x; double y; double width; double height; } } mono-uia-2.1/WindowsBase/Makefile.in0000644000016200001670000005115211433571551020262 0ustar00hudsonhudson00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : DIST_COMMON = $(srcdir)/AssemblyInfo.cs.in $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/Makefile.include subdir = WindowsBase ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = AssemblyInfo.cs CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(linuxpkgconfigdir)" SCRIPTS = $(bin_SCRIPTS) SOURCES = DIST_SOURCES = DATA = $(linuxpkgconfig_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ GACUTIL = @GACUTIL@ GLIB_SHARP_20_CFLAGS = @GLIB_SHARP_20_CFLAGS@ GLIB_SHARP_20_LIBS = @GLIB_SHARP_20_LIBS@ GMCS = @GMCS@ GTK_SHARP_20_CFLAGS = @GTK_SHARP_20_CFLAGS@ GTK_SHARP_20_LIBS = @GTK_SHARP_20_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MONO = @MONO@ MONO_CFLAGS = @MONO_CFLAGS@ MONO_LIBS = @MONO_LIBS@ NUNIT_CFLAGS = @NUNIT_CFLAGS@ NUNIT_LIBS = @NUNIT_LIBS@ NUNIT_PATH = @NUNIT_PATH@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SN = @SN@ STRIP = @STRIP@ VERSION = @VERSION@ WINDOWSBASE_LIBS = @WINDOWSBASE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ expanded_bindir = @expanded_bindir@ expanded_datadir = @expanded_datadir@ expanded_libdir = @expanded_libdir@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = $(build_sources) $(build_resx_files) \ $(build_others_files) $(ASSEMBLY_WRAPPER_IN) $(EXTRAS) \ $(DATA_FILES) $(build_culture_res_files) ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_FLAGS = -lib:@expanded_libdir@/mono/2.0 -noconfig -codepage:utf8 -warn:4 -warnaserror -optimize+ -debug "-define:DEBUG" -d:NET_2_0 ASSEMBLY = ../bin/WindowsBase.dll ASSEMBLY_MDB = $(ASSEMBLY).mdb COMPILE_TARGET = library PROJECT_REFERENCES = BUILD_DIR = ../bin PACKAGE_FLAG = /package 2.0 WINDOWSBASE_DLL_MDB_SOURCE = $(BUILD_DIR)/WindowsBase.dll.mdb WINDOWSBASE_DLL_MDB = $(BUILD_DIR)/WindowsBase.dll.mdb AL = al2 SATELLITE_ASSEMBLY_NAME = PROGRAMFILES = \ $(WINDOWSBASE_DLL_MDB) RESGEN = resgen2 FILES = \ AssemblyInfo.cs \ ../build/common/*.cs \ System.Windows/Point.cs \ System.Windows/Rect.cs \ System.Windows/Size.cs \ System.Windows/Vector.cs \ System.Windows.Media/Matrix.cs DATA_FILES = RESOURCES = REFERENCES = \ System DLL_REFERENCES = CLEANFILES = $(PROGRAMFILES) $(ASSEMBLY) $(ASSEMBLY).mdb $(BINARIES) \ $(build_resx_resources) $(build_satellite_assembly_list) VALID_CULTURES = ar bg ca zh-CHS cs da de el en es fi fr he hu is it ja ko nl no pl pt ro ru hr sk sq sv th tr id uk be sl et lv lt fa vi hy eu mk af fo hi sw gu ta te kn mr gl kok ar-SA bg-BG ca-ES zh-TW cs-CZ da-DK de-DE el-GR en-US fi-FI fr-FR he-IL hu-HU is-IS it-IT ja-JP ko-KR nl-NL nb-NO pl-PL pt-BR ro-RO ru-RU hr-HR sk-SK sq-AL sv-SE th-TH tr-TR id-ID uk-UA be-BY sl-SI et-EE lv-LV lt-LT fa-IR vi-VN hy-AM eu-ES mk-MK af-ZA fo-FO hi-IN sw-KE gu-IN ta-IN te-IN kn-IN mr-IN gl-ES kok-IN ar-IQ zh-CN de-CH en-GB es-MX fr-BE it-CH nl-BE nn-NO pt-PT sv-FI ar-EG zh-HK de-AT en-AU es-ES fr-CA ar-LY zh-SG de-LU en-CA es-GT fr-CH ar-DZ zh-MO en-NZ es-CR fr-LU ar-MA en-IE es-PA ar-TN en-ZA es-DO ar-OM es-VE ar-YE es-CO ar-SY es-PE ar-JO es-AR ar-LB en-ZW es-EC ar-KW en-PH es-CL ar-AE es-UY ar-BH es-PY ar-QA es-BO es-SV es-HN es-NI es-PR zh-CHT s2q = $(subst \ ,?,$1) q2s = $(subst ?,\ ,$1) # use this when result will be quoted unesc2 = $(subst ?, ,$1) build_sources = $(FILES) $(GENERATED_FILES) build_sources_esc = $(call s2q,$(build_sources)) # use unesc2, as build_sources_embed is quoted build_sources_embed = $(call unesc2,$(build_sources_esc:%='$(srcdir)/%')) comma__ = , get_resource_name = $(firstword $(subst $(comma__), ,$1)) get_culture = $(lastword $(subst ., ,$(basename $1))) is_cultured_resource = $(and $(word 3,$(subst ., ,$1)), $(filter $(VALID_CULTURES),$(lastword $(subst ., ,$(basename $1))))) RESOURCES_ESC = $(call s2q,$(RESOURCES)) build_resx_list = $(foreach res, $(RESOURCES_ESC), $(if $(filter %.resx, $(call get_resource_name,$(res))),$(res),)) build_non_culture_resx_list = $(foreach res, $(build_resx_list),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) build_non_culture_others_list = $(foreach res, $(filter-out $(build_resx_list),$(RESOURCES_ESC)),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) build_others_list = $(build_non_culture_others_list) build_xamlg_list = $(filter %.xaml.g.cs, $(FILES)) # resgen all .resx resources build_resx_files = $(foreach res, $(build_resx_list), $(call get_resource_name,$(res))) build_resx_resources_esc = $(build_resx_files:.resx=.resources) build_resx_resources = $(call q2s,$(build_resx_resources_esc)) # embed resources for the main assembly build_resx_resources_hack = $(subst .resx,.resources, $(build_non_culture_resx_list)) # use unesc2, as build_resx_resources_embed is quoted build_resx_resources_embed = $(call unesc2,$(build_resx_resources_hack:%='-resource:%')) build_others_files = $(call q2s,$(foreach res, $(build_others_list),$(call get_resource_name,$(res)))) build_others_resources = $(build_others_files) # use unesc2, as build_others_resources_embed is quoted build_others_resources_embed = $(call unesc2,$(build_others_list:%='-resource:$(srcdir)/%')) build_resources = $(build_resx_resources) $(build_others_resources) build_resources_embed = $(build_resx_resources_embed) $(build_others_resources_embed) # -usesourcepath is available only for resgen2 emit_resgen_target_1 = $(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); cd '$$(shell dirname '$$<')' && $$(RESGEN) '$$(shell basename '$$<')' '$$(shell basename '$$@')' emit_resgen_target_2 = $(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); $$(RESGEN) -usesourcepath '$$<' '$$@' emit_resgen_target = $(if $(filter resgen2,$(RESGEN)),$(emit_resgen_target_2),$(emit_resgen_target_1)) emit_resgen_targets = $(foreach res,$(build_resx_resources_esc),$(eval $(call emit_resgen_target,$(res)))) build_references_ref = $(call q2s,$(foreach ref, $(call \ s2q,$(REFERENCES)), $(if $(filter -pkg:%, $(ref)), $(ref), \ $(if $(filter -r:%, $(ref)), $(ref), -r:$(ref))))) $(call \ q2s,$(foreach ref, $(call s2q,$(DLL_REFERENCES)), -r:$(ref))) \ $(call q2s,$(foreach ref, $(call s2q,$(PROJECT_REFERENCES)), \ -r:$(ref))) s2q2s = $(call unesc2,$(call s2q,$1)) cp_actual = test -z $1 || cp $1 $2 cp = $(call cp_actual,'$(call s2q2s,$1)','$(call s2q2s,$2)') rm_actual = test -z '$1' || rm -f '$2' rm = $(call rm_actual,$(call s2q2s,$1),$(call s2q2s,$2)/$(shell basename '$(call s2q2s,$1)')) DISTCLEANFILES = $(GENERATED_FILES) $(pc_files) $(BUILD_DIR)/* #pkglib_SCRIPTS = $(ASSEMBLY) bin_SCRIPTS = $(BINARIES) #programfilesdir = @libdir@/@PACKAGE@ #programfiles_DATA = $(PROGRAMFILES) linuxpkgconfigdir = @libdir@/pkgconfig linuxpkgconfig_DATA = $(LINUX_PKGCONFIG) # generating satellite assemblies culture_resources = $(foreach res, $(RESOURCES_ESC), $(if $(call is_cultured_resource,$(call get_resource_name, $(res))),$(res))) cultures = $(sort $(foreach res, $(culture_resources), $(call get_culture,$(call get_resource_name,$(res))))) culture_resource_dependencies = $(call q2s,$(BUILD_DIR)/$1/$(SATELLITE_ASSEMBLY_NAME): $(subst .resx,.resources,$2)) culture_resource_commandlines = $(call unesc2,cmd_line_satellite_$1 += '/embed:$(subst .resx,.resources,$2)') build_satellite_assembly_list = $(call q2s,$(cultures:%=$(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME))) build_culture_res_files = $(call q2s,$(foreach res, $(culture_resources),$(call get_resource_name,$(res)))) GACROOT = $(DESTDIR)$(prefix)/lib all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.include $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign WindowsBase/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign WindowsBase/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): AssemblyInfo.cs: $(top_builddir)/config.status $(srcdir)/AssemblyInfo.cs.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files install-linuxpkgconfigDATA: $(linuxpkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(linuxpkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(linuxpkgconfigdir)" @list='$(linuxpkgconfig_DATA)'; test -n "$(linuxpkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(linuxpkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(linuxpkgconfigdir)" || exit $$?; \ done uninstall-linuxpkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(linuxpkgconfig_DATA)'; test -n "$(linuxpkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(linuxpkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(linuxpkgconfigdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) $(DATA) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(linuxpkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-linuxpkgconfigDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-linuxpkgconfigDATA \ uninstall-local .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-binSCRIPTS install-data \ install-data-am install-data-local install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-linuxpkgconfigDATA \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-binSCRIPTS uninstall-linuxpkgconfigDATA \ uninstall-local all: $(ASSEMBLY) $(PROGRAMFILES) install-data-local: gac-install uninstall-local: gac-uninstall # macros # $(call emit-deploy-target,deploy-variable-name) define emit-deploy-target $($1): $($1_SOURCE) mkdir -p '$$(shell dirname '$$@')' cp '$$<' '$$@' endef # $(call emit-deploy-wrapper,wrapper-variable-name,wrapper-sourcefile,x) # assumes that for a wrapper foo.pc its source template is foo.pc.in # if $3 is non-empty then wrapper is marked exec define emit-deploy-wrapper $($1): $2 mkdir -p '$$(shell dirname '$$@')' cp '$$<' '$$@' $(if $3,chmod +x '$$@') endef $(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_dependencies,$(call get_culture,$(call get_resource_name,$(res))),$(call get_resource_name,$(res)))))) $(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_commandlines,$(call get_culture,$(call get_resource_name,$(res))),$(res))))) $(build_satellite_assembly_list): $(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME): mkdir -p '$(@D)' $(AL) -out:'$@' -culture:$* -t:lib $(cmd_line_satellite_$*) gac-install: $(POLICY_ASSEMBLIES) $(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS) /root $(GACROOT) $(PACKAGE_FLAG) || exit 1; gac-uninstall: $(GACUTIL) /us $(ASSEMBLY) $(GACUTIL_FLAGS) /root $(GACROOT) $(PACKAGE_FLAG) || exit 1; $(eval $(call emit_resgen_targets)) $(build_xamlg_list): %.xaml.g.cs: %.xaml xamlg '$<' $(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list) mkdir -p $(shell dirname $(ASSEMBLY)) $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) sn -q -R $(ASSEMBLY) $(top_srcdir)/mono.snk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: mono-uia-2.1/aclocal.m40000644000016200001670000007037511433571547015645 0ustar00hudsonhudson00000000000000# generated automatically by aclocal 1.11 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, [m4_warning([this file was generated for autoconf 2.63. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program 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 # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([expansions.m4]) mono-uia-2.1/COPYING0000644000016200001670000000212611433571545015023 0ustar00hudsonhudson00000000000000Copyright (c) 2008 Novell, Inc. and the individuals listed on the ChangeLog entries. 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.