This repository has been archived by the owner on Jan 21, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 414
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added binding for fullscreen functions
Based on work by - @LinoBarreca on Apr 17, 2015 (#44 (comment)) - @samarthshroff #514
- Loading branch information
1 parent
ffd3e87
commit 3551c88
Showing
6 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
src/Vlc.DotNet.Core.Interops/Signatures/libvlc_media_player.h/libvlc_get_fullscreen.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace Vlc.DotNet.Core.Interops.Signatures | ||
{ | ||
/// <summary> | ||
/// Get current fullscreen status. | ||
/// </summary> | ||
[LibVlcFunction("libvlc_get_fullscreen")] | ||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | ||
internal delegate int GetFullScreen(IntPtr mediaPlayerInstance); | ||
} |
12 changes: 12 additions & 0 deletions
12
src/Vlc.DotNet.Core.Interops/Signatures/libvlc_media_player.h/libvlc_set_fullscreen.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace Vlc.DotNet.Core.Interops.Signatures | ||
{ | ||
/// <summary> | ||
/// Set fullscreen. | ||
/// </summary> | ||
[LibVlcFunction("libvlc_set_fullscreen")] | ||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | ||
internal delegate void SetFullScreen(IntPtr mediaPlayerInstance, int value); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System; | ||
using Vlc.DotNet.Core.Interops.Signatures; | ||
|
||
namespace Vlc.DotNet.Core.Interops | ||
{ | ||
public sealed partial class VlcManager | ||
{ | ||
public int GetFullScreen(VlcMediaPlayerInstance mediaPlayerInstance) | ||
{ | ||
if (mediaPlayerInstance == IntPtr.Zero) | ||
throw new ArgumentException("Media player instance is not initialized."); | ||
return myLibraryLoader.GetInteropDelegate<GetFullScreen>().Invoke(mediaPlayerInstance); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System; | ||
using Vlc.DotNet.Core.Interops.Signatures; | ||
|
||
namespace Vlc.DotNet.Core.Interops | ||
{ | ||
public sealed partial class VlcManager | ||
{ | ||
public void SetFullScreen(VlcMediaPlayerInstance mediaPlayerInstance, bool fullScreen) | ||
{ | ||
if (mediaPlayerInstance == IntPtr.Zero) | ||
throw new ArgumentException("Media player instance is not initialized."); | ||
myLibraryLoader.GetInteropDelegate<SetFullScreen>().Invoke(mediaPlayerInstance, fullScreen ? 1 : 0); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters