当前位置: 首页>>代码示例>>C#>>正文


C# Atk类代码示例

本文整理汇总了C#中Atk的典型用法代码示例。如果您正苦于以下问题:C# Atk类的具体用法?C# Atk怎么用?C# Atk使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Atk类属于命名空间,在下文中一共展示了Atk类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RefAccessibleAtPoint

		public Atk.Object RefAccessibleAtPoint (int x, int y, Atk.CoordType coord_type)
		{
			Console.WriteLine("RefAccessibleAtPoint({0},{1})", x, y);
			//this is still not implemented, but better to return null to prevent crash
			//throw new System.NotImplementedException();
			return null;
		}
开发者ID:mono,项目名称:uia2atk,代码行数:7,代码来源:HelloChild.cs

示例2: GetPosition

		public void GetPosition (out int x, out int y, Atk.CoordType coordType)
		{
			x = (int)resource.BoundingRectangle.X;
			y = (int)resource.BoundingRectangle.Y;
			if (coordType == Atk.CoordType.Window)
				resource.ConvertCoords (ref x, ref y, false);
		}
开发者ID:mono,项目名称:uia2atk,代码行数:7,代码来源:ComponentImplementorHelper.cs

示例3: NotifyStateChange

		internal new void NotifyStateChange (Atk.StateType state, bool val)
		{
			GLib.Timeout.Add (0, new GLib.TimeoutHandler (delegate {
				base.NotifyStateChange (state, val);
				return false;
			}));
		}
开发者ID:mono,项目名称:uia2atk,代码行数:7,代码来源:Adapter.cs

示例4: OnRefStateSet

		public override void OnRefStateSet (ref Atk.StateSet states)
		{
			IExpandCollapseProvider expandCollapse
				= peer.GetPattern (PatternInterface.ExpandCollapse)
					as IExpandCollapseProvider;
			if (expandCollapse != null) {
				var state = expandCollapse.ExpandCollapseState;

				// If it's not a leaf, it can be expanded
				if (state != ExpandCollapseState.LeafNode)
					states.AddState (Atk.StateType.Expandable);

				if (state == ExpandCollapseState.Expanded
				    || state == ExpandCollapseState.PartiallyExpanded)
					states.AddState (Atk.StateType.Expanded);
				else
					states.RemoveState (Atk.StateType.Expanded);
			}

			IToggleProvider toggle
				= peer.GetPattern (PatternInterface.Toggle)
					as IToggleProvider;
			if (toggle != null) {
				states.RemoveState (Atk.StateType.Checked);
				states.RemoveState (Atk.StateType.Indeterminate);

				var state = toggle.ToggleState;
				if (state == ToggleState.On)
					states.AddState (Atk.StateType.Checked);
				else if (state == ToggleState.Indeterminate)
					states.AddState (Atk.StateType.Indeterminate);
			}
		}
开发者ID:mono,项目名称:uia2atk,代码行数:33,代码来源:ExpandCollapseInvokeToggle.cs

示例5: EditableTextImplementorHelper

		public EditableTextImplementorHelper (Adapter adapter, Atk.ITextImplementor textImplementor, ITextImplementor textExpert)
		{
			this.adapter = adapter;

			valueProvider 
				= adapter.Provider.GetPatternProvider (ValuePatternIdentifiers.Pattern.Id)
					as IValueProvider;

			this.textExpert = textExpert;

			if (valueProvider != null)
				editable = !valueProvider.IsReadOnly;

			insertDeleteProvider
				= adapter.Provider.GetPatternProvider (InsertDeleteTextPatternIdentifiers.Pattern.Id)
					as IInsertDeleteTextProvider;

			oldText = textExpert.Text;

			ClipboardProvider
				= adapter.Provider.GetPatternProvider (ClipboardPatternIdentifiers.Pattern.Id)
					as IClipboardProvider;

			// We are keeping a private caret reference to validate the change
			// of value
			caretProvider
				= adapter.Provider.GetPatternProvider (CaretPatternIdentifiers.Pattern.Id)
					as ICaretProvider;
			caretOffset = (caretProvider != null ? caretProvider.CaretOffset : textExpert.Length);

			RefreshEditable ();
		}
开发者ID:mono,项目名称:uia2atk,代码行数:32,代码来源:EditableTextImplementorHelper.cs

示例6: InvokeNative

		void InvokeNative (Atk.Object arg1, Atk.PropertyValues arg2)
		{
			IntPtr native_arg2 = GLib.Marshaller.StructureToPtrAlloc (arg2);
			native_cb (arg1 == null ? IntPtr.Zero : arg1.Handle, native_arg2);
			arg2 = Atk.PropertyValues.New (native_arg2);
			Marshal.FreeHGlobal (native_arg2);
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:7,代码来源:AtkSharp.PropertyChangeHandlerNative.cs

示例7: OnSetParent

		protected override void OnSetParent (Atk.Object parent)
		{
			// Allow the web browser's plugin host to set our
			// parent
			this.parent = parent;

			DynamicAdapterFactory.Instance.MarkExternalReference (this.parent);
		}
开发者ID:mono,项目名称:uia2atk,代码行数:8,代码来源:RootVisualAdapter.cs

示例8: RemoveChild

		internal override void RemoveChild (Atk.Object childToRemove)
		{
			RadioButton rad = childToRemove as RadioButton;
			if (rad != null)
				RadioButtons.Remove (rad);

			base.RemoveChild (childToRemove);
		}
开发者ID:mono,项目名称:uia2atk,代码行数:8,代码来源:ComponentParentAdapter.cs

示例9: InvokeNative

		int InvokeNative (Atk.KeyEventStruct evnt)
		{
			IntPtr native_evnt = GLib.Marshaller.StructureToPtrAlloc (evnt);
			int __result = native_cb (native_evnt, __data);
			evnt = Atk.KeyEventStruct.New (native_evnt);
			Marshal.FreeHGlobal (native_evnt);
			return __result;
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:8,代码来源:AtkSharp.KeySnoopFuncNative.cs

示例10: ExpectEvents

		protected void ExpectEvents (int count, Atk.Role role, string evType)
		{
			if (events == null)
				events = EventMonitor.Pause ();
			EventCollection evs = events.FindByRole (role).FindByType (evType);
			string eventsInXml = String.Format (" events in XML: {0}", Environment.NewLine + events.OriginalGrossXml);
			Assert.AreEqual (count, evs.Count, "bad number of " + evType + " events: " + eventsInXml);
		}
开发者ID:mono,项目名称:uia2atk,代码行数:8,代码来源:TestBase.cs

示例11: GetExtents

        public void GetExtents(out int x, out int y, out int w, out int h, Atk.CoordType coordType)
        {
            Gdk.Rectangle rectangle = cell_parent.GetCellExtents(this, coordType);

            x = rectangle.X;
            y = rectangle.Y;
            w = rectangle.Width;
            h = rectangle.Height;
        }
开发者ID:GNOME,项目名称:hyena,代码行数:9,代码来源:ColumnCellAccessible.cs

示例12: GetExtents

		public void GetExtents (out int x, out int y, out int width, out int height, Atk.CoordType coord_type)
		{
			//coord_type specifies to which concept the coords are relative to
			Console.WriteLine("GetExtents");
			x = 30;
			y = 40;
			width = 300;
			height = 400;
		}
开发者ID:mono,项目名称:uia2atk,代码行数:9,代码来源:HelloChild.cs

示例13: AddFocusHandler

		public virtual uint AddFocusHandler (Atk.FocusHandler handler)
		{
			if (focusHandlers.ContainsValue(handler))
				return 0;
			
			lastFocusHandlerId++;
			focusHandlers[lastFocusHandlerId] = handler;
			return lastFocusHandlerId;
		}
开发者ID:mono,项目名称:uia2atk,代码行数:9,代码来源:ComponentImplementorHelper.cs

示例14: GetExtents

		public void GetExtents (out int x, out int y, out int width, out int height, Atk.CoordType coordType)
		{
			x = int.MinValue;
			y = int.MinValue;
			if (resource.RefStateSet ().ContainsState (Atk.StateType.Showing))
				GetPosition (out x, out y, coordType);
			width = (int)resource.BoundingRectangle.Width;
			height = (int)resource.BoundingRectangle.Height;
		}
开发者ID:mono,项目名称:uia2atk,代码行数:9,代码来源:ComponentImplementorHelper.cs

示例15: AddOneChild

		internal override void AddOneChild (Atk.Object child)
		{
			base.AddOneChild (child);

			RadioButton rad = child as RadioButton;
			if (rad == null)
				return;

			RadioButtons.Add (rad);
		}
开发者ID:mono,项目名称:uia2atk,代码行数:10,代码来源:ComponentParentAdapter.cs


注:本文中的Atk类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。