diff --git a/Source/Libs/AtkSharp/Global.cs b/Source/Libs/AtkSharp/Global.cs index ca3ae3f68..7d645b178 100755 --- a/Source/Libs/AtkSharp/Global.cs +++ b/Source/Libs/AtkSharp/Global.cs @@ -29,7 +29,7 @@ namespace Atk { public partial class Global { delegate uint d_atk_add_global_event_listener(GLib.Signal.EmissionHookNative hook, IntPtr event_type); - static d_atk_add_global_event_listener atk_add_global_event_listener = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Atk), "atk_add_global_event_listener")); + static d_atk_add_global_event_listener atk_add_global_event_listener = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Atk), "atk_add_global_event_listener")); public static uint AddGlobalEventListener (GLib.Signal.EmissionHook hook, string event_type) diff --git a/Source/Libs/CairoSharp/NativeMethods.cs b/Source/Libs/CairoSharp/NativeMethods.cs index f07c83d84..3a218f753 100755 --- a/Source/Libs/CairoSharp/NativeMethods.cs +++ b/Source/Libs/CairoSharp/NativeMethods.cs @@ -44,471 +44,471 @@ namespace Cairo const string cairo = "libcairo-2.dll"; internal delegate void d_cairo_append_path(IntPtr cr, IntPtr path); - internal static d_cairo_append_path cairo_append_path = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_append_path")); + internal static d_cairo_append_path cairo_append_path = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_append_path")); internal delegate void d_cairo_arc(IntPtr cr, double xc, double yc, double radius, double angle1, double angle2); - internal static d_cairo_arc cairo_arc = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_arc")); + internal static d_cairo_arc cairo_arc = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_arc")); internal delegate void d_cairo_arc_negative(IntPtr cr, double xc, double yc, double radius, double angle1, double angle2); - internal static d_cairo_arc_negative cairo_arc_negative = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_arc_negative")); + internal static d_cairo_arc_negative cairo_arc_negative = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_arc_negative")); internal delegate IntPtr d_cairo_atsui_font_face_create_for_atsu_font_id(IntPtr font_id); - internal static d_cairo_atsui_font_face_create_for_atsu_font_id cairo_atsui_font_face_create_for_atsu_font_id = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_atsui_font_face_create_for_atsu_font_id")); + internal static d_cairo_atsui_font_face_create_for_atsu_font_id cairo_atsui_font_face_create_for_atsu_font_id = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_atsui_font_face_create_for_atsu_font_id")); internal delegate void d_cairo_clip(IntPtr cr); - internal static d_cairo_clip cairo_clip = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_clip")); + internal static d_cairo_clip cairo_clip = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_clip")); internal delegate void d_cairo_clip_extents(IntPtr cr, out double x1, out double y1, out double x2, out double y2); - internal static d_cairo_clip_extents cairo_clip_extents = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_clip_extents")); + internal static d_cairo_clip_extents cairo_clip_extents = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_clip_extents")); internal delegate void d_cairo_clip_preserve(IntPtr cr); - internal static d_cairo_clip_preserve cairo_clip_preserve = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_clip_preserve")); + internal static d_cairo_clip_preserve cairo_clip_preserve = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_clip_preserve")); internal delegate void d_cairo_close_path(IntPtr cr); - internal static d_cairo_close_path cairo_close_path = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_close_path")); + internal static d_cairo_close_path cairo_close_path = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_close_path")); internal delegate IntPtr d_cairo_copy_clip_rectangle_list(IntPtr cr); - internal static d_cairo_copy_clip_rectangle_list cairo_copy_clip_rectangle_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_copy_clip_rectangle_list")); + internal static d_cairo_copy_clip_rectangle_list cairo_copy_clip_rectangle_list = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_copy_clip_rectangle_list")); internal delegate void d_cairo_copy_page(IntPtr cr); - internal static d_cairo_copy_page cairo_copy_page = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_copy_page")); + internal static d_cairo_copy_page cairo_copy_page = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_copy_page")); internal delegate IntPtr d_cairo_copy_path(IntPtr cr); - internal static d_cairo_copy_path cairo_copy_path = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_copy_path")); + internal static d_cairo_copy_path cairo_copy_path = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_copy_path")); internal delegate IntPtr d_cairo_copy_path_flat(IntPtr cr); - internal static d_cairo_copy_path_flat cairo_copy_path_flat = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_copy_path_flat")); + internal static d_cairo_copy_path_flat cairo_copy_path_flat = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_copy_path_flat")); internal delegate IntPtr d_cairo_create(IntPtr target); - internal static d_cairo_create cairo_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_create")); + internal static d_cairo_create cairo_create = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_create")); internal delegate void d_cairo_curve_to(IntPtr cr, double x1, double y1, double x2, double y2, double x3, double y3); - internal static d_cairo_curve_to cairo_curve_to = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_curve_to")); + internal static d_cairo_curve_to cairo_curve_to = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_curve_to")); internal delegate void d_cairo_debug_reset_static_data(); - internal static d_cairo_debug_reset_static_data cairo_debug_reset_static_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_debug_reset_static_data")); + internal static d_cairo_debug_reset_static_data cairo_debug_reset_static_data = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_debug_reset_static_data")); internal delegate void d_cairo_destroy(IntPtr cr); - internal static d_cairo_destroy cairo_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_destroy")); + internal static d_cairo_destroy cairo_destroy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_destroy")); internal delegate Status d_cairo_device_acquire(IntPtr device); - internal static d_cairo_device_acquire cairo_device_acquire = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_acquire")); + internal static d_cairo_device_acquire cairo_device_acquire = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_acquire")); internal delegate void d_cairo_device_destroy(IntPtr device); - internal static d_cairo_device_destroy cairo_device_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_destroy")); + internal static d_cairo_device_destroy cairo_device_destroy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_destroy")); internal delegate void d_cairo_device_finish(IntPtr device); - internal static d_cairo_device_finish cairo_device_finish = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_finish")); + internal static d_cairo_device_finish cairo_device_finish = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_finish")); internal delegate void d_cairo_device_flush(IntPtr device); - internal static d_cairo_device_flush cairo_device_flush = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_flush")); + internal static d_cairo_device_flush cairo_device_flush = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_flush")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern uint cairo_device_get_reference_count (IntPtr device); internal delegate DeviceType d_cairo_device_get_type(IntPtr device); - internal static d_cairo_device_get_type cairo_device_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_get_type")); + internal static d_cairo_device_get_type cairo_device_get_type = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_get_type")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_device_get_user_data (IntPtr device, IntPtr key); internal delegate IntPtr d_cairo_device_reference(IntPtr device); - internal static d_cairo_device_reference cairo_device_reference = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_reference")); + internal static d_cairo_device_reference cairo_device_reference = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_reference")); internal delegate void d_cairo_device_release(IntPtr device); - internal static d_cairo_device_release cairo_device_release = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_release")); + internal static d_cairo_device_release cairo_device_release = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_release")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern int cairo_device_set_user_data (IntPtr device, IntPtr key, IntPtr user_data, IntPtr destroy); internal delegate Status d_cairo_device_status(IntPtr device); - internal static d_cairo_device_status cairo_device_status = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_status")); + internal static d_cairo_device_status cairo_device_status = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_status")); internal delegate void d_cairo_device_to_user(IntPtr cr, ref double x, ref double y); - internal static d_cairo_device_to_user cairo_device_to_user = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_to_user")); + internal static d_cairo_device_to_user cairo_device_to_user = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_to_user")); internal delegate void d_cairo_device_to_user_distance(IntPtr cr, ref double dx, ref double dy); - internal static d_cairo_device_to_user_distance cairo_device_to_user_distance = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_to_user_distance")); + internal static d_cairo_device_to_user_distance cairo_device_to_user_distance = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_to_user_distance")); internal delegate void d_cairo_fill(IntPtr cr); - internal static d_cairo_fill cairo_fill = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_fill")); + internal static d_cairo_fill cairo_fill = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_fill")); internal delegate void d_cairo_fill_extents(IntPtr cr, out double x1, out double y1, out double x2, out double y2); - internal static d_cairo_fill_extents cairo_fill_extents = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_fill_extents")); + internal static d_cairo_fill_extents cairo_fill_extents = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_fill_extents")); internal delegate void d_cairo_fill_preserve(IntPtr cr); - internal static d_cairo_fill_preserve cairo_fill_preserve = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_fill_preserve")); + internal static d_cairo_fill_preserve cairo_fill_preserve = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_fill_preserve")); internal delegate void d_cairo_font_extents(IntPtr cr, out FontExtents extents); - internal static d_cairo_font_extents cairo_font_extents = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_extents")); + internal static d_cairo_font_extents cairo_font_extents = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_extents")); internal delegate void d_cairo_font_face_destroy(IntPtr font_face); - internal static d_cairo_font_face_destroy cairo_font_face_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_face_destroy")); + internal static d_cairo_font_face_destroy cairo_font_face_destroy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_face_destroy")); internal delegate uint d_cairo_font_face_get_reference_count(IntPtr font_face); - internal static d_cairo_font_face_get_reference_count cairo_font_face_get_reference_count = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_face_get_reference_count")); + internal static d_cairo_font_face_get_reference_count cairo_font_face_get_reference_count = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_face_get_reference_count")); internal delegate FontType d_cairo_font_face_get_type(IntPtr font_face); - internal static d_cairo_font_face_get_type cairo_font_face_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_face_get_type")); + internal static d_cairo_font_face_get_type cairo_font_face_get_type = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_face_get_type")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_font_face_get_user_data (IntPtr font_face, IntPtr key); internal delegate IntPtr d_cairo_font_face_reference(IntPtr font_face); - internal static d_cairo_font_face_reference cairo_font_face_reference = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_face_reference")); + internal static d_cairo_font_face_reference cairo_font_face_reference = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_face_reference")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern Status cairo_font_face_set_user_data (IntPtr font_face, IntPtr key, IntPtr user_data, DestroyFunc destroy); internal delegate Status d_cairo_font_face_status(IntPtr font_face); - internal static d_cairo_font_face_status cairo_font_face_status = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_face_status")); + internal static d_cairo_font_face_status cairo_font_face_status = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_face_status")); internal delegate IntPtr d_cairo_font_options_copy(IntPtr original); - internal static d_cairo_font_options_copy cairo_font_options_copy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_copy")); + internal static d_cairo_font_options_copy cairo_font_options_copy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_copy")); internal delegate IntPtr d_cairo_font_options_create(); - internal static d_cairo_font_options_create cairo_font_options_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_create")); + internal static d_cairo_font_options_create cairo_font_options_create = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_create")); internal delegate void d_cairo_font_options_destroy(IntPtr options); - internal static d_cairo_font_options_destroy cairo_font_options_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_destroy")); + internal static d_cairo_font_options_destroy cairo_font_options_destroy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_destroy")); internal delegate bool d_cairo_font_options_equal(IntPtr options, IntPtr other); - internal static d_cairo_font_options_equal cairo_font_options_equal = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_equal")); + internal static d_cairo_font_options_equal cairo_font_options_equal = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_equal")); internal delegate Antialias d_cairo_font_options_get_antialias(IntPtr options); - internal static d_cairo_font_options_get_antialias cairo_font_options_get_antialias = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_get_antialias")); + internal static d_cairo_font_options_get_antialias cairo_font_options_get_antialias = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_get_antialias")); internal delegate HintMetrics d_cairo_font_options_get_hint_metrics(IntPtr options); - internal static d_cairo_font_options_get_hint_metrics cairo_font_options_get_hint_metrics = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_get_hint_metrics")); + internal static d_cairo_font_options_get_hint_metrics cairo_font_options_get_hint_metrics = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_get_hint_metrics")); internal delegate HintStyle d_cairo_font_options_get_hint_style(IntPtr options); - internal static d_cairo_font_options_get_hint_style cairo_font_options_get_hint_style = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_get_hint_style")); + internal static d_cairo_font_options_get_hint_style cairo_font_options_get_hint_style = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_get_hint_style")); internal delegate SubpixelOrder d_cairo_font_options_get_subpixel_order(IntPtr options); - internal static d_cairo_font_options_get_subpixel_order cairo_font_options_get_subpixel_order = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_get_subpixel_order")); + internal static d_cairo_font_options_get_subpixel_order cairo_font_options_get_subpixel_order = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_get_subpixel_order")); internal delegate long d_cairo_font_options_hash(IntPtr options); - internal static d_cairo_font_options_hash cairo_font_options_hash = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_hash")); + internal static d_cairo_font_options_hash cairo_font_options_hash = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_hash")); internal delegate void d_cairo_font_options_merge(IntPtr options, IntPtr other); - internal static d_cairo_font_options_merge cairo_font_options_merge = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_merge")); + internal static d_cairo_font_options_merge cairo_font_options_merge = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_merge")); internal delegate void d_cairo_font_options_set_antialias(IntPtr options, Antialias aa); - internal static d_cairo_font_options_set_antialias cairo_font_options_set_antialias = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_set_antialias")); + internal static d_cairo_font_options_set_antialias cairo_font_options_set_antialias = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_set_antialias")); internal delegate void d_cairo_font_options_set_hint_metrics(IntPtr options, HintMetrics metrics); - internal static d_cairo_font_options_set_hint_metrics cairo_font_options_set_hint_metrics = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_set_hint_metrics")); + internal static d_cairo_font_options_set_hint_metrics cairo_font_options_set_hint_metrics = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_set_hint_metrics")); internal delegate void d_cairo_font_options_set_hint_style(IntPtr options, HintStyle style); - internal static d_cairo_font_options_set_hint_style cairo_font_options_set_hint_style = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_set_hint_style")); + internal static d_cairo_font_options_set_hint_style cairo_font_options_set_hint_style = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_set_hint_style")); internal delegate void d_cairo_font_options_set_subpixel_order(IntPtr options, SubpixelOrder order); - internal static d_cairo_font_options_set_subpixel_order cairo_font_options_set_subpixel_order = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_set_subpixel_order")); + internal static d_cairo_font_options_set_subpixel_order cairo_font_options_set_subpixel_order = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_set_subpixel_order")); internal delegate Status d_cairo_font_options_status(IntPtr options); - internal static d_cairo_font_options_status cairo_font_options_status = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_status")); + internal static d_cairo_font_options_status cairo_font_options_status = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_status")); internal delegate int d_cairo_format_stride_for_width(Format format, int width); - internal static d_cairo_format_stride_for_width cairo_format_stride_for_width = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_format_stride_for_width")); + internal static d_cairo_format_stride_for_width cairo_format_stride_for_width = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_format_stride_for_width")); internal delegate IntPtr d_cairo_ft_font_face_create_for_ft_face(IntPtr face, int load_flags); - internal static d_cairo_ft_font_face_create_for_ft_face cairo_ft_font_face_create_for_ft_face = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ft_font_face_create_for_ft_face")); + internal static d_cairo_ft_font_face_create_for_ft_face cairo_ft_font_face_create_for_ft_face = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ft_font_face_create_for_ft_face")); internal delegate IntPtr d_cairo_ft_font_face_create_for_pattern(IntPtr fc_pattern); - internal static d_cairo_ft_font_face_create_for_pattern cairo_ft_font_face_create_for_pattern = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ft_font_face_create_for_pattern")); + internal static d_cairo_ft_font_face_create_for_pattern cairo_ft_font_face_create_for_pattern = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ft_font_face_create_for_pattern")); internal delegate void d_cairo_ft_font_options_substitute(FontOptions options, IntPtr pattern); - internal static d_cairo_ft_font_options_substitute cairo_ft_font_options_substitute = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ft_font_options_substitute")); + internal static d_cairo_ft_font_options_substitute cairo_ft_font_options_substitute = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ft_font_options_substitute")); internal delegate IntPtr d_cairo_ft_scaled_font_lock_face(IntPtr scaled_font); - internal static d_cairo_ft_scaled_font_lock_face cairo_ft_scaled_font_lock_face = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ft_scaled_font_lock_face")); + internal static d_cairo_ft_scaled_font_lock_face cairo_ft_scaled_font_lock_face = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ft_scaled_font_lock_face")); internal delegate void d_cairo_ft_scaled_font_unlock_face(IntPtr scaled_font); - internal static d_cairo_ft_scaled_font_unlock_face cairo_ft_scaled_font_unlock_face = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ft_scaled_font_unlock_face")); + internal static d_cairo_ft_scaled_font_unlock_face cairo_ft_scaled_font_unlock_face = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ft_scaled_font_unlock_face")); internal delegate Antialias d_cairo_get_antialias(IntPtr cr); - internal static d_cairo_get_antialias cairo_get_antialias = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_antialias")); + internal static d_cairo_get_antialias cairo_get_antialias = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_antialias")); internal delegate void d_cairo_get_current_point(IntPtr cr, out double x, out double y); - internal static d_cairo_get_current_point cairo_get_current_point = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_current_point")); + internal static d_cairo_get_current_point cairo_get_current_point = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_current_point")); internal delegate void d_cairo_get_dash(IntPtr cr, IntPtr dashes, out double offset); - internal static d_cairo_get_dash cairo_get_dash = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_dash")); + internal static d_cairo_get_dash cairo_get_dash = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_dash")); internal delegate int d_cairo_get_dash_count(IntPtr cr); - internal static d_cairo_get_dash_count cairo_get_dash_count = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_dash_count")); + internal static d_cairo_get_dash_count cairo_get_dash_count = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_dash_count")); internal delegate FillRule d_cairo_get_fill_rule(IntPtr cr); - internal static d_cairo_get_fill_rule cairo_get_fill_rule = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_fill_rule")); + internal static d_cairo_get_fill_rule cairo_get_fill_rule = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_fill_rule")); internal delegate IntPtr d_cairo_get_font_face(IntPtr cr); - internal static d_cairo_get_font_face cairo_get_font_face = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_font_face")); + internal static d_cairo_get_font_face cairo_get_font_face = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_font_face")); internal delegate void d_cairo_get_font_matrix(IntPtr cr, out Matrix matrix); - internal static d_cairo_get_font_matrix cairo_get_font_matrix = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_font_matrix")); + internal static d_cairo_get_font_matrix cairo_get_font_matrix = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_font_matrix")); internal delegate void d_cairo_get_font_options(IntPtr cr, IntPtr options); - internal static d_cairo_get_font_options cairo_get_font_options = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_font_options")); + internal static d_cairo_get_font_options cairo_get_font_options = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_font_options")); internal delegate IntPtr d_cairo_get_group_target(IntPtr cr); - internal static d_cairo_get_group_target cairo_get_group_target = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_group_target")); + internal static d_cairo_get_group_target cairo_get_group_target = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_group_target")); internal delegate LineCap d_cairo_get_line_cap(IntPtr cr); - internal static d_cairo_get_line_cap cairo_get_line_cap = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_line_cap")); + internal static d_cairo_get_line_cap cairo_get_line_cap = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_line_cap")); internal delegate LineJoin d_cairo_get_line_join(IntPtr cr); - internal static d_cairo_get_line_join cairo_get_line_join = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_line_join")); + internal static d_cairo_get_line_join cairo_get_line_join = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_line_join")); internal delegate double d_cairo_get_line_width(IntPtr cr); - internal static d_cairo_get_line_width cairo_get_line_width = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_line_width")); + internal static d_cairo_get_line_width cairo_get_line_width = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_line_width")); internal delegate void d_cairo_get_matrix(IntPtr cr, Matrix matrix); - internal static d_cairo_get_matrix cairo_get_matrix = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_matrix")); + internal static d_cairo_get_matrix cairo_get_matrix = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_matrix")); internal delegate double d_cairo_get_miter_limit(IntPtr cr); - internal static d_cairo_get_miter_limit cairo_get_miter_limit = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_miter_limit")); + internal static d_cairo_get_miter_limit cairo_get_miter_limit = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_miter_limit")); internal delegate Operator d_cairo_get_operator(IntPtr cr); - internal static d_cairo_get_operator cairo_get_operator = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_operator")); + internal static d_cairo_get_operator cairo_get_operator = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_operator")); internal delegate uint d_cairo_get_reference_count(IntPtr surface); - internal static d_cairo_get_reference_count cairo_get_reference_count = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_reference_count")); + internal static d_cairo_get_reference_count cairo_get_reference_count = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_reference_count")); internal delegate IntPtr d_cairo_get_scaled_font(IntPtr cr); - internal static d_cairo_get_scaled_font cairo_get_scaled_font = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_scaled_font")); + internal static d_cairo_get_scaled_font cairo_get_scaled_font = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_scaled_font")); internal delegate IntPtr d_cairo_get_source(IntPtr cr); - internal static d_cairo_get_source cairo_get_source = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_source")); + internal static d_cairo_get_source cairo_get_source = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_source")); internal delegate IntPtr d_cairo_get_target(IntPtr cr); - internal static d_cairo_get_target cairo_get_target = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_target")); + internal static d_cairo_get_target cairo_get_target = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_target")); internal delegate double d_cairo_get_tolerance(IntPtr cr); - internal static d_cairo_get_tolerance cairo_get_tolerance = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_tolerance")); + internal static d_cairo_get_tolerance cairo_get_tolerance = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_tolerance")); internal delegate IntPtr d_cairo_get_user_data(IntPtr cr, IntPtr key); - internal static d_cairo_get_user_data cairo_get_user_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_user_data")); + internal static d_cairo_get_user_data cairo_get_user_data = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_user_data")); // this isn't in the 1.10 doc index internal delegate IntPtr d_cairo_glitz_surface_create(IntPtr surface); - internal static d_cairo_glitz_surface_create cairo_glitz_surface_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_glitz_surface_create")); + internal static d_cairo_glitz_surface_create cairo_glitz_surface_create = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_glitz_surface_create")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_glyph_allocate (int num_glyphs); internal delegate void d_cairo_glyph_extents(IntPtr cr, IntPtr glyphs, int num_glyphs, out TextExtents extents); - internal static d_cairo_glyph_extents cairo_glyph_extents = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_glyph_extents")); + internal static d_cairo_glyph_extents cairo_glyph_extents = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_glyph_extents")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern void cairo_glyph_free (IntPtr glyphs); internal delegate void d_cairo_glyph_path(IntPtr cr, IntPtr glyphs, int num_glyphs); - internal static d_cairo_glyph_path cairo_glyph_path = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_glyph_path")); + internal static d_cairo_glyph_path cairo_glyph_path = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_glyph_path")); internal delegate bool d_cairo_has_current_point(IntPtr cr); - internal static d_cairo_has_current_point cairo_has_current_point = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_has_current_point")); + internal static d_cairo_has_current_point cairo_has_current_point = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_has_current_point")); internal delegate void d_cairo_identity_matrix(IntPtr cr); - internal static d_cairo_identity_matrix cairo_identity_matrix = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_identity_matrix")); + internal static d_cairo_identity_matrix cairo_identity_matrix = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_identity_matrix")); internal delegate IntPtr d_cairo_image_surface_create(Cairo.Format format, int width, int height); - internal static d_cairo_image_surface_create cairo_image_surface_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_create")); + internal static d_cairo_image_surface_create cairo_image_surface_create = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_create")); internal delegate IntPtr d_cairo_image_surface_create_for_data(byte[] data, Cairo.Format format, int width, int height, int stride); - internal static d_cairo_image_surface_create_for_data cairo_image_surface_create_for_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_create_for_data")); + internal static d_cairo_image_surface_create_for_data cairo_image_surface_create_for_data = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_create_for_data")); internal delegate IntPtr d_cairo_image_surface_create_for_data2(IntPtr data, Cairo.Format format, int width, int height, int stride); - internal static d_cairo_image_surface_create_for_data2 cairo_image_surface_create_for_data2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_create_for_data")); + internal static d_cairo_image_surface_create_for_data2 cairo_image_surface_create_for_data2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_create_for_data")); internal delegate IntPtr d_cairo_image_surface_create_from_png(string filename); - internal static d_cairo_image_surface_create_from_png cairo_image_surface_create_from_png = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_create_from_png")); + internal static d_cairo_image_surface_create_from_png cairo_image_surface_create_from_png = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_create_from_png")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_image_surface_create_from_png_stream (string filename); internal delegate IntPtr d_cairo_image_surface_get_data(IntPtr surface); - internal static d_cairo_image_surface_get_data cairo_image_surface_get_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_get_data")); + internal static d_cairo_image_surface_get_data cairo_image_surface_get_data = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_get_data")); internal delegate Format d_cairo_image_surface_get_format(IntPtr surface); - internal static d_cairo_image_surface_get_format cairo_image_surface_get_format = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_get_format")); + internal static d_cairo_image_surface_get_format cairo_image_surface_get_format = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_get_format")); internal delegate int d_cairo_image_surface_get_height(IntPtr surface); - internal static d_cairo_image_surface_get_height cairo_image_surface_get_height = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_get_height")); + internal static d_cairo_image_surface_get_height cairo_image_surface_get_height = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_get_height")); internal delegate int d_cairo_image_surface_get_stride(IntPtr surface); - internal static d_cairo_image_surface_get_stride cairo_image_surface_get_stride = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_get_stride")); + internal static d_cairo_image_surface_get_stride cairo_image_surface_get_stride = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_get_stride")); internal delegate int d_cairo_image_surface_get_width(IntPtr surface); - internal static d_cairo_image_surface_get_width cairo_image_surface_get_width = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_get_width")); + internal static d_cairo_image_surface_get_width cairo_image_surface_get_width = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_get_width")); internal delegate bool d_cairo_in_clip(IntPtr cr, double x, double y); - internal static d_cairo_in_clip cairo_in_clip = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_in_clip")); + internal static d_cairo_in_clip cairo_in_clip = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_in_clip")); internal delegate bool d_cairo_in_fill(IntPtr cr, double x, double y); - internal static d_cairo_in_fill cairo_in_fill = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_in_fill")); + internal static d_cairo_in_fill cairo_in_fill = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_in_fill")); internal delegate bool d_cairo_in_stroke(IntPtr cr, double x, double y); - internal static d_cairo_in_stroke cairo_in_stroke = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_in_stroke")); + internal static d_cairo_in_stroke cairo_in_stroke = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_in_stroke")); internal delegate void d_cairo_line_to(IntPtr cr, double x, double y); - internal static d_cairo_line_to cairo_line_to = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_line_to")); + internal static d_cairo_line_to cairo_line_to = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_line_to")); internal delegate void d_cairo_mask(IntPtr cr, IntPtr pattern); - internal static d_cairo_mask cairo_mask = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_mask")); + internal static d_cairo_mask cairo_mask = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_mask")); internal delegate void d_cairo_mask_surface(IntPtr cr, IntPtr surface, double x, double y); - internal static d_cairo_mask_surface cairo_mask_surface = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_mask_surface")); + internal static d_cairo_mask_surface cairo_mask_surface = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_mask_surface")); internal delegate void d_cairo_matrix_init(Matrix matrix, double xx, double yx, double xy, double yy, double x0, double y0); - internal static d_cairo_matrix_init cairo_matrix_init = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_init")); + internal static d_cairo_matrix_init cairo_matrix_init = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_init")); internal delegate void d_cairo_matrix_init_identity(Matrix matrix); - internal static d_cairo_matrix_init_identity cairo_matrix_init_identity = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_init_identity")); + internal static d_cairo_matrix_init_identity cairo_matrix_init_identity = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_init_identity")); internal delegate void d_cairo_matrix_init_rotate(Matrix matrix, double radians); - internal static d_cairo_matrix_init_rotate cairo_matrix_init_rotate = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_init_rotate")); + internal static d_cairo_matrix_init_rotate cairo_matrix_init_rotate = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_init_rotate")); internal delegate void d_cairo_matrix_init_scale(Matrix matrix, double sx, double sy); - internal static d_cairo_matrix_init_scale cairo_matrix_init_scale = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_init_scale")); + internal static d_cairo_matrix_init_scale cairo_matrix_init_scale = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_init_scale")); internal delegate void d_cairo_matrix_init_translate(Matrix matrix, double tx, double ty); - internal static d_cairo_matrix_init_translate cairo_matrix_init_translate = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_init_translate")); + internal static d_cairo_matrix_init_translate cairo_matrix_init_translate = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_init_translate")); internal delegate Status d_cairo_matrix_invert(Matrix matrix); - internal static d_cairo_matrix_invert cairo_matrix_invert = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_invert")); + internal static d_cairo_matrix_invert cairo_matrix_invert = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_invert")); internal delegate void d_cairo_matrix_multiply(Matrix result, Matrix a, Matrix b); - internal static d_cairo_matrix_multiply cairo_matrix_multiply = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_multiply")); + internal static d_cairo_matrix_multiply cairo_matrix_multiply = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_multiply")); internal delegate void d_cairo_matrix_rotate(Matrix matrix, double radians); - internal static d_cairo_matrix_rotate cairo_matrix_rotate = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_rotate")); + internal static d_cairo_matrix_rotate cairo_matrix_rotate = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_rotate")); internal delegate void d_cairo_matrix_scale(Matrix matrix, double sx, double sy); - internal static d_cairo_matrix_scale cairo_matrix_scale = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_scale")); + internal static d_cairo_matrix_scale cairo_matrix_scale = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_scale")); internal delegate void d_cairo_matrix_transform_distance(Matrix matrix, ref double dx, ref double dy); - internal static d_cairo_matrix_transform_distance cairo_matrix_transform_distance = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_transform_distance")); + internal static d_cairo_matrix_transform_distance cairo_matrix_transform_distance = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_transform_distance")); internal delegate void d_cairo_matrix_transform_point(Matrix matrix, ref double x, ref double y); - internal static d_cairo_matrix_transform_point cairo_matrix_transform_point = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_transform_point")); + internal static d_cairo_matrix_transform_point cairo_matrix_transform_point = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_transform_point")); internal delegate void d_cairo_matrix_translate(Matrix matrix, double tx, double ty); - internal static d_cairo_matrix_translate cairo_matrix_translate = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_translate")); + internal static d_cairo_matrix_translate cairo_matrix_translate = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_translate")); internal delegate void d_cairo_move_to(IntPtr cr, double x, double y); - internal static d_cairo_move_to cairo_move_to = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_move_to")); + internal static d_cairo_move_to cairo_move_to = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_move_to")); internal delegate void d_cairo_new_path(IntPtr cr); - internal static d_cairo_new_path cairo_new_path = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_new_path")); + internal static d_cairo_new_path cairo_new_path = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_new_path")); internal delegate void d_cairo_new_sub_path(IntPtr cr); - internal static d_cairo_new_sub_path cairo_new_sub_path = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_new_sub_path")); + internal static d_cairo_new_sub_path cairo_new_sub_path = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_new_sub_path")); internal delegate void d_cairo_paint(IntPtr cr); - internal static d_cairo_paint cairo_paint = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_paint")); + internal static d_cairo_paint cairo_paint = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_paint")); internal delegate void d_cairo_paint_with_alpha(IntPtr cr, double alpha); - internal static d_cairo_paint_with_alpha cairo_paint_with_alpha = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_paint_with_alpha")); + internal static d_cairo_paint_with_alpha cairo_paint_with_alpha = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_paint_with_alpha")); internal delegate void d_cairo_path_destroy(IntPtr path); - internal static d_cairo_path_destroy cairo_path_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_path_destroy")); + internal static d_cairo_path_destroy cairo_path_destroy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_path_destroy")); internal delegate void d_cairo_path_extents(IntPtr cr, out double x1, out double y1, out double x2, out double y2); - internal static d_cairo_path_extents cairo_path_extents = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_path_extents")); + internal static d_cairo_path_extents cairo_path_extents = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_path_extents")); internal delegate void d_cairo_pattern_add_color_stop_rgb(IntPtr pattern, double offset, double red, double green, double blue); - internal static d_cairo_pattern_add_color_stop_rgb cairo_pattern_add_color_stop_rgb = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_add_color_stop_rgb")); + internal static d_cairo_pattern_add_color_stop_rgb cairo_pattern_add_color_stop_rgb = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_add_color_stop_rgb")); internal delegate void d_cairo_pattern_add_color_stop_rgba(IntPtr pattern, double offset, double red, double green, double blue, double alpha); - internal static d_cairo_pattern_add_color_stop_rgba cairo_pattern_add_color_stop_rgba = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_add_color_stop_rgba")); + internal static d_cairo_pattern_add_color_stop_rgba cairo_pattern_add_color_stop_rgba = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_add_color_stop_rgba")); internal delegate IntPtr d_cairo_pattern_create_for_surface(IntPtr surface); - internal static d_cairo_pattern_create_for_surface cairo_pattern_create_for_surface = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_create_for_surface")); + internal static d_cairo_pattern_create_for_surface cairo_pattern_create_for_surface = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_create_for_surface")); internal delegate IntPtr d_cairo_pattern_create_linear(double x0, double y0, double x1, double y1); - internal static d_cairo_pattern_create_linear cairo_pattern_create_linear = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_create_linear")); + internal static d_cairo_pattern_create_linear cairo_pattern_create_linear = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_create_linear")); internal delegate IntPtr d_cairo_pattern_create_radial(double cx0, double cy0, double radius0, double cx1, double cy1, double radius1); - internal static d_cairo_pattern_create_radial cairo_pattern_create_radial = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_create_radial")); + internal static d_cairo_pattern_create_radial cairo_pattern_create_radial = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_create_radial")); internal delegate IntPtr d_cairo_pattern_create_rgb(double r, double g, double b); - internal static d_cairo_pattern_create_rgb cairo_pattern_create_rgb = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_create_rgb")); + internal static d_cairo_pattern_create_rgb cairo_pattern_create_rgb = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_create_rgb")); internal delegate IntPtr d_cairo_pattern_create_rgba(double r, double g, double b, double a); - internal static d_cairo_pattern_create_rgba cairo_pattern_create_rgba = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_create_rgba")); + internal static d_cairo_pattern_create_rgba cairo_pattern_create_rgba = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_create_rgba")); internal delegate void d_cairo_pattern_destroy(IntPtr pattern); - internal static d_cairo_pattern_destroy cairo_pattern_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_destroy")); + internal static d_cairo_pattern_destroy cairo_pattern_destroy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_destroy")); internal delegate Status d_cairo_pattern_get_color_stop_count(IntPtr pattern, out int count); - internal static d_cairo_pattern_get_color_stop_count cairo_pattern_get_color_stop_count = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_color_stop_count")); + internal static d_cairo_pattern_get_color_stop_count cairo_pattern_get_color_stop_count = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_color_stop_count")); internal delegate Status d_cairo_pattern_get_color_stop_rgba(IntPtr pattern, int index, out double offset, out double red, out double green, out double blue, out double alpha); - internal static d_cairo_pattern_get_color_stop_rgba cairo_pattern_get_color_stop_rgba = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_color_stop_rgba")); + internal static d_cairo_pattern_get_color_stop_rgba cairo_pattern_get_color_stop_rgba = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_color_stop_rgba")); internal delegate Extend d_cairo_pattern_get_extend(IntPtr pattern); - internal static d_cairo_pattern_get_extend cairo_pattern_get_extend = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_extend")); + internal static d_cairo_pattern_get_extend cairo_pattern_get_extend = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_extend")); internal delegate Filter d_cairo_pattern_get_filter(IntPtr pattern); - internal static d_cairo_pattern_get_filter cairo_pattern_get_filter = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_filter")); + internal static d_cairo_pattern_get_filter cairo_pattern_get_filter = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_filter")); internal delegate Status d_cairo_pattern_get_linear_points(IntPtr pattern, out double x0, out double y0, out double x1, out double y1); - internal static d_cairo_pattern_get_linear_points cairo_pattern_get_linear_points = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_linear_points")); + internal static d_cairo_pattern_get_linear_points cairo_pattern_get_linear_points = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_linear_points")); internal delegate void d_cairo_pattern_get_matrix(IntPtr pattern, Matrix matrix); - internal static d_cairo_pattern_get_matrix cairo_pattern_get_matrix = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_matrix")); + internal static d_cairo_pattern_get_matrix cairo_pattern_get_matrix = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_matrix")); internal delegate Status d_cairo_pattern_get_radial_circles(IntPtr pattern, out double x0, out double y0, out double r0, out double x1, out double y1, out double r1); - internal static d_cairo_pattern_get_radial_circles cairo_pattern_get_radial_circles = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_radial_circles")); + internal static d_cairo_pattern_get_radial_circles cairo_pattern_get_radial_circles = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_radial_circles")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern uint cairo_pattern_get_reference_count (IntPtr pattern); internal delegate Status d_cairo_pattern_get_rgba(IntPtr pattern, out double red, out double green, out double blue, out double alpha); - internal static d_cairo_pattern_get_rgba cairo_pattern_get_rgba = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_rgba")); + internal static d_cairo_pattern_get_rgba cairo_pattern_get_rgba = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_rgba")); internal delegate Status d_cairo_pattern_get_surface(IntPtr pattern, out IntPtr surface); - internal static d_cairo_pattern_get_surface cairo_pattern_get_surface = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_surface")); + internal static d_cairo_pattern_get_surface cairo_pattern_get_surface = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_surface")); internal delegate PatternType d_cairo_pattern_get_type(IntPtr pattern); - internal static d_cairo_pattern_get_type cairo_pattern_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_type")); + internal static d_cairo_pattern_get_type cairo_pattern_get_type = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_type")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_pattern_get_user_data (IntPtr pattern, IntPtr key); internal delegate IntPtr d_cairo_pattern_reference(IntPtr pattern); - internal static d_cairo_pattern_reference cairo_pattern_reference = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_reference")); + internal static d_cairo_pattern_reference cairo_pattern_reference = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_reference")); internal delegate void d_cairo_pattern_set_extend(IntPtr pattern, Extend extend); - internal static d_cairo_pattern_set_extend cairo_pattern_set_extend = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_set_extend")); + internal static d_cairo_pattern_set_extend cairo_pattern_set_extend = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_set_extend")); internal delegate void d_cairo_pattern_set_filter(IntPtr pattern, Filter filter); - internal static d_cairo_pattern_set_filter cairo_pattern_set_filter = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_set_filter")); + internal static d_cairo_pattern_set_filter cairo_pattern_set_filter = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_set_filter")); internal delegate void d_cairo_pattern_set_matrix(IntPtr pattern, Matrix matrix); - internal static d_cairo_pattern_set_matrix cairo_pattern_set_matrix = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_set_matrix")); + internal static d_cairo_pattern_set_matrix cairo_pattern_set_matrix = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_set_matrix")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern Status cairo_pattern_set_user_data (IntPtr pattern, IntPtr key, IntPtr user_data, DestroyFunc destroy); internal delegate Status d_cairo_pattern_status(IntPtr pattern); - internal static d_cairo_pattern_status cairo_pattern_status = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_status")); + internal static d_cairo_pattern_status cairo_pattern_status = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_status")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern Status cairo_pdf_get_versions (IntPtr versions, out int num_versions); internal delegate IntPtr d_cairo_pdf_surface_create(string filename, double width, double height); - internal static d_cairo_pdf_surface_create cairo_pdf_surface_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pdf_surface_create")); + internal static d_cairo_pdf_surface_create cairo_pdf_surface_create = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pdf_surface_create")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_pdf_surface_create_for_stream (string filename, double width, double height); @@ -517,16 +517,16 @@ namespace Cairo //internal static extern void cairo_pdf_surface_restrict_to_version (IntPtr surface, PdfVersion version); internal delegate void d_cairo_pdf_surface_set_size(IntPtr surface, double x, double y); - internal static d_cairo_pdf_surface_set_size cairo_pdf_surface_set_size = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pdf_surface_set_size")); + internal static d_cairo_pdf_surface_set_size cairo_pdf_surface_set_size = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pdf_surface_set_size")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_pdf_version_to_string (PdfVersion version); internal delegate IntPtr d_cairo_pop_group(IntPtr cr); - internal static d_cairo_pop_group cairo_pop_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pop_group")); + internal static d_cairo_pop_group cairo_pop_group = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pop_group")); internal delegate void d_cairo_pop_group_to_source(IntPtr cr); - internal static d_cairo_pop_group_to_source cairo_pop_group_to_source = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pop_group_to_source")); + internal static d_cairo_pop_group_to_source cairo_pop_group_to_source = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pop_group_to_source")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern void cairo_ps_get_levels (IntPtr levels, out int num_levels); @@ -535,19 +535,19 @@ namespace Cairo //internal static extern IntPtr cairo_ps_level_to_string (PSLevel version); internal delegate IntPtr d_cairo_ps_surface_create(string filename, double width, double height); - internal static d_cairo_ps_surface_create cairo_ps_surface_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ps_surface_create")); + internal static d_cairo_ps_surface_create cairo_ps_surface_create = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ps_surface_create")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_ps_surface_create_for_stream (string filename, double width, double height); internal delegate void d_cairo_ps_surface_dsc_begin_page_setup(IntPtr surface); - internal static d_cairo_ps_surface_dsc_begin_page_setup cairo_ps_surface_dsc_begin_page_setup = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ps_surface_dsc_begin_page_setup")); + internal static d_cairo_ps_surface_dsc_begin_page_setup cairo_ps_surface_dsc_begin_page_setup = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ps_surface_dsc_begin_page_setup")); internal delegate void d_cairo_ps_surface_dsc_begin_setup(IntPtr surface); - internal static d_cairo_ps_surface_dsc_begin_setup cairo_ps_surface_dsc_begin_setup = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ps_surface_dsc_begin_setup")); + internal static d_cairo_ps_surface_dsc_begin_setup cairo_ps_surface_dsc_begin_setup = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ps_surface_dsc_begin_setup")); internal delegate void d_cairo_ps_surface_dsc_comment(IntPtr surface, string comment); - internal static d_cairo_ps_surface_dsc_comment cairo_ps_surface_dsc_comment = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ps_surface_dsc_comment")); + internal static d_cairo_ps_surface_dsc_comment cairo_ps_surface_dsc_comment = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ps_surface_dsc_comment")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //[return: MarshalAs (UnmanagedType.U1)] @@ -560,13 +560,13 @@ namespace Cairo //internal static extern void cairo_ps_surface_set_eps (IntPtr surface, bool eps); internal delegate void d_cairo_ps_surface_set_size(IntPtr surface, double x, double y); - internal static d_cairo_ps_surface_set_size cairo_ps_surface_set_size = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ps_surface_set_size")); + internal static d_cairo_ps_surface_set_size cairo_ps_surface_set_size = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ps_surface_set_size")); internal delegate void d_cairo_push_group(IntPtr cr); - internal static d_cairo_push_group cairo_push_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_push_group")); + internal static d_cairo_push_group cairo_push_group = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_push_group")); internal delegate void d_cairo_push_group_with_content(IntPtr cr, Content content); - internal static d_cairo_push_group_with_content cairo_push_group_with_content = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_push_group_with_content")); + internal static d_cairo_push_group_with_content cairo_push_group_with_content = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_push_group_with_content")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_quartz_font_face_create_for_atsui_font_id (int font_id); @@ -575,7 +575,7 @@ namespace Cairo //internal static extern IntPtr cairo_quartz_font_face_create_for_cgfont (IntPtr font); internal delegate IntPtr d_cairo_quartz_surface_create(IntPtr context, bool flipped, int width, int height); - internal static d_cairo_quartz_surface_create cairo_quartz_surface_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_quartz_surface_create")); + internal static d_cairo_quartz_surface_create cairo_quartz_surface_create = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_quartz_surface_create")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_quartz_surface_create_for_cg_context (IntPtr context, uint width, uint height); @@ -590,127 +590,127 @@ namespace Cairo //internal static extern void cairo_recording_surface_ink_extents (IntPtr surface, out double x, out double y, out double width, out double height); internal delegate void d_cairo_rectangle(IntPtr cr, double x, double y, double width, double height); - internal static d_cairo_rectangle cairo_rectangle = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_rectangle")); + internal static d_cairo_rectangle cairo_rectangle = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_rectangle")); internal delegate void d_cairo_rectangle_list_destroy(IntPtr rectangle_list); - internal static d_cairo_rectangle_list_destroy cairo_rectangle_list_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_rectangle_list_destroy")); + internal static d_cairo_rectangle_list_destroy cairo_rectangle_list_destroy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_rectangle_list_destroy")); internal delegate IntPtr d_cairo_reference(IntPtr cr); - internal static d_cairo_reference cairo_reference = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_reference")); + internal static d_cairo_reference cairo_reference = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_reference")); internal delegate bool d_cairo_region_contains_point(IntPtr region, int x, int y); - internal static d_cairo_region_contains_point cairo_region_contains_point = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_contains_point")); + internal static d_cairo_region_contains_point cairo_region_contains_point = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_contains_point")); internal delegate RegionOverlap d_cairo_region_contains_rectangle(IntPtr region, ref RectangleInt rectangle); - internal static d_cairo_region_contains_rectangle cairo_region_contains_rectangle = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_contains_rectangle")); + internal static d_cairo_region_contains_rectangle cairo_region_contains_rectangle = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_contains_rectangle")); internal delegate IntPtr d_cairo_region_copy(IntPtr original); - internal static d_cairo_region_copy cairo_region_copy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_copy")); + internal static d_cairo_region_copy cairo_region_copy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_copy")); internal delegate IntPtr d_cairo_region_create(); - internal static d_cairo_region_create cairo_region_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_create")); + internal static d_cairo_region_create cairo_region_create = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_create")); internal delegate IntPtr d_cairo_region_create_rectangle(ref RectangleInt rect); - internal static d_cairo_region_create_rectangle cairo_region_create_rectangle = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_create_rectangle")); + internal static d_cairo_region_create_rectangle cairo_region_create_rectangle = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_create_rectangle")); internal delegate IntPtr d_cairo_region_create_rectangles(RectangleInt[] rects, int count); - internal static d_cairo_region_create_rectangles cairo_region_create_rectangles = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_create_rectangles")); + internal static d_cairo_region_create_rectangles cairo_region_create_rectangles = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_create_rectangles")); internal delegate void d_cairo_region_destroy(IntPtr region); - internal static d_cairo_region_destroy cairo_region_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_destroy")); + internal static d_cairo_region_destroy cairo_region_destroy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_destroy")); internal delegate bool d_cairo_region_equal(IntPtr a, IntPtr b); - internal static d_cairo_region_equal cairo_region_equal = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_equal")); + internal static d_cairo_region_equal cairo_region_equal = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_equal")); internal delegate void d_cairo_region_get_extents(IntPtr region, out RectangleInt extents); - internal static d_cairo_region_get_extents cairo_region_get_extents = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_get_extents")); + internal static d_cairo_region_get_extents cairo_region_get_extents = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_get_extents")); internal delegate void d_cairo_region_get_rectangle(IntPtr region, int nth, out RectangleInt rectangle); - internal static d_cairo_region_get_rectangle cairo_region_get_rectangle = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_get_rectangle")); + internal static d_cairo_region_get_rectangle cairo_region_get_rectangle = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_get_rectangle")); internal delegate Status d_cairo_region_intersect(IntPtr dst, IntPtr other); - internal static d_cairo_region_intersect cairo_region_intersect = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_intersect")); + internal static d_cairo_region_intersect cairo_region_intersect = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_intersect")); internal delegate Status d_cairo_region_intersect_rectangle(IntPtr dst, ref RectangleInt rectangle); - internal static d_cairo_region_intersect_rectangle cairo_region_intersect_rectangle = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_intersect_rectangle")); + internal static d_cairo_region_intersect_rectangle cairo_region_intersect_rectangle = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_intersect_rectangle")); internal delegate bool d_cairo_region_is_empty(IntPtr region); - internal static d_cairo_region_is_empty cairo_region_is_empty = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_is_empty")); + internal static d_cairo_region_is_empty cairo_region_is_empty = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_is_empty")); internal delegate int d_cairo_region_num_rectangles(IntPtr region); - internal static d_cairo_region_num_rectangles cairo_region_num_rectangles = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_num_rectangles")); + internal static d_cairo_region_num_rectangles cairo_region_num_rectangles = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_num_rectangles")); internal delegate IntPtr d_cairo_region_reference(IntPtr region); - internal static d_cairo_region_reference cairo_region_reference = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_reference")); + internal static d_cairo_region_reference cairo_region_reference = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_reference")); internal delegate Status d_cairo_region_status(IntPtr region); - internal static d_cairo_region_status cairo_region_status = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_status")); + internal static d_cairo_region_status cairo_region_status = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_status")); internal delegate Status d_cairo_region_subtract(IntPtr dst, IntPtr other); - internal static d_cairo_region_subtract cairo_region_subtract = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_subtract")); + internal static d_cairo_region_subtract cairo_region_subtract = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_subtract")); internal delegate Status d_cairo_region_subtract_rectangle(IntPtr dst, ref RectangleInt rectangle); - internal static d_cairo_region_subtract_rectangle cairo_region_subtract_rectangle = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_subtract_rectangle")); + internal static d_cairo_region_subtract_rectangle cairo_region_subtract_rectangle = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_subtract_rectangle")); internal delegate void d_cairo_region_translate(IntPtr region, int dx, int dy); - internal static d_cairo_region_translate cairo_region_translate = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_translate")); + internal static d_cairo_region_translate cairo_region_translate = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_translate")); internal delegate Status d_cairo_region_union(IntPtr dst, IntPtr other); - internal static d_cairo_region_union cairo_region_union = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_union")); + internal static d_cairo_region_union cairo_region_union = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_union")); internal delegate Status d_cairo_region_union_rectangle(IntPtr dst, ref RectangleInt rectangle); - internal static d_cairo_region_union_rectangle cairo_region_union_rectangle = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_union_rectangle")); + internal static d_cairo_region_union_rectangle cairo_region_union_rectangle = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_union_rectangle")); internal delegate Status d_cairo_region_xor(IntPtr dst, IntPtr other); - internal static d_cairo_region_xor cairo_region_xor = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_xor")); + internal static d_cairo_region_xor cairo_region_xor = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_xor")); internal delegate Status d_cairo_region_xor_rectangle(IntPtr dst, ref RectangleInt rectangle); - internal static d_cairo_region_xor_rectangle cairo_region_xor_rectangle = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_xor_rectangle")); + internal static d_cairo_region_xor_rectangle cairo_region_xor_rectangle = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_xor_rectangle")); internal delegate void d_cairo_rel_curve_to(IntPtr cr, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3); - internal static d_cairo_rel_curve_to cairo_rel_curve_to = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_rel_curve_to")); + internal static d_cairo_rel_curve_to cairo_rel_curve_to = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_rel_curve_to")); internal delegate void d_cairo_rel_line_to(IntPtr cr, double dx, double dy); - internal static d_cairo_rel_line_to cairo_rel_line_to = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_rel_line_to")); + internal static d_cairo_rel_line_to cairo_rel_line_to = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_rel_line_to")); internal delegate void d_cairo_rel_move_to(IntPtr cr, double dx, double dy); - internal static d_cairo_rel_move_to cairo_rel_move_to = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_rel_move_to")); + internal static d_cairo_rel_move_to cairo_rel_move_to = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_rel_move_to")); internal delegate void d_cairo_reset_clip(IntPtr cr); - internal static d_cairo_reset_clip cairo_reset_clip = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_reset_clip")); + internal static d_cairo_reset_clip cairo_reset_clip = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_reset_clip")); internal delegate void d_cairo_restore(IntPtr cr); - internal static d_cairo_restore cairo_restore = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_restore")); + internal static d_cairo_restore cairo_restore = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_restore")); internal delegate void d_cairo_rotate(IntPtr cr, double angle); - internal static d_cairo_rotate cairo_rotate = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_rotate")); + internal static d_cairo_rotate cairo_rotate = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_rotate")); internal delegate void d_cairo_save(IntPtr cr); - internal static d_cairo_save cairo_save = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_save")); + internal static d_cairo_save cairo_save = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_save")); internal delegate void d_cairo_scale(IntPtr cr, double sx, double sy); - internal static d_cairo_scale cairo_scale = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scale")); + internal static d_cairo_scale cairo_scale = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scale")); internal delegate IntPtr d_cairo_scaled_font_create(IntPtr fontFace, Matrix matrix, Matrix ctm, IntPtr options); - internal static d_cairo_scaled_font_create cairo_scaled_font_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_create")); + internal static d_cairo_scaled_font_create cairo_scaled_font_create = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_create")); internal delegate IntPtr d_cairo_scaled_font_destroy(IntPtr scaled_font); - internal static d_cairo_scaled_font_destroy cairo_scaled_font_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_destroy")); + internal static d_cairo_scaled_font_destroy cairo_scaled_font_destroy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_destroy")); internal delegate void d_cairo_scaled_font_extents(IntPtr scaled_font, out FontExtents extents); - internal static d_cairo_scaled_font_extents cairo_scaled_font_extents = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_extents")); + internal static d_cairo_scaled_font_extents cairo_scaled_font_extents = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_extents")); internal delegate void d_cairo_scaled_font_get_ctm(IntPtr scaled_font, out Matrix matrix); - internal static d_cairo_scaled_font_get_ctm cairo_scaled_font_get_ctm = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_get_ctm")); + internal static d_cairo_scaled_font_get_ctm cairo_scaled_font_get_ctm = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_get_ctm")); internal delegate IntPtr d_cairo_scaled_font_get_font_face(IntPtr scaled_font); - internal static d_cairo_scaled_font_get_font_face cairo_scaled_font_get_font_face = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_get_font_face")); + internal static d_cairo_scaled_font_get_font_face cairo_scaled_font_get_font_face = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_get_font_face")); internal delegate void d_cairo_scaled_font_get_font_matrix(IntPtr scaled_font, out Matrix matrix); - internal static d_cairo_scaled_font_get_font_matrix cairo_scaled_font_get_font_matrix = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_get_font_matrix")); + internal static d_cairo_scaled_font_get_font_matrix cairo_scaled_font_get_font_matrix = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_get_font_matrix")); internal delegate IntPtr d_cairo_scaled_font_get_font_options(IntPtr scaled_font); - internal static d_cairo_scaled_font_get_font_options cairo_scaled_font_get_font_options = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_get_font_options")); + internal static d_cairo_scaled_font_get_font_options cairo_scaled_font_get_font_options = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_get_font_options")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] @@ -720,121 +720,121 @@ namespace Cairo //internal static extern void cairo_scaled_font_get_scale_matrix (IntPtr scaled_font, out Matrix matrix); internal delegate FontType d_cairo_scaled_font_get_type(IntPtr scaled_font); - internal static d_cairo_scaled_font_get_type cairo_scaled_font_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_get_type")); + internal static d_cairo_scaled_font_get_type cairo_scaled_font_get_type = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_get_type")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_scaled_font_get_user_data (IntPtr scaled_font, IntPtr key); internal delegate void d_cairo_scaled_font_glyph_extents(IntPtr scaled_font, IntPtr glyphs, int num_glyphs, out TextExtents extents); - internal static d_cairo_scaled_font_glyph_extents cairo_scaled_font_glyph_extents = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_glyph_extents")); + internal static d_cairo_scaled_font_glyph_extents cairo_scaled_font_glyph_extents = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_glyph_extents")); internal delegate IntPtr d_cairo_scaled_font_reference(IntPtr scaled_font); - internal static d_cairo_scaled_font_reference cairo_scaled_font_reference = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_reference")); + internal static d_cairo_scaled_font_reference cairo_scaled_font_reference = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_reference")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern Status cairo_scaled_font_set_user_data (IntPtr scaled_font, IntPtr key, IntPtr user_data, DestroyFunc destroy); internal delegate Status d_cairo_scaled_font_status(IntPtr scaled_font); - internal static d_cairo_scaled_font_status cairo_scaled_font_status = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_status")); + internal static d_cairo_scaled_font_status cairo_scaled_font_status = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_status")); internal delegate void d_cairo_scaled_font_text_extents(IntPtr scaled_font, string utf8, out TextExtents extents); - internal static d_cairo_scaled_font_text_extents cairo_scaled_font_text_extents = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_text_extents")); + internal static d_cairo_scaled_font_text_extents cairo_scaled_font_text_extents = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_text_extents")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern Status cairo_scaled_font_text_to_glyphs (IntPtr scaled_font, double x, double y, IntPtr utf8, IntPtr glyphs, out int num_glyphs, IntPtr clusters, out int num_clusters, IntPtr cluster_flags); internal delegate void d_cairo_select_font_face(IntPtr cr, string family, FontSlant slant, FontWeight weight); - internal static d_cairo_select_font_face cairo_select_font_face = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_select_font_face")); + internal static d_cairo_select_font_face cairo_select_font_face = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_select_font_face")); internal delegate void d_cairo_set_antialias(IntPtr cr, Antialias antialias); - internal static d_cairo_set_antialias cairo_set_antialias = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_antialias")); + internal static d_cairo_set_antialias cairo_set_antialias = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_antialias")); internal delegate void d_cairo_set_dash(IntPtr cr, double [] dashes, int ndash, double offset); - internal static d_cairo_set_dash cairo_set_dash = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_dash")); + internal static d_cairo_set_dash cairo_set_dash = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_dash")); internal delegate void d_cairo_set_fill_rule(IntPtr cr, Cairo.FillRule fill_rule); - internal static d_cairo_set_fill_rule cairo_set_fill_rule = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_fill_rule")); + internal static d_cairo_set_fill_rule cairo_set_fill_rule = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_fill_rule")); internal delegate void d_cairo_set_font_face(IntPtr cr, IntPtr fontFace); - internal static d_cairo_set_font_face cairo_set_font_face = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_font_face")); + internal static d_cairo_set_font_face cairo_set_font_face = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_font_face")); internal delegate void d_cairo_set_font_matrix(IntPtr cr, Matrix matrix); - internal static d_cairo_set_font_matrix cairo_set_font_matrix = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_font_matrix")); + internal static d_cairo_set_font_matrix cairo_set_font_matrix = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_font_matrix")); internal delegate void d_cairo_set_font_options(IntPtr cr, IntPtr options); - internal static d_cairo_set_font_options cairo_set_font_options = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_font_options")); + internal static d_cairo_set_font_options cairo_set_font_options = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_font_options")); internal delegate void d_cairo_set_font_size(IntPtr cr, double size); - internal static d_cairo_set_font_size cairo_set_font_size = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_font_size")); + internal static d_cairo_set_font_size cairo_set_font_size = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_font_size")); internal delegate void d_cairo_set_line_cap(IntPtr cr, LineCap line_cap); - internal static d_cairo_set_line_cap cairo_set_line_cap = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_line_cap")); + internal static d_cairo_set_line_cap cairo_set_line_cap = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_line_cap")); internal delegate void d_cairo_set_line_join(IntPtr cr, LineJoin line_join); - internal static d_cairo_set_line_join cairo_set_line_join = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_line_join")); + internal static d_cairo_set_line_join cairo_set_line_join = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_line_join")); internal delegate void d_cairo_set_line_width(IntPtr cr, double width); - internal static d_cairo_set_line_width cairo_set_line_width = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_line_width")); + internal static d_cairo_set_line_width cairo_set_line_width = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_line_width")); internal delegate void d_cairo_set_matrix(IntPtr cr, Matrix matrix); - internal static d_cairo_set_matrix cairo_set_matrix = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_matrix")); + internal static d_cairo_set_matrix cairo_set_matrix = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_matrix")); internal delegate void d_cairo_set_miter_limit(IntPtr cr, double limit); - internal static d_cairo_set_miter_limit cairo_set_miter_limit = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_miter_limit")); + internal static d_cairo_set_miter_limit cairo_set_miter_limit = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_miter_limit")); internal delegate void d_cairo_set_operator(IntPtr cr, Cairo.Operator op); - internal static d_cairo_set_operator cairo_set_operator = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_operator")); + internal static d_cairo_set_operator cairo_set_operator = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_operator")); internal delegate void d_cairo_set_scaled_font(IntPtr cr, IntPtr scaled_font); - internal static d_cairo_set_scaled_font cairo_set_scaled_font = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_scaled_font")); + internal static d_cairo_set_scaled_font cairo_set_scaled_font = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_scaled_font")); internal delegate void d_cairo_set_source(IntPtr cr, IntPtr pattern); - internal static d_cairo_set_source cairo_set_source = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_source")); + internal static d_cairo_set_source cairo_set_source = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_source")); internal delegate void d_cairo_set_source_rgb(IntPtr cr, double red, double green, double blue); - internal static d_cairo_set_source_rgb cairo_set_source_rgb = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_source_rgb")); + internal static d_cairo_set_source_rgb cairo_set_source_rgb = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_source_rgb")); internal delegate void d_cairo_set_source_rgba(IntPtr cr, double red, double green, double blue, double alpha); - internal static d_cairo_set_source_rgba cairo_set_source_rgba = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_source_rgba")); + internal static d_cairo_set_source_rgba cairo_set_source_rgba = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_source_rgba")); internal delegate void d_cairo_set_source_surface(IntPtr cr, IntPtr surface, double x, double y); - internal static d_cairo_set_source_surface cairo_set_source_surface = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_source_surface")); + internal static d_cairo_set_source_surface cairo_set_source_surface = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_source_surface")); internal delegate void d_cairo_set_tolerance(IntPtr cr, double tolerance); - internal static d_cairo_set_tolerance cairo_set_tolerance = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_tolerance")); + internal static d_cairo_set_tolerance cairo_set_tolerance = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_tolerance")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern Status cairo_set_user_data (IntPtr cr, IntPtr key, IntPtr user_data, DestroyFunc destroy); internal delegate void d_cairo_show_glyphs(IntPtr ct, IntPtr glyphs, int num_glyphs); - internal static d_cairo_show_glyphs cairo_show_glyphs = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_show_glyphs")); + internal static d_cairo_show_glyphs cairo_show_glyphs = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_show_glyphs")); internal delegate void d_cairo_show_page(IntPtr cr); - internal static d_cairo_show_page cairo_show_page = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_show_page")); + internal static d_cairo_show_page cairo_show_page = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_show_page")); internal delegate void d_cairo_show_text(IntPtr cr, byte[] utf8); - internal static d_cairo_show_text cairo_show_text = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_show_text")); + internal static d_cairo_show_text cairo_show_text = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_show_text")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern void cairo_show_text_glyphs (IntPtr cr, IntPtr utf8, int utf8_len, IntPtr glyphs, int num_glyphs, IntPtr clusters, int num_clusters, ClusterFlags cluster_flags); internal delegate Status d_cairo_status(IntPtr cr); - internal static d_cairo_status cairo_status = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_status")); + internal static d_cairo_status cairo_status = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_status")); internal delegate IntPtr d_cairo_status_to_string(Status status); - internal static d_cairo_status_to_string cairo_status_to_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_status_to_string")); + internal static d_cairo_status_to_string cairo_status_to_string = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_status_to_string")); internal delegate void d_cairo_stroke(IntPtr cr); - internal static d_cairo_stroke cairo_stroke = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_stroke")); + internal static d_cairo_stroke cairo_stroke = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_stroke")); internal delegate void d_cairo_stroke_extents(IntPtr cr, out double x1, out double y1, out double x2, out double y2); - internal static d_cairo_stroke_extents cairo_stroke_extents = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_stroke_extents")); + internal static d_cairo_stroke_extents cairo_stroke_extents = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_stroke_extents")); internal delegate void d_cairo_stroke_preserve(IntPtr cr); - internal static d_cairo_stroke_preserve cairo_stroke_preserve = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_stroke_preserve")); + internal static d_cairo_stroke_preserve cairo_stroke_preserve = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_stroke_preserve")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern void cairo_surface_copy_page (IntPtr surface); @@ -843,40 +843,40 @@ namespace Cairo //internal static extern IntPtr cairo_surface_create_for_rectangle (IntPtr surface, double x, double y, double width, double height); internal delegate IntPtr d_cairo_surface_create_similar(IntPtr surface, Cairo.Content content, int width, int height); - internal static d_cairo_surface_create_similar cairo_surface_create_similar = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_create_similar")); + internal static d_cairo_surface_create_similar cairo_surface_create_similar = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_create_similar")); internal delegate void d_cairo_surface_destroy(IntPtr surface); - internal static d_cairo_surface_destroy cairo_surface_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_destroy")); + internal static d_cairo_surface_destroy cairo_surface_destroy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_destroy")); internal delegate void d_cairo_surface_finish(IntPtr surface); - internal static d_cairo_surface_finish cairo_surface_finish = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_finish")); + internal static d_cairo_surface_finish cairo_surface_finish = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_finish")); internal delegate void d_cairo_surface_flush(IntPtr surface); - internal static d_cairo_surface_flush cairo_surface_flush = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_flush")); + internal static d_cairo_surface_flush cairo_surface_flush = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_flush")); internal delegate Content d_cairo_surface_get_content(IntPtr surface); - internal static d_cairo_surface_get_content cairo_surface_get_content = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_get_content")); + internal static d_cairo_surface_get_content cairo_surface_get_content = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_get_content")); internal delegate IntPtr d_cairo_surface_get_device(IntPtr surface); - internal static d_cairo_surface_get_device cairo_surface_get_device = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_get_device")); + internal static d_cairo_surface_get_device cairo_surface_get_device = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_get_device")); internal delegate void d_cairo_surface_get_device_offset(IntPtr surface, out double x, out double y); - internal static d_cairo_surface_get_device_offset cairo_surface_get_device_offset = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_get_device_offset")); + internal static d_cairo_surface_get_device_offset cairo_surface_get_device_offset = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_get_device_offset")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern void cairo_surface_get_fallback_resolution (IntPtr surface, out double x_pixels_per_inch, out double y_pixels_per_inch); internal delegate void d_cairo_surface_get_font_options(IntPtr surface, IntPtr FontOptions); - internal static d_cairo_surface_get_font_options cairo_surface_get_font_options = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_get_font_options")); + internal static d_cairo_surface_get_font_options cairo_surface_get_font_options = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_get_font_options")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern void cairo_surface_get_mime_data (IntPtr surface, IntPtr mime_type, out IntPtr data, out IntPtr length); internal delegate uint d_cairo_surface_get_reference_count(IntPtr surface); - internal static d_cairo_surface_get_reference_count cairo_surface_get_reference_count = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_get_reference_count")); + internal static d_cairo_surface_get_reference_count cairo_surface_get_reference_count = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_get_reference_count")); internal delegate SurfaceType d_cairo_surface_get_type(IntPtr surface); - internal static d_cairo_surface_get_type cairo_surface_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_get_type")); + internal static d_cairo_surface_get_type cairo_surface_get_type = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_get_type")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] @@ -887,19 +887,19 @@ namespace Cairo //internal static extern bool cairo_surface_has_show_text_glyphs (IntPtr surface); internal delegate void d_cairo_surface_mark_dirty(IntPtr surface); - internal static d_cairo_surface_mark_dirty cairo_surface_mark_dirty = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_mark_dirty")); + internal static d_cairo_surface_mark_dirty cairo_surface_mark_dirty = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_mark_dirty")); internal delegate void d_cairo_surface_mark_dirty_rectangle(IntPtr surface, int x, int y, int width, int height); - internal static d_cairo_surface_mark_dirty_rectangle cairo_surface_mark_dirty_rectangle = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_mark_dirty_rectangle")); + internal static d_cairo_surface_mark_dirty_rectangle cairo_surface_mark_dirty_rectangle = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_mark_dirty_rectangle")); internal delegate IntPtr d_cairo_surface_reference(IntPtr surface); - internal static d_cairo_surface_reference cairo_surface_reference = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_reference")); + internal static d_cairo_surface_reference cairo_surface_reference = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_reference")); internal delegate void d_cairo_surface_set_device_offset(IntPtr surface, double x, double y); - internal static d_cairo_surface_set_device_offset cairo_surface_set_device_offset = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_set_device_offset")); + internal static d_cairo_surface_set_device_offset cairo_surface_set_device_offset = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_set_device_offset")); internal delegate void d_cairo_surface_set_fallback_resolution(IntPtr surface, double x, double y); - internal static d_cairo_surface_set_fallback_resolution cairo_surface_set_fallback_resolution = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_set_fallback_resolution")); + internal static d_cairo_surface_set_fallback_resolution cairo_surface_set_fallback_resolution = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_set_fallback_resolution")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] @@ -909,10 +909,10 @@ namespace Cairo //internal static extern void cairo_surface_show_page (IntPtr surface); internal delegate Status d_cairo_surface_status(IntPtr surface); - internal static d_cairo_surface_status cairo_surface_status = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_status")); + internal static d_cairo_surface_status cairo_surface_status = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_status")); internal delegate void d_cairo_surface_write_to_png(IntPtr surface, string filename); - internal static d_cairo_surface_write_to_png cairo_surface_write_to_png = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_write_to_png")); + internal static d_cairo_surface_write_to_png cairo_surface_write_to_png = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_write_to_png")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern void cairo_surface_write_to_png_stream (IntPtr surface, WriteFunc writeFunc); @@ -921,13 +921,13 @@ namespace Cairo //internal static extern void cairo_svg_get_versions (out IntPtr versions, out int num_versions); internal delegate IntPtr d_cairo_svg_surface_create(string fileName, double width, double height); - internal static d_cairo_svg_surface_create cairo_svg_surface_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_svg_surface_create")); + internal static d_cairo_svg_surface_create cairo_svg_surface_create = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_svg_surface_create")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_svg_surface_create_for_stream (double width, double height); internal delegate IntPtr d_cairo_svg_surface_restrict_to_version(IntPtr surface, SvgVersion version); - internal static d_cairo_svg_surface_restrict_to_version cairo_svg_surface_restrict_to_version = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_svg_surface_restrict_to_version")); + internal static d_cairo_svg_surface_restrict_to_version cairo_svg_surface_restrict_to_version = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_svg_surface_restrict_to_version")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_svg_version_to_string (SvgVersion version); @@ -939,10 +939,10 @@ namespace Cairo //internal static extern void cairo_text_cluster_free (IntPtr clusters); internal delegate void d_cairo_text_extents(IntPtr cr, byte[] utf8, out TextExtents extents); - internal static d_cairo_text_extents cairo_text_extents = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_text_extents")); + internal static d_cairo_text_extents cairo_text_extents = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_text_extents")); internal delegate void d_cairo_text_path(IntPtr ct, byte[] utf8); - internal static d_cairo_text_path cairo_text_path = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_text_path")); + internal static d_cairo_text_path cairo_text_path = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_text_path")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_toy_font_face_create (IntPtr face, FontSlant slant, FontWeight weight); @@ -957,10 +957,10 @@ namespace Cairo //internal static extern FontWeight cairo_toy_font_face_get_weight (IntPtr face); internal delegate void d_cairo_transform(IntPtr cr, Matrix matrix); - internal static d_cairo_transform cairo_transform = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_transform")); + internal static d_cairo_transform cairo_transform = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_transform")); internal delegate void d_cairo_translate(IntPtr cr, double tx, double ty); - internal static d_cairo_translate cairo_translate = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_translate")); + internal static d_cairo_translate cairo_translate = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_translate")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_user_font_face_create (); @@ -990,26 +990,26 @@ namespace Cairo //internal static extern blah cairo_user_font_face_set_unicode_to_glyph_func (blah) internal delegate void d_cairo_user_to_device(IntPtr cr, ref double x, ref double y); - internal static d_cairo_user_to_device cairo_user_to_device = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_user_to_device")); + internal static d_cairo_user_to_device cairo_user_to_device = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_user_to_device")); internal delegate void d_cairo_user_to_device_distance(IntPtr cr, ref double dx, ref double dy); - internal static d_cairo_user_to_device_distance cairo_user_to_device_distance = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_user_to_device_distance")); + internal static d_cairo_user_to_device_distance cairo_user_to_device_distance = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_user_to_device_distance")); internal delegate int d_cairo_version(); - internal static d_cairo_version cairo_version = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_version")); + internal static d_cairo_version cairo_version = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_version")); internal delegate IntPtr d_cairo_version_string(); - internal static d_cairo_version_string cairo_version_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_version_string")); + internal static d_cairo_version_string cairo_version_string = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_version_string")); // not in the 1.10 doc index internal delegate IntPtr d_cairo_directfb_surface_create(IntPtr dfb, IntPtr surface); - internal static d_cairo_directfb_surface_create cairo_directfb_surface_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_directfb_surface_create")); + internal static d_cairo_directfb_surface_create cairo_directfb_surface_create = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_directfb_surface_create")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_win32_font_face_create_for_hfont (IntPtr hfont); internal delegate IntPtr d_cairo_win32_font_face_create_for_logfontw(IntPtr logfontw); - internal static d_cairo_win32_font_face_create_for_logfontw cairo_win32_font_face_create_for_logfontw = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_win32_font_face_create_for_logfontw")); + internal static d_cairo_win32_font_face_create_for_logfontw cairo_win32_font_face_create_for_logfontw = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_win32_font_face_create_for_logfontw")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_win32_font_face_create_for_logfontw_hfont (IntPtr logfontw, IntPtr hfont); @@ -1018,7 +1018,7 @@ namespace Cairo //internal static extern IntPtr cairo_win32_printing_surface_create (IntPtr hdc); internal delegate void d_cairo_win32_scaled_font_done_font(IntPtr scaled_font); - internal static d_cairo_win32_scaled_font_done_font cairo_win32_scaled_font_done_font = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_win32_scaled_font_done_font")); + internal static d_cairo_win32_scaled_font_done_font cairo_win32_scaled_font_done_font = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_win32_scaled_font_done_font")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern void cairo_win32_scaled_font_get_logical_to_device (IntPtr scaled_font, out IntPtr matrix); @@ -1027,16 +1027,16 @@ namespace Cairo //internal static extern void cairo_win32_scaled_font_get_device_to_logical (IntPtr scaled_font, out IntPtr matrix); internal delegate double d_cairo_win32_scaled_font_get_metrics_factor(IntPtr scaled_font); - internal static d_cairo_win32_scaled_font_get_metrics_factor cairo_win32_scaled_font_get_metrics_factor = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_win32_scaled_font_get_metrics_factor")); + internal static d_cairo_win32_scaled_font_get_metrics_factor cairo_win32_scaled_font_get_metrics_factor = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_win32_scaled_font_get_metrics_factor")); internal delegate Status d_cairo_win32_scaled_font_select_font(IntPtr scaled_font, IntPtr hdc); - internal static d_cairo_win32_scaled_font_select_font cairo_win32_scaled_font_select_font = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_win32_scaled_font_select_font")); + internal static d_cairo_win32_scaled_font_select_font cairo_win32_scaled_font_select_font = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_win32_scaled_font_select_font")); internal delegate IntPtr d_cairo_win32_surface_create(IntPtr hdc); - internal static d_cairo_win32_surface_create cairo_win32_surface_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_win32_surface_create")); + internal static d_cairo_win32_surface_create cairo_win32_surface_create = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_win32_surface_create")); internal delegate IntPtr d_cairo_win32_surface_create_with_ddb(IntPtr hdc, Format format, int width, int height); - internal static d_cairo_win32_surface_create_with_ddb cairo_win32_surface_create_with_ddb = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_win32_surface_create_with_ddb")); + internal static d_cairo_win32_surface_create_with_ddb cairo_win32_surface_create_with_ddb = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_win32_surface_create_with_ddb")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_win32_surface_create_with_dib (Format format, int width, int height); @@ -1049,47 +1049,47 @@ namespace Cairo // not in the 1.10 doc index internal delegate IntPtr d_cairo_xcb_surface_create(IntPtr connection, uint drawable, IntPtr visual, int width, int height); - internal static d_cairo_xcb_surface_create cairo_xcb_surface_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xcb_surface_create")); + internal static d_cairo_xcb_surface_create cairo_xcb_surface_create = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xcb_surface_create")); // not in the 1.10 doc index internal delegate IntPtr d_cairo_xcb_surface_create_for_bitmap(IntPtr connection, uint bitmap, IntPtr screen, int width, int height); - internal static d_cairo_xcb_surface_create_for_bitmap cairo_xcb_surface_create_for_bitmap = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xcb_surface_create_for_bitmap")); + internal static d_cairo_xcb_surface_create_for_bitmap cairo_xcb_surface_create_for_bitmap = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xcb_surface_create_for_bitmap")); // not in the 1.10 doc index internal delegate void d_cairo_xcb_surface_set_size(IntPtr surface, int width, int height); - internal static d_cairo_xcb_surface_set_size cairo_xcb_surface_set_size = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xcb_surface_set_size")); + internal static d_cairo_xcb_surface_set_size cairo_xcb_surface_set_size = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xcb_surface_set_size")); internal delegate IntPtr d_cairo_xlib_surface_create(IntPtr display, IntPtr drawable, IntPtr visual, int width, int height); - internal static d_cairo_xlib_surface_create cairo_xlib_surface_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_create")); + internal static d_cairo_xlib_surface_create cairo_xlib_surface_create = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_create")); internal delegate IntPtr d_cairo_xlib_surface_create_for_bitmap(IntPtr display, IntPtr bitmap, IntPtr screen, int width, int height); - internal static d_cairo_xlib_surface_create_for_bitmap cairo_xlib_surface_create_for_bitmap = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_create_for_bitmap")); + internal static d_cairo_xlib_surface_create_for_bitmap cairo_xlib_surface_create_for_bitmap = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_create_for_bitmap")); internal delegate int d_cairo_xlib_surface_get_depth(IntPtr surface); - internal static d_cairo_xlib_surface_get_depth cairo_xlib_surface_get_depth = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_get_depth")); + internal static d_cairo_xlib_surface_get_depth cairo_xlib_surface_get_depth = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_get_depth")); internal delegate IntPtr d_cairo_xlib_surface_get_display(IntPtr surface); - internal static d_cairo_xlib_surface_get_display cairo_xlib_surface_get_display = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_get_display")); + internal static d_cairo_xlib_surface_get_display cairo_xlib_surface_get_display = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_get_display")); internal delegate IntPtr d_cairo_xlib_surface_get_drawable(IntPtr surface); - internal static d_cairo_xlib_surface_get_drawable cairo_xlib_surface_get_drawable = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_get_drawable")); + internal static d_cairo_xlib_surface_get_drawable cairo_xlib_surface_get_drawable = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_get_drawable")); internal delegate int d_cairo_xlib_surface_get_height(IntPtr surface); - internal static d_cairo_xlib_surface_get_height cairo_xlib_surface_get_height = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_get_height")); + internal static d_cairo_xlib_surface_get_height cairo_xlib_surface_get_height = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_get_height")); internal delegate IntPtr d_cairo_xlib_surface_get_screen(IntPtr surface); - internal static d_cairo_xlib_surface_get_screen cairo_xlib_surface_get_screen = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_get_screen")); + internal static d_cairo_xlib_surface_get_screen cairo_xlib_surface_get_screen = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_get_screen")); internal delegate IntPtr d_cairo_xlib_surface_get_visual(IntPtr surface); - internal static d_cairo_xlib_surface_get_visual cairo_xlib_surface_get_visual = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_get_visual")); + internal static d_cairo_xlib_surface_get_visual cairo_xlib_surface_get_visual = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_get_visual")); internal delegate int d_cairo_xlib_surface_get_width(IntPtr surface); - internal static d_cairo_xlib_surface_get_width cairo_xlib_surface_get_width = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_get_width")); + internal static d_cairo_xlib_surface_get_width cairo_xlib_surface_get_width = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_get_width")); internal delegate void d_cairo_xlib_surface_set_drawable(IntPtr surface, IntPtr drawable, int width, int height); - internal static d_cairo_xlib_surface_set_drawable cairo_xlib_surface_set_drawable = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_set_drawable")); + internal static d_cairo_xlib_surface_set_drawable cairo_xlib_surface_set_drawable = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_set_drawable")); internal delegate void d_cairo_xlib_surface_set_size(IntPtr surface, int width, int height); - internal static d_cairo_xlib_surface_set_size cairo_xlib_surface_set_size = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_set_size")); + internal static d_cairo_xlib_surface_set_size cairo_xlib_surface_set_size = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_set_size")); } } diff --git a/Source/Libs/GLibSharp/Bytes.cs b/Source/Libs/GLibSharp/Bytes.cs index 479a52c8b..c9118df14 100755 --- a/Source/Libs/GLibSharp/Bytes.cs +++ b/Source/Libs/GLibSharp/Bytes.cs @@ -28,7 +28,7 @@ namespace GLib { public partial class Bytes : GLib.Opaque, IComparable, IEquatable { delegate IntPtr d_g_bytes_get_type(); - static d_g_bytes_get_type g_bytes_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_get_type")); + static d_g_bytes_get_type g_bytes_get_type = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_get_type")); public static GLib.GType GType { get { @@ -41,7 +41,7 @@ namespace GLib { public Bytes (IntPtr raw) : base (raw) {} delegate IntPtr d_g_bytes_new(byte [] data, UIntPtr size); - static d_g_bytes_new g_bytes_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_new")); + static d_g_bytes_new g_bytes_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_new")); public Bytes (byte [] data) { @@ -49,7 +49,7 @@ namespace GLib { } delegate IntPtr d_g_bytes_new_from_bytes(IntPtr raw, UIntPtr offset, UIntPtr length); - static d_g_bytes_new_from_bytes g_bytes_new_from_bytes = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_new_from_bytes")); + static d_g_bytes_new_from_bytes g_bytes_new_from_bytes = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_new_from_bytes")); public Bytes (Bytes bytes, ulong offset, ulong length) { @@ -57,7 +57,7 @@ namespace GLib { } delegate IntPtr d_g_bytes_new_take(byte [] data, UIntPtr size); - static d_g_bytes_new_take g_bytes_new_take = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_new_take")); + static d_g_bytes_new_take g_bytes_new_take = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_new_take")); public static Bytes NewTake (byte [] data) { @@ -65,7 +65,7 @@ namespace GLib { } delegate IntPtr d_g_bytes_new_static(byte [] data, UIntPtr size); - static d_g_bytes_new_static g_bytes_new_static = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_new_static")); + static d_g_bytes_new_static g_bytes_new_static = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_new_static")); public static Bytes NewStatic (byte [] data) { @@ -73,7 +73,7 @@ namespace GLib { } delegate int d_g_bytes_compare(IntPtr raw, IntPtr bytes); - static d_g_bytes_compare g_bytes_compare = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_compare")); + static d_g_bytes_compare g_bytes_compare = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_compare")); public int CompareTo (Bytes bytes) { @@ -81,7 +81,7 @@ namespace GLib { } delegate bool d_g_bytes_equal(IntPtr raw, IntPtr bytes2); - static d_g_bytes_equal g_bytes_equal = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_equal")); + static d_g_bytes_equal g_bytes_equal = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_equal")); public bool Equals (Bytes other) { @@ -89,7 +89,7 @@ namespace GLib { } delegate UIntPtr d_g_bytes_get_size(IntPtr raw); - static d_g_bytes_get_size g_bytes_get_size = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_get_size")); + static d_g_bytes_get_size g_bytes_get_size = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_get_size")); public ulong Size { get { @@ -98,7 +98,7 @@ namespace GLib { } delegate uint d_g_bytes_hash(IntPtr raw); - static d_g_bytes_hash g_bytes_hash = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_hash")); + static d_g_bytes_hash g_bytes_hash = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_hash")); public uint GetHash () { @@ -106,7 +106,7 @@ namespace GLib { } delegate IntPtr d_g_bytes_get_data(IntPtr raw, out UIntPtr size); - static d_g_bytes_get_data g_bytes_get_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_get_data")); + static d_g_bytes_get_data g_bytes_get_data = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_get_data")); public byte [] Data { get { @@ -125,7 +125,7 @@ namespace GLib { } delegate IntPtr d_g_bytes_ref(IntPtr raw); - static d_g_bytes_ref g_bytes_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_ref")); + static d_g_bytes_ref g_bytes_ref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_ref")); protected override void Ref (IntPtr raw) { @@ -136,7 +136,7 @@ namespace GLib { } delegate void d_g_bytes_unref(IntPtr raw); - static d_g_bytes_unref g_bytes_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_unref")); + static d_g_bytes_unref g_bytes_unref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_unref")); protected override void Unref (IntPtr raw) { diff --git a/Source/Libs/GLibSharp/Cond.cs b/Source/Libs/GLibSharp/Cond.cs index 22585e036..fa02ff139 100755 --- a/Source/Libs/GLibSharp/Cond.cs +++ b/Source/Libs/GLibSharp/Cond.cs @@ -17,42 +17,42 @@ namespace GLib { } delegate void d_g_cond_broadcast(IntPtr raw); - static d_g_cond_broadcast g_cond_broadcast = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_cond_broadcast")); + static d_g_cond_broadcast g_cond_broadcast = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_cond_broadcast")); public void Broadcast() { g_cond_broadcast(Handle); } delegate void d_g_cond_clear(IntPtr raw); - static d_g_cond_clear g_cond_clear = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_cond_clear")); + static d_g_cond_clear g_cond_clear = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_cond_clear")); public void Clear() { g_cond_clear(Handle); } delegate void d_g_cond_init(IntPtr raw); - static d_g_cond_init g_cond_init = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_cond_init")); + static d_g_cond_init g_cond_init = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_cond_init")); public void Init() { g_cond_init(Handle); } delegate void d_g_cond_signal(IntPtr raw); - static d_g_cond_signal g_cond_signal = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_cond_signal")); + static d_g_cond_signal g_cond_signal = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_cond_signal")); public void Signal() { g_cond_signal(Handle); } delegate void d_g_cond_wait(IntPtr raw, IntPtr mutex); - static d_g_cond_wait g_cond_wait = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_cond_wait")); + static d_g_cond_wait g_cond_wait = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_cond_wait")); public void Wait(GLib.Mutex mutex) { g_cond_wait(Handle, mutex == null ? IntPtr.Zero : mutex.Handle); } delegate bool d_g_cond_wait_until(IntPtr raw, IntPtr mutex, long end_time); - static d_g_cond_wait_until g_cond_wait_until = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_cond_wait_until")); + static d_g_cond_wait_until g_cond_wait_until = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_cond_wait_until")); public bool WaitUntil(GLib.Mutex mutex, long end_time) { bool raw_ret = g_cond_wait_until(Handle, mutex == null ? IntPtr.Zero : mutex.Handle, end_time); diff --git a/Source/Libs/GLibSharp/Date.cs b/Source/Libs/GLibSharp/Date.cs index adca884e1..f11f81811 100755 --- a/Source/Libs/GLibSharp/Date.cs +++ b/Source/Libs/GLibSharp/Date.cs @@ -12,7 +12,7 @@ namespace GLib { public partial class Date : GLib.Opaque { delegate IntPtr d_g_date_get_type(); - static d_g_date_get_type g_date_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_type")); + static d_g_date_get_type g_date_get_type = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_type")); public static GLib.GType GType { get { @@ -23,42 +23,42 @@ namespace GLib { } delegate void d_g_date_add_days(IntPtr raw, uint n_days); - static d_g_date_add_days g_date_add_days = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_add_days")); + static d_g_date_add_days g_date_add_days = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_add_days")); public void AddDays(uint n_days) { g_date_add_days(Handle, n_days); } delegate void d_g_date_add_months(IntPtr raw, uint n_months); - static d_g_date_add_months g_date_add_months = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_add_months")); + static d_g_date_add_months g_date_add_months = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_add_months")); public void AddMonths(uint n_months) { g_date_add_months(Handle, n_months); } delegate void d_g_date_add_years(IntPtr raw, uint n_years); - static d_g_date_add_years g_date_add_years = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_add_years")); + static d_g_date_add_years g_date_add_years = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_add_years")); public void AddYears(uint n_years) { g_date_add_years(Handle, n_years); } delegate void d_g_date_clamp(IntPtr raw, IntPtr min_date, IntPtr max_date); - static d_g_date_clamp g_date_clamp = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_clamp")); + static d_g_date_clamp g_date_clamp = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_clamp")); public void Clamp(GLib.Date min_date, GLib.Date max_date) { g_date_clamp(Handle, min_date == null ? IntPtr.Zero : min_date.Handle, max_date == null ? IntPtr.Zero : max_date.Handle); } delegate void d_g_date_clear(IntPtr raw, uint n_dates); - static d_g_date_clear g_date_clear = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_clear")); + static d_g_date_clear g_date_clear = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_clear")); public void Clear(uint n_dates) { g_date_clear(Handle, n_dates); } delegate int d_g_date_compare(IntPtr raw, IntPtr rhs); - static d_g_date_compare g_date_compare = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_compare")); + static d_g_date_compare g_date_compare = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_compare")); public int Compare(GLib.Date rhs) { int raw_ret = g_date_compare(Handle, rhs == null ? IntPtr.Zero : rhs.Handle); @@ -67,7 +67,7 @@ namespace GLib { } delegate int d_g_date_days_between(IntPtr raw, IntPtr date2); - static d_g_date_days_between g_date_days_between = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_days_between")); + static d_g_date_days_between g_date_days_between = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_days_between")); public int DaysBetween(GLib.Date date2) { int raw_ret = g_date_days_between(Handle, date2 == null ? IntPtr.Zero : date2.Handle); @@ -76,10 +76,10 @@ namespace GLib { } delegate byte d_g_date_get_day(IntPtr raw); - static d_g_date_get_day g_date_get_day = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_day")); + static d_g_date_get_day g_date_get_day = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_day")); delegate void d_g_date_set_day(IntPtr raw, byte day); - static d_g_date_set_day g_date_set_day = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_day")); + static d_g_date_set_day g_date_set_day = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_day")); public byte Day { get { @@ -93,7 +93,7 @@ namespace GLib { } delegate uint d_g_date_get_day_of_year(IntPtr raw); - static d_g_date_get_day_of_year g_date_get_day_of_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_day_of_year")); + static d_g_date_get_day_of_year g_date_get_day_of_year = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_day_of_year")); public uint DayOfYear { get { @@ -104,7 +104,7 @@ namespace GLib { } delegate uint d_g_date_get_iso8601_week_of_year(IntPtr raw); - static d_g_date_get_iso8601_week_of_year g_date_get_iso8601_week_of_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_iso8601_week_of_year")); + static d_g_date_get_iso8601_week_of_year g_date_get_iso8601_week_of_year = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_iso8601_week_of_year")); public uint Iso8601WeekOfYear { get { @@ -115,10 +115,10 @@ namespace GLib { } delegate uint d_g_date_get_julian(IntPtr raw); - static d_g_date_get_julian g_date_get_julian = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_julian")); + static d_g_date_get_julian g_date_get_julian = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_julian")); delegate void d_g_date_set_julian(IntPtr raw, uint julian_date); - static d_g_date_set_julian g_date_set_julian = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_julian")); + static d_g_date_set_julian g_date_set_julian = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_julian")); public uint Julian { get { @@ -132,7 +132,7 @@ namespace GLib { } delegate uint d_g_date_get_monday_week_of_year(IntPtr raw); - static d_g_date_get_monday_week_of_year g_date_get_monday_week_of_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_monday_week_of_year")); + static d_g_date_get_monday_week_of_year g_date_get_monday_week_of_year = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_monday_week_of_year")); public uint MondayWeekOfYear { get { @@ -143,10 +143,10 @@ namespace GLib { } delegate int d_g_date_get_month(IntPtr raw); - static d_g_date_get_month g_date_get_month = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_month")); + static d_g_date_get_month g_date_get_month = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_month")); delegate void d_g_date_set_month(IntPtr raw, int month); - static d_g_date_set_month g_date_set_month = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_month")); + static d_g_date_set_month g_date_set_month = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_month")); public int Month { get { @@ -160,7 +160,7 @@ namespace GLib { } delegate uint d_g_date_get_sunday_week_of_year(IntPtr raw); - static d_g_date_get_sunday_week_of_year g_date_get_sunday_week_of_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_sunday_week_of_year")); + static d_g_date_get_sunday_week_of_year g_date_get_sunday_week_of_year = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_sunday_week_of_year")); public uint SundayWeekOfYear { get { @@ -171,7 +171,7 @@ namespace GLib { } delegate int d_g_date_get_weekday(IntPtr raw); - static d_g_date_get_weekday g_date_get_weekday = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_weekday")); + static d_g_date_get_weekday g_date_get_weekday = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_weekday")); public int Weekday { get { @@ -182,10 +182,10 @@ namespace GLib { } delegate ushort d_g_date_get_year(IntPtr raw); - static d_g_date_get_year g_date_get_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_year")); + static d_g_date_get_year g_date_get_year = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_year")); delegate void d_g_date_set_year(IntPtr raw, ushort year); - static d_g_date_set_year g_date_set_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_year")); + static d_g_date_set_year g_date_set_year = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_year")); public ushort Year { get { @@ -199,7 +199,7 @@ namespace GLib { } delegate bool d_g_date_is_first_of_month(IntPtr raw); - static d_g_date_is_first_of_month g_date_is_first_of_month = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_is_first_of_month")); + static d_g_date_is_first_of_month g_date_is_first_of_month = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_is_first_of_month")); public bool IsFirstOfMonth { get { @@ -210,7 +210,7 @@ namespace GLib { } delegate bool d_g_date_is_last_of_month(IntPtr raw); - static d_g_date_is_last_of_month g_date_is_last_of_month = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_is_last_of_month")); + static d_g_date_is_last_of_month g_date_is_last_of_month = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_is_last_of_month")); public bool IsLastOfMonth { get { @@ -221,21 +221,21 @@ namespace GLib { } delegate void d_g_date_order(IntPtr raw, IntPtr date2); - static d_g_date_order g_date_order = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_order")); + static d_g_date_order g_date_order = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_order")); public void Order(GLib.Date date2) { g_date_order(Handle, date2 == null ? IntPtr.Zero : date2.Handle); } delegate void d_g_date_set_dmy(IntPtr raw, byte day, int month, ushort y); - static d_g_date_set_dmy g_date_set_dmy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_dmy")); + static d_g_date_set_dmy g_date_set_dmy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_dmy")); public void SetDmy(byte day, int month, ushort y) { g_date_set_dmy(Handle, day, month, y); } delegate void d_g_date_set_parse(IntPtr raw, IntPtr str); - static d_g_date_set_parse g_date_set_parse = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_parse")); + static d_g_date_set_parse g_date_set_parse = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_parse")); public string Parse { set { @@ -246,7 +246,7 @@ namespace GLib { } delegate void d_g_date_set_time(IntPtr raw, int time_); - static d_g_date_set_time g_date_set_time = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_time")); + static d_g_date_set_time g_date_set_time = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_time")); [Obsolete] public int Time { @@ -256,7 +256,7 @@ namespace GLib { } delegate void d_g_date_set_time_t(IntPtr raw, IntPtr timet); - static d_g_date_set_time_t g_date_set_time_t = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_time_t")); + static d_g_date_set_time_t g_date_set_time_t = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_time_t")); public long TimeT { set { @@ -265,7 +265,7 @@ namespace GLib { } delegate void d_g_date_set_time_val(IntPtr raw, IntPtr value); - static d_g_date_set_time_val g_date_set_time_val = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_time_val")); + static d_g_date_set_time_val g_date_set_time_val = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_time_val")); public GLib.TimeVal TimeVal { set { @@ -277,35 +277,35 @@ namespace GLib { } delegate void d_g_date_subtract_days(IntPtr raw, uint n_days); - static d_g_date_subtract_days g_date_subtract_days = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_subtract_days")); + static d_g_date_subtract_days g_date_subtract_days = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_subtract_days")); public void SubtractDays(uint n_days) { g_date_subtract_days(Handle, n_days); } delegate void d_g_date_subtract_months(IntPtr raw, uint n_months); - static d_g_date_subtract_months g_date_subtract_months = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_subtract_months")); + static d_g_date_subtract_months g_date_subtract_months = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_subtract_months")); public void SubtractMonths(uint n_months) { g_date_subtract_months(Handle, n_months); } delegate void d_g_date_subtract_years(IntPtr raw, uint n_years); - static d_g_date_subtract_years g_date_subtract_years = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_subtract_years")); + static d_g_date_subtract_years g_date_subtract_years = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_subtract_years")); public void SubtractYears(uint n_years) { g_date_subtract_years(Handle, n_years); } delegate void d_g_date_to_struct_tm(IntPtr raw, IntPtr tm); - static d_g_date_to_struct_tm g_date_to_struct_tm = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_to_struct_tm")); + static d_g_date_to_struct_tm g_date_to_struct_tm = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_to_struct_tm")); public void ToStructTm(IntPtr tm) { g_date_to_struct_tm(Handle, tm); } delegate bool d_g_date_valid(IntPtr raw); - static d_g_date_valid g_date_valid = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid")); + static d_g_date_valid g_date_valid = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid")); public bool Valid() { bool raw_ret = g_date_valid(Handle); @@ -314,7 +314,7 @@ namespace GLib { } delegate byte d_g_date_get_days_in_month(int month, ushort year); - static d_g_date_get_days_in_month g_date_get_days_in_month = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_days_in_month")); + static d_g_date_get_days_in_month g_date_get_days_in_month = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_days_in_month")); public static byte GetDaysInMonth(int month, ushort year) { byte raw_ret = g_date_get_days_in_month(month, year); @@ -323,7 +323,7 @@ namespace GLib { } delegate byte d_g_date_get_monday_weeks_in_year(ushort year); - static d_g_date_get_monday_weeks_in_year g_date_get_monday_weeks_in_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_monday_weeks_in_year")); + static d_g_date_get_monday_weeks_in_year g_date_get_monday_weeks_in_year = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_monday_weeks_in_year")); public static byte GetMondayWeeksInYear(ushort year) { byte raw_ret = g_date_get_monday_weeks_in_year(year); @@ -332,7 +332,7 @@ namespace GLib { } delegate byte d_g_date_get_sunday_weeks_in_year(ushort year); - static d_g_date_get_sunday_weeks_in_year g_date_get_sunday_weeks_in_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_sunday_weeks_in_year")); + static d_g_date_get_sunday_weeks_in_year g_date_get_sunday_weeks_in_year = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_sunday_weeks_in_year")); public static byte GetSundayWeeksInYear(ushort year) { byte raw_ret = g_date_get_sunday_weeks_in_year(year); @@ -341,7 +341,7 @@ namespace GLib { } delegate bool d_g_date_is_leap_year(ushort year); - static d_g_date_is_leap_year g_date_is_leap_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_is_leap_year")); + static d_g_date_is_leap_year g_date_is_leap_year = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_is_leap_year")); public static bool IsLeapYear(ushort year) { bool raw_ret = g_date_is_leap_year(year); @@ -350,7 +350,7 @@ namespace GLib { } delegate UIntPtr d_g_date_strftime(IntPtr s, UIntPtr slen, IntPtr format, IntPtr date); - static d_g_date_strftime g_date_strftime = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_strftime")); + static d_g_date_strftime g_date_strftime = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_strftime")); public static ulong Strftime(string s, string format, GLib.Date date) { IntPtr native_s = GLib.Marshaller.StringToPtrGStrdup (s); @@ -363,7 +363,7 @@ namespace GLib { } delegate bool d_g_date_valid_day(byte day); - static d_g_date_valid_day g_date_valid_day = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid_day")); + static d_g_date_valid_day g_date_valid_day = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid_day")); public static bool ValidDay(byte day) { bool raw_ret = g_date_valid_day(day); @@ -372,7 +372,7 @@ namespace GLib { } delegate bool d_g_date_valid_dmy(byte day, int month, ushort year); - static d_g_date_valid_dmy g_date_valid_dmy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid_dmy")); + static d_g_date_valid_dmy g_date_valid_dmy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid_dmy")); public static bool ValidDmy(byte day, int month, ushort year) { bool raw_ret = g_date_valid_dmy(day, month, year); @@ -381,7 +381,7 @@ namespace GLib { } delegate bool d_g_date_valid_julian(uint julian_date); - static d_g_date_valid_julian g_date_valid_julian = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid_julian")); + static d_g_date_valid_julian g_date_valid_julian = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid_julian")); public static bool ValidJulian(uint julian_date) { bool raw_ret = g_date_valid_julian(julian_date); @@ -390,7 +390,7 @@ namespace GLib { } delegate bool d_g_date_valid_month(int month); - static d_g_date_valid_month g_date_valid_month = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid_month")); + static d_g_date_valid_month g_date_valid_month = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid_month")); public static bool ValidMonth(int month) { bool raw_ret = g_date_valid_month(month); @@ -399,7 +399,7 @@ namespace GLib { } delegate bool d_g_date_valid_weekday(int weekday); - static d_g_date_valid_weekday g_date_valid_weekday = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid_weekday")); + static d_g_date_valid_weekday g_date_valid_weekday = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid_weekday")); public static bool ValidWeekday(int weekday) { bool raw_ret = g_date_valid_weekday(weekday); @@ -408,7 +408,7 @@ namespace GLib { } delegate bool d_g_date_valid_year(ushort year); - static d_g_date_valid_year g_date_valid_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid_year")); + static d_g_date_valid_year g_date_valid_year = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid_year")); public static bool ValidYear(ushort year) { bool raw_ret = g_date_valid_year(year); @@ -419,7 +419,7 @@ namespace GLib { public Date(IntPtr raw) : base(raw) {} delegate IntPtr d_g_date_new(); - static d_g_date_new g_date_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_new")); + static d_g_date_new g_date_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_new")); public Date () { @@ -427,7 +427,7 @@ namespace GLib { } delegate IntPtr d_g_date_new_dmy(byte day, int month, ushort year); - static d_g_date_new_dmy g_date_new_dmy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_new_dmy")); + static d_g_date_new_dmy g_date_new_dmy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_new_dmy")); public Date (byte day, int month, ushort year) { @@ -435,7 +435,7 @@ namespace GLib { } delegate IntPtr d_g_date_new_julian(uint julian_day); - static d_g_date_new_julian g_date_new_julian = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_new_julian")); + static d_g_date_new_julian g_date_new_julian = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_new_julian")); public Date (uint julian_day) { @@ -443,7 +443,7 @@ namespace GLib { } delegate void d_g_date_free(IntPtr raw); - static d_g_date_free g_date_free = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_free")); + static d_g_date_free g_date_free = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_free")); protected override void Free (IntPtr raw) { diff --git a/Source/Libs/GLibSharp/DateTime.cs b/Source/Libs/GLibSharp/DateTime.cs index f9bdcbd3b..d4a4b2441 100755 --- a/Source/Libs/GLibSharp/DateTime.cs +++ b/Source/Libs/GLibSharp/DateTime.cs @@ -12,7 +12,7 @@ namespace GLib { public partial class DateTime : GLib.Opaque { delegate IntPtr d_g_date_time_get_type(); - static d_g_date_time_get_type g_date_time_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_type")); + static d_g_date_time_get_type g_date_time_get_type = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_type")); public static GLib.GType GType { get { @@ -23,7 +23,7 @@ namespace GLib { } delegate IntPtr d_g_date_time_add(IntPtr raw, long timespan); - static d_g_date_time_add g_date_time_add = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add")); + static d_g_date_time_add g_date_time_add = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add")); public GLib.DateTime Add(long timespan) { IntPtr raw_ret = g_date_time_add(Handle, timespan); @@ -32,7 +32,7 @@ namespace GLib { } delegate IntPtr d_g_date_time_add_days(IntPtr raw, int days); - static d_g_date_time_add_days g_date_time_add_days = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_days")); + static d_g_date_time_add_days g_date_time_add_days = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_days")); public GLib.DateTime AddDays(int days) { IntPtr raw_ret = g_date_time_add_days(Handle, days); @@ -41,7 +41,7 @@ namespace GLib { } delegate IntPtr d_g_date_time_add_full(IntPtr raw, int years, int months, int days, int hours, int minutes, double seconds); - static d_g_date_time_add_full g_date_time_add_full = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_full")); + static d_g_date_time_add_full g_date_time_add_full = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_full")); public GLib.DateTime AddFull(int years, int months, int days, int hours, int minutes, double seconds) { IntPtr raw_ret = g_date_time_add_full(Handle, years, months, days, hours, minutes, seconds); @@ -50,7 +50,7 @@ namespace GLib { } delegate IntPtr d_g_date_time_add_hours(IntPtr raw, int hours); - static d_g_date_time_add_hours g_date_time_add_hours = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_hours")); + static d_g_date_time_add_hours g_date_time_add_hours = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_hours")); public GLib.DateTime AddHours(int hours) { IntPtr raw_ret = g_date_time_add_hours(Handle, hours); @@ -59,7 +59,7 @@ namespace GLib { } delegate IntPtr d_g_date_time_add_minutes(IntPtr raw, int minutes); - static d_g_date_time_add_minutes g_date_time_add_minutes = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_minutes")); + static d_g_date_time_add_minutes g_date_time_add_minutes = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_minutes")); public GLib.DateTime AddMinutes(int minutes) { IntPtr raw_ret = g_date_time_add_minutes(Handle, minutes); @@ -68,7 +68,7 @@ namespace GLib { } delegate IntPtr d_g_date_time_add_months(IntPtr raw, int months); - static d_g_date_time_add_months g_date_time_add_months = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_months")); + static d_g_date_time_add_months g_date_time_add_months = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_months")); public GLib.DateTime AddMonths(int months) { IntPtr raw_ret = g_date_time_add_months(Handle, months); @@ -77,7 +77,7 @@ namespace GLib { } delegate IntPtr d_g_date_time_add_seconds(IntPtr raw, double seconds); - static d_g_date_time_add_seconds g_date_time_add_seconds = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_seconds")); + static d_g_date_time_add_seconds g_date_time_add_seconds = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_seconds")); public GLib.DateTime AddSeconds(double seconds) { IntPtr raw_ret = g_date_time_add_seconds(Handle, seconds); @@ -86,7 +86,7 @@ namespace GLib { } delegate IntPtr d_g_date_time_add_weeks(IntPtr raw, int weeks); - static d_g_date_time_add_weeks g_date_time_add_weeks = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_weeks")); + static d_g_date_time_add_weeks g_date_time_add_weeks = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_weeks")); public GLib.DateTime AddWeeks(int weeks) { IntPtr raw_ret = g_date_time_add_weeks(Handle, weeks); @@ -95,7 +95,7 @@ namespace GLib { } delegate IntPtr d_g_date_time_add_years(IntPtr raw, int years); - static d_g_date_time_add_years g_date_time_add_years = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_years")); + static d_g_date_time_add_years g_date_time_add_years = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_years")); public GLib.DateTime AddYears(int years) { IntPtr raw_ret = g_date_time_add_years(Handle, years); @@ -104,7 +104,7 @@ namespace GLib { } delegate long d_g_date_time_difference(IntPtr raw, IntPtr begin); - static d_g_date_time_difference g_date_time_difference = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_difference")); + static d_g_date_time_difference g_date_time_difference = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_difference")); public long Difference(GLib.DateTime begin) { long raw_ret = g_date_time_difference(Handle, begin == null ? IntPtr.Zero : begin.Handle); @@ -113,7 +113,7 @@ namespace GLib { } delegate IntPtr d_g_date_time_format(IntPtr raw, IntPtr format); - static d_g_date_time_format g_date_time_format = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_format")); + static d_g_date_time_format g_date_time_format = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_format")); public string Format(string format) { IntPtr native_format = GLib.Marshaller.StringToPtrGStrdup (format); @@ -124,7 +124,7 @@ namespace GLib { } delegate int d_g_date_time_get_day_of_month(IntPtr raw); - static d_g_date_time_get_day_of_month g_date_time_get_day_of_month = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_day_of_month")); + static d_g_date_time_get_day_of_month g_date_time_get_day_of_month = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_day_of_month")); public int DayOfMonth { get { @@ -135,7 +135,7 @@ namespace GLib { } delegate int d_g_date_time_get_day_of_week(IntPtr raw); - static d_g_date_time_get_day_of_week g_date_time_get_day_of_week = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_day_of_week")); + static d_g_date_time_get_day_of_week g_date_time_get_day_of_week = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_day_of_week")); public int DayOfWeek { get { @@ -146,7 +146,7 @@ namespace GLib { } delegate int d_g_date_time_get_day_of_year(IntPtr raw); - static d_g_date_time_get_day_of_year g_date_time_get_day_of_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_day_of_year")); + static d_g_date_time_get_day_of_year g_date_time_get_day_of_year = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_day_of_year")); public int DayOfYear { get { @@ -157,7 +157,7 @@ namespace GLib { } delegate int d_g_date_time_get_hour(IntPtr raw); - static d_g_date_time_get_hour g_date_time_get_hour = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_hour")); + static d_g_date_time_get_hour g_date_time_get_hour = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_hour")); public int Hour { get { @@ -168,7 +168,7 @@ namespace GLib { } delegate int d_g_date_time_get_microsecond(IntPtr raw); - static d_g_date_time_get_microsecond g_date_time_get_microsecond = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_microsecond")); + static d_g_date_time_get_microsecond g_date_time_get_microsecond = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_microsecond")); public int Microsecond { get { @@ -179,7 +179,7 @@ namespace GLib { } delegate int d_g_date_time_get_minute(IntPtr raw); - static d_g_date_time_get_minute g_date_time_get_minute = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_minute")); + static d_g_date_time_get_minute g_date_time_get_minute = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_minute")); public int Minute { get { @@ -190,7 +190,7 @@ namespace GLib { } delegate int d_g_date_time_get_month(IntPtr raw); - static d_g_date_time_get_month g_date_time_get_month = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_month")); + static d_g_date_time_get_month g_date_time_get_month = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_month")); public int Month { get { @@ -201,7 +201,7 @@ namespace GLib { } delegate int d_g_date_time_get_second(IntPtr raw); - static d_g_date_time_get_second g_date_time_get_second = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_second")); + static d_g_date_time_get_second g_date_time_get_second = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_second")); public int Second { get { @@ -212,7 +212,7 @@ namespace GLib { } delegate double d_g_date_time_get_seconds(IntPtr raw); - static d_g_date_time_get_seconds g_date_time_get_seconds = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_seconds")); + static d_g_date_time_get_seconds g_date_time_get_seconds = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_seconds")); public double Seconds { get { @@ -223,7 +223,7 @@ namespace GLib { } delegate IntPtr d_g_date_time_get_timezone_abbreviation(IntPtr raw); - static d_g_date_time_get_timezone_abbreviation g_date_time_get_timezone_abbreviation = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_timezone_abbreviation")); + static d_g_date_time_get_timezone_abbreviation g_date_time_get_timezone_abbreviation = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_timezone_abbreviation")); public string TimezoneAbbreviation { get { @@ -234,7 +234,7 @@ namespace GLib { } delegate long d_g_date_time_get_utc_offset(IntPtr raw); - static d_g_date_time_get_utc_offset g_date_time_get_utc_offset = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_utc_offset")); + static d_g_date_time_get_utc_offset g_date_time_get_utc_offset = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_utc_offset")); public long UtcOffset { get { @@ -245,7 +245,7 @@ namespace GLib { } delegate int d_g_date_time_get_week_numbering_year(IntPtr raw); - static d_g_date_time_get_week_numbering_year g_date_time_get_week_numbering_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_week_numbering_year")); + static d_g_date_time_get_week_numbering_year g_date_time_get_week_numbering_year = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_week_numbering_year")); public int WeekNumberingYear { get { @@ -256,7 +256,7 @@ namespace GLib { } delegate int d_g_date_time_get_week_of_year(IntPtr raw); - static d_g_date_time_get_week_of_year g_date_time_get_week_of_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_week_of_year")); + static d_g_date_time_get_week_of_year g_date_time_get_week_of_year = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_week_of_year")); public int WeekOfYear { get { @@ -267,7 +267,7 @@ namespace GLib { } delegate int d_g_date_time_get_year(IntPtr raw); - static d_g_date_time_get_year g_date_time_get_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_year")); + static d_g_date_time_get_year g_date_time_get_year = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_year")); public int Year { get { @@ -278,14 +278,14 @@ namespace GLib { } delegate void d_g_date_time_get_ymd(IntPtr raw, out int year, out int month, out int day); - static d_g_date_time_get_ymd g_date_time_get_ymd = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_ymd")); + static d_g_date_time_get_ymd g_date_time_get_ymd = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_ymd")); public void GetYmd(out int year, out int month, out int day) { g_date_time_get_ymd(Handle, out year, out month, out day); } delegate bool d_g_date_time_is_daylight_savings(IntPtr raw); - static d_g_date_time_is_daylight_savings g_date_time_is_daylight_savings = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_is_daylight_savings")); + static d_g_date_time_is_daylight_savings g_date_time_is_daylight_savings = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_is_daylight_savings")); public bool IsDaylightSavings { get { @@ -296,7 +296,7 @@ namespace GLib { } delegate IntPtr d_g_date_time_to_local(IntPtr raw); - static d_g_date_time_to_local g_date_time_to_local = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_to_local")); + static d_g_date_time_to_local g_date_time_to_local = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_to_local")); public GLib.DateTime ToLocal() { IntPtr raw_ret = g_date_time_to_local(Handle); @@ -305,7 +305,7 @@ namespace GLib { } delegate bool d_g_date_time_to_timeval(IntPtr raw, IntPtr tv); - static d_g_date_time_to_timeval g_date_time_to_timeval = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_to_timeval")); + static d_g_date_time_to_timeval g_date_time_to_timeval = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_to_timeval")); public bool ToTimeval(GLib.TimeVal tv) { IntPtr native_tv = GLib.Marshaller.StructureToPtrAlloc (tv); @@ -317,7 +317,7 @@ namespace GLib { } delegate IntPtr d_g_date_time_to_timezone(IntPtr raw, IntPtr tz); - static d_g_date_time_to_timezone g_date_time_to_timezone = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_to_timezone")); + static d_g_date_time_to_timezone g_date_time_to_timezone = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_to_timezone")); public GLib.DateTime ToTimezone(GLib.TimeZone tz) { IntPtr raw_ret = g_date_time_to_timezone(Handle, tz == null ? IntPtr.Zero : tz.Handle); @@ -326,7 +326,7 @@ namespace GLib { } delegate long d_g_date_time_to_unix(IntPtr raw); - static d_g_date_time_to_unix g_date_time_to_unix = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_to_unix")); + static d_g_date_time_to_unix g_date_time_to_unix = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_to_unix")); public long ToUnix() { long raw_ret = g_date_time_to_unix(Handle); @@ -335,7 +335,7 @@ namespace GLib { } delegate IntPtr d_g_date_time_to_utc(IntPtr raw); - static d_g_date_time_to_utc g_date_time_to_utc = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_to_utc")); + static d_g_date_time_to_utc g_date_time_to_utc = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_to_utc")); public GLib.DateTime ToUtc() { IntPtr raw_ret = g_date_time_to_utc(Handle); @@ -344,7 +344,7 @@ namespace GLib { } delegate int d_g_date_time_compare(IntPtr dt1, IntPtr dt2); - static d_g_date_time_compare g_date_time_compare = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_compare")); + static d_g_date_time_compare g_date_time_compare = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_compare")); public static int Compare(IntPtr dt1, IntPtr dt2) { int raw_ret = g_date_time_compare(dt1, dt2); @@ -353,7 +353,7 @@ namespace GLib { } delegate bool d_g_date_time_equal(IntPtr dt1, IntPtr dt2); - static d_g_date_time_equal g_date_time_equal = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_equal")); + static d_g_date_time_equal g_date_time_equal = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_equal")); public static bool Equal(IntPtr dt1, IntPtr dt2) { bool raw_ret = g_date_time_equal(dt1, dt2); @@ -362,7 +362,7 @@ namespace GLib { } delegate uint d_g_date_time_hash(IntPtr datetime); - static d_g_date_time_hash g_date_time_hash = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_hash")); + static d_g_date_time_hash g_date_time_hash = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_hash")); public static uint Hash(IntPtr datetime) { uint raw_ret = g_date_time_hash(datetime); @@ -373,7 +373,7 @@ namespace GLib { public DateTime(IntPtr raw) : base(raw) {} delegate IntPtr d_g_date_time_new(IntPtr tz, int year, int month, int day, int hour, int minute, double seconds); - static d_g_date_time_new g_date_time_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new")); + static d_g_date_time_new g_date_time_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new")); public DateTime (GLib.TimeZone tz, int year, int month, int day, int hour, int minute, double seconds) { @@ -381,7 +381,7 @@ namespace GLib { } delegate IntPtr d_g_date_time_new_from_timeval_local(IntPtr tv); - static d_g_date_time_new_from_timeval_local g_date_time_new_from_timeval_local = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_from_timeval_local")); + static d_g_date_time_new_from_timeval_local g_date_time_new_from_timeval_local = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_from_timeval_local")); public DateTime (GLib.TimeVal tv) { @@ -392,7 +392,7 @@ namespace GLib { } delegate IntPtr d_g_date_time_new_from_timeval_utc(IntPtr tv); - static d_g_date_time_new_from_timeval_utc g_date_time_new_from_timeval_utc = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_from_timeval_utc")); + static d_g_date_time_new_from_timeval_utc g_date_time_new_from_timeval_utc = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_from_timeval_utc")); public static DateTime NewFromTimevalUtc(GLib.TimeVal tv) { @@ -404,7 +404,7 @@ namespace GLib { } delegate IntPtr d_g_date_time_new_from_unix_local(long t); - static d_g_date_time_new_from_unix_local g_date_time_new_from_unix_local = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_from_unix_local")); + static d_g_date_time_new_from_unix_local g_date_time_new_from_unix_local = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_from_unix_local")); public DateTime (long t) { @@ -412,7 +412,7 @@ namespace GLib { } delegate IntPtr d_g_date_time_new_from_unix_utc(long t); - static d_g_date_time_new_from_unix_utc g_date_time_new_from_unix_utc = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_from_unix_utc")); + static d_g_date_time_new_from_unix_utc g_date_time_new_from_unix_utc = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_from_unix_utc")); public static DateTime NewFromUnixUtc(long t) { @@ -421,7 +421,7 @@ namespace GLib { } delegate IntPtr d_g_date_time_new_local(int year, int month, int day, int hour, int minute, double seconds); - static d_g_date_time_new_local g_date_time_new_local = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_local")); + static d_g_date_time_new_local g_date_time_new_local = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_local")); public DateTime (int year, int month, int day, int hour, int minute, double seconds) { @@ -429,7 +429,7 @@ namespace GLib { } delegate IntPtr d_g_date_time_new_now(IntPtr tz); - static d_g_date_time_new_now g_date_time_new_now = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_now")); + static d_g_date_time_new_now g_date_time_new_now = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_now")); public DateTime (GLib.TimeZone tz) { @@ -437,7 +437,7 @@ namespace GLib { } delegate IntPtr d_g_date_time_new_now_local(); - static d_g_date_time_new_now_local g_date_time_new_now_local = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_now_local")); + static d_g_date_time_new_now_local g_date_time_new_now_local = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_now_local")); public DateTime () { @@ -445,7 +445,7 @@ namespace GLib { } delegate IntPtr d_g_date_time_new_now_utc(); - static d_g_date_time_new_now_utc g_date_time_new_now_utc = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_now_utc")); + static d_g_date_time_new_now_utc g_date_time_new_now_utc = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_now_utc")); public static DateTime NewNowUtc() { @@ -454,7 +454,7 @@ namespace GLib { } delegate IntPtr d_g_date_time_new_utc(int year, int month, int day, int hour, int minute, double seconds); - static d_g_date_time_new_utc g_date_time_new_utc = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_utc")); + static d_g_date_time_new_utc g_date_time_new_utc = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_utc")); public static DateTime NewUtc(int year, int month, int day, int hour, int minute, double seconds) { @@ -463,7 +463,7 @@ namespace GLib { } delegate IntPtr d_g_date_time_ref(IntPtr raw); - static d_g_date_time_ref g_date_time_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_ref")); + static d_g_date_time_ref g_date_time_ref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_ref")); protected override void Ref (IntPtr raw) { @@ -474,7 +474,7 @@ namespace GLib { } delegate void d_g_date_time_unref(IntPtr raw); - static d_g_date_time_unref g_date_time_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_unref")); + static d_g_date_time_unref g_date_time_unref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_unref")); protected override void Unref (IntPtr raw) { diff --git a/Source/Libs/GLibSharp/FileUtils.cs b/Source/Libs/GLibSharp/FileUtils.cs index f03d6073c..797fe2342 100755 --- a/Source/Libs/GLibSharp/FileUtils.cs +++ b/Source/Libs/GLibSharp/FileUtils.cs @@ -27,10 +27,10 @@ namespace GLib { public class FileUtils { delegate bool d_g_file_get_contents(IntPtr filename, out IntPtr contents, out int length, out IntPtr error); - static d_g_file_get_contents g_file_get_contents = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_file_get_contents")); + static d_g_file_get_contents g_file_get_contents = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_file_get_contents")); delegate bool d_g_file_get_contents_utf8(IntPtr filename, out IntPtr contents, out int length, out IntPtr error); - static d_g_file_get_contents_utf8 g_file_get_contents_utf8 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_file_get_contents_utf8")); + static d_g_file_get_contents_utf8 g_file_get_contents_utf8 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_file_get_contents_utf8")); public static string GetFileContents (string filename) { diff --git a/Source/Libs/GLibSharp/GException.cs b/Source/Libs/GLibSharp/GException.cs index 5bcf63604..a2a8cfa72 100755 --- a/Source/Libs/GLibSharp/GException.cs +++ b/Source/Libs/GLibSharp/GException.cs @@ -61,7 +61,7 @@ namespace GLib { } delegate void d_g_clear_error(ref IntPtr errptr); - static d_g_clear_error g_clear_error = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_clear_error")); + static d_g_clear_error g_clear_error = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_clear_error")); ~GException () { g_clear_error (ref errptr); diff --git a/Source/Libs/GLibSharp/GString.cs b/Source/Libs/GLibSharp/GString.cs index bf639e43a..f4ffc996f 100755 --- a/Source/Libs/GLibSharp/GString.cs +++ b/Source/Libs/GLibSharp/GString.cs @@ -28,7 +28,7 @@ namespace GLib { IntPtr handle; delegate IntPtr d_g_string_free(IntPtr mem, bool free_segments); - static d_g_string_free g_string_free = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_string_free")); + static d_g_string_free g_string_free = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_string_free")); ~GString () { @@ -36,7 +36,7 @@ namespace GLib { } delegate IntPtr d_g_string_new(IntPtr text); - static d_g_string_new g_string_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_string_new")); + static d_g_string_new g_string_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_string_new")); public GString (string text) { diff --git a/Source/Libs/GLibSharp/GType.cs b/Source/Libs/GLibSharp/GType.cs index 3302df912..ad22c12cc 100755 --- a/Source/Libs/GLibSharp/GType.cs +++ b/Source/Libs/GLibSharp/GType.cs @@ -432,36 +432,36 @@ namespace GLib { } delegate IntPtr d_g_type_class_peek(IntPtr gtype); - static d_g_type_class_peek g_type_class_peek = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_class_peek")); + static d_g_type_class_peek g_type_class_peek = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_class_peek")); delegate IntPtr d_g_type_class_ref(IntPtr gtype); - static d_g_type_class_ref g_type_class_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_class_ref")); + static d_g_type_class_ref g_type_class_ref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_class_ref")); delegate IntPtr d_g_type_default_interface_peek(IntPtr gtype); - static d_g_type_default_interface_peek g_type_default_interface_peek = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_default_interface_peek")); + static d_g_type_default_interface_peek g_type_default_interface_peek = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_default_interface_peek")); delegate IntPtr d_g_type_default_interface_ref(IntPtr gtype); - static d_g_type_default_interface_ref g_type_default_interface_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_default_interface_ref")); + static d_g_type_default_interface_ref g_type_default_interface_ref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_default_interface_ref")); delegate IntPtr d_g_type_from_name(string name); - static d_g_type_from_name g_type_from_name = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_from_name")); + static d_g_type_from_name g_type_from_name = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_from_name")); delegate void d_g_type_init(); - static d_g_type_init g_type_init = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_init")); + static d_g_type_init g_type_init = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_init")); delegate IntPtr d_g_type_name(IntPtr raw); - static d_g_type_name g_type_name = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_name")); + static d_g_type_name g_type_name = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_name")); delegate IntPtr d_g_type_parent(IntPtr type); - static d_g_type_parent g_type_parent = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_parent")); + static d_g_type_parent g_type_parent = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_parent")); delegate void d_g_type_query(IntPtr type, out GTypeQuery query); - static d_g_type_query g_type_query = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_query")); + static d_g_type_query g_type_query = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_query")); delegate IntPtr d_g_type_register_static(IntPtr parent, IntPtr name, ref GTypeInfo info, int flags); - static d_g_type_register_static g_type_register_static = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_register_static")); + static d_g_type_register_static g_type_register_static = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_register_static")); delegate bool d_g_type_is_a(IntPtr type, IntPtr is_a_type); - static d_g_type_is_a g_type_is_a = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_is_a")); + static d_g_type_is_a g_type_is_a = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_is_a")); } } diff --git a/Source/Libs/GLibSharp/Global.cs b/Source/Libs/GLibSharp/Global.cs index e1eec9c6b..bc15fbbb0 100755 --- a/Source/Libs/GLibSharp/Global.cs +++ b/Source/Libs/GLibSharp/Global.cs @@ -56,10 +56,10 @@ namespace GLib { } delegate void d_g_set_prgname(IntPtr name); - static d_g_set_prgname g_set_prgname = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_set_prgname")); + static d_g_set_prgname g_set_prgname = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_set_prgname")); delegate IntPtr d_g_get_prgname(); - static d_g_get_prgname g_get_prgname = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_get_prgname")); + static d_g_get_prgname g_get_prgname = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_get_prgname")); public static string ApplicationName { get { @@ -73,13 +73,13 @@ namespace GLib { } delegate void d_g_set_application_name(IntPtr name); - static d_g_set_application_name g_set_application_name = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_set_application_name")); + static d_g_set_application_name g_set_application_name = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_set_application_name")); delegate IntPtr d_g_get_application_name(); - static d_g_get_application_name g_get_application_name = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_get_application_name")); + static d_g_get_application_name g_get_application_name = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_get_application_name")); delegate IntPtr d_g_format_size_for_display(long size); - static d_g_format_size_for_display g_format_size_for_display = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_format_size_for_display")); + static d_g_format_size_for_display g_format_size_for_display = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_format_size_for_display")); static public string FormatSizeForDisplay (long size) { diff --git a/Source/Libs/GLibSharp/IOChannel.cs b/Source/Libs/GLibSharp/IOChannel.cs index bce628b4f..b8808f7ba 100755 --- a/Source/Libs/GLibSharp/IOChannel.cs +++ b/Source/Libs/GLibSharp/IOChannel.cs @@ -324,103 +324,103 @@ namespace GLib { } delegate IntPtr d_g_io_channel_unix_new(int fd); - static d_g_io_channel_unix_new g_io_channel_unix_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_unix_new")); + static d_g_io_channel_unix_new g_io_channel_unix_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_unix_new")); delegate IntPtr d_g_io_channel_new_file(IntPtr filename, IntPtr mode, out IntPtr error); - static d_g_io_channel_new_file g_io_channel_new_file = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_new_file")); + static d_g_io_channel_new_file g_io_channel_new_file = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_new_file")); delegate IntPtr d_g_io_channel_new_file_utf8(IntPtr filename, IntPtr mode, out IntPtr error); - static d_g_io_channel_new_file_utf8 g_io_channel_new_file_utf8 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_new_file_utf8")); + static d_g_io_channel_new_file_utf8 g_io_channel_new_file_utf8 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_new_file_utf8")); delegate int d_g_io_channel_error_quark(); - static d_g_io_channel_error_quark g_io_channel_error_quark = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_error_quark")); + static d_g_io_channel_error_quark g_io_channel_error_quark = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_error_quark")); delegate int d_g_io_channel_error_from_errno(int en); - static d_g_io_channel_error_from_errno g_io_channel_error_from_errno = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_error_from_errno")); + static d_g_io_channel_error_from_errno g_io_channel_error_from_errno = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_error_from_errno")); delegate int d_g_io_channel_flush(IntPtr raw, out IntPtr error); - static d_g_io_channel_flush g_io_channel_flush = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_flush")); + static d_g_io_channel_flush g_io_channel_flush = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_flush")); delegate void d_g_io_channel_init(IntPtr raw); - static d_g_io_channel_init g_io_channel_init = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_init")); + static d_g_io_channel_init g_io_channel_init = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_init")); delegate int d_g_io_channel_read_chars(IntPtr raw, byte[] buf, UIntPtr count, out UIntPtr bytes_read, out IntPtr error); - static d_g_io_channel_read_chars g_io_channel_read_chars = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_read_chars")); + static d_g_io_channel_read_chars g_io_channel_read_chars = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_read_chars")); delegate int d_g_io_channel_read_line(IntPtr raw, out IntPtr str_return, IntPtr length, out UIntPtr terminator_pos, out IntPtr error); - static d_g_io_channel_read_line g_io_channel_read_line = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_read_line")); + static d_g_io_channel_read_line g_io_channel_read_line = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_read_line")); delegate int d_g_io_channel_read_to_end(IntPtr raw, out IntPtr str_return, out UIntPtr length, out IntPtr error); - static d_g_io_channel_read_to_end g_io_channel_read_to_end = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_read_to_end")); + static d_g_io_channel_read_to_end g_io_channel_read_to_end = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_read_to_end")); delegate int d_g_io_channel_read_unichar(IntPtr raw, out uint thechar, out IntPtr error); - static d_g_io_channel_read_unichar g_io_channel_read_unichar = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_read_unichar")); + static d_g_io_channel_read_unichar g_io_channel_read_unichar = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_read_unichar")); delegate int d_g_io_channel_seek_position(IntPtr raw, long offset, int type, out IntPtr error); - static d_g_io_channel_seek_position g_io_channel_seek_position = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_seek_position")); + static d_g_io_channel_seek_position g_io_channel_seek_position = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_seek_position")); delegate int d_g_io_channel_shutdown(IntPtr raw, bool flush, out IntPtr err); - static d_g_io_channel_shutdown g_io_channel_shutdown = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_shutdown")); + static d_g_io_channel_shutdown g_io_channel_shutdown = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_shutdown")); delegate int d_g_io_channel_write_chars(IntPtr raw, byte[] buf, IntPtr count, out UIntPtr bytes_written, out IntPtr error); - static d_g_io_channel_write_chars g_io_channel_write_chars = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_write_chars")); + static d_g_io_channel_write_chars g_io_channel_write_chars = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_write_chars")); delegate int d_g_io_channel_write_unichar(IntPtr raw, uint thechar, out IntPtr error); - static d_g_io_channel_write_unichar g_io_channel_write_unichar = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_write_unichar")); + static d_g_io_channel_write_unichar g_io_channel_write_unichar = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_write_unichar")); delegate int d_g_io_channel_get_buffer_condition(IntPtr raw); - static d_g_io_channel_get_buffer_condition g_io_channel_get_buffer_condition = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_buffer_condition")); + static d_g_io_channel_get_buffer_condition g_io_channel_get_buffer_condition = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_buffer_condition")); delegate bool d_g_io_channel_get_buffered(IntPtr raw); - static d_g_io_channel_get_buffered g_io_channel_get_buffered = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_buffered")); + static d_g_io_channel_get_buffered g_io_channel_get_buffered = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_buffered")); delegate void d_g_io_channel_set_buffered(IntPtr raw, bool buffered); - static d_g_io_channel_set_buffered g_io_channel_set_buffered = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_set_buffered")); + static d_g_io_channel_set_buffered g_io_channel_set_buffered = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_set_buffered")); delegate UIntPtr d_g_io_channel_get_buffer_size(IntPtr raw); - static d_g_io_channel_get_buffer_size g_io_channel_get_buffer_size = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_buffer_size")); + static d_g_io_channel_get_buffer_size g_io_channel_get_buffer_size = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_buffer_size")); delegate void d_g_io_channel_set_buffer_size(IntPtr raw, UIntPtr size); - static d_g_io_channel_set_buffer_size g_io_channel_set_buffer_size = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_set_buffer_size")); + static d_g_io_channel_set_buffer_size g_io_channel_set_buffer_size = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_set_buffer_size")); delegate bool d_g_io_channel_get_close_on_unref(IntPtr raw); - static d_g_io_channel_get_close_on_unref g_io_channel_get_close_on_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_close_on_unref")); + static d_g_io_channel_get_close_on_unref g_io_channel_get_close_on_unref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_close_on_unref")); delegate void d_g_io_channel_set_close_on_unref(IntPtr raw, bool do_close); - static d_g_io_channel_set_close_on_unref g_io_channel_set_close_on_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_set_close_on_unref")); + static d_g_io_channel_set_close_on_unref g_io_channel_set_close_on_unref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_set_close_on_unref")); delegate IntPtr d_g_io_channel_get_encoding(IntPtr raw); - static d_g_io_channel_get_encoding g_io_channel_get_encoding = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_encoding")); + static d_g_io_channel_get_encoding g_io_channel_get_encoding = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_encoding")); delegate int d_g_io_channel_set_encoding(IntPtr raw, IntPtr encoding, out IntPtr error); - static d_g_io_channel_set_encoding g_io_channel_set_encoding = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_set_encoding")); + static d_g_io_channel_set_encoding g_io_channel_set_encoding = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_set_encoding")); delegate int d_g_io_channel_get_flags(IntPtr raw); - static d_g_io_channel_get_flags g_io_channel_get_flags = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_flags")); + static d_g_io_channel_get_flags g_io_channel_get_flags = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_flags")); delegate int d_g_io_channel_set_flags(IntPtr raw, int flags, out IntPtr error); - static d_g_io_channel_set_flags g_io_channel_set_flags = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_set_flags")); + static d_g_io_channel_set_flags g_io_channel_set_flags = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_set_flags")); delegate IntPtr d_g_io_channel_get_line_term(IntPtr raw, out int length); - static d_g_io_channel_get_line_term g_io_channel_get_line_term = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_line_term")); + static d_g_io_channel_get_line_term g_io_channel_get_line_term = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_line_term")); delegate void d_g_io_channel_set_line_term(IntPtr raw, byte[] term, int length); - static d_g_io_channel_set_line_term g_io_channel_set_line_term = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_set_line_term")); + static d_g_io_channel_set_line_term g_io_channel_set_line_term = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_set_line_term")); delegate int d_g_io_channel_unix_get_fd(IntPtr raw); - static d_g_io_channel_unix_get_fd g_io_channel_unix_get_fd = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_unix_get_fd")); + static d_g_io_channel_unix_get_fd g_io_channel_unix_get_fd = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_unix_get_fd")); delegate IntPtr d_g_io_channel_ref(IntPtr raw); - static d_g_io_channel_ref g_io_channel_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_ref")); + static d_g_io_channel_ref g_io_channel_ref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_ref")); delegate void d_g_io_channel_unref(IntPtr raw); - static d_g_io_channel_unref g_io_channel_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_unref")); + static d_g_io_channel_unref g_io_channel_unref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_unref")); delegate uint d_g_io_add_watch_full(IntPtr raw, int priority, int condition, IOFuncNative func, IntPtr user_data, DestroyNotify notify); - static d_g_io_add_watch_full g_io_add_watch_full = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_add_watch_full")); + static d_g_io_add_watch_full g_io_add_watch_full = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_add_watch_full")); delegate IntPtr d_g_io_create_watch(IntPtr raw, int condition); - static d_g_io_create_watch g_io_create_watch = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_create_watch")); + static d_g_io_create_watch g_io_create_watch = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_create_watch")); } public delegate bool IOFunc (IOChannel source, IOCondition condition); diff --git a/Source/Libs/GLibSharp/Idle.cs b/Source/Libs/GLibSharp/Idle.cs index c880d7f67..ba41c719c 100755 --- a/Source/Libs/GLibSharp/Idle.cs +++ b/Source/Libs/GLibSharp/Idle.cs @@ -70,7 +70,7 @@ namespace GLib { } delegate uint d_g_idle_add(IdleHandlerInternal d, IntPtr data); - static d_g_idle_add g_idle_add = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_idle_add")); + static d_g_idle_add g_idle_add = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_idle_add")); public static uint Add (IdleHandler hndlr) { @@ -85,7 +85,7 @@ namespace GLib { } delegate uint d_g_idle_add_full(int priority, IdleHandlerInternal d, IntPtr data, DestroyNotify notify); - static d_g_idle_add_full g_idle_add_full = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_idle_add_full")); + static d_g_idle_add_full g_idle_add_full = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_idle_add_full")); public static uint Add (IdleHandler hndlr, Priority priority) { diff --git a/Source/Libs/GLibSharp/InitiallyUnowned.cs b/Source/Libs/GLibSharp/InitiallyUnowned.cs index 884bf2efc..af0c43c34 100755 --- a/Source/Libs/GLibSharp/InitiallyUnowned.cs +++ b/Source/Libs/GLibSharp/InitiallyUnowned.cs @@ -34,7 +34,7 @@ namespace GLib { } delegate void d_g_object_ref_sink(IntPtr raw); - static d_g_object_ref_sink g_object_ref_sink = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_ref_sink")); + static d_g_object_ref_sink g_object_ref_sink = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_ref_sink")); protected override IntPtr Raw { get { @@ -48,13 +48,13 @@ namespace GLib { } delegate bool d_g_object_is_floating(IntPtr raw); - static d_g_object_is_floating g_object_is_floating = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_is_floating")); + static d_g_object_is_floating g_object_is_floating = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_is_floating")); delegate void d_g_object_force_floating(IntPtr raw); - static d_g_object_force_floating g_object_force_floating = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_force_floating")); + static d_g_object_force_floating g_object_force_floating = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_force_floating")); delegate void d_g_object_unref(IntPtr raw); - static d_g_object_unref g_object_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_unref")); + static d_g_object_unref g_object_unref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_unref")); public bool IsFloating { get { diff --git a/Source/Libs/GLibSharp/KeyFile.cs b/Source/Libs/GLibSharp/KeyFile.cs index 006ce5767..d7274a48a 100755 --- a/Source/Libs/GLibSharp/KeyFile.cs +++ b/Source/Libs/GLibSharp/KeyFile.cs @@ -540,124 +540,124 @@ namespace GLib { } delegate void d_g_key_file_free(IntPtr raw); - static d_g_key_file_free g_key_file_free = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_free")); + static d_g_key_file_free g_key_file_free = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_free")); delegate bool d_g_key_file_get_boolean(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); - static d_g_key_file_get_boolean g_key_file_get_boolean = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_boolean")); + static d_g_key_file_get_boolean g_key_file_get_boolean = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_boolean")); delegate IntPtr d_g_key_file_get_boolean_list(IntPtr raw, IntPtr group_name, IntPtr key, out UIntPtr length, out IntPtr error); - static d_g_key_file_get_boolean_list g_key_file_get_boolean_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_boolean_list")); + static d_g_key_file_get_boolean_list g_key_file_get_boolean_list = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_boolean_list")); delegate IntPtr d_g_key_file_get_comment(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); - static d_g_key_file_get_comment g_key_file_get_comment = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_comment")); + static d_g_key_file_get_comment g_key_file_get_comment = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_comment")); delegate double d_g_key_file_get_double(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); - static d_g_key_file_get_double g_key_file_get_double = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_double")); + static d_g_key_file_get_double g_key_file_get_double = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_double")); delegate IntPtr d_g_key_file_get_double_list(IntPtr raw, IntPtr group_name, IntPtr key, out UIntPtr length, out IntPtr error); - static d_g_key_file_get_double_list g_key_file_get_double_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_double_list")); + static d_g_key_file_get_double_list g_key_file_get_double_list = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_double_list")); delegate IntPtr d_g_key_file_get_groups(IntPtr raw, IntPtr dummy); - static d_g_key_file_get_groups g_key_file_get_groups = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_groups")); + static d_g_key_file_get_groups g_key_file_get_groups = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_groups")); delegate int d_g_key_file_get_integer(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); - static d_g_key_file_get_integer g_key_file_get_integer = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_integer")); + static d_g_key_file_get_integer g_key_file_get_integer = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_integer")); delegate IntPtr d_g_key_file_get_integer_list(IntPtr raw, IntPtr group_name, IntPtr key, out UIntPtr length, out IntPtr error); - static d_g_key_file_get_integer_list g_key_file_get_integer_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_integer_list")); + static d_g_key_file_get_integer_list g_key_file_get_integer_list = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_integer_list")); delegate IntPtr d_g_key_file_get_keys(IntPtr raw, IntPtr group_name, IntPtr dummy, out IntPtr error); - static d_g_key_file_get_keys g_key_file_get_keys = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_keys")); + static d_g_key_file_get_keys g_key_file_get_keys = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_keys")); delegate IntPtr d_g_key_file_get_locale_string(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr locale, out IntPtr error); - static d_g_key_file_get_locale_string g_key_file_get_locale_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_locale_string")); + static d_g_key_file_get_locale_string g_key_file_get_locale_string = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_locale_string")); delegate IntPtr d_g_key_file_get_locale_string_list(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr locale, IntPtr dummy, out IntPtr error); - static d_g_key_file_get_locale_string_list g_key_file_get_locale_string_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_locale_string_list")); + static d_g_key_file_get_locale_string_list g_key_file_get_locale_string_list = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_locale_string_list")); delegate IntPtr d_g_key_file_get_start_group(IntPtr raw); - static d_g_key_file_get_start_group g_key_file_get_start_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_start_group")); + static d_g_key_file_get_start_group g_key_file_get_start_group = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_start_group")); delegate IntPtr d_g_key_file_get_string(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); - static d_g_key_file_get_string g_key_file_get_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_string")); + static d_g_key_file_get_string g_key_file_get_string = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_string")); delegate IntPtr d_g_key_file_get_string_list(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr dummy, out IntPtr error); - static d_g_key_file_get_string_list g_key_file_get_string_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_string_list")); + static d_g_key_file_get_string_list g_key_file_get_string_list = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_string_list")); delegate IntPtr d_g_key_file_get_value(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); - static d_g_key_file_get_value g_key_file_get_value = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_value")); + static d_g_key_file_get_value g_key_file_get_value = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_value")); delegate bool d_g_key_file_has_group(IntPtr raw, IntPtr group_name); - static d_g_key_file_has_group g_key_file_has_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_has_group")); + static d_g_key_file_has_group g_key_file_has_group = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_has_group")); delegate bool d_g_key_file_has_key(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); - static d_g_key_file_has_key g_key_file_has_key = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_has_key")); + static d_g_key_file_has_key g_key_file_has_key = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_has_key")); delegate bool d_g_key_file_load_from_data(IntPtr raw, byte[] data, UIntPtr length, int flags, out IntPtr error); - static d_g_key_file_load_from_data g_key_file_load_from_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_load_from_data")); + static d_g_key_file_load_from_data g_key_file_load_from_data = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_load_from_data")); delegate bool d_g_key_file_load_from_data_dirs(IntPtr raw, IntPtr file, out IntPtr full_path, int flags, out IntPtr error); - static d_g_key_file_load_from_data_dirs g_key_file_load_from_data_dirs = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_load_from_data_dirs")); + static d_g_key_file_load_from_data_dirs g_key_file_load_from_data_dirs = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_load_from_data_dirs")); delegate bool d_g_key_file_load_from_dirs(IntPtr raw, IntPtr file, IntPtr search_dirs, out IntPtr full_path, int flags, out IntPtr error); - static d_g_key_file_load_from_dirs g_key_file_load_from_dirs = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_load_from_dirs")); + static d_g_key_file_load_from_dirs g_key_file_load_from_dirs = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_load_from_dirs")); delegate bool d_g_key_file_load_from_file(IntPtr raw, IntPtr file, int flags, out IntPtr error); - static d_g_key_file_load_from_file g_key_file_load_from_file = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_load_from_file")); + static d_g_key_file_load_from_file g_key_file_load_from_file = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_load_from_file")); delegate IntPtr d_g_key_file_new(); - static d_g_key_file_new g_key_file_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_new")); + static d_g_key_file_new g_key_file_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_new")); delegate bool d_g_key_file_remove_comment(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); - static d_g_key_file_remove_comment g_key_file_remove_comment = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_remove_comment")); + static d_g_key_file_remove_comment g_key_file_remove_comment = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_remove_comment")); delegate bool d_g_key_file_remove_group(IntPtr raw, IntPtr group_name, out IntPtr error); - static d_g_key_file_remove_group g_key_file_remove_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_remove_group")); + static d_g_key_file_remove_group g_key_file_remove_group = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_remove_group")); delegate bool d_g_key_file_remove_key(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); - static d_g_key_file_remove_key g_key_file_remove_key = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_remove_key")); + static d_g_key_file_remove_key g_key_file_remove_key = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_remove_key")); delegate void d_g_key_file_set_boolean(IntPtr raw, IntPtr group_name, IntPtr key, bool value); - static d_g_key_file_set_boolean g_key_file_set_boolean = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_boolean")); + static d_g_key_file_set_boolean g_key_file_set_boolean = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_boolean")); delegate void d_g_key_file_set_boolean_list(IntPtr raw, IntPtr group_name, IntPtr key, bool[] list, UIntPtr n_list); - static d_g_key_file_set_boolean_list g_key_file_set_boolean_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_boolean_list")); + static d_g_key_file_set_boolean_list g_key_file_set_boolean_list = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_boolean_list")); delegate bool d_g_key_file_set_comment(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr comment, out IntPtr error); - static d_g_key_file_set_comment g_key_file_set_comment = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_comment")); + static d_g_key_file_set_comment g_key_file_set_comment = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_comment")); delegate void d_g_key_file_set_double(IntPtr raw, IntPtr group_name, IntPtr key, double value); - static d_g_key_file_set_double g_key_file_set_double = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_double")); + static d_g_key_file_set_double g_key_file_set_double = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_double")); delegate void d_g_key_file_set_double_list(IntPtr raw, IntPtr group_name, IntPtr key, double[] list, UIntPtr n_list); - static d_g_key_file_set_double_list g_key_file_set_double_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_double_list")); + static d_g_key_file_set_double_list g_key_file_set_double_list = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_double_list")); delegate void d_g_key_file_set_integer(IntPtr raw, IntPtr group_name, IntPtr key, int value); - static d_g_key_file_set_integer g_key_file_set_integer = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_integer")); + static d_g_key_file_set_integer g_key_file_set_integer = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_integer")); delegate void d_g_key_file_set_integer_list(IntPtr raw, IntPtr group_name, IntPtr key, int[] list, UIntPtr n_list); - static d_g_key_file_set_integer_list g_key_file_set_integer_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_integer_list")); + static d_g_key_file_set_integer_list g_key_file_set_integer_list = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_integer_list")); delegate void d_g_key_file_set_list_separator(IntPtr raw, byte separator); - static d_g_key_file_set_list_separator g_key_file_set_list_separator = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_list_separator")); + static d_g_key_file_set_list_separator g_key_file_set_list_separator = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_list_separator")); delegate void d_g_key_file_set_locale_string(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr locale, IntPtr value); - static d_g_key_file_set_locale_string g_key_file_set_locale_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_locale_string")); + static d_g_key_file_set_locale_string g_key_file_set_locale_string = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_locale_string")); delegate void d_g_key_file_set_locale_string_list(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr locale, IntPtr list, UIntPtr length); - static d_g_key_file_set_locale_string_list g_key_file_set_locale_string_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_locale_string_list")); + static d_g_key_file_set_locale_string_list g_key_file_set_locale_string_list = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_locale_string_list")); delegate void d_g_key_file_set_string(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr value); - static d_g_key_file_set_string g_key_file_set_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_string")); + static d_g_key_file_set_string g_key_file_set_string = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_string")); delegate void d_g_key_file_set_string_list(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr list, UIntPtr n_list); - static d_g_key_file_set_string_list g_key_file_set_string_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_string_list")); + static d_g_key_file_set_string_list g_key_file_set_string_list = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_string_list")); delegate void d_g_key_file_set_value(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr value); - static d_g_key_file_set_value g_key_file_set_value = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_value")); + static d_g_key_file_set_value g_key_file_set_value = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_value")); delegate IntPtr d_g_key_file_to_data(IntPtr raw, out UIntPtr length, IntPtr dummy); - static d_g_key_file_to_data g_key_file_to_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_to_data")); + static d_g_key_file_to_data g_key_file_to_data = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_to_data")); } } diff --git a/Source/Libs/GLibSharp/List.cs b/Source/Libs/GLibSharp/List.cs index fe62105e1..bf7838f8d 100755 --- a/Source/Libs/GLibSharp/List.cs +++ b/Source/Libs/GLibSharp/List.cs @@ -27,7 +27,7 @@ namespace GLib { public class List : ListBase { delegate IntPtr d_g_list_copy(IntPtr l); - static d_g_list_copy g_list_copy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_list_copy")); + static d_g_list_copy g_list_copy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_list_copy")); public override object Clone () { @@ -35,7 +35,7 @@ namespace GLib { } delegate int d_g_list_length(IntPtr l); - static d_g_list_length g_list_length = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_list_length")); + static d_g_list_length g_list_length = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_list_length")); internal override int Length (IntPtr list) { @@ -43,7 +43,7 @@ namespace GLib { } delegate void d_g_list_free(IntPtr l); - static d_g_list_free g_list_free = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_list_free")); + static d_g_list_free g_list_free = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_list_free")); internal override void Free (IntPtr list) { @@ -52,7 +52,7 @@ namespace GLib { } delegate IntPtr d_g_list_append(IntPtr l, IntPtr raw); - static d_g_list_append g_list_append = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_list_append")); + static d_g_list_append g_list_append = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_list_append")); internal override IntPtr Append (IntPtr list, IntPtr raw) { @@ -60,7 +60,7 @@ namespace GLib { } delegate IntPtr d_g_list_prepend(IntPtr l, IntPtr raw); - static d_g_list_prepend g_list_prepend = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_list_prepend")); + static d_g_list_prepend g_list_prepend = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_list_prepend")); internal override IntPtr Prepend (IntPtr list, IntPtr raw) { @@ -68,7 +68,7 @@ namespace GLib { } delegate IntPtr d_g_list_nth_data(IntPtr l, uint n); - static d_g_list_nth_data g_list_nth_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_list_nth_data")); + static d_g_list_nth_data g_list_nth_data = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_list_nth_data")); internal override IntPtr NthData (uint n) { diff --git a/Source/Libs/GLibSharp/ListBase.cs b/Source/Libs/GLibSharp/ListBase.cs index 7338f5f92..69b57995e 100755 --- a/Source/Libs/GLibSharp/ListBase.cs +++ b/Source/Libs/GLibSharp/ListBase.cs @@ -191,7 +191,7 @@ namespace GLib { } delegate void d_g_object_unref(IntPtr item); - static d_g_object_unref g_object_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_unref")); + static d_g_object_unref g_object_unref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_unref")); public void Empty () { diff --git a/Source/Libs/GLibSharp/Log.cs b/Source/Libs/GLibSharp/Log.cs index fc33d7f5f..e81f65833 100755 --- a/Source/Libs/GLibSharp/Log.cs +++ b/Source/Libs/GLibSharp/Log.cs @@ -124,7 +124,7 @@ namespace GLib { } delegate void d_g_logv(IntPtr log_domain, LogLevelFlags flags, IntPtr message); - static d_g_logv g_logv = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_logv")); + static d_g_logv g_logv = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_logv")); public void WriteLog (string logDomain, LogLevelFlags flags, string format, params object [] args) { @@ -136,7 +136,7 @@ namespace GLib { } delegate uint d_g_log_set_handler(IntPtr log_domain, LogLevelFlags flags, LogFuncNative log_func, IntPtr user_data); - static d_g_log_set_handler g_log_set_handler = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_log_set_handler")); + static d_g_log_set_handler g_log_set_handler = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_log_set_handler")); public static uint SetLogHandler (string logDomain, LogLevelFlags flags, LogFunc logFunc) { @@ -153,7 +153,7 @@ namespace GLib { } delegate uint d_g_log_remove_handler(IntPtr log_domain, uint handler_id); - static d_g_log_remove_handler g_log_remove_handler = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_log_remove_handler")); + static d_g_log_remove_handler g_log_remove_handler = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_log_remove_handler")); public static void RemoveLogHandler (string logDomain, uint handlerID) { @@ -168,7 +168,7 @@ namespace GLib { } delegate PrintFuncNative d_g_set_print_handler(PrintFuncNative handler); - static d_g_set_print_handler g_set_print_handler = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_set_print_handler")); + static d_g_set_print_handler g_set_print_handler = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_set_print_handler")); public static PrintFunc SetPrintHandler (PrintFunc handler) { @@ -179,7 +179,7 @@ namespace GLib { } delegate PrintFuncNative d_g_set_printerr_handler(PrintFuncNative handler); - static d_g_set_printerr_handler g_set_printerr_handler = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_set_printerr_handler")); + static d_g_set_printerr_handler g_set_printerr_handler = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_set_printerr_handler")); public static PrintFunc SetPrintErrorHandler (PrintFunc handler) { @@ -190,7 +190,7 @@ namespace GLib { } delegate void d_g_log_default_handler(IntPtr log_domain, LogLevelFlags log_level, IntPtr message, IntPtr unused_data); - static d_g_log_default_handler g_log_default_handler = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_log_default_handler")); + static d_g_log_default_handler g_log_default_handler = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_log_default_handler")); public static void DefaultHandler (string logDomain, LogLevelFlags logLevel, string message) @@ -203,7 +203,7 @@ namespace GLib { } delegate LogLevelFlags d_g_log_set_always_fatal(LogLevelFlags fatal_mask); - static d_g_log_set_always_fatal g_log_set_always_fatal = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_log_set_always_fatal")); + static d_g_log_set_always_fatal g_log_set_always_fatal = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_log_set_always_fatal")); public static LogLevelFlags SetAlwaysFatal (LogLevelFlags fatalMask) { @@ -211,7 +211,7 @@ namespace GLib { } delegate LogLevelFlags d_g_log_set_fatal_mask(IntPtr log_domain, LogLevelFlags fatal_mask); - static d_g_log_set_fatal_mask g_log_set_fatal_mask = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_log_set_fatal_mask")); + static d_g_log_set_fatal_mask g_log_set_fatal_mask = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_log_set_fatal_mask")); public static LogLevelFlags SetAlwaysFatal (string logDomain, LogLevelFlags fatalMask) { @@ -245,7 +245,7 @@ namespace GLib { } delegate LogFuncNative d_g_log_set_default_handler(LogFuncNative log_func, IntPtr user_data); - static d_g_log_set_default_handler g_log_set_default_handler = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_log_set_default_handler")); + static d_g_log_set_default_handler g_log_set_default_handler = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_log_set_default_handler")); public static LogFunc SetDefaultHandler (LogFunc log_func) { diff --git a/Source/Libs/GLibSharp/MainContext.cs b/Source/Libs/GLibSharp/MainContext.cs index 63da4243c..81ddb194f 100755 --- a/Source/Libs/GLibSharp/MainContext.cs +++ b/Source/Libs/GLibSharp/MainContext.cs @@ -28,7 +28,7 @@ namespace GLib { IntPtr handle; delegate IntPtr d_g_main_context_new(); - static d_g_main_context_new g_main_context_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_new")); + static d_g_main_context_new g_main_context_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_new")); public MainContext () { @@ -36,7 +36,7 @@ namespace GLib { } delegate void d_g_main_context_ref(IntPtr raw); - static d_g_main_context_ref g_main_context_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_ref")); + static d_g_main_context_ref g_main_context_ref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_ref")); public MainContext (IntPtr raw) { @@ -51,7 +51,7 @@ namespace GLib { } delegate void d_g_main_context_unref(IntPtr raw); - static d_g_main_context_unref g_main_context_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_unref")); + static d_g_main_context_unref g_main_context_unref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_unref")); ~MainContext () { @@ -60,7 +60,7 @@ namespace GLib { } delegate IntPtr d_g_main_context_default(); - static d_g_main_context_default g_main_context_default = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_default")); + static d_g_main_context_default g_main_context_default = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_default")); public static MainContext Default { get { @@ -69,7 +69,7 @@ namespace GLib { } delegate IntPtr d_g_main_context_thread_default(); - static d_g_main_context_thread_default g_main_context_thread_default = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_thread_default")); + static d_g_main_context_thread_default g_main_context_thread_default = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_thread_default")); public MainContext ThreadDefault { get { @@ -80,7 +80,7 @@ namespace GLib { } delegate void d_g_main_context_push_thread_default(IntPtr raw); - static d_g_main_context_push_thread_default g_main_context_push_thread_default = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_push_thread_default")); + static d_g_main_context_push_thread_default g_main_context_push_thread_default = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_push_thread_default")); public void PushThreadDefault () { @@ -88,7 +88,7 @@ namespace GLib { } delegate void d_g_main_context_pop_thread_default(IntPtr raw); - static d_g_main_context_pop_thread_default g_main_context_pop_thread_default = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_pop_thread_default")); + static d_g_main_context_pop_thread_default g_main_context_pop_thread_default = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_pop_thread_default")); public void PopThreadDefault () { @@ -97,7 +97,7 @@ namespace GLib { delegate bool d_g_main_context_iteration(IntPtr raw, bool may_block); - static d_g_main_context_iteration g_main_context_iteration = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_iteration")); + static d_g_main_context_iteration g_main_context_iteration = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_iteration")); public bool RunIteration (bool may_block) { @@ -110,7 +110,7 @@ namespace GLib { } delegate bool d_g_main_context_pending(IntPtr raw); - static d_g_main_context_pending g_main_context_pending = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_pending")); + static d_g_main_context_pending g_main_context_pending = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_pending")); public bool HasPendingEvents { @@ -120,7 +120,7 @@ namespace GLib { } delegate void d_g_main_context_wakeup(IntPtr raw); - static d_g_main_context_wakeup g_main_context_wakeup = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_wakeup")); + static d_g_main_context_wakeup g_main_context_wakeup = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_wakeup")); public void Wakeup () { @@ -143,7 +143,7 @@ namespace GLib { delegate int d_g_main_depth(); - static d_g_main_depth g_main_depth = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_depth")); + static d_g_main_depth g_main_depth = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_depth")); public static int Depth { get { return g_main_depth (); } } diff --git a/Source/Libs/GLibSharp/MainLoop.cs b/Source/Libs/GLibSharp/MainLoop.cs index a548852ae..b2a990b65 100755 --- a/Source/Libs/GLibSharp/MainLoop.cs +++ b/Source/Libs/GLibSharp/MainLoop.cs @@ -26,7 +26,7 @@ namespace GLib { private IntPtr handle; delegate IntPtr d_g_main_loop_new(IntPtr context, bool isRunning); - static d_g_main_loop_new g_main_loop_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_loop_new")); + static d_g_main_loop_new g_main_loop_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_loop_new")); public MainLoop () : this (MainContext.Default) { } @@ -38,7 +38,7 @@ namespace GLib { } delegate void d_g_main_loop_unref(IntPtr loop); - static d_g_main_loop_unref g_main_loop_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_loop_unref")); + static d_g_main_loop_unref g_main_loop_unref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_loop_unref")); ~MainLoop () { @@ -47,7 +47,7 @@ namespace GLib { } delegate bool d_g_main_loop_is_running(IntPtr loop); - static d_g_main_loop_is_running g_main_loop_is_running = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_loop_is_running")); + static d_g_main_loop_is_running g_main_loop_is_running = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_loop_is_running")); public bool IsRunning { get { @@ -56,7 +56,7 @@ namespace GLib { } delegate void d_g_main_loop_run(IntPtr loop); - static d_g_main_loop_run g_main_loop_run = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_loop_run")); + static d_g_main_loop_run g_main_loop_run = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_loop_run")); public void Run () { @@ -64,7 +64,7 @@ namespace GLib { } delegate void d_g_main_loop_quit(IntPtr loop); - static d_g_main_loop_quit g_main_loop_quit = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_loop_quit")); + static d_g_main_loop_quit g_main_loop_quit = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_loop_quit")); public void Quit () { @@ -72,7 +72,7 @@ namespace GLib { } delegate IntPtr d_g_main_loop_get_context(IntPtr loop); - static d_g_main_loop_get_context g_main_loop_get_context = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_loop_get_context")); + static d_g_main_loop_get_context g_main_loop_get_context = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_loop_get_context")); public MainContext Context { get { diff --git a/Source/Libs/GLibSharp/ManagedValue.cs b/Source/Libs/GLibSharp/ManagedValue.cs index f1eeb296b..3d4b8e133 100755 --- a/Source/Libs/GLibSharp/ManagedValue.cs +++ b/Source/Libs/GLibSharp/ManagedValue.cs @@ -67,7 +67,7 @@ namespace GLib { static GType boxed_type = GType.Invalid; delegate IntPtr d_g_boxed_type_register_static(IntPtr typename, CopyFunc copy_func, FreeFunc free_func); - static d_g_boxed_type_register_static g_boxed_type_register_static = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_boxed_type_register_static")); + static d_g_boxed_type_register_static g_boxed_type_register_static = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_boxed_type_register_static")); public static GType GType { get { diff --git a/Source/Libs/GLibSharp/Markup.cs b/Source/Libs/GLibSharp/Markup.cs index 7ec8317b4..10661ec7f 100755 --- a/Source/Libs/GLibSharp/Markup.cs +++ b/Source/Libs/GLibSharp/Markup.cs @@ -30,7 +30,7 @@ namespace GLib { private Markup () {} delegate IntPtr d_g_markup_escape_text(IntPtr text, int len); - static d_g_markup_escape_text g_markup_escape_text = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_markup_escape_text")); + static d_g_markup_escape_text g_markup_escape_text = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_markup_escape_text")); static public string EscapeText (string s) { diff --git a/Source/Libs/GLibSharp/Marshaller.cs b/Source/Libs/GLibSharp/Marshaller.cs index 783a76a57..3daa37861 100755 --- a/Source/Libs/GLibSharp/Marshaller.cs +++ b/Source/Libs/GLibSharp/Marshaller.cs @@ -31,7 +31,7 @@ namespace GLib { private Marshaller () {} delegate void d_g_free(IntPtr mem); - static d_g_free g_free = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_free")); + static d_g_free g_free = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_free")); public static void Free (IntPtr ptr) { @@ -48,7 +48,7 @@ namespace GLib { } delegate IntPtr d_g_filename_to_utf8(IntPtr mem, int len, IntPtr read, out IntPtr written, out IntPtr error); - static d_g_filename_to_utf8 g_filename_to_utf8 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_filename_to_utf8")); + static d_g_filename_to_utf8 g_filename_to_utf8 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_filename_to_utf8")); public static string FilenamePtrToString (IntPtr ptr) { @@ -117,7 +117,7 @@ namespace GLib { } delegate IntPtr d_g_filename_from_utf8(IntPtr mem, int len, IntPtr read, out IntPtr written, out IntPtr error); - static d_g_filename_from_utf8 g_filename_from_utf8 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_filename_from_utf8")); + static d_g_filename_from_utf8 g_filename_from_utf8 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_filename_from_utf8")); public static IntPtr StringToFilenamePtr (string str) { @@ -178,7 +178,7 @@ namespace GLib { } delegate void d_g_strfreev(IntPtr mem); - static d_g_strfreev g_strfreev = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_strfreev")); + static d_g_strfreev g_strfreev = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_strfreev")); public static void StrFreeV (IntPtr null_term_array) { @@ -223,7 +223,7 @@ namespace GLib { } delegate IntPtr d_g_malloc(UIntPtr size); - static d_g_malloc g_malloc = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_malloc")); + static d_g_malloc g_malloc = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_malloc")); public static IntPtr Malloc (ulong size) { @@ -244,10 +244,10 @@ namespace GLib { } delegate IntPtr d_g_malloc0(UIntPtr size); - static d_g_malloc0 g_malloc0 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_malloc0")); + static d_g_malloc0 g_malloc0 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_malloc0")); delegate int d_g_unichar_to_utf8(uint c, IntPtr buf); - static d_g_unichar_to_utf8 g_unichar_to_utf8 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_unichar_to_utf8")); + static d_g_unichar_to_utf8 g_unichar_to_utf8 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_unichar_to_utf8")); public static char GUnicharToChar (uint ucs4_char) { @@ -272,7 +272,7 @@ namespace GLib { } delegate IntPtr d_g_utf16_to_ucs4(ref ushort c, IntPtr len, IntPtr d1, IntPtr d2, IntPtr d3); - static d_g_utf16_to_ucs4 g_utf16_to_ucs4 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_utf16_to_ucs4")); + static d_g_utf16_to_ucs4 g_utf16_to_ucs4 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_utf16_to_ucs4")); public static uint CharToGUnichar (char c) { diff --git a/Source/Libs/GLibSharp/Mutex.cs b/Source/Libs/GLibSharp/Mutex.cs index e65ad438f..b79f05d90 100755 --- a/Source/Libs/GLibSharp/Mutex.cs +++ b/Source/Libs/GLibSharp/Mutex.cs @@ -17,28 +17,28 @@ namespace GLib { } delegate void d_g_mutex_clear(IntPtr raw); - static d_g_mutex_clear g_mutex_clear = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_mutex_clear")); + static d_g_mutex_clear g_mutex_clear = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_mutex_clear")); public void Clear() { g_mutex_clear(Handle); } delegate void d_g_mutex_init(IntPtr raw); - static d_g_mutex_init g_mutex_init = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_mutex_init")); + static d_g_mutex_init g_mutex_init = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_mutex_init")); public void Init() { g_mutex_init(Handle); } delegate void d_g_mutex_lock(IntPtr raw); - static d_g_mutex_lock g_mutex_lock = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_mutex_lock")); + static d_g_mutex_lock g_mutex_lock = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_mutex_lock")); public void Lock() { g_mutex_lock(Handle); } delegate bool d_g_mutex_trylock(IntPtr raw); - static d_g_mutex_trylock g_mutex_trylock = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_mutex_trylock")); + static d_g_mutex_trylock g_mutex_trylock = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_mutex_trylock")); public bool Trylock() { bool raw_ret = g_mutex_trylock(Handle); @@ -47,7 +47,7 @@ namespace GLib { } delegate void d_g_mutex_unlock(IntPtr raw); - static d_g_mutex_unlock g_mutex_unlock = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_mutex_unlock")); + static d_g_mutex_unlock g_mutex_unlock = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_mutex_unlock")); public void Unlock() { g_mutex_unlock(Handle); diff --git a/Source/Libs/GLibSharp/NotifyHandler.cs b/Source/Libs/GLibSharp/NotifyHandler.cs index 6c6ffdd5a..38c65a733 100755 --- a/Source/Libs/GLibSharp/NotifyHandler.cs +++ b/Source/Libs/GLibSharp/NotifyHandler.cs @@ -23,7 +23,7 @@ namespace GLib { public class NotifyArgs : GLib.SignalArgs { delegate IntPtr d_g_param_spec_get_name(IntPtr pspec); - static d_g_param_spec_get_name g_param_spec_get_name = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_get_name")); + static d_g_param_spec_get_name g_param_spec_get_name = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_get_name")); public string Property { get { diff --git a/Source/Libs/GLibSharp/Object.cs b/Source/Libs/GLibSharp/Object.cs index dfde3f8b1..3ba77e946 100755 --- a/Source/Libs/GLibSharp/Object.cs +++ b/Source/Libs/GLibSharp/Object.cs @@ -78,10 +78,10 @@ namespace GLib { public static bool WarnOnFinalize { get; set; } delegate IntPtr d_g_object_ref(IntPtr raw); - static d_g_object_ref g_object_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_ref")); + static d_g_object_ref g_object_ref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_ref")); delegate void d_g_object_unref(IntPtr raw); - static d_g_object_unref g_object_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_unref")); + static d_g_object_unref g_object_unref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_unref")); public static Object TryGetObject (IntPtr o) { @@ -402,7 +402,7 @@ namespace GLib { } delegate IntPtr d_g_param_spec_get_name(IntPtr pspec); - static d_g_param_spec_get_name g_param_spec_get_name = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_get_name")); + static d_g_param_spec_get_name g_param_spec_get_name = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_get_name")); static IntPtr ConstructorCallback (IntPtr gtypeval, uint n_construct_properties, IntPtr construct_properties) { @@ -441,7 +441,7 @@ namespace GLib { } delegate void d_g_object_class_override_property(IntPtr klass, uint prop_id, IntPtr name); - static d_g_object_class_override_property g_object_class_override_property = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_class_override_property")); + static d_g_object_class_override_property g_object_class_override_property = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_class_override_property")); public static void OverrideProperty (IntPtr oclass, uint property_id, string name) { @@ -457,7 +457,7 @@ namespace GLib { } delegate IntPtr d_g_object_class_find_property(IntPtr klass, IntPtr name); - static d_g_object_class_find_property g_object_class_find_property = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_class_find_property")); + static d_g_object_class_find_property g_object_class_find_property = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_class_find_property")); static IntPtr FindClassProperty (GLib.Object o, string name) { @@ -467,7 +467,7 @@ namespace GLib { } delegate IntPtr d_g_object_interface_find_property(IntPtr klass, IntPtr name); - static d_g_object_interface_find_property g_object_interface_find_property = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_interface_find_property")); + static d_g_object_interface_find_property g_object_interface_find_property = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_interface_find_property")); static IntPtr FindInterfaceProperty (GType type, string name) { @@ -477,7 +477,7 @@ namespace GLib { } delegate void d_g_object_class_install_property(IntPtr klass, uint prop_id, IntPtr param_spec); - static d_g_object_class_install_property g_object_class_install_property = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_class_install_property")); + static d_g_object_class_install_property g_object_class_install_property = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_class_install_property")); static IntPtr RegisterProperty (GType type, string name, string nick, string blurb, uint property_id, GType property_type, bool can_read, bool can_write) { @@ -568,7 +568,7 @@ namespace GLib { } delegate void d_g_type_add_interface_static(IntPtr gtype, IntPtr iface_type, ref GInterfaceInfo info); - static d_g_type_add_interface_static g_type_add_interface_static = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_add_interface_static")); + static d_g_type_add_interface_static g_type_add_interface_static = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_add_interface_static")); protected internal static GType RegisterGType (System.Type t) { @@ -606,7 +606,7 @@ namespace GLib { } delegate IntPtr d_g_object_new(IntPtr gtype, IntPtr dummy); - static d_g_object_new g_object_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_new")); + static d_g_object_new g_object_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_new")); struct GParameter { public IntPtr name; @@ -614,7 +614,7 @@ namespace GLib { } delegate IntPtr d_g_object_newv(IntPtr gtype, int n_params, GParameter[] parms); - static d_g_object_newv g_object_newv = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_newv")); + static d_g_object_newv g_object_newv = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_newv")); protected virtual void CreateNativeObject (string[] names, GLib.Value[] vals) { @@ -726,7 +726,7 @@ namespace GLib { } delegate void d_g_object_get_property(IntPtr obj, IntPtr name, ref GLib.Value val); - static d_g_object_get_property g_object_get_property = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_get_property")); + static d_g_object_get_property g_object_get_property = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_get_property")); public GLib.Value GetProperty (string name) { @@ -738,7 +738,7 @@ namespace GLib { } delegate void d_g_object_set_property(IntPtr obj, IntPtr name, ref GLib.Value val); - static d_g_object_set_property g_object_set_property = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_set_property")); + static d_g_object_set_property g_object_set_property = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_set_property")); public void SetProperty (string name, GLib.Value val) { @@ -748,7 +748,7 @@ namespace GLib { } delegate void d_g_object_notify(IntPtr obj, IntPtr property_name); - static d_g_object_notify g_object_notify = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_notify")); + static d_g_object_notify g_object_notify = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_notify")); protected void Notify (string property_name) { @@ -809,10 +809,10 @@ namespace GLib { } protected delegate void d_g_signal_chain_from_overridden(IntPtr args, ref GLib.Value retval); - protected static d_g_signal_chain_from_overridden g_signal_chain_from_overridden = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_chain_from_overridden")); + protected static d_g_signal_chain_from_overridden g_signal_chain_from_overridden = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_chain_from_overridden")); delegate bool d_g_type_check_instance_is_a(IntPtr obj, IntPtr gtype); - static d_g_type_check_instance_is_a g_type_check_instance_is_a = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_check_instance_is_a")); + static d_g_type_check_instance_is_a g_type_check_instance_is_a = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_check_instance_is_a")); internal static bool IsObject (IntPtr obj) { diff --git a/Source/Libs/GLibSharp/ObjectManager.cs b/Source/Libs/GLibSharp/ObjectManager.cs index 29234a47a..44974aada 100755 --- a/Source/Libs/GLibSharp/ObjectManager.cs +++ b/Source/Libs/GLibSharp/ObjectManager.cs @@ -84,6 +84,6 @@ namespace GLib { } delegate IntPtr d_g_type_parent(IntPtr typ); - static d_g_type_parent g_type_parent = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_parent")); + static d_g_type_parent g_type_parent = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_parent")); } } diff --git a/Source/Libs/GLibSharp/ParamSpec.cs b/Source/Libs/GLibSharp/ParamSpec.cs index 9972b88c8..ee3003052 100755 --- a/Source/Libs/GLibSharp/ParamSpec.cs +++ b/Source/Libs/GLibSharp/ParamSpec.cs @@ -144,61 +144,61 @@ namespace GLib { } delegate IntPtr d_g_param_spec_char(IntPtr name, IntPtr nick, IntPtr blurb, sbyte min, sbyte max, sbyte dval, int flags); - static d_g_param_spec_char g_param_spec_char = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_char")); + static d_g_param_spec_char g_param_spec_char = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_char")); delegate IntPtr d_g_param_spec_uchar(IntPtr name, IntPtr nick, IntPtr blurb, byte min, byte max, byte dval, int flags); - static d_g_param_spec_uchar g_param_spec_uchar = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_uchar")); + static d_g_param_spec_uchar g_param_spec_uchar = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_uchar")); delegate IntPtr d_g_param_spec_boolean(IntPtr name, IntPtr nick, IntPtr blurb, bool dval, int flags); - static d_g_param_spec_boolean g_param_spec_boolean = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_boolean")); + static d_g_param_spec_boolean g_param_spec_boolean = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_boolean")); delegate IntPtr d_g_param_spec_enum(IntPtr name, IntPtr nick, IntPtr blurb, IntPtr enum_type, int dval, int flags); - static d_g_param_spec_enum g_param_spec_enum = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_enum")); + static d_g_param_spec_enum g_param_spec_enum = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_enum")); delegate IntPtr d_g_param_spec_int(IntPtr name, IntPtr nick, IntPtr blurb, int min, int max, int dval, int flags); - static d_g_param_spec_int g_param_spec_int = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_int")); + static d_g_param_spec_int g_param_spec_int = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_int")); delegate IntPtr d_g_param_spec_uint(IntPtr name, IntPtr nick, IntPtr blurb, uint min, uint max, uint dval, int flags); - static d_g_param_spec_uint g_param_spec_uint = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_uint")); + static d_g_param_spec_uint g_param_spec_uint = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_uint")); delegate IntPtr d_g_param_spec_long(IntPtr name, IntPtr nick, IntPtr blurb, IntPtr min, IntPtr max, IntPtr dval, int flags); - static d_g_param_spec_long g_param_spec_long = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_long")); + static d_g_param_spec_long g_param_spec_long = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_long")); delegate IntPtr d_g_param_spec_ulong(IntPtr name, IntPtr nick, IntPtr blurb, UIntPtr min, UIntPtr max, UIntPtr dval, int flags); - static d_g_param_spec_ulong g_param_spec_ulong = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_ulong")); + static d_g_param_spec_ulong g_param_spec_ulong = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_ulong")); delegate IntPtr d_g_param_spec_int64(IntPtr name, IntPtr nick, IntPtr blurb, long min, long max, long dval, int flags); - static d_g_param_spec_int64 g_param_spec_int64 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_int64")); + static d_g_param_spec_int64 g_param_spec_int64 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_int64")); delegate IntPtr d_g_param_spec_uint64(IntPtr name, IntPtr nick, IntPtr blurb, ulong min, ulong max, ulong dval, int flags); - static d_g_param_spec_uint64 g_param_spec_uint64 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_uint64")); + static d_g_param_spec_uint64 g_param_spec_uint64 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_uint64")); delegate IntPtr d_g_param_spec_float(IntPtr name, IntPtr nick, IntPtr blurb, float min, float max, float dval, int flags); - static d_g_param_spec_float g_param_spec_float = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_float")); + static d_g_param_spec_float g_param_spec_float = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_float")); delegate IntPtr d_g_param_spec_double(IntPtr name, IntPtr nick, IntPtr blurb, double min, double max, double dval, int flags); - static d_g_param_spec_double g_param_spec_double = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_double")); + static d_g_param_spec_double g_param_spec_double = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_double")); delegate IntPtr d_g_param_spec_string(IntPtr name, IntPtr nick, IntPtr blurb, IntPtr dval, int flags); - static d_g_param_spec_string g_param_spec_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_string")); + static d_g_param_spec_string g_param_spec_string = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_string")); delegate IntPtr d_g_param_spec_pointer(IntPtr name, IntPtr nick, IntPtr blurb, int flags); - static d_g_param_spec_pointer g_param_spec_pointer = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_pointer")); + static d_g_param_spec_pointer g_param_spec_pointer = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_pointer")); delegate IntPtr d_g_param_spec_gtype(IntPtr name, IntPtr nick, IntPtr blurb, IntPtr dval, int flags); - static d_g_param_spec_gtype g_param_spec_gtype = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_gtype")); + static d_g_param_spec_gtype g_param_spec_gtype = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_gtype")); delegate IntPtr d_g_param_spec_boxed(IntPtr name, IntPtr nick, IntPtr blurb, IntPtr return_type, int flags); - static d_g_param_spec_boxed g_param_spec_boxed = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_boxed")); + static d_g_param_spec_boxed g_param_spec_boxed = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_boxed")); delegate IntPtr d_g_param_spec_object(IntPtr name, IntPtr nick, IntPtr blurb, IntPtr return_type, int flags); - static d_g_param_spec_object g_param_spec_object = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_object")); + static d_g_param_spec_object g_param_spec_object = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_object")); delegate IntPtr d_g_gtype_get_type(); - static d_g_gtype_get_type g_gtype_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_gtype_get_type")); + static d_g_gtype_get_type g_gtype_get_type = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_gtype_get_type")); delegate bool d_g_type_is_a(IntPtr a, IntPtr b); - static d_g_type_is_a g_type_is_a = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_is_a")); + static d_g_type_is_a g_type_is_a = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_is_a")); } } diff --git a/Source/Libs/GLibSharp/PollFD.cs b/Source/Libs/GLibSharp/PollFD.cs index 7e3cdf5e3..80c8e299e 100755 --- a/Source/Libs/GLibSharp/PollFD.cs +++ b/Source/Libs/GLibSharp/PollFD.cs @@ -25,7 +25,7 @@ namespace GLib { } delegate IntPtr d_g_pollfd_get_type(); - static d_g_pollfd_get_type g_pollfd_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_pollfd_get_type")); + static d_g_pollfd_get_type g_pollfd_get_type = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_pollfd_get_type")); public static GLib.GType GType { get { diff --git a/Source/Libs/GLibSharp/PtrArray.cs b/Source/Libs/GLibSharp/PtrArray.cs index 8affc4a81..b8712e488 100755 --- a/Source/Libs/GLibSharp/PtrArray.cs +++ b/Source/Libs/GLibSharp/PtrArray.cs @@ -33,7 +33,7 @@ namespace GLib { protected System.Type element_type = null; delegate IntPtr d_g_ptr_array_sized_new(uint n_preallocs); - static d_g_ptr_array_sized_new g_ptr_array_sized_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_sized_new")); + static d_g_ptr_array_sized_new g_ptr_array_sized_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_sized_new")); public PtrArray (uint n_preallocs, System.Type element_type, bool owned, bool elements_owned) { @@ -44,7 +44,7 @@ namespace GLib { } delegate IntPtr d_g_ptr_array_new(); - static d_g_ptr_array_new g_ptr_array_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_new")); + static d_g_ptr_array_new g_ptr_array_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_new")); public PtrArray (System.Type element_type, bool owned, bool elements_owned) { @@ -78,10 +78,10 @@ namespace GLib { } delegate void d_g_ptr_array_free(IntPtr raw, bool free_seg); - static d_g_ptr_array_free g_ptr_array_free = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_free")); + static d_g_ptr_array_free g_ptr_array_free = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_free")); delegate void d_g_object_unref(IntPtr item); - static d_g_object_unref g_object_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_object_unref")); + static d_g_object_unref g_object_unref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_object_unref")); void Dispose (bool disposing) { @@ -118,7 +118,7 @@ namespace GLib { } delegate void d_g_ptr_array_add(IntPtr raw, IntPtr val); - static d_g_ptr_array_add g_ptr_array_add = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_add")); + static d_g_ptr_array_add g_ptr_array_add = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_add")); public void Add (IntPtr val) { @@ -126,7 +126,7 @@ namespace GLib { } delegate void d_g_ptr_array_remove(IntPtr raw, IntPtr data); - static d_g_ptr_array_remove g_ptr_array_remove = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_remove")); + static d_g_ptr_array_remove g_ptr_array_remove = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_remove")); public void Remove (IntPtr data) { @@ -134,7 +134,7 @@ namespace GLib { } delegate void d_g_ptr_array_remove_range(IntPtr raw, uint index, uint length); - static d_g_ptr_array_remove_range g_ptr_array_remove_range = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_remove_range")); + static d_g_ptr_array_remove_range g_ptr_array_remove_range = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_remove_range")); public void RemoveRange (IntPtr data, uint index, uint length) { @@ -258,7 +258,7 @@ namespace GLib { } delegate IntPtr d_g_ptr_array_copy(IntPtr raw); - static d_g_ptr_array_copy g_ptr_array_copy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_copy")); + static d_g_ptr_array_copy g_ptr_array_copy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_copy")); // ICloneable public object Clone () diff --git a/Source/Libs/GLibSharp/RecMutex.cs b/Source/Libs/GLibSharp/RecMutex.cs index bc2a7ae00..132ce9f98 100755 --- a/Source/Libs/GLibSharp/RecMutex.cs +++ b/Source/Libs/GLibSharp/RecMutex.cs @@ -19,28 +19,28 @@ namespace GLib { delegate void d_g_rec_mutex_clear(IntPtr raw); - static d_g_rec_mutex_clear g_rec_mutex_clear = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_rec_mutex_clear")); + static d_g_rec_mutex_clear g_rec_mutex_clear = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_rec_mutex_clear")); public void Clear() { g_rec_mutex_clear(Handle); } delegate void d_g_rec_mutex_init(IntPtr raw); - static d_g_rec_mutex_init g_rec_mutex_init = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_rec_mutex_init")); + static d_g_rec_mutex_init g_rec_mutex_init = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_rec_mutex_init")); public void Init() { g_rec_mutex_init(Handle); } delegate void d_g_rec_mutex_lock(IntPtr raw); - static d_g_rec_mutex_lock g_rec_mutex_lock = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_rec_mutex_lock")); + static d_g_rec_mutex_lock g_rec_mutex_lock = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_rec_mutex_lock")); public void Lock() { g_rec_mutex_lock(Handle); } delegate bool d_g_rec_mutex_trylock(IntPtr raw); - static d_g_rec_mutex_trylock g_rec_mutex_trylock = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_rec_mutex_trylock")); + static d_g_rec_mutex_trylock g_rec_mutex_trylock = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_rec_mutex_trylock")); public bool Trylock() { bool raw_ret = g_rec_mutex_trylock(Handle); @@ -49,7 +49,7 @@ namespace GLib { } delegate void d_g_rec_mutex_unlock(IntPtr raw); - static d_g_rec_mutex_unlock g_rec_mutex_unlock = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_rec_mutex_unlock")); + static d_g_rec_mutex_unlock g_rec_mutex_unlock = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_rec_mutex_unlock")); public void Unlock() { g_rec_mutex_unlock(Handle); diff --git a/Source/Libs/GLibSharp/SList.cs b/Source/Libs/GLibSharp/SList.cs index 7a06317f8..d662cda52 100755 --- a/Source/Libs/GLibSharp/SList.cs +++ b/Source/Libs/GLibSharp/SList.cs @@ -27,7 +27,7 @@ namespace GLib { public class SList : ListBase { delegate IntPtr d_g_slist_copy(IntPtr l); - static d_g_slist_copy g_slist_copy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_slist_copy")); + static d_g_slist_copy g_slist_copy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_slist_copy")); public override object Clone () { @@ -35,7 +35,7 @@ namespace GLib { } delegate int d_g_slist_length(IntPtr l); - static d_g_slist_length g_slist_length = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_slist_length")); + static d_g_slist_length g_slist_length = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_slist_length")); internal override int Length (IntPtr list) { @@ -43,7 +43,7 @@ namespace GLib { } delegate void d_g_slist_free(IntPtr l); - static d_g_slist_free g_slist_free = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_slist_free")); + static d_g_slist_free g_slist_free = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_slist_free")); internal override void Free (IntPtr list) { @@ -52,7 +52,7 @@ namespace GLib { } delegate IntPtr d_g_slist_append(IntPtr l, IntPtr raw); - static d_g_slist_append g_slist_append = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_slist_append")); + static d_g_slist_append g_slist_append = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_slist_append")); internal override IntPtr Append (IntPtr list, IntPtr raw) { @@ -60,7 +60,7 @@ namespace GLib { } delegate IntPtr d_g_slist_prepend(IntPtr l, IntPtr raw); - static d_g_slist_prepend g_slist_prepend = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_slist_prepend")); + static d_g_slist_prepend g_slist_prepend = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_slist_prepend")); internal override IntPtr Prepend (IntPtr list, IntPtr raw) { @@ -69,7 +69,7 @@ namespace GLib { delegate IntPtr d_g_slist_nth_data(IntPtr l, uint n); - static d_g_slist_nth_data g_slist_nth_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_slist_nth_data")); + static d_g_slist_nth_data g_slist_nth_data = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_slist_nth_data")); internal override IntPtr NthData (uint n) { diff --git a/Source/Libs/GLibSharp/Signal.cs b/Source/Libs/GLibSharp/Signal.cs index 20c9794e9..267018e4d 100755 --- a/Source/Libs/GLibSharp/Signal.cs +++ b/Source/Libs/GLibSharp/Signal.cs @@ -358,32 +358,32 @@ namespace GLib { } delegate IntPtr d_g_cclosure_new(Delegate cb, IntPtr data, IntPtr notify); - static d_g_cclosure_new g_cclosure_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_cclosure_new")); + static d_g_cclosure_new g_cclosure_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_cclosure_new")); delegate IntPtr d_g_signal_get_invocation_hint(IntPtr instance); - static d_g_signal_get_invocation_hint g_signal_get_invocation_hint = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_get_invocation_hint")); + static d_g_signal_get_invocation_hint g_signal_get_invocation_hint = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_get_invocation_hint")); delegate void d_g_signal_emitv(IntPtr instance_and_params, uint signal_id, uint gquark_detail, ref GLib.Value return_value); - static d_g_signal_emitv g_signal_emitv = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_emitv")); + static d_g_signal_emitv g_signal_emitv = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_emitv")); delegate void d_g_signal_emitv2(IntPtr instance_and_params, uint signal_id, uint gquark_detail, IntPtr return_value); - static d_g_signal_emitv2 g_signal_emitv2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_emitv")); + static d_g_signal_emitv2 g_signal_emitv2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_emitv")); delegate uint d_g_signal_lookup(IntPtr name, IntPtr itype); - static d_g_signal_lookup g_signal_lookup = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_lookup")); + static d_g_signal_lookup g_signal_lookup = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_lookup")); delegate void d_g_signal_override_class_closure(uint id, IntPtr gtype, IntPtr closure); - static d_g_signal_override_class_closure g_signal_override_class_closure = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_override_class_closure")); + static d_g_signal_override_class_closure g_signal_override_class_closure = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_override_class_closure")); delegate void d_g_signal_query(uint signal_id, out Query query); - static d_g_signal_query g_signal_query = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_query")); + static d_g_signal_query g_signal_query = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_query")); //better not to expose g_quark_from_static_string () due to memory allocation issues delegate uint d_g_quark_from_string(IntPtr str); - static d_g_quark_from_string g_quark_from_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_quark_from_string")); + static d_g_quark_from_string g_quark_from_string = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_quark_from_string")); delegate ulong d_g_signal_add_emission_hook(uint signal_id, uint gquark_detail, EmissionHookNative hook_func, IntPtr hook_data, IntPtr data_destroy); - static d_g_signal_add_emission_hook g_signal_add_emission_hook = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_add_emission_hook")); + static d_g_signal_add_emission_hook g_signal_add_emission_hook = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_add_emission_hook")); } } diff --git a/Source/Libs/GLibSharp/SignalClosure.cs b/Source/Libs/GLibSharp/SignalClosure.cs index a216c7601..b958d61f9 100755 --- a/Source/Libs/GLibSharp/SignalClosure.cs +++ b/Source/Libs/GLibSharp/SignalClosure.cs @@ -202,25 +202,25 @@ namespace GLib { } delegate IntPtr d_g_cclosure_new(Delegate cb, IntPtr user_data, ClosureNotify notify); - static d_g_cclosure_new g_cclosure_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_cclosure_new")); + static d_g_cclosure_new g_cclosure_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_cclosure_new")); delegate IntPtr d_g_closure_new_simple(int closure_size, IntPtr dummy); - static d_g_closure_new_simple g_closure_new_simple = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_closure_new_simple")); + static d_g_closure_new_simple g_closure_new_simple = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_closure_new_simple")); delegate void d_g_closure_set_marshal(IntPtr closure, ClosureMarshal marshaler); - static d_g_closure_set_marshal g_closure_set_marshal = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_closure_set_marshal")); + static d_g_closure_set_marshal g_closure_set_marshal = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_closure_set_marshal")); delegate void d_g_closure_add_finalize_notifier(IntPtr closure, IntPtr dummy, ClosureNotify notify); - static d_g_closure_add_finalize_notifier g_closure_add_finalize_notifier = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_closure_add_finalize_notifier")); + static d_g_closure_add_finalize_notifier g_closure_add_finalize_notifier = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_closure_add_finalize_notifier")); delegate uint d_g_signal_connect_closure(IntPtr obj, IntPtr name, IntPtr closure, bool is_after); - static d_g_signal_connect_closure g_signal_connect_closure = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_connect_closure")); + static d_g_signal_connect_closure g_signal_connect_closure = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_connect_closure")); delegate void d_g_signal_handler_disconnect(IntPtr instance, uint handler); - static d_g_signal_handler_disconnect g_signal_handler_disconnect = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_handler_disconnect")); + static d_g_signal_handler_disconnect g_signal_handler_disconnect = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_handler_disconnect")); delegate bool d_g_signal_handler_is_connected(IntPtr instance, uint handler); - static d_g_signal_handler_is_connected g_signal_handler_is_connected = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_handler_is_connected")); + static d_g_signal_handler_is_connected g_signal_handler_is_connected = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_handler_is_connected")); } } diff --git a/Source/Libs/GLibSharp/Source.cs b/Source/Libs/GLibSharp/Source.cs index b357db25e..e3266591b 100755 --- a/Source/Libs/GLibSharp/Source.cs +++ b/Source/Libs/GLibSharp/Source.cs @@ -77,7 +77,7 @@ namespace GLib { public Source(IntPtr raw) : base(raw) {} delegate IntPtr d_g_source_new(IntPtr source_funcs, uint struct_size); - static d_g_source_new g_source_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_new")); + static d_g_source_new g_source_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_new")); public Source (GLib.SourceFuncs source_funcs, uint struct_size) { @@ -148,7 +148,7 @@ namespace GLib { } delegate bool d_g_source_remove(uint tag); - static d_g_source_remove g_source_remove = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_remove")); + static d_g_source_remove g_source_remove = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_remove")); public static bool Remove (uint tag) { @@ -164,7 +164,7 @@ namespace GLib { } delegate IntPtr d_g_source_get_type(); - static d_g_source_get_type g_source_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_type")); + static d_g_source_get_type g_source_get_type = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_type")); public static GLib.GType GType { get { @@ -175,7 +175,7 @@ namespace GLib { } delegate IntPtr d_g_source_get_context(IntPtr raw); - static d_g_source_get_context g_source_get_context = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_context")); + static d_g_source_get_context g_source_get_context = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_context")); public GLib.MainContext Context { get { @@ -186,10 +186,10 @@ namespace GLib { } delegate int d_g_source_get_priority(IntPtr raw); - static d_g_source_get_priority g_source_get_priority = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_priority")); + static d_g_source_get_priority g_source_get_priority = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_priority")); delegate void d_g_source_set_priority(IntPtr raw, int priority); - static d_g_source_set_priority g_source_set_priority = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_priority")); + static d_g_source_set_priority g_source_set_priority = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_priority")); public int Priority { get { @@ -203,10 +203,10 @@ namespace GLib { } delegate IntPtr d_g_source_get_name(IntPtr raw); - static d_g_source_get_name g_source_get_name = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_name")); + static d_g_source_get_name g_source_get_name = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_name")); delegate void d_g_source_set_name(IntPtr raw, IntPtr name); - static d_g_source_set_name g_source_set_name = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_name")); + static d_g_source_set_name g_source_set_name = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_name")); public string Name { get { @@ -222,14 +222,14 @@ namespace GLib { } delegate void d_g_source_add_child_source(IntPtr raw, IntPtr child_source); - static d_g_source_add_child_source g_source_add_child_source = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_add_child_source")); + static d_g_source_add_child_source g_source_add_child_source = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_add_child_source")); public void AddChildSource(GLib.Source child_source) { g_source_add_child_source(Handle, child_source == null ? IntPtr.Zero : child_source.Handle); } delegate void d_g_source_add_poll(IntPtr raw, IntPtr fd); - static d_g_source_add_poll g_source_add_poll = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_add_poll")); + static d_g_source_add_poll g_source_add_poll = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_add_poll")); public void AddPoll(GLib.PollFD fd) { IntPtr native_fd = GLib.Marshaller.StructureToPtrAlloc (fd); @@ -239,7 +239,7 @@ namespace GLib { } delegate uint d_g_source_attach(IntPtr raw, IntPtr context); - static d_g_source_attach g_source_attach = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_attach")); + static d_g_source_attach g_source_attach = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_attach")); public uint Attach(GLib.MainContext context) { uint raw_ret = g_source_attach(Handle, context == null ? IntPtr.Zero : context.Handle); @@ -252,10 +252,10 @@ namespace GLib { } delegate bool d_g_source_get_can_recurse(IntPtr raw); - static d_g_source_get_can_recurse g_source_get_can_recurse = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_can_recurse")); + static d_g_source_get_can_recurse g_source_get_can_recurse = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_can_recurse")); delegate void d_g_source_set_can_recurse(IntPtr raw, bool can_recurse); - static d_g_source_set_can_recurse g_source_set_can_recurse = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_can_recurse")); + static d_g_source_set_can_recurse g_source_set_can_recurse = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_can_recurse")); public bool CanRecurse { get { @@ -269,7 +269,7 @@ namespace GLib { } delegate void d_g_source_get_current_time(IntPtr raw, IntPtr timeval); - static d_g_source_get_current_time g_source_get_current_time = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_current_time")); + static d_g_source_get_current_time g_source_get_current_time = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_current_time")); [Obsolete] public void GetCurrentTime(GLib.TimeVal timeval) { @@ -280,7 +280,7 @@ namespace GLib { } delegate uint d_g_source_get_id(IntPtr raw); - static d_g_source_get_id g_source_get_id = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_id")); + static d_g_source_get_id g_source_get_id = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_id")); public uint Id { get { @@ -291,10 +291,10 @@ namespace GLib { } delegate long d_g_source_get_ready_time(IntPtr raw); - static d_g_source_get_ready_time g_source_get_ready_time = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_ready_time")); + static d_g_source_get_ready_time g_source_get_ready_time = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_ready_time")); delegate void d_g_source_set_ready_time(IntPtr raw, long ready_time); - static d_g_source_set_ready_time g_source_set_ready_time = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_ready_time")); + static d_g_source_set_ready_time g_source_set_ready_time = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_ready_time")); public long ReadyTime { get { @@ -308,7 +308,7 @@ namespace GLib { } delegate long d_g_source_get_time(IntPtr raw); - static d_g_source_get_time g_source_get_time = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_time")); + static d_g_source_get_time g_source_get_time = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_time")); public long Time { get { @@ -319,7 +319,7 @@ namespace GLib { } delegate bool d_g_source_is_destroyed(IntPtr raw); - static d_g_source_is_destroyed g_source_is_destroyed = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_is_destroyed")); + static d_g_source_is_destroyed g_source_is_destroyed = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_is_destroyed")); public bool IsDestroyed { get { @@ -330,14 +330,14 @@ namespace GLib { } delegate void d_g_source_modify_unix_fd(IntPtr raw, IntPtr tag, int new_events); - static d_g_source_modify_unix_fd g_source_modify_unix_fd = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_modify_unix_fd")); + static d_g_source_modify_unix_fd g_source_modify_unix_fd = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_modify_unix_fd")); public void ModifyUnixFd(IntPtr tag, GLib.IOCondition new_events) { g_source_modify_unix_fd(Handle, tag, (int) new_events); } delegate int d_g_source_query_unix_fd(IntPtr raw, IntPtr tag); - static d_g_source_query_unix_fd g_source_query_unix_fd = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_query_unix_fd")); + static d_g_source_query_unix_fd g_source_query_unix_fd = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_query_unix_fd")); public GLib.IOCondition QueryUnixFd(IntPtr tag) { int raw_ret = g_source_query_unix_fd(Handle, tag); @@ -346,14 +346,14 @@ namespace GLib { } delegate void d_g_source_remove_child_source(IntPtr raw, IntPtr child_source); - static d_g_source_remove_child_source g_source_remove_child_source = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_remove_child_source")); + static d_g_source_remove_child_source g_source_remove_child_source = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_remove_child_source")); public void RemoveChildSource(GLib.Source child_source) { g_source_remove_child_source(Handle, child_source == null ? IntPtr.Zero : child_source.Handle); } delegate void d_g_source_remove_poll(IntPtr raw, IntPtr fd); - static d_g_source_remove_poll g_source_remove_poll = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_remove_poll")); + static d_g_source_remove_poll g_source_remove_poll = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_remove_poll")); public void RemovePoll(GLib.PollFD fd) { IntPtr native_fd = GLib.Marshaller.StructureToPtrAlloc (fd); @@ -363,14 +363,14 @@ namespace GLib { } delegate void d_g_source_remove_unix_fd(IntPtr raw, IntPtr tag); - static d_g_source_remove_unix_fd g_source_remove_unix_fd = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_remove_unix_fd")); + static d_g_source_remove_unix_fd g_source_remove_unix_fd = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_remove_unix_fd")); public void RemoveUnixFd(IntPtr tag) { g_source_remove_unix_fd(Handle, tag); } delegate void d_g_source_set_callback_indirect(IntPtr raw, IntPtr callback_data, IntPtr callback_funcs); - static d_g_source_set_callback_indirect g_source_set_callback_indirect = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_callback_indirect")); + static d_g_source_set_callback_indirect g_source_set_callback_indirect = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_callback_indirect")); public void SetCallbackIndirect(IntPtr callback_data, GLib.SourceCallbackFuncs callback_funcs) { IntPtr native_callback_funcs = GLib.Marshaller.StructureToPtrAlloc (callback_funcs); @@ -380,7 +380,7 @@ namespace GLib { } delegate void d_g_source_set_funcs(IntPtr raw, IntPtr value); - static d_g_source_set_funcs g_source_set_funcs = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_funcs")); + static d_g_source_set_funcs g_source_set_funcs = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_funcs")); public GLib.SourceFuncs Funcs { set { @@ -392,7 +392,7 @@ namespace GLib { } delegate bool d_g_source_remove_by_funcs_user_data(IntPtr funcs, IntPtr user_data); - static d_g_source_remove_by_funcs_user_data g_source_remove_by_funcs_user_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_remove_by_funcs_user_data")); + static d_g_source_remove_by_funcs_user_data g_source_remove_by_funcs_user_data = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_remove_by_funcs_user_data")); public static bool RemoveByFuncsUserData(GLib.SourceFuncs funcs, IntPtr user_data) { IntPtr native_funcs = GLib.Marshaller.StructureToPtrAlloc (funcs); @@ -404,7 +404,7 @@ namespace GLib { } delegate bool d_g_source_remove_by_user_data(IntPtr user_data); - static d_g_source_remove_by_user_data g_source_remove_by_user_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_remove_by_user_data")); + static d_g_source_remove_by_user_data g_source_remove_by_user_data = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_remove_by_user_data")); public static bool RemoveByUserData(IntPtr user_data) { bool raw_ret = g_source_remove_by_user_data(user_data); @@ -413,7 +413,7 @@ namespace GLib { } delegate void d_g_source_set_name_by_id(uint tag, IntPtr name); - static d_g_source_set_name_by_id g_source_set_name_by_id = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_name_by_id")); + static d_g_source_set_name_by_id g_source_set_name_by_id = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_name_by_id")); public static void SetNameById(uint tag, string name) { IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); @@ -422,7 +422,7 @@ namespace GLib { } delegate IntPtr d_g_source_ref(IntPtr raw); - static d_g_source_ref g_source_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_ref")); + static d_g_source_ref g_source_ref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_ref")); protected override void Ref (IntPtr raw) { @@ -433,7 +433,7 @@ namespace GLib { } delegate void d_g_source_unref(IntPtr raw); - static d_g_source_unref g_source_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_unref")); + static d_g_source_unref g_source_unref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_unref")); protected override void Unref (IntPtr raw) { @@ -444,7 +444,7 @@ namespace GLib { } delegate void d_g_source_destroy(IntPtr raw); - static d_g_source_destroy g_source_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_destroy")); + static d_g_source_destroy g_source_destroy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_destroy")); protected override void Free (IntPtr raw) { diff --git a/Source/Libs/GLibSharp/Spawn.cs b/Source/Libs/GLibSharp/Spawn.cs index 80fa0592f..08b987986 100755 --- a/Source/Libs/GLibSharp/Spawn.cs +++ b/Source/Libs/GLibSharp/Spawn.cs @@ -103,7 +103,7 @@ namespace GLib { } delegate void d_g_spawn_close_pid(int pid); - static d_g_spawn_close_pid g_spawn_close_pid = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_spawn_close_pid")); + static d_g_spawn_close_pid g_spawn_close_pid = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_spawn_close_pid")); public void Close () { @@ -111,10 +111,10 @@ namespace GLib { } delegate bool d_g_spawn_async(IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, out IntPtr error); - static d_g_spawn_async g_spawn_async = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_spawn_async")); + static d_g_spawn_async g_spawn_async = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_spawn_async")); delegate bool d_g_spawn_async_utf8(IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, out IntPtr error); - static d_g_spawn_async_utf8 g_spawn_async_utf8 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_spawn_async_utf8")); + static d_g_spawn_async_utf8 g_spawn_async_utf8 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_spawn_async_utf8")); public static bool SpawnAsync (string working_directory, string[] argv, string[] envp, SpawnFlags flags, SpawnChildSetupFunc child_setup, out Process child_process) { @@ -140,10 +140,10 @@ namespace GLib { } delegate bool d_g_spawn_async_with_pipes(IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, IntPtr stdin, IntPtr stdout, IntPtr stderr, out IntPtr error); - static d_g_spawn_async_with_pipes g_spawn_async_with_pipes = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_spawn_async_with_pipes")); + static d_g_spawn_async_with_pipes g_spawn_async_with_pipes = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_spawn_async_with_pipes")); delegate bool d_g_spawn_async_with_pipes_utf8(IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, IntPtr stdin, IntPtr stdout, IntPtr stderr, out IntPtr error); - static d_g_spawn_async_with_pipes_utf8 g_spawn_async_with_pipes_utf8 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_spawn_async_with_pipes_utf8")); + static d_g_spawn_async_with_pipes_utf8 g_spawn_async_with_pipes_utf8 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_spawn_async_with_pipes_utf8")); public static bool SpawnAsyncWithPipes (string working_directory, string[] argv, string[] envp, SpawnFlags flags, SpawnChildSetupFunc child_setup, out Process child_process, ref int stdin, ref int stdout, ref int stderr) { @@ -184,10 +184,10 @@ namespace GLib { } delegate bool d_g_spawn_sync(IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error); - static d_g_spawn_sync g_spawn_sync = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_spawn_sync")); + static d_g_spawn_sync g_spawn_sync = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_spawn_sync")); delegate bool d_g_spawn_sync_utf8(IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error); - static d_g_spawn_sync_utf8 g_spawn_sync_utf8 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_spawn_sync_utf8")); + static d_g_spawn_sync_utf8 g_spawn_sync_utf8 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_spawn_sync_utf8")); public static bool SpawnSync (string working_directory, string[] argv, string[] envp, SpawnFlags flags, SpawnChildSetupFunc child_setup, out string stdout, out string stderr, out int exit_status) { @@ -213,10 +213,10 @@ namespace GLib { } delegate bool d_g_spawn_command_line_async(IntPtr cmdline, out IntPtr error); - static d_g_spawn_command_line_async g_spawn_command_line_async = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_spawn_command_line_async")); + static d_g_spawn_command_line_async g_spawn_command_line_async = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_spawn_command_line_async")); delegate bool d_g_spawn_command_line_async_utf8(IntPtr cmdline, out IntPtr error); - static d_g_spawn_command_line_async_utf8 g_spawn_command_line_async_utf8 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_spawn_command_line_async_utf8")); + static d_g_spawn_command_line_async_utf8 g_spawn_command_line_async_utf8 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_spawn_command_line_async_utf8")); public static bool SpawnCommandLineAsync (string command_line) { @@ -235,10 +235,10 @@ namespace GLib { } delegate bool d_g_spawn_command_line_sync(IntPtr cmdline, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error); - static d_g_spawn_command_line_sync g_spawn_command_line_sync = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_spawn_command_line_sync")); + static d_g_spawn_command_line_sync g_spawn_command_line_sync = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_spawn_command_line_sync")); delegate bool d_g_spawn_command_line_sync_utf8(IntPtr cmdline, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error); - static d_g_spawn_command_line_sync_utf8 g_spawn_command_line_sync_utf8 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_spawn_command_line_sync_utf8")); + static d_g_spawn_command_line_sync_utf8 g_spawn_command_line_sync_utf8 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_spawn_command_line_sync_utf8")); public static bool SpawnCommandLineSync (string command_line, out string stdout, out string stderr, out int exit_status) { diff --git a/Source/Libs/GLibSharp/TimeVal.cs b/Source/Libs/GLibSharp/TimeVal.cs index d0da3d92d..ea8aa6698 100755 --- a/Source/Libs/GLibSharp/TimeVal.cs +++ b/Source/Libs/GLibSharp/TimeVal.cs @@ -40,7 +40,7 @@ namespace GLib { } delegate void d_g_time_val_add(IntPtr raw, IntPtr microseconds); - static d_g_time_val_add g_time_val_add = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_val_add")); + static d_g_time_val_add g_time_val_add = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_val_add")); public void Add(long microseconds) { IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); @@ -51,7 +51,7 @@ namespace GLib { } delegate IntPtr d_g_time_val_to_iso8601(IntPtr raw); - static d_g_time_val_to_iso8601 g_time_val_to_iso8601 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_val_to_iso8601")); + static d_g_time_val_to_iso8601 g_time_val_to_iso8601 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_val_to_iso8601")); public string ToIso8601() { IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); @@ -64,7 +64,7 @@ namespace GLib { } delegate bool d_g_time_val_from_iso8601(IntPtr iso_date, IntPtr time_); - static d_g_time_val_from_iso8601 g_time_val_from_iso8601 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_val_from_iso8601")); + static d_g_time_val_from_iso8601 g_time_val_from_iso8601 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_val_from_iso8601")); public static bool FromIso8601(string iso_date, out GLib.TimeVal time_) { IntPtr native_iso_date = GLib.Marshaller.StringToPtrGStrdup (iso_date); diff --git a/Source/Libs/GLibSharp/TimeZone.cs b/Source/Libs/GLibSharp/TimeZone.cs index 9e1b87263..280a0014e 100755 --- a/Source/Libs/GLibSharp/TimeZone.cs +++ b/Source/Libs/GLibSharp/TimeZone.cs @@ -12,7 +12,7 @@ namespace GLib { public partial class TimeZone : GLib.Opaque { delegate IntPtr d_g_time_zone_get_type(); - static d_g_time_zone_get_type g_time_zone_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_get_type")); + static d_g_time_zone_get_type g_time_zone_get_type = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_get_type")); public static GLib.GType GType { get { @@ -23,7 +23,7 @@ namespace GLib { } delegate int d_g_time_zone_adjust_time(IntPtr raw, int type, long time_); - static d_g_time_zone_adjust_time g_time_zone_adjust_time = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_adjust_time")); + static d_g_time_zone_adjust_time g_time_zone_adjust_time = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_adjust_time")); public int AdjustTime(int type, long time_) { int raw_ret = g_time_zone_adjust_time(Handle, type, time_); @@ -32,7 +32,7 @@ namespace GLib { } delegate int d_g_time_zone_find_interval(IntPtr raw, int type, long time_); - static d_g_time_zone_find_interval g_time_zone_find_interval = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_find_interval")); + static d_g_time_zone_find_interval g_time_zone_find_interval = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_find_interval")); public int FindInterval(int type, long time_) { int raw_ret = g_time_zone_find_interval(Handle, type, time_); @@ -41,7 +41,7 @@ namespace GLib { } delegate IntPtr d_g_time_zone_get_abbreviation(IntPtr raw, int interval); - static d_g_time_zone_get_abbreviation g_time_zone_get_abbreviation = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_get_abbreviation")); + static d_g_time_zone_get_abbreviation g_time_zone_get_abbreviation = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_get_abbreviation")); public string GetAbbreviation(int interval) { IntPtr raw_ret = g_time_zone_get_abbreviation(Handle, interval); @@ -50,7 +50,7 @@ namespace GLib { } delegate int d_g_time_zone_get_offset(IntPtr raw, int interval); - static d_g_time_zone_get_offset g_time_zone_get_offset = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_get_offset")); + static d_g_time_zone_get_offset g_time_zone_get_offset = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_get_offset")); public int GetOffset(int interval) { int raw_ret = g_time_zone_get_offset(Handle, interval); @@ -59,7 +59,7 @@ namespace GLib { } delegate bool d_g_time_zone_is_dst(IntPtr raw, int interval); - static d_g_time_zone_is_dst g_time_zone_is_dst = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_is_dst")); + static d_g_time_zone_is_dst g_time_zone_is_dst = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_is_dst")); public bool IsDst(int interval) { bool raw_ret = g_time_zone_is_dst(Handle, interval); @@ -70,7 +70,7 @@ namespace GLib { public TimeZone(IntPtr raw) : base(raw) {} delegate IntPtr d_g_time_zone_new(IntPtr identifier); - static d_g_time_zone_new g_time_zone_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_new")); + static d_g_time_zone_new g_time_zone_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_new")); public TimeZone (string identifier) { @@ -80,7 +80,7 @@ namespace GLib { } delegate IntPtr d_g_time_zone_new_local(); - static d_g_time_zone_new_local g_time_zone_new_local = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_new_local")); + static d_g_time_zone_new_local g_time_zone_new_local = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_new_local")); public TimeZone () { @@ -88,7 +88,7 @@ namespace GLib { } delegate IntPtr d_g_time_zone_new_utc(); - static d_g_time_zone_new_utc g_time_zone_new_utc = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_new_utc")); + static d_g_time_zone_new_utc g_time_zone_new_utc = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_new_utc")); public static TimeZone NewUtc() { @@ -97,7 +97,7 @@ namespace GLib { } delegate IntPtr d_g_time_zone_ref(IntPtr raw); - static d_g_time_zone_ref g_time_zone_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_ref")); + static d_g_time_zone_ref g_time_zone_ref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_ref")); protected override void Ref (IntPtr raw) { @@ -108,7 +108,7 @@ namespace GLib { } delegate void d_g_time_zone_unref(IntPtr raw); - static d_g_time_zone_unref g_time_zone_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_unref")); + static d_g_time_zone_unref g_time_zone_unref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_unref")); protected override void Unref (IntPtr raw) { diff --git a/Source/Libs/GLibSharp/Timeout.cs b/Source/Libs/GLibSharp/Timeout.cs index b9821c09a..5d7992a00 100755 --- a/Source/Libs/GLibSharp/Timeout.cs +++ b/Source/Libs/GLibSharp/Timeout.cs @@ -65,7 +65,7 @@ namespace GLib { private Timeout () {} delegate uint d_g_timeout_add(uint interval, TimeoutHandlerInternal d, IntPtr data); - static d_g_timeout_add g_timeout_add = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_timeout_add")); + static d_g_timeout_add g_timeout_add = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_timeout_add")); public static uint Add (uint interval, TimeoutHandler hndlr) { @@ -80,7 +80,7 @@ namespace GLib { } delegate uint d_g_timeout_add_full(int priority, uint interval, TimeoutHandlerInternal d, IntPtr data, DestroyNotify notify); - static d_g_timeout_add_full g_timeout_add_full = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_timeout_add_full")); + static d_g_timeout_add_full g_timeout_add_full = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_timeout_add_full")); public static uint Add (uint interval, TimeoutHandler hndlr, Priority priority) { @@ -95,7 +95,7 @@ namespace GLib { } delegate uint d_g_timeout_add_seconds(uint interval, TimeoutHandlerInternal d, IntPtr data); - static d_g_timeout_add_seconds g_timeout_add_seconds = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_timeout_add_seconds")); + static d_g_timeout_add_seconds g_timeout_add_seconds = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_timeout_add_seconds")); public static uint AddSeconds (uint interval, TimeoutHandler hndlr) { diff --git a/Source/Libs/GLibSharp/ToggleRef.cs b/Source/Libs/GLibSharp/ToggleRef.cs index 2d97bba69..06b758f53 100755 --- a/Source/Libs/GLibSharp/ToggleRef.cs +++ b/Source/Libs/GLibSharp/ToggleRef.cs @@ -156,16 +156,16 @@ namespace GLib { } delegate void d_g_object_add_toggle_ref(IntPtr raw, ToggleNotifyHandler notify_cb, IntPtr data); - static d_g_object_add_toggle_ref g_object_add_toggle_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_add_toggle_ref")); + static d_g_object_add_toggle_ref g_object_add_toggle_ref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_add_toggle_ref")); delegate void d_g_object_remove_toggle_ref(IntPtr raw, ToggleNotifyHandler notify_cb, IntPtr data); - static d_g_object_remove_toggle_ref g_object_remove_toggle_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_remove_toggle_ref")); + static d_g_object_remove_toggle_ref g_object_remove_toggle_ref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_remove_toggle_ref")); delegate IntPtr d_g_object_ref(IntPtr raw); - static d_g_object_ref g_object_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_ref")); + static d_g_object_ref g_object_ref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_ref")); delegate void d_g_object_unref(IntPtr raw); - static d_g_object_unref g_object_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_unref")); + static d_g_object_unref g_object_unref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_unref")); } } diff --git a/Source/Libs/GLibSharp/Value.cs b/Source/Libs/GLibSharp/Value.cs index 66b9f8c10..073c88ae0 100755 --- a/Source/Libs/GLibSharp/Value.cs +++ b/Source/Libs/GLibSharp/Value.cs @@ -611,144 +611,144 @@ namespace GLib { } delegate IntPtr d_g_object_class_find_property(IntPtr klass, IntPtr name); - static d_g_object_class_find_property g_object_class_find_property = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_class_find_property")); + static d_g_object_class_find_property g_object_class_find_property = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_class_find_property")); delegate bool d_g_type_check_value_holds(ref Value val, IntPtr gtype); - static d_g_type_check_value_holds g_type_check_value_holds = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_check_value_holds")); + static d_g_type_check_value_holds g_type_check_value_holds = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_check_value_holds")); delegate void d_g_value_init(ref GLib.Value val, IntPtr gtype); - static d_g_value_init g_value_init = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_init")); + static d_g_value_init g_value_init = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_init")); delegate void d_g_value_unset(ref GLib.Value val); - static d_g_value_unset g_value_unset = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_unset")); + static d_g_value_unset g_value_unset = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_unset")); delegate void d_g_value_set_boolean(ref Value val, bool data); - static d_g_value_set_boolean g_value_set_boolean = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_boolean")); + static d_g_value_set_boolean g_value_set_boolean = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_boolean")); delegate void d_g_value_set_uchar(ref Value val, byte data); - static d_g_value_set_uchar g_value_set_uchar = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_uchar")); + static d_g_value_set_uchar g_value_set_uchar = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_uchar")); delegate void d_g_value_set_char(ref Value val, sbyte data); - static d_g_value_set_char g_value_set_char = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_char")); + static d_g_value_set_char g_value_set_char = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_char")); delegate void d_g_value_set_boxed(ref Value val, IntPtr data); - static d_g_value_set_boxed g_value_set_boxed = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_boxed")); + static d_g_value_set_boxed g_value_set_boxed = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_boxed")); delegate void d_g_value_set_double(ref Value val, double data); - static d_g_value_set_double g_value_set_double = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_double")); + static d_g_value_set_double g_value_set_double = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_double")); delegate void d_g_value_set_float(ref Value val, float data); - static d_g_value_set_float g_value_set_float = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_float")); + static d_g_value_set_float g_value_set_float = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_float")); delegate void d_g_value_set_int(ref Value val, int data); - static d_g_value_set_int g_value_set_int = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_int")); + static d_g_value_set_int g_value_set_int = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_int")); delegate void d_g_value_set_int64(ref Value val, long data); - static d_g_value_set_int64 g_value_set_int64 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_int64")); + static d_g_value_set_int64 g_value_set_int64 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_int64")); delegate void d_g_value_set_long(ref Value val, IntPtr data); - static d_g_value_set_long g_value_set_long = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_long")); + static d_g_value_set_long g_value_set_long = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_long")); delegate void d_g_value_set_long2(ref Value val, int data); - static d_g_value_set_long2 g_value_set_long2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_long")); + static d_g_value_set_long2 g_value_set_long2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_long")); delegate void d_g_value_set_uint64(ref Value val, ulong data); - static d_g_value_set_uint64 g_value_set_uint64 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_uint64")); + static d_g_value_set_uint64 g_value_set_uint64 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_uint64")); delegate void d_g_value_set_object(ref Value val, IntPtr data); - static d_g_value_set_object g_value_set_object = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_object")); + static d_g_value_set_object g_value_set_object = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_object")); delegate void d_g_value_set_param(ref Value val, IntPtr data); - static d_g_value_set_param g_value_set_param = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_param")); + static d_g_value_set_param g_value_set_param = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_param")); delegate void d_g_value_set_pointer(ref Value val, IntPtr data); - static d_g_value_set_pointer g_value_set_pointer = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_pointer")); + static d_g_value_set_pointer g_value_set_pointer = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_pointer")); delegate void d_g_value_set_string(ref Value val, IntPtr data); - static d_g_value_set_string g_value_set_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_string")); + static d_g_value_set_string g_value_set_string = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_string")); delegate void d_g_value_set_uint(ref Value val, uint data); - static d_g_value_set_uint g_value_set_uint = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_uint")); + static d_g_value_set_uint g_value_set_uint = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_uint")); delegate void d_g_value_set_ulong(ref Value val, UIntPtr data); - static d_g_value_set_ulong g_value_set_ulong = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_ulong")); + static d_g_value_set_ulong g_value_set_ulong = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_ulong")); delegate void d_g_value_set_ulong2(ref Value val, uint data); - static d_g_value_set_ulong2 g_value_set_ulong2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_ulong")); + static d_g_value_set_ulong2 g_value_set_ulong2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_ulong")); delegate void d_g_value_set_enum(ref Value val, int data); - static d_g_value_set_enum g_value_set_enum = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_enum")); + static d_g_value_set_enum g_value_set_enum = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_enum")); delegate void d_g_value_set_flags(ref Value val, uint data); - static d_g_value_set_flags g_value_set_flags = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_flags")); + static d_g_value_set_flags g_value_set_flags = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_flags")); delegate void d_g_value_set_variant(ref Value val, IntPtr data); - static d_g_value_set_variant g_value_set_variant = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_variant")); + static d_g_value_set_variant g_value_set_variant = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_variant")); delegate bool d_g_value_get_boolean(ref Value val); - static d_g_value_get_boolean g_value_get_boolean = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_boolean")); + static d_g_value_get_boolean g_value_get_boolean = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_boolean")); delegate byte d_g_value_get_uchar(ref Value val); - static d_g_value_get_uchar g_value_get_uchar = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_uchar")); + static d_g_value_get_uchar g_value_get_uchar = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_uchar")); delegate sbyte d_g_value_get_char(ref Value val); - static d_g_value_get_char g_value_get_char = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_char")); + static d_g_value_get_char g_value_get_char = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_char")); delegate IntPtr d_g_value_get_boxed(ref Value val); - static d_g_value_get_boxed g_value_get_boxed = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_boxed")); + static d_g_value_get_boxed g_value_get_boxed = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_boxed")); delegate double d_g_value_get_double(ref Value val); - static d_g_value_get_double g_value_get_double = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_double")); + static d_g_value_get_double g_value_get_double = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_double")); delegate float d_g_value_get_float(ref Value val); - static d_g_value_get_float g_value_get_float = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_float")); + static d_g_value_get_float g_value_get_float = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_float")); delegate int d_g_value_get_int(ref Value val); - static d_g_value_get_int g_value_get_int = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_int")); + static d_g_value_get_int g_value_get_int = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_int")); delegate long d_g_value_get_int64(ref Value val); - static d_g_value_get_int64 g_value_get_int64 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_int64")); + static d_g_value_get_int64 g_value_get_int64 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_int64")); delegate IntPtr d_g_value_get_long(ref Value val); - static d_g_value_get_long g_value_get_long = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_long")); + static d_g_value_get_long g_value_get_long = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_long")); delegate int d_g_value_get_long_as_int(ref Value val); - static d_g_value_get_long_as_int g_value_get_long_as_int = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_long")); + static d_g_value_get_long_as_int g_value_get_long_as_int = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_long")); delegate ulong d_g_value_get_uint64(ref Value val); - static d_g_value_get_uint64 g_value_get_uint64 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_uint64")); + static d_g_value_get_uint64 g_value_get_uint64 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_uint64")); delegate UIntPtr d_g_value_get_ulong(ref Value val); - static d_g_value_get_ulong g_value_get_ulong = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_ulong")); + static d_g_value_get_ulong g_value_get_ulong = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_ulong")); delegate int d_g_value_get_ulong_as_uint(ref Value val); - static d_g_value_get_ulong_as_uint g_value_get_ulong_as_uint = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_ulong")); + static d_g_value_get_ulong_as_uint g_value_get_ulong_as_uint = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_ulong")); delegate IntPtr d_g_value_get_object(ref Value val); - static d_g_value_get_object g_value_get_object = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_object")); + static d_g_value_get_object g_value_get_object = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_object")); delegate IntPtr d_g_value_get_param(ref Value val); - static d_g_value_get_param g_value_get_param = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_param")); + static d_g_value_get_param g_value_get_param = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_param")); delegate IntPtr d_g_value_get_pointer(ref Value val); - static d_g_value_get_pointer g_value_get_pointer = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_pointer")); + static d_g_value_get_pointer g_value_get_pointer = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_pointer")); delegate IntPtr d_g_value_get_string(ref Value val); - static d_g_value_get_string g_value_get_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_string")); + static d_g_value_get_string g_value_get_string = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_string")); delegate uint d_g_value_get_uint(ref Value val); - static d_g_value_get_uint g_value_get_uint = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_uint")); + static d_g_value_get_uint g_value_get_uint = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_uint")); delegate int d_g_value_get_enum(ref Value val); - static d_g_value_get_enum g_value_get_enum = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_enum")); + static d_g_value_get_enum g_value_get_enum = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_enum")); delegate uint d_g_value_get_flags(ref Value val); - static d_g_value_get_flags g_value_get_flags = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_flags")); + static d_g_value_get_flags g_value_get_flags = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_flags")); delegate IntPtr d_g_strv_get_type(); - static d_g_strv_get_type g_strv_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_strv_get_type")); + static d_g_strv_get_type g_strv_get_type = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_strv_get_type")); delegate IntPtr d_g_value_get_variant(ref Value val); - static d_g_value_get_variant g_value_get_variant = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_variant")); + static d_g_value_get_variant g_value_get_variant = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_variant")); } } diff --git a/Source/Libs/GLibSharp/ValueArray.cs b/Source/Libs/GLibSharp/ValueArray.cs index 0dffe7e4c..a9f4e5424 100755 --- a/Source/Libs/GLibSharp/ValueArray.cs +++ b/Source/Libs/GLibSharp/ValueArray.cs @@ -34,7 +34,7 @@ namespace GLib { static private bool idle_queued = false; delegate IntPtr d_g_value_array_new(uint n_preallocs); - static d_g_value_array_new g_value_array_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_new")); + static d_g_value_array_new g_value_array_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_new")); public ValueArray (uint n_preallocs) { @@ -59,7 +59,7 @@ namespace GLib { } delegate void d_g_value_array_free(IntPtr raw); - static d_g_value_array_free g_value_array_free = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_free")); + static d_g_value_array_free g_value_array_free = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_free")); void Dispose (bool disposing) { @@ -117,7 +117,7 @@ namespace GLib { } delegate void d_g_value_array_append(IntPtr raw, ref GLib.Value val); - static d_g_value_array_append g_value_array_append = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_append")); + static d_g_value_array_append g_value_array_append = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_append")); public void Append (GLib.Value val) { @@ -125,7 +125,7 @@ namespace GLib { } delegate void d_g_value_array_insert(IntPtr raw, uint idx, ref GLib.Value val); - static d_g_value_array_insert g_value_array_insert = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_insert")); + static d_g_value_array_insert g_value_array_insert = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_insert")); public void Insert (uint idx, GLib.Value val) { @@ -133,7 +133,7 @@ namespace GLib { } delegate void d_g_value_array_prepend(IntPtr raw, ref GLib.Value val); - static d_g_value_array_prepend g_value_array_prepend = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_prepend")); + static d_g_value_array_prepend g_value_array_prepend = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_prepend")); public void Prepend (GLib.Value val) { @@ -141,7 +141,7 @@ namespace GLib { } delegate void d_g_value_array_remove(IntPtr raw, uint idx); - static d_g_value_array_remove g_value_array_remove = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_remove")); + static d_g_value_array_remove g_value_array_remove = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_remove")); public void Remove (uint idx) { @@ -154,7 +154,7 @@ namespace GLib { } delegate IntPtr d_g_value_array_get_nth(IntPtr raw, uint idx); - static d_g_value_array_get_nth g_value_array_get_nth = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_get_nth")); + static d_g_value_array_get_nth g_value_array_get_nth = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_get_nth")); public object this [int index] { get { @@ -228,7 +228,7 @@ namespace GLib { } delegate IntPtr d_g_value_array_copy(IntPtr raw); - static d_g_value_array_copy g_value_array_copy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_copy")); + static d_g_value_array_copy g_value_array_copy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_copy")); // ICloneable public object Clone () @@ -237,7 +237,7 @@ namespace GLib { } delegate IntPtr d_g_value_array_get_type(); - static d_g_value_array_get_type g_value_array_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_get_type")); + static d_g_value_array_get_type g_value_array_get_type = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_get_type")); public static GLib.GType GType { get { diff --git a/Source/Libs/GLibSharp/Variant.cs b/Source/Libs/GLibSharp/Variant.cs index 395935334..0972e3c82 100755 --- a/Source/Libs/GLibSharp/Variant.cs +++ b/Source/Libs/GLibSharp/Variant.cs @@ -39,7 +39,7 @@ namespace GLib { } delegate void d_g_variant_unref(IntPtr handle); - static d_g_variant_unref g_variant_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_unref")); + static d_g_variant_unref g_variant_unref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_unref")); void Dispose (bool disposing) { @@ -53,7 +53,7 @@ namespace GLib { } delegate IntPtr d_g_variant_ref_sink(IntPtr handle); - static d_g_variant_ref_sink g_variant_ref_sink = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_ref_sink")); + static d_g_variant_ref_sink g_variant_ref_sink = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_ref_sink")); public Variant (IntPtr handle) { @@ -61,7 +61,7 @@ namespace GLib { } delegate IntPtr d_g_variant_get_type(IntPtr val); - static d_g_variant_get_type g_variant_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_type")); + static d_g_variant_get_type g_variant_get_type = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_type")); VariantType type; public VariantType Type { @@ -73,59 +73,59 @@ namespace GLib { } delegate IntPtr d_g_variant_new_variant(IntPtr val); - static d_g_variant_new_variant g_variant_new_variant = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_variant")); + static d_g_variant_new_variant g_variant_new_variant = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_variant")); public static Variant NewVariant (Variant val) { return new Variant (g_variant_new_variant (val.Handle)); } delegate IntPtr d_g_variant_new_boolean(bool val); - static d_g_variant_new_boolean g_variant_new_boolean = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_boolean")); + static d_g_variant_new_boolean g_variant_new_boolean = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_boolean")); public Variant (bool val) : this (g_variant_new_boolean (val)) {} delegate IntPtr d_g_variant_new_byte(byte val); - static d_g_variant_new_byte g_variant_new_byte = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_byte")); + static d_g_variant_new_byte g_variant_new_byte = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_byte")); public Variant (byte val) : this (g_variant_new_byte (val)) {} delegate IntPtr d_g_variant_new_int16(short val); - static d_g_variant_new_int16 g_variant_new_int16 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_int16")); + static d_g_variant_new_int16 g_variant_new_int16 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_int16")); public Variant (short val) : this (g_variant_new_int16 (val)) {} delegate IntPtr d_g_variant_new_uint16(ushort val); - static d_g_variant_new_uint16 g_variant_new_uint16 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_uint16")); + static d_g_variant_new_uint16 g_variant_new_uint16 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_uint16")); public Variant (ushort val) : this (g_variant_new_uint16 (val)) {} delegate IntPtr d_g_variant_new_int32(int val); - static d_g_variant_new_int32 g_variant_new_int32 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_int32")); + static d_g_variant_new_int32 g_variant_new_int32 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_int32")); public Variant (int val) : this (g_variant_new_int32 (val)) {} delegate IntPtr d_g_variant_new_uint32(uint val); - static d_g_variant_new_uint32 g_variant_new_uint32 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_uint32")); + static d_g_variant_new_uint32 g_variant_new_uint32 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_uint32")); public Variant (uint val) : this (g_variant_new_uint32 (val)) {} delegate IntPtr d_g_variant_new_int64(long val); - static d_g_variant_new_int64 g_variant_new_int64 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_int64")); + static d_g_variant_new_int64 g_variant_new_int64 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_int64")); public Variant (long val) : this (g_variant_new_int64 (val)) {} delegate IntPtr d_g_variant_new_uint64(ulong val); - static d_g_variant_new_uint64 g_variant_new_uint64 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_uint64")); + static d_g_variant_new_uint64 g_variant_new_uint64 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_uint64")); public Variant (ulong val) : this (g_variant_new_uint64 (val)) {} delegate IntPtr d_g_variant_new_double(double val); - static d_g_variant_new_double g_variant_new_double = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_double")); + static d_g_variant_new_double g_variant_new_double = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_double")); public Variant (double val) : this (g_variant_new_double (val)) {} delegate IntPtr d_g_variant_new_string(IntPtr val); - static d_g_variant_new_string g_variant_new_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_string")); + static d_g_variant_new_string g_variant_new_string = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_string")); public Variant (string val) { @@ -135,7 +135,7 @@ namespace GLib { } delegate IntPtr d_g_variant_new_strv(IntPtr[] strv, IntPtr length); - static d_g_variant_new_strv g_variant_new_strv = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_strv")); + static d_g_variant_new_strv g_variant_new_strv = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_strv")); public Variant (string[] strv) { @@ -145,7 +145,7 @@ namespace GLib { } delegate IntPtr d_g_variant_new_tuple(IntPtr[] children, UIntPtr n_children); - static d_g_variant_new_tuple g_variant_new_tuple = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_tuple")); + static d_g_variant_new_tuple g_variant_new_tuple = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_tuple")); public static Variant NewTuple (Variant[] children) { @@ -160,7 +160,7 @@ namespace GLib { } delegate IntPtr d_g_variant_new_array(IntPtr child_type, IntPtr[] children, UIntPtr n_children); - static d_g_variant_new_array g_variant_new_array = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_array")); + static d_g_variant_new_array g_variant_new_array = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_array")); public static Variant NewArray (Variant[] children) { @@ -190,7 +190,7 @@ namespace GLib { } delegate IntPtr d_g_variant_new_dict_entry(IntPtr k, IntPtr v); - static d_g_variant_new_dict_entry g_variant_new_dict_entry = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_dict_entry")); + static d_g_variant_new_dict_entry g_variant_new_dict_entry = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_dict_entry")); public static Variant NewDictEntry (Variant k, Variant v) { @@ -211,7 +211,7 @@ namespace GLib { } delegate bool d_g_variant_get_boolean(IntPtr handle); - static d_g_variant_get_boolean g_variant_get_boolean = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_boolean")); + static d_g_variant_get_boolean g_variant_get_boolean = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_boolean")); public static explicit operator bool (Variant val) { @@ -219,7 +219,7 @@ namespace GLib { } delegate byte d_g_variant_get_byte(IntPtr handle); - static d_g_variant_get_byte g_variant_get_byte = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_byte")); + static d_g_variant_get_byte g_variant_get_byte = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_byte")); public static explicit operator byte (Variant val) { @@ -227,7 +227,7 @@ namespace GLib { } delegate short d_g_variant_get_int16(IntPtr handle); - static d_g_variant_get_int16 g_variant_get_int16 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_int16")); + static d_g_variant_get_int16 g_variant_get_int16 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_int16")); public static explicit operator short (Variant val) { @@ -235,7 +235,7 @@ namespace GLib { } delegate ushort d_g_variant_get_uint16(IntPtr handle); - static d_g_variant_get_uint16 g_variant_get_uint16 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_uint16")); + static d_g_variant_get_uint16 g_variant_get_uint16 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_uint16")); public static explicit operator ushort (Variant val) { @@ -243,7 +243,7 @@ namespace GLib { } delegate int d_g_variant_get_int32(IntPtr handle); - static d_g_variant_get_int32 g_variant_get_int32 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_int32")); + static d_g_variant_get_int32 g_variant_get_int32 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_int32")); public static explicit operator int (Variant val) { @@ -251,7 +251,7 @@ namespace GLib { } delegate uint d_g_variant_get_uint32(IntPtr handle); - static d_g_variant_get_uint32 g_variant_get_uint32 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_uint32")); + static d_g_variant_get_uint32 g_variant_get_uint32 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_uint32")); public static explicit operator uint (Variant val) { @@ -259,7 +259,7 @@ namespace GLib { } delegate long d_g_variant_get_int64(IntPtr handle); - static d_g_variant_get_int64 g_variant_get_int64 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_int64")); + static d_g_variant_get_int64 g_variant_get_int64 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_int64")); public static explicit operator long (Variant val) { @@ -267,7 +267,7 @@ namespace GLib { } delegate ulong d_g_variant_get_uint64(IntPtr handle); - static d_g_variant_get_uint64 g_variant_get_uint64 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_uint64")); + static d_g_variant_get_uint64 g_variant_get_uint64 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_uint64")); public static explicit operator ulong (Variant val) { @@ -275,7 +275,7 @@ namespace GLib { } delegate double d_g_variant_get_double(IntPtr handle); - static d_g_variant_get_double g_variant_get_double = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_double")); + static d_g_variant_get_double g_variant_get_double = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_double")); public static explicit operator double (Variant val) { @@ -283,7 +283,7 @@ namespace GLib { } delegate IntPtr d_g_variant_get_string(IntPtr handle, IntPtr length); - static d_g_variant_get_string g_variant_get_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_string")); + static d_g_variant_get_string g_variant_get_string = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_string")); public static explicit operator string (Variant val) { @@ -292,7 +292,7 @@ namespace GLib { } delegate IntPtr d_g_variant_print(IntPtr variant, bool type_annotate); - static d_g_variant_print g_variant_print = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_print")); + static d_g_variant_print g_variant_print = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_print")); public string Print (bool type_annotate) { @@ -301,10 +301,10 @@ namespace GLib { } delegate IntPtr d_g_variant_n_children(IntPtr handle); - static d_g_variant_n_children g_variant_n_children = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_n_children")); + static d_g_variant_n_children g_variant_n_children = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_n_children")); delegate IntPtr d_g_variant_get_child_value(IntPtr handle, IntPtr index); - static d_g_variant_get_child_value g_variant_get_child_value = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_child_value")); + static d_g_variant_get_child_value g_variant_get_child_value = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_child_value")); public Variant[] ToArray () { @@ -321,7 +321,7 @@ namespace GLib { } delegate IntPtr d_g_variant_get_variant(IntPtr handle); - static d_g_variant_get_variant g_variant_get_variant = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_variant")); + static d_g_variant_get_variant g_variant_get_variant = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_variant")); public Dictionary ToAsv () { diff --git a/Source/Libs/GLibSharp/VariantType.cs b/Source/Libs/GLibSharp/VariantType.cs index 88fa974f7..001508ce8 100755 --- a/Source/Libs/GLibSharp/VariantType.cs +++ b/Source/Libs/GLibSharp/VariantType.cs @@ -48,7 +48,7 @@ namespace GLib { public static VariantType ByteStringArray = new VariantType ("aay"); delegate bool d_g_variant_type_string_is_valid(IntPtr type_string); - static d_g_variant_type_string_is_valid g_variant_type_string_is_valid = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_string_is_valid")); + static d_g_variant_type_string_is_valid g_variant_type_string_is_valid = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_string_is_valid")); public static bool StringIsValid (string type_string) { @@ -77,7 +77,7 @@ namespace GLib { } delegate void d_g_variant_type_free(IntPtr handle); - static d_g_variant_type_free g_variant_type_free = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_free")); + static d_g_variant_type_free g_variant_type_free = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_free")); void Dispose (bool disposing) { @@ -91,7 +91,7 @@ namespace GLib { } delegate IntPtr d_g_variant_type_copy(IntPtr handle); - static d_g_variant_type_copy g_variant_type_copy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_copy")); + static d_g_variant_type_copy g_variant_type_copy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_copy")); public VariantType (IntPtr handle) { @@ -99,7 +99,7 @@ namespace GLib { } delegate IntPtr d_g_variant_type_new(IntPtr type_name); - static d_g_variant_type_new g_variant_type_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_new")); + static d_g_variant_type_new g_variant_type_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_new")); public VariantType (string type_string) { @@ -114,7 +114,7 @@ namespace GLib { } delegate bool d_g_variant_type_equal(IntPtr a, IntPtr b); - static d_g_variant_type_equal g_variant_type_equal = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_equal")); + static d_g_variant_type_equal g_variant_type_equal = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_equal")); public override bool Equals (object o) { @@ -122,7 +122,7 @@ namespace GLib { } delegate int d_g_variant_type_hash(IntPtr a); - static d_g_variant_type_hash g_variant_type_hash = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_hash")); + static d_g_variant_type_hash g_variant_type_hash = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_hash")); public override int GetHashCode () { @@ -130,7 +130,7 @@ namespace GLib { } delegate IntPtr d_g_variant_type_peek_string(IntPtr a); - static d_g_variant_type_peek_string g_variant_type_peek_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_peek_string")); + static d_g_variant_type_peek_string g_variant_type_peek_string = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_peek_string")); public override string ToString () { @@ -138,7 +138,7 @@ namespace GLib { } delegate bool d_g_variant_type_is_array(IntPtr type); - static d_g_variant_type_is_array g_variant_type_is_array = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_array")); + static d_g_variant_type_is_array g_variant_type_is_array = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_array")); public bool IsArray { get { return g_variant_type_is_array (Handle); } @@ -146,56 +146,56 @@ namespace GLib { delegate bool d_g_variant_type_is_basic(IntPtr type); - static d_g_variant_type_is_basic g_variant_type_is_basic = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_basic")); + static d_g_variant_type_is_basic g_variant_type_is_basic = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_basic")); public bool IsBasic { get { return g_variant_type_is_basic (Handle); } } delegate bool d_g_variant_type_is_container(IntPtr type); - static d_g_variant_type_is_container g_variant_type_is_container = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_container")); + static d_g_variant_type_is_container g_variant_type_is_container = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_container")); public bool IsContainer { get { return g_variant_type_is_container (Handle); } } delegate bool d_g_variant_type_is_definite(IntPtr type); - static d_g_variant_type_is_definite g_variant_type_is_definite = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_definite")); + static d_g_variant_type_is_definite g_variant_type_is_definite = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_definite")); public bool IsDefinite { get { return g_variant_type_is_definite (Handle); } } delegate bool d_g_variant_type_is_dict_entry(IntPtr type); - static d_g_variant_type_is_dict_entry g_variant_type_is_dict_entry = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_dict_entry")); + static d_g_variant_type_is_dict_entry g_variant_type_is_dict_entry = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_dict_entry")); public bool IsDictionaryEntry { get { return g_variant_type_is_dict_entry (Handle); } } delegate bool d_g_variant_type_is_maybe(IntPtr type); - static d_g_variant_type_is_maybe g_variant_type_is_maybe = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_maybe")); + static d_g_variant_type_is_maybe g_variant_type_is_maybe = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_maybe")); public bool IsMaybe { get { return g_variant_type_is_maybe (Handle); } } delegate bool d_g_variant_type_is_tuple(IntPtr type); - static d_g_variant_type_is_tuple g_variant_type_is_tuple = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_tuple")); + static d_g_variant_type_is_tuple g_variant_type_is_tuple = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_tuple")); public bool IsTuple { get { return g_variant_type_is_tuple (Handle); } } delegate bool d_g_variant_type_is_variant(IntPtr type); - static d_g_variant_type_is_variant g_variant_type_is_variant = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_variant")); + static d_g_variant_type_is_variant g_variant_type_is_variant = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_variant")); public bool IsVariant { get { return g_variant_type_is_variant (Handle); } } delegate bool d_g_variant_type_is_subtype_of(IntPtr type, IntPtr supertype); - static d_g_variant_type_is_subtype_of g_variant_type_is_subtype_of = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_subtype_of")); + static d_g_variant_type_is_subtype_of g_variant_type_is_subtype_of = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_subtype_of")); public bool IsSubtypeOf (VariantType supertype) { @@ -203,7 +203,7 @@ namespace GLib { } delegate IntPtr d_g_variant_type_element(IntPtr type); - static d_g_variant_type_element g_variant_type_element = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_element")); + static d_g_variant_type_element g_variant_type_element = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_element")); public VariantType Element () { @@ -211,7 +211,7 @@ namespace GLib { } delegate IntPtr d_g_variant_type_first(IntPtr type); - static d_g_variant_type_first g_variant_type_first = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_first")); + static d_g_variant_type_first g_variant_type_first = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_first")); public VariantType First () { @@ -219,7 +219,7 @@ namespace GLib { } delegate IntPtr d_g_variant_type_next(IntPtr type); - static d_g_variant_type_next g_variant_type_next = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_next")); + static d_g_variant_type_next g_variant_type_next = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_next")); public VariantType Next () { @@ -227,7 +227,7 @@ namespace GLib { } delegate IntPtr d_g_variant_type_n_items(IntPtr type); - static d_g_variant_type_n_items g_variant_type_n_items = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_n_items")); + static d_g_variant_type_n_items g_variant_type_n_items = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_n_items")); public long NItems () { @@ -235,7 +235,7 @@ namespace GLib { } delegate IntPtr d_g_variant_type_key(IntPtr type); - static d_g_variant_type_key g_variant_type_key = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_key")); + static d_g_variant_type_key g_variant_type_key = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_key")); public VariantType Key () { @@ -243,7 +243,7 @@ namespace GLib { } delegate IntPtr d_g_variant_type_value(IntPtr type); - static d_g_variant_type_value g_variant_type_value = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_value")); + static d_g_variant_type_value g_variant_type_value = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_value")); public VariantType Value () { @@ -251,7 +251,7 @@ namespace GLib { } delegate IntPtr d_g_variant_type_new_array(IntPtr element); - static d_g_variant_type_new_array g_variant_type_new_array = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_new_array")); + static d_g_variant_type_new_array g_variant_type_new_array = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_new_array")); public static VariantType NewArray (VariantType element) { @@ -261,7 +261,7 @@ namespace GLib { } delegate IntPtr d_g_variant_type_new_dict_entry(IntPtr key, IntPtr value); - static d_g_variant_type_new_dict_entry g_variant_type_new_dict_entry = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_new_dict_entry")); + static d_g_variant_type_new_dict_entry g_variant_type_new_dict_entry = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_new_dict_entry")); public static VariantType NewDictionaryEntry (VariantType key, VariantType value) { @@ -271,7 +271,7 @@ namespace GLib { } delegate IntPtr d_g_variant_type_new_maybe(IntPtr element); - static d_g_variant_type_new_maybe g_variant_type_new_maybe = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_new_maybe")); + static d_g_variant_type_new_maybe g_variant_type_new_maybe = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_new_maybe")); public static VariantType NewMaybe (VariantType element) { @@ -281,7 +281,7 @@ namespace GLib { } delegate IntPtr d_g_variant_type_new_tuple(IntPtr[] items, int n_items); - static d_g_variant_type_new_tuple g_variant_type_new_tuple = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_new_tuple")); + static d_g_variant_type_new_tuple g_variant_type_new_tuple = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_new_tuple")); public static VariantType NewTuple (VariantType[] items) { diff --git a/Source/Libs/GdkSharp/Color.cs b/Source/Libs/GdkSharp/Color.cs index 334e2152c..8a523deb4 100755 --- a/Source/Libs/GdkSharp/Color.cs +++ b/Source/Libs/GdkSharp/Color.cs @@ -36,7 +36,7 @@ namespace Gdk { } delegate uint d_gdk_color_hash(ref Gdk.Color raw); - static d_gdk_color_hash gdk_color_hash = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_color_hash")); + static d_gdk_color_hash gdk_color_hash = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_color_hash")); public override int GetHashCode() { return (int) gdk_color_hash(ref this); diff --git a/Source/Libs/GdkSharp/Device.cs b/Source/Libs/GdkSharp/Device.cs index 09db728d4..c9df69bbe 100755 --- a/Source/Libs/GdkSharp/Device.cs +++ b/Source/Libs/GdkSharp/Device.cs @@ -26,10 +26,10 @@ namespace Gdk { public partial class Device { delegate void d_gdk_device_free_history(IntPtr events, int n_events); - static d_gdk_device_free_history gdk_device_free_history = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_device_free_history")); + static d_gdk_device_free_history gdk_device_free_history = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_device_free_history")); delegate bool d_gdk_device_get_history(IntPtr device, IntPtr window, uint start, uint stop, out IntPtr events, out int n_events); - static d_gdk_device_get_history gdk_device_get_history = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_device_get_history")); + static d_gdk_device_get_history gdk_device_get_history = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_device_get_history")); public TimeCoord[] GetHistory (Gdk.Window window, uint start, uint stop) { diff --git a/Source/Libs/GdkSharp/Display.cs b/Source/Libs/GdkSharp/Display.cs index 11ea6e05b..0093c700a 100755 --- a/Source/Libs/GdkSharp/Display.cs +++ b/Source/Libs/GdkSharp/Display.cs @@ -27,7 +27,7 @@ namespace Gdk { public partial class Display { delegate void d_gdk_display_get_pointer(IntPtr raw, IntPtr screen, out int x, out int y, out int mask); - static d_gdk_display_get_pointer gdk_display_get_pointer = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_display_get_pointer")); + static d_gdk_display_get_pointer gdk_display_get_pointer = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_display_get_pointer")); [Obsolete] public void GetPointer(Gdk.Screen screen, out int x, out int y, out Gdk.ModifierType mask) { @@ -37,7 +37,7 @@ namespace Gdk { } delegate void d_gdk_display_get_pointer2(IntPtr raw, out IntPtr screen, out int x, out int y, out int mask); - static d_gdk_display_get_pointer2 gdk_display_get_pointer2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_display_get_pointer")); + static d_gdk_display_get_pointer2 gdk_display_get_pointer2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_display_get_pointer")); public void GetPointer(out Gdk.Screen screen, out int x, out int y, out Gdk.ModifierType mask) { IntPtr screen_handle; @@ -67,7 +67,7 @@ namespace Gdk { } delegate IntPtr d_gdk_display_list_devices(IntPtr raw); - static d_gdk_display_list_devices gdk_display_list_devices = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_display_list_devices")); + static d_gdk_display_list_devices gdk_display_list_devices = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_display_list_devices")); public Device[] ListDevices () { diff --git a/Source/Libs/GdkSharp/DisplayManager.cs b/Source/Libs/GdkSharp/DisplayManager.cs index 3f8127576..629161b64 100755 --- a/Source/Libs/GdkSharp/DisplayManager.cs +++ b/Source/Libs/GdkSharp/DisplayManager.cs @@ -26,7 +26,7 @@ namespace Gdk { public partial class DisplayManager { delegate IntPtr d_gdk_display_manager_list_displays(IntPtr raw); - static d_gdk_display_manager_list_displays gdk_display_manager_list_displays = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_display_manager_list_displays")); + static d_gdk_display_manager_list_displays gdk_display_manager_list_displays = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_display_manager_list_displays")); public Display[] ListDisplays () { diff --git a/Source/Libs/GdkSharp/Event.cs b/Source/Libs/GdkSharp/Event.cs index d2015c636..48e86a731 100755 --- a/Source/Libs/GdkSharp/Event.cs +++ b/Source/Libs/GdkSharp/Event.cs @@ -40,7 +40,7 @@ namespace Gdk { } delegate IntPtr d_gdk_event_get_type(); - static d_gdk_event_get_type gdk_event_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_event_get_type")); + static d_gdk_event_get_type gdk_event_get_type = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_event_get_type")); public static GLib.GType GType { get { return new GLib.GType (gdk_event_get_type ()); } diff --git a/Source/Libs/GdkSharp/Global.cs b/Source/Libs/GdkSharp/Global.cs index cc3df43f9..9f508d1d5 100755 --- a/Source/Libs/GdkSharp/Global.cs +++ b/Source/Libs/GdkSharp/Global.cs @@ -27,7 +27,7 @@ namespace Gdk { public partial class Global { delegate IntPtr d_gdk_list_visuals(); - static d_gdk_list_visuals gdk_list_visuals = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_list_visuals")); + static d_gdk_list_visuals gdk_list_visuals = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_list_visuals")); public static Visual[] ListVisuals () { @@ -106,7 +106,7 @@ namespace Gdk { } delegate bool d_gdk_init_check(ref int argc, ref IntPtr argv); - static d_gdk_init_check gdk_init_check = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_init_check")); + static d_gdk_init_check gdk_init_check = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_init_check")); public static bool InitCheck (ref string[] argv) { @@ -120,7 +120,7 @@ namespace Gdk { } delegate void d_gdk_parse_args(ref int argc, ref IntPtr argv); - static d_gdk_parse_args gdk_parse_args = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_parse_args")); + static d_gdk_parse_args gdk_parse_args = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_parse_args")); public static void ParseArgs (ref string[] argv) { @@ -133,7 +133,7 @@ namespace Gdk { } delegate void d_gdk_query_depths(out IntPtr depths, out int n_depths); - static d_gdk_query_depths gdk_query_depths = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_query_depths")); + static d_gdk_query_depths gdk_query_depths = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_query_depths")); public static int[] QueryDepths () { @@ -145,7 +145,7 @@ namespace Gdk { return result; } delegate void d_gdk_query_visual_types(out IntPtr types, out int n_types); - static d_gdk_query_visual_types gdk_query_visual_types = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_query_visual_types")); + static d_gdk_query_visual_types gdk_query_visual_types = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_query_visual_types")); public static VisualType[] QueryVisualTypes () { diff --git a/Source/Libs/GdkSharp/Keymap.cs b/Source/Libs/GdkSharp/Keymap.cs index 9a7d26222..4a86eac1f 100755 --- a/Source/Libs/GdkSharp/Keymap.cs +++ b/Source/Libs/GdkSharp/Keymap.cs @@ -27,7 +27,7 @@ namespace Gdk { public partial class Keymap { delegate bool d_gdk_keymap_get_entries_for_keycode(IntPtr raw, uint hardware_keycode, out IntPtr keys, out IntPtr keyvals, out int n_entries); - static d_gdk_keymap_get_entries_for_keycode gdk_keymap_get_entries_for_keycode = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_keymap_get_entries_for_keycode")); + static d_gdk_keymap_get_entries_for_keycode gdk_keymap_get_entries_for_keycode = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_keymap_get_entries_for_keycode")); public void GetEntriesForKeycode(uint hardware_keycode, out Gdk.KeymapKey[] keys, out uint[] keyvals) { @@ -52,7 +52,7 @@ namespace Gdk { } delegate bool d_gdk_keymap_get_entries_for_keyval(IntPtr raw, uint keyval, out IntPtr keys, out int n_keys); - static d_gdk_keymap_get_entries_for_keyval gdk_keymap_get_entries_for_keyval = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_keymap_get_entries_for_keyval")); + static d_gdk_keymap_get_entries_for_keyval gdk_keymap_get_entries_for_keyval = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_keymap_get_entries_for_keyval")); public KeymapKey[] GetEntriesForKeyval (uint keyval) { diff --git a/Source/Libs/GdkSharp/Pixbuf.cs b/Source/Libs/GdkSharp/Pixbuf.cs index 3c0107c4a..fa103b780 100755 --- a/Source/Libs/GdkSharp/Pixbuf.cs +++ b/Source/Libs/GdkSharp/Pixbuf.cs @@ -87,7 +87,7 @@ namespace Gdk { } delegate IntPtr d_gdk_pixbuf_scale_simple(IntPtr raw, int dest_width, int dest_height, int interp_type); - static d_gdk_pixbuf_scale_simple gdk_pixbuf_scale_simple = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_scale_simple")); + static d_gdk_pixbuf_scale_simple gdk_pixbuf_scale_simple = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_scale_simple")); public Gdk.Pixbuf ScaleSimple(int dest_width, int dest_height, Gdk.InterpType interp_type) { IntPtr raw_ret = gdk_pixbuf_scale_simple(Handle, dest_width, dest_height, (int) interp_type); @@ -96,7 +96,7 @@ namespace Gdk { } delegate IntPtr d_gdk_pixbuf_composite_color_simple(IntPtr raw, int dest_width, int dest_height, int interp_type, int overall_alpha, int check_size, uint color1, uint color2); - static d_gdk_pixbuf_composite_color_simple gdk_pixbuf_composite_color_simple = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_composite_color_simple")); + static d_gdk_pixbuf_composite_color_simple gdk_pixbuf_composite_color_simple = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_composite_color_simple")); public Gdk.Pixbuf CompositeColorSimple(int dest_width, int dest_height, Gdk.InterpType interp_type, int overall_alpha, int check_size, uint color1, uint color2) { IntPtr raw_ret = gdk_pixbuf_composite_color_simple(Handle, dest_width, dest_height, (int) interp_type, overall_alpha, check_size, color1, color2); @@ -105,7 +105,7 @@ namespace Gdk { } delegate IntPtr d_gdk_pixbuf_add_alpha(IntPtr raw, bool substitute_color, byte r, byte g, byte b); - static d_gdk_pixbuf_add_alpha gdk_pixbuf_add_alpha = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_add_alpha")); + static d_gdk_pixbuf_add_alpha gdk_pixbuf_add_alpha = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_add_alpha")); public Gdk.Pixbuf AddAlpha(bool substitute_color, byte r, byte g, byte b) { IntPtr raw_ret = gdk_pixbuf_add_alpha(Handle, substitute_color, r, g, b); @@ -147,7 +147,7 @@ namespace Gdk { } delegate IntPtr d_gdk_pixbuf_new_from_data(byte[] data, int colorspace, bool has_alpha, int bits_per_sample, int width, int height, int rowstride, DestroyHelper.NativeDelegate destroy_fn, IntPtr destroy_fn_data); - static d_gdk_pixbuf_new_from_data gdk_pixbuf_new_from_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_new_from_data")); + static d_gdk_pixbuf_new_from_data gdk_pixbuf_new_from_data = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_new_from_data")); public Pixbuf (byte[] data, Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height, int rowstride, Gdk.PixbufDestroyNotify destroy_fn) : base (IntPtr.Zero) { @@ -176,7 +176,7 @@ namespace Gdk { */ delegate IntPtr d_gdk_pixbuf_new_from_inline(int len, IntPtr data, bool copy_pixels, out IntPtr error); - static d_gdk_pixbuf_new_from_inline gdk_pixbuf_new_from_inline = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_new_from_inline")); + static d_gdk_pixbuf_new_from_inline gdk_pixbuf_new_from_inline = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_new_from_inline")); public unsafe Pixbuf(int data_length, void *data, bool copy_pixels) : base (IntPtr.Zero) { @@ -199,7 +199,7 @@ namespace Gdk { // the 'Pixels' property // delegate IntPtr d_gdk_pixbuf_get_pixels(IntPtr raw); - static d_gdk_pixbuf_get_pixels gdk_pixbuf_get_pixels = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_get_pixels")); + static d_gdk_pixbuf_get_pixels gdk_pixbuf_get_pixels = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_get_pixels")); public IntPtr Pixels { get { @@ -209,7 +209,7 @@ namespace Gdk { } delegate IntPtr d_gdk_pixbuf_get_formats(); - static d_gdk_pixbuf_get_formats gdk_pixbuf_get_formats = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_get_formats")); + static d_gdk_pixbuf_get_formats gdk_pixbuf_get_formats = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_get_formats")); public static PixbufFormat[] Formats { get { @@ -225,7 +225,7 @@ namespace Gdk { } delegate bool d_gdk_pixbuf_save(IntPtr raw, IntPtr filename, IntPtr type, out IntPtr error, IntPtr dummy); - static d_gdk_pixbuf_save gdk_pixbuf_save = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_save")); + static d_gdk_pixbuf_save gdk_pixbuf_save = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_save")); public unsafe bool Save(string filename, string type) { IntPtr error = IntPtr.Zero; @@ -239,7 +239,7 @@ namespace Gdk { } delegate bool d_gdk_pixbuf_save_to_bufferv(IntPtr raw, out IntPtr buffer, out IntPtr buffer_size, IntPtr type, IntPtr[] option_keys, IntPtr[] option_values, out IntPtr error); - static d_gdk_pixbuf_save_to_bufferv gdk_pixbuf_save_to_bufferv = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_save_to_bufferv")); + static d_gdk_pixbuf_save_to_bufferv gdk_pixbuf_save_to_bufferv = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_save_to_bufferv")); IntPtr[] NullTerm (string[] src) { @@ -287,7 +287,7 @@ namespace Gdk { } delegate bool d_gdk_pixbuf_save_to_callbackv(IntPtr raw, GdkSharp.PixbufSaveFuncNative save_func, IntPtr user_data, IntPtr type, IntPtr[] option_keys, IntPtr[] option_values, out IntPtr error); - static d_gdk_pixbuf_save_to_callbackv gdk_pixbuf_save_to_callbackv = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_save_to_callbackv")); + static d_gdk_pixbuf_save_to_callbackv gdk_pixbuf_save_to_callbackv = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_save_to_callbackv")); public unsafe void SaveToCallback (PixbufSaveFunc save_func, string type) { @@ -311,7 +311,7 @@ namespace Gdk { } delegate bool d_gdk_pixbuf_savev(IntPtr raw, IntPtr filename, IntPtr type, IntPtr[] option_keys, IntPtr[] option_values, out IntPtr error); - static d_gdk_pixbuf_savev gdk_pixbuf_savev = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_savev")); + static d_gdk_pixbuf_savev gdk_pixbuf_savev = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_savev")); public unsafe bool Savev(string filename, string type, string[] option_keys, string[] option_values) { IntPtr error = IntPtr.Zero; diff --git a/Source/Libs/GdkSharp/PixbufLoader.cs b/Source/Libs/GdkSharp/PixbufLoader.cs index 4137bcd71..d7cca4dbb 100755 --- a/Source/Libs/GdkSharp/PixbufLoader.cs +++ b/Source/Libs/GdkSharp/PixbufLoader.cs @@ -29,7 +29,7 @@ namespace Gdk { public partial class PixbufLoader { delegate IntPtr d_g_object_ref(IntPtr handle); - static d_g_object_ref g_object_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_ref")); + static d_g_object_ref g_object_ref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_ref")); internal IntPtr PixbufHandle { get { diff --git a/Source/Libs/GdkSharp/Pixdata.cs b/Source/Libs/GdkSharp/Pixdata.cs index de67e1aa7..7c0b9caf0 100755 --- a/Source/Libs/GdkSharp/Pixdata.cs +++ b/Source/Libs/GdkSharp/Pixdata.cs @@ -24,7 +24,7 @@ namespace Gdk { public partial struct Pixdata { delegate IntPtr d_gdk_pixdata_serialize(ref Gdk.Pixdata raw, out uint len); - static d_gdk_pixdata_serialize gdk_pixdata_serialize = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixdata_serialize")); + static d_gdk_pixdata_serialize gdk_pixdata_serialize = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixdata_serialize")); public byte [] Serialize () { uint len; diff --git a/Source/Libs/GdkSharp/Property.cs b/Source/Libs/GdkSharp/Property.cs index 98857273b..913922bbf 100755 --- a/Source/Libs/GdkSharp/Property.cs +++ b/Source/Libs/GdkSharp/Property.cs @@ -27,7 +27,7 @@ namespace Gdk { public partial class Property { delegate void d_gdk_property_change2(IntPtr window, IntPtr property, IntPtr type, int format, int mode, out byte data, int nelements); - static d_gdk_property_change2 gdk_property_change2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_property_change")); + static d_gdk_property_change2 gdk_property_change2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_property_change")); [Obsolete ("Replaced by corrected overload with data parameter")] public static byte Change(Gdk.Window window, Gdk.Atom property, Gdk.Atom type, int format, Gdk.PropMode mode, int nelements) { @@ -37,7 +37,7 @@ namespace Gdk { } delegate bool d_gdk_property_get(IntPtr window, IntPtr property, IntPtr type, UIntPtr offset, UIntPtr length, bool pdelete, out IntPtr actual_property_type, out int actual_format, out int actual_length, out IntPtr data); - static d_gdk_property_get gdk_property_get = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_property_get")); + static d_gdk_property_get gdk_property_get = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_property_get")); public static bool Get(Gdk.Window window, Gdk.Atom property, Gdk.Atom type, ulong offset, ulong length, int pdelete, out Gdk.Atom actual_property_type, out int actual_format, out int actual_length, out byte[] data) { IntPtr actual_property_type_as_native; diff --git a/Source/Libs/GdkSharp/Rectangle.cs b/Source/Libs/GdkSharp/Rectangle.cs index a1f2919e6..0e3fda8a5 100755 --- a/Source/Libs/GdkSharp/Rectangle.cs +++ b/Source/Libs/GdkSharp/Rectangle.cs @@ -220,7 +220,7 @@ namespace Gdk { } delegate IntPtr d_gdk_rectangle_get_type(); - static d_gdk_rectangle_get_type gdk_rectangle_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_rectangle_get_type")); + static d_gdk_rectangle_get_type gdk_rectangle_get_type = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_rectangle_get_type")); public static GLib.GType GType { get { @@ -231,7 +231,7 @@ namespace Gdk { } delegate void d_gdk_rectangle_union(ref Rectangle src1, ref Rectangle src2, out Rectangle dest); - static d_gdk_rectangle_union gdk_rectangle_union = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_rectangle_union")); + static d_gdk_rectangle_union gdk_rectangle_union = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_rectangle_union")); public Gdk.Rectangle Union (Gdk.Rectangle src) { @@ -241,7 +241,7 @@ namespace Gdk { } delegate bool d_gdk_rectangle_intersect(ref Rectangle src1, ref Rectangle src2, out Rectangle dest); - static d_gdk_rectangle_intersect gdk_rectangle_intersect = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_rectangle_intersect")); + static d_gdk_rectangle_intersect gdk_rectangle_intersect = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_rectangle_intersect")); public bool Intersect (Gdk.Rectangle src, out Gdk.Rectangle dest) { diff --git a/Source/Libs/GdkSharp/Screen.cs b/Source/Libs/GdkSharp/Screen.cs index 5f23975ee..9b278016b 100755 --- a/Source/Libs/GdkSharp/Screen.cs +++ b/Source/Libs/GdkSharp/Screen.cs @@ -26,7 +26,7 @@ namespace Gdk { public partial class Screen { delegate IntPtr d_gdk_screen_get_toplevel_windows(IntPtr raw); - static d_gdk_screen_get_toplevel_windows gdk_screen_get_toplevel_windows = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_screen_get_toplevel_windows")); + static d_gdk_screen_get_toplevel_windows gdk_screen_get_toplevel_windows = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_screen_get_toplevel_windows")); public Window[] ToplevelWindows { @@ -43,7 +43,7 @@ namespace Gdk { } delegate IntPtr d_gdk_screen_list_visuals(IntPtr raw); - static d_gdk_screen_list_visuals gdk_screen_list_visuals = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_screen_list_visuals")); + static d_gdk_screen_list_visuals gdk_screen_list_visuals = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_screen_list_visuals")); public Visual[] ListVisuals () { @@ -58,10 +58,10 @@ namespace Gdk { } delegate IntPtr d_gdk_screen_get_font_options(IntPtr raw); - static d_gdk_screen_get_font_options gdk_screen_get_font_options = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_screen_get_font_options")); + static d_gdk_screen_get_font_options gdk_screen_get_font_options = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_screen_get_font_options")); delegate void d_gdk_screen_set_font_options(IntPtr raw, IntPtr options); - static d_gdk_screen_set_font_options gdk_screen_set_font_options = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_screen_set_font_options")); + static d_gdk_screen_set_font_options gdk_screen_set_font_options = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_screen_set_font_options")); [GLib.Property ("font-options")] public Cairo.FontOptions FontOptions { diff --git a/Source/Libs/GdkSharp/TextProperty.cs b/Source/Libs/GdkSharp/TextProperty.cs index bee4ac99a..e264c2bc2 100755 --- a/Source/Libs/GdkSharp/TextProperty.cs +++ b/Source/Libs/GdkSharp/TextProperty.cs @@ -27,7 +27,7 @@ namespace Gdk { public class TextProperty { delegate int d_gdk_text_property_to_utf8_list_for_display(IntPtr display, IntPtr encoding, int format, byte[] text, int length, out IntPtr list); - static d_gdk_text_property_to_utf8_list_for_display gdk_text_property_to_utf8_list_for_display = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_text_property_to_utf8_list_for_display")); + static d_gdk_text_property_to_utf8_list_for_display gdk_text_property_to_utf8_list_for_display = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_text_property_to_utf8_list_for_display")); public static string[] ToStringListForDisplay (Gdk.Display display, Gdk.Atom encoding, int format, byte[] text, int length) { diff --git a/Source/Libs/GdkSharp/Window.cs b/Source/Libs/GdkSharp/Window.cs index a10a73412..b1b4422ab 100755 --- a/Source/Libs/GdkSharp/Window.cs +++ b/Source/Libs/GdkSharp/Window.cs @@ -33,10 +33,10 @@ namespace Gdk { public Window (Gdk.Window parent, Gdk.WindowAttr attributes, Gdk.WindowAttributesType attributes_mask) : this (parent, attributes, (int)attributes_mask) {} delegate IntPtr d_gdk_window_get_background_pattern(IntPtr raw); - static d_gdk_window_get_background_pattern gdk_window_get_background_pattern = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_get_background_pattern")); + static d_gdk_window_get_background_pattern gdk_window_get_background_pattern = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_get_background_pattern")); delegate void d_gdk_window_set_background_pattern(IntPtr raw, IntPtr pattern); - static d_gdk_window_set_background_pattern gdk_window_set_background_pattern = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_set_background_pattern")); + static d_gdk_window_set_background_pattern gdk_window_set_background_pattern = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_set_background_pattern")); public Cairo.Pattern BackgroundPattern { get { @@ -50,7 +50,7 @@ namespace Gdk { } delegate IntPtr d_gdk_window_get_children(IntPtr raw); - static d_gdk_window_get_children gdk_window_get_children = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_get_children")); + static d_gdk_window_get_children gdk_window_get_children = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_get_children")); public Window[] Children { get { @@ -66,7 +66,7 @@ namespace Gdk { } delegate void d_gdk_window_set_icon_list(IntPtr raw, IntPtr pixbufs); - static d_gdk_window_set_icon_list gdk_window_set_icon_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_set_icon_list")); + static d_gdk_window_set_icon_list gdk_window_set_icon_list = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_set_icon_list")); public Pixbuf[] IconList { set { @@ -78,10 +78,10 @@ namespace Gdk { } delegate IntPtr d_g_object_ref(IntPtr raw); - static d_g_object_ref g_object_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_ref")); + static d_g_object_ref g_object_ref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_ref")); delegate void d_gdk_window_destroy(IntPtr raw); - static d_gdk_window_destroy gdk_window_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_destroy")); + static d_gdk_window_destroy gdk_window_destroy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_destroy")); public void Destroy () { @@ -98,10 +98,10 @@ namespace Gdk { } delegate void d_gdk_window_get_user_data(IntPtr raw, out IntPtr data); - static d_gdk_window_get_user_data gdk_window_get_user_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_get_user_data")); + static d_gdk_window_get_user_data gdk_window_get_user_data = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_get_user_data")); delegate void d_gdk_window_set_user_data(IntPtr raw, IntPtr user_data); - static d_gdk_window_set_user_data gdk_window_set_user_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_set_user_data")); + static d_gdk_window_set_user_data gdk_window_set_user_data = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_set_user_data")); public IntPtr UserData { get { IntPtr data; @@ -114,10 +114,10 @@ namespace Gdk { } delegate void d_gdk_window_add_filter(IntPtr handle, GdkSharp.FilterFuncNative wrapper, IntPtr data); - static d_gdk_window_add_filter gdk_window_add_filter = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_add_filter")); + static d_gdk_window_add_filter gdk_window_add_filter = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_add_filter")); delegate void d_gdk_window_remove_filter(IntPtr handle, GdkSharp.FilterFuncNative wrapper, IntPtr data); - static d_gdk_window_remove_filter gdk_window_remove_filter = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_remove_filter")); + static d_gdk_window_remove_filter gdk_window_remove_filter = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_remove_filter")); static IDictionary filter_all_hash; static IDictionary FilterAllHash { diff --git a/Source/Libs/GioSharp/AppInfoAdapter.cs b/Source/Libs/GioSharp/AppInfoAdapter.cs index a93e8b177..c71c5443a 100755 --- a/Source/Libs/GioSharp/AppInfoAdapter.cs +++ b/Source/Libs/GioSharp/AppInfoAdapter.cs @@ -24,7 +24,7 @@ namespace GLib { public partial class AppInfoAdapter { delegate IntPtr d_g_app_info_get_all(); - static d_g_app_info_get_all g_app_info_get_all = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_get_all")); + static d_g_app_info_get_all g_app_info_get_all = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_get_all")); public static GLib.IAppInfo[] GetAll () { IntPtr raw_ret = g_app_info_get_all(); diff --git a/Source/Libs/GioSharp/Application.cs b/Source/Libs/GioSharp/Application.cs index ed10122e6..f853e4788 100755 --- a/Source/Libs/GioSharp/Application.cs +++ b/Source/Libs/GioSharp/Application.cs @@ -32,7 +32,7 @@ namespace GLib } delegate int d_g_application_run(IntPtr raw, int argc, IntPtr argv); - static d_g_application_run g_application_run = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_application_run")); + static d_g_application_run g_application_run = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_application_run")); public int Run () { diff --git a/Source/Libs/GioSharp/FileAdapter.cs b/Source/Libs/GioSharp/FileAdapter.cs index 2ab517456..8f842215d 100755 --- a/Source/Libs/GioSharp/FileAdapter.cs +++ b/Source/Libs/GioSharp/FileAdapter.cs @@ -38,7 +38,7 @@ namespace GLib { } delegate IntPtr d_g_file_get_uri(IntPtr raw); - static d_g_file_get_uri g_file_get_uri = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_get_uri")); + static d_g_file_get_uri g_file_get_uri = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_get_uri")); public System.Uri Uri { get { diff --git a/Source/Libs/GioSharp/FileFactory.cs b/Source/Libs/GioSharp/FileFactory.cs index 02b5b563a..e26a7bf84 100755 --- a/Source/Libs/GioSharp/FileFactory.cs +++ b/Source/Libs/GioSharp/FileFactory.cs @@ -28,7 +28,7 @@ namespace GLib public class FileFactory { delegate IntPtr d_g_file_new_for_uri(string uri); - static d_g_file_new_for_uri g_file_new_for_uri = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_new_for_uri")); + static d_g_file_new_for_uri g_file_new_for_uri = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_new_for_uri")); public static IFile NewForUri (string uri) { @@ -41,7 +41,7 @@ namespace GLib } delegate IntPtr d_g_file_new_for_path(string path); - static d_g_file_new_for_path g_file_new_for_path = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_new_for_path")); + static d_g_file_new_for_path g_file_new_for_path = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_new_for_path")); public static IFile NewForPath (string path) { @@ -49,7 +49,7 @@ namespace GLib } delegate IntPtr d_g_file_new_for_commandline_arg(string arg); - static d_g_file_new_for_commandline_arg g_file_new_for_commandline_arg = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_new_for_commandline_arg")); + static d_g_file_new_for_commandline_arg g_file_new_for_commandline_arg = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_new_for_commandline_arg")); public static IFile NewFromCommandlineArg (string arg) { diff --git a/Source/Libs/GtkSharp/Accel.cs b/Source/Libs/GtkSharp/Accel.cs index 3af5aba6d..d60ce9b06 100755 --- a/Source/Libs/GtkSharp/Accel.cs +++ b/Source/Libs/GtkSharp/Accel.cs @@ -26,7 +26,7 @@ namespace Gtk { public partial class Accel { delegate void d_gtk_accel_map_save(IntPtr file_name); - static d_gtk_accel_map_save gtk_accel_map_save = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_save")); + static d_gtk_accel_map_save gtk_accel_map_save = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_save")); [Obsolete("Moved to AccelMap class. Use AccelMap.Save instead")] public static void MapSave(string file_name) { @@ -36,7 +36,7 @@ namespace Gtk { } delegate void d_gtk_accel_map_add_filter(IntPtr filter_pattern); - static d_gtk_accel_map_add_filter gtk_accel_map_add_filter = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_add_filter")); + static d_gtk_accel_map_add_filter gtk_accel_map_add_filter = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_add_filter")); [Obsolete("Moved to AccelMap class. Use AccelMap.AddFilter instead")] public static void MapAddFilter(string filter_pattern) { @@ -46,7 +46,7 @@ namespace Gtk { } delegate void d_gtk_accel_map_foreach_unfiltered(IntPtr data, GtkSharp.AccelMapForeachNative foreach_func); - static d_gtk_accel_map_foreach_unfiltered gtk_accel_map_foreach_unfiltered = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_foreach_unfiltered")); + static d_gtk_accel_map_foreach_unfiltered gtk_accel_map_foreach_unfiltered = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_foreach_unfiltered")); [Obsolete("Moved to AccelMap class. Use AccelMap.ForeachUnfiltered instead")] public static void MapForeachUnfiltered(IntPtr data, Gtk.AccelMapForeach foreach_func) { @@ -55,7 +55,7 @@ namespace Gtk { } delegate void d_gtk_accel_map_save_fd(int fd); - static d_gtk_accel_map_save_fd gtk_accel_map_save_fd = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_save_fd")); + static d_gtk_accel_map_save_fd gtk_accel_map_save_fd = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_save_fd")); [Obsolete("Moved to AccelMap class. Use AccelMap.SaveFd instead")] public static void MapSaveFd(int fd) { @@ -63,7 +63,7 @@ namespace Gtk { } delegate void d_gtk_accel_map_add_entry(IntPtr accel_path, uint accel_key, int accel_mods); - static d_gtk_accel_map_add_entry gtk_accel_map_add_entry = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_add_entry")); + static d_gtk_accel_map_add_entry gtk_accel_map_add_entry = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_add_entry")); [Obsolete("Moved to AccelMap class. Use AccelMap.AddEntry instead")] public static void MapAddEntry(string accel_path, uint accel_key, Gdk.ModifierType accel_mods) { @@ -73,7 +73,7 @@ namespace Gtk { } delegate void d_gtk_accel_map_load_fd(int fd); - static d_gtk_accel_map_load_fd gtk_accel_map_load_fd = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_load_fd")); + static d_gtk_accel_map_load_fd gtk_accel_map_load_fd = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_load_fd")); [Obsolete("Moved to AccelMap class. Use AccelMap.LoadFd instead")] public static void MapLoadFd(int fd) { @@ -81,7 +81,7 @@ namespace Gtk { } delegate bool d_gtk_accel_map_lookup_entry(IntPtr accel_path, ref Gtk.AccelKey key); - static d_gtk_accel_map_lookup_entry gtk_accel_map_lookup_entry = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_lookup_entry")); + static d_gtk_accel_map_lookup_entry gtk_accel_map_lookup_entry = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_lookup_entry")); [Obsolete("Moved to AccelMap class. Use AccelMap.LookupEntry instead")] public static bool MapLookupEntry(string accel_path, Gtk.AccelKey key) { @@ -92,7 +92,7 @@ namespace Gtk { } delegate bool d_gtk_accel_map_change_entry(IntPtr accel_path, uint accel_key, int accel_mods, bool replace); - static d_gtk_accel_map_change_entry gtk_accel_map_change_entry = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_change_entry")); + static d_gtk_accel_map_change_entry gtk_accel_map_change_entry = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_change_entry")); [Obsolete("Moved to AccelMap class. Use AccelMap.ChangeEntry instead")] public static bool MapChangeEntry (string accel_path, uint accel_key, Gdk.ModifierType accel_mods, bool replace) { @@ -103,7 +103,7 @@ namespace Gtk { } delegate void d_gtk_accel_map_load(IntPtr file_name); - static d_gtk_accel_map_load gtk_accel_map_load = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_load")); + static d_gtk_accel_map_load gtk_accel_map_load = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_load")); [Obsolete("Moved to AccelMap class. Use AccelMap.Load instead")] public static void MapLoad (string file_name) { @@ -113,7 +113,7 @@ namespace Gtk { } delegate void d_gtk_accel_map_foreach(IntPtr data, GtkSharp.AccelMapForeachNative foreach_func); - static d_gtk_accel_map_foreach gtk_accel_map_foreach = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_foreach")); + static d_gtk_accel_map_foreach gtk_accel_map_foreach = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_foreach")); [Obsolete("Moved to AccelMap class. Use AccelMap.Foreach instead")] public static void MapForeach(IntPtr data, Gtk.AccelMapForeach foreach_func) { @@ -122,7 +122,7 @@ namespace Gtk { } delegate IntPtr d_gtk_accel_groups_from_object(IntPtr obj); - static d_gtk_accel_groups_from_object gtk_accel_groups_from_object = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_groups_from_object")); + static d_gtk_accel_groups_from_object gtk_accel_groups_from_object = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_groups_from_object")); public static AccelGroup[] GroupsFromObject (GLib.Object obj) { diff --git a/Source/Libs/GtkSharp/Action.cs b/Source/Libs/GtkSharp/Action.cs index f0d07d39b..661afd0d7 100755 --- a/Source/Libs/GtkSharp/Action.cs +++ b/Source/Libs/GtkSharp/Action.cs @@ -29,7 +29,7 @@ namespace Gtk { {} delegate IntPtr d_gtk_action_get_proxies(IntPtr raw); - static d_gtk_action_get_proxies gtk_action_get_proxies = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_action_get_proxies")); + static d_gtk_action_get_proxies gtk_action_get_proxies = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_action_get_proxies")); public Gtk.Widget[] Proxies { get { diff --git a/Source/Libs/GtkSharp/ActionGroup.cs b/Source/Libs/GtkSharp/ActionGroup.cs index 8c8ae5fbd..21225bcbf 100755 --- a/Source/Libs/GtkSharp/ActionGroup.cs +++ b/Source/Libs/GtkSharp/ActionGroup.cs @@ -81,7 +81,7 @@ namespace Gtk { } delegate IntPtr d_gtk_action_group_list_actions(IntPtr raw); - static d_gtk_action_group_list_actions gtk_action_group_list_actions = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_action_group_list_actions")); + static d_gtk_action_group_list_actions gtk_action_group_list_actions = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_action_group_list_actions")); public Gtk.Action[] ListActions() { IntPtr raw_ret = gtk_action_group_list_actions (Handle); diff --git a/Source/Libs/GtkSharp/Adjustment.cs b/Source/Libs/GtkSharp/Adjustment.cs index 46433e165..9d48f525a 100755 --- a/Source/Libs/GtkSharp/Adjustment.cs +++ b/Source/Libs/GtkSharp/Adjustment.cs @@ -24,7 +24,7 @@ namespace Gtk { public partial class Adjustment { delegate IntPtr d_gtk_adjustment_new(double value, double lower, double upper, double step_increment, double page_increment, double page_size); - static d_gtk_adjustment_new gtk_adjustment_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_adjustment_new")); + static d_gtk_adjustment_new gtk_adjustment_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_adjustment_new")); public Adjustment (double value, double lower, double upper, double step_increment, double page_increment, double page_size) : base (IntPtr.Zero) { @@ -43,10 +43,10 @@ namespace Gtk { } delegate void d_g_object_freeze_notify(IntPtr inst); - static d_g_object_freeze_notify g_object_freeze_notify = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_freeze_notify")); + static d_g_object_freeze_notify g_object_freeze_notify = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_freeze_notify")); delegate void d_g_object_thaw_notify(IntPtr inst); - static d_g_object_thaw_notify g_object_thaw_notify = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_thaw_notify")); + static d_g_object_thaw_notify g_object_thaw_notify = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_thaw_notify")); public void SetBounds (double lower, double upper, double step_increment, double page_increment, double page_size) { diff --git a/Source/Libs/GtkSharp/Application.cs b/Source/Libs/GtkSharp/Application.cs index 7aa291620..6b94f3fc4 100755 --- a/Source/Libs/GtkSharp/Application.cs +++ b/Source/Libs/GtkSharp/Application.cs @@ -47,8 +47,8 @@ namespace Gtk { case PlatformID.Win32S: case PlatformID.Win32Windows: case PlatformID.WinCE: - Win32CreateWindow = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load("user32.dll"), "CreateWindowExW")); - Win32DestroyWindow = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load("user32.dll"), "DestroyWindow")); + Win32CreateWindow = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load("user32.dll"), "CreateWindowExW")); + Win32DestroyWindow = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load("user32.dll"), "DestroyWindow")); // No idea why we need to create that window, but it enables visual styles on the Windows platform IntPtr window = Win32CreateWindow (WS_EX_TOOLWINDOW, "static", "gtk-sharp visual styles window", WS_OVERLAPPEDWINDOW, 0, 0, 0, 0, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero); @@ -60,10 +60,10 @@ namespace Gtk { } delegate void d_gtk_init(ref int argc, ref IntPtr argv); - static d_gtk_init gtk_init = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_init")); + static d_gtk_init gtk_init = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_init")); delegate bool d_gtk_init_check(ref int argc, ref IntPtr argv); - static d_gtk_init_check gtk_init_check = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_init_check")); + static d_gtk_init_check gtk_init_check = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_init_check")); static void SetPrgname () { @@ -129,7 +129,7 @@ namespace Gtk { } delegate void d_gtk_main(); - static d_gtk_main gtk_main = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_main")); + static d_gtk_main gtk_main = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_main")); public static void Run () { @@ -137,7 +137,7 @@ namespace Gtk { } delegate bool d_gtk_events_pending(); - static d_gtk_events_pending gtk_events_pending = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_events_pending")); + static d_gtk_events_pending gtk_events_pending = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_events_pending")); public static bool EventsPending () @@ -146,10 +146,10 @@ namespace Gtk { } delegate void d_gtk_main_iteration(); - static d_gtk_main_iteration gtk_main_iteration = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_main_iteration")); + static d_gtk_main_iteration gtk_main_iteration = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_main_iteration")); delegate bool d_gtk_main_iteration_do(bool blocking); - static d_gtk_main_iteration_do gtk_main_iteration_do = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_main_iteration_do")); + static d_gtk_main_iteration_do gtk_main_iteration_do = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_main_iteration_do")); public static void RunIteration () { @@ -162,7 +162,7 @@ namespace Gtk { } delegate void d_gtk_main_quit(); - static d_gtk_main_quit gtk_main_quit = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_main_quit")); + static d_gtk_main_quit gtk_main_quit = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_main_quit")); public static void Quit () { @@ -171,7 +171,7 @@ namespace Gtk { delegate IntPtr d_gtk_get_current_event(); - static d_gtk_get_current_event gtk_get_current_event = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_get_current_event")); + static d_gtk_get_current_event gtk_get_current_event = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_get_current_event")); public static Gdk.Event CurrentEvent { get { diff --git a/Source/Libs/GtkSharp/Bin.cs b/Source/Libs/GtkSharp/Bin.cs index 1e2800c9b..731ec0863 100755 --- a/Source/Libs/GtkSharp/Bin.cs +++ b/Source/Libs/GtkSharp/Bin.cs @@ -26,7 +26,7 @@ namespace Gtk { public partial class Bin { delegate IntPtr d_gtk_bin_get_child(IntPtr raw); - static d_gtk_bin_get_child gtk_bin_get_child = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_bin_get_child")); + static d_gtk_bin_get_child gtk_bin_get_child = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_bin_get_child")); public new Gtk.Widget Child { get { diff --git a/Source/Libs/GtkSharp/Builder.cs b/Source/Libs/GtkSharp/Builder.cs index c2d86367d..4b628d5ed 100755 --- a/Source/Libs/GtkSharp/Builder.cs +++ b/Source/Libs/GtkSharp/Builder.cs @@ -224,7 +224,7 @@ namespace Gtk { } delegate void d_gtk_builder_connect_signals_full(IntPtr raw, GtkSharp.BuilderConnectFuncNative func, IntPtr user_data); - static d_gtk_builder_connect_signals_full gtk_builder_connect_signals_full = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_builder_connect_signals_full")); + static d_gtk_builder_connect_signals_full gtk_builder_connect_signals_full = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_builder_connect_signals_full")); public void ConnectSignals() { GtkSharp.BuilderConnectFuncWrapper func_wrapper = new GtkSharp.BuilderConnectFuncWrapper (new BuilderConnectFunc (ConnectFunc)); diff --git a/Source/Libs/GtkSharp/Button.cs b/Source/Libs/GtkSharp/Button.cs index 4c58985f6..cd088248e 100755 --- a/Source/Libs/GtkSharp/Button.cs +++ b/Source/Libs/GtkSharp/Button.cs @@ -26,7 +26,7 @@ namespace Gtk { public partial class Button { delegate IntPtr d_gtk_button_new_from_stock(IntPtr stock_id); - static d_gtk_button_new_from_stock gtk_button_new_from_stock = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_new_from_stock")); + static d_gtk_button_new_from_stock gtk_button_new_from_stock = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_new_from_stock")); public Button (string stock_id) : base (IntPtr.Zero) { diff --git a/Source/Libs/GtkSharp/CellRenderer.cs b/Source/Libs/GtkSharp/CellRenderer.cs index 23c649287..6dde420f8 100755 --- a/Source/Libs/GtkSharp/CellRenderer.cs +++ b/Source/Libs/GtkSharp/CellRenderer.cs @@ -29,7 +29,7 @@ namespace Gtk { public partial class CellRenderer { delegate IntPtr d_gtk_cell_renderer_start_editing(IntPtr handle, IntPtr evnt, IntPtr widget, IntPtr path, ref Gdk.Rectangle bg_area, ref Gdk.Rectangle cell_area, int flags); - static d_gtk_cell_renderer_start_editing gtk_cell_renderer_start_editing = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_renderer_start_editing")); + static d_gtk_cell_renderer_start_editing gtk_cell_renderer_start_editing = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_renderer_start_editing")); public ICellEditable StartEditing (Widget widget, Gdk.Event evnt, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, CellRendererState flags) { @@ -41,7 +41,7 @@ namespace Gtk { } delegate void d_gtk_cell_renderer_render2(IntPtr handle, IntPtr drawable, IntPtr widget, ref Gdk.Rectangle bg_area, ref Gdk.Rectangle cell_area, ref Gdk.Rectangle expose_area, int flags); - static d_gtk_cell_renderer_render2 gtk_cell_renderer_render2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_renderer_render")); + static d_gtk_cell_renderer_render2 gtk_cell_renderer_render2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_renderer_render")); public void Render (Cairo.Context context, Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, CellRendererState flags) { diff --git a/Source/Libs/GtkSharp/CheckMenuItem.cs b/Source/Libs/GtkSharp/CheckMenuItem.cs index 2050b61d8..05467ddf7 100755 --- a/Source/Libs/GtkSharp/CheckMenuItem.cs +++ b/Source/Libs/GtkSharp/CheckMenuItem.cs @@ -26,7 +26,7 @@ namespace Gtk { public partial class CheckMenuItem { delegate IntPtr d_gtk_check_menu_item_new_with_mnemonic(IntPtr label); - static d_gtk_check_menu_item_new_with_mnemonic gtk_check_menu_item_new_with_mnemonic = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_check_menu_item_new_with_mnemonic")); + static d_gtk_check_menu_item_new_with_mnemonic gtk_check_menu_item_new_with_mnemonic = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_check_menu_item_new_with_mnemonic")); public CheckMenuItem (string label) : base (IntPtr.Zero) { diff --git a/Source/Libs/GtkSharp/Clipboard.cs b/Source/Libs/GtkSharp/Clipboard.cs index 51634cc42..f8b23f369 100755 --- a/Source/Libs/GtkSharp/Clipboard.cs +++ b/Source/Libs/GtkSharp/Clipboard.cs @@ -26,10 +26,10 @@ namespace Gtk { public partial class Clipboard { delegate bool d_gtk_clipboard_set_with_data(IntPtr raw, TargetEntry[] targets, int n_targets, GtkSharp.ClipboardGetFuncNative get_func, GtkSharp.ClipboardClearFuncNative clear_func, IntPtr data); - static d_gtk_clipboard_set_with_data gtk_clipboard_set_with_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_clipboard_set_with_data")); + static d_gtk_clipboard_set_with_data gtk_clipboard_set_with_data = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_clipboard_set_with_data")); delegate bool d_gtk_clipboard_set_with_owner(IntPtr raw, TargetEntry[] targets, int n_targets, GtkSharp.ClipboardGetFuncNative get_func, GtkSharp.ClipboardClearFuncNative clear_func, IntPtr owner); - static d_gtk_clipboard_set_with_owner gtk_clipboard_set_with_owner = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_clipboard_set_with_owner")); + static d_gtk_clipboard_set_with_owner gtk_clipboard_set_with_owner = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_clipboard_set_with_owner")); void ClearProxy (Clipboard clipboard) { @@ -74,7 +74,7 @@ namespace Gtk { } delegate IntPtr d_gtk_clipboard_wait_for_rich_text(IntPtr raw, IntPtr buffer, out IntPtr format, out UIntPtr length); - static d_gtk_clipboard_wait_for_rich_text gtk_clipboard_wait_for_rich_text = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_clipboard_wait_for_rich_text")); + static d_gtk_clipboard_wait_for_rich_text gtk_clipboard_wait_for_rich_text = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_clipboard_wait_for_rich_text")); public byte[] WaitForRichText(Gtk.TextBuffer buffer, out Gdk.Atom format) { @@ -116,7 +116,7 @@ namespace Gtk { } delegate void d_gtk_clipboard_request_rich_text(IntPtr raw, IntPtr buffer, RichTextReceivedFuncNative cb, IntPtr user_data); - static d_gtk_clipboard_request_rich_text gtk_clipboard_request_rich_text = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_clipboard_request_rich_text")); + static d_gtk_clipboard_request_rich_text gtk_clipboard_request_rich_text = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_clipboard_request_rich_text")); public void RequestRichText (Gtk.TextBuffer buffer, RichTextReceivedFunc cb) { diff --git a/Source/Libs/GtkSharp/ColorSelection.cs b/Source/Libs/GtkSharp/ColorSelection.cs index 8702919fa..e8854b09e 100755 --- a/Source/Libs/GtkSharp/ColorSelection.cs +++ b/Source/Libs/GtkSharp/ColorSelection.cs @@ -24,7 +24,7 @@ namespace Gtk { public partial class ColorSelection { delegate IntPtr d_gtk_color_selection_palette_to_string(Gdk.Color[] colors, int n_colors); - static d_gtk_color_selection_palette_to_string gtk_color_selection_palette_to_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_color_selection_palette_to_string")); + static d_gtk_color_selection_palette_to_string gtk_color_selection_palette_to_string = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_color_selection_palette_to_string")); /// PaletteToString Method public static string PaletteToString(Gdk.Color[] colors) { @@ -35,7 +35,7 @@ namespace Gtk { } delegate bool d_gtk_color_selection_palette_from_string(IntPtr str, out IntPtr colors, out int n_colors); - static d_gtk_color_selection_palette_from_string gtk_color_selection_palette_from_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_color_selection_palette_from_string")); + static d_gtk_color_selection_palette_from_string gtk_color_selection_palette_from_string = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_color_selection_palette_from_string")); public static Gdk.Color[] PaletteFromString(string str) { IntPtr parsedColors; @@ -60,10 +60,10 @@ namespace Gtk { } delegate void d_gtk_color_selection_set_previous_color(IntPtr raw, ref Gdk.Color color); - static d_gtk_color_selection_set_previous_color gtk_color_selection_set_previous_color = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_color_selection_set_previous_color")); + static d_gtk_color_selection_set_previous_color gtk_color_selection_set_previous_color = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_color_selection_set_previous_color")); delegate void d_gtk_color_selection_get_previous_color(IntPtr raw, out Gdk.Color color); - static d_gtk_color_selection_get_previous_color gtk_color_selection_get_previous_color = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_color_selection_get_previous_color")); + static d_gtk_color_selection_get_previous_color gtk_color_selection_get_previous_color = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_color_selection_get_previous_color")); // Create Gtk# property to replace two Gtk+ functions public Gdk.Color PreviousColor diff --git a/Source/Libs/GtkSharp/Container.cs b/Source/Libs/GtkSharp/Container.cs index b1b7af37e..d37b5388f 100644 --- a/Source/Libs/GtkSharp/Container.cs +++ b/Source/Libs/GtkSharp/Container.cs @@ -28,10 +28,10 @@ namespace Gtk public partial class Container : IEnumerable { delegate GParamSpec d_gtk_container_class_find_child_property(IntPtr cclass, string property_name); - static d_gtk_container_class_find_child_property gtk_container_class_find_child_property = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_container_class_find_child_property")); + static d_gtk_container_class_find_child_property gtk_container_class_find_child_property = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_container_class_find_child_property")); delegate void d_gtk_container_child_get_property(IntPtr container, IntPtr child, string property_name, ref GLib.Value value); - static d_gtk_container_child_get_property gtk_container_child_get_property = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_container_child_get_property")); + static d_gtk_container_child_get_property gtk_container_child_get_property = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_container_child_get_property")); struct GTypeInstance { @@ -92,10 +92,10 @@ namespace Gtk } delegate bool d_gtk_container_get_focus_chain(IntPtr raw, out IntPtr list_ptr); - static d_gtk_container_get_focus_chain gtk_container_get_focus_chain = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_container_get_focus_chain")); + static d_gtk_container_get_focus_chain gtk_container_get_focus_chain = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_container_get_focus_chain")); delegate void d_gtk_container_set_focus_chain(IntPtr raw, IntPtr list_ptr); - static d_gtk_container_set_focus_chain gtk_container_set_focus_chain = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_container_set_focus_chain")); + static d_gtk_container_set_focus_chain gtk_container_set_focus_chain = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_container_set_focus_chain")); public Widget[] FocusChain { diff --git a/Source/Libs/GtkSharp/Dialog.cs b/Source/Libs/GtkSharp/Dialog.cs index 120e294aa..9d0518e4d 100755 --- a/Source/Libs/GtkSharp/Dialog.cs +++ b/Source/Libs/GtkSharp/Dialog.cs @@ -27,7 +27,7 @@ namespace Gtk { public partial class Dialog { delegate IntPtr d_gtk_dialog_new_with_buttons(IntPtr title, IntPtr i, int flags, IntPtr dummy); - static d_gtk_dialog_new_with_buttons gtk_dialog_new_with_buttons = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_dialog_new_with_buttons")); + static d_gtk_dialog_new_with_buttons gtk_dialog_new_with_buttons = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_dialog_new_with_buttons")); public Dialog (string title, Gtk.Window parent, Gtk.DialogFlags flags, params object[] button_data) : base(IntPtr.Zero) { IntPtr native = GLib.Marshaller.StringToPtrGStrdup (title); diff --git a/Source/Libs/GtkSharp/Drag.cs b/Source/Libs/GtkSharp/Drag.cs index 7ab0a0693..37f84d409 100755 --- a/Source/Libs/GtkSharp/Drag.cs +++ b/Source/Libs/GtkSharp/Drag.cs @@ -24,7 +24,7 @@ namespace Gtk { public partial class Drag { delegate void d_gtk_drag_set_icon_default(IntPtr context); - static d_gtk_drag_set_icon_default gtk_drag_set_icon_default = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_drag_set_icon_default")); + static d_gtk_drag_set_icon_default gtk_drag_set_icon_default = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_drag_set_icon_default")); public static void SetIconDefault(Gdk.DragContext context) { diff --git a/Source/Libs/GtkSharp/FileChooserDialog.cs b/Source/Libs/GtkSharp/FileChooserDialog.cs index 8356b2bd7..3e2aa7540 100755 --- a/Source/Libs/GtkSharp/FileChooserDialog.cs +++ b/Source/Libs/GtkSharp/FileChooserDialog.cs @@ -29,7 +29,7 @@ namespace Gtk { public partial class FileChooserDialog { delegate IntPtr d_gtk_file_chooser_dialog_new(IntPtr title, IntPtr parent, int action, IntPtr nil); - static d_gtk_file_chooser_dialog_new gtk_file_chooser_dialog_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_file_chooser_dialog_new")); + static d_gtk_file_chooser_dialog_new gtk_file_chooser_dialog_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_file_chooser_dialog_new")); public FileChooserDialog (string title, Window parent, FileChooserAction action, params object[] button_data) : base (IntPtr.Zero) { diff --git a/Source/Libs/GtkSharp/FileChooserNative.cs b/Source/Libs/GtkSharp/FileChooserNative.cs index 376df56b0..4c5b8ff66 100755 --- a/Source/Libs/GtkSharp/FileChooserNative.cs +++ b/Source/Libs/GtkSharp/FileChooserNative.cs @@ -28,19 +28,19 @@ namespace Gtk { public FileChooserNative (IntPtr raw) : base(raw) {} delegate IntPtr d_gtk_file_chooser_native_new(IntPtr title, IntPtr parent, int action, IntPtr accept_label, IntPtr cancel_label); - static d_gtk_file_chooser_native_new gtk_file_chooser_native_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_file_chooser_native_new")); + static d_gtk_file_chooser_native_new gtk_file_chooser_native_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_file_chooser_native_new")); delegate string d_gtk_file_chooser_native_get_accept_label(IntPtr self); - static d_gtk_file_chooser_native_get_accept_label gtk_file_chooser_native_get_accept_label = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_file_chooser_native_get_accept_label")); + static d_gtk_file_chooser_native_get_accept_label gtk_file_chooser_native_get_accept_label = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_file_chooser_native_get_accept_label")); delegate string d_gtk_file_chooser_native_set_accept_label(IntPtr self, string accept_label); - static d_gtk_file_chooser_native_set_accept_label gtk_file_chooser_native_set_accept_label = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_file_chooser_native_set_accept_label")); + static d_gtk_file_chooser_native_set_accept_label gtk_file_chooser_native_set_accept_label = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_file_chooser_native_set_accept_label")); delegate string d_gtk_file_chooser_native_get_cancel_label(IntPtr self); - static d_gtk_file_chooser_native_get_cancel_label gtk_file_chooser_native_get_cancel_label = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_file_chooser_native_get_cancel_label")); + static d_gtk_file_chooser_native_get_cancel_label gtk_file_chooser_native_get_cancel_label = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_file_chooser_native_get_cancel_label")); delegate string d_gtk_file_chooser_native_set_cancel_label(IntPtr self, string cancel_label); - static d_gtk_file_chooser_native_set_cancel_label gtk_file_chooser_native_set_cancel_label = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_file_chooser_native_set_cancel_label")); + static d_gtk_file_chooser_native_set_cancel_label gtk_file_chooser_native_set_cancel_label = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_file_chooser_native_set_cancel_label")); public FileChooserNative (string title, Gtk.Window parent, Gtk.FileChooserAction action, string accept_label, string cancel_label) : base(FileChooserNativeCreate(title, parent, action, accept_label, cancel_label)) { diff --git a/Source/Libs/GtkSharp/HScale.cs b/Source/Libs/GtkSharp/HScale.cs index 006c4f055..0296b38bb 100755 --- a/Source/Libs/GtkSharp/HScale.cs +++ b/Source/Libs/GtkSharp/HScale.cs @@ -26,7 +26,7 @@ namespace Gtk { public partial class HScale { delegate IntPtr d_gtk_hscale_new_with_range(double min, double max, double step); - static d_gtk_hscale_new_with_range gtk_hscale_new_with_range = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_hscale_new_with_range")); + static d_gtk_hscale_new_with_range gtk_hscale_new_with_range = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_hscale_new_with_range")); public HScale (double min, double max, double step) : base (IntPtr.Zero) { diff --git a/Source/Libs/GtkSharp/IconFactory.cs b/Source/Libs/GtkSharp/IconFactory.cs index dd3f80536..3f053cf93 100755 --- a/Source/Libs/GtkSharp/IconFactory.cs +++ b/Source/Libs/GtkSharp/IconFactory.cs @@ -21,7 +21,7 @@ namespace Gtk { public partial class IconFactory { delegate void d_gtk_icon_size_lookup(IconSize size, out int width, out int height); - static d_gtk_icon_size_lookup gtk_icon_size_lookup = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_size_lookup")); + static d_gtk_icon_size_lookup gtk_icon_size_lookup = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_size_lookup")); /// Query icon dimensions /// Queries dimensions for icons of the specified size. diff --git a/Source/Libs/GtkSharp/IconSet.cs b/Source/Libs/GtkSharp/IconSet.cs index 0b985f93e..588ad8b11 100755 --- a/Source/Libs/GtkSharp/IconSet.cs +++ b/Source/Libs/GtkSharp/IconSet.cs @@ -21,7 +21,7 @@ namespace Gtk { public partial class IconSet { unsafe delegate void d_gtk_icon_set_get_sizes(IntPtr raw, out int *pointer_to_enum, out int n_sizes); - static d_gtk_icon_set_get_sizes gtk_icon_set_get_sizes = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_set_get_sizes")); + static d_gtk_icon_set_get_sizes gtk_icon_set_get_sizes = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_set_get_sizes")); /// Sizes Property /// To be completed diff --git a/Source/Libs/GtkSharp/IconTheme.cs b/Source/Libs/GtkSharp/IconTheme.cs index cfa600138..eb0678704 100755 --- a/Source/Libs/GtkSharp/IconTheme.cs +++ b/Source/Libs/GtkSharp/IconTheme.cs @@ -29,7 +29,7 @@ namespace Gtk { public partial class IconTheme { delegate IntPtr d_gtk_icon_theme_list_icons(IntPtr raw, IntPtr context); - static d_gtk_icon_theme_list_icons gtk_icon_theme_list_icons = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_theme_list_icons")); + static d_gtk_icon_theme_list_icons gtk_icon_theme_list_icons = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_theme_list_icons")); public string[] ListIcons (string context) { @@ -48,16 +48,16 @@ namespace Gtk { } delegate void d_gtk_icon_theme_get_search_path(IntPtr raw, out IntPtr path, out int n_elements); - static d_gtk_icon_theme_get_search_path gtk_icon_theme_get_search_path = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_theme_get_search_path")); + static d_gtk_icon_theme_get_search_path gtk_icon_theme_get_search_path = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_theme_get_search_path")); delegate void d_gtk_icon_theme_set_search_path(IntPtr raw, IntPtr[] path, int n_elements); - static d_gtk_icon_theme_set_search_path gtk_icon_theme_set_search_path = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_theme_set_search_path")); + static d_gtk_icon_theme_set_search_path gtk_icon_theme_set_search_path = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_theme_set_search_path")); delegate void d_gtk_icon_theme_get_search_path_utf8(IntPtr raw, out IntPtr path, out int n_elements); - static d_gtk_icon_theme_get_search_path_utf8 gtk_icon_theme_get_search_path_utf8 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_theme_get_search_path_utf8")); + static d_gtk_icon_theme_get_search_path_utf8 gtk_icon_theme_get_search_path_utf8 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_theme_get_search_path_utf8")); delegate void d_gtk_icon_theme_set_search_path_utf8(IntPtr raw, IntPtr[] path, int n_elements); - static d_gtk_icon_theme_set_search_path_utf8 gtk_icon_theme_set_search_path_utf8 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_theme_set_search_path_utf8")); + static d_gtk_icon_theme_set_search_path_utf8 gtk_icon_theme_set_search_path_utf8 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_theme_set_search_path_utf8")); bool IsWindowsPlatform { get { @@ -108,7 +108,7 @@ namespace Gtk { } delegate IntPtr d_gtk_icon_theme_get_icon_sizes(IntPtr raw, IntPtr icon_name); - static d_gtk_icon_theme_get_icon_sizes gtk_icon_theme_get_icon_sizes = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_theme_get_icon_sizes")); + static d_gtk_icon_theme_get_icon_sizes gtk_icon_theme_get_icon_sizes = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_theme_get_icon_sizes")); public int[] GetIconSizes (string icon_name) { diff --git a/Source/Libs/GtkSharp/IconView.cs b/Source/Libs/GtkSharp/IconView.cs index 86badc90f..aff47ea5c 100755 --- a/Source/Libs/GtkSharp/IconView.cs +++ b/Source/Libs/GtkSharp/IconView.cs @@ -37,7 +37,7 @@ namespace Gtk { } delegate void d_gtk_icon_view_scroll_to_path(IntPtr raw, IntPtr path, bool use_align, float row_align, float col_align); - static d_gtk_icon_view_scroll_to_path gtk_icon_view_scroll_to_path = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_view_scroll_to_path")); + static d_gtk_icon_view_scroll_to_path gtk_icon_view_scroll_to_path = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_view_scroll_to_path")); public void ScrollToPath (Gtk.TreePath path) { diff --git a/Source/Libs/GtkSharp/Image.cs b/Source/Libs/GtkSharp/Image.cs index b09a63396..2567cf664 100755 --- a/Source/Libs/GtkSharp/Image.cs +++ b/Source/Libs/GtkSharp/Image.cs @@ -28,7 +28,7 @@ namespace Gtk { public partial class Image { delegate IntPtr d_gtk_image_new_from_icon_set(IntPtr icon_set, int size); - static d_gtk_image_new_from_icon_set gtk_image_new_from_icon_set = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_image_new_from_icon_set")); + static d_gtk_image_new_from_icon_set gtk_image_new_from_icon_set = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_image_new_from_icon_set")); public Image (Gtk.IconSet icon_set, Gtk.IconSize size) : base (IntPtr.Zero) { @@ -46,7 +46,7 @@ namespace Gtk { } delegate IntPtr d_gtk_image_new_from_stock(IntPtr stock_id, int size); - static d_gtk_image_new_from_stock gtk_image_new_from_stock = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_image_new_from_stock")); + static d_gtk_image_new_from_stock gtk_image_new_from_stock = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_image_new_from_stock")); public Image (string stock_id, Gtk.IconSize size) : base (IntPtr.Zero) { diff --git a/Source/Libs/GtkSharp/ImageMenuItem.cs b/Source/Libs/GtkSharp/ImageMenuItem.cs index 94b3bab32..6acff9455 100755 --- a/Source/Libs/GtkSharp/ImageMenuItem.cs +++ b/Source/Libs/GtkSharp/ImageMenuItem.cs @@ -26,7 +26,7 @@ namespace Gtk { public partial class ImageMenuItem { delegate IntPtr d_gtk_image_menu_item_new_with_mnemonic(IntPtr label); - static d_gtk_image_menu_item_new_with_mnemonic gtk_image_menu_item_new_with_mnemonic = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_image_menu_item_new_with_mnemonic")); + static d_gtk_image_menu_item_new_with_mnemonic gtk_image_menu_item_new_with_mnemonic = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_image_menu_item_new_with_mnemonic")); public ImageMenuItem (string label) : base (IntPtr.Zero) { diff --git a/Source/Libs/GtkSharp/Key.cs b/Source/Libs/GtkSharp/Key.cs index eef429f44..d3583271b 100755 --- a/Source/Libs/GtkSharp/Key.cs +++ b/Source/Libs/GtkSharp/Key.cs @@ -29,7 +29,7 @@ namespace Gtk { static Hashtable wrappers = new Hashtable (); delegate uint d_gtk_key_snooper_install(GtkSharp.KeySnoopFuncNative snooper, IntPtr func_data); - static d_gtk_key_snooper_install gtk_key_snooper_install = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_key_snooper_install")); + static d_gtk_key_snooper_install gtk_key_snooper_install = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_key_snooper_install")); public static uint SnooperInstall (Gtk.KeySnoopFunc snooper) { @@ -40,7 +40,7 @@ namespace Gtk { } delegate void d_gtk_key_snooper_remove(uint snooper_handler_id); - static d_gtk_key_snooper_remove gtk_key_snooper_remove = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_key_snooper_remove")); + static d_gtk_key_snooper_remove gtk_key_snooper_remove = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_key_snooper_remove")); public static void SnooperRemove (uint snooper_handler_id) { diff --git a/Source/Libs/GtkSharp/ListStore.cs b/Source/Libs/GtkSharp/ListStore.cs index 5efdefd46..33bb054cc 100755 --- a/Source/Libs/GtkSharp/ListStore.cs +++ b/Source/Libs/GtkSharp/ListStore.cs @@ -27,7 +27,7 @@ namespace Gtk { public partial class ListStore : IEnumerable { delegate bool d_gtk_tree_model_iter_children2(IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); - static d_gtk_tree_model_iter_children2 gtk_tree_model_iter_children2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_children")); + static d_gtk_tree_model_iter_children2 gtk_tree_model_iter_children2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_children")); public bool IterChildren (out Gtk.TreeIter iter) { bool raw_ret = gtk_tree_model_iter_children2 (Handle, out iter, IntPtr.Zero); @@ -43,7 +43,7 @@ namespace Gtk { } delegate bool d_gtk_tree_model_iter_nth_child2(IntPtr raw, out Gtk.TreeIter iter, IntPtr parent, int n); - static d_gtk_tree_model_iter_nth_child2 gtk_tree_model_iter_nth_child2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_nth_child")); + static d_gtk_tree_model_iter_nth_child2 gtk_tree_model_iter_nth_child2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_nth_child")); public bool IterNthChild (out Gtk.TreeIter iter, int n) { bool raw_ret = gtk_tree_model_iter_nth_child2 (Handle, out iter, IntPtr.Zero, n); @@ -122,7 +122,7 @@ namespace Gtk { } delegate void d_gtk_list_store_insert_with_valuesv2(IntPtr raw, out TreeIter iter, int position, int[] columns, GLib.Value[] values, int n_values); - static d_gtk_list_store_insert_with_valuesv2 gtk_list_store_insert_with_valuesv2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_list_store_insert_with_valuesv")); + static d_gtk_list_store_insert_with_valuesv2 gtk_list_store_insert_with_valuesv2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_list_store_insert_with_valuesv")); public TreeIter InsertWithValues (int position, params object[] values) { @@ -148,7 +148,7 @@ namespace Gtk { } delegate void d_gtk_list_store_set_valuesv(IntPtr raw, ref TreeIter iter, int[] columns, GLib.Value[] values, int n_values); - static d_gtk_list_store_set_valuesv gtk_list_store_set_valuesv = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_list_store_set_valuesv")); + static d_gtk_list_store_set_valuesv gtk_list_store_set_valuesv = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_list_store_set_valuesv")); public void SetValues (TreeIter iter, params object[] values) { diff --git a/Source/Libs/GtkSharp/Menu.cs b/Source/Libs/GtkSharp/Menu.cs index 7cd044895..6b84b3619 100755 --- a/Source/Libs/GtkSharp/Menu.cs +++ b/Source/Libs/GtkSharp/Menu.cs @@ -36,7 +36,7 @@ namespace Gtk { } delegate void d_gtk_menu_set_screen(IntPtr raw, IntPtr screen); - static d_gtk_menu_set_screen gtk_menu_set_screen = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_menu_set_screen")); + static d_gtk_menu_set_screen gtk_menu_set_screen = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_menu_set_screen")); public new Gdk.Screen Screen { get { @@ -48,7 +48,7 @@ namespace Gtk { } delegate void d_gtk_menu_set_active(IntPtr raw, uint index_); - static d_gtk_menu_set_active gtk_menu_set_active = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_menu_set_active")); + static d_gtk_menu_set_active gtk_menu_set_active = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_menu_set_active")); public void SetActive (uint index_) { diff --git a/Source/Libs/GtkSharp/MenuItem.cs b/Source/Libs/GtkSharp/MenuItem.cs index 03469951e..bd2847b81 100755 --- a/Source/Libs/GtkSharp/MenuItem.cs +++ b/Source/Libs/GtkSharp/MenuItem.cs @@ -26,7 +26,7 @@ namespace Gtk { public partial class MenuItem { delegate IntPtr d_gtk_menu_item_new_with_mnemonic(IntPtr label); - static d_gtk_menu_item_new_with_mnemonic gtk_menu_item_new_with_mnemonic = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_menu_item_new_with_mnemonic")); + static d_gtk_menu_item_new_with_mnemonic gtk_menu_item_new_with_mnemonic = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_menu_item_new_with_mnemonic")); public MenuItem (string label) : base (IntPtr.Zero) { diff --git a/Source/Libs/GtkSharp/MessageDialog.cs b/Source/Libs/GtkSharp/MessageDialog.cs index f291cd741..d97c0031e 100755 --- a/Source/Libs/GtkSharp/MessageDialog.cs +++ b/Source/Libs/GtkSharp/MessageDialog.cs @@ -21,10 +21,10 @@ namespace Gtk { public partial class MessageDialog { delegate IntPtr d_gtk_message_dialog_new(IntPtr parent_window, DialogFlags flags, MessageType type, ButtonsType bt, IntPtr msg, IntPtr args); - static d_gtk_message_dialog_new gtk_message_dialog_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_message_dialog_new")); + static d_gtk_message_dialog_new gtk_message_dialog_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_message_dialog_new")); delegate IntPtr d_gtk_message_dialog_new_with_markup(IntPtr parent_window, DialogFlags flags, MessageType type, ButtonsType bt, IntPtr msg, IntPtr args); - static d_gtk_message_dialog_new_with_markup gtk_message_dialog_new_with_markup = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_message_dialog_new_with_markup")); + static d_gtk_message_dialog_new_with_markup gtk_message_dialog_new_with_markup = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_message_dialog_new_with_markup")); public MessageDialog (Gtk.Window parent_window, DialogFlags flags, MessageType type, ButtonsType bt, bool use_markup, string format, params object[] args) { diff --git a/Source/Libs/GtkSharp/NativeDialog.cs b/Source/Libs/GtkSharp/NativeDialog.cs index 57c9f365b..09d9208d6 100755 --- a/Source/Libs/GtkSharp/NativeDialog.cs +++ b/Source/Libs/GtkSharp/NativeDialog.cs @@ -28,7 +28,7 @@ namespace Gtk { public NativeDialog (IntPtr raw) : base(raw) { } delegate void d_gtk_native_dialog_show(IntPtr self); - static d_gtk_native_dialog_show gtk_native_dialog_show = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_show")); + static d_gtk_native_dialog_show gtk_native_dialog_show = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_show")); public void Show () { @@ -36,7 +36,7 @@ namespace Gtk { } delegate void d_gtk_native_dialog_hide(IntPtr self); - static d_gtk_native_dialog_hide gtk_native_dialog_hide = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_hide")); + static d_gtk_native_dialog_hide gtk_native_dialog_hide = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_hide")); public void Hide () { @@ -44,7 +44,7 @@ namespace Gtk { } delegate void d_gtk_native_dialog_destroy(IntPtr self); - static d_gtk_native_dialog_destroy gtk_native_dialog_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_destroy")); + static d_gtk_native_dialog_destroy gtk_native_dialog_destroy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_destroy")); public void Destroy () { @@ -52,7 +52,7 @@ namespace Gtk { } delegate bool d_gtk_native_dialog_get_visible(IntPtr self); - static d_gtk_native_dialog_get_visible gtk_native_dialog_get_visible = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_get_visible")); + static d_gtk_native_dialog_get_visible gtk_native_dialog_get_visible = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_get_visible")); public bool Visible { get { @@ -61,10 +61,10 @@ namespace Gtk { } delegate void d_gtk_native_dialog_set_modal(IntPtr self, bool modal); - static d_gtk_native_dialog_set_modal gtk_native_dialog_set_modal = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_set_modal")); + static d_gtk_native_dialog_set_modal gtk_native_dialog_set_modal = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_set_modal")); delegate bool d_gtk_native_dialog_get_modal(IntPtr self); - static d_gtk_native_dialog_get_modal gtk_native_dialog_get_modal = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_get_modal")); + static d_gtk_native_dialog_get_modal gtk_native_dialog_get_modal = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_get_modal")); public bool Modal { set { @@ -76,10 +76,10 @@ namespace Gtk { } delegate void d_gtk_native_dialog_set_title(IntPtr self, string title); - static d_gtk_native_dialog_set_title gtk_native_dialog_set_title = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_set_title")); + static d_gtk_native_dialog_set_title gtk_native_dialog_set_title = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_set_title")); delegate string d_gtk_native_dialog_get_title(IntPtr self); - static d_gtk_native_dialog_get_title gtk_native_dialog_get_title = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_get_title")); + static d_gtk_native_dialog_get_title gtk_native_dialog_get_title = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_get_title")); public string Title { set { @@ -91,13 +91,13 @@ namespace Gtk { } delegate void d_gtk_native_dialog_set_transient_for(IntPtr self, IntPtr parent); - static d_gtk_native_dialog_set_transient_for gtk_native_dialog_set_transient_for = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_set_transient_for")); + static d_gtk_native_dialog_set_transient_for gtk_native_dialog_set_transient_for = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_set_transient_for")); delegate IntPtr d_gtk_native_dialog_get_transient_for(IntPtr self); - static d_gtk_native_dialog_get_transient_for gtk_native_dialog_get_transient_for = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_get_transient_for")); + static d_gtk_native_dialog_get_transient_for gtk_native_dialog_get_transient_for = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_get_transient_for")); delegate int d_gtk_native_dialog_run(IntPtr self); - static d_gtk_native_dialog_run gtk_native_dialog_run = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_run")); + static d_gtk_native_dialog_run gtk_native_dialog_run = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_run")); public int Run () { diff --git a/Source/Libs/GtkSharp/Notebook.cs b/Source/Libs/GtkSharp/Notebook.cs index 5db200fa4..c51555c35 100755 --- a/Source/Libs/GtkSharp/Notebook.cs +++ b/Source/Libs/GtkSharp/Notebook.cs @@ -33,7 +33,7 @@ namespace Gtk { } delegate int d_gtk_notebook_page_num(IntPtr handle, IntPtr child); - static d_gtk_notebook_page_num gtk_notebook_page_num = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_notebook_page_num")); + static d_gtk_notebook_page_num gtk_notebook_page_num = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_notebook_page_num")); public int PageNum (Widget child) { diff --git a/Source/Libs/GtkSharp/Plug.cs b/Source/Libs/GtkSharp/Plug.cs index edfa71015..e5eaa13a4 100755 --- a/Source/Libs/GtkSharp/Plug.cs +++ b/Source/Libs/GtkSharp/Plug.cs @@ -27,7 +27,7 @@ namespace Gtk { public partial class Plug { delegate IntPtr d_gtk_plug_new(UIntPtr socket_id); - static d_gtk_plug_new gtk_plug_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_plug_new")); + static d_gtk_plug_new gtk_plug_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_plug_new")); public Plug (ulong socket_id) : base (IntPtr.Zero) { @@ -40,7 +40,7 @@ namespace Gtk { } delegate IntPtr d_gtk_plug_new_for_display(IntPtr display, UIntPtr socket_id); - static d_gtk_plug_new_for_display gtk_plug_new_for_display = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_plug_new_for_display")); + static d_gtk_plug_new_for_display gtk_plug_new_for_display = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_plug_new_for_display")); public Plug (Gdk.Display display, ulong socket_id) : base (IntPtr.Zero) { diff --git a/Source/Libs/GtkSharp/Printer.cs b/Source/Libs/GtkSharp/Printer.cs index 8ba815cc4..bcc439f52 100755 --- a/Source/Libs/GtkSharp/Printer.cs +++ b/Source/Libs/GtkSharp/Printer.cs @@ -26,7 +26,7 @@ namespace Gtk { public partial class Printer { delegate void d_gtk_enumerate_printers(GtkSharp.PrinterFuncNative func, IntPtr func_data, GLib.DestroyNotify destroy, bool wait); - static d_gtk_enumerate_printers gtk_enumerate_printers = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_enumerate_printers")); + static d_gtk_enumerate_printers gtk_enumerate_printers = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_enumerate_printers")); public static void EnumeratePrinters (Gtk.PrinterFunc func, bool wait) { diff --git a/Source/Libs/GtkSharp/RadioAction.cs b/Source/Libs/GtkSharp/RadioAction.cs index 7042955a1..d0a0a07a1 100755 --- a/Source/Libs/GtkSharp/RadioAction.cs +++ b/Source/Libs/GtkSharp/RadioAction.cs @@ -26,10 +26,10 @@ namespace Gtk public partial class RadioAction { delegate IntPtr d_gtk_radio_action_get_group(IntPtr raw); - static d_gtk_radio_action_get_group gtk_radio_action_get_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_action_get_group")); + static d_gtk_radio_action_get_group gtk_radio_action_get_group = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_action_get_group")); delegate void d_gtk_radio_action_set_group(IntPtr raw, IntPtr list); - static d_gtk_radio_action_set_group gtk_radio_action_set_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_action_set_group")); + static d_gtk_radio_action_set_group gtk_radio_action_set_group = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_action_set_group")); [GLib.Property ("group")] public RadioAction[] Group { diff --git a/Source/Libs/GtkSharp/RadioButton.cs b/Source/Libs/GtkSharp/RadioButton.cs index cc7d5308d..40f4e4d48 100755 --- a/Source/Libs/GtkSharp/RadioButton.cs +++ b/Source/Libs/GtkSharp/RadioButton.cs @@ -26,7 +26,7 @@ namespace Gtk { public partial class RadioButton { delegate IntPtr d_gtk_radio_button_new_with_mnemonic(IntPtr group, IntPtr label); - static d_gtk_radio_button_new_with_mnemonic gtk_radio_button_new_with_mnemonic = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_button_new_with_mnemonic")); + static d_gtk_radio_button_new_with_mnemonic gtk_radio_button_new_with_mnemonic = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_button_new_with_mnemonic")); // creates a new group for this RadioButton public RadioButton (string label) @@ -37,10 +37,10 @@ namespace Gtk { } delegate IntPtr d_gtk_radio_button_get_group(IntPtr raw); - static d_gtk_radio_button_get_group gtk_radio_button_get_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_button_get_group")); + static d_gtk_radio_button_get_group gtk_radio_button_get_group = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_button_get_group")); delegate void d_gtk_radio_button_set_group(IntPtr raw, IntPtr list); - static d_gtk_radio_button_set_group gtk_radio_button_set_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_button_set_group")); + static d_gtk_radio_button_set_group gtk_radio_button_set_group = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_button_set_group")); [GLib.Property ("group")] public RadioButton[] Group { diff --git a/Source/Libs/GtkSharp/RadioMenuItem.cs b/Source/Libs/GtkSharp/RadioMenuItem.cs index e27845d9e..490c41383 100755 --- a/Source/Libs/GtkSharp/RadioMenuItem.cs +++ b/Source/Libs/GtkSharp/RadioMenuItem.cs @@ -44,7 +44,7 @@ namespace Gtk { } delegate IntPtr d_gtk_radio_menu_item_new_with_mnemonic(IntPtr group, IntPtr label); - static d_gtk_radio_menu_item_new_with_mnemonic gtk_radio_menu_item_new_with_mnemonic = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_menu_item_new_with_mnemonic")); + static d_gtk_radio_menu_item_new_with_mnemonic gtk_radio_menu_item_new_with_mnemonic = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_menu_item_new_with_mnemonic")); public RadioMenuItem (RadioMenuItem[] group, string label) : base (IntPtr.Zero) { @@ -72,10 +72,10 @@ namespace Gtk { } delegate IntPtr d_gtk_radio_menu_item_get_group(IntPtr raw); - static d_gtk_radio_menu_item_get_group gtk_radio_menu_item_get_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_menu_item_get_group")); + static d_gtk_radio_menu_item_get_group gtk_radio_menu_item_get_group = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_menu_item_get_group")); delegate void d_gtk_radio_menu_item_set_group(IntPtr raw, IntPtr list); - static d_gtk_radio_menu_item_set_group gtk_radio_menu_item_set_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_menu_item_set_group")); + static d_gtk_radio_menu_item_set_group gtk_radio_menu_item_set_group = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_menu_item_set_group")); [GLib.Property ("group")] public RadioMenuItem[] Group { diff --git a/Source/Libs/GtkSharp/RadioToolButton.cs b/Source/Libs/GtkSharp/RadioToolButton.cs index 48c4076cc..e378fa605 100755 --- a/Source/Libs/GtkSharp/RadioToolButton.cs +++ b/Source/Libs/GtkSharp/RadioToolButton.cs @@ -26,7 +26,7 @@ namespace Gtk { public partial class RadioToolButton { delegate IntPtr d_gtk_radio_tool_button_new(IntPtr group); - static d_gtk_radio_tool_button_new gtk_radio_tool_button_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_tool_button_new")); + static d_gtk_radio_tool_button_new gtk_radio_tool_button_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_tool_button_new")); public RadioToolButton (RadioToolButton[] group) : base (IntPtr.Zero) { @@ -47,7 +47,7 @@ namespace Gtk { } delegate IntPtr d_gtk_radio_tool_button_new_from_stock(IntPtr group, IntPtr stock_id); - static d_gtk_radio_tool_button_new_from_stock gtk_radio_tool_button_new_from_stock = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_tool_button_new_from_stock")); + static d_gtk_radio_tool_button_new_from_stock gtk_radio_tool_button_new_from_stock = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_tool_button_new_from_stock")); public RadioToolButton (RadioToolButton[] group, string stock_id) : base (IntPtr.Zero) { @@ -73,10 +73,10 @@ namespace Gtk { } delegate IntPtr d_gtk_radio_tool_button_get_group(IntPtr raw); - static d_gtk_radio_tool_button_get_group gtk_radio_tool_button_get_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_tool_button_get_group")); + static d_gtk_radio_tool_button_get_group gtk_radio_tool_button_get_group = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_tool_button_get_group")); delegate void d_gtk_radio_tool_button_set_group(IntPtr raw, IntPtr list); - static d_gtk_radio_tool_button_set_group gtk_radio_tool_button_set_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_tool_button_set_group")); + static d_gtk_radio_tool_button_set_group gtk_radio_tool_button_set_group = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_tool_button_set_group")); [GLib.Property ("group")] public RadioToolButton[] Group { diff --git a/Source/Libs/GtkSharp/SelectionData.cs b/Source/Libs/GtkSharp/SelectionData.cs index 6a29b4371..24e75da7a 100755 --- a/Source/Libs/GtkSharp/SelectionData.cs +++ b/Source/Libs/GtkSharp/SelectionData.cs @@ -26,10 +26,10 @@ namespace Gtk { public partial class SelectionData { delegate IntPtr d_gtk_selection_data_get_text(IntPtr selection_data); - static d_gtk_selection_data_get_text gtk_selection_data_get_text = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_selection_data_get_text")); + static d_gtk_selection_data_get_text gtk_selection_data_get_text = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_selection_data_get_text")); delegate void d_gtk_selection_data_set_text(IntPtr selection_data, IntPtr str, int len); - static d_gtk_selection_data_set_text gtk_selection_data_set_text = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_selection_data_set_text")); + static d_gtk_selection_data_set_text gtk_selection_data_set_text = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_selection_data_set_text")); public string Text { get { @@ -46,7 +46,7 @@ namespace Gtk { } delegate IntPtr d_gtk_selection_data_get_data(IntPtr selection_data); - static d_gtk_selection_data_get_data gtk_selection_data_get_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_selection_data_get_data")); + static d_gtk_selection_data_get_data gtk_selection_data_get_data = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_selection_data_get_data")); public byte[] Data { get { @@ -62,7 +62,7 @@ namespace Gtk { } delegate bool d_gtk_selection_data_get_targets(IntPtr raw, out IntPtr targets, out int n_atoms); - static d_gtk_selection_data_get_targets gtk_selection_data_get_targets = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_selection_data_get_targets")); + static d_gtk_selection_data_get_targets gtk_selection_data_get_targets = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_selection_data_get_targets")); public Gdk.Atom [] Targets { get { diff --git a/Source/Libs/GtkSharp/SpinButton.cs b/Source/Libs/GtkSharp/SpinButton.cs index af2f84e70..6ab8b75e5 100755 --- a/Source/Libs/GtkSharp/SpinButton.cs +++ b/Source/Libs/GtkSharp/SpinButton.cs @@ -27,7 +27,7 @@ namespace Gtk { public partial class SpinButton { delegate IntPtr d_gtk_spin_button_new_with_range(double min, double max, double step); - static d_gtk_spin_button_new_with_range gtk_spin_button_new_with_range = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_spin_button_new_with_range")); + static d_gtk_spin_button_new_with_range gtk_spin_button_new_with_range = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_spin_button_new_with_range")); public SpinButton (double min, double max, double step) : base (IntPtr.Zero) { diff --git a/Source/Libs/GtkSharp/StatusIcon.cs b/Source/Libs/GtkSharp/StatusIcon.cs index b0ba2febd..4dd8da25e 100755 --- a/Source/Libs/GtkSharp/StatusIcon.cs +++ b/Source/Libs/GtkSharp/StatusIcon.cs @@ -39,7 +39,7 @@ namespace Gtk { static MenuPositionFuncNative StatusIconPositionMenuFunc = null; delegate void d_gtk_menu_popup(IntPtr menu, IntPtr parent_menu_shell, IntPtr parent_menu_item, MenuPositionFuncNative func, IntPtr data, uint button, uint activate_time); - static d_gtk_menu_popup gtk_menu_popup = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_menu_popup")); + static d_gtk_menu_popup gtk_menu_popup = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_menu_popup")); public void PresentMenu (Menu menu, uint button, uint activate_time) { @@ -85,7 +85,7 @@ namespace Gtk { } delegate bool d_gtk_status_icon_get_geometry(IntPtr raw, out IntPtr screen, IntPtr area, out int orientation); - static d_gtk_status_icon_get_geometry gtk_status_icon_get_geometry = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_status_icon_get_geometry")); + static d_gtk_status_icon_get_geometry gtk_status_icon_get_geometry = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_status_icon_get_geometry")); public bool GetGeometry(out Gdk.Screen screen, out Gdk.Rectangle area, out Gtk.Orientation orientation) { diff --git a/Source/Libs/GtkSharp/Stock.cs b/Source/Libs/GtkSharp/Stock.cs index ff1d1cd2a..7979acd2b 100755 --- a/Source/Libs/GtkSharp/Stock.cs +++ b/Source/Libs/GtkSharp/Stock.cs @@ -26,7 +26,7 @@ namespace Gtk { public partial class Stock { delegate IntPtr d_gtk_stock_list_ids(); - static d_gtk_stock_list_ids gtk_stock_list_ids = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_stock_list_ids")); + static d_gtk_stock_list_ids gtk_stock_list_ids = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_stock_list_ids")); public static string[] ListIds () { @@ -50,7 +50,7 @@ namespace Gtk { } delegate bool d_gtk_stock_lookup(IntPtr stock_id, out ConstStockItem item); - static d_gtk_stock_lookup gtk_stock_lookup = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_stock_lookup")); + static d_gtk_stock_lookup gtk_stock_lookup = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_stock_lookup")); public static Gtk.StockItem Lookup (string stock_id) { ConstStockItem const_item; diff --git a/Source/Libs/GtkSharp/StockManager.cs b/Source/Libs/GtkSharp/StockManager.cs index de08a9b79..9e9a04213 100755 --- a/Source/Libs/GtkSharp/StockManager.cs +++ b/Source/Libs/GtkSharp/StockManager.cs @@ -27,7 +27,7 @@ namespace Gtk { public class StockManager { delegate void d_gtk_stock_add_static(ref Gtk.StockItem items, uint n_items); - static d_gtk_stock_add_static gtk_stock_add_static = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_stock_add_static")); + static d_gtk_stock_add_static gtk_stock_add_static = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_stock_add_static")); [Obsolete ("Use StockManager.Add instead")] public static void AddStatic(Gtk.StockItem items, uint n_items) @@ -56,7 +56,7 @@ namespace Gtk { } delegate bool d_gtk_stock_lookup(IntPtr stock_id, out ConstStockItem item); - static d_gtk_stock_lookup gtk_stock_lookup = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_stock_lookup")); + static d_gtk_stock_lookup gtk_stock_lookup = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_stock_lookup")); public static bool Lookup (string stock_id, ref Gtk.StockItem item) { @@ -77,10 +77,10 @@ namespace Gtk { } delegate void d_gtk_stock_add(ref Gtk.StockItem item, uint n_items); - static d_gtk_stock_add gtk_stock_add = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_stock_add")); + static d_gtk_stock_add gtk_stock_add = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_stock_add")); delegate void d_gtk_stock_add2(Gtk.StockItem[] items, uint n_items); - static d_gtk_stock_add2 gtk_stock_add2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_stock_add")); + static d_gtk_stock_add2 gtk_stock_add2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_stock_add")); [Obsolete ("Use the StockItem or StockItem[] overload instead.")] public static void Add (Gtk.StockItem items, uint n_items) diff --git a/Source/Libs/GtkSharp/Target.cs b/Source/Libs/GtkSharp/Target.cs index 522749d2f..6087c6a21 100755 --- a/Source/Libs/GtkSharp/Target.cs +++ b/Source/Libs/GtkSharp/Target.cs @@ -26,7 +26,7 @@ namespace Gtk { public partial class Target { delegate IntPtr d_gtk_target_table_new_from_list(IntPtr list, out int n_targets); - static d_gtk_target_table_new_from_list gtk_target_table_new_from_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_target_table_new_from_list")); + static d_gtk_target_table_new_from_list gtk_target_table_new_from_list = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_target_table_new_from_list")); public static Gtk.TargetEntry[] TableNewFromList(Gtk.TargetList list) { int n_targets; diff --git a/Source/Libs/GtkSharp/TargetList.cs b/Source/Libs/GtkSharp/TargetList.cs index e6da69cad..9ed8c9dab 100755 --- a/Source/Libs/GtkSharp/TargetList.cs +++ b/Source/Libs/GtkSharp/TargetList.cs @@ -24,7 +24,7 @@ namespace Gtk { public partial class TargetList { delegate IntPtr d_gtk_target_list_new(Gtk.TargetEntry[] targets, uint n_targets); - static d_gtk_target_list_new gtk_target_list_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_target_list_new")); + static d_gtk_target_list_new gtk_target_list_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_target_list_new")); public TargetList() : base(gtk_target_list_new(null, 0)) {} diff --git a/Source/Libs/GtkSharp/TextBuffer.cs b/Source/Libs/GtkSharp/TextBuffer.cs index c4c5ffbb0..baa204762 100755 --- a/Source/Libs/GtkSharp/TextBuffer.cs +++ b/Source/Libs/GtkSharp/TextBuffer.cs @@ -26,7 +26,7 @@ namespace Gtk { public partial class TextBuffer { delegate void d_gtk_text_buffer_set_text(IntPtr raw, IntPtr text, int len); - static d_gtk_text_buffer_set_text gtk_text_buffer_set_text = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_buffer_set_text")); + static d_gtk_text_buffer_set_text gtk_text_buffer_set_text = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_buffer_set_text")); public void Clear () { @@ -47,7 +47,7 @@ namespace Gtk { } delegate void d_gtk_text_buffer_insert(IntPtr raw, ref Gtk.TextIter iter, IntPtr text, int len); - static d_gtk_text_buffer_insert gtk_text_buffer_insert = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_buffer_insert")); + static d_gtk_text_buffer_insert gtk_text_buffer_insert = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_buffer_insert")); [Obsolete ("Replaced by 'ref TextIter iter' overload")] public void Insert (TextIter iter, string text) @@ -110,7 +110,7 @@ namespace Gtk { } delegate bool d_gtk_text_buffer_insert_interactive(IntPtr raw, ref Gtk.TextIter iter, IntPtr text, int len, bool default_editable); - static d_gtk_text_buffer_insert_interactive gtk_text_buffer_insert_interactive = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_buffer_insert_interactive")); + static d_gtk_text_buffer_insert_interactive gtk_text_buffer_insert_interactive = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_buffer_insert_interactive")); public bool InsertInteractive(ref Gtk.TextIter iter, string text, bool default_editable) { @@ -121,7 +121,7 @@ namespace Gtk { } delegate bool d_gtk_text_buffer_insert_interactive_at_cursor(IntPtr raw, IntPtr text, int len, bool default_editable); - static d_gtk_text_buffer_insert_interactive_at_cursor gtk_text_buffer_insert_interactive_at_cursor = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_buffer_insert_interactive_at_cursor")); + static d_gtk_text_buffer_insert_interactive_at_cursor gtk_text_buffer_insert_interactive_at_cursor = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_buffer_insert_interactive_at_cursor")); public bool InsertInteractiveAtCursor(string text, bool default_editable) { @@ -132,7 +132,7 @@ namespace Gtk { } delegate void d_gtk_text_buffer_insert_at_cursor(IntPtr raw, IntPtr text, int len); - static d_gtk_text_buffer_insert_at_cursor gtk_text_buffer_insert_at_cursor = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_buffer_insert_at_cursor")); + static d_gtk_text_buffer_insert_at_cursor gtk_text_buffer_insert_at_cursor = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_buffer_insert_at_cursor")); public void InsertAtCursor(string text) { @@ -142,7 +142,7 @@ namespace Gtk { } delegate IntPtr d_gtk_text_buffer_serialize(IntPtr raw, IntPtr content_buffer, IntPtr format, ref Gtk.TextIter start, ref Gtk.TextIter end, out UIntPtr length); - static d_gtk_text_buffer_serialize gtk_text_buffer_serialize = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_buffer_serialize")); + static d_gtk_text_buffer_serialize gtk_text_buffer_serialize = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_buffer_serialize")); public byte[] Serialize(Gtk.TextBuffer content_buffer, Gdk.Atom format, Gtk.TextIter start, Gtk.TextIter end) { @@ -157,10 +157,10 @@ namespace Gtk { } delegate IntPtr d_gtk_text_buffer_get_serialize_formats(IntPtr raw, out int n_formats); - static d_gtk_text_buffer_get_serialize_formats gtk_text_buffer_get_serialize_formats = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_buffer_get_serialize_formats")); + static d_gtk_text_buffer_get_serialize_formats gtk_text_buffer_get_serialize_formats = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_buffer_get_serialize_formats")); delegate IntPtr d_gtk_text_buffer_get_deserialize_formats(IntPtr raw, out int n_formats); - static d_gtk_text_buffer_get_deserialize_formats gtk_text_buffer_get_deserialize_formats = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_buffer_get_deserialize_formats")); + static d_gtk_text_buffer_get_deserialize_formats gtk_text_buffer_get_deserialize_formats = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_buffer_get_deserialize_formats")); public Gdk.Atom[] DeserializeFormats { get { diff --git a/Source/Libs/GtkSharp/TextChildAnchor.cs b/Source/Libs/GtkSharp/TextChildAnchor.cs index 3e97a9a73..2cc014f64 100755 --- a/Source/Libs/GtkSharp/TextChildAnchor.cs +++ b/Source/Libs/GtkSharp/TextChildAnchor.cs @@ -26,7 +26,7 @@ namespace Gtk { public partial class TextChildAnchor { delegate IntPtr d_gtk_text_child_anchor_get_widgets(IntPtr raw); - static d_gtk_text_child_anchor_get_widgets gtk_text_child_anchor_get_widgets = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_child_anchor_get_widgets")); + static d_gtk_text_child_anchor_get_widgets gtk_text_child_anchor_get_widgets = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_child_anchor_get_widgets")); public Widget[] Widgets { get { diff --git a/Source/Libs/GtkSharp/TextIter.cs b/Source/Libs/GtkSharp/TextIter.cs index 0bcbc8c6f..8430dc5b7 100755 --- a/Source/Libs/GtkSharp/TextIter.cs +++ b/Source/Libs/GtkSharp/TextIter.cs @@ -26,7 +26,7 @@ namespace Gtk { public partial struct TextIter { delegate uint d_gtk_text_iter_get_char(ref Gtk.TextIter raw); - static d_gtk_text_iter_get_char gtk_text_iter_get_char = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_iter_get_char")); + static d_gtk_text_iter_get_char gtk_text_iter_get_char = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_iter_get_char")); public string Char { get { @@ -35,7 +35,7 @@ namespace Gtk { } delegate IntPtr d_gtk_text_iter_get_marks(ref TextIter iter); - static d_gtk_text_iter_get_marks gtk_text_iter_get_marks = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_iter_get_marks")); + static d_gtk_text_iter_get_marks gtk_text_iter_get_marks = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_iter_get_marks")); public TextMark[] Marks { get { @@ -51,7 +51,7 @@ namespace Gtk { } delegate IntPtr d_gtk_text_iter_get_tags(ref TextIter iter); - static d_gtk_text_iter_get_tags gtk_text_iter_get_tags = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_iter_get_tags")); + static d_gtk_text_iter_get_tags gtk_text_iter_get_tags = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_iter_get_tags")); public TextTag[] Tags { get { @@ -67,7 +67,7 @@ namespace Gtk { } delegate IntPtr d_gtk_text_iter_get_toggled_tags(ref TextIter iter, bool toggled_on); - static d_gtk_text_iter_get_toggled_tags gtk_text_iter_get_toggled_tags = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_iter_get_toggled_tags")); + static d_gtk_text_iter_get_toggled_tags gtk_text_iter_get_toggled_tags = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_iter_get_toggled_tags")); public TextTag[] GetToggledTags (bool toggled_on) { diff --git a/Source/Libs/GtkSharp/TextView.cs b/Source/Libs/GtkSharp/TextView.cs index 301c925d3..6519762ce 100755 --- a/Source/Libs/GtkSharp/TextView.cs +++ b/Source/Libs/GtkSharp/TextView.cs @@ -27,7 +27,7 @@ namespace Gtk { public partial class TextView { delegate IntPtr d_gtk_text_view_new_with_buffer(IntPtr buffer); - static d_gtk_text_view_new_with_buffer gtk_text_view_new_with_buffer = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_view_new_with_buffer")); + static d_gtk_text_view_new_with_buffer gtk_text_view_new_with_buffer = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_view_new_with_buffer")); public TextView (TextBuffer buffer) : base (IntPtr.Zero) { diff --git a/Source/Libs/GtkSharp/TreeModelAdapter.cs b/Source/Libs/GtkSharp/TreeModelAdapter.cs index bd87e0bb0..a8e616035 100755 --- a/Source/Libs/GtkSharp/TreeModelAdapter.cs +++ b/Source/Libs/GtkSharp/TreeModelAdapter.cs @@ -26,7 +26,7 @@ namespace Gtk { public partial class TreeModelAdapter { delegate bool d_gtk_tree_model_iter_children2(IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); - static d_gtk_tree_model_iter_children2 gtk_tree_model_iter_children2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_children")); + static d_gtk_tree_model_iter_children2 gtk_tree_model_iter_children2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_children")); public bool IterChildren (out Gtk.TreeIter iter) { bool raw_ret = gtk_tree_model_iter_children2 (Handle, out iter, IntPtr.Zero); bool ret = raw_ret; @@ -40,7 +40,7 @@ namespace Gtk { } delegate bool d_gtk_tree_model_iter_nth_child2(IntPtr raw, out Gtk.TreeIter iter, IntPtr parent, int n); - static d_gtk_tree_model_iter_nth_child2 gtk_tree_model_iter_nth_child2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_nth_child")); + static d_gtk_tree_model_iter_nth_child2 gtk_tree_model_iter_nth_child2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_nth_child")); public bool IterNthChild (out Gtk.TreeIter iter, int n) { bool raw_ret = gtk_tree_model_iter_nth_child2 (Handle, out iter, IntPtr.Zero, n); bool ret = raw_ret; diff --git a/Source/Libs/GtkSharp/TreeModelFilter.cs b/Source/Libs/GtkSharp/TreeModelFilter.cs index 029438ff5..2dd13fb6c 100755 --- a/Source/Libs/GtkSharp/TreeModelFilter.cs +++ b/Source/Libs/GtkSharp/TreeModelFilter.cs @@ -26,7 +26,7 @@ namespace Gtk { public partial class TreeModelFilter { delegate bool d_gtk_tree_model_iter_children2(IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); - static d_gtk_tree_model_iter_children2 gtk_tree_model_iter_children2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_children")); + static d_gtk_tree_model_iter_children2 gtk_tree_model_iter_children2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_children")); public bool IterChildren (out Gtk.TreeIter iter) { bool raw_ret = gtk_tree_model_iter_children2 (Handle, out iter, IntPtr.Zero); bool ret = raw_ret; @@ -40,7 +40,7 @@ namespace Gtk { } delegate bool d_gtk_tree_model_iter_nth_child2(IntPtr raw, out Gtk.TreeIter iter, IntPtr parent, int n); - static d_gtk_tree_model_iter_nth_child2 gtk_tree_model_iter_nth_child2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_nth_child")); + static d_gtk_tree_model_iter_nth_child2 gtk_tree_model_iter_nth_child2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_nth_child")); public bool IterNthChild (out Gtk.TreeIter iter, int n) { bool raw_ret = gtk_tree_model_iter_nth_child2 (Handle, out iter, IntPtr.Zero, n); bool ret = raw_ret; @@ -84,7 +84,7 @@ namespace Gtk { } delegate void d_gtk_tree_model_filter_set_modify_func(IntPtr raw, int n_columns, IntPtr[] types, GtkSharp.TreeModelFilterModifyFuncNative func, IntPtr data, GLib.DestroyNotify destroy); - static d_gtk_tree_model_filter_set_modify_func gtk_tree_model_filter_set_modify_func = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_filter_set_modify_func")); + static d_gtk_tree_model_filter_set_modify_func gtk_tree_model_filter_set_modify_func = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_filter_set_modify_func")); public void SetModifyFunc (int n_columns, GLib.GType[] types, TreeModelFilterModifyFunc func) { @@ -97,7 +97,7 @@ namespace Gtk { } delegate bool d_gtk_tree_model_filter_convert_child_iter_to_iter(IntPtr raw, out Gtk.TreeIter filter_iter, ref Gtk.TreeIter child_iter); - static d_gtk_tree_model_filter_convert_child_iter_to_iter gtk_tree_model_filter_convert_child_iter_to_iter = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_filter_convert_child_iter_to_iter")); + static d_gtk_tree_model_filter_convert_child_iter_to_iter gtk_tree_model_filter_convert_child_iter_to_iter = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_filter_convert_child_iter_to_iter")); public TreeIter ConvertChildIterToIter (Gtk.TreeIter child_iter) { diff --git a/Source/Libs/GtkSharp/TreeModelSort.cs b/Source/Libs/GtkSharp/TreeModelSort.cs index 77276b98a..6c4d0c0a1 100755 --- a/Source/Libs/GtkSharp/TreeModelSort.cs +++ b/Source/Libs/GtkSharp/TreeModelSort.cs @@ -26,7 +26,7 @@ namespace Gtk { public partial class TreeModelSort { delegate bool d_gtk_tree_model_iter_children2(IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); - static d_gtk_tree_model_iter_children2 gtk_tree_model_iter_children2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_children")); + static d_gtk_tree_model_iter_children2 gtk_tree_model_iter_children2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_children")); public bool IterChildren (out Gtk.TreeIter iter) { bool raw_ret = gtk_tree_model_iter_children2 (Handle, out iter, IntPtr.Zero); bool ret = raw_ret; @@ -40,7 +40,7 @@ namespace Gtk { } delegate bool d_gtk_tree_model_iter_nth_child2(IntPtr raw, out Gtk.TreeIter iter, IntPtr parent, int n); - static d_gtk_tree_model_iter_nth_child2 gtk_tree_model_iter_nth_child2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_nth_child")); + static d_gtk_tree_model_iter_nth_child2 gtk_tree_model_iter_nth_child2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_nth_child")); public bool IterNthChild (out Gtk.TreeIter iter, int n) { bool raw_ret = gtk_tree_model_iter_nth_child2 (Handle, out iter, IntPtr.Zero, n); bool ret = raw_ret; diff --git a/Source/Libs/GtkSharp/TreePath.cs b/Source/Libs/GtkSharp/TreePath.cs index f620ca733..e4c02e332 100755 --- a/Source/Libs/GtkSharp/TreePath.cs +++ b/Source/Libs/GtkSharp/TreePath.cs @@ -22,7 +22,7 @@ namespace Gtk { // Patch submitted by malte on bug #49518 delegate IntPtr d_gtk_tree_path_get_indices(IntPtr raw); - static d_gtk_tree_path_get_indices gtk_tree_path_get_indices = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_path_get_indices")); + static d_gtk_tree_path_get_indices gtk_tree_path_get_indices = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_path_get_indices")); public int [] Indices { get { diff --git a/Source/Libs/GtkSharp/TreeSelection.cs b/Source/Libs/GtkSharp/TreeSelection.cs index 2d8fb1cfa..edcbb512c 100755 --- a/Source/Libs/GtkSharp/TreeSelection.cs +++ b/Source/Libs/GtkSharp/TreeSelection.cs @@ -26,7 +26,7 @@ namespace Gtk { public partial class TreeSelection { delegate IntPtr d_gtk_tree_selection_get_selected_rows2(IntPtr raw, IntPtr model); - static d_gtk_tree_selection_get_selected_rows2 gtk_tree_selection_get_selected_rows2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_selection_get_selected_rows")); + static d_gtk_tree_selection_get_selected_rows2 gtk_tree_selection_get_selected_rows2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_selection_get_selected_rows")); public TreePath[] GetSelectedRows () { @@ -39,7 +39,7 @@ namespace Gtk { } delegate bool d_gtk_tree_selection_get_selected_without_model(IntPtr raw, IntPtr model, out Gtk.TreeIter iter); - static d_gtk_tree_selection_get_selected_without_model gtk_tree_selection_get_selected_without_model = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_selection_get_selected_without_model")); + static d_gtk_tree_selection_get_selected_without_model gtk_tree_selection_get_selected_without_model = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_selection_get_selected_without_model")); public bool GetSelected (out Gtk.TreeIter iter) { diff --git a/Source/Libs/GtkSharp/TreeStore.cs b/Source/Libs/GtkSharp/TreeStore.cs index 6164a47fe..0d99fe68e 100755 --- a/Source/Libs/GtkSharp/TreeStore.cs +++ b/Source/Libs/GtkSharp/TreeStore.cs @@ -28,10 +28,10 @@ namespace Gtk { public partial class TreeStore { delegate void d_gtk_tree_store_append(IntPtr raw, out TreeIter iter, ref TreeIter parent); - static d_gtk_tree_store_append gtk_tree_store_append = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_append")); + static d_gtk_tree_store_append gtk_tree_store_append = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_append")); delegate void d_gtk_tree_store_append2(IntPtr raw, out TreeIter iter, IntPtr parent); - static d_gtk_tree_store_append2 gtk_tree_store_append2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_append")); + static d_gtk_tree_store_append2 gtk_tree_store_append2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_append")); public TreeIter AppendNode () { @@ -48,10 +48,10 @@ namespace Gtk { } delegate void d_gtk_tree_store_insert(IntPtr raw, out TreeIter iter, ref TreeIter parent, int position); - static d_gtk_tree_store_insert gtk_tree_store_insert = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_insert")); + static d_gtk_tree_store_insert gtk_tree_store_insert = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_insert")); delegate void d_gtk_tree_store_insert2(IntPtr raw, out TreeIter iter, IntPtr parent, int position); - static d_gtk_tree_store_insert2 gtk_tree_store_insert2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_insert")); + static d_gtk_tree_store_insert2 gtk_tree_store_insert2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_insert")); public TreeIter InsertNode (TreeIter parent, int position) { @@ -68,10 +68,10 @@ namespace Gtk { } delegate void d_gtk_tree_store_prepend(IntPtr raw, out TreeIter iter, ref TreeIter parent); - static d_gtk_tree_store_prepend gtk_tree_store_prepend = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_prepend")); + static d_gtk_tree_store_prepend gtk_tree_store_prepend = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_prepend")); delegate void d_gtk_tree_store_prepend2(IntPtr raw, out TreeIter iter, IntPtr parent); - static d_gtk_tree_store_prepend2 gtk_tree_store_prepend2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_prepend")); + static d_gtk_tree_store_prepend2 gtk_tree_store_prepend2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_prepend")); public TreeIter PrependNode (TreeIter parent) { @@ -88,10 +88,10 @@ namespace Gtk { } delegate void d_gtk_tree_store_insert_before(IntPtr raw, out TreeIter iter, ref TreeIter parent, ref TreeIter sibling); - static d_gtk_tree_store_insert_before gtk_tree_store_insert_before = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_insert_before")); + static d_gtk_tree_store_insert_before gtk_tree_store_insert_before = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_insert_before")); delegate void d_gtk_tree_store_insert_before2(IntPtr raw, out TreeIter iter, IntPtr parent, ref TreeIter sibling); - static d_gtk_tree_store_insert_before2 gtk_tree_store_insert_before2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_insert_before")); + static d_gtk_tree_store_insert_before2 gtk_tree_store_insert_before2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_insert_before")); public TreeIter InsertNodeBefore (TreeIter sibling) { @@ -108,10 +108,10 @@ namespace Gtk { } delegate void d_gtk_tree_store_insert_after(IntPtr raw, out TreeIter iter, ref TreeIter parent, ref TreeIter sibling); - static d_gtk_tree_store_insert_after gtk_tree_store_insert_after = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_insert_after")); + static d_gtk_tree_store_insert_after gtk_tree_store_insert_after = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_insert_after")); delegate void d_gtk_tree_store_insert_after2(IntPtr raw, out TreeIter iter, IntPtr parent, ref TreeIter sibling); - static d_gtk_tree_store_insert_after2 gtk_tree_store_insert_after2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_insert_after")); + static d_gtk_tree_store_insert_after2 gtk_tree_store_insert_after2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_insert_after")); public TreeIter InsertNodeAfter (TreeIter sibling) { @@ -128,7 +128,7 @@ namespace Gtk { } delegate bool d_gtk_tree_model_iter_children2(IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); - static d_gtk_tree_model_iter_children2 gtk_tree_model_iter_children2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_children")); + static d_gtk_tree_model_iter_children2 gtk_tree_model_iter_children2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_children")); public bool IterChildren (out Gtk.TreeIter iter) { bool raw_ret = gtk_tree_model_iter_children2 (Handle, out iter, IntPtr.Zero); bool ret = raw_ret; @@ -142,7 +142,7 @@ namespace Gtk { } delegate bool d_gtk_tree_model_iter_nth_child2(IntPtr raw, out Gtk.TreeIter iter, IntPtr parent, int n); - static d_gtk_tree_model_iter_nth_child2 gtk_tree_model_iter_nth_child2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_nth_child")); + static d_gtk_tree_model_iter_nth_child2 gtk_tree_model_iter_nth_child2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_nth_child")); public bool IterNthChild (out Gtk.TreeIter iter, int n) { bool raw_ret = gtk_tree_model_iter_nth_child2 (Handle, out iter, IntPtr.Zero, n); bool ret = raw_ret; @@ -223,10 +223,10 @@ namespace Gtk { } delegate void d_gtk_tree_store_insert_with_valuesv(IntPtr raw, out TreeIter iter, IntPtr parent, int position, int[] columns, GLib.Value[] values, int n_values); - static d_gtk_tree_store_insert_with_valuesv gtk_tree_store_insert_with_valuesv = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_insert_with_valuesv")); + static d_gtk_tree_store_insert_with_valuesv gtk_tree_store_insert_with_valuesv = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_insert_with_valuesv")); delegate void d_gtk_tree_store_insert_with_valuesv2(IntPtr raw, out TreeIter iter, ref TreeIter parent, int position, int[] columns, GLib.Value[] values, int n_values); - static d_gtk_tree_store_insert_with_valuesv2 gtk_tree_store_insert_with_valuesv2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_insert_with_valuesv")); + static d_gtk_tree_store_insert_with_valuesv2 gtk_tree_store_insert_with_valuesv2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_insert_with_valuesv")); public TreeIter InsertWithValues (int position, params object[] values) { @@ -265,7 +265,7 @@ namespace Gtk { } delegate void d_gtk_tree_store_set_valuesv(IntPtr raw, ref TreeIter iter, int[] columns, GLib.Value[] values, int n_values); - static d_gtk_tree_store_set_valuesv gtk_tree_store_set_valuesv = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_set_valuesv")); + static d_gtk_tree_store_set_valuesv gtk_tree_store_set_valuesv = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_set_valuesv")); public void SetValues (TreeIter iter, params object[] values) { diff --git a/Source/Libs/GtkSharp/TreeView.cs b/Source/Libs/GtkSharp/TreeView.cs index 7e0ed04b8..c150f9f73 100755 --- a/Source/Libs/GtkSharp/TreeView.cs +++ b/Source/Libs/GtkSharp/TreeView.cs @@ -49,10 +49,10 @@ namespace Gtk { */ delegate bool d_gtk_tree_view_get_path_at_pos(IntPtr raw, int x, int y, out IntPtr path, out IntPtr column, out int cell_x, out int cell_y); - static d_gtk_tree_view_get_path_at_pos gtk_tree_view_get_path_at_pos = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_view_get_path_at_pos")); + static d_gtk_tree_view_get_path_at_pos gtk_tree_view_get_path_at_pos = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_view_get_path_at_pos")); delegate bool d_gtk_tree_view_get_path_at_pos_intptr(IntPtr raw, int x, int y, out IntPtr path, out IntPtr column, IntPtr cell_x, IntPtr cell_y); - static d_gtk_tree_view_get_path_at_pos_intptr gtk_tree_view_get_path_at_pos_intptr = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_view_get_path_at_pos_intptr")); + static d_gtk_tree_view_get_path_at_pos_intptr gtk_tree_view_get_path_at_pos_intptr = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_view_get_path_at_pos_intptr")); public bool GetPathAtPos (int x, int y, out Gtk.TreePath path, out Gtk.TreeViewColumn column, out int cell_x, out int cell_y) { diff --git a/Source/Libs/GtkSharp/UIManager.cs b/Source/Libs/GtkSharp/UIManager.cs index 8a33aa315..e2738d3ad 100755 --- a/Source/Libs/GtkSharp/UIManager.cs +++ b/Source/Libs/GtkSharp/UIManager.cs @@ -38,7 +38,7 @@ namespace Gtk { } delegate uint d_gtk_ui_manager_new_merge_id(IntPtr raw); - static d_gtk_ui_manager_new_merge_id gtk_ui_manager_new_merge_id = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_ui_manager_new_merge_id")); + static d_gtk_ui_manager_new_merge_id gtk_ui_manager_new_merge_id = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_ui_manager_new_merge_id")); public uint NewMergeId () { @@ -46,7 +46,7 @@ namespace Gtk { } delegate IntPtr d_gtk_ui_manager_get_toplevels(IntPtr raw, int types); - static d_gtk_ui_manager_get_toplevels gtk_ui_manager_get_toplevels = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_ui_manager_get_toplevels")); + static d_gtk_ui_manager_get_toplevels gtk_ui_manager_get_toplevels = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_ui_manager_get_toplevels")); public Widget[] GetToplevels (Gtk.UIManagerItemType types) { IntPtr raw_ret = gtk_ui_manager_get_toplevels (Handle, (int) types); @@ -59,7 +59,7 @@ namespace Gtk { } delegate IntPtr d_gtk_ui_manager_get_action_groups(IntPtr raw); - static d_gtk_ui_manager_get_action_groups gtk_ui_manager_get_action_groups = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_ui_manager_get_action_groups")); + static d_gtk_ui_manager_get_action_groups gtk_ui_manager_get_action_groups = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_ui_manager_get_action_groups")); public ActionGroup[] ActionGroups { get { diff --git a/Source/Libs/GtkSharp/VScale.cs b/Source/Libs/GtkSharp/VScale.cs index 35a9cec82..761bcad34 100755 --- a/Source/Libs/GtkSharp/VScale.cs +++ b/Source/Libs/GtkSharp/VScale.cs @@ -26,7 +26,7 @@ namespace Gtk { public partial class VScale { delegate IntPtr d_gtk_vscale_new_with_range(double min, double max, double step); - static d_gtk_vscale_new_with_range gtk_vscale_new_with_range = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_vscale_new_with_range")); + static d_gtk_vscale_new_with_range gtk_vscale_new_with_range = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_vscale_new_with_range")); public VScale (double min, double max, double step) : base (IntPtr.Zero) { diff --git a/Source/Libs/GtkSharp/Widget.cs b/Source/Libs/GtkSharp/Widget.cs index 7d61477ef..ee40c215a 100755 --- a/Source/Libs/GtkSharp/Widget.cs +++ b/Source/Libs/GtkSharp/Widget.cs @@ -59,10 +59,10 @@ namespace Gtk { delegate void ClosureMarshal (IntPtr closure, IntPtr return_val, uint n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data); delegate IntPtr d_g_closure_new_simple(int closure_size, IntPtr dummy); - static d_g_closure_new_simple g_closure_new_simple = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_closure_new_simple")); + static d_g_closure_new_simple g_closure_new_simple = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_closure_new_simple")); delegate void d_g_closure_set_marshal(IntPtr closure, ClosureMarshal marshaler); - static d_g_closure_set_marshal g_closure_set_marshal = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_closure_set_marshal")); + static d_g_closure_set_marshal g_closure_set_marshal = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_closure_set_marshal")); static IntPtr CreateClosure (ClosureMarshal marshaler) { IntPtr raw_closure = g_closure_new_simple (Marshal.SizeOf (typeof (GClosure)), IntPtr.Zero); @@ -71,7 +71,7 @@ namespace Gtk { } delegate uint d_g_signal_newv(IntPtr signal_name, IntPtr gtype, GLib.Signal.Flags signal_flags, IntPtr closure, IntPtr accumulator, IntPtr accu_data, IntPtr c_marshaller, IntPtr return_type, uint n_params, [MarshalAs (UnmanagedType.LPArray)] IntPtr[] param_types); - static d_g_signal_newv g_signal_newv = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_newv")); + static d_g_signal_newv g_signal_newv = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_newv")); static uint RegisterSignal (string signal_name, GLib.GType gtype, GLib.Signal.Flags signal_flags, GLib.GType return_type, GLib.GType[] param_types, ClosureMarshal marshaler) { @@ -171,10 +171,10 @@ namespace Gtk { } delegate IntPtr d_gtk_binding_set_by_class(IntPtr class_ptr); - static d_gtk_binding_set_by_class gtk_binding_set_by_class = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_binding_set_by_class")); + static d_gtk_binding_set_by_class gtk_binding_set_by_class = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_binding_set_by_class")); delegate void d_gtk_binding_entry_add_signall(IntPtr binding_set, uint keyval, Gdk.ModifierType modifiers, IntPtr signal_name, IntPtr binding_args); - static d_gtk_binding_entry_add_signall gtk_binding_entry_add_signall = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_binding_entry_add_signall")); + static d_gtk_binding_entry_add_signall gtk_binding_entry_add_signall = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_binding_entry_add_signall")); [StructLayout(LayoutKind.Sequential)] struct GtkBindingArg { @@ -243,10 +243,10 @@ namespace Gtk { } delegate IntPtr d_gtk_widget_class_find_style_property(IntPtr class_ptr, IntPtr property_name); - static d_gtk_widget_class_find_style_property gtk_widget_class_find_style_property = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_widget_class_find_style_property")); + static d_gtk_widget_class_find_style_property gtk_widget_class_find_style_property = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_widget_class_find_style_property")); delegate IntPtr d_gtk_widget_style_get_property(IntPtr inst, IntPtr property_name, ref GLib.Value value); - static d_gtk_widget_style_get_property gtk_widget_style_get_property = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_widget_style_get_property")); + static d_gtk_widget_style_get_property gtk_widget_style_get_property = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_widget_style_get_property")); internal GLib.Value StyleGetPropertyValue (string property_name) { @@ -265,7 +265,7 @@ namespace Gtk { } delegate IntPtr d_gtk_widget_list_mnemonic_labels(IntPtr raw); - static d_gtk_widget_list_mnemonic_labels gtk_widget_list_mnemonic_labels = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_widget_list_mnemonic_labels")); + static d_gtk_widget_list_mnemonic_labels gtk_widget_list_mnemonic_labels = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_widget_list_mnemonic_labels")); public Widget[] ListMnemonicLabels () { @@ -407,7 +407,7 @@ namespace Gtk { } delegate void d_gtk_widget_destroy(IntPtr raw); - static d_gtk_widget_destroy gtk_widget_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_widget_destroy")); + static d_gtk_widget_destroy gtk_widget_destroy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_widget_destroy")); public virtual void Destroy () { diff --git a/Source/Libs/GtkSharp/Window.cs b/Source/Libs/GtkSharp/Window.cs index f224629b5..fcec117f6 100755 --- a/Source/Libs/GtkSharp/Window.cs +++ b/Source/Libs/GtkSharp/Window.cs @@ -32,10 +32,10 @@ namespace Gtk { } delegate IntPtr d_gtk_window_get_default_icon_list(); - static d_gtk_window_get_default_icon_list gtk_window_get_default_icon_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_window_get_default_icon_list")); + static d_gtk_window_get_default_icon_list gtk_window_get_default_icon_list = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_window_get_default_icon_list")); delegate void d_gtk_window_set_default_icon_list(IntPtr list); - static d_gtk_window_set_default_icon_list gtk_window_set_default_icon_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_window_set_default_icon_list")); + static d_gtk_window_set_default_icon_list gtk_window_set_default_icon_list = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_window_set_default_icon_list")); public static Gdk.Pixbuf[] DefaultIconList { get { @@ -57,10 +57,10 @@ namespace Gtk { } delegate IntPtr d_gtk_window_get_icon_list(IntPtr raw); - static d_gtk_window_get_icon_list gtk_window_get_icon_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_window_get_icon_list")); + static d_gtk_window_get_icon_list gtk_window_get_icon_list = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_window_get_icon_list")); delegate void d_gtk_window_set_icon_list(IntPtr raw, IntPtr list); - static d_gtk_window_set_icon_list gtk_window_set_icon_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_window_set_icon_list")); + static d_gtk_window_set_icon_list gtk_window_set_icon_list = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_window_set_icon_list")); public Gdk.Pixbuf[] IconList { get { diff --git a/Source/Libs/PangoSharp/AttrBackground.cs b/Source/Libs/PangoSharp/AttrBackground.cs index 3015c083d..31a52ee60 100755 --- a/Source/Libs/PangoSharp/AttrBackground.cs +++ b/Source/Libs/PangoSharp/AttrBackground.cs @@ -24,7 +24,7 @@ namespace Pango { public class AttrBackground : Attribute { delegate IntPtr d_pango_attr_background_new(ushort red, ushort green, ushort blue); - static d_pango_attr_background_new pango_attr_background_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_background_new")); + static d_pango_attr_background_new pango_attr_background_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_background_new")); public AttrBackground (ushort red, ushort green, ushort blue) : this (pango_attr_background_new (red, green, blue)) {} diff --git a/Source/Libs/PangoSharp/AttrFallback.cs b/Source/Libs/PangoSharp/AttrFallback.cs index 7a5f2be7c..61e7f8bdf 100755 --- a/Source/Libs/PangoSharp/AttrFallback.cs +++ b/Source/Libs/PangoSharp/AttrFallback.cs @@ -24,7 +24,7 @@ namespace Pango { public class AttrFallback : Attribute { delegate IntPtr d_pango_attr_fallback_new(bool fallback); - static d_pango_attr_fallback_new pango_attr_fallback_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_fallback_new")); + static d_pango_attr_fallback_new pango_attr_fallback_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_fallback_new")); public AttrFallback (bool fallback) : this (pango_attr_fallback_new (fallback)) {} diff --git a/Source/Libs/PangoSharp/AttrFamily.cs b/Source/Libs/PangoSharp/AttrFamily.cs index cc77fc305..ddf688f2c 100755 --- a/Source/Libs/PangoSharp/AttrFamily.cs +++ b/Source/Libs/PangoSharp/AttrFamily.cs @@ -24,7 +24,7 @@ namespace Pango { public class AttrFamily : Attribute { delegate IntPtr d_pango_attr_family_new(IntPtr family); - static d_pango_attr_family_new pango_attr_family_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_family_new")); + static d_pango_attr_family_new pango_attr_family_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_family_new")); public AttrFamily (string family) : base (NewAttrFamily (family)) {} diff --git a/Source/Libs/PangoSharp/AttrFontDesc.cs b/Source/Libs/PangoSharp/AttrFontDesc.cs index 00e2a3361..22334dbca 100755 --- a/Source/Libs/PangoSharp/AttrFontDesc.cs +++ b/Source/Libs/PangoSharp/AttrFontDesc.cs @@ -24,10 +24,10 @@ namespace Pango { public class AttrFontDesc : Attribute { delegate IntPtr d_pango_attr_font_desc_new(IntPtr font_desc); - static d_pango_attr_font_desc_new pango_attr_font_desc_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_font_desc_new")); + static d_pango_attr_font_desc_new pango_attr_font_desc_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_font_desc_new")); delegate IntPtr d_pango_font_description_copy(IntPtr raw); - static d_pango_font_description_copy pango_font_description_copy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_copy")); + static d_pango_font_description_copy pango_font_description_copy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_copy")); public AttrFontDesc (Pango.FontDescription font_desc) : this (pango_attr_font_desc_new (pango_font_description_copy (font_desc.Handle))) {} diff --git a/Source/Libs/PangoSharp/AttrForeground.cs b/Source/Libs/PangoSharp/AttrForeground.cs index c02b3ea4c..788db2573 100755 --- a/Source/Libs/PangoSharp/AttrForeground.cs +++ b/Source/Libs/PangoSharp/AttrForeground.cs @@ -24,7 +24,7 @@ namespace Pango { public class AttrForeground : Attribute { delegate IntPtr d_pango_attr_foreground_new(ushort red, ushort green, ushort blue); - static d_pango_attr_foreground_new pango_attr_foreground_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_foreground_new")); + static d_pango_attr_foreground_new pango_attr_foreground_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_foreground_new")); public AttrForeground (ushort red, ushort green, ushort blue) : this (pango_attr_foreground_new (red, green, blue)) {} diff --git a/Source/Libs/PangoSharp/AttrGravity.cs b/Source/Libs/PangoSharp/AttrGravity.cs index 5a5beadec..bcb9b2fa5 100755 --- a/Source/Libs/PangoSharp/AttrGravity.cs +++ b/Source/Libs/PangoSharp/AttrGravity.cs @@ -24,7 +24,7 @@ namespace Pango { public class AttrGravity : Attribute { delegate IntPtr d_pango_attr_gravity_new(int gravity); - static d_pango_attr_gravity_new pango_attr_gravity_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_gravity_new")); + static d_pango_attr_gravity_new pango_attr_gravity_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_gravity_new")); public AttrGravity (Gravity gravity) : this (pango_attr_gravity_new ((int) gravity)) {} diff --git a/Source/Libs/PangoSharp/AttrGravityHint.cs b/Source/Libs/PangoSharp/AttrGravityHint.cs index be22d62f6..d734bc500 100755 --- a/Source/Libs/PangoSharp/AttrGravityHint.cs +++ b/Source/Libs/PangoSharp/AttrGravityHint.cs @@ -24,7 +24,7 @@ namespace Pango { public class AttrGravityHint : Attribute { delegate IntPtr d_pango_attr_gravity_hint_new(int hint); - static d_pango_attr_gravity_hint_new pango_attr_gravity_hint_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_gravity_hint_new")); + static d_pango_attr_gravity_hint_new pango_attr_gravity_hint_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_gravity_hint_new")); public AttrGravityHint (GravityHint hint) : this (pango_attr_gravity_hint_new ((int) hint)) {} diff --git a/Source/Libs/PangoSharp/AttrIterator.cs b/Source/Libs/PangoSharp/AttrIterator.cs index fa94ccd17..9537276ca 100755 --- a/Source/Libs/PangoSharp/AttrIterator.cs +++ b/Source/Libs/PangoSharp/AttrIterator.cs @@ -26,7 +26,7 @@ namespace Pango { public partial class AttrIterator { delegate void d_pango_attr_iterator_get_font(IntPtr raw, IntPtr desc, out IntPtr language, out IntPtr extra_attrs); - static d_pango_attr_iterator_get_font pango_attr_iterator_get_font = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_iterator_get_font")); + static d_pango_attr_iterator_get_font pango_attr_iterator_get_font = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_iterator_get_font")); public void GetFont (out Pango.FontDescription desc, out Pango.Language language, out Pango.Attribute[] extra_attrs) { @@ -47,7 +47,7 @@ namespace Pango { } delegate IntPtr d_pango_attr_iterator_get_attrs(IntPtr raw); - static d_pango_attr_iterator_get_attrs pango_attr_iterator_get_attrs = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_iterator_get_attrs")); + static d_pango_attr_iterator_get_attrs pango_attr_iterator_get_attrs = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_iterator_get_attrs")); public Pango.Attribute[] Attrs { get { diff --git a/Source/Libs/PangoSharp/AttrLanguage.cs b/Source/Libs/PangoSharp/AttrLanguage.cs index e92159a87..248f08e9f 100755 --- a/Source/Libs/PangoSharp/AttrLanguage.cs +++ b/Source/Libs/PangoSharp/AttrLanguage.cs @@ -24,7 +24,7 @@ namespace Pango { public class AttrLanguage : Attribute { delegate IntPtr d_pango_attr_language_new(IntPtr language); - static d_pango_attr_language_new pango_attr_language_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_language_new")); + static d_pango_attr_language_new pango_attr_language_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_language_new")); public AttrLanguage (Pango.Language language) : this (pango_attr_language_new (language.Handle)) {} diff --git a/Source/Libs/PangoSharp/AttrLetterSpacing.cs b/Source/Libs/PangoSharp/AttrLetterSpacing.cs index e1b41595a..3a68ea5ec 100755 --- a/Source/Libs/PangoSharp/AttrLetterSpacing.cs +++ b/Source/Libs/PangoSharp/AttrLetterSpacing.cs @@ -24,7 +24,7 @@ namespace Pango { public class AttrLetterSpacing : Attribute { delegate IntPtr d_pango_attr_letter_spacing_new(int letter_spacing); - static d_pango_attr_letter_spacing_new pango_attr_letter_spacing_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_letter_spacing_new")); + static d_pango_attr_letter_spacing_new pango_attr_letter_spacing_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_letter_spacing_new")); public AttrLetterSpacing (int letter_spacing) : this (pango_attr_letter_spacing_new (letter_spacing)) {} diff --git a/Source/Libs/PangoSharp/AttrList.cs b/Source/Libs/PangoSharp/AttrList.cs index 486aa3963..0a420da8b 100755 --- a/Source/Libs/PangoSharp/AttrList.cs +++ b/Source/Libs/PangoSharp/AttrList.cs @@ -26,10 +26,10 @@ namespace Pango { public partial class AttrList { delegate IntPtr d_pango_attribute_copy(IntPtr raw); - static d_pango_attribute_copy pango_attribute_copy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attribute_copy")); + static d_pango_attribute_copy pango_attribute_copy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attribute_copy")); delegate void d_pango_attr_list_insert(IntPtr raw, IntPtr attr); - static d_pango_attr_list_insert pango_attr_list_insert = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_list_insert")); + static d_pango_attr_list_insert pango_attr_list_insert = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_list_insert")); public void Insert (Pango.Attribute attr) { @@ -37,7 +37,7 @@ namespace Pango { } delegate void d_pango_attr_list_insert_before(IntPtr raw, IntPtr attr); - static d_pango_attr_list_insert_before pango_attr_list_insert_before = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_list_insert_before")); + static d_pango_attr_list_insert_before pango_attr_list_insert_before = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_list_insert_before")); public void InsertBefore (Pango.Attribute attr) { diff --git a/Source/Libs/PangoSharp/AttrRise.cs b/Source/Libs/PangoSharp/AttrRise.cs index 4e6574632..b1db9fb9f 100755 --- a/Source/Libs/PangoSharp/AttrRise.cs +++ b/Source/Libs/PangoSharp/AttrRise.cs @@ -24,7 +24,7 @@ namespace Pango { public class AttrRise : Attribute { delegate IntPtr d_pango_attr_rise_new(int rise); - static d_pango_attr_rise_new pango_attr_rise_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_rise_new")); + static d_pango_attr_rise_new pango_attr_rise_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_rise_new")); public AttrRise (int rise) : this (pango_attr_rise_new (rise)) {} diff --git a/Source/Libs/PangoSharp/AttrScale.cs b/Source/Libs/PangoSharp/AttrScale.cs index 666381342..8f5065ec0 100755 --- a/Source/Libs/PangoSharp/AttrScale.cs +++ b/Source/Libs/PangoSharp/AttrScale.cs @@ -24,7 +24,7 @@ namespace Pango { public class AttrScale : Attribute { delegate IntPtr d_pango_attr_scale_new(double scale); - static d_pango_attr_scale_new pango_attr_scale_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_scale_new")); + static d_pango_attr_scale_new pango_attr_scale_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_scale_new")); public AttrScale (double scale) : this (pango_attr_scale_new (scale)) {} diff --git a/Source/Libs/PangoSharp/AttrShape.cs b/Source/Libs/PangoSharp/AttrShape.cs index a86ad2b59..272aa216e 100755 --- a/Source/Libs/PangoSharp/AttrShape.cs +++ b/Source/Libs/PangoSharp/AttrShape.cs @@ -24,7 +24,7 @@ namespace Pango { public class AttrShape : Attribute { delegate IntPtr d_pango_attr_shape_new(ref Pango.Rectangle ink_rect, ref Pango.Rectangle logical_rect); - static d_pango_attr_shape_new pango_attr_shape_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_shape_new")); + static d_pango_attr_shape_new pango_attr_shape_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_shape_new")); public AttrShape (Pango.Rectangle ink_rect, Pango.Rectangle logical_rect) : this (pango_attr_shape_new (ref ink_rect, ref logical_rect)) {} diff --git a/Source/Libs/PangoSharp/AttrSize.cs b/Source/Libs/PangoSharp/AttrSize.cs index f64512591..996dfc5c7 100755 --- a/Source/Libs/PangoSharp/AttrSize.cs +++ b/Source/Libs/PangoSharp/AttrSize.cs @@ -24,10 +24,10 @@ namespace Pango { public class AttrSize : Attribute { delegate IntPtr d_pango_attr_size_new(int size); - static d_pango_attr_size_new pango_attr_size_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_size_new")); + static d_pango_attr_size_new pango_attr_size_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_size_new")); delegate IntPtr d_pango_attr_size_new_absolute(int size); - static d_pango_attr_size_new_absolute pango_attr_size_new_absolute = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_size_new_absolute")); + static d_pango_attr_size_new_absolute pango_attr_size_new_absolute = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_size_new_absolute")); public AttrSize (int size) : this (pango_attr_size_new (size)) {} diff --git a/Source/Libs/PangoSharp/AttrStretch.cs b/Source/Libs/PangoSharp/AttrStretch.cs index ec1cb1ee9..5bf37223a 100755 --- a/Source/Libs/PangoSharp/AttrStretch.cs +++ b/Source/Libs/PangoSharp/AttrStretch.cs @@ -24,7 +24,7 @@ namespace Pango { public class AttrStretch : Attribute { delegate IntPtr d_pango_attr_stretch_new(Pango.Stretch stretch); - static d_pango_attr_stretch_new pango_attr_stretch_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_stretch_new")); + static d_pango_attr_stretch_new pango_attr_stretch_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_stretch_new")); public AttrStretch (Pango.Stretch stretch) : this (pango_attr_stretch_new (stretch)) {} diff --git a/Source/Libs/PangoSharp/AttrStrikethrough.cs b/Source/Libs/PangoSharp/AttrStrikethrough.cs index ce9f70da8..d7ea73cf7 100755 --- a/Source/Libs/PangoSharp/AttrStrikethrough.cs +++ b/Source/Libs/PangoSharp/AttrStrikethrough.cs @@ -24,7 +24,7 @@ namespace Pango { public class AttrStrikethrough : Attribute { delegate IntPtr d_pango_attr_strikethrough_new(bool strikethrough); - static d_pango_attr_strikethrough_new pango_attr_strikethrough_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_strikethrough_new")); + static d_pango_attr_strikethrough_new pango_attr_strikethrough_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_strikethrough_new")); public AttrStrikethrough (bool strikethrough) : this (pango_attr_strikethrough_new (strikethrough)) {} diff --git a/Source/Libs/PangoSharp/AttrStrikethroughColor.cs b/Source/Libs/PangoSharp/AttrStrikethroughColor.cs index 5526cc0a5..b7990d682 100755 --- a/Source/Libs/PangoSharp/AttrStrikethroughColor.cs +++ b/Source/Libs/PangoSharp/AttrStrikethroughColor.cs @@ -24,7 +24,7 @@ namespace Pango { public class AttrStrikethroughColor : Attribute { delegate IntPtr d_pango_attr_strikethrough_color_new(ushort red, ushort green, ushort blue); - static d_pango_attr_strikethrough_color_new pango_attr_strikethrough_color_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_strikethrough_color_new")); + static d_pango_attr_strikethrough_color_new pango_attr_strikethrough_color_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_strikethrough_color_new")); public AttrStrikethroughColor (ushort red, ushort green, ushort blue) : this (pango_attr_strikethrough_color_new (red, green, blue)) {} diff --git a/Source/Libs/PangoSharp/AttrStyle.cs b/Source/Libs/PangoSharp/AttrStyle.cs index c1ad501cb..fe82a8544 100755 --- a/Source/Libs/PangoSharp/AttrStyle.cs +++ b/Source/Libs/PangoSharp/AttrStyle.cs @@ -24,7 +24,7 @@ namespace Pango { public class AttrStyle : Attribute { delegate IntPtr d_pango_attr_style_new(Pango.Style style); - static d_pango_attr_style_new pango_attr_style_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_style_new")); + static d_pango_attr_style_new pango_attr_style_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_style_new")); public AttrStyle (Pango.Style style) : this (pango_attr_style_new (style)) {} diff --git a/Source/Libs/PangoSharp/AttrUnderline.cs b/Source/Libs/PangoSharp/AttrUnderline.cs index f155d8445..96637dcb8 100755 --- a/Source/Libs/PangoSharp/AttrUnderline.cs +++ b/Source/Libs/PangoSharp/AttrUnderline.cs @@ -24,7 +24,7 @@ namespace Pango { public class AttrUnderline : Attribute { delegate IntPtr d_pango_attr_underline_new(Pango.Underline underline); - static d_pango_attr_underline_new pango_attr_underline_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_underline_new")); + static d_pango_attr_underline_new pango_attr_underline_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_underline_new")); public AttrUnderline (Pango.Underline underline) : this (pango_attr_underline_new (underline)) {} diff --git a/Source/Libs/PangoSharp/AttrUnderlineColor.cs b/Source/Libs/PangoSharp/AttrUnderlineColor.cs index 854d58f09..483c77513 100755 --- a/Source/Libs/PangoSharp/AttrUnderlineColor.cs +++ b/Source/Libs/PangoSharp/AttrUnderlineColor.cs @@ -24,7 +24,7 @@ namespace Pango { public class AttrUnderlineColor : Attribute { delegate IntPtr d_pango_attr_underline_color_new(ushort red, ushort green, ushort blue); - static d_pango_attr_underline_color_new pango_attr_underline_color_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_underline_color_new")); + static d_pango_attr_underline_color_new pango_attr_underline_color_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_underline_color_new")); public AttrUnderlineColor (ushort red, ushort green, ushort blue) : this (pango_attr_underline_color_new (red, green, blue)) {} diff --git a/Source/Libs/PangoSharp/AttrVariant.cs b/Source/Libs/PangoSharp/AttrVariant.cs index d7c3d4bcc..a4f732b26 100755 --- a/Source/Libs/PangoSharp/AttrVariant.cs +++ b/Source/Libs/PangoSharp/AttrVariant.cs @@ -24,7 +24,7 @@ namespace Pango { public class AttrVariant : Attribute { delegate IntPtr d_pango_attr_variant_new(Pango.Variant variant); - static d_pango_attr_variant_new pango_attr_variant_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_variant_new")); + static d_pango_attr_variant_new pango_attr_variant_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_variant_new")); public AttrVariant (Pango.Variant variant) : this (pango_attr_variant_new (variant)) {} diff --git a/Source/Libs/PangoSharp/AttrWeight.cs b/Source/Libs/PangoSharp/AttrWeight.cs index 0c64c72ca..88b54ff04 100755 --- a/Source/Libs/PangoSharp/AttrWeight.cs +++ b/Source/Libs/PangoSharp/AttrWeight.cs @@ -24,7 +24,7 @@ namespace Pango { public class AttrWeight : Attribute { delegate IntPtr d_pango_attr_weight_new(Pango.Weight weight); - static d_pango_attr_weight_new pango_attr_weight_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_weight_new")); + static d_pango_attr_weight_new pango_attr_weight_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_weight_new")); public AttrWeight (Pango.Weight weight) : this (pango_attr_weight_new (weight)) {} diff --git a/Source/Libs/PangoSharp/Attribute.cs b/Source/Libs/PangoSharp/Attribute.cs index 14da10020..75cafcd9e 100755 --- a/Source/Libs/PangoSharp/Attribute.cs +++ b/Source/Libs/PangoSharp/Attribute.cs @@ -94,7 +94,7 @@ namespace Pango { } delegate void d_pango_attribute_destroy(IntPtr raw); - static d_pango_attribute_destroy pango_attribute_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attribute_destroy")); + static d_pango_attribute_destroy pango_attribute_destroy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attribute_destroy")); public void Dispose () { @@ -150,14 +150,14 @@ namespace Pango { } delegate IntPtr d_pango_attribute_copy(IntPtr raw); - static d_pango_attribute_copy pango_attribute_copy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attribute_copy")); + static d_pango_attribute_copy pango_attribute_copy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attribute_copy")); public Pango.Attribute Copy () { return GetAttribute (pango_attribute_copy (raw)); } delegate bool d_pango_attribute_equal(IntPtr raw1, IntPtr raw2); - static d_pango_attribute_equal pango_attribute_equal = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attribute_equal")); + static d_pango_attribute_equal pango_attribute_equal = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attribute_equal")); public bool Equal (Pango.Attribute attr2) { return pango_attribute_equal (raw, attr2.raw); diff --git a/Source/Libs/PangoSharp/Context.cs b/Source/Libs/PangoSharp/Context.cs index bb38f4523..9a46f013c 100755 --- a/Source/Libs/PangoSharp/Context.cs +++ b/Source/Libs/PangoSharp/Context.cs @@ -26,7 +26,7 @@ namespace Pango { public partial class Context { delegate void d_pango_context_list_families2(IntPtr raw, out IntPtr families, out int n_families); - static d_pango_context_list_families2 pango_context_list_families2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_context_list_families")); + static d_pango_context_list_families2 pango_context_list_families2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_context_list_families")); public FontFamily [] Families { get { @@ -47,7 +47,7 @@ namespace Pango { } delegate void d_pango_context_list_families(IntPtr raw, IntPtr families, out int n_families); - static d_pango_context_list_families pango_context_list_families = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_context_list_families")); + static d_pango_context_list_families pango_context_list_families = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_context_list_families")); [Obsolete] public int ListFamilies(Pango.FontFamily families) { diff --git a/Source/Libs/PangoSharp/Coverage.cs b/Source/Libs/PangoSharp/Coverage.cs index adb765bc8..0a44f7a9b 100755 --- a/Source/Libs/PangoSharp/Coverage.cs +++ b/Source/Libs/PangoSharp/Coverage.cs @@ -26,7 +26,7 @@ namespace Pango { public partial class Coverage { delegate void d_pango_coverage_to_bytes(IntPtr raw, out IntPtr bytes, out int n_bytes); - static d_pango_coverage_to_bytes pango_coverage_to_bytes = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_coverage_to_bytes")); + static d_pango_coverage_to_bytes pango_coverage_to_bytes = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_coverage_to_bytes")); public void ToBytes(out byte[] bytes) { diff --git a/Source/Libs/PangoSharp/FontFamily.cs b/Source/Libs/PangoSharp/FontFamily.cs index 30b0aaf98..cc8a9f89f 100755 --- a/Source/Libs/PangoSharp/FontFamily.cs +++ b/Source/Libs/PangoSharp/FontFamily.cs @@ -26,7 +26,7 @@ namespace Pango { public partial class FontFamily { delegate void d_pango_font_family_list_faces2(IntPtr raw, out IntPtr faces, out int n_faces); - static d_pango_font_family_list_faces2 pango_font_family_list_faces2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_family_list_faces")); + static d_pango_font_family_list_faces2 pango_font_family_list_faces2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_family_list_faces")); public FontFace [] Faces { get { @@ -47,7 +47,7 @@ namespace Pango { } delegate void d_pango_font_family_list_faces(IntPtr raw, IntPtr faces, out int n_faces); - static d_pango_font_family_list_faces pango_font_family_list_faces = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_family_list_faces")); + static d_pango_font_family_list_faces pango_font_family_list_faces = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_family_list_faces")); [Obsolete] public int ListFaces(Pango.FontFace faces) { diff --git a/Source/Libs/PangoSharp/FontMap.cs b/Source/Libs/PangoSharp/FontMap.cs index 3f268d254..bbb2bc11e 100755 --- a/Source/Libs/PangoSharp/FontMap.cs +++ b/Source/Libs/PangoSharp/FontMap.cs @@ -26,7 +26,7 @@ namespace Pango { public partial class FontMap { delegate void d_pango_font_map_list_families2(IntPtr raw, out IntPtr families, out int n_families); - static d_pango_font_map_list_families2 pango_font_map_list_families2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_map_list_families")); + static d_pango_font_map_list_families2 pango_font_map_list_families2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_map_list_families")); public FontFamily [] Families { get { @@ -47,7 +47,7 @@ namespace Pango { } delegate void d_pango_font_map_list_families(IntPtr raw, IntPtr families, out int n_families); - static d_pango_font_map_list_families pango_font_map_list_families = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_map_list_families")); + static d_pango_font_map_list_families pango_font_map_list_families = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_map_list_families")); [Obsolete] public int ListFamilies(Pango.FontFamily families) { diff --git a/Source/Libs/PangoSharp/Global.cs b/Source/Libs/PangoSharp/Global.cs index d5be46d1c..9cf4656ac 100755 --- a/Source/Libs/PangoSharp/Global.cs +++ b/Source/Libs/PangoSharp/Global.cs @@ -35,7 +35,7 @@ namespace Pango { } delegate bool d_pango_parse_markup(IntPtr markup, int length, uint accel_marker, out IntPtr attr_list_handle, out IntPtr text, out uint accel_char, IntPtr err); - static d_pango_parse_markup pango_parse_markup = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_parse_markup")); + static d_pango_parse_markup pango_parse_markup = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_parse_markup")); public static bool ParseMarkup (string markup, char accel_marker, out Pango.AttrList attrs, out string text, out char accel_char) { diff --git a/Source/Libs/PangoSharp/GlyphItem.cs b/Source/Libs/PangoSharp/GlyphItem.cs index 865876c2b..93921dc67 100755 --- a/Source/Libs/PangoSharp/GlyphItem.cs +++ b/Source/Libs/PangoSharp/GlyphItem.cs @@ -26,7 +26,7 @@ namespace Pango { public partial struct GlyphItem { delegate IntPtr d_pango_glyph_item_apply_attrs(ref Pango.GlyphItem raw, IntPtr text, IntPtr list); - static d_pango_glyph_item_apply_attrs pango_glyph_item_apply_attrs = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_glyph_item_apply_attrs")); + static d_pango_glyph_item_apply_attrs pango_glyph_item_apply_attrs = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_glyph_item_apply_attrs")); public GlyphItem[] ApplyAttrs (string text, Pango.AttrList list) { diff --git a/Source/Libs/PangoSharp/Layout.cs b/Source/Libs/PangoSharp/Layout.cs index f188e45e9..443b5240a 100755 --- a/Source/Libs/PangoSharp/Layout.cs +++ b/Source/Libs/PangoSharp/Layout.cs @@ -27,7 +27,7 @@ namespace Pango { public partial class Layout { delegate IntPtr d_pango_layout_get_lines(IntPtr raw); - static d_pango_layout_get_lines pango_layout_get_lines = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_layout_get_lines")); + static d_pango_layout_get_lines pango_layout_get_lines = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_layout_get_lines")); public LayoutLine[] Lines { get { @@ -44,7 +44,7 @@ namespace Pango { } delegate void d_pango_layout_set_markup_with_accel(IntPtr raw, IntPtr markup, int length, uint accel_marker, out uint accel_char); - static d_pango_layout_set_markup_with_accel pango_layout_set_markup_with_accel = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_layout_set_markup_with_accel")); + static d_pango_layout_set_markup_with_accel pango_layout_set_markup_with_accel = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_layout_set_markup_with_accel")); public void SetMarkupWithAccel (string markup, char accel_marker, out char accel_char) { @@ -56,7 +56,7 @@ namespace Pango { } delegate void d_pango_layout_get_log_attrs(IntPtr raw, out IntPtr attrs, out int n_attrs); - static d_pango_layout_get_log_attrs pango_layout_get_log_attrs = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_layout_get_log_attrs")); + static d_pango_layout_get_log_attrs pango_layout_get_log_attrs = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_layout_get_log_attrs")); public LogAttr [] LogAttrs { get { @@ -77,7 +77,7 @@ namespace Pango { } delegate void d_pango_layout_set_text(IntPtr raw, IntPtr text, int length); - static d_pango_layout_set_text pango_layout_set_text = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_layout_set_text")); + static d_pango_layout_set_text pango_layout_set_text = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_layout_set_text")); public void SetText (string text) { @@ -87,7 +87,7 @@ namespace Pango { } delegate void d_pango_layout_set_markup(IntPtr raw, IntPtr markup, int length); - static d_pango_layout_set_markup pango_layout_set_markup = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_layout_set_markup")); + static d_pango_layout_set_markup pango_layout_set_markup = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_layout_set_markup")); public void SetMarkup (string markup) { diff --git a/Source/Libs/PangoSharp/LayoutLine.cs b/Source/Libs/PangoSharp/LayoutLine.cs index cc737f086..0514d9351 100755 --- a/Source/Libs/PangoSharp/LayoutLine.cs +++ b/Source/Libs/PangoSharp/LayoutLine.cs @@ -27,7 +27,7 @@ namespace Pango { #if NOT_BROKEN delegate void d_pango_layout_line_get_x_ranges(IntPtr raw, int start_index, int end_index, out IntPtr ranges_handle, out int n_ranges); - static d_pango_layout_line_get_x_ranges pango_layout_line_get_x_ranges = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_layout_line_get_x_ranges")); + static d_pango_layout_line_get_x_ranges pango_layout_line_get_x_ranges = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_layout_line_get_x_ranges")); #endif public void GetXRanges(int start_index, int end_index, out int[][] ranges) diff --git a/Source/Libs/PangoSharp/ScriptIter.cs b/Source/Libs/PangoSharp/ScriptIter.cs index 8482b487d..e668b4908 100755 --- a/Source/Libs/PangoSharp/ScriptIter.cs +++ b/Source/Libs/PangoSharp/ScriptIter.cs @@ -28,7 +28,7 @@ namespace Pango { public ScriptIter(IntPtr raw) : base(raw) {} delegate IntPtr d_pango_script_iter_new(IntPtr text, int length); - static d_pango_script_iter_new pango_script_iter_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_script_iter_new")); + static d_pango_script_iter_new pango_script_iter_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_script_iter_new")); public ScriptIter (string text) { @@ -37,7 +37,7 @@ namespace Pango { } delegate void d_pango_script_iter_free(IntPtr raw); - static d_pango_script_iter_free pango_script_iter_free = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_script_iter_free")); + static d_pango_script_iter_free pango_script_iter_free = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_script_iter_free")); ~ScriptIter () { @@ -47,10 +47,10 @@ namespace Pango { } delegate void d_pango_script_iter_get_range(IntPtr raw, out IntPtr start, out IntPtr end, out Pango.Script script); - static d_pango_script_iter_get_range pango_script_iter_get_range = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_script_iter_get_range")); + static d_pango_script_iter_get_range pango_script_iter_get_range = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_script_iter_get_range")); delegate IntPtr d_g_utf8_pointer_to_offset(IntPtr str, IntPtr pos); - static d_g_utf8_pointer_to_offset g_utf8_pointer_to_offset = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_utf8_pointer_to_offset")); + static d_g_utf8_pointer_to_offset g_utf8_pointer_to_offset = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_utf8_pointer_to_offset")); public void GetRange (out int start, out int len, out Pango.Script script) { @@ -63,7 +63,7 @@ namespace Pango { } delegate bool d_pango_script_iter_next(IntPtr raw); - static d_pango_script_iter_next pango_script_iter_next = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_script_iter_next")); + static d_pango_script_iter_next pango_script_iter_next = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_script_iter_next")); public bool Next () { diff --git a/Source/Libs/PangoSharp/TabArray.cs b/Source/Libs/PangoSharp/TabArray.cs index 4810579a6..f2a4311af 100755 --- a/Source/Libs/PangoSharp/TabArray.cs +++ b/Source/Libs/PangoSharp/TabArray.cs @@ -26,7 +26,7 @@ namespace Pango { public partial class TabArray { delegate void d_pango_tab_array_get_tabs(IntPtr raw, out IntPtr alignments, out IntPtr locations); - static d_pango_tab_array_get_tabs pango_tab_array_get_tabs = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_tab_array_get_tabs")); + static d_pango_tab_array_get_tabs pango_tab_array_get_tabs = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_tab_array_get_tabs")); public void GetTabs (out TabAlign[] alignments, out int[] locations) {