Interface IVideoView
- Namespace
- VisioForge.Core.Types
- Assembly
- VisioForge.Core.dll
Defines a platform-agnostic interface for a video rendering view. This interface abstracts the underlying UI control used for displaying video, allowing the core engine to remain independent of any specific UI framework (e.g., WinForms, WPF, Android, iOS).
public interface IVideoViewRemarks
Implementations of this interface are responsible for managing a native UI element that can render video frames. It provides methods for lifecycle management, UI interaction, and event handling, including mouse input. The interface includes platform-specific sections to handle the unique requirements of different operating systems.
Methods
CallInvoke(Delegate, params object[])
Executes a delegate on the UI thread of the control.
void CallInvoke(Delegate method, params object[] args)Parameters
CallRefresh()
Forces the view to redraw or refresh its content.
void CallRefresh()ClearUI()
Clears the user interface, removing any overlays or graphics.
void ClearUI()GetBackgroundColor()
Gets the background color of the video view.
SKColor GetBackgroundColor()Returns
- SKColor
-
The background color as an SkiaSharp.SKColor.
GetHandle()
Gets the native window handle of the underlying UI control.
nint GetHandle()Returns
GetInvokeRequired()
Gets a value indicating whether the caller must use an invoke method when making calls to the control.
bool GetInvokeRequired()Returns
- bool
-
trueif the call must be invoked; otherwise,false.
GetIsHandleCreated()
Gets a value indicating whether the underlying UI control's handle has been created.
bool GetIsHandleCreated()Returns
- bool
-
trueif the handle is created; otherwise,false.
GetSize()
Gets the current size of the video view.
Size GetSize()Returns
- Size
-
The size as a VisioForge.Core.Types.Size structure.
GetUIEngine()
Gets the underlying UI engine being used by the view.
VideoViewUIEngine GetUIEngine()Returns
- VideoViewUIEngine
-
The VisioForge.Core.Types.VideoViewUIEngine used for rendering.
InvokeStart()
Signals the view that the engine has started.
void InvokeStart()InvokeStartComplete()
Signals the view that the engine has completed its start sequence.
void InvokeStartComplete()InvokeStop()
Signals the view that the engine has stopped.
void InvokeStop()InvokeVideoRendererUpdate()
Triggers an update of the video renderer.
void InvokeVideoRendererUpdate()LogDialogClear()
Clears all messages from the log dialog.
void LogDialogClear()LogDialogClose()
Closes the log dialog if it is open.
void LogDialogClose()LogDialogError(string)
Displays an error message in a dialog box.
void LogDialogError(string msg)Parameters
msgstring-
The error message to display.
PushMouseButtonDown(int, int, MouseButton)
Pushes a mouse button down event to the control.
void PushMouseButtonDown(int x, int y, MouseButton button)Parameters
xint-
The x-coordinate of the mouse.
yint-
The y-coordinate of the mouse.
buttonMouseButton-
The mouse button that was pressed.
PushMouseButtonUp(int, int, MouseButton)
Pushes a mouse button up event to the control.
void PushMouseButtonUp(int x, int y, MouseButton button)Parameters
xint-
The x-coordinate of the mouse.
yint-
The y-coordinate of the mouse.
buttonMouseButton-
The mouse button that was released.
PushMouseMove(int, int)
Pushes a mouse move event to the control for processing.
void PushMouseMove(int x, int y)Parameters
ResizeRoundTo(int)
Resizes the video view, rounding the dimensions to a specified value.
void ResizeRoundTo(int round)Parameters
roundint-
The value to round the dimensions to (e.g., 16).
SetHandle(nint)
Sets the native window handle. Used for embedding the video in a specific control.
void SetHandle(nint handle)Parameters
handlenint-
The window handle.
ShowMessage(string)
Shows a message box to the user.
MessageBoxResult ShowMessage(string message)Parameters
messagestring-
The message to display.
Returns
- MessageBoxResult
-
A VisioForge.Core.Types.MessageBoxResult indicating which button the user clicked.
OnMouseButtonDown
Occurs when a mouse button is pressed down over the control.
event EventHandler<MouseButtonEventArgs> OnMouseButtonDownEvent Type
OnMouseButtonUp
Occurs when a mouse button is released over the control.
event EventHandler<MouseButtonEventArgs> OnMouseButtonUpEvent Type
OnMouseMoved
Occurs when the mouse pointer is moved over the control.
event EventHandler<MouseMoveEventArgs> OnMouseMoved