From 9c82ac0620640de4c545d527406529a7f234f324 Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Sat, 10 Dec 2005 06:00:03 +0000 Subject: [PATCH] 2005-12-10 Mike Kestner * gdk/gdk-symbols.xml : add GrabBroken mapping. * gdk/Event.cs : add GrabBroken to GetEvent. * gdk/EventGrabBroken.cs : manual Event subclass. * gdk/Gdk.metadata : hide new GrabBroken event. * gdk/Makefile.am : add new source file. svn path=/trunk/gtk-sharp/; revision=54186 --- ChangeLog | 8 ++++ doc/en/Gdk/EventGrabBroken.xml | 78 +++++++++++++++++++++++++++++++++ doc/en/Gtk/CellRendererText.xml | 2 +- doc/en/Gtk/EntryCompletion.xml | 6 ++- doc/en/Gtk/FileChooser.xml | 3 +- doc/en/Gtk/Window.xml | 3 +- gdk/Event.cs | 4 ++ gdk/EventGrabBroken.cs | 67 ++++++++++++++++++++++++++++ gdk/Gdk.metadata | 1 + gdk/Makefile.am | 1 + gdk/gdk-symbols.xml | 1 + 11 files changed, 169 insertions(+), 5 deletions(-) create mode 100644 doc/en/Gdk/EventGrabBroken.xml create mode 100644 gdk/EventGrabBroken.cs diff --git a/ChangeLog b/ChangeLog index 5b471fc1d..3fc13af14 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-12-10 Mike Kestner + + * gdk/gdk-symbols.xml : add GrabBroken mapping. + * gdk/Event.cs : add GrabBroken to GetEvent. + * gdk/EventGrabBroken.cs : manual Event subclass. + * gdk/Gdk.metadata : hide new GrabBroken event. + * gdk/Makefile.am : add new source file. + 2005-12-09 Mike Kestner * pango/Pango.metadata : 2.8 API tweaks diff --git a/doc/en/Gdk/EventGrabBroken.xml b/doc/en/Gdk/EventGrabBroken.xml new file mode 100644 index 000000000..29fe64c49 --- /dev/null +++ b/doc/en/Gdk/EventGrabBroken.xml @@ -0,0 +1,78 @@ + + + + gdk-sharp + 2.8.0.0 + + + Gdk.Event + + + + + + Property + + Gdk.Window + + + The event window. + a . + + + + + + Property + + Gdk.Window + + + The Window which broke the grab. + a , or . + If the window which broke the grab is outside the application, the value will be . + + + + + Constructor + + + + + Native struct pointer. + Internal constructor. + This constructor is exposed for binding use and should not be used by application code. + + + + + Property + + System.Boolean + + + Indicates a keyboard grab. + for a keyboard grab or for mouse. + + + + + + Property + + System.Boolean + + + Indicates if the broken grab was implicit. + for an implicit grab. + + + + + + Indicates a grab was broken by another grab. + + + + diff --git a/doc/en/Gtk/CellRendererText.xml b/doc/en/Gtk/CellRendererText.xml index 3ab938d52..3ccf24881 100644 --- a/doc/en/Gtk/CellRendererText.xml +++ b/doc/en/Gtk/CellRendererText.xml @@ -615,7 +615,7 @@ The width at which text is wrapped. - a width >= -1, where -1 denotes no wrapping. + a width >= -1, where -1 denotes no wrapping. diff --git a/doc/en/Gtk/EntryCompletion.xml b/doc/en/Gtk/EntryCompletion.xml index 149da9542..4a091b75b 100644 --- a/doc/en/Gtk/EntryCompletion.xml +++ b/doc/en/Gtk/EntryCompletion.xml @@ -631,7 +631,8 @@ public class DemoEntryCompletion : Window Controls if popup is displayed on a single match. - if popup is displayed on single matches. + + if popup is displayed on single matches. Set this to for inline completion. @@ -649,7 +650,8 @@ public class DemoEntryCompletion : Window Controls if the popup is sized to the same width as the entry. - if popup size is same as entry size. + + if popup size is same as entry size. diff --git a/doc/en/Gtk/FileChooser.xml b/doc/en/Gtk/FileChooser.xml index 96def6e08..aff3fe962 100644 --- a/doc/en/Gtk/FileChooser.xml +++ b/doc/en/Gtk/FileChooser.xml @@ -806,7 +806,8 @@ Controls if Overwrite Confirmation is performed. - to perform overwrite confirmations. + + to perform overwrite confirmations. When this property is set, the implementation will raise any time the chooser is in Save mode and an existing file is selected. diff --git a/doc/en/Gtk/Window.xml b/doc/en/Gtk/Window.xml index 6c2e45f17..6f0c39ba9 100644 --- a/doc/en/Gtk/Window.xml +++ b/doc/en/Gtk/Window.xml @@ -1940,7 +1940,8 @@ Sometimes when you think you want to use allow_shrink, the real problem is that Urgency Hint. - if the hint should be set on the window. + + if the hint should be set on the window. This hint notifies the desktop environment to draw the user's attention to the window for urgent action. diff --git a/gdk/Event.cs b/gdk/Event.cs index b67c56a75..d090cfc0c 100644 --- a/gdk/Event.cs +++ b/gdk/Event.cs @@ -128,6 +128,10 @@ namespace Gdk { return new EventWindowState (raw); case EventType.Setting: return new EventSetting (raw); +#if GTK_SHARP_2_8 + case EventType.GrabBroken: + return new EventGrabBroken (raw); +#endif case EventType.Map: case EventType.Unmap: case EventType.NoExpose: diff --git a/gdk/EventGrabBroken.cs b/gdk/EventGrabBroken.cs new file mode 100644 index 000000000..b1d6cc754 --- /dev/null +++ b/gdk/EventGrabBroken.cs @@ -0,0 +1,67 @@ +// Gdk.EventGrabBroken.cs - Custom GrabBroken event wrapper +// +// Author: Mike Kestner +// +// Copyright (c) 2005 Novell, Inc. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of version 2 of the Lesser GNU General +// Public License as published by the Free Software Foundation. +// +// 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 +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + + +#if GTK_SHARP_2_8 +namespace Gdk { + + using System; + using System.Runtime.InteropServices; + + public class EventGrabBroken : Event { + + [StructLayout(LayoutKind.Sequential)] + struct NativeEventGrabBroken { + EventType type; + IntPtr window; + sbyte send_event; + public bool Keyboard; + public bool Implicit; + public IntPtr GrabWindowHandle; + } + + NativeEventGrabBroken native_struct; + + public EventGrabBroken (IntPtr raw) : base (raw) + { + native_struct = (NativeEventGrabBroken) Marshal.PtrToStructure (raw, typeof (NativeEventGrabBroken)); + } + + public bool Keyboard { + get { + return native_struct.Keyboard; + } + } + + public bool Implicit { + get { + return native_struct.Implicit; + } + } + + public Window GrabWindow { + get { + return GLib.Object.GetObject(native_struct.GrabWindowHandle) as Window; + } + } + } +} +#endif + diff --git a/gdk/Gdk.metadata b/gdk/Gdk.metadata index 9a9afa264..48dbe29b4 100644 --- a/gdk/Gdk.metadata +++ b/gdk/Gdk.metadata @@ -155,6 +155,7 @@ 1 1 1 + 1 1 1 1 diff --git a/gdk/Makefile.am b/gdk/Makefile.am index 3f5918414..21bcae3eb 100644 --- a/gdk/Makefile.am +++ b/gdk/Makefile.am @@ -16,6 +16,7 @@ sources = \ EventDND.cs \ EventExpose.cs \ EventFocus.cs \ + EventGrabBroken.cs \ EventKey.cs \ EventMotion.cs \ EventProperty.cs \ diff --git a/gdk/gdk-symbols.xml b/gdk/gdk-symbols.xml index 063e47aca..a97dacf04 100644 --- a/gdk/gdk-symbols.xml +++ b/gdk/gdk-symbols.xml @@ -10,6 +10,7 @@ +