(UIElement source) where T : new()
- {
- if (source == null)
- return new T();
-
- var savedObject = System.Windows.Markup.XamlWriter.Save(source);
-
- var stringReader = new StringReader(savedObject);
- var xmlReader = System.Xml.XmlReader.Create(stringReader);
-
- return (T)System.Windows.Markup.XamlReader.Load(xmlReader);
- }
-
- public static Storyboard FindStoryboard(this FrameworkElement visual, string key)
- {
- var resource = visual.FindResource(key) as Storyboard;
-
- if (resource == null)
- return new Storyboard();
-
- return resource;
- }
- }
-}
\ No newline at end of file
diff --git a/README.md b/README.md
index 59638c672..77b0f9da5 100644
--- a/README.md
+++ b/README.md
@@ -1,58 +1,72 @@
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-This tool allows you to record a selected area of your screen, live feed from your webcam or live drawings from a sketchboard. Afterwards, you can edit and save the animation as a gif, apng, video, psd or png images.
+
+
+This tool allows you to record a selected area of your screen, live feed from your webcam or live drawings from a sketchboard. Afterward, you can edit and save the animation as a gif, apng, video, psd or png image.
-
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
-⚠️ Attention, it requires .Net Framework 4.8 (or above).
- ⚠️
+ ⚠️
+ Attention, it requires .NET 9 Desktop Runtime (or above).
+ ⚠️
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Would you like to help the project?
@@ -62,7 +76,7 @@
* Ko-fi donation: [](https://ko-fi.com/B0B7Y5Z9)
* Flattr subscription: https://flattr.com/@NickeManarin/domain/screentogif.com
* Steam wishlist: [](http://steamcommunity.com/id/nickesm/wishlist)
- * GOG Galaxy wishlist: www.gog.com/u/Nickesm/wishlist
+ * GOG Galaxy wishlist: https://www.gog.com/u/Nickesm/wishlist
* Amazon wishlist: https://www.amazon.com/hz/wishlist/ls/2S54SRWY2K8KF?ref_=wl_share
* Feedback (reporting bugs, ideas, etc) [](https://twitter.com/NickeManarin)
* [Anyone can still contribute to the localization of the app/website/installer](https://github.com/NickeManarin/ScreenToGif/blob/master/LOCALIZATION.md)
@@ -78,35 +92,38 @@ That's not why I'm sharing the source code, at all.
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
Mentions
The creator also distributes this app via these websites
diff --git a/ScreenToGif.Cloud.YandexDisk.Tests/Properties/AssemblyInfo.cs b/ScreenToGif.Cloud.YandexDisk.Tests/Properties/AssemblyInfo.cs
deleted file mode 100644
index 4724a6322..000000000
--- a/ScreenToGif.Cloud.YandexDisk.Tests/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-[assembly: AssemblyTitle("ScreenToGif.Cloud.YandexDisk.Tests")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("ScreenToGif.Cloud.YandexDisk.Tests")]
-[assembly: AssemblyCopyright("Copyright © 2018")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-[assembly: ComVisible(false)]
-
-[assembly: Guid("2e037df4-b0ad-43ed-9b99-4623ddf86f5d")]
-
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/ScreenToGif.Cloud.YandexDisk.Tests/ScreenToGif.Cloud.YandexDisk.Tests.csproj b/ScreenToGif.Cloud.YandexDisk.Tests/ScreenToGif.Cloud.YandexDisk.Tests.csproj
deleted file mode 100644
index 3006d33f8..000000000
--- a/ScreenToGif.Cloud.YandexDisk.Tests/ScreenToGif.Cloud.YandexDisk.Tests.csproj
+++ /dev/null
@@ -1,78 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {2E037DF4-B0AD-43ED-9B99-4623DDF86F5D}
- Library
- Properties
- ScreenToGif.Cloud.YandexDisk.Tests
- ScreenToGif.Cloud.YandexDisk.Tests
- v4.6.1
- 512
- {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 15.0
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
- $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages
- False
- UnitTest
-
-
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
- ..\packages\MSTest.TestFramework.1.1.18\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll
-
-
- ..\packages\MSTest.TestFramework.1.1.18\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
- PreserveNewest
-
-
-
-
- {9a332077-74ba-4c6a-8381-6d98c31a490a}
- ScreenToGif
-
-
-
-
-
-
- Данный проект ссылается на пакеты NuGet, отсутствующие на этом компьютере. Используйте восстановление пакетов NuGet, чтобы скачать их. Дополнительную информацию см. по адресу: http://go.microsoft.com/fwlink/?LinkID=322105. Отсутствует следующий файл: {0}.
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ScreenToGif.Cloud.YandexDisk.Tests/YandexDiskTests.cs b/ScreenToGif.Cloud.YandexDisk.Tests/YandexDiskTests.cs
deleted file mode 100644
index 2e2e174a9..000000000
--- a/ScreenToGif.Cloud.YandexDisk.Tests/YandexDiskTests.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-using System;
-using System.Diagnostics;
-using System.Net;
-using System.Threading;
-using System.Threading.Tasks;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
-namespace ScreenToGif.Cloud.YandexDisk.Tests
-{
- [TestClass]
- public class YandexDiskTests
- {
- [TestMethod]
- public async Task CanUploadFile()
- {
- var cloud = new YandexDisk("2344534523e45LW2jwerdp-efUwe4rmg"); //Paste your OAuth token
-
- // upload
- var result = await cloud.UploadFileAsync("1.txt", CancellationToken.None);
-
- Assert.IsNotNull(result);
- Assert.AreEqual(false, string.IsNullOrEmpty(result.Link));
-
- Trace.WriteLine("link: " + result.Link);
-
- // download
- var data = new WebClient().DownloadData(result.Link);
- Assert.IsNotNull(data);
- }
-
- [TestMethod]
- [ExpectedException(typeof(UploadingException))]
- public async Task ThrowExceptionWhenUploadFileWithInvalidToken()
- {
- var cloud = new YandexDisk("invalid token");
-
- // upload
- var result = await cloud.UploadFileAsync("1.txt", CancellationToken.None);
- }
- }
-}
diff --git a/ScreenToGif.Cloud.YandexDisk.Tests/packages.config b/ScreenToGif.Cloud.YandexDisk.Tests/packages.config
deleted file mode 100644
index d8c1b9099..000000000
--- a/ScreenToGif.Cloud.YandexDisk.Tests/packages.config
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/AdornerPlacement.cs b/ScreenToGif.Model/Enums/AdornerPlacement.cs
new file mode 100644
index 000000000..acf8532aa
--- /dev/null
+++ b/ScreenToGif.Model/Enums/AdornerPlacement.cs
@@ -0,0 +1,10 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// Specifies the placement of the adorner in related to the adorned control.
+///
+public enum AdornerPlacement
+{
+ Inside,
+ Outside
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/AppThemes.cs b/ScreenToGif.Model/Enums/AppThemes.cs
new file mode 100644
index 000000000..c44a09f44
--- /dev/null
+++ b/ScreenToGif.Model/Enums/AppThemes.cs
@@ -0,0 +1,10 @@
+namespace ScreenToGif.Domain.Enums;
+
+public enum AppThemes
+{
+ Light,
+ Medium,
+ Dark,
+ VeryDark,
+ FollowSystem
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/ApplicationTypes.cs b/ScreenToGif.Model/Enums/ApplicationTypes.cs
new file mode 100644
index 000000000..be49d9596
--- /dev/null
+++ b/ScreenToGif.Model/Enums/ApplicationTypes.cs
@@ -0,0 +1,30 @@
+namespace ScreenToGif.Domain.Enums;
+
+public enum ApplicationTypes
+{
+ Unidentified = 0,
+
+ ///
+ /// Light package (.NET 6 desktop runtime download and installation required).
+ /// Distributted as a single file, as an EXE.
+ ///
+ DependantSingle = 1,
+
+ ///
+ /// Full package (.NET 6 desktop runtime included).
+ /// Distributted as a single file, as an EXE.
+ ///
+ FullSingle = 2,
+
+ ///
+ /// Full package (.NET 6 desktop runtime included).
+ /// Distributted as multiple files, as a MSIX for the outside the Store.
+ ///
+ FullMultiMsix = 3,
+
+ ///
+ /// Full package (.NET 6 desktop runtime included).
+ /// Distributted as multiple files, as a MSIX for the Store.
+ ///
+ FullMultiMsixStore = 4,
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/CaptureFrequencies.cs b/ScreenToGif.Model/Enums/CaptureFrequencies.cs
new file mode 100644
index 000000000..3e4b833bc
--- /dev/null
+++ b/ScreenToGif.Model/Enums/CaptureFrequencies.cs
@@ -0,0 +1,13 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// Type of capture frequency mode for the screen recorder.
+///
+public enum CaptureFrequencies
+{
+ Manual,
+ Interaction,
+ PerSecond,
+ PerMinute,
+ PerHour
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/ColorQuantizationType.cs b/ScreenToGif.Model/Enums/ColorQuantizationType.cs
new file mode 100644
index 000000000..36f8d9f8c
--- /dev/null
+++ b/ScreenToGif.Model/Enums/ColorQuantizationType.cs
@@ -0,0 +1,14 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// Type of color quantization methods of the gif encoder.
+///
+public enum ColorQuantizationTypes
+{
+ Neural = 0,
+ Octree = 1,
+ MedianCut = 2,
+ Grayscale = 3,
+ MostUsed = 4,
+ Palette = 5,
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/CopyModes.cs b/ScreenToGif.Model/Enums/CopyModes.cs
new file mode 100644
index 000000000..f5bbe57c0
--- /dev/null
+++ b/ScreenToGif.Model/Enums/CopyModes.cs
@@ -0,0 +1,12 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// Specifies the copy operation mode.
+///
+public enum CopyModes
+{
+ File,
+ FolderPath,
+ FilePath,
+ Link
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/DelayChangeType.cs b/ScreenToGif.Model/Enums/DelayChangeType.cs
new file mode 100644
index 000000000..e1524c221
--- /dev/null
+++ b/ScreenToGif.Model/Enums/DelayChangeType.cs
@@ -0,0 +1,11 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// Type of delay change action.
+///
+public enum DelayChangeType
+{
+ Override,
+ IncreaseDecrease,
+ Scale
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/DelayUpdateModes.cs b/ScreenToGif.Model/Enums/DelayUpdateModes.cs
new file mode 100644
index 000000000..670130915
--- /dev/null
+++ b/ScreenToGif.Model/Enums/DelayUpdateModes.cs
@@ -0,0 +1,8 @@
+namespace ScreenToGif.Domain.Enums;
+
+public enum DelayUpdateModes
+{
+ Override = 0,
+ IncreaseDecrease = 1,
+ Scale = 2
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/DitherMethods.cs b/ScreenToGif.Model/Enums/DitherMethods.cs
new file mode 100644
index 000000000..9d1483bbc
--- /dev/null
+++ b/ScreenToGif.Model/Enums/DitherMethods.cs
@@ -0,0 +1,24 @@
+using System.ComponentModel;
+
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// Dither methods, currently being used by FFmpeg.
+///
+public enum DitherMethods
+{
+ [Description("bayer")]
+ Bayer,
+
+ [Description("heckbert")]
+ Heckbert,
+
+ [Description("floyd_steinberg")]
+ FloydSteinberg,
+
+ [Description("sierra2")]
+ Sierra2,
+
+ [Description("sierra2_4a")]
+ Sierra2Lite,
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/DrawingModeType.cs b/ScreenToGif.Model/Enums/DrawingModeType.cs
new file mode 100644
index 000000000..85808bdea
--- /dev/null
+++ b/ScreenToGif.Model/Enums/DrawingModeType.cs
@@ -0,0 +1,18 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// The types of drawings.
+///
+public enum DrawingModeType
+{
+ None = 0,
+ Ink,
+ Select,
+ EraseByPoint,
+ EraseByObject,
+ Rectangle,
+ Circle,
+ Triangle,
+ Arrow,
+ Balloon,
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/DuplicatesDelayModes.cs b/ScreenToGif.Model/Enums/DuplicatesDelayModes.cs
new file mode 100644
index 000000000..d6450ac58
--- /dev/null
+++ b/ScreenToGif.Model/Enums/DuplicatesDelayModes.cs
@@ -0,0 +1,11 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// Specifies the frame delay adjustment mode.
+///
+public enum DuplicatesDelayModes
+{
+ DontAdjust = 0,
+ Average = 1,
+ Sum = 2
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/DuplicatesRemovalModes.cs b/ScreenToGif.Model/Enums/DuplicatesRemovalModes.cs
new file mode 100644
index 000000000..0566b087b
--- /dev/null
+++ b/ScreenToGif.Model/Enums/DuplicatesRemovalModes.cs
@@ -0,0 +1,10 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// Specifies the frame removal mode.
+///
+public enum DuplicatesRemovalModes
+{
+ First = 0,
+ Last = 1
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/EncoderTypes.cs b/ScreenToGif.Model/Enums/EncoderTypes.cs
new file mode 100644
index 000000000..90af433c1
--- /dev/null
+++ b/ScreenToGif.Model/Enums/EncoderTypes.cs
@@ -0,0 +1,10 @@
+namespace ScreenToGif.Domain.Enums;
+
+public enum EncoderTypes
+{
+ ScreenToGif, //Gif, Apng
+ KGySoft, // Gif
+ System, //Gif, Video
+ FFmpeg, //Gif, Webp, Apng, Avif, Video
+ Gifski //Gif
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/EncodingStatus.cs b/ScreenToGif.Model/Enums/EncodingStatus.cs
new file mode 100644
index 000000000..e5e57983e
--- /dev/null
+++ b/ScreenToGif.Model/Enums/EncodingStatus.cs
@@ -0,0 +1,32 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// Encoding status.
+///
+public enum EncodingStatus
+{
+ ///
+ /// Processing encoding/uploading status.
+ ///
+ Processing,
+
+ ///
+ /// The Encoding was canceled. So apparently "cancelled" (with two L's) is also a valid grammar. Huh, that's strange.
+ ///
+ Canceled,
+
+ ///
+ /// An error happened with the encoding process.
+ ///
+ Error,
+
+ ///
+ /// Encoding done.
+ ///
+ Completed,
+
+ ///
+ /// File deleted or Moved.
+ ///
+ FileDeletedOrMoved
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/ExitAction.cs b/ScreenToGif.Model/Enums/ExitAction.cs
new file mode 100644
index 000000000..b74e0d78f
--- /dev/null
+++ b/ScreenToGif.Model/Enums/ExitAction.cs
@@ -0,0 +1,22 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// Exit actions after closing the Recording Window.
+///
+public enum ExitAction
+{
+ ///
+ /// Return to the StartUp Window.
+ ///
+ Return = 0,
+
+ ///
+ /// Something was recorded. Go to the Editor.
+ ///
+ Recorded = 1,
+
+ ///
+ /// Exit the application.
+ ///
+ Exit = 2,
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/ExportFormats.cs b/ScreenToGif.Model/Enums/ExportFormats.cs
new file mode 100644
index 000000000..11202db60
--- /dev/null
+++ b/ScreenToGif.Model/Enums/ExportFormats.cs
@@ -0,0 +1,87 @@
+namespace ScreenToGif.Domain.Enums;
+
+public enum ExportFormats
+{
+ ///
+ /// Graphics Interchange Format.
+ ///
+ Gif,
+
+ ///
+ /// Animated Portable Network Graphics.
+ ///
+ Apng,
+
+ ///
+ /// Web Picture.
+ ///
+ Webp,
+
+ ///
+ /// Better portable graphics.
+ ///
+ Bpg,
+
+ ///
+ /// AV1 Still Image Format.
+ ///
+ Avif,
+
+ ///
+ /// Audio Video Interleaved.
+ ///
+ Avi,
+
+ ///
+ /// Matroska.
+ ///
+ Mkv,
+
+ ///
+ /// Quicktime movie.
+ ///
+ Mov,
+
+ ///
+ /// MPEG-4 Part 14.
+ ///
+ Mp4,
+
+ ///
+ /// Web Movie.
+ ///
+ Webm,
+
+
+ ///
+ /// Bitmap.
+ ///
+ Bmp,
+
+ ///
+ /// Joint Photographic Experts Group.
+ ///
+ Jpeg,
+
+ ///
+ /// Portable Network Graphics.
+ ///
+ Png,
+
+
+ ///
+ /// Project file, .stg or .zip.
+ ///
+ Stg,
+
+ ///
+ /// Photoshop file.
+ ///
+ Psd,
+
+ ///
+ /// Compressed file.
+ /// Not in directly use by the encoder, but as an option for the images and the project.
+ ///
+ Zip
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/ExtrasStatus.cs b/ScreenToGif.Model/Enums/ExtrasStatus.cs
new file mode 100644
index 000000000..1e17c92fc
--- /dev/null
+++ b/ScreenToGif.Model/Enums/ExtrasStatus.cs
@@ -0,0 +1,13 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// Specifies the status of the image card control.
+///
+public enum ExtrasStatus
+{
+ NotAvailable,
+ Available,
+ Processing,
+ Ready,
+ Error
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/FadeModes.cs b/ScreenToGif.Model/Enums/FadeModes.cs
new file mode 100644
index 000000000..88d3b078b
--- /dev/null
+++ b/ScreenToGif.Model/Enums/FadeModes.cs
@@ -0,0 +1,17 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// The type of fade transition.
+///
+public enum FadeModes
+{
+ ///
+ /// The next frame of the recording.
+ ///
+ NextFrame,
+
+ ///
+ /// A solid color.
+ ///
+ Color
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/FlipRotateType.cs b/ScreenToGif.Model/Enums/FlipRotateType.cs
new file mode 100644
index 000000000..8bd28ee5d
--- /dev/null
+++ b/ScreenToGif.Model/Enums/FlipRotateType.cs
@@ -0,0 +1,12 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// Type of the Flip/Rotate action.
+///
+public enum FlipRotateType
+{
+ FlipHorizontal,
+ FlipVertical,
+ RotateRight90,
+ RotateLeft90
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Framerates.cs b/ScreenToGif.Model/Enums/Framerates.cs
new file mode 100644
index 000000000..3e6da0fde
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Framerates.cs
@@ -0,0 +1,10 @@
+namespace ScreenToGif.Domain.Enums;
+
+public enum Framerates
+{
+ Auto,
+ Custom,
+ Film,
+ Ntsc,
+ Pal
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/HardwareAcceleration.cs b/ScreenToGif.Model/Enums/HardwareAcceleration.cs
new file mode 100644
index 000000000..9e0a5ea45
--- /dev/null
+++ b/ScreenToGif.Model/Enums/HardwareAcceleration.cs
@@ -0,0 +1,19 @@
+namespace ScreenToGif.Domain.Enums;
+
+public enum HardwareAccelerationModes
+{
+ ///
+ /// Only lets you select non-hardware backed encoders.
+ ///
+ Off,
+
+ ///
+ /// Lets you select hardware backed encoders too. -hwaccel auto
+ ///
+ On,
+
+ ///
+ /// Only lets you select non-hardware backed encoders, but switches to one if possible. -hwaccel auto
+ ///
+ Auto
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Icons.cs b/ScreenToGif.Model/Enums/Icons.cs
new file mode 100644
index 000000000..735503a46
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Icons.cs
@@ -0,0 +1,32 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// Dialog Icons.
+///
+public enum Icons
+{
+ ///
+ /// Information. Blue.
+ ///
+ Info,
+
+ ///
+ /// Warning, yellow.
+ ///
+ Warning,
+
+ ///
+ /// Error, red.
+ ///
+ Error,
+
+ ///
+ /// Success, green.
+ ///
+ Success,
+
+ ///
+ /// A question mark, blue.
+ ///
+ Question,
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/ModeType.cs b/ScreenToGif.Model/Enums/ModeType.cs
new file mode 100644
index 000000000..474b99cdf
--- /dev/null
+++ b/ScreenToGif.Model/Enums/ModeType.cs
@@ -0,0 +1,11 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// The type of capture area selection.
+///
+public enum ModeType
+{
+ Region = 0,
+ Window = 1,
+ Fullscreen = 2
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/MouseButtons.cs b/ScreenToGif.Model/Enums/MouseButtons.cs
new file mode 100644
index 000000000..94e2ac416
--- /dev/null
+++ b/ScreenToGif.Model/Enums/MouseButtons.cs
@@ -0,0 +1,11 @@
+namespace ScreenToGif.Domain.Enums;
+
+public enum MouseButtons
+{
+ None,
+ Left,
+ Middle,
+ Right,
+ FirstExtra,
+ SecondExtra,
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/MouseEventType.cs b/ScreenToGif.Model/Enums/MouseEventType.cs
new file mode 100644
index 000000000..eac409217
--- /dev/null
+++ b/ScreenToGif.Model/Enums/MouseEventType.cs
@@ -0,0 +1,16 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// Event flags for mouse-related events.
+///
+public enum MouseEventType
+{
+ MouseMove,
+ IconRightMouseDown,
+ IconLeftMouseDown,
+ IconRightMouseUp,
+ IconLeftMouseUp,
+ IconMiddleMouseDown,
+ IconMiddleMouseUp,
+ IconLeftDoubleClick
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/BaloonFlags.cs b/ScreenToGif.Model/Enums/Native/BaloonFlags.cs
new file mode 100644
index 000000000..b403f45ac
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/BaloonFlags.cs
@@ -0,0 +1,60 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+///
+/// Flags that define the icon that is shown on a balloon
+/// tooltip.
+///
+public enum BalloonFlags
+{
+ ///
+ /// No icon is displayed.
+ ///
+ None = 0x00,
+
+ ///
+ /// An information icon is displayed.
+ ///
+ Info = 0x01,
+
+ ///
+ /// A warning icon is displayed.
+ ///
+ Warning = 0x02,
+
+ ///
+ /// An error icon is displayed.
+ ///
+ Error = 0x03,
+
+ ///
+ /// Windows XP Service Pack 2 (SP2) and later.
+ /// Use a custom icon as the title icon.
+ ///
+ User = 0x04,
+
+ ///
+ /// Windows XP (Shell32.dll version 6.0) and later.
+ /// Do not play the associated sound. Applies only to balloon ToolTips.
+ ///
+ NoSound = 0x10,
+
+ ///
+ /// Windows Vista (Shell32.dll version 6.0.6) and later. The large version
+ /// of the icon should be used as the balloon icon. This corresponds to the
+ /// icon with dimensions SM_CXICON x SM_CYICON. If this flag is not set,
+ /// the icon with dimensions XM_CXSMICON x SM_CYSMICON is used.
+ /// - This flag can be used with all stock icons.
+ /// - Applications that use older customized icons (NIIF_USER with hIcon) must
+ /// provide a new SM_CXICON x SM_CYICON version in the tray icon (hIcon). These
+ /// icons are scaled down when they are displayed in the System Tray or
+ /// System Control Area (SCA).
+ /// - New customized icons (NIIF_USER with hBalloonIcon) must supply an
+ /// SM_CXICON x SM_CYICON version in the supplied icon (hBalloonIcon).
+ ///
+ LargeIcon = 0x20,
+
+ ///
+ /// Windows 7 and later.
+ ///
+ RespectQuietTime = 0x80
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/BitmapCompressionModes.cs b/ScreenToGif.Model/Enums/Native/BitmapCompressionModes.cs
new file mode 100644
index 000000000..15c3c433a
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/BitmapCompressionModes.cs
@@ -0,0 +1,11 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+public enum BitmapCompressionModes : uint
+{
+ Rgb = 0,
+ Rle8 = 1,
+ Rle4 = 2,
+ BitFields = 3,
+ Jpeg = 4,
+ Png = 5
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/CopyPixelOperations.cs b/ScreenToGif.Model/Enums/Native/CopyPixelOperations.cs
new file mode 100644
index 000000000..edd33b61b
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/CopyPixelOperations.cs
@@ -0,0 +1,63 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+///
+///Specifies a raster-operation code. These codes define how the color data for the
+///source rectangle is to be combined with the color data for the destination
+///rectangle to achieve the final color.
+///
+[Flags]
+public enum CopyPixelOperations
+{
+ NoMirrorBitmap = -2147483648,
+
+ /// dest = BLACK, 0x00000042
+ Blackness = 66,
+
+ ///dest = (NOT src) AND (NOT dest), 0x001100A6
+ NotSourceErase = 1114278,
+
+ ///dest = (NOT source), 0x00330008
+ NotSourceCopy = 3342344,
+
+ ///dest = source AND (NOT dest), 0x00440328
+ SourceErase = 4457256,
+
+ /// dest = (NOT dest), 0x00550009
+ DestinationInvert = 5570569,
+
+ /// dest = pattern XOR dest, 0x005A0049
+ PatInvert = 5898313,
+
+ ///dest = source XOR dest, 0x00660046
+ SourceInvert = 6684742,
+
+ ///dest = source AND dest, 0x008800C6
+ SourceAnd = 8913094,
+
+ /// dest = (NOT source) OR dest, 0x00BB0226
+ MergePaint = 12255782,
+
+ ///dest = (source AND pattern), 0x00C000CA
+ MergeCopy = 12583114,
+
+ ///dest = source, 0x00CC0020
+ SourceCopy = 13369376,
+
+ /// dest = source OR dest, 0x00EE0086
+ SourcePaint = 15597702,
+
+ /// dest = pattern, 0x00F00021
+ PatCopy = 15728673,
+
+ /// dest = DPSnoo, 0x00FB0A09
+ PatPaint = 16452105,
+
+ /// dest = WHITE, 0x00FF0062
+ Whiteness = 16711778,
+
+ ///
+ /// Capture window as seen on screen. This includes layered windows
+ /// such as WPF windows with AllowsTransparency="true", 0x40000000
+ ///
+ CaptureBlt = 1073741824,
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/CornerPreferences.cs b/ScreenToGif.Model/Enums/Native/CornerPreferences.cs
new file mode 100644
index 000000000..8b3826967
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/CornerPreferences.cs
@@ -0,0 +1,29 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+///
+/// Flags used by the DwmSetWindowAttribute function to specify the rounded corner preference for a window.
+/// https://docs.microsoft.com/en-us/windows/win32/api/dwmapi/ne-dwmapi-dwm_window_corner_preference
+/// Windows Build 22000
+///
+public enum CornerPreferences
+{
+ ///
+ /// Let the system decide when to round window corners.
+ ///
+ Default = 0,
+
+ ///
+ /// Never round window corners.
+ ///
+ DoNotRound = 1,
+
+ ///
+ /// Round the corners, if appropriate.
+ ///
+ Round = 2,
+
+ ///
+ /// Round the corners if appropriate, with a small radius.
+ ///
+ RoundSmall = 3
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/DeviceCaps.cs b/ScreenToGif.Model/Enums/Native/DeviceCaps.cs
new file mode 100644
index 000000000..cdbdddfd7
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/DeviceCaps.cs
@@ -0,0 +1,7 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+public enum DeviceCaps : int
+{
+ LogPixelsX = 88,
+ LogPixelsY = 90,
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/DibColorModes.cs b/ScreenToGif.Model/Enums/Native/DibColorModes.cs
new file mode 100644
index 000000000..2d9f2a7c5
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/DibColorModes.cs
@@ -0,0 +1,7 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+public enum DibColorModes : uint
+{
+ RgbColors = 0,
+ PalColors = 1
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/DisplayDeviceStates.cs b/ScreenToGif.Model/Enums/Native/DisplayDeviceStates.cs
new file mode 100644
index 000000000..b82517154
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/DisplayDeviceStates.cs
@@ -0,0 +1,40 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+[Flags]
+public enum DisplayDeviceStates : int
+{
+ ///
+ /// The device is part of the desktop.
+ ///
+ AttachedToDesktop = 0x1,
+
+ MultiDriver = 0x2,
+
+ ///
+ /// The device is part of the desktop.
+ ///
+ PrimaryDevice = 0x4,
+
+ ///
+ /// Represents a pseudo device used to mirror application drawing for remoting or other purposes.
+ ///
+ MirroringDriver = 0x8,
+
+ ///
+ /// The device is VGA compatible.
+ ///
+ VgaCompatible = 0x10,
+
+ ///
+ /// The device is removable; it cannot be the primary display.
+ ///
+ Removable = 0x20,
+
+ ///
+ /// The device has more display modes than its output devices support.
+ ///
+ ModesPruned = 0x8000000,
+
+ Remote = 0x4000000,
+ Disconnect = 0x2000000
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/DisplayDevices.cs b/ScreenToGif.Model/Enums/Native/DisplayDevices.cs
new file mode 100644
index 000000000..c1dab1e6b
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/DisplayDevices.cs
@@ -0,0 +1,31 @@
+using System.Runtime.InteropServices;
+
+namespace ScreenToGif.Domain.Enums.Native;
+
+[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
+public struct DisplayDevices
+{
+ public DisplayDevices(bool? filler) : this()
+ {
+ //Allows automatic initialization of "Size" with "new DisplayDevice(null/true/false)".
+ Size = Marshal.SizeOf(typeof(DisplayDevices));
+ }
+
+ [MarshalAs(UnmanagedType.U4)]
+ public int Size;
+
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
+ public string DeviceName;
+
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]
+ public string DeviceString;
+
+ [MarshalAs(UnmanagedType.U4)]
+ public DisplayDeviceStates StateFlags;
+
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]
+ public string DeviceID;
+
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]
+ public string DeviceKey;
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/DpiTypes.cs b/ScreenToGif.Model/Enums/Native/DpiTypes.cs
new file mode 100644
index 000000000..b3aba5963
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/DpiTypes.cs
@@ -0,0 +1,11 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+///
+/// https://msdn.microsoft.com/en-us/library/windows/desktop/dn280511(v=vs.85).aspx
+///
+public enum DpiTypes
+{
+ Effective = 0,
+ Angular = 1,
+ Raw = 2
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/DwmWindowAttributes.cs b/ScreenToGif.Model/Enums/Native/DwmWindowAttributes.cs
new file mode 100644
index 000000000..8d7cc62f6
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/DwmWindowAttributes.cs
@@ -0,0 +1,38 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+public enum DwmWindowAttributes
+{
+ NcRenderingEnabled = 1,
+ NcRenderingPolicy,
+ TransitionsForcedisabled,
+ AllowNcPaint,
+ CaptionButtonBounds,
+ NonclientRtlLayout,
+ ForceIconicRepresentation,
+ Flip3DPolicy,
+ ExtendedFrameBounds,
+ HasIconicBitmap,
+ DisallowPeek,
+ ExcludedFromPeek,
+ Cloak,
+ Cloaked,
+ FreezeRepresentation,
+ PassiveUpdateMode,
+ UseHostBackdropBrush,
+ UseImmersiveDarkModeBefore20H1 = 19, //For Windows 10 versions before 2004.
+ UseImmersiveDarkMode = 20,
+ WindowCornerPreference = 33,
+ BorderColor,
+ CaptionColor,
+ TextColor,
+ VisibleFrameBorderThickness,
+
+ ///
+ /// Retrieves or specifies the system-drawn backdrop material of a window, including behind the non-client area.
+ /// The pvAttribute parameter points to a value of type SystemBackdropTypes.
+ ///
+ SystemBackdropType,
+
+ MicaEffect = 1029,
+ Last
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/GetAncestorFlags.cs b/ScreenToGif.Model/Enums/Native/GetAncestorFlags.cs
new file mode 100644
index 000000000..11bed96f0
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/GetAncestorFlags.cs
@@ -0,0 +1,17 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+public enum GetAncestorFlags
+{
+ ///
+ /// Retrieves the parent window. This does not include the owner, as it does with the GetParent function.
+ ///
+ GetParent = 1,
+ ///
+ /// Retrieves the root window by walking the chain of parent windows.
+ ///
+ GetRoot = 2,
+ ///
+ /// Retrieves the owned root window by walking the chain of parent and owner windows returned by GetParent.
+ ///
+ GetRootOwner = 3
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/GetWindowTypes.cs b/ScreenToGif.Model/Enums/Native/GetWindowTypes.cs
new file mode 100644
index 000000000..63d400045
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/GetWindowTypes.cs
@@ -0,0 +1,59 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+public enum GetWindowType : uint
+{
+ ///
+ /// The retrieved handle identifies the window of the same type that is highest in the Z order.
+ ///
+ /// If the specified window is a topmost window, the handle identifies a topmost window.
+ /// If the specified window is a top-level window, the handle identifies a top-level window.
+ /// If the specified window is a child window, the handle identifies a sibling window.
+ ///
+ HwndFirst = 0,
+
+ ///
+ /// The retrieved handle identifies the window of the same type that is lowest in the Z order.
+ ///
+ /// If the specified window is a topmost window, the handle identifies a topmost window.
+ /// If the specified window is a top-level window, the handle identifies a top-level window.
+ /// If the specified window is a child window, the handle identifies a sibling window.
+ ///
+ HwdnLast = 1,
+
+ ///
+ /// The retrieved handle identifies the window below the specified window in the Z order.
+ ///
+ /// If the specified window is a topmost window, the handle identifies a topmost window.
+ /// If the specified window is a top-level window, the handle identifies a top-level window.
+ /// If the specified window is a child window, the handle identifies a sibling window.
+ ///
+ HwndNext = 2,
+
+ ///
+ /// The retrieved handle identifies the window above the specified window in the Z order.
+ ///
+ /// If the specified window is a topmost window, the handle identifies a topmost window.
+ /// If the specified window is a top-level window, the handle identifies a top-level window.
+ /// If the specified window is a child window, the handle identifies a sibling window.
+ ///
+ HwndPrev = 3,
+
+ ///
+ /// The retrieved handle identifies the specified window's owner window, if any.
+ ///
+ Owner = 4,
+
+ ///
+ /// The retrieved handle identifies the child window at the top of the Z order,
+ /// if the specified window is a parent window; otherwise, the retrieved handle is NULL.
+ /// The function examines only child windows of the specified window. It does not examine descendant windows.
+ ///
+ Child = 5,
+
+ ///
+ /// The retrieved handle identifies the enabled popup window owned by the specified window (the
+ /// search uses the first such window found using HwndNext); otherwise, if there are no enabled
+ /// popup windows, the retrieved handle is that of the specified window.
+ ///
+ EnabledPopup = 6
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/HitTestTargets.cs b/ScreenToGif.Model/Enums/Native/HitTestTargets.cs
new file mode 100644
index 000000000..23bb19bab
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/HitTestTargets.cs
@@ -0,0 +1,134 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+public enum HitTestTargets : int
+{
+ ///
+ /// In the border of a window that does not have a sizing border.
+ ///
+ Border = 18,
+
+ ///
+ /// In the lower-horizontal border of a resizable window (the user can click the mouse to resize the window vertically).
+ ///
+ Bottom = 15,
+
+ ///
+ /// In the lower-left corner of a border of a resizable window (the user can click the mouse to resize the window diagonally).
+ ///
+ BottomLeft = 16,
+
+ ///
+ /// In the lower-right corner of a border of a resizable window (the user can click the mouse to resize the window diagonally).
+ ///
+ BottomRight = 17,
+
+ ///
+ /// In a title bar.
+ ///
+ Caption = 2,
+
+ ///
+ /// In a client area.
+ ///
+ Client = 1,
+
+ ///
+ /// In a Close button.
+ ///
+ CloseButton = 20,
+
+ ///
+ /// On the screen background or on a dividing line between windows (same as HTNOWHERE, except that the DefWindowProc function produces a system beep to indicate an error).
+ ///
+ Error = -2,
+
+ ///
+ /// In a size box (same as HTSIZE).
+ ///
+ GrowBox = 4,
+
+ ///
+ /// In a Help button.
+ ///
+ Help = 21,
+
+ ///
+ /// In a horizontal scroll bar.
+ ///
+ HorizontalScroll = 6,
+
+ ///
+ /// In the left border of a resizable window (the user can click the mouse to resize the window horizontally).
+ ///
+ Left = 10,
+
+ ///
+ /// In a menu.
+ ///
+ Menu = 5,
+
+ ///
+ /// In a Maximize button.
+ ///
+ MaximizeButton = 9,
+
+ ///
+ /// In a Minimize button.
+ ///
+ MinimizeButton = 8,
+
+ ///
+ /// On the screen background or on a dividing line between windows.
+ ///
+ Nowhere = 0,
+
+ ///
+ /// In a Minimize button.
+ ///
+ Reduce = MinimizeButton,
+
+ ///
+ /// In the right border of a resizable window (the user can click the mouse to resize the window horizontally).
+ ///
+ Right = 11,
+
+ ///
+ /// In a size box (same as HTGROWBOX).
+ ///
+ Size = GrowBox,
+
+ ///
+ /// In a window menu or in a Close button in a child window.
+ ///
+ SysMenu = 3,
+
+ ///
+ /// In the upper-horizontal border of a window.
+ ///
+ Top = 12,
+
+ ///
+ /// In the upper-left corner of a window border.
+ ///
+ TopLeft = 13,
+
+ ///
+ /// In the upper-right corner of a window border.
+ ///
+ TopRight = 14,
+
+ ///
+ /// In a window currently covered by another window in the same thread (the message will be sent to underlying windows in the same thread until one of them returns a code that is not HTTRANSPARENT).
+ ///
+ Transparent = -1,
+
+ ///
+ /// In the vertical scroll bar.
+ ///
+ VerticalScroll = 7,
+
+ ///
+ /// In a Maximize button.
+ ///
+ Zoom = MaximizeButton
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/IconDataMembers.cs b/ScreenToGif.Model/Enums/Native/IconDataMembers.cs
new file mode 100644
index 000000000..b64cb67df
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/IconDataMembers.cs
@@ -0,0 +1,67 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+///
+/// Indicates which members of a structure
+/// were set, and thus contain valid data or provide additional information
+/// to the ToolTip as to how it should display.
+///
+[Flags]
+public enum IconDataMembers
+{
+ ///
+ /// The message ID is set.
+ ///
+ Message = 0x01,
+
+ ///
+ /// The notification icon is set.
+ ///
+ Icon = 0x02,
+
+ ///
+ /// The tooltip is set.
+ ///
+ Tip = 0x04,
+
+ ///
+ /// State information () is set. This
+ /// applies to both and
+ /// .
+ ///
+ State = 0x08,
+
+ ///
+ /// The balloon ToolTip is set. Accordingly, the following
+ /// members are set: ,
+ /// , ,
+ /// and .
+ ///
+ Info = 0x10,
+
+ // Internal identifier is set. Reserved, thus commented out.
+ //Guid = 0x20,
+
+ ///
+ /// Windows Vista (Shell32.dll version 6.0.6) and later. If the ToolTip
+ /// cannot be displayed immediately, discard it.
+ /// Use this flag for ToolTips that represent real-time information which
+ /// would be meaningless or misleading if displayed at a later time.
+ /// For example, a message that states "Your telephone is ringing."
+ /// This modifies and must be combined with the flag.
+ ///
+ Realtime = 0x40,
+
+ ///
+ /// Windows Vista (Shell32.dll version 6.0.6) and later.
+ /// Use the standard ToolTip. Normally, when uVersion is set
+ /// to NOTIFYICON_VERSION_4, the standard ToolTip is replaced
+ /// by the application-drawn pop-up user interface (UI).
+ /// If the application wants to show the standard tooltip
+ /// in that case, regardless of whether the on-hover UI is showing,
+ /// it can specify NIF_SHOWTIP to indicate the standard tooltip
+ /// should still be shown.
+ /// Note that the NIF_SHOWTIP flag is effective until the next call
+ /// to Shell_NotifyIcon.
+ ///
+ UseLegacyToolTips = 0x80
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/IconStates.cs b/ScreenToGif.Model/Enums/Native/IconStates.cs
new file mode 100644
index 000000000..b8e1f259d
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/IconStates.cs
@@ -0,0 +1,17 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+///
+/// The visual state of the icon.
+///
+public enum IconStates
+{
+ ///
+ /// The icon is visible.
+ ///
+ Visible = 0x00,
+
+ ///
+ /// Hide the icon.
+ ///
+ Hidden = 0x01
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/LocalMemoryFlags.cs b/ScreenToGif.Model/Enums/Native/LocalMemoryFlags.cs
new file mode 100644
index 000000000..0518c9cc6
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/LocalMemoryFlags.cs
@@ -0,0 +1,19 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+[Flags]
+public enum LocalMemoryFlags
+{
+ LMEM_FIXED = 0x0000,
+ LMEM_MOVEABLE = 0x0002,
+ LMEM_NOCOMPACT = 0x0010,
+ LMEM_NODISCARD = 0x0020,
+ LMEM_ZEROINIT = 0x0040,
+ LMEM_MODIFY = 0x0080,
+ LMEM_DISCARDABLE = 0x0F00,
+ LMEM_VALID_FLAGS = 0x0F72,
+ LMEM_INVALID_HANDLE = 0x8000,
+ LHND = (LMEM_MOVEABLE | LMEM_ZEROINIT),
+ LPTR = (LMEM_FIXED | LMEM_ZEROINIT),
+ NONZEROLHND = (LMEM_MOVEABLE),
+ NONZEROLPTR = (LMEM_FIXED)
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/MapTypes.cs b/ScreenToGif.Model/Enums/Native/MapTypes.cs
new file mode 100644
index 000000000..d53d9ba91
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/MapTypes.cs
@@ -0,0 +1,9 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+public enum MapTypes : uint
+{
+ MapvkVkToVsc = 0x0,
+ MapvkVscToVk = 0x1,
+ MapvkVkToChar = 0x2,
+ MapvkVscToVkEx = 0x3,
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/MenuFunctions.cs b/ScreenToGif.Model/Enums/Native/MenuFunctions.cs
new file mode 100644
index 000000000..efc7e587b
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/MenuFunctions.cs
@@ -0,0 +1,11 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+[Flags]
+public enum MenuFunctions
+{
+ ByCommand = 0x00000000,
+ ByPosition = 0x00000400,
+ Enabled = 0x00000000,
+ Grayed = 0x00000001,
+ Disabled = 0x00000002
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/NativeMouseEvents.cs b/ScreenToGif.Model/Enums/Native/NativeMouseEvents.cs
new file mode 100644
index 000000000..efbc76bac
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/NativeMouseEvents.cs
@@ -0,0 +1,39 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+public enum NativeMouseEvents
+{
+ MouseMove = 0x200,
+ MouseDragStart = 0x00AE,
+ MouseDragEnd = 0x00AF,
+
+ LeftButtonDown = 0x201,
+ LeftButtonUp = 0x202,
+ LeftButtonDoubleClick = 0x203,
+ OutsideLeftButtonDown = 0x00A1,
+ OutsideLeftButtonUp = 0x00A2,
+ OutsideLeftButtonDoubleClick = 0x00A3,
+
+ RightButtonDown = 0x204,
+ RightButtonUp = 0x205,
+ RightButtonDoubleClick = 0x206,
+ OutsideRightButtonDown = 0x00A4,
+ OutsideRightButtonUp = 0x00A5,
+ OutsideRightButtonDoubleClick = 0x00A6,
+
+ MiddleButtonDown = 0x207,
+ MiddleButtonUp = 0x208,
+ MiddleButtonDoubleClick = 0x209,
+ OutsideMiddleButtonDown = 0x00A7,
+ OutsideMiddleButtonUp = 0x00A8,
+ OutsideMiddleButtonDoubleClick = 0x00A9,
+
+ MouseWheel = 0x020A,
+ MouseWheelHorizontal = 0x020E,
+
+ ExtraButtonDown = 0x020B,
+ ExtraButtonUp = 0x020C,
+ ExtraButtonDoubleClick = 0x020D,
+ OutsideExtraButtonDown = 0x00AB,
+ OutsideExtraButtonUp = 0x00AC,
+ OutsideExtraButtonDoubleClick = 0x00AD
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/NotifyCommands.cs b/ScreenToGif.Model/Enums/Native/NotifyCommands.cs
new file mode 100644
index 000000000..6da9fee13
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/NotifyCommands.cs
@@ -0,0 +1,38 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+///
+/// The main operations performed on the function.
+///
+public enum NotifyCommands
+{
+ ///
+ /// The taskbar icon is being created.
+ ///
+ Add = 0x00,
+
+ ///
+ /// The settings of the taskbar icon are being updated.
+ ///
+ Modify = 0x01,
+
+ ///
+ /// The taskbar icon is deleted.
+ ///
+ Delete = 0x02,
+
+ ///
+ /// Focus is returned to the taskbar icon.
+ ///
+ SetFocus = 0x03,
+
+ ///
+ /// Shell32.dll version 5.0 and later only. Instructs the taskbar
+ /// to behave according to the version number specified in the
+ /// uVersion member of the structure pointed to by lpdata.
+ /// This message allows you to specify whether you want the version
+ /// 5.0 behavior found on Microsoft Windows 2000 systems, or the
+ /// behavior found on earlier Shell versions. The default value for
+ /// uVersion is zero.
+ ///
+ SetVersion = 0x04
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/NotifyIconVersions.cs b/ScreenToGif.Model/Enums/Native/NotifyIconVersions.cs
new file mode 100644
index 000000000..78b34b3e6
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/NotifyIconVersions.cs
@@ -0,0 +1,25 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+///
+/// The notify icon version that is used. The higher
+/// the version, the more capabilities are available.
+///
+public enum NotifyIconVersions
+{
+ ///
+ /// Default behavior (legacy Win95).
+ /// Expects a size of 488.
+ ///
+ Win95 = 0x0,
+
+ ///
+ /// Behavior representing Win2000 an higher.
+ /// Expects a size of 504.
+ ///
+ Win2000 = 0x3,
+
+ ///
+ /// Extended tooltip support, which is available for Vista and later.
+ ///
+ Vista = 0x4
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/ProcessDpiAwareness.cs b/ScreenToGif.Model/Enums/Native/ProcessDpiAwareness.cs
new file mode 100644
index 000000000..866e89cf1
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/ProcessDpiAwareness.cs
@@ -0,0 +1,8 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+public enum ProcessDpiAwareness
+{
+ ProcessDpiUnaware = 0,
+ ProcessSystemDpiAware = 1,
+ ProcessPerMonitorDpiAware = 2
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/SetWindowPosFlags.cs b/ScreenToGif.Model/Enums/Native/SetWindowPosFlags.cs
new file mode 100644
index 000000000..1ec71c2c1
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/SetWindowPosFlags.cs
@@ -0,0 +1,87 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+[Flags]
+public enum SetWindowPosFlags : uint
+{
+ ///
+ /// If the calling thread and the thread that owns the window are attached to different input queues, the system posts the request to the thread that owns the window.
+ /// This prevents the calling thread from blocking its execution while other threads process the request.
+ ///
+ AsyncWindowPositioning = 0x4000,
+
+ ///
+ /// Prevents generation of the WM_SYNCPAINT message.
+ ///
+ DeferErase = 0x2000,
+
+ ///
+ /// Draws a frame (defined in the window's class description) around the window.
+ ///
+ DrawFrame = 0x0020,
+
+ ///
+ /// Applies new frame styles set using the SetWindowLong function.
+ /// Sends a WM_NCCALCSIZE message to the window, even if the window's size is not being changed.
+ /// If this flag is not specified, WM_NCCALCSIZE is sent only when the window's size is being changed.
+ ///
+ FrameChanged = 0x0020,
+
+ ///
+ /// Hides the window.
+ ///
+ HideWindow = 0x0080,
+
+ ///
+ /// Does not activate the window.
+ /// If this flag is not set, the window is activated and moved to the top of either the topmost or non-topmost group (depending on the setting of the hWndInsertAfter parameter).
+ ///
+ NoActivate = 0x0010,
+
+ ///
+ /// Discards the entire contents of the client area.
+ /// If this flag is not specified, the valid contents of the client area are saved and copied back into the client area after the window is sized or repositioned.
+ ///
+ NoCopyBits = 0x0100,
+
+ ///
+ /// Retains the current position (ignores X and Y parameters).
+ ///
+ NoMove = 0x0002,
+
+ ///
+ /// Does not change the owner window's position in the Z order.
+ ///
+ NoOwnerZOrder = 0x0200,
+
+ ///
+ /// Does not redraw changes. If this flag is set, no repainting of any kind occurs.
+ /// This applies to the client area, the nonclient area (including the title bar and scroll bars), and any part of the parent window uncovered as a result of the window being moved.
+ /// When this flag is set, the application must explicitly invalidate or redraw any parts of the window and parent window that need redrawing.
+ ///
+ NoRedraw = 0x0008,
+
+ ///
+ /// Same as the NoOwnerZOrder flag.
+ ///
+ NoReposition = 0x0200,
+
+ ///
+ /// Prevents the window from receiving the WM_WINDOWPOSCHANGING message.
+ ///
+ NoSendChanging = 0x0400,
+
+ ///
+ /// Retains the current size (ignores the cx and cy parameters).
+ ///
+ NoSize = 0x0001,
+
+ ///
+ /// Retains the current Z order (ignores the hWndInsertAfter parameter).
+ ///
+ NoZOrder = 0x0004,
+
+ ///
+ /// Displays the window.
+ ///
+ ShowWindow = 0x0040
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/ShellExecuteMasks.cs b/ScreenToGif.Model/Enums/Native/ShellExecuteMasks.cs
new file mode 100644
index 000000000..12323d8e1
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/ShellExecuteMasks.cs
@@ -0,0 +1,26 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+[Flags]
+public enum ShellExecuteMasks : uint
+{
+ Default = 0x00000000,
+ ClassName = 0x00000001,
+ ClassKey = 0x00000003,
+ IdList = 0x00000004,
+ InvokeIdList = 0x0000000c, //InvokeIdList(0xC) implies IdList(0x04)
+ HotKey = 0x00000020,
+ NoCloseProcess = 0x00000040,
+ ConnectNetDrv = 0x00000080,
+ NoAsync = 0x00000100,
+ FlagDdeWait = NoAsync,
+ DeEnvSubst = 0x00000200,
+ FlagNoUi = 0x00000400,
+ Unicode = 0x00004000,
+ NoConsole = 0x00008000,
+ Asyncok = 0x00100000,
+ HMonitor = 0x00200000,
+ NoZoneChecks = 0x00800000,
+ NoQueryClassStore = 0x01000000,
+ WaitForInputIdle = 0x02000000,
+ FlagLogUsage = 0x04000000,
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/ShowWindowCommands.cs b/ScreenToGif.Model/Enums/Native/ShowWindowCommands.cs
new file mode 100644
index 000000000..9fc9e1866
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/ShowWindowCommands.cs
@@ -0,0 +1,85 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+public enum ShowWindowCommands
+{
+ ///
+ /// Hides the window and activates another window.
+ ///
+ Hide = 0,
+
+ ///
+ /// Activates and displays a window. If the window is minimized or
+ /// maximized, the system restores it to its original size and position.
+ /// An application should specify this flag when displaying the window
+ /// for the first time.
+ ///
+ Normal = 1,
+ ///
+ /// Activates the window and displays it as a minimized window.
+ ///
+ ShowMinimized = 2,
+
+ ///
+ /// Maximizes the specified window.
+ ///
+ Maximize = 3,
+
+ ///
+ /// Activates the window and displays it as a maximized window.
+ ///
+ ShowMaximized = 3,
+
+ ///
+ /// Displays a window in its most recent size and position. This value
+ /// is similar to , except
+ /// the window is not activated.
+ ///
+ ShowNoActivate = 4,
+
+ ///
+ /// Activates the window and displays it in its current size and position.
+ ///
+ Show = 5,
+
+ ///
+ /// Minimizes the specified window and activates the next top-level
+ /// window in the Z order.
+ ///
+ Minimize = 6,
+
+ ///
+ /// Displays the window as a minimized window. This value is similar to
+ /// , except the
+ /// window is not activated.
+ ///
+ ShowMinNoActive = 7,
+
+ ///
+ /// Displays the window in its current size and position. This value is
+ /// similar to , except the
+ /// window is not activated.
+ ///
+ ShowNa = 8,
+
+ ///
+ /// Activates and displays the window. If the window is minimized or
+ /// maximized, the system restores it to its original size and position.
+ /// An application should specify this flag when restoring a minimized window.
+ ///
+ Restore = 9,
+
+ ///
+ /// Sets the show state based on the SW_* value specified in the
+ /// STARTUPINFO structure passed to the CreateProcess function by the
+ /// program that started the application.
+ ///
+ ShowDefault = 10,
+
+ ///
+ /// Windows 2000/XP: Minimizes a window, even if the thread
+ /// that owns the window is not responding. This flag should only be
+ /// used when minimizing windows from a different thread.
+ ///
+ ForceMinimize = 11
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/SpecialWindowHandles.cs b/ScreenToGif.Model/Enums/Native/SpecialWindowHandles.cs
new file mode 100644
index 000000000..b5e94cf3d
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/SpecialWindowHandles.cs
@@ -0,0 +1,30 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+///
+/// Special window handles.
+///
+public enum SpecialWindowHandles
+{
+ ///
+ /// Places the window at the top of the Z order.
+ ///
+ Top = 0,
+
+ ///
+ /// Places the window at the bottom of the Z order.
+ /// If the hWnd parameter identifies a topmost window, the window loses its topmost status and is placed at the bottom of all other windows.
+ ///
+ Bottom = 1,
+
+ ///
+ /// Places the window above all non-topmost windows.
+ /// The window maintains its topmost position even when it is deactivated.
+ ///
+ TopMost = -1,
+
+ ///
+ /// Places the window above all non-topmost windows (that is, behind all topmost windows).
+ /// This flag has no effect if the window is already a non-topmost window.
+ ///
+ NoTopMost = -2
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/SysCommands.cs b/ScreenToGif.Model/Enums/Native/SysCommands.cs
new file mode 100644
index 000000000..c30c972ab
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/SysCommands.cs
@@ -0,0 +1,26 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+public enum SysCommands : uint
+{
+ Size = 0xF000,
+ Move = 0xF010,
+ Minimize = 0xF020,
+ Maximize = 0xF030,
+ NextWindow = 0xF040,
+ PreviousWindow = 0xF050,
+ Close = 0xF060,
+ VScroll = 0xF070,
+ HScroll = 0xF080,
+ MouseMenu = 0xF090,
+ KeyMenu = 0xF100,
+ Arrange = 0xF110,
+ Restore = 0xF120,
+ TaskList = 0xF130,
+ ScreenSave = 0xF140,
+ HotKey = 0xF150,
+ Default = 0xF160,
+ MonitorPower = 0xF170,
+ ContextHelp = 0xF180,
+ Separator = 0xF00F,
+ IsSecure = 0x0001,
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/TimeResults.cs b/ScreenToGif.Model/Enums/Native/TimeResults.cs
new file mode 100644
index 000000000..3b92bdb2e
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/TimeResults.cs
@@ -0,0 +1,7 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+public enum TimerResults : uint
+{
+ NoError = 0,
+ NoCanDo = 97
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/WindowAttributes.cs b/ScreenToGif.Model/Enums/Native/WindowAttributes.cs
new file mode 100644
index 000000000..91b8e9a89
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/WindowAttributes.cs
@@ -0,0 +1,40 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+public enum WindowAttributes
+{
+ ///
+ /// Sets a new address for the window procedure.
+ /// You cannot change this attribute if the window does not belong to the same process as the calling thread.
+ ///
+ GwlWndproc = -4,
+
+ ///
+ /// Sets a new application instance handle.
+ ///
+ GwlHinstance = -6,
+
+ ///
+ /// Changes the owner of a top-level window.
+ ///
+ GwlHwndparent = -8,
+
+ ///
+ /// Sets a new window style.
+ ///
+ GwlStyle = -16,
+
+ ///
+ /// Sets a new extended window style.
+ ///
+ GwlExstyle = -20,
+
+ ///
+ /// Sets the user data associated with the window. This data is intended for use by the application that created the window. Its value is initially zero.
+ ///
+ GwlUserdata = -21,
+
+ ///
+ /// Sets a new identifier of the child window. The window cannot be a top-level window.
+ ///
+ GwlId = -12
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/WindowStyles.cs b/ScreenToGif.Model/Enums/Native/WindowStyles.cs
new file mode 100644
index 000000000..2345e48d6
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/WindowStyles.cs
@@ -0,0 +1,28 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+public enum WindowStyles : uint
+{
+ Overlapped = 0,
+ Popup = 0x80000000,
+ Child = 0x40000000,
+ Minimize = 0x20000000,
+ Visible = 0x10000000,
+ Disabled = 0x8000000,
+ Clipsiblings = 0x4000000,
+ Clipchildren = 0x2000000,
+ Maximize = 0x1000000,
+ Caption = 0xC00000, //WS_BORDER or WS_DLGFRAME
+ Border = 0x800000,
+ Dlgframe = 0x400000,
+ Vscroll = 0x200000,
+ Hscroll = 0x100000,
+ Sysmenu = 0x80000,
+ ThickFrame = 0x40000,
+ Group = 0x20000,
+ Tabstop = 0x10000,
+ MinimizeBox = 0x20000,
+ MaximizeBox = 0x10000,
+ Tiled = Overlapped,
+ Iconic = Minimize,
+ Sizebox = ThickFrame,
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/WindowStylesEx.cs b/ScreenToGif.Model/Enums/Native/WindowStylesEx.cs
new file mode 100644
index 000000000..525f0828f
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/WindowStylesEx.cs
@@ -0,0 +1,34 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+///
+/// Extended Window Styles.
+///
+public enum WindowStylesEx : uint
+{
+ DlgModalFrame = 0x0001,
+ NoParentNotify = 0x0004,
+ TopMost = 0x0008,
+ AcceptFiles = 0x0010,
+ Transparent = 0x0020,
+ MdiChild = 0x0040,
+ ToolWindow = 0x0080,
+ WindowEdge = 0x0100,
+ ClientEdge = 0x0200,
+ ContextHelp = 0x0400,
+ Right = 0x1000,
+ Left = 0x0000,
+ RtlReading = 0x2000,
+ LtrReading = 0x0000,
+ LeftScrollbar = 0x4000,
+ RightScrollbar = 0x0000,
+ ControlParent = 0x10000,
+ StaticEdge = 0x20000,
+ AppWindow = 0x40000,
+ OverlappedWindow = (WindowEdge | ClientEdge),
+ PaletteWindow = (WindowEdge | ToolWindow | TopMost),
+ Layered = 0x00080000,
+ NoInheritLayout = 0x00100000, // Disable inheritance of mirroring by children
+ LayoutRtl = 0x00400000, // Right to left mirroring
+ Composited = 0x02000000,
+ NoActivate = 0x08000000,
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Native/WindowsMessages.cs b/ScreenToGif.Model/Enums/Native/WindowsMessages.cs
new file mode 100644
index 000000000..5976867f4
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Native/WindowsMessages.cs
@@ -0,0 +1,219 @@
+namespace ScreenToGif.Domain.Enums.Native;
+
+public enum WindowsMessages
+{
+ Activate = 0x0006,
+ ActivateApp = 0x001C,
+ AfxFirst = 0x0360,
+ AfxLast = 0x037F,
+ App = 0x8000,
+ AskCbFormatName = 0x030C,
+ CancelJournal = 0x004B,
+ CancelMode = 0x001F,
+ CaptureChanged = 0x0215,
+ ChangeCbChain = 0x030D,
+ ChangeUiState = 0x0127,
+ Char = 0x0102,
+ CharToItem = 0x002F,
+ ChildActivate = 0x0022,
+ Clear = 0x0303,
+ Close = 0x0010,
+ ClipboardUpdate = 0x031D,
+ Command = 0x0111,
+ Compacting = 0x0041,
+ CompareItem = 0x0039,
+ ContextMenu = 0x007B,
+ Copy = 0x0301,
+ CopyData = 0x004A,
+ Create = 0x0001,
+ CtlColorBtn = 0x0135,
+ CtlColorDlg = 0x0136,
+ CtlColorEdit = 0x0133,
+ CtlColorListBox = 0x0134,
+ CtlColorMsgBox = 0x0132,
+ CtlColorScrollbar = 0x0137,
+ CtlColorStatic = 0x0138,
+ Cut = 0x0300,
+ DeadChar = 0x0103,
+ DeleteItem = 0x002D,
+ Destroy = 0x0002,
+ DestroyClipboard = 0x0307,
+ DeviceChange = 0x0219,
+ DevModeChange = 0x001B,
+ DisplayChange = 0x007E,
+ DrawClipboard = 0x0308,
+ DrawItem = 0x002B,
+ DropFiles = 0x0233,
+ Enable = 0x000A,
+ EndSession = 0x0016,
+ EnterIdle = 0x0121,
+ EnterMenuLoop = 0x0211,
+ EnterSizeMove = 0x0231,
+ EraseBackground = 0x0014,
+ ExitMenuLoop = 0x0212,
+ ExitSizeMove = 0x0232,
+ FontChange = 0x001D,
+ GetDialogCode = 0x0087,
+ GetFont = 0x0031,
+ GetHotkey = 0x0033,
+ GetIcon = 0x007F,
+ GetMinMaxInfo = 0x0024,
+ GetObject = 0x003D,
+ GetText = 0x000D,
+ GetTextLenght = 0x000E,
+ HandheldFirst = 0x0358,
+ HandheldLast = 0x035F,
+ Help = 0x0053,
+ Hotkey = 0x0312,
+ HorizontalScroll = 0x0114,
+ HorizontalScrollClipboard = 0x030E,
+ IconEraseBackground = 0x0027,
+ ImeChar = 0x0286,
+ ImeComposition = 0x010F,
+ ImeCompositionFull = 0x0284,
+ ImeControl = 0x0283,
+ ImeEndComposition = 0x010E,
+ ImeKeyDown = 0x0290,
+ ImeKeyLast = 0x010F,
+ ImeKeyUp = 0x0291,
+ ImeNotify = 0x0282,
+ ImeRequest = 0x0288,
+ ImeSelect = 0x0285,
+ ImeSetContent = 0x0281,
+ ImeStartComposition = 0x010D,
+ InitDialog = 0x0110,
+ InitMenu = 0x0116,
+ InitMenuPopup = 0x0117,
+ InputLanguageChange = 0x0051,
+ InputLanguageChangeRequest = 0x0050,
+ KeyDown = 0x0100,
+ KeyFirst = 0x0100,
+ KeyLast = 0x0108,
+ KeyUp = 0x0101,
+ KillFocus = 0x0008,
+ LeftDoubleClick = 0x0203,
+ LeftButtonDown = 0x0201,
+ LeftButtonUp = 0x0202,
+ MiddleDoubleClick = 0x0209,
+ MiddleButtonDown = 0x0207,
+ MiddleButtonUp = 0x0208,
+ MdiActivate = 0x0222,
+ MdiCascade = 0x0227,
+ MdiCreate = 0x0220,
+ MdiDestroy = 0x0221,
+ MdiGetActive = 0x0229,
+ MdiIconmArrange = 0x0228,
+ MdiMaximize = 0x0225,
+ MdiNext = 0x0224,
+ MdiRefreshMenu = 0x0234,
+ MdiRestore = 0x0223,
+ MdiSetMenu = 0x0230,
+ MdiTile = 0x0226,
+ MeasureItem = 0x002C,
+ MenuChar = 0x0120,
+ MenuCommand = 0x0126,
+ MenuDrag = 0x0123,
+ MenuGetObject = 0x0124,
+ MenuRightButtonUp = 0x0122,
+ MenuSelect = 0x011F,
+ MouseActivate = 0x0021,
+ MouseFirst = 0x0200,
+ MouseHover = 0x02A1,
+ MouseLast = 0x020D,
+ MouseLeave = 0x02A3,
+ MouseMove = 0x0200,
+ MouseWheel = 0x020A,
+ MouseHorizontalWheel = 0x020E,
+ Move = 0x0003,
+ Moving = 0x0216,
+ NonClientActivate = 0x0086,
+ NonClientCalculateSize = 0x0083,
+ NonClientCreate = 0x0081,
+ NonClientDestroy = 0x0082,
+ NonClientHitTest = 0x0084,
+ NonClientLeftButtonDoubleClick = 0x00A3,
+ NonClientLeftButtonDown = 0x00A1,
+ NonClientLeftButtonUp = 0x00A2,
+ NonClientMiddleButtonDoubleClick = 0x00A9,
+ NonClientMiddleButtonDown = 0x00A7,
+ NonClientMiddleButtonUp = 0x00A8,
+ NonClientMouseHover = 0x02A0,
+ NonClientMouseLeave = 0x02A2,
+ NonClientMouseMonve = 0x00A0,
+ NonClientPaint = 0x0085,
+ NonClientRightButtonDoubleClick = 0x00A6,
+ NonClientRightButtonDown = 0x00A4,
+ NonClientRightButtonUp = 0x00A5,
+ NonClientXButtonDoubleClick = 0x00AD,
+ NonClientXButtonDown = 0x00AB,
+ NonClientXButtonUp = 0x00AC,
+ NonClientUndocumentedAhDrawCaption = 0x00AE,
+ NonClientUndocumentedAhDrawFrame = 0x00AF,
+ NextDialogControl = 0x0028,
+ NextMenu = 0x0213,
+ Notify = 0x004E,
+ NotifyFormat = 0x0055,
+ Null = 0x0000,
+ Paint = 0x000F,
+ PaintClipboard = 0x0309,
+ PaintIcon = 0x0026,
+ PaletteChanged = 0x0311,
+ PaletteIsChanging = 0x0310,
+ ParentNotify = 0x0210,
+ Paste = 0x0302,
+ PenWinFirst = 0x0380,
+ PenWinLast = 0x038F,
+ Power = 0x0048,
+ PowerBroadcast = 0x0218,
+ Print = 0x0317,
+ PrintClient = 0x0318,
+ QueryDragIcon = 0x0037,
+ QueryEndSession = 0x0011,
+ QueryNewPalette = 0x030F,
+ QueryOpen = 0x0013,
+ QueueSync = 0x0023,
+ Quit = 0x0012,
+ RButtonDoubleClick = 0x0206,
+ RButtonDown = 0x0204,
+ RButtonUp = 0x0205,
+ RenderAllFormats = 0x0306,
+ RenderFormat = 0x0305,
+ SetCursor = 0x0020,
+ SetFocus = 0x0007,
+ SetFont = 0x0030,
+ SetHotKey = 0x0032,
+ SetIcon = 0x0080,
+ SetRedraw = 0x000B,
+ SetText = 0x000C,
+ SettingChange = 0x001A,
+ ShowWindow = 0x0018,
+ Size = 0x0005,
+ SizeClipboard = 0x030B,
+ Sizing = 0x0214,
+ SpoolerStatus = 0x002A,
+ StyleChanged = 0x007D,
+ StyleChanging = 0x007C,
+ SyncPaint = 0x0088,
+ SysChar = 0x0106,
+ SysColorChange = 0x0015,
+ SysCommand = 0x0112,
+ SysDeadChar = 0x0107,
+ SysKeyDown = 0x0104,
+ SysKeyUp = 0x0105,
+ TrainingCard = 0x0052,
+ TimeChange = 0x001E,
+ Timer = 0x0113,
+ Undo = 0x0304,
+ UnInitMenuPopup = 0x0125,
+ User = 0x0400,
+ UserChanged = 0x0054,
+ VKeyToItem = 0x002E,
+ VerticalScroll = 0x0115,
+ VerticalScrollClipboard = 0x030A,
+ WindowPositionChanged = 0x0047,
+ WindowPositionChanging = 0x0046,
+ WinIniChange = 0x001A,
+ XButtonDoubleClick = 0x020D,
+ XButtonDown = 0x020B,
+ XButtonUp = 0x020C,
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/ObfuscationModes.cs b/ScreenToGif.Model/Enums/ObfuscationModes.cs
new file mode 100644
index 000000000..41f88df21
--- /dev/null
+++ b/ScreenToGif.Model/Enums/ObfuscationModes.cs
@@ -0,0 +1,9 @@
+namespace ScreenToGif.Domain.Enums;
+
+public enum ObfuscationModes
+{
+ Pixelation,
+ Blur,
+ Darken,
+ Lighten
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/OverwriteModes.cs b/ScreenToGif.Model/Enums/OverwriteModes.cs
new file mode 100644
index 000000000..8abf4c0b9
--- /dev/null
+++ b/ScreenToGif.Model/Enums/OverwriteModes.cs
@@ -0,0 +1,8 @@
+namespace ScreenToGif.Domain.Enums;
+
+public enum OverwriteModes
+{
+ Allow,
+ Warn,
+ Prompt
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/PanelType.cs b/ScreenToGif.Model/Enums/PanelType.cs
new file mode 100644
index 000000000..41113f3a6
--- /dev/null
+++ b/ScreenToGif.Model/Enums/PanelType.cs
@@ -0,0 +1,145 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// The types of Panel of the Editor window.
+/// Positive values means that there's no preview overlay.
+///
+public enum PanelTypes
+{
+ ///
+ /// Save As Panel.
+ ///
+ SaveAs = 1,
+
+ ///
+ /// New Animation Panel.
+ ///
+ NewAnimation = 2,
+
+ ///
+ /// Clipboard Panel.
+ ///
+ Clipboard = 3,
+
+ ///
+ /// Resize Panel.
+ ///
+ Resize = 4,
+
+ ///
+ /// Flip/Rotate Panel.
+ ///
+ FlipRotate = 5,
+
+ ///
+ /// Override Delay Panel.
+ ///
+ OverrideDelay = 6,
+
+ ///
+ /// Change Delay Panel.
+ ///
+ IncreaseDecreaseDelay = 7,
+
+ ScaleDelay = 8,
+
+ ///
+ /// Fade Transition Panel.
+ ///
+ Fade = 9,
+
+ ///
+ /// Slide Transition Panel.
+ ///
+ Slide = 10,
+
+ ///
+ /// Reduce Frame Count Panel.
+ ///
+ ReduceFrames = 11,
+
+ ///
+ /// Load Recent Panel.
+ ///
+ LoadRecent = 12,
+
+ ///
+ /// Remove Duplicates Panel.
+ ///
+ RemoveDuplicates = 13,
+
+ ///
+ /// Mouse Events Panel.
+ ///
+ MouseEvents = 14,
+
+ ///
+ /// Smooth Loop Panel.
+ ///
+ SmoothLoop = 15,
+
+ ///
+ /// Crop Panel.
+ ///
+ Crop = -1,
+
+ ///
+ /// Caption Panel.
+ ///
+ Caption = -2,
+
+ ///
+ /// Free Text Panel.
+ ///
+ FreeText = -3,
+
+ ///
+ /// Title Frame Panel.
+ ///
+ TitleFrame = -4,
+
+ ///
+ /// Free Drawing Panel.
+ ///
+ FreeDrawing = -5,
+
+ ///
+ /// Shapes Panel.
+ ///
+ Shapes = -6,
+
+ ///
+ /// Watermark Panel.
+ ///
+ Watermark = -7,
+
+ ///
+ /// Border Panel.
+ ///
+ Border = -8,
+
+ ///
+ /// Cinemagraph Panel.
+ ///
+ Cinemagraph = -9,
+
+ ///
+ /// Progress Panel.
+ ///
+ Progress = -10,
+
+ ///
+ /// Key Strokes Panel.
+ ///
+ KeyStrokes = -11,
+
+ ///
+ /// Obfuscate Panel.
+ ///
+ Obfuscate = -12,
+
+ ///
+ /// Shadow Panel.
+ ///
+ Shadow = -13,
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/PartialExportModes.cs b/ScreenToGif.Model/Enums/PartialExportModes.cs
new file mode 100644
index 000000000..b19ff06a3
--- /dev/null
+++ b/ScreenToGif.Model/Enums/PartialExportModes.cs
@@ -0,0 +1,24 @@
+namespace ScreenToGif.Domain.Enums;
+
+public enum PartialExportModes
+{
+ ///
+ /// An expression like '4, 5, 9 - 11'.
+ ///
+ FrameExpression,
+
+ ///
+ /// Start and end frame number.
+ ///
+ FrameRange,
+
+ ///
+ /// Start and end times.
+ ///
+ TimeRange,
+
+ ///
+ /// All selected frames in the timeline.
+ ///
+ Selection
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/PasteBehaviors.cs b/ScreenToGif.Model/Enums/PasteBehaviors.cs
new file mode 100644
index 000000000..703505fec
--- /dev/null
+++ b/ScreenToGif.Model/Enums/PasteBehaviors.cs
@@ -0,0 +1,17 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// Paste behavior for the editor.
+///
+public enum PasteBehaviors
+{
+ ///
+ /// It will paste before the selected frame.
+ ///
+ BeforeSelected,
+
+ ///
+ /// It will paste after the selected frame.
+ ///
+ AfterSelected
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/PredictionMethods.cs b/ScreenToGif.Model/Enums/PredictionMethods.cs
new file mode 100644
index 000000000..aa6842518
--- /dev/null
+++ b/ScreenToGif.Model/Enums/PredictionMethods.cs
@@ -0,0 +1,14 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// Png prediction methods used by FFmpeg.
+///
+public enum PredictionMethods
+{
+ None,
+ Sub,
+ Up,
+ Avg,
+ Paeth,
+ Mixed
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/ProgressTypes.cs b/ScreenToGif.Model/Enums/ProgressTypes.cs
new file mode 100644
index 000000000..f7e2fac64
--- /dev/null
+++ b/ScreenToGif.Model/Enums/ProgressTypes.cs
@@ -0,0 +1,10 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// Type of the progress indicator.
+///
+public enum ProgressTypes
+{
+ Bar,
+ Text
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/ProjectByType.cs b/ScreenToGif.Model/Enums/ProjectByType.cs
new file mode 100644
index 000000000..0041a0253
--- /dev/null
+++ b/ScreenToGif.Model/Enums/ProjectByType.cs
@@ -0,0 +1,13 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// The types of source of project creation.
+///
+public enum ProjectByType
+{
+ Unknown = 0,
+ ScreenRecorder = 1,
+ WebcamRecorder = 2,
+ BoardRecorder = 3,
+ Editor = 4
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/ProxyTypes.cs b/ScreenToGif.Model/Enums/ProxyTypes.cs
new file mode 100644
index 000000000..1e12d36b2
--- /dev/null
+++ b/ScreenToGif.Model/Enums/ProxyTypes.cs
@@ -0,0 +1,11 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// The proxy method, used for uploading files.
+///
+public enum ProxyTypes
+{
+ Disabled = 0,
+ Manual = 1,
+ System = 2
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/RateUnits.cs b/ScreenToGif.Model/Enums/RateUnits.cs
new file mode 100644
index 000000000..cc35b089f
--- /dev/null
+++ b/ScreenToGif.Model/Enums/RateUnits.cs
@@ -0,0 +1,15 @@
+using System.ComponentModel;
+
+namespace ScreenToGif.Domain.Enums;
+
+public enum RateUnits
+{
+ [Description("B")]
+ Bits,
+
+ [Description("K")]
+ Kilobits,
+
+ [Description("M")]
+ Megabits
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/RecorderStages.cs b/ScreenToGif.Model/Enums/RecorderStages.cs
new file mode 100644
index 000000000..850389e5e
--- /dev/null
+++ b/ScreenToGif.Model/Enums/RecorderStages.cs
@@ -0,0 +1,41 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// Stage status of the recording process.
+///
+[Flags]
+public enum RecorderStages
+{
+ ///
+ /// Recording stopped.
+ ///
+ Stopped = 1, //1 << 0, 0b_000001
+
+ ///
+ /// Recording active.
+ ///
+ Recording = 2, //1 << 1, 0b_000010
+
+ ///
+ /// Recording paused.
+ ///
+ Paused = 4, //1 << 2, 0b_000100
+
+ ///
+ /// Pre start countdown active.
+ ///
+ PreStarting = 8, //1 << 3, 0b_001000
+
+ ///
+ /// The recording is being discarded.
+ ///
+ Discarding = 16, //1 << 4, 0b_010000
+
+
+
+ ///
+ /// Single shot mode.
+ ///
+ [Obsolete]
+ Snapping = 32, //1 << 5, 0b_100000 //Remove later.
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/ReduceDelayModes.cs b/ScreenToGif.Model/Enums/ReduceDelayModes.cs
new file mode 100644
index 000000000..63e2f2ee2
--- /dev/null
+++ b/ScreenToGif.Model/Enums/ReduceDelayModes.cs
@@ -0,0 +1,11 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// Specifies the frame delay adjustment mode for the 'Reduce Framerate'.
+///
+public enum ReduceDelayModes
+{
+ DontAdjust = 0,
+ Previous = 1,
+ Evenly = 2
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/ResizeDirection.cs b/ScreenToGif.Model/Enums/ResizeDirection.cs
new file mode 100644
index 000000000..eda6c3458
--- /dev/null
+++ b/ScreenToGif.Model/Enums/ResizeDirection.cs
@@ -0,0 +1,16 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// The direction in which the window should be resized.
+///
+public enum ResizeDirection
+{
+ Left = 1,
+ Right = 2,
+ Top = 3,
+ TopLeft = 4,
+ TopRight = 5,
+ Bottom = 6,
+ BottomLeft = 7,
+ BottomRight = 8
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/ScalingMethod.cs b/ScreenToGif.Model/Enums/ScalingMethod.cs
new file mode 100644
index 000000000..c7c39362c
--- /dev/null
+++ b/ScreenToGif.Model/Enums/ScalingMethod.cs
@@ -0,0 +1,13 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// Scaling quality options for resizing
+/// This enum is a subset of .
+/// It is used to expose this enum to the Editor and choose which options are available
+///
+public enum ScalingMethod
+{
+ Fant = System.Windows.Media.BitmapScalingMode.Fant,
+ Linear = System.Windows.Media.BitmapScalingMode.Linear,
+ NearestNeighbor = System.Windows.Media.BitmapScalingMode.NearestNeighbor
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/SizeUnits.cs b/ScreenToGif.Model/Enums/SizeUnits.cs
new file mode 100644
index 000000000..eed883037
--- /dev/null
+++ b/ScreenToGif.Model/Enums/SizeUnits.cs
@@ -0,0 +1,7 @@
+namespace ScreenToGif.Domain.Enums;
+
+public enum SizeUnits
+{
+ Pixels,
+ Percent
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/SlideFromType.cs b/ScreenToGif.Model/Enums/SlideFromType.cs
new file mode 100644
index 000000000..26b27b302
--- /dev/null
+++ b/ScreenToGif.Model/Enums/SlideFromType.cs
@@ -0,0 +1,12 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// Transition animation.
+///
+public enum SlideFromType
+{
+ Right,
+ Top,
+ Left,
+ Bottom
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/SmoothLoopSelectionModes.cs b/ScreenToGif.Model/Enums/SmoothLoopSelectionModes.cs
new file mode 100644
index 000000000..44d479749
--- /dev/null
+++ b/ScreenToGif.Model/Enums/SmoothLoopSelectionModes.cs
@@ -0,0 +1,7 @@
+namespace ScreenToGif.Domain.Enums;
+
+public enum SmoothLoopFromModes
+{
+ End = 0,
+ Start = 1
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/StatusReason.cs b/ScreenToGif.Model/Enums/StatusReason.cs
new file mode 100644
index 000000000..356a8c29f
--- /dev/null
+++ b/ScreenToGif.Model/Enums/StatusReason.cs
@@ -0,0 +1,13 @@
+namespace ScreenToGif.Domain.Enums
+{
+ public enum StatusReasons : int
+ {
+ None,
+ EmptyProperty,
+ InvalidState,
+ FileAlreadyExists,
+ MissingFfmpeg,
+ MissingGifski,
+ UploadServiceUnauthorized
+ }
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/StatusType.cs b/ScreenToGif.Model/Enums/StatusType.cs
new file mode 100644
index 000000000..0c6e4dd1d
--- /dev/null
+++ b/ScreenToGif.Model/Enums/StatusType.cs
@@ -0,0 +1,10 @@
+namespace ScreenToGif.Domain.Enums;
+
+public enum StatusType : int
+{
+ None = 0,
+ Info,
+ Update,
+ Warning,
+ Error
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/SupportedFFmpegVersions.cs b/ScreenToGif.Model/Enums/SupportedFFmpegVersions.cs
new file mode 100644
index 000000000..980b79c46
--- /dev/null
+++ b/ScreenToGif.Model/Enums/SupportedFFmpegVersions.cs
@@ -0,0 +1,9 @@
+namespace ScreenToGif.Domain.Enums;
+
+public enum SupportedFFmpegVersions
+{
+ Version7 = -1,
+ Version6 = 0,
+ Version5 = 1,
+ Version4 = 2,
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/TaskTypes.cs b/ScreenToGif.Model/Enums/TaskTypes.cs
new file mode 100644
index 000000000..8980c4b2c
--- /dev/null
+++ b/ScreenToGif.Model/Enums/TaskTypes.cs
@@ -0,0 +1,16 @@
+namespace ScreenToGif.Domain.Enums;
+
+public enum TaskTypes
+{
+ NotDeclared = 0,
+ MouseEvents = 1,
+ KeyStrokes = 2,
+ Delay = 3,
+ Progress = 4,
+ Border = 5,
+ Shadow = 6,
+ RemoveDuplicates = 7,
+ Watermark = 8,
+ TitleFrame = 9,
+ Resize = 10,
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/UploadDestinations.cs b/ScreenToGif.Model/Enums/UploadDestinations.cs
new file mode 100644
index 000000000..1e3f275ad
--- /dev/null
+++ b/ScreenToGif.Model/Enums/UploadDestinations.cs
@@ -0,0 +1,13 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// Upload destination type.
+///
+public enum UploadDestinations
+{
+ NotDefined = 0,
+ Imgur,
+ Yandex = 3,
+ YouTrack,
+ Custom
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/UploadService.cs b/ScreenToGif.Model/Enums/UploadService.cs
new file mode 100644
index 000000000..80c7e2d98
--- /dev/null
+++ b/ScreenToGif.Model/Enums/UploadService.cs
@@ -0,0 +1,12 @@
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// The upload service.
+///
+public enum UploadService
+{
+ None = 0,
+ ImgurAnonymous = 1,
+ Imgur = 2,
+ Yandex = 5,
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/VideoCodecPresets.cs b/ScreenToGif.Model/Enums/VideoCodecPresets.cs
new file mode 100644
index 000000000..88d977e41
--- /dev/null
+++ b/ScreenToGif.Model/Enums/VideoCodecPresets.cs
@@ -0,0 +1,41 @@
+using System.Diagnostics.CodeAnalysis;
+
+namespace ScreenToGif.Domain.Enums;
+
+[SuppressMessage("ReSharper", "InconsistentNaming")]
+public enum VideoCodecPresets
+{
+ Auto = -1,
+ NotSelected,
+ None,
+
+ VerySlow,
+ Slower,
+ Slow,
+ Medium,
+ Fast,
+ Faster,
+ VeryFast,
+ SuperFast,
+ UltraFast,
+
+ Quality,
+ Balanced,
+ Speed,
+
+ Default,
+ Lossless,
+ LosslessHP,
+ HP,
+ HQ,
+ BD,
+ LowLatency,
+ LowLatencyHP,
+ LowLatencyHQ,
+
+ Picture, //Digital picture, like portrait, inner shot.
+ Photo, //Outdoor photograph, with natural lighting.
+ Drawing, //Hand or line drawing, with high-contrast details.
+ Icon, //Small-sized colorful images.
+ Text //Text-like.
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/VideoCodecs.cs b/ScreenToGif.Model/Enums/VideoCodecs.cs
new file mode 100644
index 000000000..c27fcbb37
--- /dev/null
+++ b/ScreenToGif.Model/Enums/VideoCodecs.cs
@@ -0,0 +1,53 @@
+using System.ComponentModel;
+
+namespace ScreenToGif.Domain.Enums;
+
+public enum VideoCodecs
+{
+ NotSelected,
+
+ [Description("mpeg2video")]
+ Mpeg2,
+
+ [Description("mpeg4")]
+ Mpeg4,
+
+ [Description("libx264")]
+ X264,
+
+ [Description("h264_amf")]
+ H264Amf,
+
+ [Description("h264_nvenc")]
+ H264Nvenc,
+
+ [Description("h264_qsv")]
+ H264Qsv,
+
+ [Description("libx265")]
+ X265,
+
+ [Description("hevc_amf")]
+ HevcAmf,
+
+ [Description("hevc_nvenc")]
+ HevcNvenc,
+
+ [Description("hevc_qsv")]
+ HevcQsv,
+
+ [Description("libvpx")]
+ Vp8,
+
+ [Description("libvpx-vp9")]
+ Vp9,
+
+ [Description("libaom-av1")]
+ LibAom,
+
+ [Description("libsvtav1")]
+ SvtAv1,
+
+ [Description("librav1e")]
+ Rav1E,
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/VideoPixelFormats.cs b/ScreenToGif.Model/Enums/VideoPixelFormats.cs
new file mode 100644
index 000000000..1d4ffc2fa
--- /dev/null
+++ b/ScreenToGif.Model/Enums/VideoPixelFormats.cs
@@ -0,0 +1,62 @@
+using System.ComponentModel;
+using System.Diagnostics.CodeAnalysis;
+
+namespace ScreenToGif.Domain.Enums;
+
+///
+/// FFmpeg pixel formats.
+/// https://github.com/FFmpeg/FFmpeg/blob/b7b73e83e3d5c78a5fea96a6bcae02e1f0a5c45f/libavutil/pixdesc.c
+///
+[SuppressMessage("ReSharper", "InconsistentNaming")]
+public enum VideoPixelFormats
+{
+ NotSelected,
+ Auto,
+ Bgr0,
+ [Description("bgr4_byte")] Bgr4Byte, //https://stackoverflow.com/questions/8588384/how-to-define-an-enum-with-string-value
+ Bgr8,
+ BgrA,
+ Cuda,
+ D3D11,
+ Dxva2Vld,
+ Gbrp,
+ Gbrp10Le,
+ Gbrp12Le,
+ Gray,
+ Gray10Le,
+ Gray12Le,
+ Gray16Be,
+ MonoB,
+ Nv12,
+ Nv16,
+ Nv20Le,
+ Nv21,
+ P010Le,
+ Pal8,
+ Qsv,
+ Rgb24,
+ Rgb48Be,
+ Rgb8,
+ Rgba64Be,
+ RgbA,
+ [Description("bgr4_byte")] Rgb4Byte,
+ Ya8,
+ Ya16Be,
+ Yuv420p,
+ Yuv420p10Le,
+ Yuv420p12Le,
+ Yuv422p,
+ Yuv422p10Le,
+ Yuv422p12Le,
+ Yuv440p,
+ Yuv444p,
+ Yuv440p10Le,
+ Yuv440p12Le,
+ Yuv444p10Le,
+ Yuv444p12Le,
+ Yuv444p16Le,
+ Yuva420p,
+ Yuvj420p,
+ Yuvj422p,
+ Yuvj444p,
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/VideoSettingsModes.cs b/ScreenToGif.Model/Enums/VideoSettingsModes.cs
new file mode 100644
index 000000000..67f738bd3
--- /dev/null
+++ b/ScreenToGif.Model/Enums/VideoSettingsModes.cs
@@ -0,0 +1,7 @@
+namespace ScreenToGif.Domain.Enums;
+
+public enum VideoSettingsModes
+{
+ Normal,
+ Advanced
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Enums/Vsyncs.cs b/ScreenToGif.Model/Enums/Vsyncs.cs
new file mode 100644
index 000000000..1d082e0ff
--- /dev/null
+++ b/ScreenToGif.Model/Enums/Vsyncs.cs
@@ -0,0 +1,11 @@
+namespace ScreenToGif.Domain.Enums;
+
+public enum Vsyncs
+{
+ Off,
+ Auto,
+ Passthrough,
+ Cfr,
+ Vfr,
+ Drop
+}
\ No newline at end of file
diff --git a/ScreenToGif/Util/InputHook/CustomKeyEventArgs.cs b/ScreenToGif.Model/Events/CustomKeyEventArgs.cs
similarity index 90%
rename from ScreenToGif/Util/InputHook/CustomKeyEventArgs.cs
rename to ScreenToGif.Model/Events/CustomKeyEventArgs.cs
index e08bfd3d2..05436f01a 100644
--- a/ScreenToGif/Util/InputHook/CustomKeyEventArgs.cs
+++ b/ScreenToGif.Model/Events/CustomKeyEventArgs.cs
@@ -1,7 +1,6 @@
-using System;
using System.Windows.Input;
-namespace ScreenToGif.Util.InputHook
+namespace ScreenToGif.Domain.Events
{
///
/// Custom Key Event Args.
diff --git a/ScreenToGif/Util/InputHook/CustomKeyPressEventArgs.cs b/ScreenToGif.Model/Events/CustomKeyPressEventArgs.cs
similarity index 92%
rename from ScreenToGif/Util/InputHook/CustomKeyPressEventArgs.cs
rename to ScreenToGif.Model/Events/CustomKeyPressEventArgs.cs
index b103ccb78..785b37bfb 100644
--- a/ScreenToGif/Util/InputHook/CustomKeyPressEventArgs.cs
+++ b/ScreenToGif.Model/Events/CustomKeyPressEventArgs.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace ScreenToGif.Util.InputHook
+namespace ScreenToGif.Domain.Events
{
///
/// Custom KeyPress Event Args
diff --git a/ScreenToGif.Model/Events/ManipulatedEventArgs.cs b/ScreenToGif.Model/Events/ManipulatedEventArgs.cs
new file mode 100644
index 000000000..4aa92f6e0
--- /dev/null
+++ b/ScreenToGif.Model/Events/ManipulatedEventArgs.cs
@@ -0,0 +1,40 @@
+using System.Windows;
+
+namespace ScreenToGif.Domain.Events;
+
+public delegate void ManipulatedEventHandler(object sender, ManipulatedEventArgs args);
+
+public class ManipulatedEventArgs : RoutedEventArgs
+{
+ public double AngleDifference { get; private set; }
+
+ public double WidthDifference { get; private set; }
+
+ public double HeightDifference { get; private set; }
+
+ public double TopDifference { get; private set; }
+
+ public double LeftDifference { get; private set; }
+
+ public ManipulatedEventArgs(RoutedEvent routedEvent, double angleDifference, double widthDifference, double heightDifference, double topDifference, double leftDifference) : base(routedEvent)
+ {
+ AngleDifference = angleDifference;
+ WidthDifference = widthDifference;
+ HeightDifference = heightDifference;
+ TopDifference = topDifference;
+ LeftDifference = leftDifference;
+ }
+
+ public ManipulatedEventArgs(RoutedEvent routedEvent, double angleDifference) : base(routedEvent)
+ {
+ AngleDifference = angleDifference;
+ }
+
+ public ManipulatedEventArgs(RoutedEvent routedEvent, double widthDifference, double heightDifference, double topDifference, double leftDifference) : base(routedEvent)
+ {
+ WidthDifference = widthDifference;
+ HeightDifference = heightDifference;
+ TopDifference = topDifference;
+ LeftDifference = leftDifference;
+ }
+}
\ No newline at end of file
diff --git a/ScreenToGif/Model/Events/SaveEventArgs.cs b/ScreenToGif.Model/Events/SaveEventArgs.cs
similarity index 82%
rename from ScreenToGif/Model/Events/SaveEventArgs.cs
rename to ScreenToGif.Model/Events/SaveEventArgs.cs
index 970908b18..8f7f2c543 100644
--- a/ScreenToGif/Model/Events/SaveEventArgs.cs
+++ b/ScreenToGif.Model/Events/SaveEventArgs.cs
@@ -1,6 +1,6 @@
using System.Windows;
-namespace ScreenToGif.Model.Events
+namespace ScreenToGif.Domain.Events
{
public class SaveEventArgs : RoutedEventArgs
{
diff --git a/ScreenToGif/Model/Events/ValidatedEventArgs.cs b/ScreenToGif.Model/Events/ValidatedEventArgs.cs
similarity index 90%
rename from ScreenToGif/Model/Events/ValidatedEventArgs.cs
rename to ScreenToGif.Model/Events/ValidatedEventArgs.cs
index e5fde88f5..592406fe7 100644
--- a/ScreenToGif/Model/Events/ValidatedEventArgs.cs
+++ b/ScreenToGif.Model/Events/ValidatedEventArgs.cs
@@ -1,15 +1,14 @@
-using System;
using System.Windows;
-using ScreenToGif.Util;
+using ScreenToGif.Domain.Enums;
-namespace ScreenToGif.Model.Events
+namespace ScreenToGif.Domain.Events
{
public delegate void ValidatedEventHandler(object sender, ValidatedEventArgs e);
public class ValidatedEventArgs : RoutedEventArgs
{
public string MessageKey { get; set; }
-
+
public StatusReasons Reason { get; set; }
public Action Action { get; set; }
diff --git a/ScreenToGif.Model/Exceptions/GraphicsConfigurationException.cs b/ScreenToGif.Model/Exceptions/GraphicsConfigurationException.cs
new file mode 100644
index 000000000..6ea28d0cd
--- /dev/null
+++ b/ScreenToGif.Model/Exceptions/GraphicsConfigurationException.cs
@@ -0,0 +1,7 @@
+namespace ScreenToGif.Domain.Exceptions;
+
+public class GraphicsConfigurationException : Exception
+{
+ public GraphicsConfigurationException(string message, Exception exception) : base(message, exception)
+ { }
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Exceptions/SettingsPersistenceException.cs b/ScreenToGif.Model/Exceptions/SettingsPersistenceException.cs
new file mode 100644
index 000000000..5ad504e10
--- /dev/null
+++ b/ScreenToGif.Model/Exceptions/SettingsPersistenceException.cs
@@ -0,0 +1,19 @@
+using System.Windows;
+
+namespace ScreenToGif.Domain.Exceptions;
+
+public sealed class SettingsPersistenceException : Exception
+{
+ public ResourceDictionary ResourceDictionary { get; }
+
+ public bool IsLocal { get; }
+
+ public SettingsPersistenceException()
+ { }
+
+ public SettingsPersistenceException(ResourceDictionary resourceDictionary, bool isLocal)
+ {
+ ResourceDictionary = resourceDictionary;
+ IsLocal = isLocal;
+ }
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Exceptions/UploadException.cs b/ScreenToGif.Model/Exceptions/UploadException.cs
new file mode 100644
index 000000000..75a6e14c0
--- /dev/null
+++ b/ScreenToGif.Model/Exceptions/UploadException.cs
@@ -0,0 +1,16 @@
+using System;
+
+namespace ScreenToGif.Cloud
+{
+ public class UploadException : Exception
+ {
+ public UploadException() : base("Uploading failed")
+ { }
+
+ public UploadException(string message) : base(message)
+ { }
+
+ public UploadException(string message, Exception innerException) : base(message, innerException)
+ { }
+ }
+}
\ No newline at end of file
diff --git a/ScreenToGif/Interfaces/IExportPreset.cs b/ScreenToGif.Model/Interfaces/IExportPreset.cs
similarity index 72%
rename from ScreenToGif/Interfaces/IExportPreset.cs
rename to ScreenToGif.Model/Interfaces/IExportPreset.cs
index 18dabf66c..ba7553d07 100644
--- a/ScreenToGif/Interfaces/IExportPreset.cs
+++ b/ScreenToGif.Model/Interfaces/IExportPreset.cs
@@ -1,20 +1,20 @@
-using ScreenToGif.Util;
+using ScreenToGif.Domain.Enums;
-namespace ScreenToGif.Interfaces
+namespace ScreenToGif.Domain.Interfaces
{
public interface IExportPreset : IPreset
{
string TitleKey { get; set; }
string DescriptionKey { get; set; }
- Export Type { get; set; }
+ ExportFormats Type { get; set; }
bool PickLocation { get; set; }
- bool OverwriteOnSave { get; set; }
+ OverwriteModes OverwriteMode { get; set; }
bool ExportAsProjectToo { get; set; }
bool UploadFile { get; set; }
string UploadService { get; set; }
-
+
bool ExportPartially { get; set; }
- PartialExportType PartialExport { get; set; }
+ PartialExportModes PartialExport { get; set; }
string PartialExportFrameExpression { get; set; }
string OutputFolder { get; set; }
diff --git a/ScreenToGif.Model/Interfaces/IFfmpegPreset.cs b/ScreenToGif.Model/Interfaces/IFfmpegPreset.cs
new file mode 100644
index 000000000..8799987b2
--- /dev/null
+++ b/ScreenToGif.Model/Interfaces/IFfmpegPreset.cs
@@ -0,0 +1,11 @@
+using ScreenToGif.Domain.Enums;
+
+namespace ScreenToGif.Domain.Interfaces
+{
+ public interface IFfmpegPreset
+ {
+ VideoSettingsModes SettingsMode { get; set; }
+
+ string Parameters { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Interfaces/IFrame.cs b/ScreenToGif.Model/Interfaces/IFrame.cs
new file mode 100644
index 000000000..effd62405
--- /dev/null
+++ b/ScreenToGif.Model/Interfaces/IFrame.cs
@@ -0,0 +1,38 @@
+using ScreenToGif.Domain.Enums;
+using System.Windows;
+using System.Windows.Media;
+
+namespace ScreenToGif.Domain.Interfaces;
+
+public interface IFrame
+{
+ public string Path { get; set; }
+
+ public string Name { get; set; }
+
+ public int Delay { get; set; }
+
+ public int CursorX { get; set; }
+
+ public int CursorY { get; set; }
+
+ public MouseButtons ButtonClicked { get; set; }
+
+ public bool WasClicked { get; set; }
+
+ public int Index { get; set; }
+
+ public Int32Rect Rect { get; set; }
+
+ public Color ColorKey { get; set; }
+
+ public bool HasArea => Rect.HasArea;
+
+ public List KeyList { get; set; }
+
+ public byte[] Data { get; set; }
+
+ public bool FrameSkipped { get; set; }
+
+ public long DataLength { get; set; }
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Interfaces/IHistory.cs b/ScreenToGif.Model/Interfaces/IHistory.cs
new file mode 100644
index 000000000..c93189338
--- /dev/null
+++ b/ScreenToGif.Model/Interfaces/IHistory.cs
@@ -0,0 +1,33 @@
+using System.Windows.Documents;
+using ScreenToGif.Domain.Enums;
+
+namespace ScreenToGif.Domain.Interfaces;
+
+public interface IHistory
+{
+ public UploadDestinations Type { get; set; }
+
+ public string PresetName { get; set; }
+
+ public DateTime? DateInUtc { get; set; }
+
+ public DateTime? DateInLocalTime { get; }
+
+ public int Result { get; set; }
+
+ public bool WasSuccessful { get; }
+
+ public long Size { get; set; }
+
+ public TimeSpan? Duration { get; set; }
+
+ public string Link { get; set; }
+
+ public string DeletionLink { get; set; }
+
+ public string Message { get; set; }
+
+ public FlowDocument Content { get; }
+
+ public string GetLink(IPreset preset);
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Interfaces/IKeyGesture.cs b/ScreenToGif.Model/Interfaces/IKeyGesture.cs
new file mode 100644
index 000000000..de836736b
--- /dev/null
+++ b/ScreenToGif.Model/Interfaces/IKeyGesture.cs
@@ -0,0 +1,12 @@
+using System.Windows.Input;
+
+namespace ScreenToGif.Domain.Interfaces;
+
+public interface IKeyGesture
+{
+ public ModifierKeys Modifiers { get; set; }
+ public Key Key { get; set; }
+ public bool IsUppercase { get; set; }
+ public bool IsInjected { get; set; }
+ public string DisplayString { get; }
+}
\ No newline at end of file
diff --git a/ScreenToGif/Interfaces/IPanel.cs b/ScreenToGif.Model/Interfaces/IPanel.cs
similarity index 53%
rename from ScreenToGif/Interfaces/IPanel.cs
rename to ScreenToGif.Model/Interfaces/IPanel.cs
index 06829ab72..dbd8b193a 100644
--- a/ScreenToGif/Interfaces/IPanel.cs
+++ b/ScreenToGif.Model/Interfaces/IPanel.cs
@@ -1,6 +1,4 @@
-using System.Threading.Tasks;
-
-namespace ScreenToGif.Interfaces
+namespace ScreenToGif.Domain.Interfaces
{
public interface IPanel
{
diff --git a/ScreenToGif.Model/Interfaces/IPersistent.cs b/ScreenToGif.Model/Interfaces/IPersistent.cs
new file mode 100644
index 000000000..1a2fd70ef
--- /dev/null
+++ b/ScreenToGif.Model/Interfaces/IPersistent.cs
@@ -0,0 +1,7 @@
+namespace ScreenToGif.Domain.Interfaces
+{
+ public interface IPersistent
+ {
+ void Persist();
+ }
+}
\ No newline at end of file
diff --git a/ScreenToGif/Interfaces/IPreset.cs b/ScreenToGif.Model/Interfaces/IPreset.cs
similarity index 64%
rename from ScreenToGif/Interfaces/IPreset.cs
rename to ScreenToGif.Model/Interfaces/IPreset.cs
index dac158e56..4daed4d8a 100644
--- a/ScreenToGif/Interfaces/IPreset.cs
+++ b/ScreenToGif.Model/Interfaces/IPreset.cs
@@ -1,7 +1,6 @@
-using System.Threading.Tasks;
-using ScreenToGif.Model.Events;
+using ScreenToGif.Domain.Events;
-namespace ScreenToGif.Interfaces
+namespace ScreenToGif.Domain.Interfaces
{
public interface IPreset
{
diff --git a/ScreenToGif.Model/Interfaces/IUploadPreset.cs b/ScreenToGif.Model/Interfaces/IUploadPreset.cs
new file mode 100644
index 000000000..5fd0e4f78
--- /dev/null
+++ b/ScreenToGif.Model/Interfaces/IUploadPreset.cs
@@ -0,0 +1,40 @@
+using System.Collections;
+using System.Windows;
+using ScreenToGif.Domain.Enums;
+
+namespace ScreenToGif.Domain.Interfaces;
+
+public interface IUploadPreset : IPreset
+{
+ public UploadDestinations Type { get; set; }
+
+ public bool IsEnabled { get; set; }
+
+ public string ImageId { get; set; }
+
+ public bool IsAnonymous { get; set; }
+
+ public ArrayList History { get; set; }
+
+ public List AllowedTypes { get; set; }
+
+ public string TypeName { get; }
+
+ public bool HasLimit { get; }
+
+ public bool HasSizeLimit { get; }
+
+ public bool HasDurationLimit { get; }
+
+ public bool HasResolutionLimit { get; }
+
+ public long? SizeLimit { get; }
+
+ public TimeSpan? DurationLimit { get; }
+
+ public Size? ResolutionLimit { get; }
+
+ public string Limit { get; }
+
+ public string Mode { get; }
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Interfaces/IUploader.cs b/ScreenToGif.Model/Interfaces/IUploader.cs
new file mode 100644
index 000000000..78143eeb4
--- /dev/null
+++ b/ScreenToGif.Model/Interfaces/IUploader.cs
@@ -0,0 +1,14 @@
+namespace ScreenToGif.Domain.Interfaces;
+
+public interface IUploader
+{
+ ///
+ /// Upload the file to the cloud service.
+ ///
+ /// The upload preset with the configurations necessary for the upload.
+ /// Path of file.
+ ///
+ ///
+ /// The upload details.
+ Task UploadFileAsync(IUploadPreset preset, string path, CancellationToken cancellationToken, IProgress progressCallback = null);
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Models/DetectedRegion.cs b/ScreenToGif.Model/Models/DetectedRegion.cs
new file mode 100644
index 000000000..09b04f3ba
--- /dev/null
+++ b/ScreenToGif.Model/Models/DetectedRegion.cs
@@ -0,0 +1,25 @@
+using System.Windows;
+
+namespace ScreenToGif.Domain.Models;
+
+public class DetectedRegion
+{
+ public IntPtr Handle { get; private set; }
+
+ public Rect Bounds { get; set; }
+
+ public string Name { get; private set; }
+
+ ///
+ /// The Z-Index of the window, higher means that the window will be on top.
+ ///
+ public int Order { get; private set; }
+
+ public DetectedRegion(IntPtr handle, Rect bounds, string name, int order = 0)
+ {
+ Handle = handle;
+ Bounds = bounds;
+ Name = name;
+ Order = order;
+ }
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Models/ExportFrame.cs b/ScreenToGif.Model/Models/ExportFrame.cs
new file mode 100644
index 000000000..1796c7d92
--- /dev/null
+++ b/ScreenToGif.Model/Models/ExportFrame.cs
@@ -0,0 +1,41 @@
+using System.Windows;
+
+namespace ScreenToGif.Domain.Models;
+
+public class ExportFrame
+{
+ ///
+ /// The position of the frame within the list.
+ ///
+ public int Index { get; set; }
+
+ ///
+ /// The position of the frame on the pixel array.
+ ///
+ public long DataPosition { get; set; }
+
+ ///
+ /// The pixel array data length of the frame.
+ ///
+ public long DataLength { get; set; }
+
+ ///
+ /// The delay of the frame.
+ ///
+ public int Delay { get; set; }
+
+ ///
+ /// The Rectangle of the frame.
+ ///
+ public Int32Rect Rect { get; set; }
+
+ ///
+ /// The depth in bits of the frame.
+ ///
+ public int ImageDepth { get; set; }
+
+ ///
+ /// True if the frame has area, width and height > 0.
+ ///
+ public bool HasArea => Rect.HasArea;
+}
\ No newline at end of file
diff --git a/ScreenToGif.Model/Models/ExportProject.cs b/ScreenToGif.Model/Models/ExportProject.cs
new file mode 100644
index 000000000..62a96a326
--- /dev/null
+++ b/ScreenToGif.Model/Models/ExportProject.cs
@@ -0,0 +1,41 @@
+using ScreenToGif.Domain.Interfaces;
+
+namespace ScreenToGif.Domain.Models;
+
+public class ExportProject
+{
+ ///
+ /// True if the project will be passed as files instead of byte array.
+ ///
+ public bool UsesFiles { get; set; }
+
+ ///
+ /// The path of frame chunk.
+ ///
+ public string ChunkPath { get; set; }
+
+ ///
+ /// The path of frame chunk that is used to hold the new frame data when cutting the images.
+ ///
+ public string NewChunkPath { get; set; }
+
+ ///
+ /// Path of the folder where the files are located.
+ ///
+ public string Path { get; set; }
+
+ ///
+ /// List of frames.
+ ///
+ public List Frames { get; set; } = new();
+
+ ///
+ /// List of frames.
+ ///
+ public List