mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
4be602a137
Update to C# bindings to use a more recent version of GtkSharp and regenerate the bindings with that version Fix #1718
881 lines
29 KiB
C#
881 lines
29 KiB
C#
// This file was generated by the Gtk# code generator.
|
|
// Any changes made will be lost if regenerated.
|
|
|
|
namespace GES {
|
|
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Runtime.InteropServices;
|
|
|
|
#region Autogenerated code
|
|
public partial class Project : GES.Asset {
|
|
|
|
public Project (IntPtr raw) : base(raw) {}
|
|
|
|
[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
|
|
static extern IntPtr ges_project_new(IntPtr uri);
|
|
|
|
public Project (string uri) : base (IntPtr.Zero)
|
|
{
|
|
if (GetType () != typeof (Project)) {
|
|
var vals = new List<GLib.Value> ();
|
|
var names = new List<string> ();
|
|
names.Add ("uri");
|
|
vals.Add (new GLib.Value (uri));
|
|
CreateNativeObject (names.ToArray (), vals.ToArray ());
|
|
return;
|
|
}
|
|
IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
|
|
Raw = ges_project_new(native_uri);
|
|
GLib.Marshaller.Free (native_uri);
|
|
}
|
|
|
|
[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
|
|
static extern IntPtr ges_project_get_uri(IntPtr raw);
|
|
|
|
[GLib.Property ("uri")]
|
|
public string Uri {
|
|
get {
|
|
IntPtr raw_ret = ges_project_get_uri(Handle);
|
|
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
[GLib.Signal("loaded")]
|
|
public event GES.LoadedHandler Loaded {
|
|
add {
|
|
this.AddSignalHandler ("loaded", value, typeof (GES.LoadedArgs));
|
|
}
|
|
remove {
|
|
this.RemoveSignalHandler ("loaded", value);
|
|
}
|
|
}
|
|
|
|
[GLib.Signal("error-loading")]
|
|
public event GES.ErrorLoadingHandler ErrorLoading {
|
|
add {
|
|
this.AddSignalHandler ("error-loading", value, typeof (GES.ErrorLoadingArgs));
|
|
}
|
|
remove {
|
|
this.RemoveSignalHandler ("error-loading", value);
|
|
}
|
|
}
|
|
|
|
[GLib.Signal("asset-added")]
|
|
public event GES.AssetAddedHandler AssetAdded {
|
|
add {
|
|
this.AddSignalHandler ("asset-added", value, typeof (GES.AssetAddedArgs));
|
|
}
|
|
remove {
|
|
this.RemoveSignalHandler ("asset-added", value);
|
|
}
|
|
}
|
|
|
|
[GLib.Signal("error-loading-asset")]
|
|
public event GES.ErrorLoadingAssetHandler ErrorLoadingAsset {
|
|
add {
|
|
this.AddSignalHandler ("error-loading-asset", value, typeof (GES.ErrorLoadingAssetArgs));
|
|
}
|
|
remove {
|
|
this.RemoveSignalHandler ("error-loading-asset", value);
|
|
}
|
|
}
|
|
|
|
[GLib.Signal("asset-removed")]
|
|
public event GES.AssetRemovedHandler AssetRemoved {
|
|
add {
|
|
this.AddSignalHandler ("asset-removed", value, typeof (GES.AssetRemovedArgs));
|
|
}
|
|
remove {
|
|
this.RemoveSignalHandler ("asset-removed", value);
|
|
}
|
|
}
|
|
|
|
[GLib.Signal("loading")]
|
|
public event GES.LoadingHandler Loading {
|
|
add {
|
|
this.AddSignalHandler ("loading", value, typeof (GES.LoadingArgs));
|
|
}
|
|
remove {
|
|
this.RemoveSignalHandler ("loading", value);
|
|
}
|
|
}
|
|
|
|
[GLib.Signal("missing-uri")]
|
|
public event GES.MissingUriHandler MissingUri {
|
|
add {
|
|
this.AddSignalHandler ("missing-uri", value, typeof (GES.MissingUriArgs));
|
|
}
|
|
remove {
|
|
this.RemoveSignalHandler ("missing-uri", value);
|
|
}
|
|
}
|
|
|
|
[GLib.Signal("asset-loading")]
|
|
public event GES.AssetLoadingHandler AssetLoading {
|
|
add {
|
|
this.AddSignalHandler ("asset-loading", value, typeof (GES.AssetLoadingArgs));
|
|
}
|
|
remove {
|
|
this.RemoveSignalHandler ("asset-loading", value);
|
|
}
|
|
}
|
|
|
|
static ErrorLoadingNativeDelegate ErrorLoading_cb_delegate;
|
|
static ErrorLoadingNativeDelegate ErrorLoadingVMCallback {
|
|
get {
|
|
if (ErrorLoading_cb_delegate == null)
|
|
ErrorLoading_cb_delegate = new ErrorLoadingNativeDelegate (ErrorLoading_cb);
|
|
return ErrorLoading_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideErrorLoading (GLib.GType gtype)
|
|
{
|
|
OverrideErrorLoading (gtype, ErrorLoadingVMCallback);
|
|
}
|
|
|
|
static void OverrideErrorLoading (GLib.GType gtype, ErrorLoadingNativeDelegate callback)
|
|
{
|
|
OverrideVirtualMethod (gtype, "error-loading", callback);
|
|
}
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void ErrorLoadingNativeDelegate (IntPtr inst, IntPtr timeline, IntPtr error);
|
|
|
|
static void ErrorLoading_cb (IntPtr inst, IntPtr timeline, IntPtr error)
|
|
{
|
|
try {
|
|
Project __obj = GLib.Object.GetObject (inst, false) as Project;
|
|
__obj.OnErrorLoading (GLib.Object.GetObject(timeline) as GES.Timeline, error);
|
|
} catch (Exception e) {
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
|
}
|
|
}
|
|
|
|
[GLib.DefaultSignalHandler(Type=typeof(GES.Project), ConnectionMethod="OverrideErrorLoading")]
|
|
protected virtual void OnErrorLoading (GES.Timeline timeline, IntPtr error)
|
|
{
|
|
InternalErrorLoading (timeline, error);
|
|
}
|
|
|
|
private void InternalErrorLoading (GES.Timeline timeline, IntPtr error)
|
|
{
|
|
GLib.Value ret = GLib.Value.Empty;
|
|
GLib.ValueArray inst_and_params = new GLib.ValueArray (3);
|
|
GLib.Value[] vals = new GLib.Value [3];
|
|
vals [0] = new GLib.Value (this);
|
|
inst_and_params.Append (vals [0]);
|
|
vals [1] = new GLib.Value (timeline);
|
|
inst_and_params.Append (vals [1]);
|
|
vals [2] = new GLib.Value (error);
|
|
inst_and_params.Append (vals [2]);
|
|
g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
|
|
foreach (GLib.Value v in vals)
|
|
v.Dispose ();
|
|
}
|
|
|
|
static ErrorLoadingAssetNativeDelegate ErrorLoadingAsset_cb_delegate;
|
|
static ErrorLoadingAssetNativeDelegate ErrorLoadingAssetVMCallback {
|
|
get {
|
|
if (ErrorLoadingAsset_cb_delegate == null)
|
|
ErrorLoadingAsset_cb_delegate = new ErrorLoadingAssetNativeDelegate (ErrorLoadingAsset_cb);
|
|
return ErrorLoadingAsset_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideErrorLoadingAsset (GLib.GType gtype)
|
|
{
|
|
OverrideErrorLoadingAsset (gtype, ErrorLoadingAssetVMCallback);
|
|
}
|
|
|
|
static void OverrideErrorLoadingAsset (GLib.GType gtype, ErrorLoadingAssetNativeDelegate callback)
|
|
{
|
|
OverrideVirtualMethod (gtype, "error-loading-asset", callback);
|
|
}
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void ErrorLoadingAssetNativeDelegate (IntPtr inst, IntPtr error, IntPtr id, IntPtr extractable_type);
|
|
|
|
static void ErrorLoadingAsset_cb (IntPtr inst, IntPtr error, IntPtr id, IntPtr extractable_type)
|
|
{
|
|
try {
|
|
Project __obj = GLib.Object.GetObject (inst, false) as Project;
|
|
__obj.OnErrorLoadingAsset (error, GLib.Marshaller.Utf8PtrToString (id), new GLib.GType(extractable_type));
|
|
} catch (Exception e) {
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
|
}
|
|
}
|
|
|
|
[GLib.DefaultSignalHandler(Type=typeof(GES.Project), ConnectionMethod="OverrideErrorLoadingAsset")]
|
|
protected virtual void OnErrorLoadingAsset (IntPtr error, string id, GLib.GType extractable_type)
|
|
{
|
|
InternalErrorLoadingAsset (error, id, extractable_type);
|
|
}
|
|
|
|
private void InternalErrorLoadingAsset (IntPtr error, string id, GLib.GType extractable_type)
|
|
{
|
|
GLib.Value ret = GLib.Value.Empty;
|
|
GLib.ValueArray inst_and_params = new GLib.ValueArray (4);
|
|
GLib.Value[] vals = new GLib.Value [4];
|
|
vals [0] = new GLib.Value (this);
|
|
inst_and_params.Append (vals [0]);
|
|
vals [1] = new GLib.Value (error);
|
|
inst_and_params.Append (vals [1]);
|
|
vals [2] = new GLib.Value (id);
|
|
inst_and_params.Append (vals [2]);
|
|
vals [3] = new GLib.Value (extractable_type);
|
|
inst_and_params.Append (vals [3]);
|
|
g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
|
|
foreach (GLib.Value v in vals)
|
|
v.Dispose ();
|
|
}
|
|
|
|
static AssetAddedNativeDelegate AssetAdded_cb_delegate;
|
|
static AssetAddedNativeDelegate AssetAddedVMCallback {
|
|
get {
|
|
if (AssetAdded_cb_delegate == null)
|
|
AssetAdded_cb_delegate = new AssetAddedNativeDelegate (AssetAdded_cb);
|
|
return AssetAdded_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideAssetAdded (GLib.GType gtype)
|
|
{
|
|
OverrideAssetAdded (gtype, AssetAddedVMCallback);
|
|
}
|
|
|
|
static void OverrideAssetAdded (GLib.GType gtype, AssetAddedNativeDelegate callback)
|
|
{
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("asset_added"));
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void AssetAddedNativeDelegate (IntPtr inst, IntPtr asset);
|
|
|
|
static void AssetAdded_cb (IntPtr inst, IntPtr asset)
|
|
{
|
|
try {
|
|
Project __obj = GLib.Object.GetObject (inst, false) as Project;
|
|
__obj.OnAssetAdded (GLib.Object.GetObject(asset) as GES.Asset);
|
|
} catch (Exception e) {
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
|
}
|
|
}
|
|
|
|
[GLib.DefaultSignalHandler(Type=typeof(GES.Project), ConnectionMethod="OverrideAssetAdded")]
|
|
protected virtual void OnAssetAdded (GES.Asset asset)
|
|
{
|
|
InternalAssetAdded (asset);
|
|
}
|
|
|
|
private void InternalAssetAdded (GES.Asset asset)
|
|
{
|
|
AssetAddedNativeDelegate unmanaged = null;
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("asset_added"));
|
|
unmanaged = (AssetAddedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(AssetAddedNativeDelegate));
|
|
}
|
|
if (unmanaged == null) return;
|
|
|
|
unmanaged (this.Handle, asset == null ? IntPtr.Zero : asset.Handle);
|
|
}
|
|
|
|
static AssetLoadingNativeDelegate AssetLoading_cb_delegate;
|
|
static AssetLoadingNativeDelegate AssetLoadingVMCallback {
|
|
get {
|
|
if (AssetLoading_cb_delegate == null)
|
|
AssetLoading_cb_delegate = new AssetLoadingNativeDelegate (AssetLoading_cb);
|
|
return AssetLoading_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideAssetLoading (GLib.GType gtype)
|
|
{
|
|
OverrideAssetLoading (gtype, AssetLoadingVMCallback);
|
|
}
|
|
|
|
static void OverrideAssetLoading (GLib.GType gtype, AssetLoadingNativeDelegate callback)
|
|
{
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("asset_loading"));
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void AssetLoadingNativeDelegate (IntPtr inst, IntPtr asset);
|
|
|
|
static void AssetLoading_cb (IntPtr inst, IntPtr asset)
|
|
{
|
|
try {
|
|
Project __obj = GLib.Object.GetObject (inst, false) as Project;
|
|
__obj.OnAssetLoading (GLib.Object.GetObject(asset) as GES.Asset);
|
|
} catch (Exception e) {
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
|
}
|
|
}
|
|
|
|
[GLib.DefaultSignalHandler(Type=typeof(GES.Project), ConnectionMethod="OverrideAssetLoading")]
|
|
protected virtual void OnAssetLoading (GES.Asset asset)
|
|
{
|
|
InternalAssetLoading (asset);
|
|
}
|
|
|
|
private void InternalAssetLoading (GES.Asset asset)
|
|
{
|
|
AssetLoadingNativeDelegate unmanaged = null;
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("asset_loading"));
|
|
unmanaged = (AssetLoadingNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(AssetLoadingNativeDelegate));
|
|
}
|
|
if (unmanaged == null) return;
|
|
|
|
unmanaged (this.Handle, asset == null ? IntPtr.Zero : asset.Handle);
|
|
}
|
|
|
|
static AssetRemovedNativeDelegate AssetRemoved_cb_delegate;
|
|
static AssetRemovedNativeDelegate AssetRemovedVMCallback {
|
|
get {
|
|
if (AssetRemoved_cb_delegate == null)
|
|
AssetRemoved_cb_delegate = new AssetRemovedNativeDelegate (AssetRemoved_cb);
|
|
return AssetRemoved_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideAssetRemoved (GLib.GType gtype)
|
|
{
|
|
OverrideAssetRemoved (gtype, AssetRemovedVMCallback);
|
|
}
|
|
|
|
static void OverrideAssetRemoved (GLib.GType gtype, AssetRemovedNativeDelegate callback)
|
|
{
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("asset_removed"));
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void AssetRemovedNativeDelegate (IntPtr inst, IntPtr asset);
|
|
|
|
static void AssetRemoved_cb (IntPtr inst, IntPtr asset)
|
|
{
|
|
try {
|
|
Project __obj = GLib.Object.GetObject (inst, false) as Project;
|
|
__obj.OnAssetRemoved (GLib.Object.GetObject(asset) as GES.Asset);
|
|
} catch (Exception e) {
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
|
}
|
|
}
|
|
|
|
[GLib.DefaultSignalHandler(Type=typeof(GES.Project), ConnectionMethod="OverrideAssetRemoved")]
|
|
protected virtual void OnAssetRemoved (GES.Asset asset)
|
|
{
|
|
InternalAssetRemoved (asset);
|
|
}
|
|
|
|
private void InternalAssetRemoved (GES.Asset asset)
|
|
{
|
|
AssetRemovedNativeDelegate unmanaged = null;
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("asset_removed"));
|
|
unmanaged = (AssetRemovedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(AssetRemovedNativeDelegate));
|
|
}
|
|
if (unmanaged == null) return;
|
|
|
|
unmanaged (this.Handle, asset == null ? IntPtr.Zero : asset.Handle);
|
|
}
|
|
|
|
static MissingUriNativeDelegate MissingUri_cb_delegate;
|
|
static MissingUriNativeDelegate MissingUriVMCallback {
|
|
get {
|
|
if (MissingUri_cb_delegate == null)
|
|
MissingUri_cb_delegate = new MissingUriNativeDelegate (MissingUri_cb);
|
|
return MissingUri_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideMissingUri (GLib.GType gtype)
|
|
{
|
|
OverrideMissingUri (gtype, MissingUriVMCallback);
|
|
}
|
|
|
|
static void OverrideMissingUri (GLib.GType gtype, MissingUriNativeDelegate callback)
|
|
{
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("missing_uri"));
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate IntPtr MissingUriNativeDelegate (IntPtr inst, IntPtr error, IntPtr wrong_asset);
|
|
|
|
static IntPtr MissingUri_cb (IntPtr inst, IntPtr error, IntPtr wrong_asset)
|
|
{
|
|
try {
|
|
Project __obj = GLib.Object.GetObject (inst, false) as Project;
|
|
string __result;
|
|
__result = __obj.OnMissingUri (error, GLib.Object.GetObject(wrong_asset) as GES.Asset);
|
|
return GLib.Marshaller.StringToPtrGStrdup(__result);
|
|
} catch (Exception e) {
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, true);
|
|
// NOTREACHED: above call does not return.
|
|
throw e;
|
|
}
|
|
}
|
|
|
|
[GLib.DefaultSignalHandler(Type=typeof(GES.Project), ConnectionMethod="OverrideMissingUri")]
|
|
protected virtual string OnMissingUri (IntPtr error, GES.Asset wrong_asset)
|
|
{
|
|
return InternalMissingUri (error, wrong_asset);
|
|
}
|
|
|
|
private string InternalMissingUri (IntPtr error, GES.Asset wrong_asset)
|
|
{
|
|
MissingUriNativeDelegate unmanaged = null;
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("missing_uri"));
|
|
unmanaged = (MissingUriNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(MissingUriNativeDelegate));
|
|
}
|
|
if (unmanaged == null) return null;
|
|
|
|
IntPtr __result = unmanaged (this.Handle, error, wrong_asset == null ? IntPtr.Zero : wrong_asset.Handle);
|
|
return GLib.Marshaller.PtrToStringGFree(__result);
|
|
}
|
|
|
|
static LoadingErrorNativeDelegate LoadingError_cb_delegate;
|
|
static LoadingErrorNativeDelegate LoadingErrorVMCallback {
|
|
get {
|
|
if (LoadingError_cb_delegate == null)
|
|
LoadingError_cb_delegate = new LoadingErrorNativeDelegate (LoadingError_cb);
|
|
return LoadingError_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideLoadingError (GLib.GType gtype)
|
|
{
|
|
OverrideLoadingError (gtype, LoadingErrorVMCallback);
|
|
}
|
|
|
|
static void OverrideLoadingError (GLib.GType gtype, LoadingErrorNativeDelegate callback)
|
|
{
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("loading_error"));
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate bool LoadingErrorNativeDelegate (IntPtr inst, IntPtr error, IntPtr id, IntPtr extractable_type);
|
|
|
|
static bool LoadingError_cb (IntPtr inst, IntPtr error, IntPtr id, IntPtr extractable_type)
|
|
{
|
|
try {
|
|
Project __obj = GLib.Object.GetObject (inst, false) as Project;
|
|
bool __result;
|
|
__result = __obj.OnLoadingError (error, GLib.Marshaller.Utf8PtrToString (id), new GLib.GType(extractable_type));
|
|
return __result;
|
|
} catch (Exception e) {
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, true);
|
|
// NOTREACHED: above call does not return.
|
|
throw e;
|
|
}
|
|
}
|
|
|
|
[GLib.DefaultSignalHandler(Type=typeof(GES.Project), ConnectionMethod="OverrideLoadingError")]
|
|
protected virtual bool OnLoadingError (IntPtr error, string id, GLib.GType extractable_type)
|
|
{
|
|
return InternalLoadingError (error, id, extractable_type);
|
|
}
|
|
|
|
private bool InternalLoadingError (IntPtr error, string id, GLib.GType extractable_type)
|
|
{
|
|
LoadingErrorNativeDelegate unmanaged = null;
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("loading_error"));
|
|
unmanaged = (LoadingErrorNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(LoadingErrorNativeDelegate));
|
|
}
|
|
if (unmanaged == null) return false;
|
|
|
|
IntPtr native_id = GLib.Marshaller.StringToPtrGStrdup (id);
|
|
bool __result = unmanaged (this.Handle, error, native_id, extractable_type.Val);
|
|
GLib.Marshaller.Free (native_id);
|
|
return __result;
|
|
}
|
|
|
|
static LoadedNativeDelegate Loaded_cb_delegate;
|
|
static LoadedNativeDelegate LoadedVMCallback {
|
|
get {
|
|
if (Loaded_cb_delegate == null)
|
|
Loaded_cb_delegate = new LoadedNativeDelegate (Loaded_cb);
|
|
return Loaded_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideLoaded (GLib.GType gtype)
|
|
{
|
|
OverrideLoaded (gtype, LoadedVMCallback);
|
|
}
|
|
|
|
static void OverrideLoaded (GLib.GType gtype, LoadedNativeDelegate callback)
|
|
{
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("loaded"));
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void LoadedNativeDelegate (IntPtr inst, IntPtr timeline);
|
|
|
|
static void Loaded_cb (IntPtr inst, IntPtr timeline)
|
|
{
|
|
try {
|
|
Project __obj = GLib.Object.GetObject (inst, false) as Project;
|
|
__obj.OnLoaded (GLib.Object.GetObject(timeline) as GES.Timeline);
|
|
} catch (Exception e) {
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
|
}
|
|
}
|
|
|
|
[GLib.DefaultSignalHandler(Type=typeof(GES.Project), ConnectionMethod="OverrideLoaded")]
|
|
protected virtual void OnLoaded (GES.Timeline timeline)
|
|
{
|
|
InternalLoaded (timeline);
|
|
}
|
|
|
|
private void InternalLoaded (GES.Timeline timeline)
|
|
{
|
|
LoadedNativeDelegate unmanaged = null;
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("loaded"));
|
|
unmanaged = (LoadedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(LoadedNativeDelegate));
|
|
}
|
|
if (unmanaged == null) return;
|
|
|
|
unmanaged (this.Handle, timeline == null ? IntPtr.Zero : timeline.Handle);
|
|
}
|
|
|
|
static LoadingNativeDelegate Loading_cb_delegate;
|
|
static LoadingNativeDelegate LoadingVMCallback {
|
|
get {
|
|
if (Loading_cb_delegate == null)
|
|
Loading_cb_delegate = new LoadingNativeDelegate (Loading_cb);
|
|
return Loading_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideLoading (GLib.GType gtype)
|
|
{
|
|
OverrideLoading (gtype, LoadingVMCallback);
|
|
}
|
|
|
|
static void OverrideLoading (GLib.GType gtype, LoadingNativeDelegate callback)
|
|
{
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("loading"));
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void LoadingNativeDelegate (IntPtr inst, IntPtr timeline);
|
|
|
|
static void Loading_cb (IntPtr inst, IntPtr timeline)
|
|
{
|
|
try {
|
|
Project __obj = GLib.Object.GetObject (inst, false) as Project;
|
|
__obj.OnLoading (GLib.Object.GetObject(timeline) as GES.Timeline);
|
|
} catch (Exception e) {
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
|
}
|
|
}
|
|
|
|
[GLib.DefaultSignalHandler(Type=typeof(GES.Project), ConnectionMethod="OverrideLoading")]
|
|
protected virtual void OnLoading (GES.Timeline timeline)
|
|
{
|
|
InternalLoading (timeline);
|
|
}
|
|
|
|
private void InternalLoading (GES.Timeline timeline)
|
|
{
|
|
LoadingNativeDelegate unmanaged = null;
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("loading"));
|
|
unmanaged = (LoadingNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(LoadingNativeDelegate));
|
|
}
|
|
if (unmanaged == null) return;
|
|
|
|
unmanaged (this.Handle, timeline == null ? IntPtr.Zero : timeline.Handle);
|
|
}
|
|
|
|
|
|
// Internal representation of the wrapped structure ABI.
|
|
static GLib.AbiStruct _class_abi = null;
|
|
static public new GLib.AbiStruct class_abi {
|
|
get {
|
|
if (_class_abi == null)
|
|
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
|
|
new GLib.AbiField("asset_added"
|
|
, GES.Asset.class_abi.Fields
|
|
, (uint) Marshal.SizeOf(typeof(IntPtr)) // asset_added
|
|
, null
|
|
, "asset_loading"
|
|
, (uint) Marshal.SizeOf(typeof(IntPtr))
|
|
, 0
|
|
),
|
|
new GLib.AbiField("asset_loading"
|
|
, -1
|
|
, (uint) Marshal.SizeOf(typeof(IntPtr)) // asset_loading
|
|
, "asset_added"
|
|
, "asset_removed"
|
|
, (uint) Marshal.SizeOf(typeof(IntPtr))
|
|
, 0
|
|
),
|
|
new GLib.AbiField("asset_removed"
|
|
, -1
|
|
, (uint) Marshal.SizeOf(typeof(IntPtr)) // asset_removed
|
|
, "asset_loading"
|
|
, "missing_uri"
|
|
, (uint) Marshal.SizeOf(typeof(IntPtr))
|
|
, 0
|
|
),
|
|
new GLib.AbiField("missing_uri"
|
|
, -1
|
|
, (uint) Marshal.SizeOf(typeof(IntPtr)) // missing_uri
|
|
, "asset_removed"
|
|
, "loading_error"
|
|
, (uint) Marshal.SizeOf(typeof(IntPtr))
|
|
, 0
|
|
),
|
|
new GLib.AbiField("loading_error"
|
|
, -1
|
|
, (uint) Marshal.SizeOf(typeof(IntPtr)) // loading_error
|
|
, "missing_uri"
|
|
, "loaded"
|
|
, (uint) Marshal.SizeOf(typeof(IntPtr))
|
|
, 0
|
|
),
|
|
new GLib.AbiField("loaded"
|
|
, -1
|
|
, (uint) Marshal.SizeOf(typeof(IntPtr)) // loaded
|
|
, "loading_error"
|
|
, "loading"
|
|
, (uint) Marshal.SizeOf(typeof(IntPtr))
|
|
, 0
|
|
),
|
|
new GLib.AbiField("loading"
|
|
, -1
|
|
, (uint) Marshal.SizeOf(typeof(IntPtr)) // loading
|
|
, "loaded"
|
|
, "_ges_reserved"
|
|
, (uint) Marshal.SizeOf(typeof(IntPtr))
|
|
, 0
|
|
),
|
|
new GLib.AbiField("_ges_reserved"
|
|
, -1
|
|
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 3 // _ges_reserved
|
|
, "loading"
|
|
, null
|
|
, (uint) Marshal.SizeOf(typeof(IntPtr))
|
|
, 0
|
|
),
|
|
});
|
|
|
|
return _class_abi;
|
|
}
|
|
}
|
|
|
|
|
|
// End of the ABI representation.
|
|
|
|
[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
|
|
static extern IntPtr ges_project_get_type();
|
|
|
|
public static new GLib.GType GType {
|
|
get {
|
|
IntPtr raw_ret = ges_project_get_type();
|
|
GLib.GType ret = new GLib.GType(raw_ret);
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
|
|
static extern bool ges_project_add_asset(IntPtr raw, IntPtr asset);
|
|
|
|
public bool AddAsset(GES.Asset asset) {
|
|
bool raw_ret = ges_project_add_asset(Handle, asset == null ? IntPtr.Zero : asset.Handle);
|
|
bool ret = raw_ret;
|
|
return ret;
|
|
}
|
|
|
|
[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
|
|
static extern bool ges_project_add_encoding_profile(IntPtr raw, IntPtr profile);
|
|
|
|
public bool AddEncodingProfile(Gst.PbUtils.EncodingProfile profile) {
|
|
bool raw_ret = ges_project_add_encoding_profile(Handle, profile == null ? IntPtr.Zero : profile.Handle);
|
|
bool ret = raw_ret;
|
|
return ret;
|
|
}
|
|
|
|
[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
|
|
static extern void ges_project_add_formatter(IntPtr raw, IntPtr formatter);
|
|
|
|
public void AddFormatter(GES.Formatter formatter) {
|
|
ges_project_add_formatter(Handle, formatter == null ? IntPtr.Zero : formatter.Handle);
|
|
}
|
|
|
|
[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
|
|
static extern bool ges_project_create_asset(IntPtr raw, IntPtr id, IntPtr extractable_type);
|
|
|
|
public bool CreateAsset(string id, GLib.GType extractable_type) {
|
|
IntPtr native_id = GLib.Marshaller.StringToPtrGStrdup (id);
|
|
bool raw_ret = ges_project_create_asset(Handle, native_id, extractable_type.Val);
|
|
bool ret = raw_ret;
|
|
GLib.Marshaller.Free (native_id);
|
|
return ret;
|
|
}
|
|
|
|
public bool CreateAsset(GLib.GType extractable_type) {
|
|
return CreateAsset (null, extractable_type);
|
|
}
|
|
|
|
[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
|
|
static extern unsafe IntPtr ges_project_create_asset_sync(IntPtr raw, IntPtr id, IntPtr extractable_type, out IntPtr error);
|
|
|
|
public unsafe GES.Asset CreateAssetSync(string id, GLib.GType extractable_type) {
|
|
IntPtr native_id = GLib.Marshaller.StringToPtrGStrdup (id);
|
|
IntPtr error = IntPtr.Zero;
|
|
IntPtr raw_ret = ges_project_create_asset_sync(Handle, native_id, extractable_type.Val, out error);
|
|
GES.Asset ret = GLib.Object.GetObject(raw_ret, true) as GES.Asset;
|
|
GLib.Marshaller.Free (native_id);
|
|
if (error != IntPtr.Zero) throw new GLib.GException (error);
|
|
return ret;
|
|
}
|
|
|
|
public GES.Asset CreateAssetSync(GLib.GType extractable_type) {
|
|
return CreateAssetSync (null, extractable_type);
|
|
}
|
|
|
|
[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
|
|
static extern IntPtr ges_project_get_asset(IntPtr raw, IntPtr id, IntPtr extractable_type);
|
|
|
|
public GES.Asset GetAsset(string id, GLib.GType extractable_type) {
|
|
IntPtr native_id = GLib.Marshaller.StringToPtrGStrdup (id);
|
|
IntPtr raw_ret = ges_project_get_asset(Handle, native_id, extractable_type.Val);
|
|
GES.Asset ret = GLib.Object.GetObject(raw_ret, true) as GES.Asset;
|
|
GLib.Marshaller.Free (native_id);
|
|
return ret;
|
|
}
|
|
|
|
[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
|
|
static extern IntPtr ges_project_get_loading_assets(IntPtr raw);
|
|
|
|
public GES.Asset[] LoadingAssets {
|
|
get {
|
|
IntPtr raw_ret = ges_project_get_loading_assets(Handle);
|
|
GES.Asset[] ret = (GES.Asset[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(GES.Asset));
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
|
|
static extern IntPtr ges_project_list_assets(IntPtr raw, IntPtr filter);
|
|
|
|
public GES.Asset[] ListAssets(GLib.GType filter) {
|
|
IntPtr raw_ret = ges_project_list_assets(Handle, filter.Val);
|
|
GES.Asset[] ret = (GES.Asset[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(GES.Asset));
|
|
return ret;
|
|
}
|
|
|
|
[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
|
|
static extern IntPtr ges_project_list_encoding_profiles(IntPtr raw);
|
|
|
|
public Gst.PbUtils.EncodingProfile[] ListEncodingProfiles() {
|
|
IntPtr raw_ret = ges_project_list_encoding_profiles(Handle);
|
|
Gst.PbUtils.EncodingProfile[] ret = (Gst.PbUtils.EncodingProfile[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), false, false, typeof(Gst.PbUtils.EncodingProfile));
|
|
return ret;
|
|
}
|
|
|
|
[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
|
|
static extern unsafe bool ges_project_load(IntPtr raw, IntPtr timeline, out IntPtr error);
|
|
|
|
public unsafe bool Load(GES.Timeline timeline) {
|
|
IntPtr error = IntPtr.Zero;
|
|
bool raw_ret = ges_project_load(Handle, timeline == null ? IntPtr.Zero : timeline.Handle, out error);
|
|
bool ret = raw_ret;
|
|
if (error != IntPtr.Zero) throw new GLib.GException (error);
|
|
return ret;
|
|
}
|
|
|
|
[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
|
|
static extern bool ges_project_remove_asset(IntPtr raw, IntPtr asset);
|
|
|
|
public bool RemoveAsset(GES.Asset asset) {
|
|
bool raw_ret = ges_project_remove_asset(Handle, asset == null ? IntPtr.Zero : asset.Handle);
|
|
bool ret = raw_ret;
|
|
return ret;
|
|
}
|
|
|
|
[DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)]
|
|
static extern unsafe bool ges_project_save(IntPtr raw, IntPtr timeline, IntPtr uri, IntPtr formatter_asset, bool overwrite, out IntPtr error);
|
|
|
|
public unsafe bool Save(GES.Timeline timeline, string uri, GES.Asset formatter_asset, bool overwrite) {
|
|
IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
|
|
IntPtr error = IntPtr.Zero;
|
|
bool raw_ret = ges_project_save(Handle, timeline == null ? IntPtr.Zero : timeline.Handle, native_uri, formatter_asset == null ? IntPtr.Zero : formatter_asset.OwnedHandle, overwrite, out error);
|
|
bool ret = raw_ret;
|
|
GLib.Marshaller.Free (native_uri);
|
|
if (error != IntPtr.Zero) throw new GLib.GException (error);
|
|
return ret;
|
|
}
|
|
|
|
public bool Save(GES.Timeline timeline, string uri, bool overwrite) {
|
|
return Save (timeline, uri, null, overwrite);
|
|
}
|
|
|
|
|
|
static Project ()
|
|
{
|
|
GtkSharp.GstEditingServices.ObjectManager.Initialize ();
|
|
}
|
|
|
|
// Internal representation of the wrapped structure ABI.
|
|
static GLib.AbiStruct _abi_info = null;
|
|
static public new GLib.AbiStruct abi_info {
|
|
get {
|
|
if (_abi_info == null)
|
|
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
|
|
new GLib.AbiField("priv"
|
|
, GES.Asset.abi_info.Fields
|
|
, (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
|
|
, null
|
|
, "__ges_reserved"
|
|
, (uint) Marshal.SizeOf(typeof(IntPtr))
|
|
, 0
|
|
),
|
|
new GLib.AbiField("__ges_reserved"
|
|
, -1
|
|
, (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // __ges_reserved
|
|
, "priv"
|
|
, null
|
|
, (uint) Marshal.SizeOf(typeof(IntPtr))
|
|
, 0
|
|
),
|
|
});
|
|
|
|
return _abi_info;
|
|
}
|
|
}
|
|
|
|
|
|
// End of the ABI representation.
|
|
|
|
#endregion
|
|
}
|
|
}
|