static GtkScrollbarClass GetClassStruct (GLib.GType gtype, bool use_cache) { if (class_structs == null) class_structs = new Dictionary<GLib.GType, GtkScrollbarClass> (); if (use_cache && class_structs.ContainsKey (gtype)) return class_structs [gtype]; else { IntPtr class_ptr = new IntPtr (gtype.GetClassPtr ().ToInt64 () + class_offset); GtkScrollbarClass class_struct = (GtkScrollbarClass) Marshal.PtrToStructure (class_ptr, typeof (GtkScrollbarClass)); if (use_cache) class_structs.Add (gtype, class_struct); return class_struct; } }
static void OverrideInsert (GLib.GType gtype, InsertNativeDelegate callback) { gtksharp_menushell_override_insert (gtype.GetClassPtr (), callback); }
static GstMiniObjectClass GetClassStruct(GLib.GType gtype, bool use_cache) { if (class_structs == null) class_structs = new Hashtable (); if (use_cache && class_structs.Contains (gtype)) return (GstMiniObjectClass) class_structs [gtype]; else { IntPtr class_ptr = gtype.GetClassPtr (); GstMiniObjectClass class_struct = (GstMiniObjectClass) Marshal.PtrToStructure (class_ptr, typeof (GstMiniObjectClass)); if (use_cache) class_structs.Add (gtype, class_struct); return class_struct; } }
static void OverrideGetPathForChild (GLib.GType gtype, GetPathForChildNativeDelegate callback) { gtksharp_container_override_get_path_for_child (gtype.GetClassPtr (), callback); }
static void OverrideFocusChildSet (GLib.GType gtype, FocusChildSetNativeDelegate callback) { gtksharp_container_override_set_focus_child (gtype.GetClassPtr (), callback); }
static void OverrideCompositeName (GLib.GType gtype, CompositeNameNativeDelegate callback) { gtksharp_container_override_composite_name (gtype.GetClassPtr (), callback); }
static void OverrideGetLabel (GLib.GType gtype, GetLabelNativeDelegate callback) { gtksharp_menuitem_override_get_label (gtype.GetClassPtr (), callback); }
static void OverrideAdded (GLib.GType gtype, AddedNativeDelegate callback) { gtksharp_container_override_add (gtype.GetClassPtr (), callback); }
static void OverrideActivateItem (GLib.GType gtype, ActivateItemNativeDelegate callback) { gtksharp_menuitem_override_activate_item (gtype.GetClassPtr (), callback); }
static void OverrideToggleSizeAllocated (GLib.GType gtype, ToggleSizeAllocatedNativeDelegate callback) { gtksharp_menuitem_override_toggle_size_allocate (gtype.GetClassPtr (), callback); }
static void ClassInit (GLib.GType gtype, Type t) { object[] attrs = t.GetCustomAttributes (typeof (BindingAttribute), true); if (attrs.Length == 0) return; string signame = t.Name.Replace (".", "_") + "_bindings"; IntPtr native_signame = GLib.Marshaller.StringToPtrGStrdup (signame); RegisterSignal (signame, gtype, GLib.Signal.Flags.RunLast | GLib.Signal.Flags.Action, GLib.GType.None, new GLib.GType[] {GLib.GType.Long}, BindingDelegate); if (binding_invokers == null) binding_invokers = new List<BindingInvoker> (); foreach (BindingAttribute attr in attrs) { System.Reflection.MethodInfo mi = t.GetMethod (attr.Handler, System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public); if (mi == null) throw new Exception ("Instance method " + attr.Handler + " not found in " + t); GtkBindingArg arg = new GtkBindingArg (); arg.arg_type = GLib.GType.Long.Val; var bi = new BindingInvoker (mi, attr.Parms); binding_invokers.Add (bi); int binding_invoker_idx = binding_invokers.IndexOf (bi); #if WIN64LONGS arg.data.long_data = binding_invoker_idx; #else arg.data.long_data = new IntPtr (binding_invoker_idx); #endif GLib.SList binding_args = new GLib.SList (new object[] {arg}, typeof (GtkBindingArg), false, false); gtk_binding_entry_add_signall (gtk_binding_set_by_class (gtype.GetClassPtr ()), (uint) attr.Key, attr.Mod, native_signame, binding_args.Handle); binding_args.Dispose (); } GLib.Marshaller.Free (native_signame); }
static void OverrideClassStruct (GLib.GType gtype, GtkCellRendererSpinnerClass class_struct) { IntPtr class_ptr = new IntPtr (gtype.GetClassPtr ().ToInt64 () + class_offset); Marshal.StructureToPtr (class_struct, class_ptr, false); }
static void OverrideClassStruct(GLib.GType gtype, GstMiniObjectClass class_struct) { IntPtr class_ptr = gtype.GetClassPtr (); Marshal.StructureToPtr (class_struct, class_ptr, false); }
static void OverrideGetPopupDelay (GLib.GType gtype, GetPopupDelayNativeDelegate callback) { gtksharp_menushell_override_get_popup_delay (gtype.GetClassPtr (), callback); }
static void OverrideDeselected (GLib.GType gtype, DeselectedNativeDelegate callback) { gtksharp_menuitem_override_deselect (gtype.GetClassPtr (), callback); }
static void OverrideMoveSelected (GLib.GType gtype, MoveSelectedNativeDelegate callback) { gtksharp_menushell_override_move_selected (gtype.GetClassPtr (), callback); }
static void OverrideDeactivated (GLib.GType gtype, DeactivatedNativeDelegate callback) { gtksharp_menushell_override_deactivate (gtype.GetClassPtr (), callback); }
static void OverrideResizeChecked (GLib.GType gtype, ResizeCheckedNativeDelegate callback) { gtksharp_container_override_check_resize (gtype.GetClassPtr (), callback); }
static void OverrideSelectionDone (GLib.GType gtype, SelectionDoneNativeDelegate callback) { gtksharp_menushell_override_selection_done (gtype.GetClassPtr (), callback); }
static void OverrideChildType (GLib.GType gtype, ChildTypeNativeDelegate callback) { gtksharp_container_override_child_type (gtype.GetClassPtr (), callback); }
static void OverrideActivateCurrent (GLib.GType gtype, ActivateCurrentNativeDelegate callback) { gtksharp_menushell_override_activate_current (gtype.GetClassPtr (), callback); }
static void OverrideGetChildProperty (GLib.GType gtype, GetChildPropertyNativeDelegate callback) { gtksharp_container_override_get_child_property (gtype.GetClassPtr (), callback); }
static void OverrideCanceled (GLib.GType gtype, CanceledNativeDelegate callback) { gtksharp_menushell_override_cancel (gtype.GetClassPtr (), callback); }
static void OverrideClassStruct (GLib.GType gtype, GtkRecentChooserDialogClass class_struct) { IntPtr class_ptr = new IntPtr (gtype.GetClassPtr ().ToInt64 () + class_offset); Marshal.StructureToPtr (class_struct, class_ptr, false); }
static void OverrideSelectItem (GLib.GType gtype, SelectItemNativeDelegate callback) { gtksharp_menushell_override_select_item (gtype.GetClassPtr (), callback); }
static void OverrideClassStruct (GLib.GType gtype, GDBusProxyClass class_struct) { IntPtr class_ptr = new IntPtr (gtype.GetClassPtr ().ToInt64 () + class_offset); Marshal.StructureToPtr (class_struct, class_ptr, false); }
static void OverrideClassStruct (GLib.GType gtype, GSocketAddressEnumeratorClass class_struct) { IntPtr class_ptr = new IntPtr (gtype.GetClassPtr ().ToInt64 () + class_offset); Marshal.StructureToPtr (class_struct, class_ptr, false); }