mirror of
https://github.com/greenshot/greenshot
synced 2025-08-21 14:03:23 -07:00
Improved the support for dragging and dropping images from a website, now also parsing HTML img src information, to be able to download that image. For this we need the HtmlAgilityPack.dll (#294)
Removed a lot of dead code, and remove the old OCR code as we don't even know if it still works.
This commit is contained in:
parent
90cab1e8a3
commit
26fe579d31
151 changed files with 1138 additions and 8174 deletions
|
@ -1,34 +0,0 @@
|
|||
// Copyright (c) Dapplo and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
using System;
|
||||
|
||||
namespace GreenshotPlugin.Core.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// In Per Monitor v2 contexts, dialogs will automatically respond to DPI changes by resizing themselves and re-computing the positions of their child windows (here referred to as re-layouting). This enum works in conjunction with SetDialogDpiChangeBehavior in order to override the default DPI scaling behavior for dialogs.
|
||||
/// This does not affect DPI scaling behavior for the child windows of dialogs(beyond re-layouting), which is controlled by DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS.
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum DialogDpiChangeBehaviors
|
||||
{
|
||||
/// <summary>
|
||||
/// The default behavior of the dialog manager. In response to a DPI change, the dialog manager will re-layout each control, update the font on each control, resize the dialog, and update the dialog's own font.
|
||||
/// </summary>
|
||||
Default = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Prevents the dialog manager from responding to WM_GETDPISCALEDSIZE and WM_DPICHANGED, disabling all default DPI scaling behavior.
|
||||
/// </summary>
|
||||
DisableAll = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Prevents the dialog manager from resizing the dialog in response to a DPI change.
|
||||
/// </summary>
|
||||
DisableResize = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Prevents the dialog manager from re-layouting all of the dialogue's immediate children HWNDs in response to a DPI change.
|
||||
/// </summary>
|
||||
DisableControlRelayout = 3
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
// Copyright (c) Dapplo and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
using System;
|
||||
|
||||
namespace GreenshotPlugin.Core.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes per-monitor DPI scaling behavior overrides for child windows within dialogs. The values in this enumeration are bitfields and can be combined.
|
||||
///
|
||||
/// This enum is used with SetDialogControlDpiChangeBehavior in order to override the default per-monitor DPI scaling behavior for a child window within a dialog.
|
||||
///
|
||||
/// These settings only apply to individual controls within dialogs. The dialog-wide per-monitor DPI scaling behavior of a dialog is controlled by DIALOG_DPI_CHANGE_BEHAVIORS.
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum DialogScalingBehaviors
|
||||
{
|
||||
/// <summary>
|
||||
/// The default behavior of the dialog manager. The dialog managed will update the font, size, and position of the child window on DPI changes.
|
||||
/// </summary>
|
||||
Default = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Prevents the dialog manager from sending an updated font to the child window via WM_SETFONT in response to a DPI change.
|
||||
/// </summary>
|
||||
DisableFontUpdate = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Prevents the dialog manager from resizing and repositioning the child window in response to a DPI change.
|
||||
/// </summary>
|
||||
DisableRelayout = 2
|
||||
}
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
// Copyright (c) Dapplo and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
namespace GreenshotPlugin.Core.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Identifies the dots per inch (dpi) setting for a thread, process, or window.
|
||||
/// Can be used everywhere ProcessDpiAwareness is passed.
|
||||
/// </summary>
|
||||
public enum DpiAwareness
|
||||
{
|
||||
/// <summary>
|
||||
/// Invalid DPI awareness. This is an invalid DPI awareness value.
|
||||
/// </summary>
|
||||
Invalid = -1,
|
||||
|
||||
/// <summary>
|
||||
/// DPI unaware.
|
||||
/// This process does not scale for DPI changes and is always assumed to have a scale factor of 100% (96 DPI).
|
||||
/// It will be automatically scaled by the system on any other DPI setting.
|
||||
/// </summary>
|
||||
Unaware = 0,
|
||||
|
||||
/// <summary>
|
||||
/// System DPI aware.
|
||||
/// This process does not scale for DPI changes.
|
||||
/// It will query for the DPI once and use that value for the lifetime of the process.
|
||||
/// If the DPI changes, the process will not adjust to the new DPI value.
|
||||
/// It will be automatically scaled up or down by the system when the DPI changes from the system value.
|
||||
/// </summary>
|
||||
SystemAware = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Per monitor DPI aware.
|
||||
/// This process checks for the DPI when it is created and adjusts the scale factor whenever the DPI changes.
|
||||
/// These processes are not automatically scaled by the system.
|
||||
/// </summary>
|
||||
PerMonitorAware = 2
|
||||
}
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
// Copyright (c) Dapplo and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
namespace GreenshotPlugin.Core.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public enum DpiAwarenessContext
|
||||
{
|
||||
/// <summary>
|
||||
/// DPI unaware.
|
||||
/// This window does not scale for DPI changes and is always assumed to have a scale factor of 100% (96 DPI).
|
||||
/// It will be automatically scaled by the system on any other DPI setting.
|
||||
/// </summary>
|
||||
Unaware = -1,
|
||||
|
||||
/// <summary>
|
||||
/// System DPI aware.
|
||||
/// This window does not scale for DPI changes.
|
||||
/// It will query for the DPI once and use that value for the lifetime of the process.
|
||||
/// If the DPI changes, the process will not adjust to the new DPI value.
|
||||
/// It will be automatically scaled up or down by the system when the DPI changes from the system value.
|
||||
/// </summary>
|
||||
SystemAware = -2,
|
||||
|
||||
/// <summary>
|
||||
/// Per monitor DPI aware.
|
||||
/// This window checks for the DPI when it is created and adjusts the scale factor whenever the DPI changes.
|
||||
/// These processes are not automatically scaled by the system.
|
||||
/// </summary>
|
||||
PerMonitorAware = -3,
|
||||
|
||||
/// <summary>
|
||||
/// Also known as Per Monitor v2. An advancement over the original per-monitor DPI awareness mode, which enables applications to access new DPI-related scaling behaviors on a per top-level window basis.
|
||||
/// Per Monitor v2 was made available in the Creators Update of Windows 10, and is not available on earlier versions of the operating system.
|
||||
/// The additional behaviors introduced are as follows:
|
||||
/// * Child window DPI change notifications - In Per Monitor v2 contexts, the entire window tree is notified of any DPI changes that occur.
|
||||
/// * Scaling of non-client area - All windows will automatically have their non-client area drawn in a DPI sensitive fashion. Calls to EnableNonClientDpiScaling are unnecessary.
|
||||
/// * Scaling of Win32 menus - All NTUSER menus created in Per Monitor v2 contexts will be scaling in a per-monitor fashion.
|
||||
/// * Dialog Scaling - Win32 dialogs created in Per Monitor v2 contexts will automatically respond to DPI changes.
|
||||
/// * Improved scaling of comctl32 controls - Various comctl32 controls have improved DPI scaling behavior in Per Monitor v2 contexts.
|
||||
/// * Improved theming behavior - UxTheme handles opened in the context of a Per Monitor v2 window will operate in terms of the DPI associated with that window.
|
||||
/// </summary>
|
||||
PerMonitorAwareV2 = -4
|
||||
}
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
// Copyright (c) Dapplo and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
namespace GreenshotPlugin.Core.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Identifies the DPI hosting behavior for a window.
|
||||
/// This behavior allows windows created in the thread to host child windows with a different DPI_AWARENESS_CONTEXT
|
||||
/// </summary>
|
||||
public enum DpiHostingBehavior
|
||||
{
|
||||
/// <summary>
|
||||
/// Invalid DPI hosting behavior. This usually occurs if the previous SetThreadDpiHostingBehavior call used an invalid parameter.
|
||||
/// </summary>
|
||||
Invalid = -1,
|
||||
|
||||
/// <summary>
|
||||
/// Default DPI hosting behavior. The associated window behaves as normal, and cannot create or re-parent child windows with a different DPI_AWARENESS_CONTEXT.
|
||||
/// </summary>
|
||||
Default = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Mixed DPI hosting behavior. This enables the creation and re-parenting of child windows with different DPI_AWARENESS_CONTEXT. These child windows will be independently scaled by the OS.
|
||||
/// </summary>
|
||||
Mixed = 1
|
||||
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -1,28 +0,0 @@
|
|||
// Copyright (c) Dapplo and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
namespace GreenshotPlugin.Core.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// If a system parameter is being set, specifies whether the user profile is to be updated, and if so, whether the
|
||||
/// WM_SETTINGCHANGE message is to be broadcast to all top-level windows to notify them of the change.
|
||||
/// This parameter can be zero if you do not want to update the user profile or broadcast the WM_SETTINGCHANGE message,
|
||||
/// or it can be one or more of the following values.
|
||||
/// </summary>
|
||||
public enum SystemParametersInfoBehaviors : uint
|
||||
{
|
||||
/// <summary>
|
||||
/// Do nothing
|
||||
/// </summary>
|
||||
None = 0x00,
|
||||
|
||||
/// <summary>Writes the new system-wide parameter setting to the user profile.</summary>
|
||||
UpdateIniFile = 0x01,
|
||||
|
||||
/// <summary>Broadcasts the WM_SETTINGCHANGE message after updating the user profile.</summary>
|
||||
SendChange = 0x02,
|
||||
|
||||
/// <summary>Same as SPIF_SENDCHANGE.</summary>
|
||||
SendWinIniChange = SendChange
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue