├── Installer
├── .gitignore
└── Updates.aip
├── DropMeter.WidgetSDK
├── .gitignore
├── package.json
├── src
│ └── index.ts
└── tsconfig.json
├── DropMeter
├── Resources
│ ├── logo.ico
│ ├── logo.png
│ └── logo_transparent.png
├── App.config
├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── App.xaml
├── MainWindow.xaml
├── FileHandler
│ ├── PluginManifest.cs
│ ├── UIs
│ │ ├── InstallExtension.xaml.cs
│ │ └── InstallExtension.xaml
│ └── DMFileHandler.cs
├── nlog.config
├── PluginMgr
│ ├── DebugSocket.cs
│ ├── WidgetLoader.cs
│ └── PluginLoader.cs
├── HTMLWidget.xaml
├── CEF
│ ├── ObjectRepository.cs
│ ├── JSComContext.cs
│ ├── DragDropHandler.cs
│ └── FileProtocolHandler.cs
├── Win32
│ ├── WindowPlacement.cs
│ └── WallpaperOverwrite.cs
├── MainWindow.xaml.cs
├── AvailableWidgets.xaml.cs
├── AvailableWidgets.xaml
├── DropMeter.csproj
├── CloseMenuHandler.cs
├── NamedPipeManager.cs
└── HTMLWidget.xaml.cs
├── DropMeter.WebNowPlaying.RainMeterCompat
├── API
│ ├── DllExporter.exe
│ ├── x32
│ │ └── Rainmeter.lib
│ ├── RainmeterAPI.h
│ └── RainmeterAPI.cs
├── supported_features.png
├── images
│ ├── WebNowPlaying_banner.png
│ ├── WebNowPlaying_banner.psd
│ ├── WebNowPlaying_logo.png
│ ├── WebNowPlaying_logo.psd
│ ├── WebNowPlaying_logo_b.png
│ ├── WebNowPlaying_banner_m.png
│ ├── WebNowPlaying_banner_m.psd
│ ├── WebNowPlaying_banner_s.png
│ ├── WebNowPlaying_banner_s.psd
│ ├── WebNowPlaying_screenshot.png
│ └── WebNowPlaying_screenshot.psd
├── ExampleSkin
│ └── @resources
│ │ └── images
│ │ ├── next.png
│ │ ├── play.png
│ │ ├── cover.png
│ │ ├── nocover.png
│ │ ├── pause.png
│ │ ├── refresh.png
│ │ ├── repeat.png
│ │ ├── replay.png
│ │ ├── rewind.png
│ │ ├── shuffle.png
│ │ ├── previous.png
│ │ ├── repeatOne.png
│ │ ├── seekBack.png
│ │ ├── thumbsUp.png
│ │ ├── volumeUp.png
│ │ ├── seekForward.png
│ │ ├── thumbsDown.png
│ │ └── volumeDown.png
├── ILMergeOrder.txt
├── packages.config
├── AssemblyInfo.cs
├── .gitattributes
├── app.config
├── APIKeys.cs
├── WebNowPlaying.sln
├── ILMerge.props
├── RainmeterAPI.cs
├── README.md
└── .gitignore
├── WebView2Test
├── packages.config
├── App.config
├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── App.xaml
├── App.xaml.cs
├── MainWindow.xaml
├── MainWindow.xaml.cs
└── WebView2Test.csproj
├── DropMeter.WebNowPlaying
├── manifest.json
├── PlayerState.cs
├── DropMeter.WebNowPlaying.csproj
├── Properties
│ └── AssemblyInfo.cs
└── WebNowPlaying.cs
├── WallpaperEngineButBetter
├── App.config
├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── App.xaml.cs
├── App.xaml
├── MainWindow.xaml
├── MainWindow.xaml.cs
└── WallpaperEngineButBetter.csproj
├── DropMeter.sln.DotSettings
├── MigrationBackup
└── 808e205b
│ └── Plugins
│ └── DropMeter.WebNowPlaying.RainMeterCompat
│ ├── packages.config
│ └── DropMeter.WebNowPlaying.RainMeterCompat.csproj
├── DropMeter.PluginInterface
├── DropMeter.PluginInterface.csproj
├── Properties
│ └── AssemblyInfo.cs
└── PluginInterface.cs
├── .gitattributes
├── README.md
└── .gitignore
/Installer/.gitignore:
--------------------------------------------------------------------------------
1 | Output
2 | DropMeter-cache
--------------------------------------------------------------------------------
/DropMeter.WidgetSDK/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | dist
--------------------------------------------------------------------------------
/DropMeter/Resources/logo.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter/Resources/logo.ico
--------------------------------------------------------------------------------
/DropMeter/Resources/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter/Resources/logo.png
--------------------------------------------------------------------------------
/DropMeter/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/DropMeter/Resources/logo_transparent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter/Resources/logo_transparent.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/API/DllExporter.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/API/DllExporter.exe
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/API/x32/Rainmeter.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/API/x32/Rainmeter.lib
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/supported_features.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/supported_features.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/images/WebNowPlaying_banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/images/WebNowPlaying_banner.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/images/WebNowPlaying_banner.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/images/WebNowPlaying_banner.psd
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/images/WebNowPlaying_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/images/WebNowPlaying_logo.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/images/WebNowPlaying_logo.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/images/WebNowPlaying_logo.psd
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/images/WebNowPlaying_logo_b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/images/WebNowPlaying_logo_b.png
--------------------------------------------------------------------------------
/WebView2Test/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/images/WebNowPlaying_banner_m.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/images/WebNowPlaying_banner_m.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/images/WebNowPlaying_banner_m.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/images/WebNowPlaying_banner_m.psd
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/images/WebNowPlaying_banner_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/images/WebNowPlaying_banner_s.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/images/WebNowPlaying_banner_s.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/images/WebNowPlaying_banner_s.psd
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/images/WebNowPlaying_screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/images/WebNowPlaying_screenshot.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/images/WebNowPlaying_screenshot.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/images/WebNowPlaying_screenshot.psd
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/next.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/play.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/cover.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/nocover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/nocover.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/pause.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/refresh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/refresh.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/repeat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/repeat.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/replay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/replay.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/rewind.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/rewind.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/shuffle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/shuffle.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/previous.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/previous.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/repeatOne.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/repeatOne.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/seekBack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/seekBack.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/thumbsUp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/thumbsUp.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/volumeUp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/volumeUp.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/seekForward.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/seekForward.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/thumbsDown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/thumbsDown.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/volumeDown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KitsuneDev/DropMeter/HEAD/DropMeter.WebNowPlaying.RainMeterCompat/ExampleSkin/@resources/images/volumeDown.png
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "ExtensionType": "Plugin",
3 | "ManifestVersion": 1,
4 | "Name": "WebNowPlaying",
5 | "Slug": "webnowplaying",
6 | "RequiredPlugins": [],
7 | "RequiredCors": []
8 | }
9 |
--------------------------------------------------------------------------------
/WebView2Test/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/WallpaperEngineButBetter/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/DropMeter/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/WebView2Test/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/WallpaperEngineButBetter/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/ILMergeOrder.txt:
--------------------------------------------------------------------------------
1 | # this file contains the partial list of the merged assemblies in the merge order
2 | # you can fill it from the obj\CONFIG\PROJECT.ilmerge generated on every build
3 | # and finetune merge order to your satisfaction
4 |
5 |
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/DropMeter/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/WebView2Test/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/WebView2Test/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace WebView2Test
10 | {
11 | ///
12 | /// Interaction logic for App.xaml
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/WallpaperEngineButBetter/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace WallpaperEngineButBetter
10 | {
11 | ///
12 | /// Interaction logic for App.xaml
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/WallpaperEngineButBetter/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/DropMeter.sln.DotSettings:
--------------------------------------------------------------------------------
1 |
2 | True
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | [assembly: AssemblyCopyright("© 2017 - Trevor Hamilton")]
5 | [assembly: AssemblyVersion("0.4.0")]
6 |
7 | // Do not change the entries below!
8 | #if X64
9 | [assembly: AssemblyInformationalVersion("3.0.2.2161 (64-bit)")]
10 | #else
11 | [assembly: AssemblyInformationalVersion("3.0.2.2161 (32-bit)")]
12 | #endif
13 | [assembly: AssemblyProduct("Rainmeter")]
14 |
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/MigrationBackup/808e205b/Plugins/DropMeter.WebNowPlaying.RainMeterCompat/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying/PlayerState.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace DropMeter.WebNowPlaying
8 | {
9 | public class PlayerState
10 | {
11 | public int STATE; //T-1 - 2-Stop, 1-Play
12 | public string TITLE;
13 | public string ARTIST;
14 | public string ALBUM;
15 | public string DURATION; //0:00
16 | public string POSITION; //0:00
17 | public int VOLUME;
18 | public int RATING;
19 | public int REPEAT; //0|1|2
20 | public bool SHUFFLE;
21 | public string COVER;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/DropMeter/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/DropMeter.WidgetSDK/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "dropmeter-widgetsdk",
3 | "version": "1.0.0",
4 | "description": "DropMeter Widget SDK. Refer to https://github.com/GabrielTK/DropMeter",
5 | "main": "dist/index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "prepublish": "tsc"
9 | },
10 | "repository": {
11 | "type": "git",
12 | "url": "git+https://github.com/GabrielTK/DropMeter.git"
13 | },
14 | "keywords": [
15 | "dropmeter",
16 | "widgets"
17 | ],
18 | "author": "GabrielTK",
19 | "license": "MPL-2.0",
20 | "types": "dist/index.d.ts",
21 | "bugs": {
22 | "url": "https://github.com/GabrielTK/DropMeter/issues"
23 | },
24 | "homepage": "https://github.com/GabrielTK/DropMeter#readme"
25 | }
26 |
--------------------------------------------------------------------------------
/WebView2Test/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/DropMeter/FileHandler/PluginManifest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Newtonsoft.Json;
7 | using Newtonsoft.Json.Converters;
8 |
9 |
10 | namespace DropMeter.FileHandler
11 | {
12 |
13 | public enum ManifestType
14 | {
15 | Plugin,
16 | Widget
17 | }
18 | public class ExtensionManifest
19 | {
20 | [JsonConverter(typeof(StringEnumConverter))]
21 | public ManifestType ExtensionType { get; set; }
22 | public int ManifestVersion { get; set; } = 1;
23 | public string Name { get; set; }
24 | public string Slug { get; set; }
25 | public string[] RequiredPlugins { get; set; }
26 | public string[] RequiredCors { get; set; }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/APIKeys.cs:
--------------------------------------------------------------------------------
1 | namespace WebNowPlaying
2 | {
3 | class APIKeys
4 | {
5 | public class Spotify
6 | {
7 | //Client ID and secret key for spotify API
8 | //Note: You will need to generate your own when building
9 | public static string ClientID = "";
10 | public static string ClientSecret = "";
11 | }
12 |
13 | public class Youtube
14 | {
15 | //For eventual use with the youtube API
16 | //Note: You will need to generate your own when building
17 | public static string APIKey = "";
18 | }
19 |
20 | public class Twitch
21 | {
22 | //For eventual use with the twitch API
23 | //Note: You will need to generate your own when building
24 | public static string ClientID = "";
25 | public static string ClientSecret = "";
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying/DropMeter.WebNowPlaying.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 | false
6 | DropMeter.WebNowPlaying
7 | DropMeter.WebNowPlaying
8 | true
9 |
10 |
11 |
12 | false
13 | runtime
14 |
15 |
16 |
17 |
18 | 1.0.1
19 |
20 |
21 |
22 |
23 | PreserveNewest
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/DropMeter/nlog.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
11 |
12 |
14 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/WallpaperEngineButBetter/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/DropMeter/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 |
12 | namespace DropMeter.Properties
13 | {
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
17 | {
18 |
19 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
20 |
21 | public static Settings Default
22 | {
23 | get
24 | {
25 | return defaultInstance;
26 | }
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/WebView2Test/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 |
12 | namespace WebView2Test.Properties
13 | {
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
17 | {
18 |
19 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
20 |
21 | public static Settings Default
22 | {
23 | get
24 | {
25 | return defaultInstance;
26 | }
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/WallpaperEngineButBetter/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 |
12 | namespace WallpaperEngineButBetter.Properties
13 | {
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
17 | {
18 |
19 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
20 |
21 | public static Settings Default
22 | {
23 | get
24 | {
25 | return defaultInstance;
26 | }
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/DropMeter.PluginInterface/DropMeter.PluginInterface.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 | false
6 | DropMeter.PluginInterface
7 | DropMeter.PluginInterface
8 | DropMeter.PluginInterface
9 |
10 | logo.png
11 | https://github.com/GabrielTK/DropMeter/
12 | SDK, Plugin, DropMeter
13 | true
14 | LICENSE.txt
15 | 1.0.5
16 |
17 |
18 |
19 |
20 | True
21 |
22 |
23 |
24 | True
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/WebView2Test/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Navigation;
14 | using System.Windows.Shapes;
15 |
16 | namespace WebView2Test
17 | {
18 | ///
19 | /// Interaction logic for MainWindow.xaml
20 | ///
21 | public partial class MainWindow : Window
22 | {
23 | public MainWindow()
24 | {
25 | InitializeComponent();
26 | }
27 |
28 | private async void Window_Loaded(object sender, RoutedEventArgs e)
29 | {
30 | await webView.EnsureCoreWebView2Async();
31 | if(true) webView.NavigateToString(@"
32 |
33 |
34 |
35 |
36 | My First Heading
37 | My first paragraph.
38 |
39 |
45 |
46 |
47 | ");
48 | else
49 | {
50 | webView.CoreWebView2.Navigate("https://google.com");
51 | }
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/DropMeter/PluginMgr/DebugSocket.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using DropMeter.PluginInterface;
7 | using WebSocketSharp;
8 | using WebSocketSharp.Server;
9 |
10 | namespace DropMeter.PluginMgr
11 | {
12 |
13 | public struct DebugMessageCapsule
14 | {
15 |
16 | public string pluginId;
17 | public PluginMessage message;
18 |
19 | }
20 | class DebugSocket : IDisposable
21 | {
22 | public static DebugSocket instance = new DebugSocket();
23 | public WebSocketServer wssv;
24 | public class DebugSocketWS : WebSocketBehavior
25 | {
26 | protected override void OnMessage(MessageEventArgs e)
27 | {
28 | var msg = e.Data == "BALUS"
29 | ? "I've been balused already..."
30 | : "I'm not available now.";
31 |
32 | Send(msg);
33 | }
34 | }
35 | public DebugSocket()
36 | {
37 | wssv = new WebSocketServer("ws://localhost:9007");
38 | wssv.AddWebSocketService("/pluginchannel");
39 |
40 | wssv.Start();
41 |
42 | }
43 |
44 | public void Dispose()
45 | {
46 | wssv.Stop();
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/WebNowPlaying.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25420.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebNowPlaying", "WebNowPlaying.csproj", "{E6C9B5D4-78A1-45A0-95F3-48F257D4EE5A}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x64 = Debug|x64
11 | Debug|x86 = Debug|x86
12 | Release|x64 = Release|x64
13 | Release|x86 = Release|x86
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {E6C9B5D4-78A1-45A0-95F3-48F257D4EE5A}.Debug|x64.ActiveCfg = Debug|x64
17 | {E6C9B5D4-78A1-45A0-95F3-48F257D4EE5A}.Debug|x64.Build.0 = Debug|x64
18 | {E6C9B5D4-78A1-45A0-95F3-48F257D4EE5A}.Debug|x86.ActiveCfg = Debug|x86
19 | {E6C9B5D4-78A1-45A0-95F3-48F257D4EE5A}.Debug|x86.Build.0 = Debug|x86
20 | {E6C9B5D4-78A1-45A0-95F3-48F257D4EE5A}.Release|x64.ActiveCfg = Release|x64
21 | {E6C9B5D4-78A1-45A0-95F3-48F257D4EE5A}.Release|x64.Build.0 = Release|x64
22 | {E6C9B5D4-78A1-45A0-95F3-48F257D4EE5A}.Release|x86.ActiveCfg = Release|x86
23 | {E6C9B5D4-78A1-45A0-95F3-48F257D4EE5A}.Release|x86.Build.0 = Release|x86
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("DropMeter.WebNowPlaying")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("DropMeter.WebNowPlaying")]
13 | [assembly: AssemblyCopyright("Copyright © 2021")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("cd28bfe6-e53e-4dc7-97b8-c9200a14baac")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/DropMeter/HTMLWidget.xaml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/DropMeter.PluginInterface/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("DropMeter.PluginInterface")]
9 | [assembly: AssemblyDescription("DropMeter Plugin SDK. See https://github.com/GabrielTK/DropMeter/wiki for more info.")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("GabrielTK")]
12 | [assembly: AssemblyProduct("DropMeter.PluginInterface")]
13 | [assembly: AssemblyCopyright("Copyright © 2021")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("887ae955-2c93-4e95-874f-9991b6286756")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.5.0")]
36 | [assembly: AssemblyFileVersion("1.0.5.0")]
37 |
--------------------------------------------------------------------------------
/DropMeter/CEF/ObjectRepository.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace DropMeter.CEF
8 | {
9 | class ObjectRepository where T2: new()
10 | {
11 | public Dictionary keyValuePairs = new Dictionary();
12 | public T2 this[T key]
13 | {
14 | get
15 | {
16 | T2 value;
17 | if(keyValuePairs.TryGetValue(key, out value))
18 | {
19 | return value;
20 | } else
21 | {
22 | keyValuePairs[key] = new T2();
23 | return keyValuePairs[key];
24 | }
25 |
26 |
27 | }
28 | set => keyValuePairs[key] = value;
29 | }
30 | }
31 | class OptionalRepository where T2: struct
32 | {
33 | public Dictionary keyValuePairs = new Dictionary();
34 | public T2? this[T key]
35 | {
36 | get
37 | {
38 | T2 value;
39 | if (keyValuePairs.TryGetValue(key, out value))
40 | {
41 | return value;
42 | }
43 | else
44 | {
45 |
46 | return null;
47 | }
48 |
49 |
50 | }
51 | set
52 | {
53 | if (value != null)
54 | {
55 | keyValuePairs[key] = value.Value;
56 | }
57 | }
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/DropMeter/Win32/WindowPlacement.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Runtime.InteropServices;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace DropMeter.Win32
9 | {
10 | public static class WindowPlacementWin32
11 | {
12 | [DllImport("user32.dll")]
13 | public static extern bool SetWindowPlacement(IntPtr hWnd, [In] ref WindowPlacement lpwndpl);
14 |
15 | [DllImport("user32.dll")]
16 | public static extern bool GetWindowPlacement(IntPtr hWnd, out WindowPlacement lpwndpl);
17 |
18 | }
19 |
20 | public enum DISPLAY_MODE
21 | {
22 | SW_SHOW_NORMAL = 1,
23 | SW_SHOW_MINIMIZED = 2
24 | }
25 | [Serializable]
26 | [StructLayout(LayoutKind.Sequential)]
27 | public struct WindowPlacement
28 | {
29 | public int length;
30 | public int flags;
31 | public int showCmd;
32 | public Point minPosition;
33 | public Point maxPosition;
34 | public Rect normalPosition;
35 | }
36 | [Serializable]
37 | [StructLayout(LayoutKind.Sequential)]
38 | public struct Rect
39 | {
40 | public int Left;
41 | public int Top;
42 | public int Right;
43 | public int Bottom;
44 |
45 | public Rect(int left, int top, int right, int bottom)
46 | {
47 | Left = left;
48 | Top = top;
49 | Right = right;
50 | Bottom = bottom;
51 | }
52 | }
53 | [Serializable]
54 | [StructLayout(LayoutKind.Sequential)]
55 | public struct Point
56 | {
57 | public int X;
58 | public int Y;
59 |
60 | public Point(int x, int y)
61 | {
62 | X = x;
63 | Y = y;
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/DropMeter.PluginInterface/PluginInterface.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using NLog;
7 |
8 | namespace DropMeter.PluginInterface
9 | {
10 | [Serializable]
11 | public delegate void MessageHandler(string messageId, TEventArgs e);
12 | //public delegate void HandleMessage(string message);
13 | public interface DMPlugin
14 | {
15 | string DisplayName { get; }
16 |
17 | string Slug { get; }
18 |
19 |
20 | //TODO: Pass Plugin's Helper
21 | bool Initialize(IPluginHelper helper);
22 |
23 | void Terminate();
24 | }
25 |
26 | public class IMessageReceivedData
27 | {
28 | public string id { get; set; }
29 | public object data { get; set; }
30 |
31 | }
32 | public interface IPluginHelper
33 | {
34 | ///
35 | /// Sends the message from PLG to all the VIEWs
36 | ///
37 | ///
38 | ///
39 | void BroadcastMessage(string id, object parameters);
40 |
41 | ILogger logger { get; set; }
42 | ///
43 | /// Sends the message from PLG to all the VIEWs
44 | ///
45 | ///
46 | ///
47 | ///
48 | void SendToView(string viewId, string id, object parameters);
49 | ///
50 | /// Messages sent from VIEWs to PLG.
51 | ///
52 | event MessageHandler OnMessageReceived;
53 | }
54 |
55 | public struct PluginMessage
56 | {
57 | public string messageID;
58 | public object data;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/DropMeter/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Runtime.InteropServices;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 | using System.Windows.Controls;
9 | using System.Windows.Data;
10 | using System.Windows.Documents;
11 | using System.Windows.Input;
12 | using System.Windows.Interop;
13 | using System.Windows.Media;
14 | using System.Windows.Media.Imaging;
15 | using System.Windows.Navigation;
16 | using System.Windows.Shapes;
17 |
18 | namespace DropMeter
19 | {
20 | ///
21 | /// Interaction logic for MainWindow.xaml
22 | ///
23 | public partial class MainWindow : Window
24 | {
25 | [DllImport("user32.dll", SetLastError = true)]
26 | static extern int SetWindowLong(IntPtr hWnd, int nIndex, IntPtr dwNewLong);
27 | [DllImport("user32.dll", SetLastError = true)]
28 | static extern IntPtr FindWindow(string lpWindowClass, string lpWindowName);
29 | [DllImport("user32.dll", SetLastError = true)]
30 | static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr childAfter, string className, string windowTitle);
31 | const int GWL_HWNDPARENT = -8;
32 | [DllImport("user32.dll")]
33 | static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
34 |
35 | IntPtr programIntPtr = IntPtr.Zero;
36 |
37 |
38 |
39 | public MainWindow()
40 | {
41 | InitializeComponent();
42 | this.Loaded += MainWindow_Loaded;
43 | }
44 |
45 | void MainWindow_Loaded(object sender, RoutedEventArgs e)
46 | {
47 |
48 |
49 | }
50 |
51 | private void Button_Click(object sender, RoutedEventArgs e)
52 | {
53 | HTMLWidget widget = new HTMLWidget("test",true);
54 | widget.Show();
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/DropMeter/AvailableWidgets.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Navigation;
14 | using System.Windows.Shapes;
15 | using DropMeter.FileHandler;
16 | using DropMeter.PluginMgr;
17 |
18 | namespace DropMeter
19 | {
20 | ///
21 | /// Interaction logic for AvailableWidgets.xaml
22 | ///
23 | public partial class AvailableWidgets : Page
24 | {
25 |
26 |
27 |
28 | public AvailableWidgets()
29 | {
30 | InitializeComponent();
31 | }
32 |
33 | private void LoadWidget_OnClick(object sender, RoutedEventArgs e)
34 | {
35 | if (availableList.SelectedItem == null)
36 | {
37 | MessageBox.Show("Please select a widget.", "Oops", MessageBoxButton.OK, MessageBoxImage.Exclamation);
38 | return;
39 | }
40 | var selected = (KeyValuePair)availableList.SelectedItem;
41 |
42 | App.widgetLoader.LoadWidget(selected.Value.Slug);
43 | //((CollectionViewSource)this.Resources["availableWidgets"]).View.Refresh();
44 | }
45 |
46 | private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
47 | {
48 | App.widgetLoader.SaveWidgetConfig();
49 | }
50 |
51 | private void FilterCollection(object sender, FilterEventArgs e)
52 | {
53 | var wn = ((KeyValuePair) e.Item).Key;
54 | var pass = !App.widgetLoader.OpenWidgets.ContainsKey(wn);
55 | e.Accepted = pass;
56 |
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/DropMeter/AvailableWidgets.xaml:
--------------------------------------------------------------------------------
1 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/DropMeter/CEF/JSComContext.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using CefSharp;
7 | using DropMeter.PluginInterface;
8 |
9 | namespace DropMeter.CEF
10 | {
11 | class JSComContextHelper
12 | {
13 | public static ObjectRepository instances = new ObjectRepository();
14 |
15 | }
16 | class JSComContext
17 | {
18 |
19 |
20 | public void SendToPlugin()
21 | {
22 | // Do something really cool here.
23 | }
24 |
25 | internal ObjectRepository> EventHandlers = new ObjectRepository>();
26 |
27 |
28 | internal async void TransmitEvent(string pluginSlug, PluginMessage message)
29 | {
30 | try
31 | {
32 | foreach (var handler in EventHandlers[pluginSlug])
33 | {
34 | if(handler.CanExecute)
35 | await handler.ExecuteAsync(message);
36 | else
37 | {
38 | //TODO
39 | }
40 | }
41 | }
42 | catch (KeyNotFoundException)
43 | {
44 |
45 | }
46 | }
47 |
48 | public void RegisterCallback(string pluginSlug, IJavascriptCallback javascriptCallback)
49 | {
50 | EventHandlers[pluginSlug].Add(javascriptCallback);
51 | /*const int taskDelay = 1500;
52 |
53 | Task.Run(async () =>
54 | {
55 | await Task.Delay(taskDelay);
56 |
57 | using (javascriptCallback)
58 | {
59 | //NOTE: Classes are not supported, simple structs are
60 | var response = new CallbackResponseStruct("This callback from C# was delayed " + taskDelay + "ms");
61 | await javascriptCallback.ExecuteAsync(response);
62 | }
63 | });*/
64 | }
65 |
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/DropMeter.WidgetSDK/src/index.ts:
--------------------------------------------------------------------------------
1 | export interface IDropMeter {
2 | registerCallback(pluginId: string, callback: (data: PluginMessage)=>void) : void;
3 | sendToPlugin(): void;
4 | }
5 |
6 |
7 | export interface PluginMessage {
8 | messageID: MESG;
9 | data: DATA
10 | }
11 |
12 | interface MockEncapsulatedMessage {
13 | pluginId: string,
14 | message: PluginMessage
15 | }
16 |
17 | export class MockDropMeter implements IDropMeter {
18 | mockSocket: WebSocket;
19 | listeners: {
20 | plugin: string,
21 | cb: (data: PluginMessage) => void
22 | }[] = []
23 | constructor() {
24 | this.mockSocket = new WebSocket("ws://localhost:9007/pluginchannel");
25 | this.mockSocket.onopen = (ev) => {
26 | console.log("Connected to Local Mock Server")
27 | //this.mockSocket.send("core:id")
28 |
29 | }
30 | this.mockSocket.onmessage = (ev) => {
31 | let msgParts = JSON.parse(ev.data) as MockEncapsulatedMessage;
32 | //console.log("Got from mock: ", msgParts)
33 | let targets = this.listeners.filter(x=>x.plugin == msgParts.pluginId)
34 | for(let target of targets){
35 | target.cb(msgParts.message)
36 | }
37 | }
38 |
39 | }
40 | registerCallback(pluginId: string, callback: (data: PluginMessage) => void): void {
41 | this.listeners.push({
42 | plugin: pluginId,
43 | cb: callback
44 | })
45 | }
46 | sendToPlugin() {};
47 |
48 | }
49 |
50 | export const isMock = ((window as any).CefSharp == null)
51 | export var mockInstance: MockDropMeter|null = null;
52 | async function GetDropMeter(){
53 | if(isMock){
54 | if(mockInstance == null) mockInstance = new MockDropMeter();
55 | return mockInstance;
56 |
57 | }
58 | else if((window as any).DropMeter == null){
59 | await (window as any).CefSharp.BindObjectAsync("DropMeter")
60 | }
61 | return (window as any).DropMeter as IDropMeter;
62 | }
63 | //declare var DropMeter: IDropMeter;
64 |
65 | export const DropMeter = GetDropMeter;
66 |
67 |
--------------------------------------------------------------------------------
/DropMeter/FileHandler/UIs/InstallExtension.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Collections.ObjectModel;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 | using System.Windows.Controls;
9 | using System.Windows.Data;
10 | using System.Windows.Documents;
11 | using System.Windows.Input;
12 | using System.Windows.Media;
13 | using System.Windows.Media.Imaging;
14 | using System.Windows.Shapes;
15 |
16 | namespace DropMeter.FileHandler.UIs
17 | {
18 | public class ColoredText
19 | {
20 | public string Text { get; set; }
21 | public SolidColorBrush Color { get; set; } = Brushes.Black;
22 | }
23 | ///
24 | /// Interaction logic for InstallExtension.xaml
25 | ///
26 | public partial class InstallExtension : Window
27 | {
28 | public ObservableCollection RequiredPlugins { get; set; } = new ObservableCollection();
29 | public ObservableCollection RequiredCORS { get; set; } = new ObservableCollection();
30 | public InstallExtension(ExtensionManifest manifest)
31 | {
32 | InitializeComponent();
33 | PluginType.Content = manifest.ExtensionType.ToString();
34 | PluginName.Content = manifest.Name;
35 | foreach (var requiredPlugin in manifest.RequiredPlugins)
36 | {
37 | RequiredPlugins.Add(new ColoredText()
38 | {
39 | Text = requiredPlugin,
40 | Color = (PluginLoader.Plugins.Find(x=>x.Slug == requiredPlugin) != null) ? Brushes.Black : Brushes.Red
41 | });
42 | }
43 | foreach (var requiredPlugin in manifest.RequiredCors)
44 | {
45 | RequiredCORS.Add(new ColoredText()
46 | {
47 | Text = requiredPlugin,
48 | Color = Brushes.Black
49 | });
50 | }
51 | //TODO: Show favicon
52 | }
53 |
54 | private void InstallBtn_OnClick(object sender, RoutedEventArgs e)
55 | {
56 | this.DialogResult = true;
57 | this.Close();
58 | }
59 |
60 | private void AbortBtn_OnClick(object sender, RoutedEventArgs e)
61 | {
62 | this.DialogResult = false;
63 | this.Close();
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/DropMeter/CEF/DragDropHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Drawing;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using CefSharp;
8 | using CefSharp.Enums;
9 |
10 | namespace DropMeter.CEF
11 | {
12 | public class DragDropHandler : IDragHandler
13 | {
14 | public Region draggableRegion = new Region();
15 | public event Action RegionsChanged;
16 |
17 | public bool OnDragEnter(IWebBrowser browserControl, IBrowser browser, IDragData dragData, DragOperationsMask mask)
18 | {
19 | return false;
20 | }
21 |
22 |
23 |
24 | public void OnDraggableRegionsChanged(IWebBrowser browserControl, IBrowser browser, IFrame frame, IList regions)
25 | {
26 | if (browser.IsPopup == false)
27 | {
28 | draggableRegion = null;
29 | if (regions.Count > 0)
30 | {
31 | foreach (var region in regions)
32 | {
33 | // Console.WriteLine(region.X + " - " + region.Y + " - " + region.Width + " - " + region.Height);
34 | var rect = new Rectangle(region.X, region.Y, region.Width, region.Height);
35 |
36 | if (draggableRegion == null)
37 | {
38 | draggableRegion = new Region(rect);
39 | }
40 | else
41 | {
42 | if (region.Draggable)
43 | {
44 | draggableRegion.Union(rect);
45 | }
46 | else
47 | {
48 | //In the scenario where we have an outer region, that is draggable and it has
49 | // an inner region that's not, we must exclude the non draggable.
50 | // Not all scenarios are covered in this example.
51 | draggableRegion.Exclude(rect);
52 | }
53 | }
54 | }
55 | }
56 |
57 | RegionsChanged?.Invoke(draggableRegion);
58 | }
59 | }
60 |
61 | public void Dispose()
62 | {
63 | RegionsChanged = null;
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/DropMeter/FileHandler/UIs/InstallExtension.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/DropMeter/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | [assembly: AssemblyTitle("DropMeter")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("DropMeter")]
15 | [assembly: AssemblyCopyright("Copyright © 2021")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | [assembly: ComVisible(false)]
23 |
24 | //In order to begin building localizable applications, set
25 | //CultureYouAreCodingWith in your .csproj file
26 | //inside a . For example, if you are using US english
27 | //in your source files, set the to en-US. Then uncomment
28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in
29 | //the line below to match the UICulture setting in the project file.
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36 | //(used if a resource is not found in the page,
37 | // or application resource dictionaries)
38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39 | //(used if a resource is not found in the page,
40 | // app, or any theme specific resource dictionaries)
41 | )]
42 |
43 |
44 | // Version information for an assembly consists of the following four values:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // You can specify all the values or you can default the Build and Revision Numbers
52 | // by using the '*' as shown below:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/WebView2Test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | [assembly: AssemblyTitle("WebView2Test")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("WebView2Test")]
15 | [assembly: AssemblyCopyright("Copyright © 2021")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | [assembly: ComVisible(false)]
23 |
24 | //In order to begin building localizable applications, set
25 | //CultureYouAreCodingWith in your .csproj file
26 | //inside a . For example, if you are using US english
27 | //in your source files, set the to en-US. Then uncomment
28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in
29 | //the line below to match the UICulture setting in the project file.
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36 | //(used if a resource is not found in the page,
37 | // or application resource dictionaries)
38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39 | //(used if a resource is not found in the page,
40 | // app, or any theme specific resource dictionaries)
41 | )]
42 |
43 |
44 | // Version information for an assembly consists of the following four values:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // You can specify all the values or you can default the Build and Revision Numbers
52 | // by using the '*' as shown below:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/WallpaperEngineButBetter/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | [assembly: AssemblyTitle("WallpaperEngineButBetter")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("WallpaperEngineButBetter")]
15 | [assembly: AssemblyCopyright("Copyright © 2021")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | [assembly: ComVisible(false)]
23 |
24 | //In order to begin building localizable applications, set
25 | //CultureYouAreCodingWith in your .csproj file
26 | //inside a . For example, if you are using US english
27 | //in your source files, set the to en-US. Then uncomment
28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in
29 | //the line below to match the UICulture setting in the project file.
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36 | //(used if a resource is not found in the page,
37 | // or application resource dictionaries)
38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39 | //(used if a resource is not found in the page,
40 | // app, or any theme specific resource dictionaries)
41 | )]
42 |
43 |
44 | // Version information for an assembly consists of the following four values:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // You can specify all the values or you can default the Build and Revision Numbers
52 | // by using the '*' as shown below:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/WebView2Test/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 |
12 | namespace WebView2Test.Properties
13 | {
14 | ///
15 | /// A strongly-typed resource class, for looking up localized strings, etc.
16 | ///
17 | // This class was auto-generated by the StronglyTypedResourceBuilder
18 | // class via a tool like ResGen or Visual Studio.
19 | // To add or remove a member, edit your .ResX file then rerun ResGen
20 | // with the /str option, or rebuild your VS project.
21 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
22 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
23 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
24 | internal class Resources
25 | {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources()
33 | {
34 | }
35 |
36 | ///
37 | /// Returns the cached ResourceManager instance used by this class.
38 | ///
39 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
40 | internal static global::System.Resources.ResourceManager ResourceManager
41 | {
42 | get
43 | {
44 | if ((resourceMan == null))
45 | {
46 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WebView2Test.Properties.Resources", typeof(Resources).Assembly);
47 | resourceMan = temp;
48 | }
49 | return resourceMan;
50 | }
51 | }
52 |
53 | ///
54 | /// Overrides the current thread's CurrentUICulture property for all
55 | /// resource lookups using this strongly typed resource class.
56 | ///
57 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
58 | internal static global::System.Globalization.CultureInfo Culture
59 | {
60 | get
61 | {
62 | return resourceCulture;
63 | }
64 | set
65 | {
66 | resourceCulture = value;
67 | }
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/WallpaperEngineButBetter/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 |
12 | namespace WallpaperEngineButBetter.Properties
13 | {
14 | ///
15 | /// A strongly-typed resource class, for looking up localized strings, etc.
16 | ///
17 | // This class was auto-generated by the StronglyTypedResourceBuilder
18 | // class via a tool like ResGen or Visual Studio.
19 | // To add or remove a member, edit your .ResX file then rerun ResGen
20 | // with the /str option, or rebuild your VS project.
21 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
22 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
23 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
24 | internal class Resources
25 | {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources()
33 | {
34 | }
35 |
36 | ///
37 | /// Returns the cached ResourceManager instance used by this class.
38 | ///
39 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
40 | internal static global::System.Resources.ResourceManager ResourceManager
41 | {
42 | get
43 | {
44 | if ((resourceMan == null))
45 | {
46 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WallpaperEngineButBetter.Properties.Resources", typeof(Resources).Assembly);
47 | resourceMan = temp;
48 | }
49 | return resourceMan;
50 | }
51 | }
52 |
53 | ///
54 | /// Overrides the current thread's CurrentUICulture property for all
55 | /// resource lookups using this strongly typed resource class.
56 | ///
57 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
58 | internal static global::System.Globalization.CultureInfo Culture
59 | {
60 | get
61 | {
62 | return resourceCulture;
63 | }
64 | set
65 | {
66 | resourceCulture = value;
67 | }
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/DropMeter/DropMeter.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | WinExe
5 | true
6 | net6.0-windows10.0.22621.0
7 | true
8 | false
9 | DropMeter
10 | DropMeter
11 | x86;x64
12 | Resources\logo.ico
13 | DropMeter.App
14 | win-x86;win-x64
15 |
16 |
17 | win-x86
18 |
19 |
20 |
21 | win-x64
22 |
23 |
24 |
25 |
29 | false
30 |
31 |
32 | true
33 | true
34 |
35 |
36 | On
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | 12.0.3
45 |
46 |
47 |
48 |
49 | 1.0.1
50 |
51 |
52 |
53 |
54 | SettingsSingleFileGenerator
55 | Settings.Designer.cs
56 |
57 |
58 | True
59 | Settings.settings
60 | True
61 |
62 |
63 |
64 |
65 |
66 | True
67 | True
68 | Resources.resx
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | Always
77 |
78 |
79 |
--------------------------------------------------------------------------------
/DropMeter/CloseMenuHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using CefSharp;
8 |
9 | namespace DropMeter
10 | {
11 |
12 | class CloseMenuHandler : IContextMenuHandler
13 | {
14 | private HTMLWidget context;
15 |
16 | internal CloseMenuHandler(HTMLWidget context)
17 | {
18 | this.context = context;
19 |
20 | }
21 |
22 | public void OnBeforeContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame,
23 | IContextMenuParams parameters, IMenuModel model)
24 | {
25 | // Remove any existent option using the Clear method of the model
26 | //
27 | //model.Clear();
28 |
29 | Console.WriteLine("Context menu opened !");
30 |
31 | // You can add a separator in case that there are more items on the list
32 | if (model.Count > 0)
33 | {
34 | model.AddSeparator();
35 | }
36 |
37 |
38 | // Add a new item to the list using the AddItem method of the model
39 | model.AddItem((CefMenuCommand) 26501, "Show DevTools");
40 | model.AddItem((CefMenuCommand) 26502, "Close DevTools");
41 |
42 | // Add a separator
43 | model.AddSeparator();
44 |
45 | // Add another example item
46 | model.AddItem((CefMenuCommand) 26503, "Move Widget");
47 | }
48 |
49 | public bool OnContextMenuCommand(IWebBrowser browserControl, IBrowser browser, IFrame frame,
50 | IContextMenuParams parameters, CefMenuCommand commandId, CefEventFlags eventFlags)
51 | {
52 | // React to the first ID (show dev tools method)
53 | if (commandId == (CefMenuCommand) 26501)
54 | {
55 | browser.GetHost().ShowDevTools();
56 | return true;
57 | }
58 |
59 | // React to the second ID (show dev tools method)
60 | if (commandId == (CefMenuCommand) 26502)
61 | {
62 | browser.GetHost().CloseDevTools();
63 | return true;
64 | }
65 |
66 | // React to the third ID (Display alert message)
67 | if (commandId == (CefMenuCommand) 26503)
68 | {
69 | context.EnterMoveMode();
70 | return true;
71 | }
72 |
73 | // Any new item should be handled through a new if statement
74 |
75 |
76 | // Return false should ignore the selected option of the user !
77 | return false;
78 | }
79 |
80 | public void OnContextMenuDismissed(IWebBrowser browserControl, IBrowser browser, IFrame frame)
81 | {
82 |
83 | }
84 |
85 | public bool RunContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame,
86 | IContextMenuParams parameters, IMenuModel model, IRunContextMenuCallback callback)
87 | {
88 | return false;
89 | }
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | # DropMeter
6 | Modern, easy way to create Widgets for your Desktop.
7 | > ⚠️ **DropMeter is integrating into Rainmeter (as a plugin).**
8 | > Join the [Discord Server](https://discord.gg/DBE44yU) for more information.
9 | > **The standalone version of DropMeter will not be updated anymore.**
10 | > Preview Builds of the new setup are available at either the Discord Server or [my website](https://akitsune.dev/projects?tag=rainmeter)
11 |
12 | **If you have any questions, feel free to contact @kitsune.dev on Discord DMs, or join the [Discord Server](https://discord.gg/DBE44yU)**
13 |
14 | ----
15 |
16 | ## What is this?
17 |
18 | DropMeter is a software that allows for desktop widgets to be built with the well-known and loved Web Stack, making use of the latest Web Technologies.
19 |
20 | Think Rainmeter, but with richer and easier to make widgets.
21 |
22 | ## Is this a replacement for Rainmeter?
23 |
24 | I wouldn't say a _replacement_, per see. Rainmeter was initially released back in 2001, and it excels at rendering widgets with low resource usage. However, times have changed, and with the new design trends, many crave for more interactive, responsive and intelligent widgets. That's where DropMeter comes in.
25 | I personally like to combine both, running clocks and audio visualizers on RainMeter and my fancy things on DropMeter.
26 |
27 | ## Is there any advantage of combining it with Rainmeter, then?
28 |
29 | Apart from having a really fancy desktop? Yes, there actually is. We are working on a way to enable complete RainMeter compatibility! Which means that, when a plugin is not available, but you have it installed in RainMeter, it will be able to load it! (I am still working on that feature, so It's not published yet, but it soon will be)
30 |
31 | ## Can I do (insert fancy rainmeter widget feature here)?
32 |
33 | Probably yes! But if you cannot, don't worry, we are paving the way to enable you to do it.
34 | Like RainMeter, DropMeter is built on plugins that can send and receive data from widgets. However, there is an essential difference: All DropMeter Plugins are built with C#, and thus Garbage Collected, therefore making it extremely difficult to have memory leaks and such.
35 | If you are a Developer, don't worry, we have built things so that using our fancy plugin system is as easy as requiring libraries available in NuGet (for plugins) / npm (for Widgets; of course with TypeScript definitions, we are decent people after all) and extending an interface / registering your callbacks.
36 | We even have a built-in WebNowPlaying Plugin, so you don't need to make that extra effort to display your songs information.
37 |
38 | ## I hear the Web Stack is heavy... Will my memory go brrrr?
39 |
40 | I wouldn't worry: Our runtime is pretty optimized, and seems to be able to handle things quite smoothly.
41 | Testing on my machine with my word-by-word lyrics widget (quite heavy, uses React, Framer Motion animations and an interval-based tick system) tops usage at 1% CPU and 79MB on RAM.
42 |
--------------------------------------------------------------------------------
/DropMeter/CEF/FileProtocolHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Text.RegularExpressions;
7 | using System.Threading.Tasks;
8 | using CefSharp;
9 |
10 | namespace DropMeter.CEF
11 | {
12 | public class LocalFileHandler : ResourceHandler
13 | {
14 | // Specifies where you bundled app resides.
15 | // Basically path to your index.html
16 | private string frontendFolderPath;
17 |
18 | public LocalFileHandler(string path)
19 | {
20 | frontendFolderPath = path; //Path.Combine(App.BASE, "./bundle/");
21 | }
22 |
23 | // Process request and craft response.
24 | public override CefReturnValue ProcessRequestAsync(IRequest request, ICallback callback)
25 | {
26 | var uri = new Uri(request.Url);
27 | var fileName = uri.AbsolutePath;
28 | var filematch = new Regex("\\.(.{1,5})");
29 | if (!filematch.IsMatch(fileName))
30 | {
31 | fileName = "index.html";
32 | }
33 | var requestedFilePath = (frontendFolderPath + "\\" + uri.Host + "\\" + fileName).Split('?')[0];
34 | var clearURL = new Regex("index.html(.*)");
35 | requestedFilePath = clearURL.Replace(requestedFilePath, "index.html");
36 |
37 |
38 |
39 | var isAccesToFilePermitted = IsRequestedPathInsideFolder(
40 | new DirectoryInfo(requestedFilePath),
41 | new DirectoryInfo(frontendFolderPath));
42 | bool fileExists = File.Exists(requestedFilePath);
43 | if (isAccesToFilePermitted && fileExists)
44 | {
45 | byte[] bytes = File.ReadAllBytes(requestedFilePath);
46 | Stream = new MemoryStream(bytes);
47 |
48 | var fileExtension = Path.GetExtension(fileName);
49 | MimeType = Cef.GetMimeType(fileExtension);
50 |
51 | callback.Continue();
52 | return CefReturnValue.Continue;
53 | }
54 |
55 | callback.Dispose();
56 | return CefReturnValue.Cancel;
57 | }
58 |
59 | // Added for security reasons.
60 | // In this code it is used to verify that requested file is descendant to your index.html.
61 | public bool IsRequestedPathInsideFolder(DirectoryInfo path, DirectoryInfo folder)
62 | {
63 | /*if (path.Parent == null)
64 | {
65 | return false;
66 | }
67 |
68 | if (string.Equals(path.Parent.FullName, folder.FullName, StringComparison.InvariantCultureIgnoreCase))
69 | {
70 | return true;
71 | }
72 |
73 | return IsRequestedPathInsideFolder(path.Parent, folder);*/
74 | return (true); //TODO: Fix this.
75 | }
76 | }
77 |
78 | public class LocalFileHandlerFactory : ISchemeHandlerFactory
79 | {
80 | public const string SchemeName = "widgets";
81 |
82 | private string path;
83 | public LocalFileHandlerFactory(string path)
84 | {
85 |
86 | this.path = path;
87 | }
88 | public IResourceHandler Create(IBrowser browser, IFrame frame, string schemeName, IRequest request)
89 | {
90 | return new LocalFileHandler(path);
91 | }
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/DropMeter/NamedPipeManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.IO.Pipes;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading;
8 | using System.Threading.Tasks;
9 |
10 | namespace DropMeter
11 | {
12 | ///
13 | /// A very simple Named Pipe Server implementation that makes it
14 | /// easy to pass string messages between two applications.
15 | ///
16 | public class NamedPipeManager
17 | {
18 | public string NamedPipeName = "MarkdownMonster";
19 | public event Action ReceiveString;
20 |
21 | private const string EXIT_STRING = "__EXIT__";
22 | private bool _isRunning = false;
23 | private Thread Thread;
24 |
25 | public NamedPipeManager(string name)
26 | {
27 | NamedPipeName = name;
28 | }
29 |
30 | ///
31 | /// Starts a new Pipe server on a new thread
32 | ///
33 | public void StartServer()
34 | {
35 | Thread = new Thread((pipeName) =>
36 | {
37 | _isRunning = true;
38 |
39 | while (true)
40 | {
41 | string text;
42 | using (var server = new NamedPipeServerStream(pipeName as string))
43 | {
44 | server.WaitForConnection();
45 |
46 | using (StreamReader reader = new StreamReader(server))
47 | {
48 | text = reader.ReadToEnd();
49 | }
50 | }
51 |
52 | if (text == EXIT_STRING)
53 | break;
54 |
55 | OnReceiveString(text);
56 |
57 | if (_isRunning == false)
58 | break;
59 | }
60 | });
61 | Thread.Start(NamedPipeName);
62 | }
63 |
64 | ///
65 | /// Called when data is received.
66 | ///
67 | ///
68 | protected virtual void OnReceiveString(string text) => ReceiveString?.Invoke(text);
69 |
70 |
71 | ///
72 | /// Shuts down the pipe server
73 | ///
74 | public void StopServer()
75 | {
76 | _isRunning = false;
77 | Write(EXIT_STRING);
78 | Thread.Sleep(30); // give time for thread shutdown
79 | }
80 |
81 | ///
82 | /// Write a client message to the pipe
83 | ///
84 | ///
85 | ///
86 | public bool Write(string text, int connectTimeout = 300)
87 | {
88 | using (var client = new NamedPipeClientStream(NamedPipeName))
89 | {
90 | try
91 | {
92 | client.Connect(connectTimeout);
93 | }
94 | catch
95 | {
96 | return false;
97 | }
98 |
99 | if (!client.IsConnected)
100 | return false;
101 |
102 | using (StreamWriter writer = new StreamWriter(client))
103 | {
104 | writer.Write(text);
105 | writer.Flush();
106 | }
107 | }
108 | return true;
109 | }
110 | }
111 | }
112 |
--------------------------------------------------------------------------------
/Installer/Updates.aip:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/ILMerge.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | true
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/DropMeter/FileHandler/DMFileHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.IO.Compression;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 | using System.Windows;
9 | using DropMeter.FileHandler.UIs;
10 | using Newtonsoft.Json;
11 |
12 | namespace DropMeter.FileHandler
13 | {
14 | class DMFileHandler
15 | {
16 | public App App;
17 | internal DMFileHandler(App app)
18 | {
19 | this.App = app;
20 | }
21 |
22 |
23 |
24 | internal void OpenFile(string path)
25 | {
26 | if (path.EndsWith(".dmx"))
27 | {
28 | try {
29 | Stream filestream = new FileStream(path, FileMode.Open);
30 | ZipArchive file = new ZipArchive(filestream);
31 | Stream manifestStream = file.GetEntry("manifest.json").Open();
32 | var manifestReader = new StreamReader(manifestStream);
33 |
34 |
35 | var manifest = JsonConvert.DeserializeObject(manifestReader.ReadToEnd());
36 | filestream.Close();
37 | var permAsk = new InstallExtension(manifest);
38 | var hasPerm = permAsk.ShowDialog();
39 | if (hasPerm == true)
40 | {
41 | var isPlugin = (manifest.ExtensionType == ManifestType.Plugin);
42 | var baseDir = isPlugin ? App.PluginBase : App.WidgetsBase;
43 |
44 | var target = isPlugin ? baseDir : Path.Combine(baseDir, manifest.Slug);
45 | var isUpdate = Directory.Exists(target);
46 | if (isUpdate&& !isPlugin)
47 | {
48 | var shouldReplace = MessageBox.Show(
49 | $"The {manifest.ExtensionType.ToString()} appears to be already installed. Would you like to replace it?", "Duplicate Found", MessageBoxButton.YesNo, MessageBoxImage.Question);
50 | if (shouldReplace == MessageBoxResult.Yes)
51 | {
52 | Directory.Delete(target, true);
53 | }
54 | else return;
55 |
56 | }
57 | ZipFile.ExtractToDirectory(path, target);
58 | if(!isPlugin) App.widgetLoader.LoadAvailableWidgets();
59 | var extraAction = (manifest.ExtensionType == ManifestType.Widget)
60 | ? (isUpdate ? "It will be reloaded." : "Enable it at the Management Center.")
61 | : "Please restart DropMeter."; //TODO: Reload plugins?
62 | MessageBox.Show($"{manifest.Name} has been installed. {extraAction}");
63 | //TODO: Reload widgets
64 | }
65 |
66 |
67 | }
68 | catch (Exception e)
69 | {
70 | MessageBox.Show(
71 | $"An error was detected while handling the plugin package: {e.Message}",
72 | "Oops", MessageBoxButton.OK, MessageBoxImage.Error);
73 | }
74 | finally
75 | {
76 |
77 | }
78 | }
79 |
80 | else
81 | {
82 | MessageBox.Show(
83 | "An unknown file has been sent to DropMeter. We'll just pretend we did not see that.",
84 | "Oops", MessageBoxButton.OK, MessageBoxImage.Error);
85 | }
86 | }
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/DropMeter/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace DropMeter.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DropMeter.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
65 | ///
66 | internal static System.Drawing.Icon Icon {
67 | get {
68 | object obj = ResourceManager.GetObject("Icon", resourceCulture);
69 | return ((System.Drawing.Icon)(obj));
70 | }
71 | }
72 |
73 | ///
74 | /// Looks up a localized resource of type System.Drawing.Bitmap.
75 | ///
76 | internal static System.Drawing.Bitmap Logo {
77 | get {
78 | object obj = ResourceManager.GetObject("Logo", resourceCulture);
79 | return ((System.Drawing.Bitmap)(obj));
80 | }
81 | }
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/API/RainmeterAPI.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Kimmo Pekkola, Birunthan Mohanathas
3 |
4 | This program is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU General Public License
6 | as published by the Free Software Foundation; either version 2
7 | of the License, or (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program; if not, write to the Free Software
16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 | */
18 |
19 | #ifndef __RAINMETERAPI_H__
20 | #define __RAINMETERAPI_H__
21 |
22 | #ifdef LIBRARY_EXPORTS
23 | #define LIBRARY_EXPORT EXTERN_C
24 | #else
25 | #define LIBRARY_EXPORT EXTERN_C __declspec(dllimport)
26 | #endif // LIBRARY_EXPORTS
27 |
28 | #define PLUGIN_EXPORT EXTERN_C __declspec(dllexport)
29 |
30 | //
31 | // Exported functions
32 | //
33 |
34 | #ifdef __cplusplus
35 | LIBRARY_EXPORT LPCWSTR __stdcall RmReadString(void* rm, LPCWSTR option, LPCWSTR defValue, BOOL replaceMeasures = TRUE);
36 | #else
37 | LIBRARY_EXPORT LPCWSTR __stdcall RmReadString(void* rm, LPCWSTR option, LPCWSTR defValue, BOOL replaceMeasures);
38 | #endif // __cplusplus
39 |
40 | LIBRARY_EXPORT double __stdcall RmReadFormula(void* rm, LPCWSTR option, double defValue);
41 |
42 | LIBRARY_EXPORT LPCWSTR __stdcall RmReplaceVariables(void* rm, LPCWSTR str);
43 |
44 | LIBRARY_EXPORT LPCWSTR __stdcall RmPathToAbsolute(void* rm, LPCWSTR relativePath);
45 |
46 | LIBRARY_EXPORT void __stdcall RmExecute(void* skin, LPCWSTR command);
47 |
48 | LIBRARY_EXPORT void* __stdcall RmGet(void* rm, int type);
49 |
50 | enum RmGetType
51 | {
52 | RMG_MEASURENAME = 0,
53 | RMG_SKIN = 1,
54 | RMG_SETTINGSFILE = 2,
55 | RMG_SKINNAME = 3,
56 | RMG_SKINWINDOWHANDLE = 4
57 | };
58 |
59 | LIBRARY_EXPORT void __stdcall RmLog(void* rm, int level, LPCWSTR message);
60 |
61 | LIBRARY_EXPORT void __cdecl RmLogF(void* rm, int level, LPCWSTR format, ...);
62 |
63 | LIBRARY_EXPORT BOOL LSLog(int type, LPCWSTR unused, LPCWSTR message);
64 |
65 | //
66 | // Wrapper functions
67 | //
68 |
69 | #ifndef LIBRARY_EXPORTS
70 | __inline LPCWSTR RmReadPath(void* rm, LPCWSTR option, LPCWSTR defValue)
71 | {
72 | LPCWSTR relativePath = RmReadString(rm, option, defValue, TRUE);
73 | return RmPathToAbsolute(rm, relativePath);
74 | }
75 |
76 | __inline int RmReadInt(void* rm, LPCWSTR option, int defValue)
77 | {
78 | return (int)RmReadFormula(rm, option, defValue);
79 | }
80 |
81 | __inline double RmReadDouble(void* rm, LPCWSTR option, double defValue)
82 | {
83 | return RmReadFormula(rm, option, defValue);
84 | }
85 |
86 | __inline LPCWSTR RmGetMeasureName(void* rm)
87 | {
88 | return (LPCWSTR)RmGet(rm, RMG_MEASURENAME);
89 | }
90 |
91 | __inline LPCWSTR RmGetSettingsFile()
92 | {
93 | return (LPCWSTR)RmGet(NULL, RMG_SETTINGSFILE);
94 | }
95 |
96 | __inline void* RmGetSkin(void* rm)
97 | {
98 | return (void*)RmGet(rm, RMG_SKIN);
99 | }
100 |
101 | __inline LPCWSTR RmGetSkinName(void* rm)
102 | {
103 | return (LPCWSTR)RmGet(rm, RMG_SKINNAME);
104 | }
105 |
106 | __inline HWND RmGetSkinWindow(void* rm)
107 | {
108 | return (HWND)RmGet(rm, RMG_SKINWINDOWHANDLE);
109 | }
110 |
111 | __inline void RmLog(int level, LPCWSTR message)
112 | {
113 | LSLog(level, NULL, message);
114 | }
115 |
116 | enum LOGLEVEL
117 | {
118 | LOG_ERROR = 1,
119 | LOG_WARNING = 2,
120 | LOG_NOTICE = 3,
121 | LOG_DEBUG = 4
122 | };
123 | #endif // LIBRARY_EXPORTS
124 |
125 | #define RmReadFormula _ReadFormula
126 |
127 | #endif
128 |
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying/WebNowPlaying.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using DropMeter.PluginInterface;
7 | using WebSocketSharp;
8 | using WebSocketSharp.Server;
9 |
10 | namespace DropMeter.WebNowPlaying
11 | {
12 | class WebNowPlayingReceiver : WebSocketBehavior
13 | {
14 | #region Operations
15 | public void PLAYPAUSE()
16 | {
17 | this.Send("PLAYPAUSE");
18 |
19 | }
20 | public void NEXT()
21 | {
22 | this.Send("NEXT");
23 |
24 | }
25 | public void PREVIOUS()
26 | {
27 | this.Send("PREVIOUS");
28 |
29 | }
30 | public void SETPOSITION(int Position)
31 | {
32 | this.Send("SETPOSITION " + Position);
33 |
34 | }
35 | public void SETVOLUME(int Volume)
36 | {
37 | this.Send("SETVOLUME "+ Volume);
38 |
39 | }
40 | public void REPEAT()
41 | {
42 | this.Send("REPEAT");
43 |
44 | }
45 | public async void SHUFFLE()
46 | {
47 | this.Send("SHUFFLE");
48 |
49 | }
50 | public async void RATING(int Stars)
51 | {
52 | this.Send("RATING "+Stars);
53 |
54 | }
55 |
56 |
57 |
58 | #endregion
59 | protected override void OnMessage(MessageEventArgs e)
60 | {
61 |
62 |
63 | var msg = e.Data;
64 | Console.WriteLine(e.Data);
65 | var datas = msg.Split(':');
66 | WebNowPlaying.helper.BroadcastMessage(datas[0], string.Join(":", datas.Skip(1)));
67 | if(WebNowPlaying.RainmeterConnector.ReadyState == WebSocketState.Open)
68 | try
69 | {
70 | WebNowPlaying.RainmeterConnector.Send(e.Data);
71 | }
72 | catch
73 | {
74 | //TODO: Log Rainmeter Send Error
75 |
76 | }
77 |
78 | Send(msg);
79 |
80 | }
81 | }
82 | public class WebNowPlaying : DMPlugin
83 | {
84 |
85 |
86 | WebNowPlayingReceiver LastPlayer;
87 | internal static WebSocket RainmeterConnector = new WebSocket("ws://127.0.0.1:8976/");
88 | internal static IPluginHelper helper;
89 | public string DisplayName
90 | {
91 | get => "WebNowPlaying";
92 |
93 | }
94 |
95 | public string Slug
96 | {
97 | get => "webnowplaying";
98 |
99 | }
100 |
101 | private WebSocketServer wssv;
102 | public bool Initialize(IPluginHelper _helper)
103 | {
104 | helper = _helper;
105 | wssv = new WebSocketServer("ws://127.0.0.1:8974/");
106 | wssv.AddWebSocketService("/");
107 | wssv.Start();
108 |
109 | helper.OnMessageReceived += (message, data) =>
110 | {
111 | //Pass it to the Player
112 | wssv.WebSocketServices["/"].Sessions.Broadcast(message);
113 | };
114 | Task task = Task.Run(ConnectRainmeterCompat);
115 |
116 | return true;
117 | }
118 |
119 | public async Task ConnectRainmeterCompat()
120 | {
121 | int RainMeterTries = 0;
122 | while (RainMeterTries <= 10)
123 | {
124 | try
125 | {
126 | RainmeterConnector.Connect();
127 |
128 | return true;
129 | }
130 | catch
131 | {
132 | await Task.Delay(2000);
133 | RainMeterTries = RainMeterTries + 1;
134 | }
135 | }
136 | WebNowPlaying.helper.logger.Warn("Unable to detect Rainmeter Compat.");
137 | return false;
138 | }
139 | public void Terminate()
140 | {
141 | RainmeterConnector.Close();
142 | wssv?.Stop();
143 | }
144 | }
145 | }
146 |
--------------------------------------------------------------------------------
/DropMeter/Win32/WallpaperOverwrite.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Interop;
8 |
9 | namespace DropMeter.Win32
10 | {
11 | class WallpaperOverwrite
12 | {
13 | private IntPtr progman, workerw, handle;
14 | private Window target;
15 |
16 | public WallpaperOverwrite(Window target)
17 | {
18 | this.target = target;
19 | }
20 | public void AttachToDesktop()
21 | {
22 | handle = new WindowInteropHelper(target).Handle;
23 | // Fetch the Progman window
24 | progman = W32.FindWindow("Progman", null);
25 |
26 | IntPtr result = IntPtr.Zero;
27 |
28 | // Send 0x052C to Progman. This message directs Progman to spawn a
29 | // WorkerW behind the desktop icons. If it is already there, nothing
30 | // happens.
31 | W32.SendMessageTimeout(progman,
32 | 0x052C,
33 | new IntPtr(0xD),
34 | new IntPtr(0x1),
35 | W32.SendMessageTimeoutFlags.SMTO_NORMAL,
36 | 1000,
37 | out result);
38 | // Spy++ output
39 | // .....
40 | // 0x00010190 "" WorkerW
41 | // ...
42 | // 0x000100EE "" SHELLDLL_DefView
43 | // 0x000100F0 "FolderView" SysListView32
44 | // 0x00100B8A "" WorkerW <-- This is the WorkerW instance we are after!
45 | // 0x000100EC "Program Manager" Progman
46 | workerw = IntPtr.Zero;
47 |
48 | // We enumerate all Windows, until we find one, that has the SHELLDLL_DefView
49 | // as a child.
50 | // If we found that window, we take its next sibling and assign it to workerw.
51 | W32.EnumWindows(new W32.EnumWindowsProc((tophandle, topparamhandle) =>
52 | {
53 | IntPtr p = W32.FindWindowEx(tophandle,
54 | IntPtr.Zero,
55 | "SHELLDLL_DefView",
56 | IntPtr.Zero);
57 |
58 | if (p != IntPtr.Zero)
59 | {
60 | // Gets the WorkerW Window after the current one.
61 | workerw = W32.FindWindowEx(IntPtr.Zero,
62 | tophandle,
63 | "WorkerW",
64 | IntPtr.Zero);
65 | }
66 |
67 | return true;
68 | }), IntPtr.Zero);
69 |
70 | SetParentWorkerW(handle);
71 | }
72 | ///
73 | /// Adds the wp as child of spawned desktop-workerw window.
74 | ///
75 | /// handle of window
76 | private void SetParentWorkerW(IntPtr windowHandle)
77 | {
78 | //Legacy, Windows 7
79 | if (Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Minor == 1)
80 | {
81 | if (!workerw.Equals(progman)) //this should fix the win7 wallpaper disappearing issue.
82 | W32.ShowWindow(workerw, 0);
83 |
84 | IntPtr ret = W32.SetParent(windowHandle, progman);
85 | if (ret.Equals(IntPtr.Zero))
86 | {
87 | //LogUtil.LogWin32Error("Failed to set window parent");
88 | throw new Exception("Failed to set window parent.");
89 | }
90 | //workerw is assumed as progman in win7, this is untested with all fn's: addwallpaper(), wp pause, resize events..
91 | workerw = progman;
92 | }
93 | else
94 | {
95 | IntPtr ret = W32.SetParent(windowHandle, workerw);
96 | if (ret.Equals(IntPtr.Zero))
97 | {
98 | //LogUtil.LogWin32Error("Failed to set window parent");
99 | throw new Exception("Failed to set window parent.");
100 | }
101 | }
102 | }
103 | }
104 | }
105 |
--------------------------------------------------------------------------------
/WallpaperEngineButBetter/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Linq.Expressions;
5 | using System.Runtime.InteropServices;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 | using System.Windows;
9 | using System.Windows.Controls;
10 | using System.Windows.Data;
11 | using System.Windows.Documents;
12 | using System.Windows.Input;
13 | using System.Windows.Media;
14 | using System.Windows.Media.Imaging;
15 | using System.Windows.Navigation;
16 | using System.Windows.Shapes;
17 | using DropMeter;
18 |
19 | namespace WallpaperEngineButBetter
20 | {
21 | class WindowInfo
22 | {
23 | public IntPtr Handle;
24 | public string Title;
25 | public override string ToString()
26 | {
27 | return Title + " (" + Handle + ")";
28 | }
29 | }
30 | ///
31 | /// Interaction logic for MainWindow.xaml
32 | ///
33 | public partial class MainWindow : Window
34 | {
35 | [DllImport("user32.dll")] private static extern int GetWindowText(IntPtr hWnd, StringBuilder title, int size);
36 |
37 | [DllImport("user32.dll")]
38 | public static extern IntPtr GetParent(
39 | IntPtr hWnd
40 | );
41 |
42 |
43 | List AllWindows = new List();
44 | public MainWindow()
45 | {
46 | InitializeComponent();
47 | }
48 |
49 | private WindowInfo currentInfo;
50 | private IntPtr OldParent;
51 |
52 | private void Window_Loaded(object sender, RoutedEventArgs e)
53 | {
54 | W32.EnumWindows((hwnd, lParam) =>
55 | {
56 | //var shell = W32.FindWindowEx(hwnd, IntPtr.Zero, "SHELLDLL_DefView", (IntPtr)null);
57 | // Find the WorkerW that contains the SHELLDLL_DefView window handle
58 | try
59 | {
60 | StringBuilder title = new StringBuilder(256);
61 | GetWindowText(hwnd, title, 256);
62 | var final = title.ToString();
63 | if (final != null && final != "")
64 | {
65 | ProcessChooser.Items.Add(new WindowInfo()
66 | {
67 | Handle = hwnd,
68 | Title = final
69 | });
70 | }
71 | } catch {}
72 |
73 |
74 | return true;
75 | }, IntPtr.Zero);
76 | AllWindows = ProcessChooser.Items.Cast().ToList();
77 | }
78 |
79 | private void Button_Click(object sender, RoutedEventArgs e)
80 | {
81 | if (currentInfo == null)
82 | {
83 | currentInfo = (WindowInfo)ProcessChooser.SelectedItem;
84 | OldParent = GetParent(currentInfo.Handle);
85 | W32.EnumWindows((hwnd, lParam) =>
86 | {
87 | var shell = W32.FindWindowEx(hwnd, IntPtr.Zero, "SHELLDLL_DefView", (IntPtr)null);
88 | // Find the WorkerW that contains the SHELLDLL_DefView window handle
89 | if (shell != IntPtr.Zero)
90 | {
91 | //hwnd is WorkerW
92 | if (AboveIcons.IsChecked == true)
93 | W32.SetParent(currentInfo.Handle, shell);
94 | else
95 | {
96 | W32.FindWindowEx(shell, IntPtr.Zero, "SysListView32", IntPtr.Zero);
97 | }
98 | // Find the current WorkerW window, the next WorkerW window.
99 | //IntPtr tempHwnd = W32.FindWindowEx(IntPtr.Zero, hwnd, "WorkerW", (IntPtr)null);
100 |
101 | // hide this window
102 | //W32.ShowWindow(tempHwnd, 0);
103 | }
104 |
105 | return true;
106 | }, IntPtr.Zero);
107 | }
108 | else
109 | {
110 | W32.SetParent(currentInfo.Handle, OldParent);
111 | currentInfo = null;
112 | //OldParent = ;
113 | }
114 | }
115 |
116 | private void Refresh_Click(object sender, RoutedEventArgs e)
117 | {
118 |
119 | }
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/DropMeter/PluginMgr/WidgetLoader.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.IO;
5 | using System.Linq;
6 | using System.Runtime.CompilerServices;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows;
10 | using DropMeter.Annotations;
11 | using DropMeter.FileHandler;
12 | using Newtonsoft.Json;
13 |
14 |
15 | namespace DropMeter.PluginMgr
16 | {
17 | public class WidgetLoader : INotifyPropertyChanged
18 | {
19 | public ObservableDictionary OpenWidgets { get; set; } = new ObservableDictionary();
20 | public ObservableDictionary Widgets { get; set; } = new ObservableDictionary();
21 | internal string LOADED_PATH = System.IO.Path.Combine(App.BASE, "loaded.json");
22 |
23 | public void SaveWidgetConfig()
24 | {
25 | string code = JsonConvert.SerializeObject(OpenWidgets.Keys.ToArray());
26 | File.WriteAllText(LOADED_PATH, code);
27 | }
28 |
29 | public void LoadWidgetConfig()
30 | {
31 | if (!File.Exists(LOADED_PATH)) return;
32 | string[] widgetsToLoad = JsonConvert.DeserializeObject(File.ReadAllText(LOADED_PATH));
33 | foreach (var wn in widgetsToLoad)
34 | {
35 | LoadWidget(wn, false);
36 | }
37 |
38 | ((App) Application.Current).CreateContextMenu();
39 | }
40 |
41 | public void LoadWidget(string widgetName, bool AutoRebuildContext = true)
42 | {
43 | if(OpenWidgets.ContainsKey(widgetName)) return;
44 | if (!Widgets.ContainsKey(widgetName))
45 | {
46 | Console.WriteLine($"Widget {widgetName} has not been found.");
47 | return;
48 | }
49 |
50 | var entry = Widgets[widgetName];
51 | var view = new HTMLWidget(widgetName, true);
52 | view.Show();
53 | OpenWidgets.Add(widgetName, view);
54 | if(AutoRebuildContext) ((App)Application.Current).CreateContextMenu();
55 |
56 | ChangedLoadedWidgets();
57 |
58 | }
59 |
60 | public void CloseWidget(string widgetName, bool AutoRebuildContext = true)
61 | {
62 | if (!OpenWidgets.ContainsKey(widgetName)) return;
63 | var data = OpenWidgets[widgetName];
64 | data.Close();
65 | OpenWidgets.Remove(widgetName);
66 | if (AutoRebuildContext) ((App)Application.Current).CreateContextMenu();
67 | ChangedLoadedWidgets();
68 |
69 | }
70 |
71 | private void ChangedLoadedWidgets()
72 | {
73 | Widgets.DependencyChanged();
74 | OpenWidgets.DependencyChanged();
75 | OnPropertyChanged(null);
76 | }
77 |
78 | public void LoadAvailableWidgets()
79 | {
80 | Widgets.Clear();
81 | foreach (var widget in Directory.EnumerateDirectories(App.WidgetsBase))
82 | {
83 | var mfPath = Path.Combine(widget, "manifest.json");
84 | if (File.Exists(Path.Combine(widget, "index.html")) && File.Exists(mfPath))
85 | {
86 | var wn = new DirectoryInfo(widget).Name;
87 | var manifest = JsonConvert.DeserializeObject(File.ReadAllText(mfPath));
88 | Widgets.Add(wn, manifest);
89 |
90 | }
91 | else
92 | {
93 | Console.WriteLine($"Widget at {widget} has no Entrypoint! Skipping.");
94 | }
95 | }
96 | #if DEBUG
97 | if (!Widgets.ContainsKey("DebugWidget"))
98 | {
99 | Widgets.Add("DebugWidget", new ExtensionManifest()
100 | {
101 | Name = "Debug Widget",
102 | ExtensionType = ManifestType.Widget,
103 | ManifestVersion = 1,
104 | Slug = "DebugWidget",
105 | });
106 | }
107 | #endif
108 | //Widgets.DependencyChanged();
109 | }
110 | public void LoadWidgets()
111 | {
112 | LoadAvailableWidgets();
113 | LoadWidgetConfig();
114 | }
115 |
116 | public event PropertyChangedEventHandler? PropertyChanged;
117 |
118 | [NotifyPropertyChangedInvocator]
119 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
120 | {
121 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
122 | }
123 | }
124 | }
125 |
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/API/RainmeterAPI.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Birunthan Mohanathas
3 |
4 | This program is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU General Public License
6 | as published by the Free Software Foundation; either version 2
7 | of the License, or (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program; if not, write to the Free Software
16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 | */
18 |
19 | using System;
20 | using System.Runtime.InteropServices;
21 |
22 | namespace Rainmeter
23 | {
24 | ///
25 | /// Wrapper around the Rainmeter C API.
26 | ///
27 | public class API
28 | {
29 | private IntPtr m_Rm;
30 |
31 | public API(IntPtr rm)
32 | {
33 | m_Rm = rm;
34 | }
35 |
36 | [DllImport("Rainmeter.dll", CharSet = CharSet.Unicode)]
37 | private extern static IntPtr RmReadString(IntPtr rm, string option, string defValue, bool replaceMeasures);
38 |
39 | [DllImport("Rainmeter.dll", CharSet = CharSet.Unicode)]
40 | private extern static double RmReadFormula(IntPtr rm, string option, double defValue);
41 |
42 | [DllImport("Rainmeter.dll", CharSet = CharSet.Unicode)]
43 | private extern static IntPtr RmReplaceVariables(IntPtr rm, string str);
44 |
45 | [DllImport("Rainmeter.dll", CharSet = CharSet.Unicode)]
46 | private extern static IntPtr RmPathToAbsolute(IntPtr rm, string relativePath);
47 |
48 | [DllImport("Rainmeter.dll", EntryPoint = "RmExecute", CharSet = CharSet.Unicode)]
49 | public extern static void Execute(IntPtr skin, string command);
50 |
51 | [DllImport("Rainmeter.dll")]
52 | private extern static IntPtr RmGet(IntPtr rm, RmGetType type);
53 |
54 | [DllImport("Rainmeter.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
55 | private extern static int LSLog(LogType type, string unused, string message);
56 |
57 | private enum RmGetType
58 | {
59 | MeasureName = 0,
60 | Skin = 1,
61 | SettingsFile = 2,
62 | SkinName = 3,
63 | SkinWindowHandle = 4
64 | }
65 |
66 | public enum LogType
67 | {
68 | Error = 1,
69 | Warning = 2,
70 | Notice = 3,
71 | Debug = 4
72 | }
73 |
74 | public string ReadString(string option, string defValue, bool replaceMeasures = true)
75 | {
76 | return Marshal.PtrToStringUni(RmReadString(m_Rm, option, defValue, replaceMeasures));
77 | }
78 |
79 | public string ReadPath(string option, string defValue)
80 | {
81 | return Marshal.PtrToStringUni(RmPathToAbsolute(m_Rm, ReadString(option, defValue)));
82 | }
83 |
84 | public double ReadDouble(string option, double defValue)
85 | {
86 | return RmReadFormula(m_Rm, option, defValue);
87 | }
88 |
89 | public int ReadInt(string option, int defValue)
90 | {
91 | return (int)RmReadFormula(m_Rm, option, defValue);
92 | }
93 |
94 | public string ReplaceVariables(string str)
95 | {
96 | return Marshal.PtrToStringUni(RmReplaceVariables(m_Rm, str));
97 | }
98 |
99 | public string GetMeasureName()
100 | {
101 | return Marshal.PtrToStringUni(RmGet(m_Rm, RmGetType.MeasureName));
102 | }
103 |
104 | public IntPtr GetSkin()
105 | {
106 | return RmGet(m_Rm, RmGetType.Skin);
107 | }
108 |
109 | public string GetSettingsFile()
110 | {
111 | return Marshal.PtrToStringUni(RmGet(m_Rm, RmGetType.SettingsFile));
112 | }
113 |
114 | public string GetSkinName()
115 | {
116 | return Marshal.PtrToStringUni(RmGet(m_Rm, RmGetType.SkinName));
117 | }
118 |
119 | public IntPtr GetSkinWindow()
120 | {
121 | return RmGet(m_Rm, RmGetType.SkinWindowHandle);
122 | }
123 |
124 | public static void Log(LogType type, string message)
125 | {
126 | LSLog(type, null, message);
127 | }
128 | }
129 |
130 | ///
131 | /// Dummy attribute to mark method as exported for DllExporter.exe.
132 | ///
133 | [AttributeUsage(AttributeTargets.Method)]
134 | public class DllExport : Attribute
135 | {
136 | public DllExport()
137 | {
138 | }
139 | }
140 | }
141 |
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/RainmeterAPI.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Birunthan Mohanathas
3 |
4 | This program is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU General Public License
6 | as published by the Free Software Foundation; either version 2
7 | of the License, or (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program; if not, write to the Free Software
16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 | */
18 |
19 | using System;
20 | using System.Runtime.InteropServices;
21 |
22 | namespace Rainmeter
23 | {
24 | ///
25 | /// Wrapper around the Rainmeter C API.
26 | ///
27 | public class API
28 | {
29 | private IntPtr m_Rm;
30 |
31 | public API(IntPtr rm)
32 | {
33 | m_Rm = rm;
34 | }
35 |
36 | [DllImport("Rainmeter.dll", CharSet = CharSet.Unicode)]
37 | private extern static IntPtr RmReadString(IntPtr rm, string option, string defValue, bool replaceMeasures);
38 |
39 | [DllImport("Rainmeter.dll", CharSet = CharSet.Unicode)]
40 | private extern static double RmReadFormula(IntPtr rm, string option, double defValue);
41 |
42 | [DllImport("Rainmeter.dll", CharSet = CharSet.Unicode)]
43 | private extern static IntPtr RmReplaceVariables(IntPtr rm, string str);
44 |
45 | [DllImport("Rainmeter.dll", CharSet = CharSet.Unicode)]
46 | private extern static IntPtr RmPathToAbsolute(IntPtr rm, string relativePath);
47 |
48 | [DllImport("Rainmeter.dll", EntryPoint = "RmExecute", CharSet = CharSet.Unicode)]
49 | public extern static void Execute(IntPtr skin, string command);
50 |
51 | [DllImport("Rainmeter.dll")]
52 | private extern static IntPtr RmGet(IntPtr rm, RmGetType type);
53 |
54 | [DllImport("Rainmeter.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
55 | private extern static int LSLog(LogType type, string unused, string message);
56 |
57 | private enum RmGetType
58 | {
59 | MeasureName = 0,
60 | Skin = 1,
61 | SettingsFile = 2,
62 | SkinName = 3,
63 | SkinWindowHandle = 4
64 | }
65 |
66 | public enum LogType
67 | {
68 | Error = 1,
69 | Warning = 2,
70 | Notice = 3,
71 | Debug = 4
72 | }
73 |
74 | public string ReadString(string option, string defValue, bool replaceMeasures = true)
75 | {
76 | return Marshal.PtrToStringUni(RmReadString(m_Rm, option, defValue, replaceMeasures));
77 | }
78 |
79 | public string ReadPath(string option, string defValue)
80 | {
81 | return Marshal.PtrToStringUni(RmPathToAbsolute(m_Rm, ReadString(option, defValue)));
82 | }
83 |
84 | public double ReadDouble(string option, double defValue)
85 | {
86 | return RmReadFormula(m_Rm, option, defValue);
87 | }
88 |
89 | public int ReadInt(string option, int defValue)
90 | {
91 | return (int)RmReadFormula(m_Rm, option, defValue);
92 | }
93 |
94 | public string ReplaceVariables(string str)
95 | {
96 | return Marshal.PtrToStringUni(RmReplaceVariables(m_Rm, str));
97 | }
98 |
99 | public string GetMeasureName()
100 | {
101 | return Marshal.PtrToStringUni(RmGet(m_Rm, RmGetType.MeasureName));
102 | }
103 |
104 | public IntPtr GetSkin()
105 | {
106 | return RmGet(m_Rm, RmGetType.Skin);
107 | }
108 |
109 | public string GetSettingsFile()
110 | {
111 | return Marshal.PtrToStringUni(RmGet(m_Rm, RmGetType.SettingsFile));
112 | }
113 |
114 | public string GetSkinName()
115 | {
116 | return Marshal.PtrToStringUni(RmGet(m_Rm, RmGetType.SkinName));
117 | }
118 |
119 | public IntPtr GetSkinWindow()
120 | {
121 | return RmGet(m_Rm, RmGetType.SkinWindowHandle);
122 | }
123 |
124 | public static void Log(LogType type, string message)
125 | {
126 | LSLog(type, null, message);
127 | }
128 | }
129 |
130 | ///
131 | /// Dummy attribute to mark method as exported for DllExporter.exe.
132 | ///
133 | [AttributeUsage(AttributeTargets.Method)]
134 | public class DllExport : Attribute
135 | {
136 | public DllExport()
137 | {
138 | }
139 | }
140 | }
141 |
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/README.md:
--------------------------------------------------------------------------------
1 | # Web Now Playing for Rainmeter
2 | A plugin for Rainmeter that when paired with a browser extension allows retrieval of music info and playback control from various websites such as soundcloud or youtube.
3 | Included in this repo is an example skin that shows how to use every measure and bang.
4 | Source code for the browser extension can be found [here](https://github.com/tjhrulz/WebNowPlaying-BrowserExtension)
5 |
6 | ## Extension links:
7 | [Chrome Web Store](https://chrome.google.com/webstore/detail/webnowplaying-companion/jfakgfcdgpghbbefmdfjkbdlibjgnbli)
8 | [Firefox Addons Store](https://addons.mozilla.org/en-US/firefox/addon/webnowplaying-companion/)
9 | **[Browser extension source](https://github.com/tjhrulz/WebNowPlaying-BrowserExtension)**
10 | **Note:** While using Firefox you will need to go to the about:config page in Firefox and set network.websocket.allowInsecureFromHTTPS to true until I can look into using a self signed SSL Certifcate or have the funds to purchase one.
11 |
12 | ### Current state:
13 | Fully functional
14 |
15 | ### Future additions: (See extension source code for web side addition)
16 | - Improve autoswitcher
17 | - Storing image in temp when no location is declared instead of in your Rainmeter directory
18 | - Avoid redownloading image if it is the same as the last image (Or some sort of image caching)
19 | - Using secure websockets for everything
20 |
21 | #### If you would like you can donate to support the plugin [here](https://www.paypal.me/tjhrulz)
22 |
23 | ## Measure types:
24 |
25 | - `Player`
26 |
27 | What the name of the player is the song is coming from. i.e Youtube or Soundcloud
28 |
29 | - `Title, Artist, Album`
30 |
31 | String of current playing songs info, blank if no info.
32 |
33 | - `Cover`
34 |
35 | String that points to current album art, while downloading or if no album art points to the path of the default.
36 | **Note:** Do not assume the image will always be a square.
37 |
38 | **Attributes:**
39 | CoverPath - A system path to where to store the album art.
40 | DefaultPath - A system path to what image to use when downloading the album art.
41 |
42 | - `CoverWebAddress`
43 |
44 | String of URL location of current album art, useful for doing an onChangeAction as cover will update twice when the song changes. This will only update once and only once the image has been downloaded to the disk.
45 |
46 | - `Position, Duration`
47 |
48 | String of how far into the song or how long the song is, formated MM:SS.
49 |
50 | - `Progress`
51 |
52 | Double of how far into the song you are as a percentage. To clarify that number is formated ##.##### and has a predefined max of 100.00.
53 |
54 | - `Repeat`
55 |
56 | Integer of if the music player is set to repeat. 0 is no, 1 is repeat one song, 2 is repeat all.
57 | **Note:** If unsupported by current website value will always be 0
58 |
59 | - `Shuffle`
60 |
61 | Integer of if the music player is set to shuffle. 0 is no, 1 is yes.
62 | **Note:** If unsupported by current website value will always be 0
63 |
64 | - `Rating`
65 |
66 | Integer of the rating of the song. 0 through 5. Sites with binary rating system have Thumbs Down =1 Thumbs up =5. 0 is unrated.
67 |
68 | - `Volume`
69 |
70 | Integer between 0-100 of what the current volume is set in the music player.
71 |
72 | - `State`
73 |
74 | Integer of the play state of the music player. 0 is stopped, 1 is playing, 2 is paused.
75 |
76 | - `Status`
77 |
78 | If 0 no supported websites are open, 1 is if one or more websites are open that are supported.
79 | **Note:** Do not use this to see if the browser extension is installed. If there is enough demand I will try to add a way to check that in the future
80 |
81 | ## Bangs:
82 |
83 | - `SetPosition ##.####`
84 |
85 | Where ##.#### is a Double between 0-100. Sets the what percent of the way through the song the song is. Add + or - in front to set the position relatively.
86 |
87 | - `SetVolume ###`
88 |
89 | Where ### is a Integer beween 0-100, add + or - in front to set the volume relatively.
90 | **Note:** Some websites may not have the volume sliders change since I change the volume of the internal audio file.
91 |
92 | - `Previous`, `PlayPause`, `Next`
93 |
94 | Self explanitory.
95 | **Note:** Previous on youtube currently is a little funky since I just move the page back one in the history if not using a playlist. I will add better tracking in the future.
96 |
97 | - `Repeat`
98 |
99 | Toggles through repeat modes supported by websites. Sometimes may be none at all.
100 |
101 | - `Shuffle`
102 |
103 | Toggles through shuffle modes supported by websites. Sometimes may be none at all.
104 |
105 | - `ToggleThumbsUp` and `ToggleThumbsDown`
106 |
107 | Toggles the song being thumbed up or down, to set it to a specific state see SetRating.
108 | **Note:** Not all sites support thumbs down. Any site that uses stars will toggle the rating to be 5 stars and 1 star repspectively.
109 |
110 | - `SetRating #`
111 |
112 | Where # is an integer, 0-5. Sites with binary rating system have Thumbs Down =1 Thumbs up =5. 0 is unrated.
113 |
--------------------------------------------------------------------------------
/WebView2Test/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/WallpaperEngineButBetter/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/DropMeter/PluginMgr/PluginLoader.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Reflection;
6 | using System.Runtime.Loader;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using DropMeter.CEF;
10 | using DropMeter.PluginInterface;
11 | using DropMeter.PluginMgr;
12 | using Newtonsoft.Json;
13 | using NLog;
14 |
15 | namespace DropMeter
16 | {
17 | public class PluginHelper : IPluginHelper
18 | {
19 | private DMPlugin Plugin;
20 |
21 | public ILogger logger { get; set; }
22 |
23 | internal PluginHelper(DMPlugin Plugin)
24 | {
25 | this.Plugin = Plugin;
26 | this.logger = App.LogFactory.GetLogger(Plugin.Slug);
27 | }
28 | public void BroadcastMessage(string id, object parameters)
29 | {
30 | var data = new PluginMessage()
31 | {
32 | messageID = id,
33 | data = parameters
34 | };
35 |
36 | var sessions = DebugSocket.instance.wssv.WebSocketServices["/pluginchannel"].Sessions;
37 | sessions.Broadcast(JsonConvert.SerializeObject(new DebugMessageCapsule()
38 | {
39 | message = data,
40 | pluginId = Plugin.Slug
41 | }));
42 | //TODO
43 | foreach(var widget in JSComContextHelper.instances.keyValuePairs)
44 | {
45 | widget.Value.TransmitEvent(Plugin.Slug, data);
46 | }
47 | }
48 |
49 | public void SendToView(string viewId, string id, object parameters)
50 | {
51 | JSComContextHelper.instances[viewId].TransmitEvent(Plugin.Slug, new PluginMessage()
52 | {
53 | messageID = id,
54 | data = parameters
55 | });
56 | }
57 |
58 | public event MessageHandler OnMessageReceived;
59 | }
60 |
61 | class PluginLoadContext : AssemblyLoadContext
62 | {
63 | private AssemblyDependencyResolver _resolver;
64 |
65 | public PluginLoadContext(string pluginPath)
66 | {
67 | _resolver = new AssemblyDependencyResolver(pluginPath);
68 | }
69 |
70 | protected override Assembly Load(AssemblyName assemblyName)
71 | {
72 | if (assemblyName.FullName == typeof(DMPlugin).Assembly.FullName)
73 | {
74 | return null;
75 | }
76 | string assemblyPath = _resolver.ResolveAssemblyToPath(assemblyName);
77 | if (assemblyPath != null)
78 | {
79 | return LoadFromAssemblyPath(assemblyPath);
80 | }
81 |
82 | return null;
83 | }
84 |
85 | protected override IntPtr LoadUnmanagedDll(string unmanagedDllName)
86 | {
87 | string libraryPath = _resolver.ResolveUnmanagedDllToPath(unmanagedDllName);
88 | if (libraryPath != null)
89 | {
90 | return LoadUnmanagedDllFromPath(libraryPath);
91 | }
92 |
93 | return IntPtr.Zero;
94 | }
95 | }
96 |
97 | public class PluginLoader
98 | {
99 | public static List Plugins { get; set; }
100 | public static List PluginASM { get; private set; }
101 | static IEnumerable InitializePlugin(Assembly assembly)
102 | {
103 | int count = 0;
104 |
105 | foreach (Type type in assembly.GetTypes())
106 | {
107 | var pluginFQDN = type.Module.FullyQualifiedName;
108 | var modelFQDN = typeof(DMPlugin).Module.FullyQualifiedName;
109 | Console.WriteLine($"Plugin Injector: {pluginFQDN}/{modelFQDN}");
110 | if (typeof(DMPlugin).IsAssignableFrom(type))
111 | {
112 | DMPlugin result = Activator.CreateInstance(type) as DMPlugin;
113 | if (result != null)
114 | {
115 | result.Initialize(new PluginHelper(result));
116 | count++;
117 | yield return result;
118 | }
119 | }
120 | }
121 |
122 | if (count == 0)
123 | {
124 | /*string availableTypes = string.Join(",", assembly.GetTypes().Select(t => t.FullName));
125 | throw new ApplicationException(
126 | $"Can't find any type which implements DMPlugin in {assembly} from {assembly.Location}.\n" +
127 | $"Available types: {availableTypes}");*/
128 | }
129 | }
130 |
131 | public static void LoadPlugins()
132 | {
133 | Plugins = new List();
134 | PluginASM = new List();
135 | //Load the DLLs from the Plugins directory
136 | if (Directory.Exists(App.PluginBase))
137 | {
138 | var loadContext = new PluginLoadContext(App.PluginBase);
139 | string[] files = Directory.GetFiles(App.PluginBase);
140 | foreach (string file in files)
141 | {
142 | if (file.EndsWith(".dll"))
143 | {
144 | PluginASM.Add(loadContext.LoadFromAssemblyPath(file));
145 |
146 |
147 | }
148 | }
149 | }
150 |
151 |
152 | }
153 |
154 | public static void ReloadPlugins()
155 | {
156 | foreach (var plugin in Plugins)
157 | {
158 | plugin.Terminate();
159 | }
160 | Plugins = new List();
161 | PluginASM = new List();
162 | LoadPlugins();
163 | }
164 |
165 | public static void InitializePlugins()
166 | {
167 | foreach (var asm in PluginASM)
168 | {
169 | Plugins.AddRange(InitializePlugin(asm));
170 | }
171 | }
172 | }
173 | }
174 |
--------------------------------------------------------------------------------
/DropMeter.WidgetSDK/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "include": ["src"],
3 | "compilerOptions": {
4 | /* Visit https://aka.ms/tsconfig.json to read more about this file */
5 |
6 | /* Basic Options */
7 | // "incremental": true, /* Enable incremental compilation */
8 | "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
9 | "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
10 | // "lib": [], /* Specify library files to be included in the compilation. */
11 | // "allowJs": true, /* Allow javascript files to be compiled. */
12 | // "checkJs": true, /* Report errors in .js files. */
13 | // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
14 | "declaration": true, /* Generates corresponding '.d.ts' file. */
15 | // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
16 | // "sourceMap": true, /* Generates corresponding '.map' file. */
17 | // "outFile": "./", /* Concatenate and emit output to single file. */
18 | "outDir": "./dist", /* Redirect output structure to the directory. */
19 | // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
20 | // "composite": true, /* Enable project compilation */
21 | // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
22 | // "removeComments": true, /* Do not emit comments to output. */
23 | // "noEmit": true, /* Do not emit outputs. */
24 | // "importHelpers": true, /* Import emit helpers from 'tslib'. */
25 | // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
26 | // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
27 |
28 | /* Strict Type-Checking Options */
29 | "strict": true, /* Enable all strict type-checking options. */
30 | // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
31 | // "strictNullChecks": true, /* Enable strict null checks. */
32 | // "strictFunctionTypes": true, /* Enable strict checking of function types. */
33 | // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
34 | // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
35 | // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
36 | // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
37 |
38 | /* Additional Checks */
39 | // "noUnusedLocals": true, /* Report errors on unused locals. */
40 | // "noUnusedParameters": true, /* Report errors on unused parameters. */
41 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
42 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
43 | // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
44 |
45 | /* Module Resolution Options */
46 | // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
47 | // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
48 | // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
49 | // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
50 | // "typeRoots": [], /* List of folders to include type definitions from. */
51 | // "types": [], /* Type declaration files to be included in compilation. */
52 | // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
53 | "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
54 | // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
55 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
56 |
57 | /* Source Map Options */
58 | // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
59 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
60 | // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
61 | // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
62 |
63 | /* Experimental Options */
64 | // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
65 | // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
66 |
67 | /* Advanced Options */
68 | "skipLibCheck": true, /* Skip type checking of declaration files. */
69 | "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/WebView2Test/WebView2Test.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {8CB91F9B-C8C4-49B5-AFB4-6D6D4168ED11}
8 | WinExe
9 | WebView2Test
10 | WebView2Test
11 | v4.7.2
12 | 512
13 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
14 | 4
15 | true
16 | true
17 |
18 |
19 |
20 |
21 | AnyCPU
22 | true
23 | full
24 | false
25 | bin\Debug\
26 | DEBUG;TRACE
27 | prompt
28 | 4
29 |
30 |
31 | AnyCPU
32 | pdbonly
33 | true
34 | bin\Release\
35 | TRACE
36 | prompt
37 | 4
38 |
39 |
40 |
41 | ..\packages\Microsoft.Web.WebView2.1.0.721-prerelease\lib\net45\Microsoft.Web.WebView2.Core.dll
42 |
43 |
44 | ..\packages\Microsoft.Web.WebView2.1.0.721-prerelease\lib\net45\Microsoft.Web.WebView2.WinForms.dll
45 |
46 |
47 | ..\packages\Microsoft.Web.WebView2.1.0.721-prerelease\lib\net45\Microsoft.Web.WebView2.Wpf.dll
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | 4.0
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 | MSBuild:Compile
67 | Designer
68 |
69 |
70 | MSBuild:Compile
71 | Designer
72 |
73 |
74 | App.xaml
75 | Code
76 |
77 |
78 | MainWindow.xaml
79 | Code
80 |
81 |
82 |
83 |
84 | Code
85 |
86 |
87 | True
88 | True
89 | Resources.resx
90 |
91 |
92 | True
93 | Settings.settings
94 | True
95 |
96 |
97 | ResXFileCodeGenerator
98 | Resources.Designer.cs
99 |
100 |
101 |
102 | SettingsSingleFileGenerator
103 | Settings.Designer.cs
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
114 |
115 |
116 |
117 |
--------------------------------------------------------------------------------
/WallpaperEngineButBetter/WallpaperEngineButBetter.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {C26CA2CE-FDA6-4660-87B4-4CA366FCDF75}
8 | WinExe
9 | WallpaperEngineButBetter
10 | WallpaperEngineButBetter
11 | v4.7.2
12 | 512
13 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
14 | 4
15 | true
16 | true
17 | false
18 | publish\
19 | true
20 | Disk
21 | false
22 | Foreground
23 | 7
24 | Days
25 | false
26 | false
27 | true
28 | true
29 | 1
30 | 1.0.0.%2a
31 | false
32 | true
33 | true
34 |
35 |
36 | AnyCPU
37 | true
38 | full
39 | false
40 | bin\Debug\
41 | DEBUG;TRACE
42 | prompt
43 | 4
44 |
45 |
46 | AnyCPU
47 | pdbonly
48 | true
49 | bin\Release\
50 | TRACE
51 | prompt
52 | 4
53 |
54 |
55 | 85862C212D2E071DD3351E9E718F476E4D53CC1C
56 |
57 |
58 | WallpaperEngineButBetter_TemporaryKey.pfx
59 |
60 |
61 | true
62 |
63 |
64 | false
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | 4.0
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 | MSBuild:Compile
86 | Designer
87 |
88 |
89 |
90 | MSBuild:Compile
91 | Designer
92 |
93 |
94 | App.xaml
95 | Code
96 |
97 |
98 | MainWindow.xaml
99 | Code
100 |
101 |
102 |
103 |
104 | Code
105 |
106 |
107 | True
108 | True
109 | Resources.resx
110 |
111 |
112 | True
113 | Settings.settings
114 | True
115 |
116 |
117 | ResXFileCodeGenerator
118 | Resources.Designer.cs
119 |
120 |
121 | SettingsSingleFileGenerator
122 | Settings.Designer.cs
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 | False
132 | Microsoft .NET Framework 4.7.2 %28x86 and x64%29
133 | true
134 |
135 |
136 | False
137 | .NET Framework 3.5 SP1
138 | false
139 |
140 |
141 |
142 |
--------------------------------------------------------------------------------
/DropMeter.WebNowPlaying.RainMeterCompat/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.userosscache
8 | *.sln.docstates
9 |
10 | # User-specific files (MonoDevelop/Xamarin Studio)
11 | *.userprefs
12 |
13 | # Build results
14 | [Dd]ebug/
15 | [Dd]ebugPublic/
16 | [Rr]elease/
17 | [Rr]eleases/
18 | x64/
19 | x86/
20 | bld/
21 | [Bb]in/
22 | [Oo]bj/
23 | [Ll]og/
24 |
25 | # Visual Studio 2015 cache/options directory
26 | .vs/
27 | # Uncomment if you have tasks that create the project's static files in wwwroot
28 | #wwwroot/
29 |
30 | # MSTest test Results
31 | [Tt]est[Rr]esult*/
32 | [Bb]uild[Ll]og.*
33 |
34 | # NUNIT
35 | *.VisualState.xml
36 | TestResult.xml
37 |
38 | # Build Results of an ATL Project
39 | [Dd]ebugPS/
40 | [Rr]eleasePS/
41 | dlldata.c
42 |
43 | # DNX
44 | project.lock.json
45 | artifacts/
46 |
47 | *_i.c
48 | *_p.c
49 | *_i.h
50 | *.ilk
51 | *.meta
52 | *.obj
53 | *.pch
54 | *.pdb
55 | *.pgc
56 | *.pgd
57 | *.rsp
58 | *.sbr
59 | *.tlb
60 | *.tli
61 | *.tlh
62 | *.tmp
63 | *.tmp_proj
64 | *.log
65 | *.vspscc
66 | *.vssscc
67 | .builds
68 | *.pidb
69 | *.svclog
70 | *.scc
71 |
72 | # Chutzpah Test files
73 | _Chutzpah*
74 |
75 | # Visual C++ cache files
76 | ipch/
77 | *.aps
78 | *.ncb
79 | *.opendb
80 | *.opensdf
81 | *.sdf
82 | *.cachefile
83 | *.VC.db
84 | *.VC.VC.opendb
85 |
86 | # Visual Studio profiler
87 | *.psess
88 | *.vsp
89 | *.vspx
90 | *.sap
91 |
92 | # TFS 2012 Local Workspace
93 | $tf/
94 |
95 | # Guidance Automation Toolkit
96 | *.gpState
97 |
98 | # ReSharper is a .NET coding add-in
99 | _ReSharper*/
100 | *.[Rr]e[Ss]harper
101 | *.DotSettings.user
102 |
103 | # JustCode is a .NET coding add-in
104 | .JustCode
105 |
106 | # TeamCity is a build add-in
107 | _TeamCity*
108 |
109 | # DotCover is a Code Coverage Tool
110 | *.dotCover
111 |
112 | # NCrunch
113 | _NCrunch_*
114 | .*crunch*.local.xml
115 | nCrunchTemp_*
116 |
117 | # MightyMoose
118 | *.mm.*
119 | AutoTest.Net/
120 |
121 | # Web workbench (sass)
122 | .sass-cache/
123 |
124 | # Installshield output folder
125 | [Ee]xpress/
126 |
127 | # DocProject is a documentation generator add-in
128 | DocProject/buildhelp/
129 | DocProject/Help/*.HxT
130 | DocProject/Help/*.HxC
131 | DocProject/Help/*.hhc
132 | DocProject/Help/*.hhk
133 | DocProject/Help/*.hhp
134 | DocProject/Help/Html2
135 | DocProject/Help/html
136 |
137 | # Click-Once directory
138 | publish/
139 |
140 | # Publish Web Output
141 | *.[Pp]ublish.xml
142 | *.azurePubxml
143 | # TODO: Comment the next line if you want to checkin your web deploy settings
144 | # but database connection strings (with potential passwords) will be unencrypted
145 | *.pubxml
146 | *.publishproj
147 |
148 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
149 | # checkin your Azure Web App publish settings, but sensitive information contained
150 | # in these scripts will be unencrypted
151 | PublishScripts/
152 |
153 | # NuGet Packages
154 | *.nupkg
155 | # The packages folder can be ignored because of Package Restore
156 | **/packages/*
157 | # except build/, which is used as an MSBuild target.
158 | !**/packages/build/
159 | # Uncomment if necessary however generally it will be regenerated when needed
160 | #!**/packages/repositories.config
161 | # NuGet v3's project.json files produces more ignoreable files
162 | *.nuget.props
163 | *.nuget.targets
164 |
165 | # Microsoft Azure Build Output
166 | csx/
167 | *.build.csdef
168 |
169 | # Microsoft Azure Emulator
170 | ecf/
171 | rcf/
172 |
173 | # Windows Store app package directories and files
174 | AppPackages/
175 | BundleArtifacts/
176 | Package.StoreAssociation.xml
177 | _pkginfo.txt
178 |
179 | # Visual Studio cache files
180 | # files ending in .cache can be ignored
181 | *.[Cc]ache
182 | # but keep track of directories ending in .cache
183 | !*.[Cc]ache/
184 |
185 | # Others
186 | ClientBin/
187 | ~$*
188 | *~
189 | *.dbmdl
190 | *.dbproj.schemaview
191 | *.pfx
192 | *.publishsettings
193 | node_modules/
194 | orleans.codegen.cs
195 |
196 | # Since there are multiple workflows, uncomment next line to ignore bower_components
197 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
198 | #bower_components/
199 |
200 | # RIA/Silverlight projects
201 | Generated_Code/
202 |
203 | # Backup & report files from converting an old project file
204 | # to a newer Visual Studio version. Backup files are not needed,
205 | # because we have git ;-)
206 | _UpgradeReport_Files/
207 | Backup*/
208 | UpgradeLog*.XML
209 | UpgradeLog*.htm
210 |
211 | # SQL Server files
212 | *.mdf
213 | *.ldf
214 |
215 | # Business Intelligence projects
216 | *.rdl.data
217 | *.bim.layout
218 | *.bim_*.settings
219 |
220 | # Microsoft Fakes
221 | FakesAssemblies/
222 |
223 | # GhostDoc plugin setting file
224 | *.GhostDoc.xml
225 |
226 | # Node.js Tools for Visual Studio
227 | .ntvs_analysis.dat
228 |
229 | # Visual Studio 6 build log
230 | *.plg
231 |
232 | # Visual Studio 6 workspace options file
233 | *.opt
234 |
235 | # Visual Studio LightSwitch build output
236 | **/*.HTMLClient/GeneratedArtifacts
237 | **/*.DesktopClient/GeneratedArtifacts
238 | **/*.DesktopClient/ModelManifest.xml
239 | **/*.Server/GeneratedArtifacts
240 | **/*.Server/ModelManifest.xml
241 | _Pvt_Extensions
242 |
243 | # Paket dependency manager
244 | .paket/paket.exe
245 | paket-files/
246 |
247 | # FAKE - F# Make
248 | .fake/
249 |
250 | # JetBrains Rider
251 | .idea/
252 | *.sln.iml
253 |
254 | # =========================
255 | # Operating System Files
256 | # =========================
257 |
258 | # OSX
259 | # =========================
260 |
261 | .DS_Store
262 | .AppleDouble
263 | .LSOverride
264 |
265 | # Thumbnails
266 | ._*
267 |
268 | # Files that might appear in the root of a volume
269 | .DocumentRevisions-V100
270 | .fseventsd
271 | .Spotlight-V100
272 | .TemporaryItems
273 | .Trashes
274 | .VolumeIcon.icns
275 |
276 | # Directories potentially created on remote AFP share
277 | .AppleDB
278 | .AppleDesktop
279 | Network Trash Folder
280 | Temporary Items
281 | .apdisk
282 |
283 | # Windows
284 | # =========================
285 |
286 | # Windows image file caches
287 | Thumbs.db
288 | ehthumbs.db
289 |
290 | # Folder config file
291 | Desktop.ini
292 |
293 | # Recycle Bin used on file shares
294 | $RECYCLE.BIN/
295 |
296 | # Windows Installer files
297 | *.cab
298 | *.msi
299 | *.msm
300 | *.msp
301 |
302 | # Windows shortcuts
303 | *.lnk
304 | obj/x64/Debug/DesignTimeResolveAssemblyReferencesInput.cache
305 | obj/x64/Release/DesignTimeResolveAssemblyReferencesInput.cache
306 | APIKeysPrivate.cs
307 |
--------------------------------------------------------------------------------
/DropMeter/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 | ..\Resources\logo.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
123 |
124 |
125 | ..\Resources\logo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
126 |
127 |
--------------------------------------------------------------------------------
/MigrationBackup/808e205b/Plugins/DropMeter.WebNowPlaying.RainMeterCompat/DropMeter.WebNowPlaying.RainMeterCompat.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | x86
7 | 9.0.30729
8 | 2.0
9 | {E6C9B5D4-78A1-45A0-95F3-48F257D4EE5A}
10 | Library
11 | Properties
12 | WebNowPlaying
13 | WebNowPlaying
14 | v4.8
15 | 512
16 | 3.5
17 |
18 | publish\
19 | true
20 | Disk
21 | false
22 | Foreground
23 | 7
24 | Days
25 | false
26 | false
27 | true
28 | 0
29 | 1.0.0.%2a
30 | false
31 | false
32 | true
33 |
34 |
35 |
36 |
37 |
38 |
39 | true
40 | full
41 | false
42 | x32\Debug\
43 | TRACE;DEBUG
44 | prompt
45 | 4
46 | 1607
47 | x86
48 | false
49 |
50 |
51 | none
52 | true
53 | x32\Release\
54 | TRACE
55 | prompt
56 | 4
57 | 1607
58 | x86
59 | false
60 |
61 |
62 | true
63 | x64\Debug\
64 | TRACE;DEBUG;X64
65 | full
66 | x64
67 | prompt
68 | 1607
69 | false
70 |
71 |
72 | x64\Release\
73 | TRACE;X64
74 | true
75 | none
76 | x64
77 | prompt
78 | 1607
79 | false
80 |
81 |
82 | Always
83 |
84 |
85 |
86 | packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll
87 | True
88 |
89 |
90 | packages\SpotifyAPI-NET.2.16.0\lib\SpotifyAPI.dll
91 |
92 |
93 |
94 |
95 | packages\WebSocketSharp.1.0.3-rc11\lib\websocket-sharp.dll
96 | True
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
120 |
121 | "$(SolutionDir).\API\DllExporter.exe" "$(ConfigurationName)" "$(PlatformName)" "$(TargetDir)\" "$(TargetFileName)"
122 | xcopy "$(TargetDir)$(TargetFileName)" "%25appdata%25\Rainmeter\Plugins" /Y
123 |
124 |
125 |
126 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
127 |
128 |
129 |
130 |
131 |
132 |
133 | taskkill /f /fi "imagename eq Rainmeter.exe"
134 |
135 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Build results
17 | [Dd]ebug/
18 | [Dd]ebugPublic/
19 | [Rr]elease/
20 | [Rr]eleases/
21 | x64/
22 | x86/
23 | [Aa][Rr][Mm]/
24 | [Aa][Rr][Mm]64/
25 | bld/
26 | [Bb]in/
27 | [Oo]bj/
28 | [Ll]og/
29 |
30 | # Visual Studio 2015/2017 cache/options directory
31 | .vs/
32 | # Uncomment if you have tasks that create the project's static files in wwwroot
33 | #wwwroot/
34 |
35 | # Visual Studio 2017 auto generated files
36 | Generated\ Files/
37 |
38 | # MSTest test Results
39 | [Tt]est[Rr]esult*/
40 | [Bb]uild[Ll]og.*
41 |
42 | # NUNIT
43 | *.VisualState.xml
44 | TestResult.xml
45 |
46 | # Build Results of an ATL Project
47 | [Dd]ebugPS/
48 | [Rr]eleasePS/
49 | dlldata.c
50 |
51 | # Benchmark Results
52 | BenchmarkDotNet.Artifacts/
53 |
54 | # .NET Core
55 | project.lock.json
56 | project.fragment.lock.json
57 | artifacts/
58 |
59 | # StyleCop
60 | StyleCopReport.xml
61 |
62 | # Files built by Visual Studio
63 | *_i.c
64 | *_p.c
65 | *_h.h
66 | *.ilk
67 | *.meta
68 | *.obj
69 | *.iobj
70 | *.pch
71 | *.pdb
72 | *.ipdb
73 | *.pgc
74 | *.pgd
75 | *.rsp
76 | *.sbr
77 | *.tlb
78 | *.tli
79 | *.tlh
80 | *.tmp
81 | *.tmp_proj
82 | *_wpftmp.csproj
83 | *.log
84 | *.vspscc
85 | *.vssscc
86 | .builds
87 | *.pidb
88 | *.svclog
89 | *.scc
90 |
91 | # Chutzpah Test files
92 | _Chutzpah*
93 |
94 | # Visual C++ cache files
95 | ipch/
96 | *.aps
97 | *.ncb
98 | *.opendb
99 | *.opensdf
100 | *.sdf
101 | *.cachefile
102 | *.VC.db
103 | *.VC.VC.opendb
104 |
105 | # Visual Studio profiler
106 | *.psess
107 | *.vsp
108 | *.vspx
109 | *.sap
110 |
111 | # Visual Studio Trace Files
112 | *.e2e
113 |
114 | # TFS 2012 Local Workspace
115 | $tf/
116 |
117 | # Guidance Automation Toolkit
118 | *.gpState
119 |
120 | # ReSharper is a .NET coding add-in
121 | _ReSharper*/
122 | *.[Rr]e[Ss]harper
123 | *.DotSettings.user
124 |
125 | # JustCode is a .NET coding add-in
126 | .JustCode
127 |
128 | # TeamCity is a build add-in
129 | _TeamCity*
130 |
131 | # DotCover is a Code Coverage Tool
132 | *.dotCover
133 |
134 | # AxoCover is a Code Coverage Tool
135 | .axoCover/*
136 | !.axoCover/settings.json
137 |
138 | # Visual Studio code coverage results
139 | *.coverage
140 | *.coveragexml
141 |
142 | # NCrunch
143 | _NCrunch_*
144 | .*crunch*.local.xml
145 | nCrunchTemp_*
146 |
147 | # MightyMoose
148 | *.mm.*
149 | AutoTest.Net/
150 |
151 | # Web workbench (sass)
152 | .sass-cache/
153 |
154 | # Installshield output folder
155 | [Ee]xpress/
156 |
157 | # DocProject is a documentation generator add-in
158 | DocProject/buildhelp/
159 | DocProject/Help/*.HxT
160 | DocProject/Help/*.HxC
161 | DocProject/Help/*.hhc
162 | DocProject/Help/*.hhk
163 | DocProject/Help/*.hhp
164 | DocProject/Help/Html2
165 | DocProject/Help/html
166 |
167 | # Click-Once directory
168 | publish/
169 |
170 | # Publish Web Output
171 | *.[Pp]ublish.xml
172 | *.azurePubxml
173 | # Note: Comment the next line if you want to checkin your web deploy settings,
174 | # but database connection strings (with potential passwords) will be unencrypted
175 | *.pubxml
176 | *.publishproj
177 |
178 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
179 | # checkin your Azure Web App publish settings, but sensitive information contained
180 | # in these scripts will be unencrypted
181 | PublishScripts/
182 |
183 | # NuGet Packages
184 | *.nupkg
185 | # The packages folder can be ignored because of Package Restore
186 | **/[Pp]ackages/*
187 | # except build/, which is used as an MSBuild target.
188 | !**/[Pp]ackages/build/
189 | # Uncomment if necessary however generally it will be regenerated when needed
190 | #!**/[Pp]ackages/repositories.config
191 | # NuGet v3's project.json files produces more ignorable files
192 | *.nuget.props
193 | *.nuget.targets
194 |
195 | # Microsoft Azure Build Output
196 | csx/
197 | *.build.csdef
198 |
199 | # Microsoft Azure Emulator
200 | ecf/
201 | rcf/
202 |
203 | # Windows Store app package directories and files
204 | AppPackages/
205 | BundleArtifacts/
206 | Package.StoreAssociation.xml
207 | _pkginfo.txt
208 | *.appx
209 |
210 | # Visual Studio cache files
211 | # files ending in .cache can be ignored
212 | *.[Cc]ache
213 | # but keep track of directories ending in .cache
214 | !?*.[Cc]ache/
215 |
216 | # Others
217 | ClientBin/
218 | ~$*
219 | *~
220 | *.dbmdl
221 | *.dbproj.schemaview
222 | *.jfm
223 | *.pfx
224 | *.publishsettings
225 | orleans.codegen.cs
226 |
227 | # Including strong name files can present a security risk
228 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
229 | #*.snk
230 |
231 | # Since there are multiple workflows, uncomment next line to ignore bower_components
232 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
233 | #bower_components/
234 |
235 | # RIA/Silverlight projects
236 | Generated_Code/
237 |
238 | # Backup & report files from converting an old project file
239 | # to a newer Visual Studio version. Backup files are not needed,
240 | # because we have git ;-)
241 | _UpgradeReport_Files/
242 | Backup*/
243 | UpgradeLog*.XML
244 | UpgradeLog*.htm
245 | ServiceFabricBackup/
246 | *.rptproj.bak
247 |
248 | # SQL Server files
249 | *.mdf
250 | *.ldf
251 | *.ndf
252 |
253 | # Business Intelligence projects
254 | *.rdl.data
255 | *.bim.layout
256 | *.bim_*.settings
257 | *.rptproj.rsuser
258 | *- Backup*.rdl
259 |
260 | # Microsoft Fakes
261 | FakesAssemblies/
262 |
263 | # GhostDoc plugin setting file
264 | *.GhostDoc.xml
265 |
266 | # Node.js Tools for Visual Studio
267 | .ntvs_analysis.dat
268 | node_modules/
269 |
270 | # Visual Studio 6 build log
271 | *.plg
272 |
273 | # Visual Studio 6 workspace options file
274 | *.opt
275 |
276 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
277 | *.vbw
278 |
279 | # Visual Studio LightSwitch build output
280 | **/*.HTMLClient/GeneratedArtifacts
281 | **/*.DesktopClient/GeneratedArtifacts
282 | **/*.DesktopClient/ModelManifest.xml
283 | **/*.Server/GeneratedArtifacts
284 | **/*.Server/ModelManifest.xml
285 | _Pvt_Extensions
286 |
287 | # Paket dependency manager
288 | .paket/paket.exe
289 | paket-files/
290 |
291 | # FAKE - F# Make
292 | .fake/
293 |
294 | # JetBrains Rider
295 | .idea/
296 | *.sln.iml
297 |
298 | # CodeRush personal settings
299 | .cr/personal
300 |
301 | # Python Tools for Visual Studio (PTVS)
302 | __pycache__/
303 | *.pyc
304 |
305 | # Cake - Uncomment if you are using it
306 | # tools/**
307 | # !tools/packages.config
308 |
309 | # Tabs Studio
310 | *.tss
311 |
312 | # Telerik's JustMock configuration file
313 | *.jmconfig
314 |
315 | # BizTalk build output
316 | *.btp.cs
317 | *.btm.cs
318 | *.odx.cs
319 | *.xsd.cs
320 |
321 | # OpenCover UI analysis results
322 | OpenCover/
323 |
324 | # Azure Stream Analytics local run output
325 | ASALocalRun/
326 |
327 | # MSBuild Binary and Structured Log
328 | *.binlog
329 |
330 | # NVidia Nsight GPU debugger configuration file
331 | *.nvuser
332 |
333 | # MFractors (Xamarin productivity tool) working folder
334 | .mfractor/
335 |
336 | # Local History for Visual Studio
337 | .localhistory/
338 |
339 | # BeatPulse healthcheck temp database
340 | healthchecksdb
--------------------------------------------------------------------------------
/DropMeter/HTMLWidget.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 | using System.Windows;
9 | using System.Windows.Input;
10 | using System.Windows.Interop;
11 | using CefSharp;
12 | using CefSharp.Internals;
13 | using CefSharp.JavascriptBinding;
14 | using CefSharp.Wpf;
15 | using DropMeter.CEF;
16 | using DropMeter.Win32;
17 | using NLog;
18 | using Newtonsoft.Json;
19 | using Path = System.IO.Path;
20 |
21 | namespace DropMeter
22 | {
23 | internal class WidgetDataStore
24 | {
25 | [JsonProperty]
26 | internal double TopPosition;
27 | [JsonProperty]
28 | internal double LeftPosition;
29 | [JsonProperty]
30 | internal double Height;
31 | [JsonProperty]
32 | internal double Width;
33 | }
34 | ///
35 | /// Interaction logic for HTMLWidget.xaml
36 | ///
37 | public partial class HTMLWidget : Window
38 | {
39 | public string WidgetName;
40 |
41 |
42 |
43 | private bool attachToDesktop = true;
44 | private WallpaperOverwrite WallpaperDisplay;
45 | internal ILogger logger;
46 |
47 | internal static string DATAPATH = System.IO.Path.Combine(App.BASE, "ldata");
48 | internal string LDataPath;
49 |
50 | public ChromiumWebBrowser WidgetWebView
51 | {
52 | get
53 | {
54 | return this.WebView;
55 | }
56 | }
57 | public HTMLWidget(string widgetName, bool attachToDesktop = true)
58 | {
59 | WallpaperDisplay = new WallpaperOverwrite(this);
60 |
61 | this.logger = App.LogFactory.GetLogger(widgetName);
62 | this.attachToDesktop = attachToDesktop;
63 |
64 | InitializeComponent();
65 | LDataPath = Path.Combine(DATAPATH, widgetName + ".win32.json");
66 |
67 | BrowserSettings settings = new BrowserSettings();
68 | settings.WebSecurity = CefState.Disabled;
69 | settings.FileAccessFromFileUrls = CefState.Enabled;
70 | settings.UniversalAccessFromFileUrls = CefState.Enabled;
71 | WebView.BrowserSettings = settings;
72 | //TODO: Implement config cors bypassing
73 | var mmx = Cef.AddCrossOriginWhitelistEntry("widgets://test", "https", "musixmatch.com", true);
74 | WebView.MenuHandler = new CloseMenuHandler(this);
75 | WebView.DragHandler = new DragDropHandler();
76 | this.WidgetName = widgetName;
77 | }
78 |
79 | private void Window_Loaded(object sender, RoutedEventArgs e)
80 | {
81 | if (File.Exists(LDataPath))
82 | {
83 | logger.Debug("Found Win32 POS Info.");
84 | WindowPlacement data = JsonConvert.DeserializeObject(File.ReadAllText(LDataPath));
85 | var hwnd = new WindowInteropHelper(this).Handle;
86 | data.length = Marshal.SizeOf(typeof(WindowPlacement));
87 | data.flags = 0;
88 | data.showCmd = (data.showCmd == (int)DISPLAY_MODE.SW_SHOW_MINIMIZED ? (int)DISPLAY_MODE.SW_SHOW_NORMAL : data.showCmd);
89 | WindowPlacementWin32.SetWindowPlacement(hwnd, ref data);
90 | }
91 | #region Desktop Widget Inner Gears
92 | if (attachToDesktop)
93 | {
94 | WallpaperDisplay.AttachToDesktop();
95 | }
96 | #endregion
97 |
98 |
99 | EnterWidgetMode(null, null);
100 |
101 |
102 | }
103 |
104 | private void Window_MouseDown(object sender, MouseButtonEventArgs e)
105 | {
106 | if (e.ChangedButton == MouseButton.Left)
107 | this.DragMove();
108 | }
109 |
110 | private void WebView_IsBrowserInitializedChanged(object _, DependencyPropertyChangedEventArgs dep)
111 | {
112 |
113 | this.WebView.JavascriptObjectRepository.ResolveObject += (sender, e) =>
114 | {
115 | var repo = e.ObjectRepository;
116 | if (e.ObjectName == "DropMeter")
117 | {
118 | BindingOptions bindingOptions = null; //Binding options is an optional param, defaults to null
119 | bindingOptions = BindingOptions.DefaultBinder; //Use the default binder to serialize values into complex objects
120 |
121 | //bindingOptions = new BindingOptions { Binder = new MyCustomBinder() }); //Specify a custom binder
122 | repo.NameConverter = null; //No CamelCase of Javascript Names
123 | //For backwards compatability reasons the default NameConverter doesn't change the case of the objects returned from methods calls.
124 | //https://github.com/cefsharp/CefSharp/issues/2442
125 | //Use the new name converter to bound object method names and property names of returned objects converted to camelCase
126 | repo.NameConverter = new CamelCaseJavascriptNameConverter();
127 |
128 | repo.Register("DropMeter", JSComContextHelper.instances[WidgetName], options: bindingOptions);
129 | }
130 | };
131 | this.WebView.Address = $"{LocalFileHandlerFactory.SchemeName}://{WidgetName}/index.html";
132 | /*this.WebView.LoadHtml(@"
133 |
134 |
135 |
136 | My First Heading
137 | My first paragraph.
138 |
139 |
147 |
148 | ", "http://demoplugin.int/");*/
149 |
150 | //this.WebView.ShowDevTools();
151 |
152 | }
153 |
154 | private void EnterWidgetMode(object sender, RoutedEventArgs e)
155 | {
156 |
157 | // Sender is null if not invoked by user
158 | if (sender != null)
159 | {
160 | Console.WriteLine("Saving Widget Data...");
161 |
162 | WindowPlacement wp;
163 | var hwnd = new WindowInteropHelper(this).Handle;
164 | WindowPlacementWin32.GetWindowPlacement(hwnd, out wp);
165 | var encoded = JsonConvert.SerializeObject(wp);
166 | File.WriteAllText(LDataPath, encoded);
167 | }
168 |
169 | this.ResizeMode = ResizeMode.NoResize;
170 | WidgetMove.Visibility = Visibility.Hidden;
171 | WebView.Visibility = Visibility.Visible;
172 | }
173 |
174 | public void EnterMoveMode()
175 | {
176 | Dispatcher.Invoke(() =>
177 | {
178 | this.ResizeMode = ResizeMode.CanResizeWithGrip;
179 | WidgetMove.Visibility = Visibility.Visible;
180 | WebView.Visibility = Visibility.Hidden;
181 | });
182 | }
183 |
184 | private void WebView_FrameLoadEnd(object sender, FrameLoadEndEventArgs args)
185 | {
186 | if (args.Frame.IsMain)
187 | {
188 | args.Frame.ExecuteJavaScriptAsync("CefSharp.BindObjectAsync(\"DropMeter\");");
189 | }
190 | }
191 | }
192 | }
193 |
--------------------------------------------------------------------------------